iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
48 lines • 62 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[45862],{36312:function(t,e,a){a.d(e,{x:function(){return i}});a(74423);const i=(t,e)=>t&&t.components.includes(e)},62384:function(t,e,a){a.d(e,{v:function(){return i}});a(74423),a(62953);const i=(t,e,a,i)=>{const[r,n,o]=t.split(".",3);return Number(r)>e||Number(r)===e&&(void 0===i?Number(n)>=a:Number(n)>a)||void 0!==i&&Number(r)===e&&Number(n)===a&&Number(o)>=i}},46190:function(t,e,a){a.d(e,{FD:function(){return c},Is:function(){return i},JF:function(){return r},gt:function(){return n},jj:function(){return s},oL:function(){return l},yd:function(){return o}});a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);const i=["alert","button","climate","cover","configurator","event","input_button","input_select","input_number","input_text","humidifier","lawn_mower","lock","media_player","number","scene","script","select","timer","text","update","vacuum","water_heater"],r=["sensor","binary_sensor","calendar","camera","device_tracker","image","weather"],n=["assist_satellite","conversation","stt","tts"],o=["automation","button","cover","date","datetime","fan","group","humidifier","input_boolean","input_button","input_datetime","input_number","input_select","input_text","light","lock","media_player","number","scene","script","select","switch","text","time","vacuum","valve"],s=["closed","locked","off"],c=new Set(["fan","input_boolean","light","switch","group","automation","humidifier","valve"]),l=new Set(["camera","image","media_player"])},65522:function(t,e,a){a.d(e,{A:function(){return i}});a(42762);const i=t=>{var e;return null===(e=t.name)||void 0===e?void 0:e.trim()}},37981:function(t,e,a){a.d(e,{xn:function(){return n},T:function(){return o},Kh:function(){return c}});a(18111),a(22489),a(61701),a(42762),a(62953);var i=a(22786);a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);var r=a(28978);const n=t=>{var e;return null===(e=t.name_by_user||t.name)||void 0===e?void 0:e.trim()},o=(t,e,a,i)=>n(t)||i&&s(a,i)||e("ui.panel.config.devices.unnamed_device",{type:e(`ui.panel.config.devices.type.${t.entry_type||"device"}`)}),s=(t,e)=>{for(const a of e||[]){const e=t["string"==typeof a?a:a.entity_id];if(e)return(0,r.u)(e)}},c=(0,i.A)(t=>function(t){const e=new Set,a=new Set;for(const i of t)a.has(i)?e.add(i):a.add(i);return e}(Object.values(t).map(t=>n(t)).filter(t=>void 0!==t)))},81816:function(t,e,a){a.d(e,{aH:function(){return o},cx:function(){return s},es:function(){return c}});var i=a(37981),r=a(28978),n=a(79461);const o=(t,e,a)=>{const i=e[t.entity_id];return i?s(i,a):(0,r.u)(t)},s=(t,e,a)=>{const o=t.name||("original_name"in t&&null!=t.original_name?String(t.original_name):void 0),s=t.device_id?e[t.device_id]:void 0;if(!s)return o||(a?(0,r.u)(a):void 0);const c=(0,i.xn)(s);return c!==o?c&&o&&(0,n.p)(o,c)||o:void 0},c=(t,e,a)=>!o(t,e,a)},74705:function(t,e,a){a.d(e,{Bj:function(){return f},Cf:function(){return u},uU:function(){return h}});a(18111),a(81148),a(22489),a(61701),a(13579),a(62953);if(66649!=a.j)var i=a(44537);var r=a(15638),n=a(65522),o=a(37981),s=a(81816),c=a(55931),l=a(28978),d=a(28455);const h=(t,e,a,r,n,o,c)=>{var d;if("string"==typeof e)return e;if(!e)return(0,l.u)(t);let h=(0,i.e)(e);const f=null!==(d=null==c?void 0:c.separator)&&void 0!==d?d:" ";if(h.every(t=>"text"===t.type))return h.map(t=>t.text).join(f);if((0,s.es)(t,a,r)){h.some(t=>"device"===t.type)||(h=h.map(t=>"entity"===t.type?{type:"device"}:t))}const p=u(t,h,a,r,n,o);return 1===p.length?p[0]||"":p.filter(t=>t).join(f)},u=(t,e,a,i,r,l)=>{const{device:h,area:u,floor:f}=(0,d.ln)(t,a,i,r,l);return e.map(e=>{switch(e.type){case"entity":return(0,s.aH)(t,a,i);case"device":return h?(0,o.xn)(h):void 0;case"area":return u?(0,n.A)(u):void 0;case"floor":return f?(0,c.X)(f):void 0;case"text":return e.text;default:return""}})},f=(t,e)=>{const[a,i,n]=u(e,[{type:"entity"},{type:"device"},{type:"area"}],t.entities,t.devices,t.areas,t.floors),o=(0,r.qC)(t.language,t.translationMetadata.translations);return{primary:a||i||e.entity_id,secondary:[n,a?i:void 0].filter(Boolean).join(o?" ◂ ":" ▸ ")||void 0}}},55931:function(t,e,a){a.d(e,{X:function(){return i}});a(42762);const i=t=>{var e;return null===(e=t.name)||void 0===e?void 0:e.trim()}},28455:function(t,e,a){a.d(e,{EX:function(){return r},jI:function(){return n},ln:function(){return i}});const i=(t,e,a,i,r)=>{const o=e[t.entity_id];return o?n(o,e,a,i,r):{entity:null,device:null,area:null,floor:null}},r=(t,e,a)=>{const i=e[t];if(!i)return;const r=i.device_id,n=r?a[r]:void 0;return i.area_id||(null==n?void 0:n.area_id)||void 0},n=(t,e,a,i,r)=>{const n=e[t.entity_id],o=null==t?void 0:t.device_id,s=o?a[o]:void 0,c=(null==t?void 0:t.area_id)||(null==s?void 0:s.area_id),l=c?i[c]:void 0,d=null==l?void 0:l.floor_id;return{entity:n,device:s||null,area:l||null,floor:(d?r[d]:void 0)||null}}},79461:function(t,e,a){a.d(e,{p:function(){return r}});a(62953);const i=[" ",": "," - "],r=(t,e)=>{const a=t.toLowerCase(),r=e.toLowerCase();for(const o of i){const e=`${r}${o}`;if(a.startsWith(e)){const a=t.substring(e.length);if(a.length)return n(a.substr(0,a.indexOf(" ")))?a:a[0].toUpperCase()+a.slice(1)}}},n=t=>t.toLowerCase()!==t},78649:function(t,e,a){a.d(e,{n:function(){return r}});a(27495);const i=/^(\w+)\.(\w+)$/,r=t=>i.test(t)},20058:function(t,e,a){a.a(t,async function(t,i){try{a.d(e,{QL:function(){return h},ZQ:function(){return u},ZV:function(){return d},ty:function(){return c},x:function(){return s}});var r=a(74487),n=(a(74423),a(18111),a(61701),a(46927)),o=t([r]);r=(o.then?(await o)():o)[0];const s=t=>c(t.attributes),c=(t,e)=>!!t.unit_of_measurement||!!t.state_class||(e||[]).includes(t.device_class||""),l=t=>{switch(t.number_format){case n.jG.comma_decimal:return["en-US","en"];case n.jG.decimal_comma:return["de","es","it"];case n.jG.space_comma:return["fr","sv","cs"];case n.jG.quote_decimal:return["de-CH"];case n.jG.system:return;default:return t.language}},d=(t,e,a)=>h(t,e,a).map(t=>t.value).join(""),h=(t,e,a)=>{const i=e?l(e):void 0;return(null==e?void 0:e.number_format)===n.jG.none||Number.isNaN(Number(t))?Number.isNaN(Number(t))||""===t||(null==e?void 0:e.number_format)!==n.jG.none?[{type:"literal",value:t}]:new Intl.NumberFormat("en-US",f(t,Object.assign(Object.assign({},a),{},{useGrouping:!1}))).formatToParts(Number(t)):new Intl.NumberFormat(i,f(t,a)).formatToParts(Number(t))},u=(t,e)=>{var a;const i=null==e?void 0:e.display_precision;return null!=i?{maximumFractionDigits:i,minimumFractionDigits:i}:Number.isInteger(Number(null==t||null===(a=t.attributes)||void 0===a?void 0:a.step))&&Number.isInteger(Number(null==t?void 0:t.state))?{maximumFractionDigits:0}:void 0},f=(t,e)=>{const a=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return a;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;a.minimumFractionDigits=e,a.maximumFractionDigits=e}return a};i()}catch(s){i(s)}})},80880:function(t,e,a){a.d(e,{Y:function(){return i}});a(84864),a(57465),a(27495),a(25440);const i=(t,e="_")=>{const a="àáâäæãåāăąабçćčđďдèéêëēėęěеёэфğǵгḧхîïíīįìıİийкłлḿмñńǹňнôöòóœøōõőоṕпŕřрßśšşșсťțтûüùúūǘůűųувẃẍÿýыžźżз·",i=`aaaaaaaaaaabcccdddeeeeeeeeeeefggghhiiiiiiiiijkllmmnnnnnoooooooooopprrrsssssstttuuuuuuuuuuvwxyyyzzzz${e}`,r=new RegExp(a.split("").join("|"),"g"),n={"ж":"zh","х":"kh","ц":"ts","ч":"ch","ш":"sh","щ":"shch","ю":"iu","я":"ia"};let o;return""===t?o="":(o=t.toString().toLowerCase().replace(r,t=>i.charAt(a.indexOf(t))).replace(/[а-я]/g,t=>n[t]||"").replace(/(\d),(?=\d)/g,"$1").replace(/[^a-z0-9]+/g,e).replace(new RegExp(`(${e})\\1+`,"g"),"$1").replace(new RegExp(`^${e}+`),"").replace(new RegExp(`${e}+$`),""),""===o&&(o="unknown")),o}},7553:function(t,e,a){a.d(e,{h:function(){return r}});a(16280),a(3362),a(62953);class i extends Error{constructor(t,...e){super(...e),Error.captureStackTrace&&Error.captureStackTrace(this,i),this.name="TimeoutError",this.timeout=t,this.message=`Timed out in ${t} ms.`}}const r=(t,e)=>{const a=new Promise((e,a)=>{setTimeout(()=>{a(new i(t))},t)});return Promise.race([e,a])}},12587:function(t,e,a){a.d(e,{E:function(){return r},m:function(){return i}});a(3362);const i=t=>{requestAnimationFrame(()=>setTimeout(t,0))},r=()=>new Promise(t=>{i(t)})},60353:function(t,e,a){a.d(e,{u:function(){return i}});class i{start(t){const e=Date.now();this._startY=t,this._startTime=e,this._lastY=t,this._lastTime=e,this._delta=0}move(t){const e=Date.now();return this._delta=this._startY-t,this._lastY=t,this._lastTime=e,this._delta}end(){const t=this.getVelocity(),e=Math.abs(t)>this._velocityThreshold;return{velocity:t,delta:this._delta,isSwipe:e,isDownwardSwipe:t>0}}getDelta(){return this._delta}getVelocity(){if(Date.now()-this._lastTime>=this._movementTimeThreshold)return 0;const t=this._lastTime-this._startTime;return t>0?(this._lastY-this._startY)/t:0}reset(){this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0}constructor(t={}){var e,a;this._startY=0,this._delta=0,this._startTime=0,this._lastY=0,this._lastTime=0,this._velocityThreshold=null!==(e=t.velocitySwipeThreshold)&&void 0!==e?e:.5,this._movementTimeThreshold=null!==(a=t.movementTimeThreshold)&&void 0!==a?a:100}}},8129:function(t,e,a){a.d(e,{l:function(){return i}});a(3362);const i=t=>new Promise(e=>{setTimeout(e,t)})},5745:function(t,e,a){var i=a(40445),r=a(99731),n=a(67576);class o extends r.Y{}o=(0,i.Cg)([(0,n.EM)("ha-chip-set")],o)},99611:function(t,e,a){a.a(t,async function(t,e){try{a(18111),a(13579),a(3362),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var i=a(40445),r=a(1126),n=a(35211),o=a(5124),s=a(67576),c=a(1087),l=a(60353),d=a(22792),h=a(59992),u=a(14503),f=a(22348),p=t([r,h]);[r,h]=p.then?(await p)():p;let m,g,v=t=>t;const b=300,y=new Set(["ha-control-slider","ha-slider","ha-control-switch","ha-control-circular-slider","ha-hs-color-picker","ha-map","ha-more-info-control-select-container","ha-filter-chip"]),_=new Set(["volume-slider-container","forecast"]);class w extends((0,h.V)(o.WF)){get scrollableElement(){return this._bodyElement}connectedCallback(){super.connectedCallback(),this.addEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.addEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0})}updated(t){super.updated(t),t.has("open")&&(this._drawerOpen=this.open)}render(){return(0,o.qy)(m||(m=v` <wa-drawer id="drawer" placement="bottom" .open="${0}" .lightDismiss="${0}" .ariaLabelledby="${0}" .ariaDescribedby="${0}" @keydown="${0}" @wa-show="${0}" @wa-after-show="${0}" @wa-hide="${0}" @wa-after-hide="${0}" @click="${0}" without-header @touchstart="${0}"> <div class="handle-wrapper" aria-hidden="true"> <div class="handle"></div> </div> <slot name="header"></slot> <div class="content-wrapper"> <div id="body" class="body ha-scrollbar"> <slot></slot> </div> ${0} </div> <slot name="footer"></slot> </wa-drawer> `),this._drawerOpen,!this.preventScrimClose,this.ariaLabelledBy,this.ariaDescribedBy,this._handleKeyDown,this._handleShow,this._handleAfterShow,this._handleHide,this._handleAfterHide,this._handleCloseAction,this._handleTouchStart,this.renderScrollableFades())}_startResizing(t){document.addEventListener("touchmove",this._handleTouchMove,{passive:!1}),document.addEventListener("touchend",this._handleTouchEnd),document.addEventListener("touchcancel",this._handleTouchEnd),this._gestureRecognizer.start(t)}_animateSnapBack(){this.style.setProperty("--dialog-transition",`transform ${b}ms ease-out`),this.style.removeProperty("--dialog-transform"),setTimeout(()=>{this.style.removeProperty("--dialog-transition")},b)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("slider-interaction-start",this._handleSliderInteractionStart,{capture:!0}),this.removeEventListener("slider-interaction-stop",this._handleSliderInteractionStop,{capture:!0}),this._unregisterResizeHandlers(),this._isDragging=!1}static get styles(){return[...super.styles,u.dp,(0,o.AH)(g||(g=v`wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:${0}ms;--hide-duration:${0}ms}wa-drawer::part(dialog){max-height:min(var(--ha-bottom-sheet-max-height,90vh),calc(100vh - max(var(--safe-area-inset-top),48px)));max-height:min(var(--ha-bottom-sheet-max-height,90dvh),calc(100dvh - max(var(--safe-area-inset-top),48px)));align-items:center;transform:var(--dialog-transform);transition:var(--dialog-transition)}@media (prefers-reduced-motion:reduce){wa-drawer{--wa-color-surface-raised:transparent;--spacing:0;--size:var(--ha-bottom-sheet-height, auto);--show-duration:1ms;--hide-duration:1ms}wa-drawer::part(dialog){transition:1ms}}wa-drawer::part(dialog)::backdrop{-webkit-backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));backdrop-filter:var(--ha-bottom-sheet-scrim-backdrop-filter,var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none)));background-color:var(--ha-bottom-sheet-scrim-color,var(--mdc-dialog-scrim-color,none))}wa-drawer::part(body){max-width:var(--ha-bottom-sheet-max-width);width:100%;position:relative;border-top-left-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));border-top-right-radius:var(--ha-bottom-sheet-border-radius,var(--ha-dialog-border-radius,var(--ha-border-radius-2xl)));background-color:var(--ha-bottom-sheet-surface-background,var(--ha-dialog-surface-background,var(--card-background-color,var(--ha-color-surface-default))));-webkit-backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));backdrop-filter:var(--ha-bottom-sheet-surface-backdrop-filter,var(--ha-dialog-surface-backdrop-filter,none));padding:var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left))}:host([flexcontent]) wa-drawer::part(body){display:flex;flex-direction:column}:host([prevent-scrim-close]) .handle-wrapper{display:none}.handle-wrapper{position:absolute;top:0;inset-inline-start:0;width:100%;padding-bottom:2px;display:flex;justify-content:center;align-items:center;pointer-events:none;z-index:1}.handle-wrapper .handle{height:16px;width:200px;display:flex;justify-content:center;align-items:center}.handle-wrapper .handle::after{content:"";border-radius:var(--ha-border-radius-md);height:4px;background:var(--ha-bottom-sheet-handle-color,var(--divider-color));width:40px}.content-wrapper{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}.body{padding:var(--ha-bottom-sheet-content-padding,0);box-sizing:border-box}:host([flexcontent]) .body{flex:1;max-width:100%;display:flex;flex-direction:column;padding:var(--ha-bottom-sheet-content-padding,var(--ha-bottom-sheet-padding,0 var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left)));box-sizing:border-box}slot[name=footer]{display:block;padding:0}::slotted([slot=footer]){display:flex;padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%;box-sizing:border-box}:host([flexcontent]) slot[name=footer]{flex-shrink:0}`),b,b)]}constructor(...t){super(...t),this.open=!1,this.flexContent=!1,this.preventScrimClose=!1,this._drawerOpen=!1,this._sliderInteractionActive=!1,this._gestureRecognizer=new l.u,this._isDragging=!1,this._escapePressed=!1,this._handleShow=async()=>{this._drawerOpen=!0,this.open=!0,(0,c.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{var t;const e=this._autofocusElement;null!==(t=this._hassConfig)&&void 0!==t&&t.auth.external&&(0,f.V)(this._hassConfig.auth.external)?e&&(e.id||(e.id="ha-bottom-sheet-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})):null==e||e.focus()})},this._handleAfterShow=()=>{(0,c.r)(this,"after-show")},this._handleSliderInteractionStart=()=>{this._sliderInteractionActive=!0},this._handleSliderInteractionStop=()=>{this._sliderInteractionActive=!1},this._handleAfterHide=t=>{if(this._sliderInteractionActive)return this._drawerOpen=!0,void(this.open=!0);t.eventPhase===Event.AT_TARGET&&(this.open=!1,this._drawerOpen=!1,(0,c.r)(this,"closed"))},this._handleHide=t=>{if(t.eventPhase!==Event.AT_TARGET)return;const e=t.detail.source===t.target.drawer;if(this._sliderInteractionActive)return t.preventDefault(),this._drawerOpen=!0,this.open=!0,void(this._escapePressed=!1);this.preventScrimClose&&this._escapePressed&&e&&t.preventDefault(),this._escapePressed=!1},this._handleKeyDown=t=>{"Escape"===t.key&&(this._escapePressed=!0,this.preventScrimClose&&t.preventDefault(),t.stopPropagation(),t.currentTarget.open=!1)},this._handleCloseAction=t=>{t.composedPath().some(t=>t instanceof HTMLElement&&("close"===t.getAttribute("data-dialog")||"close"===t.getAttribute("data-drawer")))&&(this._drawerOpen=!1)},this._handleTouchStart=t=>{if(this.preventScrimClose)return;const e=t.composedPath();for(const a of e){if(a===this._drawer)break;if(a instanceof HTMLElement&&(a.scrollTop>0||y.has(a.localName)||Array.from(a.classList).some(t=>_.has(t))))return}t.stopPropagation(),this._startResizing(t.touches[0].clientY)},this._handleTouchMove=t=>{const e=t.touches[0].clientY,a=this._gestureRecognizer.move(e);a<0&&(t.preventDefault(),this._isDragging=!0,requestAnimationFrame(()=>{this._isDragging&&this.style.setProperty("--dialog-transform",`translateY(${-1*a}px)`)}))},this._handleTouchEnd=()=>{var t;this._unregisterResizeHandlers(),this._isDragging=!1;const e=this._gestureRecognizer.end();if(e.isSwipe)return void(e.isDownwardSwipe?this._drawerOpen=!1:this._animateSnapBack());const a=null===(t=this._drawer.shadowRoot)||void 0===t?void 0:t.querySelector('[part="body"]'),i=(null==a?void 0:a.offsetHeight)||0;i>0&&e.delta<0&&Math.abs(e.delta)>.5*i?this._drawerOpen=!1:this._animateSnapBack()},this._unregisterResizeHandlers=()=>{document.removeEventListener("touchmove",this._handleTouchMove),document.removeEventListener("touchend",this._handleTouchEnd),document.removeEventListener("touchcancel",this._handleTouchEnd)}}}(0,i.Cg)([(0,s.MZ)({attribute:"aria-labelledby"})],w.prototype,"ariaLabelledBy",void 0),(0,i.Cg)([(0,s.MZ)({attribute:"aria-describedby"})],w.prototype,"ariaDescribedBy",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"open",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],w.prototype,"flexContent",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],w.prototype,"preventScrimClose",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_drawerOpen",void 0),(0,i.Cg)([(0,s.wk)()],w.prototype,"_sliderInteractionActive",void 0),(0,i.Cg)([(0,s.wk)(),(0,n.Fg)({context:d.WF,subscribe:!0})],w.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,s.P)("#drawer")],w.prototype,"_drawer",void 0),(0,i.Cg)([(0,s.P)("#body")],w.prototype,"_bodyElement",void 0),(0,i.Cg)([(0,s.P)("[autofocus]")],w.prototype,"_autofocusElement",void 0),w=(0,i.Cg)([(0,s.EM)("ha-bottom-sheet")],w),e()}catch(m){e(m)}})},59174:function(t,e,a){a.a(t,async function(t,e){try{var i=a(40445),r=a(35211),n=a(5124),o=a(67576),s=a(91450),c=a(22792),l=a(85694),d=a(44144),h=(a(47680),t([l]));l=(h.then?(await h)():h)[0];let u,f,p,m,g,v,b,y=t=>t;class _ extends n.WF{render(){if(this.icon)return(0,n.qy)(u||(u=y`<ha-icon .icon="${0}"></ha-icon>`),this.icon);if(!this.domain)return n.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,n.qy)(f||(f=y`<ha-icon .icon="${0}"></ha-icon>`),t):this._renderFallback());return(0,n.qy)(p||(p=y`${0}`),(0,s.T)(t))}_renderFallback(){if(this.domain&&this.domain in l.l)return(0,n.qy)(m||(m=y` <ha-svg-icon .path="${0}"></ha-svg-icon> `),l.l[this.domain]);if(this.brandFallback){var t,e;const a=(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,n.qy)(g||(g=y` <img alt="" src="${0}" crossorigin="anonymous" referrerpolicy="no-referrer"> `),a)}return(0,n.qy)(v||(v=y`<ha-svg-icon .path="${0}"></ha-svg-icon>`),l.lW)}}_.styles=(0,n.AH)(b||(b=y`img{width:var(--mdc-icon-size,24px)}`)),(0,i.Cg)([(0,o.MZ)()],_.prototype,"domain",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],_.prototype,"deviceClass",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],_.prototype,"state",void 0),(0,i.Cg)([(0,o.MZ)()],_.prototype,"icon",void 0),(0,i.Cg)([(0,o.MZ)({attribute:"brand-fallback",type:Boolean})],_.prototype,"brandFallback",void 0),(0,i.Cg)([(0,o.wk)(),(0,r.Fg)({context:c.WF,subscribe:!0})],_.prototype,"_hassConfig",void 0),(0,i.Cg)([(0,o.wk)(),(0,r.Fg)({context:c.Wq,subscribe:!0})],_.prototype,"_connection",void 0),(0,i.Cg)([(0,o.wk)(),(0,r.Fg)({context:c.EK,subscribe:!0})],_.prototype,"_hassUi",void 0),_=(0,i.Cg)([(0,o.EM)("ha-domain-icon")],_),e()}catch(u){e(u)}})},11382:function(t,e,a){a(3362),a(62953);var i=a(40445),r=a(5124),n=a(67576),o=a(6412),s=a(1087),c=a(12587);a(67094);let l,d,h,u,f=t=>t;class p extends r.WF{render(){const t=this.noCollapse?r.s6:(0,r.qy)(l||(l=f` <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,o.H)({expanded:this.expanded}));return(0,r.qy)(d||(d=f` <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,o.H)({expanded:this.expanded}),(0,o.H)({noCollapse:this.noCollapse}),this._toggleContainer,this._toggleContainer,this._focusChanged,this._focusChanged,this.noCollapse?-1:0,this.expanded,this.leftChevron?t:r.s6,this.header,this.secondary,this.leftChevron?r.s6:t,(0,o.H)({expanded:this.expanded}),this._handleTransitionEnd,!this.expanded,this._showContent?(0,r.qy)(h||(h=f`<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 a=this._container.scrollHeight;this._container.style.height=`${a}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}}p.styles=(0,r.AH)(u||(u=f`: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,n.MZ)({type:Boolean,reflect:!0})],p.prototype,"expanded",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],p.prototype,"outlined",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"left-chevron",type:Boolean,reflect:!0})],p.prototype,"leftChevron",void 0),(0,i.Cg)([(0,n.MZ)({attribute:"no-collapse",type:Boolean,reflect:!0})],p.prototype,"noCollapse",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"header",void 0),(0,i.Cg)([(0,n.MZ)()],p.prototype,"secondary",void 0),(0,i.Cg)([(0,n.wk)()],p.prototype,"_showContent",void 0),(0,i.Cg)([(0,n.P)(".container")],p.prototype,"_container",void 0),p=(0,i.Cg)([(0,n.EM)("ha-expansion-panel")],p)},47680:function(t,e,a){a.r(e),a.d(e,{HaIcon:function(){return $}});a(74423),a(3362),a(62953);var i=a(40445),r=a(5124),n=a(67576),o=a(1087),s=a(9899),c=a(700),l=(a(44114),a(18111),a(7588),a(96167),a(95192)),d=a(7553);const h=JSON.parse('{"version":"7.4.47","parts":[{"file":"7a7139d465f1f41cb26ab851a17caa21a9331234"},{"start":"account-supervisor-circle-","file":"9561286c4c1021d46b9006596812178190a7cc1c"},{"start":"alpha-r-c","file":"eb466b7087fb2b4d23376ea9bc86693c45c500fa"},{"start":"arrow-decision-o","file":"4b3c01b7e0723b702940c5ac46fb9e555646972b"},{"start":"baby-f","file":"2611401d85450b95ab448ad1d02c1a432b409ed2"},{"start":"battery-hi","file":"89bcd31855b34cd9d31ac693fb073277e74f1f6a"},{"start":"blur-r","file":"373709cd5d7e688c2addc9a6c5d26c2d57c02c48"},{"start":"briefcase-account-","file":"a75956cf812ee90ee4f656274426aafac81e1053"},{"start":"calendar-question-","file":"3253f2529b5ebdd110b411917bacfacb5b7063e6"},{"start":"car-lig","file":"74566af3501ad6ae58ad13a8b6921b3cc2ef879d"},{"start":"cellphone-co","file":"7677f1cfb2dd4f5562a2aa6d3ae43a2e6997b21a"},{"start":"circle-slice-2","file":"70d08c50ec4522dd75d11338db57846588263ee2"},{"start":"cloud-co","file":"141d2bfa55ca4c83f4bae2812a5da59a84fec4ff"},{"start":"cog-s","file":"5a640365f8e47c609005d5e098e0e8104286d120"},{"start":"cookie-l","file":"dd85b8eb8581b176d3acf75d1bd82e61ca1ba2fc"},{"start":"currency-eur-","file":"15362279f4ebfc3620ae55f79d2830ad86d5213e"},{"start":"delete-o","file":"239434ab8df61237277d7599ebe066c55806c274"},{"start":"draw-","file":"5605918a592070803ba2ad05a5aba06263da0d70"},{"start":"emoticon-po","file":"a838cfcec34323946237a9f18e66945f55260f78"},{"start":"fan","file":"effd56103b37a8c7f332e22de8e4d67a69b70db7"},{"start":"file-question-","file":"b2424b50bd465ae192593f1c3d086c5eec893af8"},{"start":"flask-off-","file":"3b76295cde006a18f0301dd98eed8c57e1d5a425"},{"start":"food-s","file":"1c6941474cbeb1755faaaf5771440577f4f1f9c6"},{"start":"gamepad-u","file":"c6efe18db6bc9654ae3540c7dee83218a5450263"},{"start":"google-f","file":"df341afe6ad4437457cf188499cb8d2df8ac7b9e"},{"start":"head-c","file":"282121c9e45ed67f033edcc1eafd279334c00f46"},{"start":"home-pl","file":"27e8e38fc7adcacf2a210802f27d841b49c8c508"},{"start":"inbox-","file":"0f0316ec7b1b7f7ce3eaabce26c9ef619b5a1694"},{"start":"key-v","file":"ea33462be7b953ff1eafc5dac2d166b210685a60"},{"start":"leaf-circle-","file":"33db9bbd66ce48a2db3e987fdbd37fb0482145a4"},{"start":"lock-p","file":"b89e27ed39e9d10c44259362a4b57f3c579d3ec8"},{"start":"message-s","file":"7b5ab5a5cadbe06e3113ec148f044aa701eac53a"},{"start":"moti","file":"01024d78c248d36805b565e343dd98033cc3bcaf"},{"start":"newspaper-variant-o","file":"22a6ec4a4fdd0a7c0acaf805f6127b38723c9189"},{"start":"on","file":"c73d55b412f394e64632e2011a59aa05e5a1f50d"},{"start":"paw-ou","file":"3f669bf26d16752dc4a9ea349492df93a13dcfbf"},{"start":"pigg","file":"0c24edb27eb1c90b6e33fc05f34ef3118fa94256"},{"start":"printer-pos-sy","file":"41a55cda866f90b99a64395c3bb18c14983dcf0a"},{"start":"read","file":"c7ed91552a3a64c9be88c85e807404cf705b7edf"},{"start":"robot-vacuum-variant-o","file":"917d2a35d7268c0ea9ad9ecab2778060e19d90e0"},{"start":"sees","file":"6e82d9861d8fac30102bafa212021b819f303bdb"},{"start":"shoe-f","file":"e2fe7ce02b5472301418cc90a0e631f187b9f238"},{"start":"snowflake-m","file":"a28ba9f5309090c8b49a27ca20ff582a944f6e71"},{"start":"st","file":"7e92d03f095ec27e137b708b879dfd273bd735ab"},{"start":"su","file":"61c74913720f9de59a379bdca37f1d2f0dc1f9db"},{"start":"tag-plus-","file":"8f3184156a4f38549cf4c4fffba73a6a941166ae"},{"start":"timer-a","file":"baab470d11cfb3a3cd3b063ee6503a77d12a80d0"},{"start":"transit-d","file":"8561c0d9b1ac03fab360fd8fe9729c96e8693239"},{"start":"vector-arrange-b","file":"c9a3439257d4bab33d3355f1f2e11842e8171141"},{"start":"water-ou","file":"02dbccfb8ca35f39b99f5a085b095fc1275005a0"},{"start":"webc","file":"57bafd4b97341f4f2ac20a609d023719f23a619c"},{"start":"zip","file":"65ae094e8263236fa50486584a08c03497a38d93"}]}');let u;const f=()=>(u||(u=p().catch(t=>{throw u=void 0,t})),u),p=async()=>{const t=(0,l.y$)("hass-icon-db","mdi-icon-store"),e=await(0,l.Jt)("_version",t);return e?e!==h.version&&(await(0,l.IU)(t),(0,l.hZ)("_version",h.version,t)):(0,l.hZ)("_version",h.version,t),t},m=["mdi","hass","hassio","hademo"];let g=[];a(67094);let v,b,y,_=t=>t;const w={},x={},C=(0,s.s)(()=>(async t=>{const e=Object.keys(t),a=await Promise.allSettled(Object.values(t));(await f())("readwrite",i=>{a.forEach((a,r)=>{"fulfilled"===a.status&&Object.entries(a.value).forEach(([t,e])=>{i.put(e,t)}),delete t[e[r]]})})})(x),2e3),k={},S={"home-assistant":()=>a.e(58781).then(a.bind(a,53580)).then(t=>t.mdiHomeAssistant),"music-assistant":()=>a.e(56009).then(a.bind(a,10576)).then(t=>t.mdiMusicAssistant),esphome:()=>a.e(88800).then(a.bind(a,45091)).then(t=>t.mdiEsphomeLogo)};class $ extends r.WF{willUpdate(t){super.willUpdate(t),t.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}render(){return this.icon?this._legacy?(0,r.qy)(v||(v=_` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,r.qy)(b||(b=_`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):r.s6}async _loadIcon(){if(!this.icon)return;const t=this.icon,[e,a]=this.icon.split(":",2);let i,r=a;if(!e||!r)return;if(!m.includes(e)){const a=c.y[e];return a?void(a&&"function"==typeof a.getIcon&&this._setCustomPath(a.getIcon(r),t)):void(this._legacy=!0)}if(this._legacy=!1,r in w){const t=w[r];let a;t.newName?(a=`Icon ${e}:${r} was renamed to ${e}:${t.newName}, please change your config, it will be removed in version ${t.removeIn}.`,r=t.newName):a=`Icon ${e}:${r} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${t.removeIn}.`,console.warn(a),(0,o.r)(this,"write_log",{level:"warning",message:a})}if(r in k)return void(this._path=k[r]);if(r in S){const e=await S[r]();return this.icon===t&&(this._path=e),void(k[r]=e)}try{i=await(t=>new Promise((e,a)=>{if(g.push([t,e,a]),g.length>1)return;const i=f();(0,d.h)(1e3,(async()=>{(await i)("readonly",t=>{for(const[e,a,i]of g)(0,l.Yd)(t.get(e)).then(t=>a(t)).catch(t=>i(t));g=[]})})()).catch(t=>{for(const[,,e]of g)e(t);g=[]})}))(r)}catch(u){i=void 0}if(i)return this.icon===t&&(this._path=i),void(k[r]=i);const n=(t=>{let e;for(const a of h.parts){if(void 0!==a.start&&t<a.start)break;e=a}return e.file})(r);if(n in x)return void this._setPath(x[n],r,t);const s=fetch(`/static/mdi/${n}.json`).then(t=>t.json());x[n]=s,this._setPath(s,r,t),s.catch(()=>{delete x[n]}),C()}async _setCustomPath(t,e){const a=await t;this.icon===e&&(this._path=a.path,this._secondaryPath=a.secondaryPath,this._viewBox=a.viewBox)}async _setPath(t,e,a){try{const i=await t;this.icon===a&&(this._path=i[e]),k[e]=i[e]}catch(i){}}constructor(...t){super(...t),this._legacy=!1}}$.styles=(0,r.AH)(y||(y=_`:host{fill:currentcolor}`)),(0,i.Cg)([(0,n.MZ)()],$.prototype,"icon",void 0),(0,i.Cg)([(0,n.wk)()],$.prototype,"_path",void 0),(0,i.Cg)([(0,n.wk)()],$.prototype,"_secondaryPath",void 0),(0,i.Cg)([(0,n.wk)()],$.prototype,"_viewBox",void 0),(0,i.Cg)([(0,n.wk)()],$.prototype,"_legacy",void 0),$=(0,i.Cg)([(0,n.EM)("ha-icon")],$)},54276:function(t,e,a){a(62953);var i=a(40445),r=a(76482),n=a(91382),o=a(96245),s=a(5124),c=a(67576);let l;class d extends n.n{attach(t){super.attach(t),this.attachableTouchController.attach(t)}disconnectedCallback(){super.disconnectedCallback(),this.hovered=!1,this.pressed=!1}detach(){super.detach(),this.attachableTouchController.detach()}_onTouchControlChange(t,e){null==t||t.removeEventListener("touchend",this._handleTouchEnd),null==e||e.addEventListener("touchend",this._handleTouchEnd)}constructor(...t){super(...t),this.attachableTouchController=new r.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}d.styles=[o.R,(0,s.AH)(l||(l=(t=>t)`:host{--md-ripple-hover-opacity:var(--ha-ripple-hover-opacity, 0.08);--md-ripple-pressed-opacity:var(--ha-ripple-pressed-opacity, 0.12);--md-ripple-hover-color:var(
--ha-ripple-hover-color,
var(--ha-ripple-color, var(--secondary-text-color))
);--md-ripple-pressed-color:var(
--ha-ripple-pressed-color,
var(--ha-ripple-color, var(--secondary-text-color))
)}`))],d=(0,i.Cg)([(0,c.EM)("ha-ripple")],d)},84909:function(t,e,a){a.a(t,async function(t,i){try{a.r(e),a.d(e,{HaTargetSelector:function(){return b}});a(18111),a(13579),a(62953);var r=a(40445),n=a(5124),o=a(67576),s=a(22786),c=a(44537),l=a(58594),d=a(6810),h=a(95311),u=a(79286),f=t([u]);u=(f.then?(await f)():f)[0];let p,m,g,v=t=>t;class b extends n.WF{_hasIntegration(t){var e,a;return(null===(e=t.target)||void 0===e?void 0:e.entity)&&(0,c.e)(t.target.entity).some(t=>t.integration)||(null===(a=t.target)||void 0===a?void 0:a.device)&&(0,c.e)(t.target.device).some(t=>t.integration)}updated(t){super.updated(t),t.has("selector")&&this._hasIntegration(this.selector)&&!this._entitySources&&(0,d.c)(this.hass).then(t=>{this._entitySources=t}),t.has("selector")&&(this._createDomains=(0,h.Lo)(this.selector))}render(){var t;return this._hasIntegration(this.selector)&&!this._entitySources?n.s6:(0,n.qy)(p||(p=v` ${0} <ha-target-picker .hass="${0}" .value="${0}" .helper="${0}" .deviceFilter="${0}" .entityFilter="${0}" .disabled="${0}" .createDomains="${0}" .primaryEntitiesOnly="${0}"></ha-target-picker>`),this.label?(0,n.qy)(m||(m=v`<label>${0}</label>`),this.label):n.s6,this.hass,this.value,this.helper,this._filterDevices,this._filterEntities,this.disabled,this._createDomains,null===(t=this.selector.target)||void 0===t?void 0:t.primary_entities_only)}constructor(...t){super(...t),this.disabled=!1,this._deviceIntegrationLookup=(0,s.A)(l.fk),this._filterEntities=t=>{var e;return null===(e=this.selector.target)||void 0===e||!e.entity||(0,c.e)(this.selector.target.entity).some(e=>(0,h.Ru)(e,t,this._entitySources))},this._filterDevices=t=>{var e;if(null===(e=this.selector.target)||void 0===e||!e.device)return!0;const a=this._entitySources?this._deviceIntegrationLookup(this._entitySources,Object.values(this.hass.entities)):void 0;return(0,c.e)(this.selector.target.device).some(e=>(0,h.vX)(e,t,a))}}}b.styles=(0,n.AH)(g||(g=v`ha-target-picker{display:block}`)),(0,r.Cg)([(0,o.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,r.Cg)([(0,o.MZ)({attribute:!1})],b.prototype,"selector",void 0),(0,r.Cg)([(0,o.MZ)({type:Object})],b.prototype,"value",void 0),(0,r.Cg)([(0,o.MZ)()],b.prototype,"label",void 0),(0,r.Cg)([(0,o.MZ)()],b.prototype,"helper",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean})],b.prototype,"disabled",void 0),(0,r.Cg)([(0,o.wk)()],b.prototype,"_entitySources",void 0),(0,r.Cg)([(0,o.wk)()],b.prototype,"_createDomains",void 0),b=(0,r.Cg)([(0,o.EM)("ha-selector-target")],b),i()}catch(p){i(p)}})},93367:function(t,e,a){a.a(t,async function(t,e){try{var i=a(40445),r=a(35211),n=a(5124),o=a(67576),s=a(91450),c=a(69093),l=a(22792),d=a(85694),h=(a(47680),a(67094),t([d]));d=(h.then?(await h)():h)[0];let u,f,p,m,g=t=>t;class v extends n.WF{render(){var t,e;const a=this.icon||this.stateObj&&(null===(t=this._entities)||void 0===t||null===(t=t[this.stateObj.entity_id])||void 0===t?void 0:t.icon)||(null===(e=this.stateObj)||void 0===e?void 0:e.attributes.icon);if(a)return(0,n.qy)(u||(u=g`<ha-icon .icon="${0}"></ha-icon>`),a);if(!this.stateObj)return n.s6;if(!this._config||!this._connection||!this._entities)return this._renderFallback();const i=(0,d.fq)(this._entities,this._config.config,this._connection.connection,this.stateObj,this.stateValue).then(t=>t?(0,n.qy)(f||(f=g`<ha-icon .icon="${0}"></ha-icon>`),t):this._renderFallback());return(0,n.qy)(p||(p=g`${0}`),(0,s.T)(i))}_renderFallback(){const t=(0,c.t)(this.stateObj);return(0,n.qy)(m||(m=g` <ha-svg-icon .path="${0}"></ha-svg-icon> `),d.l[t]||d.lW)}}(0,i.Cg)([(0,o.MZ)({attribute:!1})],v.prototype,"stateObj",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],v.prototype,"stateValue",void 0),(0,i.Cg)([(0,o.MZ)()],v.prototype,"icon",void 0),(0,i.Cg)([(0,o.wk)(),(0,r.Fg)({context:l.WF,subscribe:!0})],v.prototype,"_config",void 0),(0,i.Cg)([(0,o.wk)(),(0,r.Fg)({context:l.Wq,subscribe:!0})],v.prototype,"_connection",void 0),(0,i.Cg)([(0,o.wk)(),(0,r.Fg)({context:l.X1,subscribe:!0})],v.prototype,"_entities",void 0),v=(0,i.Cg)([(0,o.EM)("ha-state-icon")],v),e()}catch(u){e(u)}})},34127:function(t,e,a){a.a(t,async function(t,e){try{a(62953);var i=a(40445),r=a(52630),n=a(5124),o=a(67576),s=t([r]);r=(s.then?(await s)():s)[0];let c,l=t=>t;class d extends r.A{static get styles(){return[r.A.styles,(0,n.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,o.MZ)({attribute:"show-delay",type:Number})],d.prototype,"showDelay",void 0),(0,i.Cg)([(0,o.MZ)({attribute:"hide-delay",type:Number})],d.prototype,"hideDelay",void 0),d=(0,i.Cg)([(0,o.EM)("ha-tooltip")],d),e()}catch(c){e(c)}})},36866:function(t,e,a){a.a(t,async function(t,e){try{a(62953);var i=a(40445),r=a(5124),n=a(67576),o=a(91485),s=t([o]);o=(s.then?(await s)():s)[0];let c,l,d=t=>t;const h="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z";class u extends o.U{willUpdate(t){var e,a;(super.willUpdate(t),this.label||this.placeholder||this.hasUpdated&&!t.has("_i18n"))||(this.placeholder=(null===(e=this.i18n)||void 0===e||null===(a=e.localize)||void 0===a?void 0:a.call(e,"ui.common.search"))||"Search")}renderStartDefault(){return(0,r.qy)(c||(c=d`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),h)}constructor(){super(),this.withClear=!0,this.autocomplete=this.autocomplete||"off"}}u.styles=[...o.U.styles,(0,r.AH)(l||(l=d`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`))],u=(0,i.Cg)([(0,n.EM)("ha-input-search")],u),e()}catch(c){e(c)}})},87225:function(t,e,a){a.d(e,{GS:function(){return n},I8:function(){return s},YQ:function(){return h},bn:function(){return l},fg:function(){return c},oW:function(){return o},ob:function(){return d}});a(74423);var i=a(71727),r=a(68246);const n=[{groups:{dynamicGroups:{},time_location:{icon:"M15,12H16.5V16.25L19.36,17.94L18.61,19.16L15,17V12M23,16A7,7 0 0,1 16,23C13,23 10.4,21.08 9.42,18.4L8,17.9L2.66,19.97L2.5,20A0.5,0.5 0 0,1 2,19.5V4.38C2,4.15 2.15,3.97 2.36,3.9L8,2L14,4.1L19.34,2H19.5A0.5,0.5 0 0,1 20,2.5V10.25C21.81,11.5 23,13.62 23,16M9,16C9,12.83 11.11,10.15 14,9.29V6.11L8,4V15.89L9,16.24C9,16.16 9,16.08 9,16M16,11A5,5 0 0,0 11,16A5,5 0 0,0 16,21A5,5 0 0,0 21,16A5,5 0 0,0 16,11Z",members:{sun:{},time:{},zone:{}}},helpers:{},template:{},trigger:{},other:{}}},{titleKey:"ui.panel.config.automation.editor.conditions.groups.generic.label",generic:!0,groups:{device:{},entity:{icon:"M11,13.5V21.5H3V13.5H11M12,2L17.5,11H6.5L12,2M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13Z",members:{state:{},numeric_state:{}}}}},{titleKey:"ui.panel.config.automation.editor.conditions.groups.custom_integrations.label",groups:{customDynamicGroups:{}}}],o={and:{},or:{},not:{}},s=["and","or","not"],c=["ha-automation-condition-and","ha-automation-condition-not","ha-automation-condition-or"],l=(t,e)=>t.connection.subscribeMessage(e,{type:"condition_platforms/subscribe"}),d=t=>t.includes(".")?(0,i.m)(t):t,h=t=>t.includes(".")?(0,r.Y)(t):"_"},77423:function(t,e,a){a.d(e,{A:function(){return r},Cm:function(){return n},Fs:function(){return v},JW:function(){return g},TC:function(){return c},VN:function(){return l},Vx:function(){return d},XQ:function(){return p},eM:function(){return u},iH:function(){return h},k3:function(){return m},m4:function(){return o},qf:function(){return s},t0:function(){return i},yv:function(){return f}});a(44114),a(18111),a(22489),a(20116),a(7588),a(61701),a(62953);const i=(t,e)=>t.callWS({type:"config_entries/subentries/list",entry_id:e}),r=(t,e,a,i)=>t.callWS(Object.assign({type:"config_entries/subentries/update",entry_id:e,subentry_id:a},i)),n=(t,e,a)=>t.callWS({type:"config_entries/subentries/delete",entry_id:e,subentry_id:a}),o=66649!=a.j?["migration_error","setup_error","setup_retry"]:null,s=66649!=a.j?["not_loaded","loaded","setup_error","setup_retry"]:null,c=(t,e,a)=>{const i={type:"config_entries/subscribe"};return a&&a.type&&(i.type_filter=a.type),t.connection.subscribeMessage(t=>{e(t)},i)},l=(t,e)=>{const a={};return e&&(e.type&&(a.type_filter=e.type),e.domain&&(a.domain=e.domain)),t.callWS(Object.assign({type:"config_entries/get"},a))},d=(t,e)=>t.callWS({type:"config_entries/get_single",entry_id:e}),h=(t,e,a)=>t.callWS(Object.assign({type:"config_entries/update",entry_id:e},a)),u=(t,e)=>t.callApi("DELETE",`config/config_entries/entry/${e}`),f=(t,e)=>t.callApi("POST",`config/config_entries/entry/${e}/reload`),p=(t,e)=>t.callWS({type:"config_entries/disable",entry_id:e,disabled_by:"user"}),m=(t,e)=>t.callWS({type:"config_entries/disable",entry_id:e,disabled_by:null}),g=(t,e)=>{if(!e)return t;const a=t.find(t=>t.entry_id===e);if(!a)return t;return[a,...t.filter(t=>t.entry_id!==e)]};class v{processMessage(t){return t.forEach(t=>{if(null!==t.type&&"added"!==t.type)if("removed"!==t.type){if("updated"===t.type){const e=t.entry;this._entries=this._entries.map(t=>t.entry_id===e.entry_id?e:t)}}else this._entries=this._entries.filter(e=>e.entry_id!==t.entry.entry_id);else this._entries.push(t.entry)}),this._entries}constructor(){this._entries=[]}}},700:function(t,e,a){a.d(e,{y:function(){return o}});const i=window;"customIconsets"in i||(i.customIconsets={});const r=i.customIconsets,n=window;"customIcons"in n||(n.customIcons={});const o=new Proxy(n.customIcons,{get:(t,e)=>{var a;return null!==(a=t[e])&&void 0!==a?a:r[e]?{getIcon:r[e]}:void 0}})},6810:function(t,e,a){a.d(e,{c:function(){return n}});a(3362),a(62953);const i=async(t,e,a,r,n,...o)=>{const s=n,c=s[t],l=c=>r&&r(n,c.result)!==c.cacheKey?(s[t]=void 0,i(t,e,a,r,n,...o)):c.result;if(c)return c instanceof Promise?c.then(l):l(c);const d=a(n,...o);return s[t]=d,d.then(a=>{s[t]={result:a,cacheKey:null==r?void 0:r(n,a)},setTimeout(()=>{s[t]=void 0},e)},()=>{s[t]=void 0}),d},r=t=>t.callWS({type:"entity/source"}),n=t=>i("_entitySources",3e4,r,t=>Object.keys(t.states).length,t)},48250:function(t,e,a){a.d(e,{Bp:function(){return r},aI:function(){return i},gg:function(){return c},oT:function(){return n},wE:function(){return o},x0:function(){return s}});a(3362);const i=async(t,e)=>(await t.sendMessagePromise({type:"frontend/get_user_data",key:e})).value,r=async(t,e,a)=>t.sendMessagePromise({type:"frontend/set_user_data",key:e,value:a}),n=(t,e,a)=>t.subscribeMessage(a,{type:"frontend/subscribe_user_data",key:e}),o=async(t,e)=>(await t.sendMessagePromise({type:"frontend/get_system_data",key:e})).value,s=async(t,e,a)=>t.sendMessagePromise({type:"frontend/set_system_data",key:e,value:a}),c=(t,e,a)=>t.subscribeMessage(a,{type:"frontend/subscribe_system_data",key:e})},95350:function(t,e,a){a.d(e,{$h:function(){return u},FP:function(){return g},Og:function(){return n},QC:function(){return h},QQ:function(){return s},S1:function(){return o},Ud:function(){return v},fK:function(){return l},l7:function(){return d},nQ:function(){return p},p$:function(){return c}});a(3362),a(62953);if(66649!=a.j)var i=a(90889);var r=a(9899);const n=66649!=a.j?{bluetooth:"config/bluetooth",dhcp:"config/dhcp",matter:"config/matter",mqtt:"config/mqtt",ssdp:"config/ssdp",thread:"config/thread",zeroconf:"config/zeroconf",zha:"config/zha/dashboard",zwave_js:"config/zwave_js/dashboard"}:null;var o=66649!=a.j?function(t){return t[t.CRITICAL=50]="CRITICAL",t[t.ERROR=40]="ERROR",t[t.WARNING=30]="WARNING",t[t.INFO=20]="INFO",t[t.DEBUG=10]="DEBUG",t[t.NOTSET=0]="NOTSET",t}({}):null;const s=(t,e)=>e.issue_tracker||`https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+${t}%22`,c=(t,e,a)=>t(`component.${e}.title`)||(null==a?void 0:a.name)||e,l=(t,e)=>{const a={type:"manifest/list"};return e&&(a.integrations=e),t.callWS(a)},d=async(t,e)=>{const a=await t.sendMessagePromise({type:"manifest/list"}),i={};for(const r of a)i[r.domain]=r;return e(i),()=>{}},h=(t,e)=>t.callWS({type:"manifest/get",integration:e}),u=t=>t.callWS({type:"integration/setup_info"}),f=t=>t.sendMessagePromise({type:"logger/log_info"}),p=(t,e,a,i)=>t.callWS({type:"logger/integration_log_level",integration:e,level:a,persistence:i}),m=(t,e)=>t.subscribeEvents((0,r.s)(()=>f(t).then(t=>e.setState(t,!0)),200,!0),"logging_changed"),g=(t,e)=>(0,i.N)("_integration_log_info",f,m,t,e),v=(t,e)=>t.callWS({type:"integration/wait",domain:e})},46927:function(t,e,a){a.d(e,{$W:function(){return d},Hg:function(){return n},Wj:function(){return o},Yk:function(){return h},jG:function(){return r},mo:function(){return l},ow:function(){return s},zt:function(){return c}});a(3362);var i=a(48250),r=function(t){return t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.quote_decimal="quote_decimal",t.space_comma="space_comma",t.none="none",t}({}),n=function(t){return t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24",t}({}),o=function(t){return t.local="local",t.server="server",t}({}),s=function(t){return t.language="language",t.system="system",t.DMY="DMY",t.MDY="MDY",t.YMD="YMD",t}({}),c=function(t){return t.language="language",t.monday="monday",t.tuesday="tuesday",t.wednesday="wednesday",t.thursday="thursday",t.friday="friday",t.saturday="saturday",t.sunday="sunday",t}({});const l=(t,e)=>(0,i.oT)(t.connection,"language",e),d=(t,e)=>(0,i.Bp)(t.connection,"language",e),h=async(t,e,a,i,r)=>(await t.callWS({type:"frontend/get_translations",language:e,category:a,integration:i,config_flow:r})).resources},65063:function(t,e,a){a.d(e,{an:function(){return c},dk:function(){return s},showAlertDialog:function(){return o}});a(3362),a(62953);var i=a(1087);const r=()=>Promise.all([a.e(72850),a.e(39763),a.e(32450),a.e(29962),a.e(62574),a.e(960)]).then(a.bind(a,26683)),n=(t,e,a)=>new Promise(n=>{const o=e.cancel,s=e.confirm;(0,i.r)(t,"show-dialog",{dialogTag:"dialog-box",dialogImport:r,dialogParams:Object.assign(Object.assign(Object.assign({},e),a),{},{cancel:()=>{n(!(null==a||!a.prompt)&&null),o&&o()},confirm:t=>{n(null==a||!a.prompt||t),s&&s(t)}})})}),o=(t,e)=>n(t,e),s=(t,e)=>n(t,e,{confirmation:!0}),c=(t,e)=>n(t,e,{prompt:!0})},42269:function(t,e,a){a.d(e,{p:function(){return r}});var i=a(1087);const r=(t,e)=>(0,i.r)(t,"hass-more-info",e)},59992:function(t,e,a){a.a(t,async function(t,i){try{a.d(e,{V:function(){return p}});a(62953);var r=a(40445),n=a(88696),o=a(5124),s=a(6412),c=a(67576),l=t([n]);n=(l.then?(await l)():l)[0];let d,h,u=t=>t;const f=t=>void 0===t?[]:Array.isArray(t)?t:[t],p=t=>{class e extends t{get scrollableElement(){return e.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(t){var e;null===(e=super.firstUpdated)||void 0===e||e.call(this,t),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(t){var e;null===(e=super.updated)||void 0===e||e.call(this,t),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(t=!1){return(0,o.qy)(d||(d=u` <div class="${0}"></div> <div class="${0}"></div> `),(0,s.H)({"fade-top":!0,rounded:t,visible:this._contentScrolled}),(0,s.H)({"fade-bottom":!0,rounded:t,visible:this._contentScrollable}))}static get styles(){var t;const e=Object.getPrototypeOf(this);return[...f(null!==(t=null==e?void 0:e.styles)&&void 0!==t?t:[]),(0,o.AH)(h||(h=u`.fade-bottom,.fade-top{position:absolute;left:0;right:0;height:var(--ha-space-2);pointer-events:none;transition:opacity 180ms ease-in-out;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom,var(--ha-color-shadow-scrollable-fade),transparent)}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-bottom.visible,.fade-top.visible{opacity:1}.fade-bottom.rounded,.fade-top.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`))]}_attachScrollableElement(){const t=this.scrollableElement;t!==this._scrollTarget&&(this._detachScrollableElement(),t&&(this._scrollTarget=t,t.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(t),this._updateScrollableState(t)))}_detachScrollableElement(){var t,e;this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),null===(t=(e=this._resize).unobserve)||void 0===t||t.call(e,this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(t){const e=parseFloat(getComputedStyle(t).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:i=0,scrollTop:r=0}=t;this._contentScrollable=a-i>r+e+this.scrollFadeSafeAreaPadding}constructor(...t){super(...t),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=t=>{var e;const a=t.currentTarget;this._contentScrolled=(null!==(e=a.scrollTop)&&void 0!==e?e:0)>this.scrollFadeThreshold,this._updateScrollableState(a)},this._resize=new n.P(this,{target:null,callback:t=>{var e;const a=null===(e=t[0])||void 0===e?void 0:e.target;a&&this._updateScrollableState(a)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return e.DEFAULT_SCROLLABLE_ELEMENT=null,(0,r.Cg)([(0,c.wk)()],e.prototype,"_contentScrolled",void 0),(0,r.Cg)([(0,c.wk)()],e.prototype,"_contentScrollable",void 0),e};i()}catch(d){i(d)}})},53580:function(t,e,a){a.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"},69235:function(t,e,a){a.a(t,async function(t,e){try{a(3362),a(62953);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await a.e(71055).then(a.bind(a,52370))).default),e()}catch(i){e(i)}},1)},14503:function(t,e,a){a.d(e,{RF:function(){return u},dp:function(){return m},kO:function(){return p},nA:function(){return f},og:function(){return h}});var i=a(5124);let r,n,o,s,c,l,d=t=>t;const h=(0,i.AH)(r||(r=d`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),u=(0,i.AH)(n||(n=d`:host{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-m);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}.header{transition:box-shadow .2s linear,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}@media (prefers-reduced-motion:reduce){.header{transition:box-shadow .2s linear}}h1{font-family:var(--ha-font-family-heading);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-2xl);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-condensed)}h2{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-medium);line-height:var(--ha-line-height-normal)}h3{font-family:var(--ha-font-family-body);-webkit-font-smoothing:var(--ha-font-smoothing);-moz-osx-font-smoothing:var(--ha-moz-osx-font-smoothing);font-size:var(--ha-font-size-l);font-weight:var(--ha-font-weight-normal);line-height:var(--ha-line-height-normal)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}${0} .card-actions a{text-decoration:none}.card-actions .warning{--mdc-theme-primary:var(--error-color)}.layout.horizontal,.layout.vertical{display:flex}.layout.inline{display:inline-flex}.layout.horizontal{flex-direction:row}.layout.vertical{flex-direction:column}.layout.wrap{flex-wrap:wrap}.layout.no-wrap{flex-wrap:nowrap}.layout.center,.layout.center-center{align-items:center}.layout.bottom{align-items:flex-end}.layout.center-center,.layout.center-justified{justify-content:center}.flex{flex:1;flex-basis:0.000000001px}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.layout.justified{justify-content:space-between}`),h),f=(0,i.AH)(o||(o=d`ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between;--dialog-container-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--dialog-surface-padding:0px}ha-adaptive-dialog .form,ha-dialog .form{color:var(--primary-text-color)}a{color:var(--primary-color)}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--mdc-dialog-min-width:100vw;--mdc-dialog-max-width:100vw;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--dialog-container-padding:0px;--dialog-surface-padding:var(--safe-area-inset-top, 0) var(--safe-area-inset-right, 0) var(--safe-area-inset-bottom, 0) var(--safe-area-inset-left, 0);--vertical-align-dialog:flex-end}ha-dialog{--ha-dialog-border-radius:var(--ha-border-radius-square)}}.error{color:var(--error-color)}`)),p=(0,i.AH)(s||(s=d`ha-adaptive-dialog,ha-dialog{--vertical-align-dialog:flex-start;--dialog-surface-margin-top:var(--ha-space-10);--mdc-dialog-max-height:calc(
100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--mdc-dialog-max-height:calc(
100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--ha-dialog-max-height:calc(
100vh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
);--ha-dialog-max-height:calc(
100svh - var(--dialog-surface-margin-top) - var(--ha-space-2) - var(
--safe-area-inset-y,
0px
)
)}@media all and (max-width:450px),all and (max-height:500px){ha-adaptive-dialog,ha-dialog{--dialog-surface-margin-top:0px;--mdc-dialog-min-height:100vh;--mdc-dialog-min-height:100svh;--mdc-dialog-max-height:100vh;--mdc-dialog-max-height:100svh;--ha-dialog-max-height:100vh;--ha-dialog-max-height:100svh}}`)),m=(0,i.AH)(c||(c=d`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{border-radius:var(--ha-border-radius-sm);background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`));(0,i.AH)(l||(l=d`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))},85614:function(t,e,a){a.d(e,{i:function(){return i}});a(3362),a(62953);const i=async()=>{await Promise.all([a.e(38085),a.e(22309)]).then(a.bind(a,40772))}},44144:function(t,e,a){a.d(e,{Cv:function(){return c},MR:function(){return u},QR:function(){return f},_c:function(){return h},a_:function(){return m},bg:function(){return g},yM:function(){return p}});a(18111),a(22489),a(3362),a(62953),a(3296),a(27208),a(48408),a(14603),a(47566),a(98721);var i=a(8129);let r,n;const o=66649!=a.j?18e5:null,s=66649!=a.j?[0,500,1e3,2e3,5e3,1e4,15e3]:null,c=async t=>{const e=r;for(const n of s){n&&await(0,i.l)(n);try{return await l(t),d(t),r!==e}catch(a){}}return!1},l=async t=>{const e=await t.callWS({type:"brands/access_token"});r=e.token},d=t=>{h(),n=setInterval(()=>{l(t).catch(()=>{})},o)},h=()=>{n&&(clearInterval(n),n=void 0)},u=(t,e)=>{if(!r)return"";e=null!=e?e:location.origin;const a=`/api/brands/integration/${t.domain}/${t.darkOptimized?"dark_":""}${t.type}.png`,i=new URL(a,e);return i.searchParams.set("token",r),i.toString()},f=(t,e)=>{if(!r)return"";e=null!=e?e:location.origin;const a=`/api/brands/hardware/${t.category}/${t.darkOptimized?"dark_":""}${t.manufacturer}${t.model?`_${t.model}`:""}.png`,i=new URL(a,e);return i.searchParams.set("token",r),i.toString()},p=(t,e)=>{let a;e=null!=e?e:location.origin;try{a=new URL(t,e)}catch(i){return t}return a.pathname.startsWith("/api/brands/")?r?(a.searchParams.set("token",r),a.toString()):"":t},m=t=>{var e;const a=new URL(t,location.origin);if(a.pathname.startsWith("/api/brands/"))return a.pathname.split("/")[4];const i=a.pathname.split("/").filter(t=>t.length>0),r=i.indexOf("_");return-1!==r&&r+1<i.length?i[r+1]:null!==(e=i[1])&&void 0!==e?e:""},g=t=>{try{return new URL(t,location.origin).pathname.startsWith("/api/brands/")||t.startsWith("https://brands.home-assistant.io/")}catch(e){return!1}}},22348:function(t,e,a){a.d(e,{V:function(){return r}});var i=a(37177);const r=t=>!!t&&i.n},37177:function(t,e,a){a.d(e,{n:function(){return i}});a(27495);const i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},88438:function(t,e,a){a.d(e,{C:function(){return i}});const i="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},37619:function(t,e,a){a.d(e,{X:function(){return n},s:function(){return r}});a(69112),a(33110);let i=!1;const r=t=>{i=t},n=(t,e)=>{const a=t.sendMessagePromise(e);return i&&console.log(`⬆️ Sent #${e.id}`,e),i&&a.then(t=>console.log(`⬇️ Received #${e.id}`,t&&"object"==typeof t?JSON.parse(JSON.stringify(t)):t),t=>console.error(`❌ Error #${e.id}`,t)),a}}}]);