iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
25 lines • 40.6 kB
JavaScript
export const __rspack_esm_id=72513;export const __rspack_esm_ids=[72513];export const __webpack_modules__={90433(t,e,a){a.d(e,{Vy:()=>r,fI:()=>n,ux:()=>s});var o=a(22786),i=a(79468);function r(t,e){const a=t%54+1;return e.getPropertyValue(`--color-${a}`)}function n(t,e){const a=e.getPropertyValue(`--graph-color-${t+1}`)||r(t,e);return(0,i.RQ)(a)}const s=(0,o.A)(t=>Array.from({length:54},(e,a)=>n(a,t)),(t,e)=>t[0].getPropertyValue("--graph-color-1")===e[0].getPropertyValue("--graph-color-1")&&t[0].getPropertyValue("--color-1")===e[0].getPropertyValue("--color-1"))},72487(t,e,a){a.a(t,async function(t,o){try{a.d(e,{CA:()=>$,Mi:()=>Z,Pm:()=>x,Wq:()=>v,Yq:()=>h,bl:()=>D,c2:()=>_,fr:()=>f,gu:()=>z,kz:()=>c,m9:()=>H,sl:()=>m,ur:()=>L,zB:()=>u});a(18111),a(20116);var i=a(74487),r=a(22786),n=a(46927),s=a(8480),l=t([i,s]);[i,s]=l.then?(await l)():l;(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)}));const h=(t,e,a)=>d(e,a.time_zone).format(t),d=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),c=(t,e,a)=>p(e,a.time_zone).format(t),p=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),u=(t,e,a)=>{const o=g(e,a.time_zone);if(e.date_format===n.ow.language||e.date_format===n.ow.system)return o.format(t);const i=o.formatToParts(t),r=i.find(t=>"literal"===t.type)?.value,s=i.find(t=>"day"===t.type)?.value,l=i.find(t=>"month"===t.type)?.value,h=i.find(t=>"year"===t.type)?.value,d=i[i.length-1];let c="literal"===d?.type?d?.value:"";"bg"===e.language&&e.date_format===n.ow.YMD&&(c="");return{[n.ow.DMY]:`${s}${r}${l}${r}${h}${c}`,[n.ow.MDY]:`${l}${r}${s}${r}${h}${c}`,[n.ow.YMD]:`${h}${r}${l}${r}${s}${c}`}[e.date_format]},g=(0,r.A)((t,e)=>{const a=t.date_format===n.ow.system?void 0:t.language;return t.date_format===n.ow.language||(t.date_format,n.ow.system),new Intl.DateTimeFormat(a,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})}),m=(t,e,a)=>b(e,a.time_zone).format(t),b=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),f=(t,e,a)=>y(e,a.time_zone).format(t),y=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),v=(t,e,a)=>w(e,a.time_zone).format(t),w=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",timeZone:(0,s.wj)(t.time_zone,e)})),_=(t,e,a)=>C(e,a.time_zone).format(t),C=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",timeZone:(0,s.wj)(t.time_zone,e)})),x=(t,e,a)=>M(e,a.time_zone).format(t),M=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),$=(t,e,a)=>k(e,a.time_zone).format(t),k=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",timeZone:(0,s.wj)(t.time_zone,e)})),z=(t,e,a)=>S(e,a.time_zone).format(t),S=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",timeZone:(0,s.wj)(t.time_zone,e)})),Z=(t,e,a)=>A(e,a.time_zone).format(t),A=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),L=(t,e,a)=>P(e,a.time_zone).format(t),P=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,s.wj)(t.time_zone,e)})),D=(t,e,a)=>{const o=(0,s.wj)(e.time_zone,a.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:o}).format(t)},H=(t,e,a,o)=>`${D(t,a,o)}/${D(e,a,o)}`;o()}catch(t){o(t)}})},30162(t,e,a){a.a(t,async function(t,o){try{a.d(e,{LW:()=>m,Xs:()=>u,fU:()=>h,ie:()=>c});var i=a(74487),r=a(22786),n=a(8480),s=a(69543),l=t([i,n]);[i,n]=l.then?(await l)():l;const h=(t,e,a)=>d(e,a.time_zone).format(t),d=(0,r.A)((t,e)=>new Intl.DateTimeFormat(t.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,s.J)(t)?"h12":"h23",timeZone:(0,n.wj)(t.time_zone,e)})),c=(t,e,a)=>p(e,a.time_zone).format(t),p=(0,r.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,n.wj)(t.time_zone,e)})),u=(t,e,a)=>g(e,a.time_zone).format(t),g=(0,r.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,n.wj)(t.time_zone,e)})),m=(t,e,a)=>b(e,a.time_zone).format(t),b=(0,r.A)((t,e)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,n.wj)(t.time_zone,e)}));o()}catch(t){o(t)}})},8480(t,e,a){a.a(t,async function(t,o){try{a.d(e,{fL:()=>d,n2:()=>c,wj:()=>p});var i=a(74487),r=a(29079),n=a(46927),s=t([i]);i=(s.then?(await s)():s)[0];const l=Intl.DateTimeFormat?.().resolvedOptions?.().timeZone,h=l&&("UTC"===l||"Etc/UTC"===l||l in r)?l:void 0,d=14881==a.j?void 0!==h:null,c=h??"UTC",p=(t,e)=>t===n.Wj.local&&h?c:e;o()}catch(t){o(t)}})},69543(t,e,a){a.d(e,{J:()=>r});a(74423);var o=a(22786),i=a(46927);const r=(0,o.A)(t=>{if(t.time_format===i.Hg.language||t.time_format===i.Hg.system){const e=t.time_format===i.Hg.language?t.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(e).includes("10")}return t.time_format===i.Hg.am_pm})},32172(t,e,a){a.d(e,{p:()=>o});a(18111),a(7588),a(45367),a(92731),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);function o(t){return(e,a)=>{if("object"==typeof a)throw new Error("This decorator does not support this compilation type.");const o=String(a),i=e;if(i._transformers){if(!i.hasOwnProperty("_transformers")){const t=i._transformers;i._transformers=new Map,t.forEach((t,e)=>i._transformers.set(e,t))}}else{i._transformers=new Map,i._watching=new Map;const t=i.willUpdate;i.willUpdate=function(e){t.call(this,e);const a=new Set;e.forEach((t,e)=>{const o=this._watching.get(e);void 0!==o&&o.forEach(t=>a.add(t))}),a.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}i._transformers.set(a,t.transformer),t.watch&&t.watch.forEach(t=>{let e=i._watching.get(t);e||(e=new Set,i._watching.set(t,e)),e.add(a)});const r=Object.getOwnPropertyDescriptor(e,a);let n;if(void 0===r)n={get(){return this[`__transform_${o}`]},set(t){const e=this[`__transform_${o}`],a=this._transformers.get(o);this[`__transform_${o}`]=a?a.call(this,t):t,this[`__original_${o}`]=t,this.requestUpdate(o,e)},configurable:!0,enumerable:!0};else{const t=r.set;n={...r,set(e){const a=this[`__transform_${o}`],i=this._transformers.get(o);this[`__transform_${o}`]=i?i.call(this,e):e,this[`__original_${o}`]=e,this.requestUpdate(o,a),t?.call(this,e)}}}Object.defineProperty(e,a,n)}}},57237(t,e,a){a.d(e,{d:()=>o});const o=t=>t.stopPropagation()},76774(t,e,a){a.d(e,{q:()=>o});const o=(t,e)=>{const a=t.area_id;return a?e[a]:void 0}},19459(t,e,a){a.d(e,{b:()=>o});a(45367),a(92731),a(69479),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);const o=(t,e,a)=>{if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;let i,r;if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(i=r;0!==i--;)if(!o(t[i],e[i],a))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!o(i[1],e.get(i[0]),a))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(r=t.length,r!==e.length)return!1;for(i=r;0!==i--;)if(t[i]!==e[i])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const n=Object.keys(t);if(r=n.length,r!==Object.keys(e).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=r;0!==i--;){const r=n[i];if(!o(t[r],e[r],a))return!1}if(a?.compareSymbols){const i=Object.getOwnPropertySymbols(t),r=Object.getOwnPropertySymbols(e);if(i.length!==r.length)return!1;for(const r of i){if(!Object.prototype.hasOwnProperty.call(e,r))return!1;if(!o(t[r],e[r],a))return!1}}return!0}return t!=t&&e!=e}},29961(t,e,a){a.a(t,async function(t,o){try{a.d(e,{d:()=>s,n:()=>l});var i=a(72487),r=a(30162),n=t([i,r]);function s(t,e,a){return"month"===t?{formatter:t=>{const o=new Date(t);return 0===o.getMonth()?`{bold|${(0,i.fr)(o,e,a)}}`:(0,i.Wq)(o,e,a)}}:"year"===t?{formatter:t=>(0,i.Pm)(new Date(t),e,a)}:void 0}function l(t,e,a,o){const n=o/60/24,s=new Date(t);if(n>88)return 0===s.getMonth()?`{bold|${(0,i.fr)(s,e,a)}}`:(0,i.Wq)(s,e,a);if(n>35)return 1===s.getDate()?`{bold|${(0,i.sl)(s,e,a)}}`:(0,i.sl)(s,e,a);if(n>7){const t=(0,i.sl)(s,e,a);return 1===s.getDate()?`{bold|${t}}`:t}return n>2?(0,i.gu)(s,e,a):o&&o<5?(0,r.ie)(s,e,a):0===s.getHours()&&0===s.getMinutes()&&0===s.getSeconds()?`{bold|${(0,i.sl)(s,e,a)}}`:(0,r.fU)(s,e,a)}[i,r]=n.then?(await n)():n,o()}catch(h){o(h)}})},34218(t,e,a){a.d(e,{P:()=>o});a(44114),a(18111),a(18237),a(45367),a(92731);function o(t,e,a,o,r=!1){if(!t)return[];if(t.length<=e)return t;const n=a??i(t[0])[0],s=o??i(t[t.length-1])[0],l=Math.ceil((s-n)/Math.floor(e)),h=new Map;for(const e of t){const t=i(e);if(!Array.isArray(t))continue;const a=Number(t[0]),o=Number(t[1]);if(isNaN(a)||isNaN(o))continue;const r=Math.floor((a-n)/l),s=h.get(r);s?s.push({point:e,x:a,y:o}):h.set(r,[{point:e,x:a,y:o}])}const d=[];if(r)for(const[t,e]of h){const t=e.reduce((t,e)=>t+e.y,0)/e.length,a=e.reduce((t,e)=>t+e.x,0)/e.length,o=i(e[0].point),r=Array.isArray(o)?[a,t]:{value:[a,t]};d.push(r)}else for(const[t,e]of h){let t=e[0],a=e[0];for(const o of e)o.y<t.y&&(t=o),o.y>a.y&&(a=o);t.x>a.x&&d.push(a.point),d.push(t.point),t.x<a.x&&d.push(a.point)}return d}function i(t){return t&&"object"==typeof t&&"value"in t?t.value:t}},7358(t,e,a){a.a(t,async function(t,e){try{a(74423),a(44114),a(18111),a(22489),a(20116),a(7588),a(61701),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698);var o=a(62826),i=a(5124),r=a(22441),n=a(22786),s=a(71769),l=a(44439),h=a(54706),d=a(19459),c=t([l]);l=(c.then?(await c)():c)[0];const p="M9.6,14L12,7.7L14.4,14M11,5L5.5,19H7.7L8.8,16H15L16.1,19H18.3L13,5H11Z",u="M5,10A2,2 0 0,0 3,12C3,13.11 3.9,14 5,14C6.11,14 7,13.11 7,12A2,2 0 0,0 5,10M5,16A4,4 0 0,1 1,12A4,4 0 0,1 5,8A4,4 0 0,1 9,12A4,4 0 0,1 5,16M10.5,11H14V8L18,12L14,16V13H10.5V11M5,6C4.55,6 4.11,6.05 3.69,6.14C5.63,3.05 9.08,1 13,1C19.08,1 24,5.92 24,12C24,18.08 19.08,23 13,23C9.08,23 5.63,20.95 3.69,17.86C4.11,17.95 4.55,18 5,18C5.8,18 6.56,17.84 7.25,17.56C8.71,19.07 10.74,20 13,20A8,8 0 0,0 21,12A8,8 0 0,0 13,4C10.74,4 8.71,4.93 7.25,6.44C6.56,6.16 5.8,6 5,6Z",g=512;let m;class b extends((0,h.E)(i.WF)){hassSubscribe(){return[(0,s.m)("(prefers-reduced-motion)",t=>{this._reducedMotion!==t&&(this._reducedMotion=t)})]}willUpdate(t){super.willUpdate(t),void 0===this._physicsEnabled&&this.data?.nodes?.length>1&&(this._physicsEnabled=this.data.nodes.length<=g)}render(){if(!m||!this.data.nodes?.length)return i.s6;const t=window.matchMedia("all and (max-width: 450px), all and (max-height: 500px)").matches,e=this._highlightedNodes&&this._highlightedNodes.size>0;return i.qy`<ha-chart-base .hass="${this.hass}" .data="${this._getSeries(this.data,this._physicsEnabled??!1,this._reducedMotion,this._showLabels,t,e)}" .options="${this._createOptions(this.data?.categories)}" height="100%" .extraComponents="${[m]}"> <slot name="search" slot="search"></slot> <slot name="button" slot="button"></slot> <ha-icon-button slot="button" class="${this._physicsEnabled?"active":"inactive"}" .path="${u}" ="${this._togglePhysics}" label="${this.hass.localize("ui.panel.config.common.graph.toggle_physics")}"></ha-icon-button> <ha-icon-button slot="button" class="${this._showLabels?"active":"inactive"}" .path="${p}" ="${this._toggleLabels}" label="${this.hass.localize("ui.panel.config.common.graph.toggle_labels")}"></ha-icon-button> </ha-chart-base>`}updated(t){if(super.updated(t),t.has("searchFilter")){const t=this.searchFilter;if(t){const e=t.toLowerCase(),a=new Set;for(const t of this.data.nodes)this._nodeMatchesFilter(t,e)&&a.add(t.id);this._highlightedNodes=a}else this._highlightedNodes=void 0;this._applyHighlighting(),this._updateMouseoverHandler()}}_nodeMatchesFilter(t,e){if(t.name?.toLowerCase().includes(e))return!0;if(t.context?.toLowerCase().includes(e))return!0;if(t.id?.toLowerCase().includes(e))return!0;if(this.searchableAttributes){const a=this.searchableAttributes(t.id);for(const t of a)if(t?.toLowerCase().includes(e))return!0}return!1}_getPositionedNodes(t,e,a){const o=this.clientWidth,i=this.clientHeight,r=t.map(t=>({...t}));return r.forEach(t=>{a[t.id]&&(t.x=a[t.id].x,t.y=a[t.id].y),0===t.polarDistance&&(null==t.x&&null==t.y&&(t.x=o/2,t.y=i/2),this._positionNodeNeighbors(t,r,e,a))}),r.forEach(t=>{if(t.polarDistance&&null==t.x&&null==t.y){const e=2*Math.random()*Math.PI;t.x=Math.cos(e)*o/2*t.polarDistance+o/2,t.y=Math.sin(e)*i/2*t.polarDistance+i/2,this._nodePositions[t.id]={x:t.x,y:t.y}}}),r}_positionNodeNeighbors(t,e,a,o,i,r=0,n=2*Math.PI){const s=a.map(a=>a.source!==t.id||a.target===i||a.ignoreForceLayout?a.target!==t.id||a.source===i||a.ignoreForceLayout?null:e.find(t=>t.id===a.source):e.find(t=>t.id===a.target)).filter(Boolean);if(!s.length)return;const l=Math.abs(n-r)/s.length,h=[];s.forEach((e,a)=>{if(null==e.x&&null==e.y){const i=r+l*a+l/2;h.push({neighbor:e,angle:i}),o[e.id]?(e.x=o[e.id].x,e.y=o[e.id].y):(e.x=t.x+Math.cos(i)*this.clientWidth/4,e.y=t.y+Math.sin(i)*this.clientHeight/4)}}),h.forEach(({neighbor:i,angle:r})=>{this._positionNodeNeighbors(i,e,a,o,t.id,r-Math.PI/2,r+Math.PI/2)})}_applyHighlighting(){const t=this._baseChart?.chart;if(!t)return;t.dispatchAction({type:"downplay"});const e=this._highlightedNodes;if(!e||0===e.size)return;const a=[];this.data.nodes.forEach((t,o)=>{e.has(t.id)&&a.push(o)}),a.length>0&&t.dispatchAction({type:"highlight",dataIndex:a})}_updateMouseoverHandler(){const t=this._baseChart?.chart;if(t)if(this._highlightedNodes&&this._highlightedNodes.size>0){if(this._emphasisGuardHandler)return;this._emphasisGuardHandler=()=>{this._applyHighlighting()},t.on("mouseover",this._emphasisGuardHandler),t.on("mouseout",this._emphasisGuardHandler)}else{if(!this._emphasisGuardHandler)return;t.off("mouseover",this._emphasisGuardHandler),t.off("mouseout",this._emphasisGuardHandler),this._emphasisGuardHandler=void 0}}disconnectedCallback(){super.disconnectedCallback(),this._emphasisGuardHandler&&(this._baseChart?.chart?.off("mouseover",this._emphasisGuardHandler),this._baseChart?.chart?.off("mouseout",this._emphasisGuardHandler),this._emphasisGuardHandler=void 0)}_togglePhysics(){this._saveNodePositions(),this._physicsEnabled=!this._physicsEnabled}_toggleLabels(){this._showLabels=!this._showLabels}_saveNodePositions(){const t={};this._baseChart?.chart&&this._baseChart.chart.getModel().getSeriesByIndex(0).getGraph().eachNode(e=>{const a=e.getLayout();a&&(t[e.id]={x:a[0],y:a[1]})}),this._nodePositions=t}constructor(){super(),this.searchFilter="",this._reducedMotion=!1,this._showLabels=!0,this._nodePositions={},this._createOptions=(0,n.A)(t=>({tooltip:{trigger:"item",confine:!0,formatter:this.tooltipFormatter},legend:{show:!!t?.length,data:t?.map(t=>({...t,icon:t.symbol})),bottom:8},dataZoom:{type:"inside",filterMode:"none"}}),d.b),this._getSeries=(0,n.A)((t,e,a,o,i,r)=>({id:"network",type:"graph",layout:e?"force":"none",draggable:!0,roam:!0,roamTrigger:"global",selectedMode:"single",label:{show:o,position:"right",formatter:t=>{const e=t.data;return e.context?`{primary|${e.name??""}}\n{secondary|${e.context}}`:e.name??""},rich:{primary:{fontSize:12},secondary:{fontSize:12,color:getComputedStyle(document.body).getPropertyValue("--secondary-text-color"),lineHeight:16}}},emphasis:{focus:r?"self":i?"none":"adjacency"},force:{repulsion:[400,600],edgeLength:[200,350],gravity:.05,layoutAnimation:!a&&t.nodes.length<100},edgeSymbol:["none","arrow"],edgeSymbolSize:10,data:this._getSeriesData(t.nodes,t.links,this._nodePositions),links:t.links.map(t=>({...t,value:t.reverseValue?Math.max(t.value??0,t.reverseValue):t.value,symbolSize:t.reverseValue?1:t.symbolSize})),categories:t.categories||[]}),d.b),this._getSeriesData=(0,n.A)((t,e,a)=>this._getPositionedNodes(t,e,a).map(t=>({id:t.id,name:t.name,context:t.context,category:t.category,value:t.value,symbolSize:t.symbolSize||30,symbol:t.symbol||"circle",itemStyle:t.itemStyle||{},fixed:t.fixed,x:t.x,y:t.y})),d.b),m||Promise.all([a.e(37552),a.e(77072),a.e(53771),a.e(9970),a.e(72701),a.e(40965)]).then(a.bind(a,52164)).then(t=>{m=t,this.requestUpdate()})}}b.styles=i.AH`:host{display:block;position:relative}ha-chart-base{height:100%;--chart-max-height:100%}::slotted(ha-icon-button),ha-icon-button{margin-right:12px}`,(0,o.Cg)([(0,r.MZ)({attribute:!1})],b.prototype,"data",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],b.prototype,"tooltipFormatter",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],b.prototype,"searchableAttributes",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],b.prototype,"searchFilter",void 0),(0,o.Cg)([(0,r.wk)()],b.prototype,"_highlightedNodes",void 0),(0,o.Cg)([(0,r.wk)()],b.prototype,"_reducedMotion",void 0),(0,o.Cg)([(0,r.wk)()],b.prototype,"_physicsEnabled",void 0),(0,o.Cg)([(0,r.wk)()],b.prototype,"_showLabels",void 0),(0,o.Cg)([(0,r.P)("ha-chart-base")],b.prototype,"_baseChart",void 0),b=(0,o.Cg)([(0,r.EM)("ha-network-graph")],b),e()}catch(t){e(t)}})},34296(t,e,a){var o=a(62826),i=a(96229),r=a(26069),n=a(91735),s=a(42034),l=a(5124),h=a(22441);class d extends i.k{renderOutline(){return this.filled?l.qy`<span class="filled"></span>`:super.renderOutline()}getContainerClasses(){return{...super.getContainerClasses(),active:this.active}}renderPrimaryContent(){return l.qy` <span class="leading icon" aria-hidden="true"> ${this.renderLeadingIcon()} </span> <span class="label">${this.label}</span> <span class="touch"></span> <span class="trailing leading icon" aria-hidden="true"> ${this.renderTrailingIcon()} </span> `}renderTrailingIcon(){return l.qy`<slot name="trailing-icon"></slot>`}constructor(...t){super(...t),this.filled=!1,this.active=!1}}d.styles=[n.R,s.R,r.R,l.AH`: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,o.Cg)([(0,h.MZ)({type:Boolean,reflect:!0})],d.prototype,"filled",void 0),(0,o.Cg)([(0,h.MZ)({type:Boolean})],d.prototype,"active",void 0),d=(0,o.Cg)([(0,h.EM)("ha-assist-chip")],d)},34127(t,e,a){a.a(t,async function(t,e){try{var o=a(62826),i=a(52630),r=a(5124),n=a(22441),s=t([i]);i=(s.then?(await s)():s)[0];class l extends i.A{static get styles(){return[i.A.styles,r.AH`: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,o.Cg)([(0,n.MZ)({attribute:"show-delay",type:Number})],l.prototype,"showDelay",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"hide-delay",type:Number})],l.prototype,"hideDelay",void 0),l=(0,o.Cg)([(0,n.EM)("ha-tooltip")],l),e()}catch(t){e(t)}})},36866(t,e,a){a.a(t,async function(t,e){try{var o=a(62826),i=a(5124),r=a(22441),n=a(91485),s=t([n]);n=(s.then?(await s)():s)[0];const l="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 h extends n.U{willUpdate(t){super.willUpdate(t),this.label||this.placeholder||this.hasUpdated&&!t.has("_i18n")||(this.placeholder=this.i18n?.localize?.("ui.common.search")||"Search")}renderStartDefault(){return i.qy`<ha-svg-icon slot="start" .path="${l}"></ha-svg-icon>`}constructor(){super(),this.withClear=!0,this.autocomplete=this.autocomplete||"off"}}h.styles=[...n.U.styles,i.AH`:host([appearance=outlined]) wa-input.no-label::part(base){height:40px}`],h=(0,o.Cg)([(0,r.EM)("ha-input-search")],h),e()}catch(t){e(t)}})},91485(t,e,a){a.a(t,async function(t,o){try{a.d(e,{U:()=>_});var i=a(62826),r=(a(86137),a(30006)),n=a(92070),s=a(35211),l=a(5124),h=a(22441),d=a(6412),c=a(63672),p=a(57237),u=a(22792),g=a(26300),m=(a(67094),a(34127)),b=a(53305),f=t([r,g,m]);[r,g,m]=f.then?(await f)():f;const y="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",v="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z",w="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z";class _ extends((0,b.w)(l.WF)){get _formControl(){return this._input}showPicker(){this._input?.showPicker()}stepUp(){this._input?.stepUp()}stepDown(){this._input?.stepDown()}async firstUpdated(t){super.firstUpdated(t),this.insetLabel||(await(this._input?.updateComplete),this._syncStartSlotWidth())}render(){const t=!this.label&&this._hasSlotController.test("label"),e=!this.hint&&this._hasSlotController.test("hint"),a=this._hasSlotController.test("start");return l.qy` <wa-input .type="${this.type}" .value="${this.value??null}" .withClear="${this.withClear}" .placeholder="${this.placeholder}" .readonly="${this.readonly}" .passwordToggle="${this.passwordToggle}" .passwordVisible="${this.passwordVisible}" .withoutSpinButtons="${this.withoutSpinButtons}" .required="${this.required}" .pattern="${this.pattern}" .minlength="${this.minlength}" .maxlength="${this.maxlength}" .min="${this.min}" .max="${this.max}" .step="${this.step}" .autocapitalize="${this.autocapitalize||void 0}" .autocorrect="${this.autocorrect?"on":"off"}" .autocomplete="${this.autocomplete}" .autofocus="${this.autofocus}" .enterkeyhint="${this.enterkeyhint||void 0}" .spellcheck="${this.spellcheck}" .inputmode="${this.inputmode||void 0}" .name="${this.name}" .disabled="${this.disabled}" class="${(0,d.H)({input:!0,invalid:this.invalid||this._invalid,"label-raised":void 0!==this.value&&""!==this.value||this.label&&this.placeholder||a&&this.insetLabel,"no-label":!this.label,"hint-hidden":!(this.hint||e||this.required||this._invalid||this.invalid)})}" ="${this._handleInput}" ="${this._handleChange}" ="${this._handleBlur}" -invalid="${this._handleInvalid}" exportparts="base:wa-base, hint:wa-hint, input:wa-input"> ${this.label||t?l.qy`<slot name="label" slot="label">${this.label?this._renderLabel(this.label,this.required):l.s6}</slot>`:l.s6} <slot name="start" slot="start" ="${this._syncStartSlotWidth}"> ${this.renderStartDefault()} </slot> <slot name="end" slot="end"> ${this.renderEndDefault()} </slot> <slot name="clear-button" slot="clear-button"> <ha-icon-button ="${this._handleClearClick}" .label="${this.i18n?.localize?.("ui.components.input.clear")||"Clear"}" .path="${y}"></ha-icon-button> </slot> <slot name="password-toggle-button" slot="password-toggle-button"> <ha-icon-button ="${p.d}" ="${this._handlePasswordToggle}" .label="${this.i18n?.localize?.("ui.components.input."+(this.passwordVisible?"hide_password":"show_password"))||(this.passwordVisible?"Hide password":"Show password")}" .path="${this.passwordVisible?w:v}"></ha-icon-button> </slot> <div slot="hint" class="${(0,d.H)({error:this.invalid||this._invalid})}" role="${(0,c.J)(this.invalid||this._invalid?"alert":void 0)}" aria-live="polite"> ${this._invalid||this.invalid?this.validationMessage||this._input?.validationMessage:this.hint||(e?l.qy`<slot name="hint"></slot>`:l.s6)} </div> </wa-input> `}renderStartDefault(){return l.s6}renderEndDefault(){return l.s6}_handleClearClick(){this._input?.clear()}_handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}constructor(...t){super(...t),this.appearance="material",this.type="text",this.withClear=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.withoutSpinButtons=!1,this.autocorrect=!1,this.insetLabel=!1,this._hasSlotController=new n.X(this,"label","hint","input","start"),this._syncStartSlotWidth=()=>{const t=this._input?.shadowRoot?.querySelector('[part~="start"]'),e=t?.offsetWidth??0;e>0&&!this.insetLabel?(this.style.setProperty("--start-slot-width",`calc(${e}px + var(--ha-space-1))`),this.style.setProperty("--input-padding-inline-start","var(--ha-space-1)")):(this.style.removeProperty("--start-slot-width"),this.style.removeProperty("--input-padding-inline-start"))}}}_.styles=[b.N,l.AH`:host{display:flex;align-items:flex-start;padding-top:var(--ha-input-padding-top);padding-bottom:var(--ha-input-padding-bottom,var(--ha-space-2));text-align:var(--ha-input-text-align,start)}:host([appearance=outlined]){padding-bottom:var(--ha-input-padding-bottom)}wa-input::part(label){padding-inline-start:calc(var(--start-slot-width,0px) + var(--ha-space-4));padding-inline-end:var(--ha-space-4);padding-top:var(--ha-space-5)}:host([appearance=material]:focus-within) wa-input::part(label){color:var(--primary-color)}:host(:focus-within) wa-input::part(label),:host([type=date]) wa-input::part(label),wa-input.label-raised::part(label){padding-top:var(--ha-space-3);font-size:var(--ha-font-size-xs)}wa-input::part(base){height:56px;padding:0 var(--ha-space-4)}:host([appearance=outlined]) wa-input.no-label::part(base){height:32px;padding:0 var(--ha-space-2)}:host([appearance=outlined]) wa-input::part(base){border:1px solid var(--ha-color-border-neutral-quiet);background-color:var(--card-background-color);border-radius:var(--ha-border-radius-md);transition:border-color var(--wa-transition-normal) ease-in-out}:host([appearance=material]) ::part(base)::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background-color:var(--ha-color-border-neutral-loud);transition:height var(--wa-transition-normal) ease-in-out,background-color var(--wa-transition-normal) ease-in-out}:host([appearance=material]:focus-within) wa-input::part(base)::after{height:2px;background-color:var(--primary-color)}:host([appearance=material]) wa-input.invalid:not([disabled])::part(base)::after,:host([appearance=material]:focus-within) wa-input.invalid::part(base)::after{background-color:var(--ha-color-border-danger-normal)}wa-input::part(input){padding-top:var(--ha-space-3);padding-inline-start:var(--input-padding-inline-start,0)}wa-input.no-label::part(input){padding-top:0}:host([type=color]) wa-input::part(input){padding-top:var(--ha-space-6);padding-bottom:2px;cursor:pointer}:host([type=color]) wa-input.no-label::part(input){padding:var(--ha-space-2)}:host([type=color]) wa-input.no-label::part(base){padding:0}wa-input::part(input)::placeholder{color:var(--ha-color-neutral-60)}wa-input::part(base):hover{background-color:var(--ha-color-form-background-hover)}:host([appearance=outlined]) wa-input::part(base):hover{border-color:var(--ha-color-border-neutral-normal)}:host([appearance=outlined]:focus-within) wa-input::part(base){border-color:var(--primary-color)}wa-input:disabled::part(base){background-color:var(--ha-color-form-background-disabled)}wa-input:disabled::part(label){opacity:.5}wa-input::part(end){color:var(--ha-color-text-secondary)}ha-icon-button{display:flex;align-items:center;color:var(--ha-color-text-secondary)}:host([appearance=outlined]) wa-input.no-label{--ha-icon-button-size:24px;--mdc-icon-size:18px}`],(0,i.Cg)([(0,h.MZ)({reflect:!0})],_.prototype,"appearance",void 0),(0,i.Cg)([(0,h.MZ)({reflect:!0})],_.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"with-clear"})],_.prototype,"withClear",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"password-toggle"})],_.prototype,"passwordToggle",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"password-visible"})],_.prototype,"passwordVisible",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"without-spin-buttons"})],_.prototype,"withoutSpinButtons",void 0),(0,i.Cg)([(0,h.MZ)()],_.prototype,"pattern",void 0),(0,i.Cg)([(0,h.MZ)()],_.prototype,"min",void 0),(0,i.Cg)([(0,h.MZ)()],_.prototype,"max",void 0),(0,i.Cg)([(0,h.MZ)()],_.prototype,"step",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean})],_.prototype,"autocorrect",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,attribute:"inset-label"})],_.prototype,"insetLabel",void 0),(0,i.Cg)([(0,h.P)("wa-input")],_.prototype,"_input",void 0),(0,i.Cg)([(0,h.wk)(),(0,s.Fg)({context:u.D5,subscribe:!0})],_.prototype,"i18n",void 0),_=(0,i.Cg)([(0,h.EM)("ha-input")],_),o()}catch(t){o(t)}})},53305(t,e,a){a.d(e,{w:()=>l,N:()=>h});var o=a(62826),i=a(5124),r=a(22441),n=a(22786);a(74423);const s=Boolean(globalThis.ElementInternals)&&globalThis.HTMLElement?.prototype.attachInternals?.toString().includes("[native code]"),l=t=>{class e extends t{get _formControl(){throw new Error("_formControl getter must be implemented by subclass")}select(){this._formControl?.select()}setSelectionRange(t,e,a){this._formControl?.setSelectionRange(t,e,a)}setRangeText(t,e,a,o){this._formControl?.setRangeText(t,e,a,o)}checkValidity(){return!s||(this._formControl?.checkValidity()??!0)}reportValidity(){const t=this.checkValidity();return this._invalid=!t,t}_handleInput(){this.value=this._formControl?.value??void 0,this._invalid&&this._formControl?.checkValidity()&&(this._invalid=!1)}_handleChange(){this.value=this._formControl?.value??void 0}_handleBlur(){this.autoValidate&&(this._invalid=!this._formControl?.checkValidity())}_handleInvalid(){this._invalid=!0}constructor(...t){super(...t),this.label="",this.hint="",this.placeholder="",this.readonly=!1,this.required=!1,this.autocapitalize="",this.autofocus=!1,this.spellcheck=!0,this.inputmode="",this.enterkeyhint="",this.disabled=!1,this.validationMessage="",this.autoValidate=!1,this.invalid=!1,this._invalid=!1,this._requiredMarkerCSSVar="--ha-input-required-marker",this._renderLabel=(0,n.A)((t,e)=>{if(!e)return t;let a=getComputedStyle(this).getPropertyValue(this._requiredMarkerCSSVar);return a||(a="*"),a.startsWith('"')&&a.endsWith('"')&&(a=a.slice(1,-1)),a?`${t}${a}`:t})}}return e.shadowRootOptions={mode:"open",delegatesFocus:!0},(0,o.Cg)([(0,r.MZ)()],e.prototype,"value",void 0),(0,o.Cg)([(0,r.MZ)()],e.prototype,"label",void 0),(0,o.Cg)([(0,r.MZ)()],e.prototype,"hint",void 0),(0,o.Cg)([(0,r.MZ)()],e.prototype,"placeholder",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],e.prototype,"readonly",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],e.prototype,"required",void 0),(0,o.Cg)([(0,r.MZ)({type:Number})],e.prototype,"minlength",void 0),(0,o.Cg)([(0,r.MZ)({type:Number})],e.prototype,"maxlength",void 0),(0,o.Cg)([(0,r.MZ)()],e.prototype,"autocapitalize",void 0),(0,o.Cg)([(0,r.MZ)()],e.prototype,"autocomplete",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],e.prototype,"autofocus",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],e.prototype,"spellcheck",void 0),(0,o.Cg)([(0,r.MZ)()],e.prototype,"inputmode",void 0),(0,o.Cg)([(0,r.MZ)()],e.prototype,"enterkeyhint",void 0),(0,o.Cg)([(0,r.MZ)()],e.prototype,"name",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],e.prototype,"disabled",void 0),(0,o.Cg)([(0,r.MZ)({attribute:"validation-message"})],e.prototype,"validationMessage",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,attribute:"auto-validate"})],e.prototype,"autoValidate",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],e.prototype,"invalid",void 0),(0,o.Cg)([(0,r.wk)()],e.prototype,"_invalid",void 0),e},h=i.AH`.input{flex:1;min-width:0;--wa-transition-fast:var(--wa-transition-normal);position:relative}.input::part(label){position:absolute;top:0;font-weight:var(--ha-font-weight-normal);font-family:var(--ha-font-family-body);transition:all var(--wa-transition-normal) ease-in-out;color:var(--secondary-text-color);line-height:var(--ha-line-height-condensed);z-index:1;pointer-events:none;font-size:var(--ha-font-size-m)}.input.invalid:not([disabled])::part(label),:host(:focus-within) .input.invalid::part(label){color:var(--ha-color-fill-danger-loud-resting)}.input::part(base){background-color:var(--ha-color-form-background);border-top-left-radius:var(--ha-border-radius-sm);border-top-right-radius:var(--ha-border-radius-sm);border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square);border:none;position:relative;transition:background-color var(--wa-transition-normal) ease-in-out}:host(:focus-within) .input::part(base){outline:0}.input::part(hint){min-height:var(--ha-space-5);margin-block-start:0;margin-inline-start:var(--ha-space-3);font-size:var(--ha-font-size-s);display:flex;align-items:center;color:var(--ha-color-text-secondary)}.input.hint-hidden::part(hint){height:0;min-height:0}.error{color:var(--ha-color-on-danger-quiet)}`},81310(t,e,a){a.a(t,async function(t,e){try{var o=a(62826),i=a(5124),r=a(22441),n=a(6412),s=a(26218),l=a(91926),h=a(90248),d=a(2054),c=a(14503),p=t([h,d]);[h,d]=p.then?(await p)():p;class u extends i.WF{render(){return i.qy` <div class="toolbar ${(0,n.H)({narrow:this.narrow})}"> <div class="toolbar-content"> ${this.mainPage||history.state?.root?i.qy` <ha-menu-button .hass="${this.hass}" .narrow="${this.narrow}"></ha-menu-button> `:this.backPath?i.qy` <ha-icon-button-arrow-prev href="${this.backPath}" .hass="${this.hass}"></ha-icon-button-arrow-prev> `:i.qy` <ha-icon-button-arrow-prev .hass="${this.hass}" ="${this._backTapped}"></ha-icon-button-arrow-prev> `} <div class="main-title"> <slot name="header">${this.header}</slot> </div> <slot name="toolbar-icon"></slot> </div> </div> <div class="${(0,n.H)({content:!0,"ha-scrollbar":this.scrollable,"not-scrollable":!this.scrollable})}" ="${this._saveScrollPos}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `}_saveScrollPos(t){this._savedScrollPos=t.target.scrollTop}_backTapped(){this.backCallback?this.backCallback():(0,l.OE)()}static get styles(){return[c.dp,i.AH`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{background-color:var(--app-header-background-color);padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right)}:host([narrow]) .toolbar{padding-left:var(--safe-area-inset-left)}.toolbar-content{display:flex;align-items:center;font-size:var(--ha-font-size-xl);height:var(--header-height);font-weight:var(--ha-font-weight-normal);color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box;padding:8px 12px}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{display:flex;align-items:center;pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin-inline-start:var(--ha-space-6);line-height:var(--ha-line-height-normal);min-width:0;flex-grow:1;overflow-wrap:break-word;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.narrow .main-title{margin-inline-start:var(--ha-space-2)}.content{position:relative;width:calc(100% - var(--safe-area-inset-right,0px));height:calc(100% - 1px - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px));padding-bottom:var(--safe-area-inset-bottom,0px);margin-right:var(--safe-area-inset-right);overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}.content.not-scrollable{overflow:hidden;display:flex;flex-direction:column}:host([narrow]) .content{width:calc(100% - var(--safe-area-inset-left,0px) - var(--safe-area-inset-right,0px));margin-left:var(--safe-area-inset-left)}#fab{position:absolute;right:calc(16px + var(--safe-area-inset-right,0px));inset-inline-end:calc(16px + var(--safe-area-inset-right,0px));inset-inline-start:initial;bottom:calc(16px + var(--safe-area-inset-bottom,0px));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--ha-space-2);--ha-button-box-shadow:var(--ha-box-shadow-l)}:host([narrow]) #fab.tabs{bottom:calc(84px + var(--safe-area-inset-bottom,0px))}#fab[is-wide]{bottom:calc(24px + var(--safe-area-inset-bottom,0px));right:calc(24px + var(--safe-area-inset-right,0px));inset-inline-end:calc(24px + var(--safe-area-inset-right,0px));inset-inline-start:initial}`]}constructor(...t){super(...t),this.mainPage=!1,this.narrow=!1,this.scrollable=!0}}(0,o.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)()],u.prototype,"header",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,attribute:"main-page"})],u.prototype,"mainPage",void 0),(0,o.Cg)([(0,r.MZ)({type:String,attribute:"back-path"})],u.prototype,"backPath",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"backCallback",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],u.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],u.prototype,"scrollable",void 0),(0,o.Cg)([(0,s.a)(".content")],u.prototype,"_savedScrollPos",void 0),(0,o.Cg)([(0,r.Ls)({passive:!0})],u.prototype,"_saveScrollPos",null),u=(0,o.Cg)([(0,r.EM)("hass-subpage")],u),e()}catch(t){e(t)}})},54706(t,e,a){a.d(e,{E:()=>r});a(74423),a(18111),a(13579);var o=a(62826),i=a(22441);const r=t=>{class e extends t{connectedCallback(){super.connectedCallback(),this._checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const t=this.__unsubs.pop();t instanceof Promise?t.then(t=>t()):t()}this.__unsubs=void 0}}updated(t){if(super.updated(t),t.has("hass"))this._checkSubscribed();else if(this.hassSubscribeRequiredHostProps)for(const e of t.keys())if(this.hassSubscribeRequiredHostProps.includes(e))return void this._checkSubscribed()}hassSubscribe(){return[]}_checkSubscribed(){void 0===this.__unsubs&&this.isConnected&&void 0!==this.hass&&!this.hassSubscribeRequiredHostProps?.some(t=>void 0===this[t])&&(this.__unsubs=this.hassSubscribe())}}return(0,o.Cg)([(0,i.MZ)({attribute:!1})],e.prototype,"hass",void 0),e}},89429(t){t.exports=function(){}}};