iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
24 lines • 25.7 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[62520],{26218:function(e,t,i){i.d(t,{a:function(){return o}});i(16280);const a=(0,i(77796).n)(e=>{history.replaceState({scrollPosition:e},"")},300);function o(e){return(t,i)=>{if("object"==typeof i)throw new Error("This decorator does not support this compilation type.");const o=t.connectedCallback;t.connectedCallback=function(){o.call(this);const t=this[i];t&&this.updateComplete.then(()=>{const i=this.renderRoot.querySelector(e);i&&setTimeout(()=>{i.scrollTop=t},0)})};const n=Object.getOwnPropertyDescriptor(t,i);let r;if(void 0===n)r={get(){var e;return this[`__${String(i)}`]||(null===(e=history.state)||void 0===e?void 0:e.scrollPosition)},set(e){a(e),this[`__${String(i)}`]=e},configurable:!0,enumerable:!0};else{const e=n.set;r=Object.assign(Object.assign({},n),{},{set(t){a(t),this[`__${String(i)}`]=t,null==e||e.call(this,t)}})}Object.defineProperty(t,i,r)}}},77796:function(e,t,i){i.d(t,{n:function(){return a}});i(62953);const a=(e,t,i=!0,a=!0)=>{let o,n=0;const r=(...r)=>{const s=()=>{n=!1===i?0:Date.now(),o=void 0,e(...r)},l=Date.now();n||!1!==i||(n=l);const c=t-(l-n);c<=0||c>t?(o&&(clearTimeout(o),o=void 0),n=l,e(...r)):o||!1===a||(o=window.setTimeout(s,c))};return r.cancel=()=>{clearTimeout(o),o=void 0,n=0},r}},90248:function(e,t,i){i.a(e,async function(e,a){try{i.r(t),i.d(t,{HaIconButtonArrowPrev:function(){return g}});i(62953);var o=i(40445),n=i(5124),r=i(67576),s=i(63091),l=i(26300),c=e([l]);l=(c.then?(await c)():c)[0];let h,d=e=>e;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 g extends n.WF{render(){var e;return(0,n.qy)(h||(h=d` <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===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.back"))||"Back",this._icon,this.href,this.target,this.rel,this.download)}constructor(...e){super(...e),this.disabled=!1,this._icon="rtl"===s.G.document.dir?p:u}}(0,o.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],g.prototype,"disabled",void 0),(0,o.Cg)([(0,r.MZ)()],g.prototype,"label",void 0),(0,o.Cg)([(0,r.MZ)()],g.prototype,"href",void 0),(0,o.Cg)([(0,r.MZ)()],g.prototype,"target",void 0),(0,o.Cg)([(0,r.MZ)()],g.prototype,"rel",void 0),(0,o.Cg)([(0,r.MZ)()],g.prototype,"download",void 0),(0,o.Cg)([(0,r.wk)()],g.prototype,"_icon",void 0),g=(0,o.Cg)([(0,r.EM)("ha-icon-button-arrow-prev")],g),a()}catch(h){a(h)}})},26300:function(e,t,i){i.a(e,async function(e,a){try{i.r(t),i.d(t,{HaIconButton:function(){return f}});i(62953);var o=i(40445),n=i(5124),r=i(67576),s=i(63672),l=i(18350),c=(i(67094),e([l]));l=(c.then?(await c)():c)[0];let h,d,u,p,g=e=>e;class f extends n.WF{render(){return(0,n.qy)(h||(h=g` <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,n.qy)(d||(d=g`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,n.qy)(u||(u=g`<span><slot></slot></span>`)))}constructor(...e){super(...e),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}f.shadowRootOptions={mode:"open",delegatesFocus:!0},f.styles=(0,n.AH)(p||(p=g`: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} (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),(0,o.Cg)([(0,r.MZ)({type:String})],f.prototype,"path",void 0),(0,o.Cg)([(0,r.MZ)({type:String})],f.prototype,"label",void 0),(0,o.Cg)([(0,r.MZ)({type:String,attribute:"aria-haspopup"})],f.prototype,"ariaHasPopup",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"hide-title",type:Boolean})],f.prototype,"hideTitle",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"selected",void 0),(0,o.Cg)([(0,r.MZ)()],f.prototype,"href",void 0),(0,o.Cg)([(0,r.MZ)()],f.prototype,"target",void 0),(0,o.Cg)([(0,r.MZ)()],f.prototype,"rel",void 0),(0,o.Cg)([(0,r.MZ)()],f.prototype,"download",void 0),f=(0,o.Cg)([(0,r.EM)("ha-icon-button")],f),a()}catch(h){a(h)}})},2054:function(e,t,i){i.a(e,async function(e,t){try{i(16280),i(62953);var a=i(40445),o=i(5124),n=i(67576),r=i(1087),s=i(44249),l=i(26300),c=e([l]);l=(c.then?(await c)():c)[0];let h,d,u,p=e=>e;const g="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class f extends o.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 o.s6;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,o.qy)(h||(h=p` <ha-icon-button .label="${0}" .path="${0}" ="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),g,this._toggleMenu,e?(0,o.qy)(d||(d=p`<div class="dot"></div>`)):"")}willUpdate(e){if(super.willUpdate(e),!e.has("narrow")&&!e.has("hass"))return;const t=e.has("hass")?e.get("hass"):this.hass,i=e.has("narrow")?e.get("narrow"):this.narrow,a=!1===(null==t?void 0:t.kioskMode)&&(i||"always_hidden"===(null==t?void 0:t.dockedSidebar)),o=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&a===o||(this._show=o||this._alwaysVisible,o?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,e=>{this._hasNotifications=e.length>0})}_toggleMenu(){(0,r.r)(this,"hass-toggle-menu")}constructor(...e){super(...e),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}f.styles=(0,o.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,a.Cg)([(0,n.MZ)({type:Boolean})],f.prototype,"narrow",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,a.Cg)([(0,n.wk)()],f.prototype,"_hasNotifications",void 0),(0,a.Cg)([(0,n.wk)()],f.prototype,"_show",void 0),f=(0,a.Cg)([(0,n.EM)("ha-menu-button")],f),t()}catch(h){t(h)}})},67094:function(e,t,i){i.r(t),i.d(t,{HaSvgIcon:function(){return d}});var a=i(40445),o=i(5124),n=i(67576);let r,s,l,c,h=e=>e;class d extends o.WF{render(){return(0,o.JW)(r||(r=h` <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,o.JW)(s||(s=h`<path class="primary-path" d="${0}"></path>`),this.path):o.s6,this.secondaryPath?(0,o.JW)(l||(l=h`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):o.s6)}}d.styles=(0,o.AH)(c||(c=h`: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,a.Cg)([(0,n.MZ)()],d.prototype,"path",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"secondaryPath",void 0),(0,a.Cg)([(0,n.MZ)({attribute:!1})],d.prototype,"viewBox",void 0),d=(0,a.Cg)([(0,n.EM)("ha-svg-icon")],d)},44249:function(e,t,i){i.d(t,{V:function(){return a}});i(62953);const a=(e,t)=>{const i=new o,a=e.subscribeMessage(e=>t(i.processMessage(e)),{type:"persistent_notification/subscribe"});return()=>{a.then(e=>null==e?void 0:e())}};class o{processMessage(e){if("removed"===e.type)for(const t of Object.keys(e.notifications))delete this.notifications[t];else this.notifications=Object.assign(Object.assign({},this.notifications),e.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},84621:function(e,t,i){i.d(t,{$:function(){return x},A2:function(){return I},C2:function(){return a},Iu:function(){return C},Ky:function(){return h},Lj:function(){return c},Mo:function(){return W},On:function(){return s},P0:function(){return $},PA:function(){return l},Qo:function(){return z},RW:function(){return k},Uc:function(){return r},Ui:function(){return b},VC:function(){return A},VK:function(){return Z},Yf:function(){return L},ZU:function(){return n},cm:function(){return f},f7:function(){return q},hi:function(){return _},i_:function(){return p},jm:function(){return H},kH:function(){return d},ks:function(){return u},oM:function(){return g},p7:function(){return S},pl:function(){return v},rv:function(){return y},sb:function(){return V},tg:function(){return M},tv:function(){return w},xU:function(){return o},zt:function(){return m}});const a=(e,t,i)=>e.connection.subscribeMessage(e=>i(e),{type:"zha/devices/reconfigure",ieee:t}),o=e=>e.callWS({type:"zha/topology/update"}),n=(e,t,i,a,o)=>e.callWS({type:"zha/devices/clusters/attributes",ieee:t,endpoint_id:i,cluster_id:a,cluster_type:o}),r=e=>e.callWS({type:"zha/devices"}),s=(e,t)=>e.callWS({type:"zha/device",ieee:t}),l=(e,t)=>e.callWS({type:"zha/devices/bindable",ieee:t}),c=(e,t,i)=>e.callWS({type:"zha/devices/bind",source_ieee:t,target_ieee:i}),h=(e,t,i)=>e.callWS({type:"zha/devices/unbind",source_ieee:t,target_ieee:i}),d=(e,t,i,a)=>e.callWS({type:"zha/groups/bind",source_ieee:t,group_id:i,bindings:a}),u=(e,t,i,a)=>e.callWS({type:"zha/groups/unbind",source_ieee:t,group_id:i,bindings:a}),p=(e,t)=>e.callWS(Object.assign(Object.assign({},t),{},{type:"zha/devices/clusters/attributes/value"})),g=(e,t,i,a,o)=>e.callWS({type:"zha/devices/clusters/commands",ieee:t,endpoint_id:i,cluster_id:a,cluster_type:o}),f=(e,t)=>e.callWS({type:"zha/devices/clusters",ieee:t}),v=e=>e.callWS({type:"zha/groups"}),y=(e,t)=>e.callWS({type:"zha/group/remove",group_ids:t}),b=(e,t)=>e.callWS({type:"zha/group",group_id:t}),m=e=>e.callWS({type:"zha/devices/groupable"}),_=(e,t,i)=>e.callWS({type:"zha/group/members/add",group_id:t,members:i}),w=(e,t,i)=>e.callWS({type:"zha/group/members/remove",group_id:t,members:i}),x=(e,t,i,a)=>e.callWS({type:"zha/group/add",group_name:t,group_id:i,members:a}),z=e=>e.callWS({type:"zha/configuration"}),k=(e,t)=>e.callWS({type:"zha/configuration/update",data:t}),$=e=>e.callWS({type:"zha/network/settings"}),C=e=>e.callWS({type:"zha/network/backups/create"}),S=(e,t)=>e.callWS({type:"zha/network/change_channel",new_channel:t}),M="INITIALIZED",W="INTERVIEW_COMPLETE",q="CONFIGURED",Z=["PAIRED",q,W],A=["device_joined","raw_device_initialized","device_fully_initialized"],H="log_output",I="zha_channel_bind",V="zha_channel_configure_reporting",L="zha_channel_cfg_done"},31580:function(e,t,i){i.d(t,{J8:function(){return o},Rr:function(){return r},b9:function(){return a},iV:function(){return n}});i(94490);const a=e=>{let t=e;return"string"==typeof e&&(t=parseInt(e,16)),"0x"+t.toString(16).padStart(4,"0")},o=(e,t)=>{const i=e.user_given_name?e.user_given_name:e.name,a=t.user_given_name?t.user_given_name:t.name;return i.localeCompare(a)},n=(e,t)=>{const i=e.name,a=t.name;return i.localeCompare(a)},r=e=>`${e.name} (Endpoint id: ${e.endpoint_id}, Id: ${a(e.id)}, Type: ${e.type})`},50760:function(e,t,i){i.d(t,{A:function(){return n}});i(74423),i(44114),i(26910),i(18111),i(20116),i(7588);var a=i(76774);function o(e){return e>200?3:e>100?2:1}function n(e,t,i){const n=getComputedStyle(i),r=n.getPropertyValue("--primary-color"),s=n.getPropertyValue("--cyan-color"),l=n.getPropertyValue("--teal-color"),c=n.getPropertyValue("--error-color"),h=[],d=[],u=[{name:t.localize("ui.panel.config.zha.visualization.coordinator"),symbol:"roundRect",itemStyle:{color:r}},{name:t.localize("ui.panel.config.zha.visualization.router"),symbol:"circle",itemStyle:{color:s}},{name:t.localize("ui.panel.config.zha.visualization.end_device"),symbol:"circle",itemStyle:{color:l}},{name:t.localize("ui.panel.config.zha.visualization.offline"),symbol:"circle",itemStyle:{color:c}}];return e.forEach(i=>{const u="Coordinator"===i.device_type;let p;p=i.available?u?0:"Router"===i.device_type?1:2:3;const g=t.devices[i.device_reg_id],f=g?(0,a.q)(g,t.areas):void 0;h.push({id:i.ieee,name:i.user_given_name||i.name||i.ieee,context:null==f?void 0:f.name,category:p,value:u?3:"Router"===i.device_type?2:1,symbolSize:u?40:"Router"===i.device_type?30:20,symbol:u?"roundRect":"circle",itemStyle:{color:i.available?u?r:"Router"===i.device_type?s:l:c},polarDistance:0===p?0:1===p?.5:.9,fixed:u});const v=d.filter(e=>e.source===i.ieee||e.target===i.ieee);if(i.routes&&i.routes.length>0)i.routes.forEach(e=>{const t=i.neighbors.find(t=>t.nwk===e.next_hop);if(!t)return;const a=v.find(e=>e.source===t.ieee||e.target===t.ieee);if(a){var s;if(a.source===i.ieee)a.value=Math.max(a.value,parseInt(t.lqi));else a.reverseValue=Math.max(null!==(s=a.reverseValue)&&void 0!==s?s:0,parseInt(t.lqi));const n=o(parseInt(t.lqi));a.symbolSize=n/4*6+3,a.lineStyle=Object.assign(Object.assign({},a.lineStyle),{},{width:n,color:"Active"===e.route_status?r:a.lineStyle.color,type:["Child","Parent"].includes(t.relationship)?"solid":a.lineStyle.type})}else{const a=o(parseInt(t.lqi)),s={source:i.ieee,target:t.ieee,value:parseInt(t.lqi),lineStyle:{width:a,color:"Active"===e.route_status?r:n.getPropertyValue("--dark-primary-color"),type:["Child","Parent"].includes(t.relationship)?"solid":"dotted"},symbolSize:a/4*6+3,ignoreForceLayout:"0x0000"!==e.dest_nwk};d.push(s),v.push(s)}});else if(0===v.length){var y;const t=null!==(y=i.neighbors)&&void 0!==y?y:[];0===t.length&&e.forEach(e=>{if(e.neighbors&&e.neighbors.length>0){const a=e.neighbors.find(e=>e.ieee===i.ieee);a&&t.push({ieee:e.ieee,lqi:a.lqi})}});const a=t.sort((e,t)=>parseInt(t.lqi)-parseInt(e.lqi))[0];a&&d.push({source:i.ieee,target:a.ieee,value:parseInt(a.lqi),symbolSize:5,lineStyle:{width:1,color:n.getPropertyValue("--dark-primary-color"),type:"dotted"},ignoreForceLayout:!0})}}),e.forEach(e=>{if("Coordinator"===e.device_type)d.forEach(t=>{t.source!==e.ieee&&t.target!==e.ieee||(t.ignoreForceLayout=!1)});else{let t;!d.some(i=>{if(i.source===e.ieee||i.target===e.ieee){var a,o;if(!i.ignoreForceLayout)return!0;i.value>(null!==(a=null===(o=t)||void 0===o?void 0:o.value)&&void 0!==a?a:-1)&&(t=i)}return!1})&&t&&(t.ignoreForceLayout=!1)}}),{nodes:h,links:d,categories:u}}},94728:function(e,t,i){i.a(e,async function(e,a){try{i.r(t),i.d(t,{ZHANetworkVisualizationPage:function(){return Z}});i(44114),i(18111),i(20116),i(3362),i(27495),i(25440),i(62953);var o=i(40445),n=i(5124),r=i(67576),s=i(76774),l=i(91926),c=i(7358),h=i(36866),d=i(84621),u=i(81310),p=i(31580),g=i(50760),f=e([c,h,u]);[c,h,u]=f.then?(await f)():f;let v,y,b,m,_,w,x,z,k,$,C,S,M,W=e=>e;const q="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z";class Z extends n.WF{firstUpdated(e){super.firstUpdated(e),this.hass&&this._fetchData()}render(){return(0,n.qy)(v||(v=W` <hass-subpage .hass="${0}" .narrow="${0}" .header="${0}"> ${0} <ha-network-graph .hass="${0}" .searchFilter="${0}" .data="${0}" .searchableAttributes="${0}" .tooltipFormatter="${0}" -click="${0}"> ${0} <ha-icon-button slot="button" class="refresh-button" .path="${0}" ="${0}" label="${0}"></ha-icon-button> </ha-network-graph> </hass-subpage> `),this.hass,this.narrow,this.hass.localize("ui.panel.config.zha.visualization.header"),this.narrow?(0,n.qy)(y||(y=W`<div slot="header">${0}</div>`),this._renderInputSearch()):n.s6,this.hass,this._searchFilter,this._networkData,this._getSearchableAttributes,this._tooltipFormatter,this._handleChartClick,this.narrow?n.s6:this._renderInputSearch("search"),q,this._refreshTopology,this.hass.localize("ui.panel.config.zha.visualization.refresh_topology"))}_renderInputSearch(e=""){return(0,n.qy)(b||(b=W`<ha-input-search appearance="outlined" slot="${0}" .value="${0}" ="${0}"></ha-input-search>`),e,this._searchFilter,this._handleSearchChange)}async _fetchData(){this._devices=await(0,d.Uc)(this.hass),this._networkData=(0,g.A)(this._devices,this.hass,this)}_handleSearchChange(e){var t;this._searchFilter=null!==(t=e.target.value)&&void 0!==t?t:""}async _refreshTopology(){await(0,d.xU)(this.hass),await this._fetchData()}_handleChartClick(e){if("node"===e.detail.dataType&&"pointer"===e.detail.event.target.cursor){const{id:t}=e.detail.data,i=this._devices.find(e=>e.ieee===t);i&&(0,l.oo)(`/config/devices/device/${i.device_reg_id}`)}}static get styles(){return[(0,n.AH)(m||(m=W`ha-network-graph{height:100%}[slot=header]{display:flex;align-items:center}ha-input-search{flex:1}`))]}constructor(...e){super(...e),this.narrow=!1,this.isWide=!1,this._networkData={nodes:[],links:[],categories:[]},this._devices=[],this._searchFilter="",this._getSearchableAttributes=e=>{const t=this._devices.find(t=>t.ieee===e);if(!t)return[];const i=[];return t.user_given_name&&i.push(t.user_given_name),t.manufacturer&&i.push(t.manufacturer),t.model&&i.push(t.model),t.device_type&&i.push(t.device_type),null!=t.nwk&&i.push((0,p.b9)(t.nwk)),i},this._tooltipFormatter=e=>{const{dataType:t,data:i,name:a}=e;if("edge"===t){var o;const{source:e,target:t,value:a}=i,r=this._networkData.nodes.find(e=>e.id===t).name,s=this._networkData.nodes.find(t=>t.id===e).name,l=null===(o=this._networkData.links.find(i=>i.source===e&&i.target===t))||void 0===o?void 0:o.reverseValue;return(0,n.qy)(_||(_=W`${0} → ${0}${0}${0}`),s,r,a?(0,n.qy)(w||(w=W` <b>LQI:</b> ${0}`),a):n.s6,l?(0,n.qy)(x||(x=W`<br>${0} → ${0} <b>LQI:</b> ${0}`),r,s,l):n.s6)}const r=this._devices.find(e=>e.ieee===i.id);if(!r)return(0,n.qy)(z||(z=W`${0}`),a);const l=this.hass.devices[r.device_reg_id],c=l?(0,s.q)(l,this.hass.areas):void 0;return(0,n.qy)(k||(k=W`<b>IEEE: </b>${0}<br><b>${0}: </b>${0}${0}${0}${0}`),r.ieee,this.hass.localize("ui.panel.config.zha.visualization.device_type"),r.device_type.replace("_"," "),null!=r.nwk?(0,n.qy)($||($=W`<br><b>NWK: </b>${0}`),(0,p.b9)(r.nwk)):n.s6,null!=r.manufacturer&&null!=r.model?(0,n.qy)(C||(C=W`<br><b>${0}: </b>${0} ${0}`),this.hass.localize("ui.panel.config.zha.visualization.device"),r.manufacturer,r.model):(0,n.qy)(S||(S=W`<br><b>${0}</b>`),this.hass.localize("ui.panel.config.zha.visualization.device_not_in_db")),c?(0,n.qy)(M||(M=W`<br><b>${0}: </b>${0}`),this.hass.localize("ui.panel.config.zha.visualization.area"),c.name):n.s6)}}}(0,o.Cg)([(0,r.MZ)({attribute:!1})],Z.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],Z.prototype,"route",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],Z.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"is-wide",type:Boolean})],Z.prototype,"isWide",void 0),(0,o.Cg)([(0,r.wk)()],Z.prototype,"_networkData",void 0),(0,o.Cg)([(0,r.wk)()],Z.prototype,"_devices",void 0),(0,o.Cg)([(0,r.wk)()],Z.prototype,"_searchFilter",void 0),Z=(0,o.Cg)([(0,r.EM)("zha-network-visualization-page")],Z),a()}catch(v){a(v)}})},14503:function(e,t,i){i.d(t,{RF:function(){return u},dp:function(){return f},kO:function(){return g},nA:function(){return p},og:function(){return d}});var a=i(5124);let o,n,r,s,l,c,h=e=>e;const d=(0,a.AH)(o||(o=h`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,a.AH)(n||(n=h`: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} (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}`),d),p=(0,a.AH)(r||(r=h`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)} 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)}`)),g=(0,a.AH)(s||(s=h`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
)
)} 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}}`)),f=(0,a.AH)(l||(l=h`.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,a.AH)(c||(c=h`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))}}]);