UNPKG

iobroker.lovelace

Version:

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

30 lines 21.3 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[41592],{95747:function(t,e,a){a.a(t,async function(t,n){try{a.d(e,{CL:function(){return p},GH:function(){return _},ZS:function(){return g},aQ:function(){return m},r6:function(){return h},yg:function(){return y}});var i=a(74487),o=a(22786),r=a(72487),s=a(30162),l=a(8480),c=a(69543),u=t([i,l,r,s]);[i,l,r,s]=u.then?(await u)():u;const h=(t,e,a)=>d(e,a.time_zone).format(t),d=(0,o.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),m=((0,o.A)(()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),(t,e,a)=>f(e,a.time_zone).format(t)),f=(0,o.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"short",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),g=(t,e,a)=>v(e,a.time_zone).format(t),v=(0,o.A)((t,e)=>new Intl.DateTimeFormat(t.language,{month:"short",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),p=(t,e,a)=>(new Date).getFullYear()===t.getFullYear()?g(t,e,a):m(t,e,a),y=(t,e,a)=>b(e,a.time_zone).format(t),b=(0,o.A)((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",hour:(0,c.J)(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,c.J)(t)?"h12":"h23",timeZone:(0,l.wj)(t.time_zone,e)})),_=(t,e,a)=>`${(0,r.zB)(t,e,a)}, ${(0,s.fU)(t,e,a)}`;n()}catch(h){n(h)}})},8480:function(t,e,a){a.a(t,async function(t,n){try{a.d(e,{wj:function(){return f}});var i,o,r,s=a(74487),l=a(29079),c=a(46927),u=t([s]);s=(u.then?(await u)():u)[0];const h=null===(i=Intl.DateTimeFormat)||void 0===i||null===(o=(r=i.call(Intl)).resolvedOptions)||void 0===o?void 0:o.call(r).timeZone,d=h&&("UTC"===h||"Etc/UTC"===h||h in l)?h:void 0,m=null!=d?d:"UTC",f=(t,e)=>t===c.Wj.local&&d?m:e;n()}catch(h){n(h)}})},12575:function(t,e,a){a.a(t,async function(t,n){try{a.d(e,{J:function(){return v},computeStateDisplay:function(){return g},computeStateToParts:function(){return y}});a(74423),a(44114),a(18111),a(61701),a(62953);var i=a(22675),o=a(46927),r=a(72487),s=a(95747),l=a(82591),c=a(30162),u=a(20058),h=a(8549),d=a(71727),m=a(64808),f=t([l,u,r,c,s]);[l,u,r,c,s]=f.then?(await f)():f;const g=(t,e,a,n,i,o,r)=>{const s=null==o?void 0:o[e.entity_id];return v(t,a,n,i,s,e.entity_id,e.attributes,void 0!==r?r:e.state)},v=(t,e,a,n,i,o,r,s)=>p(t,e,a,n,i,o,r,s).map(t=>t.value).join(""),p=(t,e,a,n,f,g,v,p)=>{if(p===i.HV||p===i.Hh)return[{type:"value",value:t(`state.default.${p}`)}];const y=(0,d.m)(g),b="counter"===y||"number"===y||"input_number"===y;if((0,u.ty)(v,"sensor"===y?a:[])||b){if("duration"===v.device_class&&v.unit_of_measurement&&l.Z8.includes(v.unit_of_measurement))try{return[{type:"value",value:(0,l.a3)(e,p,v.unit_of_measurement,null==f?void 0:f.display_precision)}]}catch(_){}if("monetary"===v.device_class){let t=[];try{t=(0,u.QL)(p,e,Object.assign({style:"currency",currency:v.unit_of_measurement,minimumFractionDigits:2},(0,u.ZQ)({state:p,attributes:v},f)))}catch(_){}if(t.length){const e={integer:"value",group:"value",decimal:"value",fraction:"value",minusSign:"value",plusSign:"value",literal:"literal",currency:"unit"},a=[];for(const n of t){const t=e[n.type];if(!t)continue;const i=a[a.length-1];"value"===t&&"value"===(null==i?void 0:i.type)?i.value+=n.value:a.push({type:t,value:n.value})}return a}}const a=(0,u.ZV)(p,e,(0,u.ZQ)({state:p,attributes:v},f)),n=(null==f?void 0:f.translation_key)&&t(`component.${f.platform}.entity.${y}.${f.translation_key}.unit_of_measurement`)||v.unit_of_measurement;return n?[{type:"value",value:a},{type:"literal",value:(0,h.A)(n,e)},{type:"unit",value:n}]:[{type:"value",value:a}]}if(["date","input_datetime","time"].includes(y))try{const t=p.split(" ");if(2===t.length)return[{type:"value",value:(0,s.r6)(new Date(t.join("T")),Object.assign(Object.assign({},e),{},{time_zone:o.Wj.local}),n)}];if(1===t.length){if(p.includes("-"))return[{type:"value",value:(0,r.Yq)(new Date(`${p}T00:00`),Object.assign(Object.assign({},e),{},{time_zone:o.Wj.local}),n)}];if(p.includes(":")){const t=new Date;return[{type:"value",value:(0,c.fU)(new Date(`${t.toISOString().split("T")[0]}T${p}`),Object.assign(Object.assign({},e),{},{time_zone:o.Wj.local}),n)}]}}return[{type:"value",value:p}]}catch(w){return[{type:"value",value:p}]}if(["ai_task","button","conversation","event","image","infrared","input_button","notify","radio_frequency","scene","stt","tag","tts","wake_word","datetime"].includes(y)||"sensor"===y&&m.G6.includes(v.device_class))try{return[{type:"value",value:(0,s.r6)(new Date(p),e,n)}]}catch(_){return[{type:"value",value:p}]}return[{type:"value",value:(null==f?void 0:f.translation_key)&&t(`component.${f.platform}.entity.${y}.${f.translation_key}.state.${p}`)||v.device_class&&t(`component.${y}.entity_component.${v.device_class}.state.${p}`)||t(`component.${y}.entity_component._.state.${p}`)||p}]},y=(t,e,a,n,i,o,r)=>{const s=null==o?void 0:o[e.entity_id];return p(t,a,n,i,s,e.entity_id,e.attributes,void 0!==r?r:e.state)};n()}catch(g){n(g)}})},52943:function(t,e,a){a.d(e,{Z:function(){return n}});const n=t=>t.charAt(0).toUpperCase()+t.slice(1)},70947:function(t,e,a){a(62953);var n=a(40445),i=a(50759),o=(a(38625),a(5124)),r=a(67576);a(67094);let s,l,c=t=>t;class u extends i.A{renderCheckboxIcon(){return(0,o.qy)(s||(s=c` <ha-svg-icon id="check" part="checkmark" .path="${0}"></ha-svg-icon> `),this.checked?"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z":"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z")}static get styles(){return[i.A.styles,(0,o.AH)(l||(l=c`:host{min-height:var(--ha-space-10)}#check{visibility:visible;flex-shrink:0}#icon ::slotted(*){color:var(--ha-color-on-neutral-normal)}:host([variant=danger]) #icon ::slotted(*){color:var(--ha-color-on-danger-quiet)}:host([selected]){font-weight:var(--ha-font-weight-medium);color:var(--primary-color);background-color:var(--ha-color-fill-primary-quiet-resting);--icon-primary-color:var(--primary-color)}:host([selected]:hover){background-color:var(--ha-color-fill-primary-quiet-hover)}`))]}constructor(...t){super(...t),this.selected=!1}}(0,n.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],u.prototype,"selected",void 0),u=(0,n.Cg)([(0,r.EM)("ha-dropdown-item")],u)},29823:function(t,e,a){a.a(t,async function(t,e){try{a(3362),a(62953);var n=a(40445),i=a(52254),o=a(5124),r=a(67576),s=t([i]);i=(s.then?(await s)():s)[0];let l,c=t=>t;class u extends i.A{get anchorElement(){var t;return null===(t=this.popup)||void 0===t?void 0:t.anchor}set anchorElement(t){this.popup&&(this.popup.anchor&&"ha-icon-button"===this.popup.anchor.localName&&(this.popup.anchor.selected=!1),this.popup.anchor=t)}getTrigger(){return this.anchorElement?this.anchorElement:super.getTrigger()}async showMenu(){await super.showMenu();const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!0)}async hideMenu(){const t=this.getTrigger();t&&"ha-icon-button"===t.localName&&(t.selected=!1),await super.hideMenu()}static get styles(){return[i.A.styles,(0,o.AH)(l||(l=c`:host{font-size:var(--ha-dropdown-font-size, var(--ha-font-size-m));--wa-color-surface-raised:var( --card-background-color, var(--ha-dialog-surface-background, var(--mdc-theme-surface, #fff)), )}#menu{padding:var(--ha-space-1)}wa-popup::part(popup){z-index:200}`))]}constructor(...t){super(...t),this.dropdownTag="ha-dropdown",this.dropdownItemTag="ha-dropdown-item"}}(0,n.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"dropdownTag",void 0),(0,n.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"dropdownItemTag",void 0),u=(0,n.Cg)([(0,r.EM)("ha-dropdown")],u),e()}catch(l){e(l)}})},54276:function(t,e,a){a(62953);var n=a(40445),i=a(76482),o=a(91382),r=a(96245),s=a(5124),l=a(67576);let c;class u extends o.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 i.i(this,this._onTouchControlChange.bind(this)),this._handleTouchEnd=()=>{this.disabled||super.endPressAnimation()}}}u.styles=[r.R,(0,s.AH)(c||(c=(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)) )}`))],u=(0,n.Cg)([(0,l.EM)("ha-ripple")],u)},25064:function(t,e,a){a.a(t,async function(t,n){try{a.d(e,{Fp:function(){return H},IQ:function(){return f},Jo:function(){return d},Lj:function(){return z},Mm:function(){return T},_1:function(){return j},tG:function(){return C}});a(74423),a(44114),a(26910),a(13609),a(18111),a(22489),a(20116),a(7588),a(61701),a(13579),a(3362),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(62953);var i=a(71727),o=a(12575),r=a(28978),s=t([o]);o=(s.then?(await s)():s)[0];const l=["climate","humidifier","water_heater"],c=["climate","humidifier","input_datetime","water_heater","person","device_tracker"],u=["temperature","current_temperature","target_temp_low","target_temp_high","hvac_action","humidity","mode","action","current_humidity"],h=(t,e)=>!t.states[e]||c.includes((0,i.m)(e)),d=(t,e,a,n,i)=>g(t,e,()=>({type:"history/stream",entity_ids:i,start_time:a.toISOString(),end_time:n.toISOString(),minimal_response:!0,no_attributes:!i.some(e=>h(t,e))}));class m{processMessage(t){if(!this.combinedHistory||!Object.keys(this.combinedHistory).length)return this.combinedHistory=t.states,this.combinedHistory;if(!Object.keys(t.states).length)return this.combinedHistory;const e=this.hoursToShow?((new Date).getTime()-3600*this.hoursToShow*1e3)/1e3:void 0,a={};for(const n of Object.keys(this.combinedHistory))a[n]=[];for(const n of Object.keys(t.states))a[n]=[];for(const n of Object.keys(a)){if(n in this.combinedHistory&&n in t.states){const e=this.combinedHistory[n],i=e[e.length-1];a[n]=e.concat(t.states[n]),t.states[n][0].lu<i.lu&&(a[n]=a[n].sort((t,e)=>t.lu-e.lu))}else n in this.combinedHistory?a[n]=this.combinedHistory[n]:a[n]=t.states[n];if(e&&n in this.combinedHistory){const t=a[n].filter(t=>t.lu<e);if(!t.length)continue;if(a[n]=a[n].filter(t=>t.lu>=e),a[n].length&&a[n][0].lu===e)continue;const i=t[t.length-1];i.lu=e,delete i.lc,a[n].unshift(i)}}return this.combinedHistory=a,this.combinedHistory}constructor(t,e){this.hass=t,this.hoursToShow=e,this.combinedHistory={}}}const f=(t,e,a,n,i,o=!0,r=!0)=>g(t,e,()=>({type:"history/stream",entity_ids:n,start_time:new Date((new Date).getTime()-3600*a*1e3).toISOString(),minimal_response:o,significant_changes_only:r,no_attributes:null!=i?i:!n.some(e=>h(t,e))}),a),g=async(t,e,a,n)=>{let i,o=!1;const r=async()=>{const r=new m(t,n),s=await t.connection.subscribeMessage(t=>e(r.processMessage(t)),a(),{resubscribe:!1});o?s().catch(()=>{}):i=s},s=()=>{o||(i=void 0,r().catch(()=>{}))};return await r(),t.connection.addEventListener("ready",s),async()=>{o=!0,t.connection.removeEventListener("ready",s),i&&await i()}},v=(t,e)=>t.state===e.state&&(!t.attributes||!e.attributes||u.every(a=>t.attributes[a]===e.attributes[a])),p=(t,e,a,n,i,s,l)=>{const c=[],u=s[0];for(const r of s){if(c.length>0&&r.s===c[c.length-1].state)continue;const s={};null!=l&&l.attributes.device_class&&(s.device_class=null==l?void 0:l.attributes.device_class),c.push({state_localize:(0,o.J)(t,e,[],a,n[i],i,Object.assign(Object.assign({},r.a||u.a),s),r.s),state:r.s,last_changed:1e3*(r.lc?r.lc:r.lu)})}return{name:(0,r._)(i,(null==l?void 0:l.attributes)||u.a),entity_id:i,data:c}},y=(t,e,a,n)=>{const o=[];return Object.keys(a).forEach(t=>{const e=a[t],s=e[0],c=(0,i.m)(t),h=[];for(const a of e){let t;if(l.includes(c)){t={state:a.s,last_changed:1e3*a.lu,attributes:{}};for(const e of u)e in a.a&&(t.attributes[e]=a.a[e])}else t={state:a.s,last_changed:1e3*(a.lc?a.lc:a.lu),attributes:{}};h.length>1&&v(t,h[h.length-1])&&v(t,h[h.length-2])||h.push(t)}const d=t in n?n[t].attributes:"friendly_name"in s.a?s.a:void 0;o.push({domain:c,name:(0,r._)(t,d||{}),entity_id:t,states:h})}),{unit:t,device_class:e,identifier:Object.keys(a).join(""),data:o}},b=["counter","input_number","number"],_=t=>b.includes(t),w=t=>"unit_of_measurement"in t||"state_class"in t,x=(t,e)=>null!=t.attributes.device_class&&e.includes(t.attributes.device_class),k=" ",j=(t,e,a,n,i=!1)=>{const o={};a.forEach(t=>{t in e&&(o[t]=e[t])});const r={};Object.entries(o).forEach(([t,e])=>{const a=e.map(t=>({s:null!=t.mean?t.mean.toString():t.state.toString(),lc:t.end/1e3,a:{},lu:t.end/1e3}));r[t]=a});const s=T(t,r,[],t.localize,n,i,!0);return((null==s?void 0:s.line)||[]).forEach(t=>{t.data.forEach(t=>{t.statistics=t.states,t.states=[]})}),s},z=t=>[{s:t.state,a:t.attributes,lu:new Date(t.last_updated).getTime()/1e3}],T=(t,e,a,n,o,r=!1,s=!1)=>{const l={},c=[],u={};if(new Set([...a,...Object.keys(e)]).forEach(a=>{a in e?u[a]=e[a]:t.states[a]&&(u[a]=z(t.states[a]))}),!u)return{line:[],timeline:[]};Object.keys(u).forEach(e=>{var a;const h=u[e];if(0===h.length)return;const d=(0,i.m)(e),m=e in t.states?t.states[e]:void 0,f=m||_(d)?void 0:h.find(t=>t.a&&w(t.a));let g;g=H(d,m,f,o,s)?(null==m?void 0:m.attributes.unit_of_measurement)||(null==f?void 0:f.a.unit_of_measurement)||k:{zone:n("ui.dialogs.more_info_control.zone.graph_unit"),climate:t.config.unit_system.temperature,humidifier:"%",water_heater:t.config.unit_system.temperature}[d];const v={climate:"temperature",humidifier:"humidity",water_heater:"temperature"}[d]||(null===(a=(null==m?void 0:m.attributes)||(null==f?void 0:f.a))||void 0===a?void 0:a.device_class),y=O(g,v,r);g?y&&y in l&&e in l[y]?l[y][e].push(...h):y&&(y in l||(l[y]={}),l[y][e]=h):c.push(p(n,t.locale,t.config,t.entities,e,h,m))});return{line:Object.keys(l).map(e=>{const a=e.split("_"),n=a[0],i=a.slice(1).join("_")||void 0;return y(n,i,l[e],t.states)}),timeline:c}},O=(t,e,a)=>a?`${t}_${e||""}`:t,H=(t,e,a,n,i=!1)=>i||_(t)||null!=e&&w(e.attributes)||null!=e&&"sensor"===t&&x(e,n)||null!=a,C=(t,e,a=!0)=>{if(!e)return t;const n=Object.assign(Object.assign({},t),{},{line:[]}),i={};for(const l of t.line){const t=O(l.unit,l.device_class,a);t&&(i[t]={historyItem:l})}for(const l of e.line){var o,r;if(l.unit===k)l.unit=null!==(o=null===(r=t.line.find(t=>t.identifier===l.identifier))||void 0===r?void 0:r.unit)&&void 0!==o?o:k;const e=O(l.unit,l.device_class,a);e&&(e in i?i[e].ltsItem=l:i[e]={ltsItem:l})}for(const{historyItem:l,ltsItem:c}of Object.values(i)){if(!l||!c){n.line.push(l||c);continue}const t=Object.assign(Object.assign({},l),{},{data:[]}),e=new Set([...l.data.map(t=>t.entity_id),...c.data.map(t=>t.entity_id)]);for(const a of e){var s;const e=l.data.find(t=>t.entity_id===a),n=c.data.find(t=>t.entity_id===a);if(!e||!n){t.data.push(e||n);continue}const i=(null===(s=e.states[0])||void 0===s?void 0:s.last_changed)||n.statistics[n.statistics.length-1].last_changed+1,o=[];for(const t of n.statistics){if(t.last_changed>=i)break;o.push(t)}t.data.push(0===o.length?e:Object.assign(Object.assign({},e),{},{statistics:o}))}n.line.push(t)}return n};n()}catch(l){n(l)}})},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(n){e(n)}},1)},14503:function(t,e,a){a.d(e,{RF:function(){return d},dp:function(){return g},kO:function(){return f},nA:function(){return m},og:function(){return h}});var n=a(5124);let i,o,r,s,l,c,u=t=>t;const h=(0,n.AH)(i||(i=u`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),d=(0,n.AH)(o||(o=u`: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),m=(0,n.AH)(r||(r=u`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)}`)),f=(0,n.AH)(s||(s=u`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}}`)),g=(0,n.AH)(l||(l=u`.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,n.AH)(c||(c=u`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))}}]);