UNPKG

iobroker.lovelace

Version:

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

15 lines 54.2 kB
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["10770"],{31146:function(e,t,o){o.d(t,{i:()=>a});const i=(0,o(93826).P)((e=>{history.replaceState({scrollPosition:e},"")}),300),a=e=>t=>({kind:"method",placement:"prototype",key:t.key,descriptor:{set(e){i(e),this[`__${String(t.key)}`]=e},get(){var e;return this[`__${String(t.key)}`]||(null===(e=history.state)||void 0===e?void 0:e.scrollPosition)},enumerable:!0,configurable:!0},finisher(o){const i=o.prototype.connectedCallback;o.prototype.connectedCallback=function(){i.call(this);const o=this[t.key];o&&this.updateComplete.then((()=>{const t=this.renderRoot.querySelector(e);t&&setTimeout((()=>{t.scrollTop=o}),0)}))}}})},49976:function(e,t,o){o.d(t,{U:()=>i});const i=e=>e.stopPropagation()},93826:function(e,t,o){o.d(t,{P:()=>i});o(71695),o(47021);const i=(e,t,o=!0,i=!0)=>{let a,n=0;const r=(...r)=>{const s=()=>{n=!1===o?0:Date.now(),a=void 0,e(...r)},d=Date.now();n||!1!==o||(n=d);const l=t-(d-n);l<=0||l>t?(a&&(clearTimeout(a),a=void 0),n=d,e(...r)):a||!1===i||(a=window.setTimeout(s,l))};return r.cancel=()=>{clearTimeout(a),a=void 0,n=0},r}},28310:function(e,t,o){var i=o(61701),a=(o(71695),o(47021),o(57243)),n=o(50778),r=o(10916);let s,d,l=e=>e;(0,i.Z)([(0,n.Mo)("ha-bar")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"min",value(){return 0}},{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"max",value(){return 100}},{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"value",value:void 0},{kind:"method",key:"render",value:function(){const e=(0,r.IU)((0,r.Ff)((0,r.Fv)(this.value,this.min,this.max),this.min,this.max));return(0,a.YP)(s||(s=l` <svg> <g> <rect/> <rect width="${0}%"/> </g> </svg> `),e)}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(d||(d=l`rect{height:100%}rect:first-child{width:100%;fill:var(--ha-bar-background-color,var(--secondary-background-color))}rect:last-child{fill:var(--ha-bar-primary-color,var(--primary-color))}svg{border-radius:var(--ha-bar-border-radius,4px);height:12px;width:100%}`))}}]}}),a.oi)},59826:function(e,t,o){var i=o(61701),a=(o(71695),o(47021),o(31622)),n=o(57243),r=o(50778),s=o(22344);let d,l=e=>e;(0,i.Z)([(0,r.Mo)("ha-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",static:!0,key:"styles",value(){return[s.W,(0,n.iv)(d||(d=l`::slotted([slot=icon]){margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction);display:block}.mdc-button{height:var(--button-height,36px)}.trailing-icon{display:flex}.slot-container{overflow:var(--button-slot-container-overflow,visible)}:host([destructive]){--mdc-theme-primary:var(--error-color)}`))]}}]}}),a.Button)},54977:function(e,t,o){var i=o(61701),a=(o(71695),o(47021),o(57243)),n=o(50778);let r,s,d,l=e=>e;(0,i.Z)([(0,n.Mo)("ha-card")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"raised",value(){return!1}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(r||(r=l`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,12px);border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, 24px);letter-spacing:-.012em;line-height:48px;padding:12px 16px 16px;display:block;margin-block-start:0px;margin-block-end:0px;font-weight:400}:host ::slotted(.card-content:not(:first-child)),slot:not(:first-child)::slotted(.card-content){padding-top:0px;margin-top:-8px}:host ::slotted(.card-content){padding:16px}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:5px 16px}`))}},{kind:"method",key:"render",value:function(){return(0,a.dy)(s||(s=l` ${0} <slot></slot> `),this.header?(0,a.dy)(d||(d=l`<h1 class="card-header">${0}</h1>`),this.header):a.Ld)}}]}}),a.oi)},68325:function(e,t,o){var i=o(61701),a=o(72621),n=(o(52247),o(71695),o(92745),o(9359),o(70104),o(40251),o(11740),o(47021),o(57243)),r=o(50778),s=o(27486),d=o(36522),l=o(49976);o(65981);let c,h=e=>e;const u={key:"Mod-s",run:e=>((0,d.B)(e.dom,"editor-save"),!0)},f=e=>{const t=document.createElement("ha-icon");return t.icon=e.label,t};(0,i.Z)([(0,r.Mo)("ha-code-editor")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",key:"codemirror",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"mode",value(){return"yaml"}},{kind:"field",key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"autofocus",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:"read-only",type:Boolean})],key:"readOnly",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"linewrap",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"autocomplete-entities"})],key:"autocompleteEntities",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"autocomplete-icons"})],key:"autocompleteIcons",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"error",value(){return!1}},{kind:"field",decorators:[(0,r.SB)()],key:"_value",value(){return""}},{kind:"field",key:"_loadedCodeMirror",value:void 0},{kind:"field",key:"_iconList",value:void 0},{kind:"set",key:"value",value:function(e){this._value=e}},{kind:"get",key:"value",value:function(){return this.codemirror?this.codemirror.state.doc.toString():this._value}},{kind:"get",key:"hasComments",value:function(){if(!this.codemirror||!this._loadedCodeMirror)return!1;const e=this._loadedCodeMirror.highlightingFor(this.codemirror.state,[this._loadedCodeMirror.tags.comment]);return!!this.renderRoot.querySelector(`span.${e}`)}},{kind:"method",key:"connectedCallback",value:function(){(0,a.Z)(i,"connectedCallback",this,3)([]),this.hasUpdated&&this.requestUpdate(),this.addEventListener("keydown",l.U),this.codemirror&&!1!==this.autofocus&&this.codemirror.focus()}},{kind:"method",key:"disconnectedCallback",value:function(){(0,a.Z)(i,"disconnectedCallback",this,3)([]),this.removeEventListener("keydown",l.U),this.updateComplete.then((()=>{this.codemirror.destroy(),delete this.codemirror}))}},{kind:"method",key:"scheduleUpdate",value:async function(){var e;null!==(e=this._loadedCodeMirror)&&void 0!==e||(this._loadedCodeMirror=await Promise.all([o.e("2142"),o.e("93505"),o.e("8771"),o.e("66153")]).then(o.bind(o,2765))),(0,a.Z)(i,"scheduleUpdate",this,3)([])}},{kind:"method",key:"update",value:function(e){if((0,a.Z)(i,"update",this,3)([e]),!this.codemirror)return void this._createCodeMirror();const t=[];e.has("mode")&&t.push({effects:[this._loadedCodeMirror.langCompartment.reconfigure(this._mode),this._loadedCodeMirror.foldingCompartment.reconfigure(this._getFoldingExtensions())]}),e.has("readOnly")&&t.push({effects:this._loadedCodeMirror.readonlyCompartment.reconfigure(this._loadedCodeMirror.EditorView.editable.of(!this.readOnly))}),e.has("linewrap")&&t.push({effects:this._loadedCodeMirror.linewrapCompartment.reconfigure(this.linewrap?this._loadedCodeMirror.EditorView.lineWrapping:[])}),e.has("_value")&&this._value!==this.value&&t.push({changes:{from:0,to:this.codemirror.state.doc.length,insert:this._value}}),t.length>0&&this.codemirror.dispatch(...t),e.has("error")&&this.classList.toggle("error-state",this.error)}},{kind:"get",key:"_mode",value:function(){return this._loadedCodeMirror.langs[this.mode]}},{kind:"method",key:"_createCodeMirror",value:function(){if(!this._loadedCodeMirror)throw new Error("Cannot create editor before CodeMirror is loaded");const e=[this._loadedCodeMirror.lineNumbers(),this._loadedCodeMirror.history(),this._loadedCodeMirror.drawSelection(),this._loadedCodeMirror.EditorState.allowMultipleSelections.of(!0),this._loadedCodeMirror.rectangularSelection(),this._loadedCodeMirror.crosshairCursor(),this._loadedCodeMirror.highlightSelectionMatches(),this._loadedCodeMirror.highlightActiveLine(),this._loadedCodeMirror.indentationMarkers({thickness:0,activeThickness:1,colors:{activeLight:"var(--secondary-text-color)",activeDark:"var(--secondary-text-color)"}}),this._loadedCodeMirror.keymap.of([...this._loadedCodeMirror.defaultKeymap,...this._loadedCodeMirror.searchKeymap,...this._loadedCodeMirror.historyKeymap,...this._loadedCodeMirror.tabKeyBindings,u]),this._loadedCodeMirror.langCompartment.of(this._mode),this._loadedCodeMirror.haTheme,this._loadedCodeMirror.haSyntaxHighlighting,this._loadedCodeMirror.readonlyCompartment.of(this._loadedCodeMirror.EditorView.editable.of(!this.readOnly)),this._loadedCodeMirror.linewrapCompartment.of(this.linewrap?this._loadedCodeMirror.EditorView.lineWrapping:[]),this._loadedCodeMirror.EditorView.updateListener.of(this._onUpdate),this._loadedCodeMirror.foldingCompartment.of(this._getFoldingExtensions())];if(!this.readOnly){const t=[];this.autocompleteEntities&&this.hass&&t.push(this._entityCompletions.bind(this)),this.autocompleteIcons&&t.push(this._mdiCompletions.bind(this)),t.length>0&&e.push(this._loadedCodeMirror.autocompletion({override:t,maxRenderedOptions:10}))}this.codemirror=new this._loadedCodeMirror.EditorView({state:this._loadedCodeMirror.EditorState.create({doc:this._value,extensions:e}),parent:this.renderRoot})}},{kind:"field",key:"_getStates",value(){return(0,s.Z)((e=>{if(!e)return[];return Object.keys(e).map((t=>({type:"variable",label:t,detail:e[t].attributes.friendly_name,info:`State: ${e[t].state}`})))}))}},{kind:"method",key:"_entityCompletions",value:function(e){const t=e.matchBefore(/[a-z_]{3,}\.\w*/);if(!t||t.from===t.to&&!e.explicit)return null;const o=this._getStates(this.hass.states);return o&&o.length?{from:Number(t.from),options:o,validFor:/^[a-z_]{3,}\.\w*$/}:null}},{kind:"field",key:"_getIconItems",value(){return async()=>{if(!this._iconList){let e;e=(await o.e("25016").then(o.t.bind(o,58134,19))).default,this._iconList=e.map((e=>({type:"variable",label:`mdi:${e.name}`,detail:e.keywords.join(", "),info:f})))}return this._iconList}}},{kind:"method",key:"_mdiCompletions",value:async function(e){const t=e.matchBefore(/mdi:\S*/);if(!t||t.from===t.to&&!e.explicit)return null;const o=await this._getIconItems();return{from:Number(t.from),options:o,validFor:/^mdi:\S*$/}}},{kind:"field",key:"_onUpdate",value(){return e=>{e.docChanged&&(this._value=e.state.doc.toString(),(0,d.B)(this,"value-changed",{value:this._value}))}}},{kind:"field",key:"_getFoldingExtensions",value(){return()=>"yaml"===this.mode?[this._loadedCodeMirror.foldGutter(),this._loadedCodeMirror.foldingOnIndent]:[]}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(c||(c=h`:host(.error-state) .cm-gutters{border-color:var(--error-state-color,red)}`))}}]}}),n.fl)},55486:function(e,t,o){var i=o(61701),a=(o(71695),o(47021),o(4918)),n=o(6394),r=o(57243),s=o(50778),d=o(35359),l=o(36522);let c,h,u=e=>e;(0,i.Z)([(0,s.Mo)("ha-formfield")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"method",key:"render",value:function(){const e={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return(0,r.dy)(c||(c=u` <div class="mdc-form-field ${0}"> <slot></slot> <label class="mdc-label" @click="${0}"> <slot name="label">${0}</slot> </label> </div>`),(0,d.$)(e),this._labelClick,this.label)}},{kind:"method",key:"_labelClick",value:function(){const e=this.input;if(e&&(e.focus(),!e.disabled))switch(e.tagName){case"HA-CHECKBOX":e.checked=!e.checked,(0,l.B)(e,"change");break;case"HA-RADIO":e.checked=!0,(0,l.B)(e,"change");break;default:e.click()}}},{kind:"field",static:!0,key:"styles",value(){return[n.W,(0,r.iv)(h||(h=u`:host(:not([alignEnd])) ::slotted(ha-switch){margin-right:10px;margin-inline-end:10px;margin-inline-start:inline}.mdc-form-field{align-items:var(--ha-formfield-align-items,center);gap:4px}.mdc-form-field>label{direction:var(--direction);margin-inline-start:0;margin-inline-end:auto;padding:0}:host([disabled]) label{color:var(--disabled-text-color)}`))]}}]}}),a.a)},54202:function(e,t,o){o.r(t),o.d(t,{HaIconButtonArrowPrev:()=>l});var i=o(61701),a=(o(71695),o(47021),o(57243)),n=o(50778),r=o(5111);o(23334);let s,d=e=>e;let l=(0,i.Z)([(0,n.Mo)("ha-icon-button-arrow-prev")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_icon",value(){return"rtl"===r.E.document.dir?"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z":"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"}},{kind:"method",key:"render",value:function(){var e;return(0,a.dy)(s||(s=d` <ha-icon-button .disabled="${0}" .label="${0}" .path="${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)}}]}}),a.oi)},23334:function(e,t,o){o.r(t),o.d(t,{HaIconButton:()=>u});var i=o(61701),a=(o(71695),o(47021),o(74269),o(57243)),n=o(50778),r=o(20552);o(37583);let s,d,l,c,h=e=>e,u=(0,i.Z)([(0,n.Mo)("ha-icon-button")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"path",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"label",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String,attribute:"aria-haspopup"})],key:"ariaHasPopup",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:"hide-title",type:Boolean})],key:"hideTitle",value(){return!1}},{kind:"field",decorators:[(0,n.IO)("mwc-icon-button",!0)],key:"_button",value:void 0},{kind:"method",key:"focus",value:function(){var e;null===(e=this._button)||void 0===e||e.focus()}},{kind:"field",static:!0,key:"shadowRootOptions",value(){return{mode:"open",delegatesFocus:!0}}},{kind:"method",key:"render",value:function(){return(0,a.dy)(s||(s=h` <mwc-icon-button aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}"> ${0} </mwc-icon-button> `),(0,r.o)(this.label),(0,r.o)(this.hideTitle?void 0:this.label),(0,r.o)(this.ariaHasPopup),this.disabled,this.path?(0,a.dy)(d||(d=h`<ha-svg-icon .path="${0}"></ha-svg-icon>`),this.path):(0,a.dy)(l||(l=h`<slot></slot>`)))}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(c||(c=h`:host{display:inline-block;outline:0}:host([disabled]){pointer-events:none}mwc-icon-button{--mdc-theme-on-primary:currentColor;--mdc-theme-text-disabled-on-light:var(--disabled-text-color)}`))}}]}}),a.oi)},65981:function(e,t,o){o.r(t),o.d(t,{HaIcon:()=>$});var i=o(61701),a=o(72621),n=(o(19083),o(71695),o(40251),o(61006),o(47021),o(57243)),r=o(50778),s=o(36522),d=o(22381),l=o(80654),c=(o(92745),o(9359),o(31526),o(27608)),h=o(27486),u=o(37394);const f=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"}]}'),p=(0,h.Z)((async()=>{const e=(0,c.MT)("hass-icon-db","mdi-icon-store");{const t=await(0,c.U2)("_version",e);t?t!==f.version&&(await(0,c.ZH)(e),(0,c.t8)("_version",f.version,e)):(0,c.t8)("_version",f.version,e)}return e})),b=["mdi","hass","hassio","hademo"];let v=[];o(37583);let m,y,g,k=e=>e;const _={},w={},x=(0,d.D)((()=>(async e=>{const t=Object.keys(e),o=await Promise.all(Object.values(e));(await p())("readwrite",(i=>{o.forEach(((o,a)=>{Object.entries(o).forEach((([e,t])=>{i.put(t,e)})),delete e[t[a]]}))}))})(w)),2e3),C={};let $=(0,i.Z)([(0,r.Mo)("ha-icon")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)()],key:"icon",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_path",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_secondaryPath",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_viewBox",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_legacy",value(){return!1}},{kind:"method",key:"willUpdate",value:function(e){(0,a.Z)(i,"willUpdate",this,3)([e]),e.has("icon")&&(this._path=void 0,this._secondaryPath=void 0,this._viewBox=void 0,this._loadIcon())}},{kind:"method",key:"render",value:function(){return this.icon?this._legacy?(0,n.dy)(m||(m=k` <iron-icon .icon="${0}"></iron-icon>`),this.icon):(0,n.dy)(y||(y=k`<ha-svg-icon .path="${0}" .secondaryPath="${0}" .viewBox="${0}"></ha-svg-icon>`),this._path,this._secondaryPath,this._viewBox):n.Ld}},{kind:"method",key:"_loadIcon",value:async function(){if(!this.icon)return;const e=this.icon,[t,i]=this.icon.split(":",2);let a,n=i;if(!t||!n)return;if(!b.includes(t)){const o=l.g[t];return o?void(o&&"function"==typeof o.getIcon&&this._setCustomPath(o.getIcon(n),e)):void(this._legacy=!0)}if(this._legacy=!1,n in _){const e=_[n];let o;e.newName?(o=`Icon ${t}:${n} was renamed to ${t}:${e.newName}, please change your config, it will be removed in version ${e.removeIn}.`,n=e.newName):o=`Icon ${t}:${n} was removed from MDI, please replace this icon with an other icon in your config, it will be removed in version ${e.removeIn}.`,console.warn(o),(0,s.B)(this,"write_log",{level:"warning",message:o})}if(n in C)return void(this._path=C[n]);if("home-assistant"===n){const t=(await o.e("48348").then(o.bind(o,30511))).mdiHomeAssistant;return this.icon===e&&(this._path=t),void(C[n]=t)}try{a=await(e=>new Promise(((t,o)=>{if(v.push([e,t,o]),v.length>1)return;const i=p();(0,u.n)(1e3,(async()=>{(await i)("readonly",(e=>{for(const[t,o,i]of v)(0,c.RV)(e.get(t)).then((e=>o(e))).catch((e=>i(e)));v=[]}))})()).catch((e=>{for(const[,,t]of v)t(e);v=[]}))})))(n)}catch(h){a=void 0}if(a)return this.icon===e&&(this._path=a),void(C[n]=a);const r=(e=>{let t;for(const o of f.parts){if(void 0!==o.start&&e<o.start)break;t=o}return t.file})(n);if(r in w)return void this._setPath(w[r],n,e);const d=fetch(`/static/mdi/${r}.json`).then((e=>e.json()));w[r]=d,this._setPath(d,n,e),x()}},{kind:"method",key:"_setCustomPath",value:async function(e,t){const o=await e;this.icon===t&&(this._path=o.path,this._secondaryPath=o.secondaryPath,this._viewBox=o.viewBox)}},{kind:"method",key:"_setPath",value:async function(e,t,o){const i=await e;this.icon===o&&(this._path=i[t]),C[t]=i[t]}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(g||(g=k`:host{fill:currentcolor}`))}}]}}),n.oi)},43344:function(e,t,o){var i=o(61701),a=o(72621),n=(o(52247),o(71695),o(47021),o(57243)),r=o(50778),s=o(36522),d=o(83716);o(23334);let l,c,h,u=e=>e;(0,i.Z)([(0,r.Mo)("ha-menu-button")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"hassio",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_hasNotifications",value(){return!1}},{kind:"field",decorators:[(0,r.SB)()],key:"_show",value(){return!1}},{kind:"field",key:"_alwaysVisible",value(){return!1}},{kind:"field",key:"_attachNotifOnConnect",value(){return!1}},{kind:"field",key:"_unsubNotifications",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,a.Z)(o,"connectedCallback",this,3)([]),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}},{kind:"method",key:"disconnectedCallback",value:function(){(0,a.Z)(o,"disconnectedCallback",this,3)([]),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}},{kind:"method",key:"render",value:function(){if(!this._show)return n.Ld;const e=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,n.dy)(l||(l=u` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),"M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z",this._toggleMenu,e?(0,n.dy)(c||(c=u`<div class="dot"></div>`)):"")}},{kind:"method",key:"firstUpdated",value:function(e){(0,a.Z)(o,"firstUpdated",this,3)([e]),this.hassio&&(this._alwaysVisible=(Number(window.parent.frontendVersion)||0)<20190710)}},{kind:"method",key:"willUpdate",value:function(e){if((0,a.Z)(o,"willUpdate",this,3)([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)||"always_hidden"===(null==t?void 0:t.dockedSidebar),n=this.narrow||"always_hidden"===this.hass.dockedSidebar;this.hasUpdated&&i===n||(this._show=n||this._alwaysVisible,n?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}},{kind:"method",key:"_subscribeNotifications",value:function(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,d.r)(this.hass.connection,(e=>{this._hasNotifications=e.length>0}))}},{kind:"method",key:"_toggleMenu",value:function(){(0,s.B)(this,"hass-toggle-menu")}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(h||(h=u`: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:50%;border:2px solid var(--app-header-background-color)}`))}}]}}),n.oi)},89370:function(e,t,o){var i=o(61701),a=(o(71695),o(47021),o(57243)),n=o(50778),r=o(35359),s=o(10916);o(28310),o(30509);let d,l,c=e=>e;(0,i.Z)([(0,n.Mo)("ha-metric")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Number})],key:"value",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"heading",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:String})],key:"tooltip",value:void 0},{kind:"method",key:"render",value:function(){var e;const t=(0,s.IU)(this.value);return(0,a.dy)(d||(d=c` <ha-settings-row> <span slot="heading"> ${0} </span> <div slot="description" .title="${0}"> <span class="value"> <div>${0} %</div> </span> <ha-bar class="${0}" .value="${0}"></ha-bar> </div> </ha-settings-row> `),this.heading,null!==(e=this.tooltip)&&void 0!==e?e:"",t,(0,r.$)({"target-warning":t>50,"target-critical":t>85}),this.value)}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(l||(l=c`ha-settings-row{padding:0;height:54px;width:100%}ha-settings-row>div[slot=description]{white-space:normal;color:var(--secondary-text-color);display:flex;justify-content:space-between}ha-bar{--ha-bar-primary-color:var(--metric-bar-ok-color, var(--success-color))}.target-warning{--ha-bar-primary-color:var(
        --metric-bar-warning-color,
        var(--warning-color)
      )}.target-critical{--ha-bar-primary-color:var(
        --metric-bar-critical-color,
        var(--error-color)
      )}.value{width:48px;padding-right:4px;padding-inline-end:4px;padding-inline-start:initial;flex-shrink:0}.value>div{direction:ltr;text-align:var(--float-start)}`))}}]}}),a.oi)},30509:function(e,t,o){var i=o(61701),a=(o(71695),o(47021),o(57243)),n=o(50778);let r,s,d=e=>e;(0,i.Z)([(0,n.Mo)("ha-settings-row")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"slim",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"three-line"})],key:"threeLine",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"wrap-heading",reflect:!0})],key:"wrapHeading",value(){return!1}},{kind:"method",key:"render",value:function(){return(0,a.dy)(r||(r=d` <div class="prefix-wrap"> <slot name="prefix"></slot> <div class="body" ?two-line="${0}" ?three-line="${0}"> <slot name="heading"></slot> <div class="secondary"><slot name="description"></slot></div> </div> </div> <div class="content"><slot></slot></div> `),!this.threeLine,this.threeLine)}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(s||(s=d`:host{display:flex;padding:0 16px;align-content:normal;align-self:auto;align-items:center}.body{padding-top:8px;padding-bottom:8px;padding-left:0;padding-inline-start:0;padding-right:16px;padding-inline-end:16px;overflow:hidden;display:var(--layout-vertical_-_display,flex);flex-direction:var(--layout-vertical_-_flex-direction,column);justify-content:var(--layout-center-justified_-_justify-content,center);flex:var(--layout-flex_-_flex,1);flex-basis:var(--layout-flex_-_flex-basis,0.000000001px)}.body[three-line]{min-height:var(--paper-item-body-three-line-min-height,88px)}:host(:not([wrap-heading])) body>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.body>.secondary{display:block;padding-top:4px;font-family:var(
        --mdc-typography-body2-font-family,
        var(--mdc-typography-font-family, Roboto, sans-serif)
      );-webkit-font-smoothing:antialiased;font-size:var(--mdc-typography-body2-font-size, .875rem);font-weight:var(--mdc-typography-body2-font-weight,400);line-height:normal;color:var(--secondary-text-color)}.body[two-line]{min-height:calc(var(--paper-item-body-two-line-min-height,72px) - 16px);flex:1}.content{display:contents}:host(:not([narrow])) .content{display:var(--settings-row-content-display,flex);justify-content:flex-end;flex:1;padding:16px 0}.content ::slotted(*){width:var(--settings-row-content-width)}:host([narrow]){align-items:normal;flex-direction:column;border-top:1px solid var(--divider-color);padding-bottom:8px}::slotted(ha-switch){padding:16px 0}.secondary{white-space:normal}.prefix-wrap{display:var(--settings-row-prefix-display)}:host([narrow]) .prefix-wrap{display:flex;align-items:center}:host([slim]),:host([slim]) .content,:host([slim]) ::slotted(ha-switch){padding:0}:host([slim]) .body{min-height:0}`))}}]}}),a.oi)},37583:function(e,t,o){o.r(t),o.d(t,{HaSvgIcon:()=>h});var i=o(61701),a=(o(71695),o(47021),o(57243)),n=o(50778);let r,s,d,l,c=e=>e,h=(0,i.Z)([(0,n.Mo)("ha-svg-icon")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)()],key:"path",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"secondaryPath",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"viewBox",value:void 0},{kind:"method",key:"render",value:function(){return(0,a.YP)(r||(r=c` <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,a.YP)(s||(s=c`<path class="primary-path" d="${0}"></path>`),this.path):a.Ld,this.secondaryPath?(0,a.YP)(d||(d=c`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):a.Ld)}},{kind:"field",static:!0,key:"styles",value(){return(0,a.iv)(l||(l=c`: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)}`))}}]}}),a.oi)},1888:function(e,t,o){var i=o(61701),a=o(72621),n=(o(71695),o(47021),o(62523)),r=o(83835),s=o(57243),d=o(50778),l=o(13560);let c,h=e=>e;(0,i.Z)([(0,d.Mo)("ha-switch")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"haptic",value(){return!1}},{kind:"method",key:"firstUpdated",value:function(){(0,a.Z)(o,"firstUpdated",this,3)([]),this.addEventListener("change",(()=>{this.haptic&&(0,l.j)("light")}))}},{kind:"field",static:!0,key:"styles",value(){return[r.W,(0,s.iv)(c||(c=h`:host{--mdc-theme-secondary:var(--switch-checked-color)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:var(--switch-checked-button-color);border-color:var(--switch-checked-button-color)}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:var(--switch-checked-track-color);border-color:var(--switch-checked-track-color)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:var(--switch-unchecked-button-color);border-color:var(--switch-unchecked-button-color)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:var(--switch-unchecked-track-color);border-color:var(--switch-unchecked-track-color)}`))]}}]}}),n.H)},78586:function(e,t,o){o.d(t,{JG:()=>d,PT:()=>s,ho:()=>n});o(71695),o(92745),o(19423),o(40251),o(47021);var i=o(62212);const a=(e,t)=>e.subscribeMessage((e=>{const o=Object.assign({},t.state||{});if(e.add)for(const t of e.add)o[t.source]=t;if(e.remove)for(const t of e.remove)delete o[t.source];t.setState(o,!0)}),{type:"bluetooth/subscribe_scanner_details"}),n=(e,t)=>(0,i.B)("_bluetoothScannerDetails",(()=>Promise.resolve({})),a,e,t),r=(e,t)=>e.subscribeMessage((e=>{const o=[...t.state||[]];if(e.add)for(const t of e.add){const e=o.findIndex((e=>e.address===t.address));-1===e?o.push(t):o[e]=t}if(e.change)for(const t of e.change){const e=o.findIndex((e=>e.address===t.address));-1!==e&&(o[e]=t)}if(e.remove)for(const t of e.remove){const e=o.findIndex((e=>e.address===t.address));-1!==e&&o.splice(e,1)}t.setState(o,!0)}),{type:"bluetooth/subscribe_advertisements"}),s=(e,t)=>(0,i.B)("_bluetoothDeviceRows",(()=>Promise.resolve([])),r,e,t),d=(e,t,o)=>{const i={type:"bluetooth/subscribe_connection_allocations"};return o&&(i.config_entry_id=o),e.subscribeMessage((e=>t(e)),i)}},75101:function(e,t,o){o.d(t,{$H:()=>i,DJ:()=>s,LZ:()=>n,Nn:()=>u,Ny:()=>f,Pk:()=>b,Q4:()=>r,RQ:()=>l,SO:()=>c,T0:()=>p,aR:()=>a,iJ:()=>h,pB:()=>d});o(71695),o(9359),o(56475),o(1331),o(19423),o(47021);const i=(e,t)=>e.callWS({type:"config_entries/subentries/list",entry_id:t}),a=(e,t,o)=>e.callWS({type:"config_entries/subentries/delete",entry_id:t,subentry_id:o}),n=["migration_error","setup_error","setup_retry"],r=["not_loaded","loaded","setup_error","setup_retry"],s=(e,t,o)=>{const i={type:"config_entries/subscribe"};return o&&o.type&&(i.type_filter=o.type),e.connection.subscribeMessage((e=>t(e)),i)},d=(e,t)=>{const o={};return t&&(t.type&&(o.type_filter=t.type),t.domain&&(o.domain=t.domain)),e.callWS(Object.assign({type:"config_entries/get"},o))},l=(e,t)=>e.callWS({type:"config_entries/get_single",entry_id:t}),c=(e,t,o)=>e.callWS(Object.assign({type:"config_entries/update",entry_id:t},o)),h=(e,t)=>e.callApi("DELETE",`config/config_entries/entry/${t}`),u=(e,t)=>e.callApi("POST",`config/config_entries/entry/${t}/reload`),f=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:"user"}),p=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:null}),b=(e,t)=>{if(!t)return e;const o=e.find((e=>e.entry_id===t));if(!o)return e;return[o,...e.filter((e=>e.entry_id!==t))]}},80654:function(e,t,o){o.d(t,{g:()=>r});const i=window;"customIconsets"in i||(i.customIconsets={});const a=i.customIconsets,n=window;"customIcons"in n||(n.customIcons={});const r=new Proxy(n.customIcons,{get:(e,t)=>{var o;return null!==(o=e[t])&&void 0!==o?o:a[t]?{getIcon:a[t]}:void 0}})},45594:function(e,t,o){o.d(t,{Fv:()=>r,e1:()=>n,eH:()=>i,lJ:()=>a});const i=(e,t)=>{var o;return e.callApi("POST","config/config_entries/options/flow",{handler:t,show_advanced_options:Boolean(null===(o=e.userData)||void 0===o?void 0:o.showAdvanced)})},a=(e,t)=>e.callApi("GET",`config/config_entries/options/flow/${t}`),n=(e,t,o)=>e.callApi("POST",`config/config_entries/options/flow/${t}`,o),r=(e,t)=>e.callApi("DELETE",`config/config_entries/options/flow/${t}`)},83716:function(e,t,o){o.d(t,{r:()=>i});o(71695),o(19423),o(47021);const i=(e,t)=>{const o=new a,i=e.subscribeMessage((e=>t(o.processMessage(e))),{type:"persistent_notification/subscribe"});return()=>{i.then((e=>null==e?void 0:e()))}};class a{constructor(){this.notifications=void 0,this.notifications={}}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)}}},7956:function(e,t,o){o.d(t,{w:()=>n});o(71695),o(19423),o(40251),o(47021);var i=o(36522);const a=()=>Promise.all([o.e("46379"),o.e("66031"),o.e("72206"),o.e("97983"),o.e("24199"),o.e("78943"),o.e("2142"),o.e("58640"),o.e("52430"),o.e("4697"),o.e("8871"),o.e("27090"),o.e("8949")]).then(o.bind(o,12656)),n=(e,t,o)=>{(0,i.B)(e,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:a,dialogParams:Object.assign(Object.assign({},t),{},{flowConfig:o,dialogParentElement:e})})}},91854:function(e,t,o){o.d(t,{c:()=>p});o(71695),o(19423),o(40251),o(47021);var i=o(57243),a=o(57816),n=o(45594),r=o(7956);let s,d,l,c,h,u,f=e=>e;const p=(e,t,o)=>(0,r.w)(e,Object.assign({startFlowHandler:t.entry_id,domain:t.domain},o),{flowType:"options_flow",showDevices:!1,createFlow:async(e,o)=>{const[i]=await Promise.all([(0,n.eH)(e,o),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return i},fetchFlow:async(e,o)=>{const[i]=await Promise.all([(0,n.lJ)(e,o),e.loadFragmentTranslation("config"),e.loadBackendTranslation("options",t.domain),e.loadBackendTranslation("selector",t.domain)]);return i},handleFlowStep:n.e1,deleteFlow:n.Fv,renderAbortDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.abort.${o.reason}`,o.description_placeholders);return a?(0,i.dy)(s||(s=f` <ha-markdown breaks allow-svg .content="${0}"></ha-markdown> `),a):o.reason},renderShowFormStepHeader(e,o){return e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.title`,o.description_placeholders)||e.localize("ui.dialogs.options_flow.form.header")},renderShowFormStepDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.description`,o.description_placeholders);return a?(0,i.dy)(d||(d=f` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),a):""},renderShowFormStepFieldLabel(e,o,i,a){var n;if("expandable"===i.type)return e.localize(`component.${t.domain}.options.step.${o.step_id}.sections.${i.name}.name`);const r=null!=a&&null!==(n=a.path)&&void 0!==n&&n[0]?`sections.${a.path[0]}.`:"";return e.localize(`component.${t.domain}.options.step.${o.step_id}.${r}data.${i.name}`)||i.name},renderShowFormStepFieldHelper(e,o,a,n){var r;if("expandable"===a.type)return e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.sections.${a.name}.description`);const s=null!=n&&null!==(r=n.path)&&void 0!==r&&r[0]?`sections.${n.path[0]}.`:"",d=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.${s}data_description.${a.name}`,o.description_placeholders);return d?(0,i.dy)(l||(l=f`<ha-markdown breaks .content="${0}"></ha-markdown>`),d):""},renderShowFormStepFieldError(e,o,i){return e.localize(`component.${o.translation_domain||t.domain}.options.error.${i}`,o.description_placeholders)||i},renderShowFormStepFieldLocalizeValue(e,o,i){return e.localize(`component.${t.domain}.selector.${i}`)},renderShowFormStepSubmitButton(e,o){return e.localize(`component.${t.domain}.options.step.${o.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===o.last_step?"next":"submit"))},renderExternalStepHeader(e,t){return""},renderExternalStepDescription(e,t){return""},renderCreateEntryDescription(e,t){return(0,i.dy)(c||(c=f` <p>${0}</p> `),e.localize("ui.dialogs.options_flow.success.description"))},renderShowFormProgressHeader(e,o){return e.localize(`component.${t.domain}.options.step.${o.step_id}.title`)||e.localize(`component.${t.domain}.title`)},renderShowFormProgressDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.progress.${o.progress_action}`,o.description_placeholders);return a?(0,i.dy)(h||(h=f` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),a):""},renderMenuHeader(e,o){return e.localize(`component.${t.domain}.options.step.${o.step_id}.title`)||e.localize(`component.${t.domain}.title`)},renderMenuDescription(e,o){const a=e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.description`,o.description_placeholders);return a?(0,i.dy)(u||(u=f` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),a):""},renderMenuOption(e,o,i){return e.localize(`component.${o.translation_domain||t.domain}.options.step.${o.step_id}.menu_options.${i}`,o.description_placeholders)},renderLoadingDescription(e,o){return e.localize(`component.${t.domain}.options.loading`)||("loading_flow"===o||"loading_step"===o?e.localize(`ui.dialogs.options_flow.loading.${o}`,{integration:(0,a.Lh)(e.localize,t.domain)}):"")}})},87979:function(e,t,o){var i=o(61701),a=(o(71695),o(47021),o(57243)),n=o(50778),r=o(31146),s=(o(54202),o(43344),o(28008));let d,l,c,h,u,f=e=>e;(0,i.Z)([(0,n.Mo)("hass-subpage")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,attribute:"main-page"})],key:"mainPage",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)({type:String,attribute:"back-path"})],key:"backPath",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"backCallback",value:void 0},{kind:"field",decorators:[(0,n.Cb)({type:Boolean,reflect:!0})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,n.Cb)({type:Boolean})],key:"supervisor",value(){return!1}},{kind:"field",decorators:[(0,r.i)(".content")],key:"_savedScrollPos",value:void 0},{kind:"method",key:"render",value:function(){var e;return(0,a.dy)(d||(d=f` <div class="toolbar"> ${0} <div class="main-title"><slot name="header">${0}</slot></div> <slot name="toolbar-icon"></slot> </div> <div class="content ha-scrollbar" @scroll="${0}"> <slot></slot> </div> <div id="fab"> <slot name="fab"></slot> </div> `),this.mainPage||null!==(e=history.state)&&void 0!==e&&e.root?(0,a.dy)(l||(l=f` <ha-menu-button .hassio="${0}" .hass="${0}" .narrow="${0}"></ha-menu-button> `),this.supervisor,this.hass,this.narrow):this.backPath?(0,a.dy)(c||(c=f` <a href="${0}"> <ha-icon-button-arrow-prev .hass="${0}"></ha-icon-button-arrow-prev> </a> `),this.backPath,this.hass):(0,a.dy)(h||(h=f` <ha-icon-button-arrow-prev .hass="${0}" @click="${0}"></ha-icon-button-arrow-prev> `),this.hass,this._backTapped),this.header,this._saveScrollPos)}},{kind:"method",decorators:[(0,n.hO)({passive:!0})],key:"_saveScrollPos",value:function(e){this._savedScrollPos=e.target.scrollTop}},{kind:"method",key:"_backTapped",value:function(){this.backCallback?this.backCallback():history.back()}},{kind:"get",static:!0,key:"styles",value:function(){return[s.$c,(0,a.iv)(u||(u=f`:host{display:block;height:100%;background-color:var(--primary-background-color);overflow:hidden;position:relative}:host([narrow]){width:100%;position:fixed}.toolbar{display:flex;align-items:center;font-size:20px;height:var(--header-height);padding:8px 12px;background-color:var(--app-header-background-color);font-weight:400;color:var(--app-header-text-color,#fff);border-bottom:var(--app-header-border-bottom,none);box-sizing:border-box}@media (max-width:599px){.toolbar{padding:4px}}.toolbar a{color:var(--sidebar-text-color);text-decoration:none}::slotted([slot=toolbar-icon]),ha-icon-button-arrow-prev,ha-menu-button{pointer-events:auto;color:var(--sidebar-icon-color)}.main-title{margin:var(--margin-title);line-height:20px;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;padding-bottom:1px}.content{position:relative;width:100%;height:calc(100% - 1px - var(--header-height));overflow-y:auto;overflow:auto;-webkit-overflow-scrolling:touch}#fab{position:absolute;right:calc(16px + env(safe-area-inset-right));inset-inline-end:calc(16px + env(safe-area-inset-right));inset-inline-start:initial;bottom:calc(16px + env(safe-area-inset-bottom));z-index:1;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}:host([narrow]) #fab.tabs{bottom:calc(84px + env(safe-area-inset-bottom))}#fab[is-wide]{bottom:24px;right:24px;inset-inline-end:24px;inset-inline-start:initial}`))]}}]}}),a.oi)},51367:function(e,t,o){o.r(t),o.d(t,{BluetoothConfigDashboard:()=>g});var i=o(61701),a=o(72621),n=(o(71695),o(9359),o(1331),o(40251),o(19134),o(47706),o(47021),o(71513),o(75656),o(50100),o(18084),o(57243)),r=o(50778),s=(o(54977),o(68325),o(55486),o(1888),o(59826),o(75101)),d=o(91854),l=(o(87979),o(28008)),c=o(78586),h=o(10916);o(89370);let u,f,p,b,v,m,y=e=>e,g=(0,i.Z)([(0,r.Mo)("bluetooth-config-dashboard")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,r.SB)()],key:"_connectionAllocationData",value(){return[]}},{kind:"field",decorators:[(0,r.SB)()],key:"_connectionAllocationsError",value:void 0},{kind:"field",key:"_configEntry",value(){return new URLSearchParams(window.location.search).get("config_entry")}},{kind:"field",key:"_unsubConnectionAllocations",value:void 0},{kind:"method",key:"connectedCallback",value:function(){(0,a.Z)(o,"connectedCallback",this,3)([]),this.hass&&this._subscribeBluetoothConnectionAllocations()}},{kind:"method",key:"_subscribeBluetoothConnectionAllocations",value:async function(){if(!this._unsubConnectionAllocations&&this._configEntry)try{this._unsubConnectionAllocations=await(0,c.JG)(this.hass.connection,(e=>{this._connectionAllocationData=e}),this._configEntry)}catch(e){this._unsubConnectionAllocations=void 0,this._connectionAllocationsError=e.message}}},{kind:"method",key:"disconnectedCallback",value:function(){(0,a.Z)(o,"disconnectedCallback",this,3)([]),this._unsubConnectionAllocations&&(this._unsubConnectionAllocations(),this._unsubConnectionAllocations=void 0)}},{kind:"method",key:"render",value:function(){return(0,n.dy)(u||(u=y` <hass-subpage .narrow="${0}" .hass="${0}"> <div class="content"> <ha-card .header="${0}"> <div class="card-actions"> <ha-button @click="${0}">${0}</ha-button> </div> </ha-card> <ha-card .header="${0}"> <div class="card-content"> <p> ${0} </p> </div> <div class="card-actions"> <a href="/config/bluetooth/advertisement-monitor"><ha-button> ${0} </ha-button></a> </div> </ha-card> <ha-card .header="${0}"> <div class="card-content"> ${0} </div> <div class="card-actions"> <a href="/config/bluetooth/connection-monitor"><ha-button> ${0} </ha-button></a> </div> </ha-card> </div> </hass-subpage> `),this.narrow,this.hass,this.hass.localize("ui.panel.config.bluetooth.settings_title"),this._openOptionFlow,this.hass.localize("ui.panel.config.bluetooth.option_flow"),this.hass.localize("ui.panel.config.bluetooth.advertisement_monitor"),this.hass.localize("ui.panel.config.bluetooth.advertisement_monitor_details"),this.hass.localize("ui.panel.config.bluetooth.advertisement_monitor"),this.hass.localize("ui.panel.config.bluetooth.connection_slot_allocations_monitor"),this._renderConnectionAllocations(),this.hass.localize("ui.panel.config.bluetooth.connection_monitor"))}},{kind:"field",key:"_getUsedAllocations",value(){return(e,t)=>(0,h.IU)((0,h.Ff)(e,0,t))}},{kind:"method",key:"_renderConnectionAllocations",value:function(){if(this._connectionAllocationsError)return(0,n.dy)(f||(f=y`<ha-alert alert-type="error">${0}</ha-alert>`),this._connectionAllocationsError);if(0===this._connectionAllocationData.length)return(0,n.dy)(p||(p=y`<div> ${0} </div>`),this.hass.localize("ui.panel.config.bluetooth.no_connection_slot_allocations"));const e=this._connectionAllocationData[0],t=e.slots-e.free,o=e.slots;return 0===o?(0,n.dy)(b||(b=y`<div> ${0} </div>`),this.hass.localize("ui.panel.config.bluetooth.no_active_connection_support")):(0,n.dy)(v||(v=y` <p> ${0} </p> <ha-metric .heading="${0}" .value="${0}" .tooltip="${0}"></ha-metric> `),this.hass.localize("ui.panel.config.bluetooth.connection_slot_allocations_monitor_details",{slots:o}),this.hass.localize("ui.panel.config.bluetooth.used_connection_slot_allocations"),this._getUsedAllocations(t,o),e.allocated.length>0?`${t}/${o} (${e.allocated.join(", ")})`:`${t}/${o}`)}},{kind:"method",key:"_openOptionFlow",value:async function(){const e=this._configEntry;if(!e)return;const t=(await(0,s.pB)(this.hass,{domain:"bluetooth"})).find((t=>t.entry_id===e));(0,d.c)(this,t)}},{kind:"get",static:!0,key:"styles",value:function(){return[l.Qx,(0,n.iv)(m||(m=y`:host{-ms-user-select:initial;-webkit-user-select:initial;-moz-user-select:initial}.content{padding:24px 0 32px;max-width:600px;margin:0 auto;direction:ltr}ha-card{margin-bottom:16px}`))]}}]}}),n.oi)},28008:function(e,t,o){o.d(t,{$c:()=>f,Qx:()=>h,k1:()=>c,yu:()=>u});var i=o(57243);let a,n,r,s,d,l=e=>e;const c=(0,i.iv)(a||(a=l`button.link{background:0 0;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;outline:0}`)),h=(0,i.iv)(n||(n=l`:host{font-family:var(--paper-font-body1_-_font-family);-webkit-font-smoothing:var(--paper-font-body1_-_-webkit-font-smoothing);font-size:var(--paper-font-body1_-_font-size);font-weight:var(--paper-font-body1_-_font-weight);line-height:var(--paper-font-body1_-_line-height)}app-header div[sticky]{height:48px}app-toolbar [main-title]{margin-left:20px;margin-inline-start:20px;margin-inline-end:initial}h1{font-family:var(--paper-font-headline_-_font-family);-webkit-font-smoothing:var(--paper-font-headline_-_-webkit-font-smoothing);white-space:var(--paper-font-headline_-_white-space);overflow:var(--paper-font-headline_-_overflow);text-overflow:var(--paper-font-headline_-_text-overflow);font-size:var(--paper-font-headline_-_font-size);font-weight:var(--paper-font-headline_-_font-weight);line-height:var(--paper-font-headline_-_line-height)}h2{font-family:var(--paper-font-title_-_font-family);-webkit-font-smoothing:var(--paper-font-title_-_-webkit-font-smoothing);white-space:var(--paper-font-title_-_white-space);overflow:var(--paper-font-title_-_overflow);text-overflow:var(--paper-font-title_-_text-overflow);font-size:var(--paper-font-title_-_font-size);font-weight:var(--paper-font-title_-_font-weight);line-height:var(--paper-font-title_-_line-height)}h3{font-family:var(--paper-font-subhead_-_font-family);-webkit-font-smoothing:var(--paper-font-subhead_-_-webkit-font-smoothing);white-space:var(--paper-font-subhead_-_white-space);overflow:var(--paper-font-subhead_-_overflow);text-overflow:var(--paper-font-subhead_-_text-overflow);font-size:var(--paper-font-subhead_-_font-size);font-weight:var(--paper-font-subhead_-_font-weight);line-height:var(--paper-font-subhead_-_line-height)}a{color:var(--primary-color)}.secondary{color:var(--secondary-text-color)}.error{color:var(--error-color)}.warning{color:var(--error-color)}ha-button.warning,mwc-button.warning{--mdc-theme-primary: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}`),c),u=(0,i.iv)(r||(r=l`ha-dialog{--mdc-dialog-min-width:400px;--mdc-dialog-max-width:600px;--mdc-dialog-max-width:min(600px, 95vw);--justify-action-buttons:space-between}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-dialog{--mdc-dialog-min-width:calc(
        100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
      );--mdc-dialog-max-width:calc(
        100vw - env(safe-area-inset-right) - env(safe-area-inset-left)
      );--mdc-dialog-min-height:100%;--mdc-dialog-max-height:100%;--vertical-align-dialog:flex-end;--ha-dialog-border-radius:0}}ha-button.warning,mwc-button.warning{--mdc-theme-primary:var(--error-color)}.error{color:var(--error-color)}`)),f=(0,i.iv)(s||(s=l`.ha-scrollbar::-webkit-scrollbar{width:.4rem;height:.4rem}.ha-scrollbar::-webkit-scrollbar-thumb{-webkit-border-radius:4px;border-radius:4px;background:var(--scrollbar-thumb-color)}.ha-scrollbar{overflow-y:auto;scrollbar-color:var(--scrollbar-thumb-color) transparent;scrollbar-width:thin}`));(0,i.iv)(d||(d=l`body{background-color:var(--primary-background-color);color:var(--primary-text-color);height:calc(100vh - 32px);width:100vw}`))},10916:function(e,t,o){o.d(t,{Ff:()=>a,Fv:()=>i,IU:()=>n});const i=(e,t,o)=>isNaN(e)||isNaN(t)||isNaN(o)?0:e>o?o:e<t?t:e,a=(e,t,o)=>100*(e-t)/(o-t),n=e=>Math.round(10*e)/10}}]);
//# sourceMappingURL=10770.4bfdf37ece3a7870.js.map