UNPKG

iobroker.lovelace

Version:

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

2 lines 97.6 kB
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[6999],{49706:function(e,t,n){"use strict";n.d(t,{Rb:function(){return r},Zy:function(){return i},h2:function(){return o},PS:function(){return a},l:function(){return s},ht:function(){return c},f0:function(){return l},tj:function(){return u},uo:function(){return f},lC:function(){return d},Kk:function(){return h},ot:function(){return p},gD:function(){return m},a1:function(){return y},AZ:function(){return g}});var r="hass:bookmark",i={alert:"hass:alert",alexa:"hass:amazon-alexa",air_quality:"hass:air-filter",automation:"hass:robot",calendar:"hass:calendar",camera:"hass:video",climate:"hass:thermostat",configurator:"hass:cog",conversation:"hass:text-to-speech",counter:"hass:counter",device_tracker:"hass:account",fan:"hass:fan",google_assistant:"hass:google-assistant",group:"hass:google-circles-communities",homeassistant:"hass:home-assistant",homekit:"hass:home-automation",image_processing:"hass:image-filter-frames",input_boolean:"hass:toggle-switch-outline",input_datetime:"hass:calendar-clock",input_number:"hass:ray-vertex",input_select:"hass:format-list-bulleted",input_text:"hass:form-textbox",light:"hass:lightbulb",mailbox:"hass:mailbox",notify:"hass:comment-alert",persistent_notification:"hass:bell",person:"hass:account",plant:"hass:flower",proximity:"hass:apple-safari",remote:"hass:remote",scene:"hass:palette",script:"hass:script-text",sensor:"hass:eye",simple_alarm:"hass:bell",sun:"hass:white-balance-sunny",switch:"hass:flash",timer:"hass:timer-outline",updater:"hass:cloud-upload",vacuum:"hass:robot-vacuum",water_heater:"hass:thermometer",weather:"hass:weather-cloudy",zone:"hass:map-marker-radius"},o={current:"hass:current-ac",energy:"hass:flash",humidity:"hass:water-percent",illuminance:"hass:brightness-5",temperature:"hass:thermometer",pressure:"hass:gauge",power:"hass:flash",power_factor:"hass:angle-acute",signal_strength:"hass:wifi",timestamp:"hass:clock",voltage:"hass:sine-wave"},a=["climate","cover","configurator","input_select","input_number","input_text","lock","media_player","scene","script","timer","vacuum","water_heater"],s=["alarm_control_panel","automation","camera","climate","configurator","counter","cover","fan","group","humidifier","input_datetime","light","lock","media_player","person","script","sun","timer","vacuum","water_heater","weather"],c=["input_number","input_select","input_text","scene"],l=["camera","configurator","scene"],u=["closed","locked","off"],f="on",d="off",h=new Set(["fan","input_boolean","light","switch","group","automation","humidifier"]),p="°C",m="°F",y="group.default_view",g=["ff0029","66a61e","377eb8","984ea3","00d2d5","ff7f00","af8d00","7f80cd","b3e900","c42e60","a65628","f781bf","8dd3c7","bebada","fb8072","80b1d3","fdb462","fccde5","bc80bd","ffed6f","c4eaff","cf8c00","1b9e77","d95f02","e7298a","e6ab02","a6761d","0097ff","00d067","f43600","4ba93b","5779bb","927acc","97ee3f","bf3947","9f5b00","f48758","8caed6","f2b94f","eff26e","e43872","d9b100","9d7a00","698cff","d9d9d9","00d27e","d06800","009f82","c49200","cbe8ff","fecddf","c27eb6","8cd2ce","c4b8d9","f883b0","a49100","f48800","27d0df","a04a9b"]},44634:function(e,t,n){"use strict";n.d(t,{M:function(){return r}});var r=function(e,t){var n=Number(e.state),r=t&&"on"===t.state;if(isNaN(n))return"hass:battery-unknown";var i="hass:battery",o=10*Math.round(n/10);return r&&n>10?i+="-charging-".concat(o):r?i+="-outline":n<=5?i+="-alert":n>5&&n<95&&(i+="-".concat(o)),i}},27269:function(e,t,n){"use strict";n.d(t,{p:function(){return r}});var r=function(e){return e.substr(e.indexOf(".")+1)}},91741:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});var r=n(27269),i=function(e){return void 0===e.attributes.friendly_name?(0,r.p)(e.entity_id).replace(/_/g," "):e.attributes.friendly_name||""}},76151:function(e,t,n){"use strict";n.d(t,{K:function(){return o}});var r=n(49706),i=n(44634),o=function(e,t,n){var o=void 0!==n?n:null==t?void 0:t.state;switch(e){case"alarm_control_panel":switch(o){case"armed_home":return"hass:bell-plus";case"armed_night":return"hass:bell-sleep";case"disarmed":return"hass:bell-outline";case"triggered":return"hass:bell-ring";default:return"hass:bell"}case"binary_sensor":return function(e,t){var n="off"===e;switch(null==t?void 0:t.attributes.device_class){case"battery":return n?"hass:battery":"hass:battery-outline";case"battery_charging":return n?"hass:battery":"hass:battery-charging";case"cold":return n?"hass:thermometer":"hass:snowflake";case"connectivity":return n?"hass:server-network-off":"hass:server-network";case"door":return n?"hass:door-closed":"hass:door-open";case"garage_door":return n?"hass:garage":"hass:garage-open";case"power":return n?"hass:power-plug-off":"hass:power-plug";case"gas":case"problem":case"safety":case"smoke":return n?"hass:check-circle":"hass:alert-circle";case"heat":return n?"hass:thermometer":"hass:fire";case"light":return n?"hass:brightness-5":"hass:brightness-7";case"lock":return n?"hass:lock":"hass:lock-open";case"moisture":return n?"hass:water-off":"hass:water";case"motion":return n?"hass:walk":"hass:run";case"occupancy":return n?"hass:home-outline":"hass:home";case"opening":return n?"hass:square":"hass:square-outline";case"plug":return n?"hass:power-plug-off":"hass:power-plug";case"presence":return n?"hass:home-outline":"hass:home";case"sound":return n?"hass:music-note-off":"hass:music-note";case"vibration":return n?"hass:crop-portrait":"hass:vibrate";case"window":return n?"hass:window-closed":"hass:window-open";default:return n?"hass:radiobox-blank":"hass:checkbox-marked-circle"}}(o,t);case"cover":return function(e,t){var n="closed"!==e;switch(null==t?void 0:t.attributes.device_class){case"garage":switch(e){case"opening":return"hass:arrow-up-box";case"closing":return"hass:arrow-down-box";case"closed":return"hass:garage";default:return"hass:garage-open"}case"gate":switch(e){case"opening":case"closing":return"hass:gate-arrow-right";case"closed":return"hass:gate";default:return"hass:gate-open"}case"door":return n?"hass:door-open":"hass:door-closed";case"damper":return n?"hass:circle":"hass:circle-slice-8";case"shutter":switch(e){case"opening":return"hass:arrow-up-box";case"closing":return"hass:arrow-down-box";case"closed":return"hass:window-shutter";default:return"hass:window-shutter-open"}case"blind":case"curtain":switch(e){case"opening":return"hass:arrow-up-box";case"closing":return"hass:arrow-down-box";case"closed":return"hass:blinds";default:return"hass:blinds-open"}case"window":switch(e){case"opening":return"hass:arrow-up-box";case"closing":return"hass:arrow-down-box";case"closed":return"hass:window-closed";default:return"hass:window-open"}}switch(e){case"opening":return"hass:arrow-up-box";case"closing":return"hass:arrow-down-box";case"closed":return"hass:window-closed";default:return"hass:window-open"}}(o,t);case"humidifier":return n&&"off"===n?"hass:air-humidifier-off":"hass:air-humidifier";case"lock":return"unlocked"===o?"hass:lock-open":"hass:lock";case"media_player":return"playing"===o?"hass:cast-connected":"hass:cast";case"zwave":switch(o){case"dead":return"hass:emoticon-dead";case"sleeping":return"hass:sleep";case"initializing":return"hass:timer-sand";default:return"hass:z-wave"}case"sensor":var a=function(e){var t=null==e?void 0:e.attributes.device_class;if(t&&t in r.h2)return r.h2[t];if("battery"===t)return e?(0,i.M)(e):"hass:battery";var n=null==e?void 0:e.attributes.unit_of_measurement;return n===r.ot||n===r.gD?"hass:thermometer":void 0}(t);if(a)return a;break;case"input_datetime":if(!(null==t?void 0:t.attributes.has_date))return"hass:clock";if(!t.attributes.has_time)return"hass:calendar"}return e in r.Zy?r.Zy[e]:(console.warn("Unable to find icon for domain "+e+" ("+t+")"),r.Rb)}},36145:function(e,t,n){"use strict";n.d(t,{M:function(){return a}});var r=n(49706),i=n(58831),o=n(76151),a=function(e){return e?e.attributes.icon?e.attributes.icon:(0,o.K)((0,i.M)(e.entity_id),e):r.Rb}},86977:function(e,t,n){"use strict";n.d(t,{Q:function(){return r}});var r=function(e){return!(!e.detail.selected||"property"!==e.detail.source)&&(e.currentTarget.selected=!1,!0)}},96151:function(e,t,n){"use strict";n.d(t,{T:function(){return r},y:function(){return i}});var r=function(e){requestAnimationFrame((function(){return setTimeout(e,0)}))},i=function(){return new Promise((function(e){r(e)}))}},91769:function(e,t,n){"use strict";var r=n(50856),i=n(28426),o=n(36145);n(16509);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([' <ha-icon icon="[[computeIcon(stateObj)]]"></ha-icon> ']);return s=function(){return e},e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(d,e);var t,n,i,a=f(d);function d(){return c(this,d),a.apply(this,arguments)}return t=d,i=[{key:"template",get:function(){return(0,r.d)(s())}},{key:"properties",get:function(){return{stateObj:{type:Object}}}}],(n=[{key:"computeIcon",value:function(e){return(0,o.M)(e)}}])&&l(t.prototype,n),i&&l(t,i),d}(i.H3);customElements.define("ha-state-icon",p)},81545:function(e,t,n){"use strict";n(53918),n(83238);var r=n(15652);n(10983);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){var e=s(["\n      :host {\n        display: inline-block;\n        position: relative;\n      }\n      ::slotted([disabled]) {\n        color: var(--disabled-text-color);\n      }\n    "]);return o=function(){return e},e}function a(){var e=s(["\n      <div @click=",'>\n        <slot name="trigger"></slot>\n      </div>\n      <mwc-menu\n        .corner=',"\n        .multi=","\n        .activatable=","\n      >\n        <slot></slot>\n      </mwc-menu>\n    "]);return a=function(){return e},e}function s(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(){p=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(n){t.forEach((function(t){t.kind===n&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var n=e.prototype;["method","field"].forEach((function(r){t.forEach((function(t){var i=t.placement;if(t.kind===r&&("static"===i||"prototype"===i)){var o="static"===i?e:n;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var n=t.descriptor;if("field"===t.kind){var r=t.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===r?void 0:r.call(e)}}Object.defineProperty(e,t.key,n)},decorateClass:function(e,t){var n=[],r=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!g(e))return n.push(e);var t=this.decorateElement(e,i);n.push(t.element),n.push.apply(n,t.extras),r.push.apply(r,t.finishers)}),this),!t)return{elements:n,finishers:r};var o=this.decorateConstructor(n,t);return r.push.apply(r,o.finishers),o.finishers=r,o},addElementPlacement:function(e,t,n){var r=t[e.placement];if(!n&&-1!==r.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");r.push(e.key)},decorateElement:function(e,t){for(var n=[],r=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&r.push(c.finisher);var l=c.extras;if(l){for(var u=0;u<l.length;u++)this.addElementPlacement(l[u],t);n.push.apply(n,l)}}return{element:e,finishers:r,extras:n}},decorateConstructor:function(e,t){for(var n=[],r=t.length-1;r>=0;r--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[r])(i)||i);if(void 0!==o.finisher&&n.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:n}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var n=w(e.key),r=String(e.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+r+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:n,placement:r,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:b(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var n=b(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:n}},runClassFinishers:function(e,t){for(var n=0;n<t.length;n++){var r=(0,t[n])(e);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");e=r}}return e},disallowProperty:function(e,t,n){if(void 0!==e[t])throw new TypeError(n+" can't have a ."+t+" property.")}};return e}function m(e){var t,n=w(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===e.kind?"field":"method",key:n,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(r.decorators=e.decorators),"field"===e.kind&&(r.initializer=e.value),r}function y(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function g(e){return e.decorators&&e.decorators.length}function v(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function b(e,t){var n=e[t];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+t+"' to be a function");return n}function w(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t,n,r){var i=p();if(r)for(var o=0;o<r.length;o++)i=r[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),n),s=i.decorateClass(function(e){for(var t=[],n=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},r=0;r<e.length;r++){var i,o=e[r];if("method"===o.kind&&(i=t.find(n)))if(v(o.descriptor)||v(i.descriptor)){if(g(o)||g(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(g(o)){if(g(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}y(o,i)}else t.push(o)}return t}(a.d.map(m)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,r.Mo)("ha-button-menu")],(function(e,t){return{F:function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(r,t);var n=u(r);function r(){var t;c(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=n.call.apply(n,[this].concat(o)),e(d(t)),t}return r}(t),d:[{kind:"field",decorators:[(0,r.Cb)()],key:"corner",value:function(){return"TOP_START"}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"multi",value:function(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"activatable",value:function(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"disabled",value:function(){return!1}},{kind:"field",decorators:[(0,r.IO)("mwc-menu",!0)],key:"_menu",value:void 0},{kind:"get",key:"items",value:function(){var e;return null===(e=this._menu)||void 0===e?void 0:e.items}},{kind:"get",key:"selected",value:function(){var e;return null===(e=this._menu)||void 0===e?void 0:e.selected}},{kind:"method",key:"render",value:function(){return(0,r.dy)(a(),this._handleClick,this.corner,this.multi,this.activatable)}},{kind:"method",key:"_handleClick",value:function(){this.disabled||(this._menu.anchor=this,this._menu.show())}},{kind:"get",static:!0,key:"styles",value:function(){return(0,r.iv)(o())}}]}}),r.oi)},99282:function(e,t,n){"use strict";var r=n(52039),i=n(55317);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,r,o=u(f);function f(){return a(this,f),o.apply(this,arguments)}return t=f,(n=[{key:"connectedCallback",value:function(){var e=this;c(d(f.prototype),"connectedCallback",this).call(this),setTimeout((function(){e.path="ltr"===window.getComputedStyle(e).direction?i.zrb:i.gAv}),100)}}])&&s(t.prototype,n),r&&s(t,r),f}(r.C);customElements.define("ha-icon-next",h)},74186:function(e,t,n){"use strict";n.d(t,{eD:function(){return a},Mw:function(){return s},vA:function(){return c},L3:function(){return l},Nv:function(){return u},z3:function(){return f},LM:function(){return p}});var r=n(95282),i=n(91741),o=n(38346),a=function(e,t){return t.find((function(t){return e.states[t.entity_id]&&"battery"===e.states[t.entity_id].attributes.device_class}))},s=function(e,t){return t.find((function(t){return e.states[t.entity_id]&&"battery_charging"===e.states[t.entity_id].attributes.device_class}))},c=function(e,t){if(t.name)return t.name;var n=e.states[t.entity_id];return n?(0,i.C)(n):null},l=function(e,t){return e.callWS({type:"config/entity_registry/get",entity_id:t})},u=function(e,t,n){return e.callWS(Object.assign({type:"config/entity_registry/update",entity_id:t},n))},f=function(e,t){return e.callWS({type:"config/entity_registry/remove",entity_id:t})},d=function(e){return e.sendMessagePromise({type:"config/entity_registry/list"})},h=function(e,t){return e.subscribeEvents((0,o.D)((function(){return d(e).then((function(e){return t.setState(e,!0)}))}),500,!0),"entity_registry_updated")},p=function(e,t){return(0,r.B)("_entityRegistry",d,h,e,t)}},5986:function(e,t,n){"use strict";n.d(t,{H0:function(){return r},Lh:function(){return i},F3:function(){return o},t4:function(){return a}});var r=function(e,t){return t.issue_tracker||"https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+".concat(e,"%22")},i=function(e,t){return e("component.".concat(t,".title"))||t},o=function(e){return e.callWS({type:"manifest/list"})},a=function(e,t){return e.callWS({type:"manifest/get",integration:t})}},73826:function(e,t,n){"use strict";n.d(t,{f:function(){return k}});var r=n(15652);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var i=w(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t,n,r){var i=f();if(r)for(var o=0;o<r.length;o++)i=r[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),n),s=i.decorateClass(function(e){for(var t=[],n=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},r=0;r<e.length;r++){var i,o=e[r];if("method"===o.kind&&(i=t.find(n)))if(m(o.descriptor)||m(i.descriptor)){if(p(o)||p(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(p(o)){if(p(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}h(o,i)}else t.push(o)}return t}(a.d.map(d)),e);return i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}function f(){f=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(n){t.forEach((function(t){t.kind===n&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var n=e.prototype;["method","field"].forEach((function(r){t.forEach((function(t){var i=t.placement;if(t.kind===r&&("static"===i||"prototype"===i)){var o="static"===i?e:n;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var n=t.descriptor;if("field"===t.kind){var r=t.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===r?void 0:r.call(e)}}Object.defineProperty(e,t.key,n)},decorateClass:function(e,t){var n=[],r=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!p(e))return n.push(e);var t=this.decorateElement(e,i);n.push(t.element),n.push.apply(n,t.extras),r.push.apply(r,t.finishers)}),this),!t)return{elements:n,finishers:r};var o=this.decorateConstructor(n,t);return r.push.apply(r,o.finishers),o.finishers=r,o},addElementPlacement:function(e,t,n){var r=t[e.placement];if(!n&&-1!==r.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");r.push(e.key)},decorateElement:function(e,t){for(var n=[],r=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&r.push(c.finisher);var l=c.extras;if(l){for(var u=0;u<l.length;u++)this.addElementPlacement(l[u],t);n.push.apply(n,l)}}return{element:e,finishers:r,extras:n}},decorateConstructor:function(e,t){for(var n=[],r=t.length-1;r>=0;r--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[r])(i)||i);if(void 0!==o.finisher&&n.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:n}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var n=g(e.key),r=String(e.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+r+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:n,placement:r,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:y(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var n=y(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:n}},runClassFinishers:function(e,t){for(var n=0;n<t.length;n++){var r=(0,t[n])(e);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");e=r}}return e},disallowProperty:function(e,t,n){if(void 0!==e[t])throw new TypeError(n+" can't have a ."+t+" property.")}};return e}function d(e){var t,n=g(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===e.kind?"field":"method",key:n,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(r.decorators=e.decorators),"field"===e.kind&&(r.initializer=e.value),r}function h(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function p(e){return e.decorators&&e.decorators.length}function m(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function y(e,t){var n=e[t];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+t+"' to be a function");return n}function g(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t,n){return(b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=w(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){return u(null,(function(e,t){var n=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(r,t);var n=s(r);function r(){var t;o(this,r);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return t=n.call.apply(n,[this].concat(a)),e(l(t)),t}return r}(t);return{F:n,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",key:"__unsubs",value:void 0},{kind:"method",key:"connectedCallback",value:function(){b(w(n.prototype),"connectedCallback",this).call(this),this.__checkSubscribed()}},{kind:"method",key:"disconnectedCallback",value:function(){if(b(w(n.prototype),"disconnectedCallback",this).call(this),this.__unsubs){for(;this.__unsubs.length;){var e=this.__unsubs.pop();e instanceof Promise?e.then((function(e){return e()})):e()}this.__unsubs=void 0}}},{kind:"method",key:"updated",value:function(e){b(w(n.prototype),"updated",this).call(this,e),e.has("hass")&&this.__checkSubscribed()}},{kind:"method",key:"hassSubscribe",value:function(){return[]}},{kind:"method",key:"__checkSubscribed",value:function(){void 0===this.__unsubs&&this.isConnected&&void 0!==this.hass&&(this.__unsubs=this.hassSubscribe())}}]}}),e)}},72019:function(e,t,n){"use strict";n.r(t);n(29119),n(25230),n(81689);var r=n(55317),i=(n(1722),n(81480)),o=n(15652),a=n(81471),s=n(14516),c=(n(7164),n(85415)),l=n(96151),u=(n(91769),n(81545),n(22098),n(52039),n(81582)),f=n(95282),d=n(38346),h=n(5986),p=["unignore","homekit","ssdp","zeroconf","discovery","mqtt"],m=["reauth"],y=function(e,t){var n;return e.callApi("POST","config/config_entries/flow",{handler:t,show_advanced_options:Boolean(null===(n=e.userData)||void 0===n?void 0:n.showAdvanced)})},g=function(e,t){return e.callApi("GET","config/config_entries/flow/".concat(t))},v=function(e,t,n){return e.callApi("POST","config/config_entries/flow/".concat(t),n)},b=function(e,t){return e.callApi("DELETE","config/config_entries/flow/".concat(t))},w=function(e){return e.callApi("GET","config/config_entries/flow_handlers")},k=function(e){return e.sendMessagePromise({type:"config_entries/flow/progress"})},_=function(e,t){return e.subscribeEvents((0,d.D)((function(){return k(e).then((function(e){return t.setState(e,!0)}))}),500,!0),"config_entry_discovered")},E=function(e){return(0,f._)(e,"_configFlowProgress",k,_)},x=function(e,t){var n=t.context.title_placeholders||{},r=Object.keys(n);if(0===r.length)return(0,h.Lh)(e,t.handler);var i=[];return r.forEach((function(e){i.push(e),i.push(n[e])})),e.apply(void 0,["component.".concat(t.handler,".config.flow_title")].concat(i))},S=n(57292),z=n(74186),P=n(35359),O=n(52871);function C(){var e=I(["\n              <ha-markdown\n                allowsvg\n                breaks\n                .content=","\n              ></ha-markdown>\n            "]);return C=function(){return e},e}function j(){var e=I(["\n        ","\n        <p>\n          ","\n        </p>\n      "]);return j=function(){return e},e}function A(){var e=I(["\n              <ha-markdown\n                allowsvg\n                breaks\n                .content=","\n              ></ha-markdown>\n            "]);return A=function(){return e},e}function D(){var e=I(["\n        <p>\n          ","\n        </p>\n        ","\n      "]);return D=function(){return e},e}function R(){var e=I(["\n            <ha-markdown allowsvg breaks .content=","></ha-markdown>\n          "]);return R=function(){return e},e}function T(){var e=I(["\n            <ha-markdown allowsvg breaks .content=","></ha-markdown>\n          "]);return T=function(){return e},e}function I(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function B(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){M(o,r,i,a,s,"next",e)}function s(e){M(o,r,i,a,s,"throw",e)}a(void 0)}))}}var q=function(e,t){return(0,O.w)(e,t,{loadDevicesAndAreas:!0,getFlowHandlers:(i=B(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([w(t),t.loadBackendTranslation("title",void 0,!0)]);case 2:return n=e.sent,r=F(n,1),i=r[0],e.abrupt("return",i.sort((function(e,n){return(0,c.w)((0,h.Lh)(t.localize,e),(0,h.Lh)(t.localize,n))})));case 6:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)}),createFlow:(r=B(regeneratorRuntime.mark((function e(t,n){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([y(t,n),t.loadBackendTranslation("config",n)]);case 2:return r=e.sent,i=F(r,1),o=i[0],e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)}))),function(e,t){return r.apply(this,arguments)}),fetchFlow:(n=B(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g(t,n);case 2:return r=e.sent,e.next=5,t.loadBackendTranslation("config",r.handler);case 5:return e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)}),handleFlowStep:v,deleteFlow:b,renderAbortDescription:function(e,t){var n=(0,P.I)(e.localize,"component.".concat(t.handler,".config.abort.").concat(t.reason),t.description_placeholders);return n?(0,o.dy)(T(),n):""},renderShowFormStepHeader:function(e,t){return e.localize("component.".concat(t.handler,".config.step.").concat(t.step_id,".title"))||e.localize("component.".concat(t.handler,".title"))},renderShowFormStepDescription:function(e,t){var n=(0,P.I)(e.localize,"component.".concat(t.handler,".config.step.").concat(t.step_id,".description"),t.description_placeholders);return n?(0,o.dy)(R(),n):""},renderShowFormStepFieldLabel:function(e,t,n){return e.localize("component.".concat(t.handler,".config.step.").concat(t.step_id,".data.").concat(n.name))},renderShowFormStepFieldError:function(e,t,n){return e.localize("component.".concat(t.handler,".config.error.").concat(n))},renderExternalStepHeader:function(e,t){return e.localize("component.".concat(t.handler,".config.step.").concat(t.step_id,".title"))||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site")},renderExternalStepDescription:function(e,t){var n=(0,P.I)(e.localize,"component.".concat(t.handler,".config.").concat(t.step_id,".description"),t.description_placeholders);return(0,o.dy)(D(),e.localize("ui.panel.config.integrations.config_flow.external_step.description"),n?(0,o.dy)(A(),n):"")},renderCreateEntryDescription:function(e,t){var n=(0,P.I)(e.localize,"component.".concat(t.handler,".config.create_entry.").concat(t.description||"default"),t.description_placeholders);return(0,o.dy)(j(),n?(0,o.dy)(C(),n):"",e.localize("ui.panel.config.integrations.config_flow.created_config","name",t.title))}});var n,r,i},U=n(26765),N=(n(15291),n(1359),n(73826)),Z=n(11654),K=n(29311),W=n(17416),G=n(47181),Q=function(){return Promise.all([n.e(5009),n.e(3641),n.e(6547),n.e(8722),n.e(6968)]).then(n.bind(n,23466))},$=(n(99282),n(86977));function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(){var e=fe(["\n        :host {\n          max-width: 500px;\n        }\n        ha-card {\n          display: flex;\n          flex-direction: column;\n          height: 100%;\n        }\n        ha-card.single {\n          justify-content: space-between;\n        }\n        :host(.highlight) ha-card {\n          border: 1px solid var(--accent-color);\n        }\n        .card-content {\n          padding: 16px;\n          text-align: center;\n        }\n        ha-card.integration .card-content {\n          padding-bottom: 3px;\n        }\n        .card-actions {\n          border-top: none;\n          display: flex;\n          justify-content: space-between;\n          align-items: center;\n          padding-right: 5px;\n        }\n        .group-header {\n          display: flex;\n          align-items: center;\n          height: 40px;\n          padding: 16px 16px 8px 16px;\n          justify-content: center;\n        }\n        .group-header h1 {\n          margin: 0;\n        }\n        .group-header img {\n          margin-right: 8px;\n        }\n        .image {\n          display: flex;\n          align-items: center;\n          justify-content: center;\n          height: 60px;\n          margin-bottom: 16px;\n          vertical-align: middle;\n        }\n        img {\n          max-height: 100%;\n          max-width: 90%;\n        }\n        .none-found {\n          margin: auto;\n          text-align: center;\n        }\n        a {\n          color: var(--primary-color);\n        }\n        h1 {\n          margin-bottom: 0;\n        }\n        h2 {\n          min-height: 24px;\n        }\n        h3 {\n          word-wrap: break-word;\n          display: -webkit-box;\n          -webkit-box-orient: vertical;\n          -webkit-line-clamp: 3;\n          overflow: hidden;\n          text-overflow: ellipsis;\n        }\n        ha-button-menu {\n          color: var(--secondary-text-color);\n          --mdc-menu-min-width: 200px;\n        }\n        @media (min-width: 563px) {\n          paper-listbox {\n            max-height: 150px;\n            overflow: auto;\n          }\n        }\n        paper-item {\n          cursor: pointer;\n          min-height: 35px;\n        }\n        mwc-list-item ha-svg-icon {\n          color: var(--secondary-text-color);\n        }\n        .back-btn {\n          position: absolute;\n          background: rgba(var(--rgb-card-background-color), 0.6);\n          border-radius: 50%;\n        }\n      "]);return X=function(){return e},e}function J(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function V(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){J(o,r,i,a,s,"next",e)}function s(e){J(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Y(){var e=fe(['<mwc-list-item @request-selected="','">\n                  ',"\n                </mwc-list-item>"]);return Y=function(){return e},e}function ee(){var e=fe(["\n                  <a\n                    href=",'\n                    rel="noreferrer"\n                    target="_blank"\n                  >\n                    <mwc-list-item hasMeta>\n                      ','<ha-svg-icon\n                        slot="meta"\n                        .path=',"\n                      ></ha-svg-icon>\n                    </mwc-list-item>\n                  </a>\n                "]);return ee=function(){return e},e}function te(){var e=fe(["\n                  <mwc-button @click=",">\n                    ","\n                  </mwc-button>\n                "]);return te=function(){return e},e}function ne(){var e=fe(["<a\n                  href=","\n                  ><mwc-button>\n                    ","\n                  </mwc-button></a\n                >"]);return ne=function(){return e},e}function re(){var e=fe(["\n                        <a\n                          href=","\n                          >","</a\n                        >\n                      "]);return re=function(){return e},e}function ie(){var e=fe(["\n                        <a\n                          href=","\n                          >","</a\n                        >\n                      "]);return ie=function(){return e},e}function oe(){var e=fe(["\n                        <a\n                          href=","\n                          >","</a\n                        >","\n                      "]);return oe=function(){return e},e}function ae(){var e=fe(["\n                <div>\n                  ","\n                  ","\n                  ","\n                  ","\n                </div>\n              "]);return ae=function(){return e},e}function se(){var e=fe(['<ha-icon-button\n              class="back-btn"\n              icon="hass:chevron-left"\n              @click=',"\n            ></ha-icon-button>"]);return se=function(){return e},e}function ce(){var e=fe(['\n      <ha-card\n        outlined\n        class="single integration"\n        .configEntry=',"\n        .id=","\n      >\n        ",'\n        <div class="card-content">\n          <div class="image">\n            <img\n              src="https://brands.home-assistant.io/','/logo.png"\n              referrerpolicy="no-referrer"\n              @error=',"\n              @load=","\n            />\n          </div>\n          <h2>\n            ","\n          </h2>\n          <h3>\n            ","\n          </h3>\n          ",'\n        </div>\n        <div class="card-actions">\n          <div>\n            <mwc-button @click=',"\n              >","</mwc-button\n            >\n            ",'\n          </div>\n          <ha-button-menu corner="BOTTOM_START">\n            <mwc-icon-button\n              .title=',"\n              .label=",'\n              slot="trigger"\n            >\n              <ha-svg-icon .path=','></ha-svg-icon>\n            </mwc-icon-button>\n            <mwc-list-item @request-selected="','">\n              ',"\n            </mwc-list-item>\n            ","\n            ",'\n            <mwc-list-item\n              class="warning"\n              @request-selected="','"\n            >\n              ',"\n            </mwc-list-item>\n          </ha-button-menu>\n        </div>\n      </ha-card>\n    "]);return ce=function(){return e},e}function le(){var e=fe(["<paper-item\n                .entryId=","\n                @click=","\n                ><paper-item-body\n                  >","</paper-item-body\n                ><ha-icon-next></ha-icon-next\n              ></paper-item>"]);return le=function(){return e},e}function ue(){var e=fe(['\n      <ha-card outlined class="group">\n        <div class="group-header">\n          <img\n            src="https://brands.home-assistant.io/','/icon.png"\n            referrerpolicy="no-referrer"\n            @error=',"\n            @load=","\n          />\n          <h2>\n            ","\n          </h2>\n        </div>\n        <paper-listbox>\n          ","\n        </paper-listbox>\n      </ha-card>\n    "]);return ue=function(){return e},e}function fe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function de(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ze(e);if(t){var i=ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return me(this,n)}}function me(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?ye(e):t}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ge(){ge=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(n){t.forEach((function(t){t.kind===n&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var n=e.prototype;["method","field"].forEach((function(r){t.forEach((function(t){var i=t.placement;if(t.kind===r&&("static"===i||"prototype"===i)){var o="static"===i?e:n;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var n=t.descriptor;if("field"===t.kind){var r=t.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===r?void 0:r.call(e)}}Object.defineProperty(e,t.key,n)},decorateClass:function(e,t){var n=[],r=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!we(e))return n.push(e);var t=this.decorateElement(e,i);n.push(t.element),n.push.apply(n,t.extras),r.push.apply(r,t.finishers)}),this),!t)return{elements:n,finishers:r};var o=this.decorateConstructor(n,t);return r.push.apply(r,o.finishers),o.finishers=r,o},addElementPlacement:function(e,t,n){var r=t[e.placement];if(!n&&-1!==r.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");r.push(e.key)},decorateElement:function(e,t){for(var n=[],r=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&r.push(c.finisher);var l=c.extras;if(l){for(var u=0;u<l.length;u++)this.addElementPlacement(l[u],t);n.push.apply(n,l)}}return{element:e,finishers:r,extras:n}},decorateConstructor:function(e,t){for(var n=[],r=t.length-1;r>=0;r--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[r])(i)||i);if(void 0!==o.finisher&&n.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:n}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return xe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var n=Ee(e.key),r=String(e.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+r+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:n,placement:r,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:_e(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var n=_e(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:n}},runClassFinishers:function(e,t){for(var n=0;n<t.length;n++){var r=(0,t[n])(e);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");e=r}}return e},disallowProperty:function(e,t,n){if(void 0!==e[t])throw new TypeError(n+" can't have a ."+t+" property.")}};return e}function ve(e){var t,n=Ee(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===e.kind?"field":"method",key:n,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(r.decorators=e.decorators),"field"===e.kind&&(r.initializer=e.value),r}function be(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function we(e){return e.decorators&&e.decorators.length}function ke(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function _e(e,t){var n=e[t];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+t+"' to be a function");return n}function Ee(e){var t=function(e,t){if("object"!==H(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==H(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===H(t)?t:String(t)}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Se(e,t,n){return(Se="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ze(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ze(e){return(ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pe={mqtt:{buttonLocalizeKey:"ui.panel.config.mqtt.button",path:"/config/mqtt"},zha:{buttonLocalizeKey:"ui.panel.config.zha.button",path:"/config/zha/dashboard"},ozw:{buttonLocalizeKey:"ui.panel.config.ozw.button",path:"/config/ozw/dashboard"},zwave:{buttonLocalizeKey:"ui.panel.config.zwave.button",path:"/config/zwave"}};!function(e,t,n,r){var i=ge();if(r)for(var o=0;o<r.length;o++)i=r[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),n),s=i.decorateClass(function(e){for(var t=[],n=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},r=0;r<e.length;r++){var i,o=e[r];if("method"===o.kind&&(i=t.find(n)))if(ke(o.descriptor)||ke(i.descriptor)){if(we(o)||we(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(we(o)){if(we(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}be(o,i)}else t.push(o)}return t}(a.d.map(ve)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,o.Mo)("ha-integration-card")],(function(e,t){var n,i,a,s=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(r,t);var n=pe(r);function r(){var t;de(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=n.call.apply(n,[this].concat(o)),e(ye(t)),t}return r}(t);return{F:s,d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"domain",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"items",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"manifest",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"entityRegistryEntries",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"deviceRegistryEntries",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"selectedConfigEntryId",value:void 0},{kind:"method",key:"firstUpdated",value:function(e){Se(ze(s.prototype),"firstUpdated",this).call(this,e)}},{kind:"method",key:"render",value:function(){var e=this;if(1===this.items.length)return this._renderSingleEntry(this.items[0]);if(this.selectedConfigEntryId){var t=this.items.find((function(t){return t.entry_id===e.selectedConfigEntryId}));if(t)return this._renderSingleEntry(t)}return this._renderGroupedIntegration()}},{kind:"method",key:"_renderGroupedIntegration",value:function(){var e=this;return(0,o.dy)(ue(),this.domain,this._onImageError,this._onImageLoad,(0,h.Lh)(this.hass.localize,this.domain),this.items.map((function(t){return(0,o.dy)(le(),t.entry_id,e._selectConfigEntry,t.title||e.hass.localize("ui.panel.config.integrations.config_entry.unnamed_entry"))})))}},{kind:"method",key:"_renderSingleEntry",value:function(e){var t=this._getDevices(e),n=this._getServices(e),i=this._getEntities(e);return(0,o.dy)(ce(),e,e.entry_id,this.items.length>1?(0,o.dy)(se(),this._back):"",e.domain,this._onImageError,this._onImageLoad,e.localized_domain_name,e.localized_domain_name===e.title?"":e.title,t.length||n.length||i.length?(0,o.dy)(ae(),t.length?(0,o.dy)(oe(),"/config/devices/dashboard?historyBack=1&config_entry=".concat(e.entry_id),this.hass.localize("ui.panel.config.integrations.config_entry.devices","count",t.length),n.length?",":""):"",n.length?(0,o.dy)(ie(),"/config/devices/dashboard?historyBack=1&config_entry=".concat(e.entry_id),this.hass.localize("ui.panel.config.integrations.config_entry.services","count",n.length)):"",(t.length||n.length)&&i.length?this.hass.localize("ui.common.and"):"",i.length?(0,o.dy)(re(),"/config/entities?historyBack=1&config_entry=".concat(e.entry_id),this.hass.localize("ui.panel.config.integrations.config_entry.entities","count",i.length)):""):"",this._editEntryName,this.hass.localize("ui.panel.config.integrations.config_entry.rename"),e.domain in Pe?(0,o.dy)(ne(),"".concat(Pe[e.domain].path,"?config_entry=").concat(e.entry_id),this.hass.localize(Pe[e.domain].buttonLocalizeKey)):e.supports_options?(0,o.dy)(te(),this._showOptions,this.hass.localize("ui.panel.config.integrations.config_entry.options")):"",this.hass.localize("ui.common.menu"),this.hass.localize("ui.common.overflow_menu"),r.SXi,this._handleSystemOptions,this.hass.localize("ui.panel.config.integrations.config_entry.system_options"),this.manifest?(0,o.dy)(ee(),this.manifest.documentation,this.hass.localize("ui.panel.config.integrations.config_entry.documentation"),r.fOx):"","loaded"===e.state&&e.supports_unload?(0,o.dy)(Y(),this._handleReload,this.hass.localize("ui.panel.config.integrations.config_entry.reload")):"",this._handleDelete,this.hass.localize("ui.panel.config.integrations.config_entry.delete"))}},{kind:"method",key:"_selectConfigEntry",value:function(e){this.selectedConfigEntryId=e.currentTarget.entryId}},{kind:"method",key:"_back",value:function(){this.selectedConfigEntryId=void 0,this.classList.remove("highlight")}},{kind:"method",key:"_getEntities",value:function(e){return this.entityRegistryEntries?this.entityRegistryEntries.filter((function(t){return t.config_entry_id===e.entry_id})):[]}},{kind:"method",key:"_getDevices",value:function(e){return this.deviceRegistryEntries?this.deviceRegistryEntries.filter((function(t){return t.config_entries.includes(e.entry_id)&&"service"!==t.entry_type})):[]}},{kind:"method",key:"_getServices",value:function(e){return this.deviceRegistryEntries?this.deviceRegistryEntries.filter((function(t){return t.config_entries.includes(e.entry_id)&&"service"===t.entry_type})):[]}},{kind:"method",key:"_onImageLoad",value:function(e){e.target.style.visibility="initial"}},{kind:"method",key:"_onImageError",value:function(e){e.target.style.visibility="hidden"}},{kind:"method",key:"_showOptions",value:function(e){(0,W.c)(this,e.target.closest("ha-card").configEntry)}},{kind:"method",key:"_handleReload",value:function(e){(0,$.Q)(e)&&this._reloadIntegration(e.target.closest("ha-card").configEntry)}},{kind:"method",key:"_handleDelete",value:function(e){(0,$.Q)(e)&&this._removeIntegration(e.target.closest("ha-card").configEntry)}},{kind:"method",key:"_handleSystemOptions",value:function(e){(0,$.Q)(e)&&this._showSystemOptions(e.target.closest("ha-card").configEntry)}},{kind:"method",key:"_showSystemOptions",value:function(e){var t,n;t=this,n={entry:e},(0,G.B)(t,"show-dialog",{dialogTag:"dialog-config-entry-system-options",dialogImport:Q,dialogParams:n})}},{kind:"method",key:"_removeIntegration",value:(a=V(regeneratorRuntime.mark((function e(t){var n,r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.entry_id,e.next=3,(0,U.g7)(this,{text:this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm")});case 3:if(e.sent){e.next=6;break}return e.abrupt("return");case 6:(0,u.iJ)(this.hass,n).then((function(e){(0,G.B)(r,"entry-removed",{entryId:n}),e.require_restart&&(0,U.Ys)(r,{text:r.hass.localize("ui.panel.config.integrations.config_entry.restart_confirm")})}));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{kind:"method",key:"_reloadIntegration",value:(i=V(regeneratorRuntime.mark((function e(t){var n,r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.entry_id,(0,u.Nn)(this.hass,n).then((function(e){var t=e.require_restart?"reload_restart_confirm":"reload_confirm";(0,U.Ys)(r,{text:r.hass.localize("ui.panel.config.integrations.config_entry.".concat(t))})}));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{kind:"method",key:"_editEntryName",value:(n=V(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.target.closest("ha-card").configEntry,e.next=3,(0,U.D9)(this,{title:this.hass.localize("ui.panel.config.integrations.rename_dialog"),defaultValue:n.title,inputLabel:this.hass.localize("ui.panel.config.integrations.rename_input_label")});case 3:if(null!==(r=e.sent)){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,(0,u.SO)(this.hass,n.entry_id,{title:r});case 8:i=e.sent,(0,G.B)(this,"entry-updated",{entry:i});case 10:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return[Z.Qx,(0,o.iv)(X())]}}]}}),o.oi);function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ce(){var e=Ne(["\n        .container {\n          display: grid;\n          grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n          grid-gap: 16px 16px;\n          padding: 8px 16px 16px;\n          margin-bottom: 64px;\n        }\n        ha-card {\n          max-width: 500px;\n          display: flex;\n          flex-direction: column;\n          justify-content: space-between;\n        }\n        .attention {\n          --ha-card-border-color: var(--error-color);\n        }\n        .attention .header {\n          background: var(--error-color);\n          color: var(--text-primary-color);\n          padding: 8px;\n          text-align: center;\n        }\n        .attention mwc-button {\n          --mdc-theme-primary: var(--error-color);\n        }\n        .discovered {\n          --ha-card-border-color: var(--primary-color);\n        }\n        .discovered .header {\n          background: var(--primary-color);\n          color: var(--text-primary-color);\n          padding: 8px;\n          text-align: center;\n        }\n        .ignored {\n          --ha-card-border-color: var(--light-theme-disabled-color);\n        }\n        .ignored img {\n          filter: grayscale(1);\n        }\n        .ignored .header {\n          background: var(--light-theme-disabled-color);\n          color: var(--text-primary-color);\n          padding: 8px;\n          text-align: center;\n        }\n        .card-content {\n          display: flex;\n          height: 100%;\n          margin-top: 0;\n          padding: 16px;\n          text-align: center;\n          flex-direction: column;\n          justify-content: space-between;\n        }\n        .image {\n          display: flex;\n          align-items: center;\n          justify-content: center;\n          height: 60px;\n          margin-bottom: 16px;\n          vertical-align: middle;\n        }\n        .none-found {\n          margin: auto;\n          text-align: center;\n        }\n        search-input.header {\n          display: block;\n          position: relative;\n          left: -8px;\n          color: var(--secondary-text-color);\n          margin-left: 16px;\n        }\n        .search {\n          padding: 0 16px;\n          background: var(--sidebar-background-color);\n          border-bottom: 1px solid var(--divider-color);\n        }\n        .search search-input {\n          position: relative;\n          top: 2px;\n        }\n        img {\n          max-height: 100%;\n          max-width: 90%;\n        }\n        .none-found {\n          margin: auto;\n          text-align: center;\n        }\n        h1 {\n          margin-bottom: 0;\n        }\n        h2 {\n          margin-top: 0;\n        }\n      "]);return Ce=function(){return e},e}function je(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=ot(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ae(){var e=Ne(['\n                <div class="none-found">\n                  <h1>\n                    ',"\n                  </h1>\n                  <p>\n                    ","\n                  </p>\n                </div>\n              "]);return Ae=function(){return e},e}function De(){var e=Ne(['\n                <ha-card outlined>\n                  <div class="card-content">\n                    <h1>\n                      ',"\n                    </h1>\n                    <p>\n                      ","\n                    </p>\n                    <mwc-button @click="," unelevated\n                      >","</mwc-button\n                    >\n                  </div>\n                </ha-card>\n              "]);return De=function(){return e},e}function Re(){var e=Ne(["<ha-integration-card\n                    data-domain=","\n                    .hass=","\n                    .domain=","\n                    .items=","\n                    .manifest=","\n                    .entityRegistryEntries=","\n                    .deviceRegistryEntries=","\n                  ></ha-integration-card>"]);return Re=function(){return e},e}function Te(){var e=Ne(["\n                                <mwc-button\n                                  @click=","\n                                  .flow=","\n                                >\n                                  ","\n                                </mwc-button>\n                              "]);return Te=function(){return e},e}function Ie(){var e=Ne(["\n                    <ha-card\n                      outlined\n                      class=",'\n                    >\n                      <div class="header">\n                        ','\n                      </div>\n                      <div class="card-content">\n                        <div class="image">\n                          <img\n                            src="https://brands.home-assistant.io/','/logo.png"\n                            referrerpolicy="no-referrer"\n                            @error=',"\n                            @load=","\n                          />\n                        </div>\n                        <h2>\n                          ","\n                        </h2>\n                        <div>\n                          <mwc-button\n                            unelevated\n                            @click=","\n                            .flowId=","\n                          >\n                            ","\n                          </mwc-button>\n                          ","\n                        </div>\n                      </div>\n                    </ha-card>\n                  "]);return Ie=function(){return e},e}function Fe(){var e=Ne(['\n                  <ha-card outlined class="ignored">\n                    <div class="header">\n                      ','\n                    </div>\n                    <div class="card-content">\n                      <div class="image">\n                        <img\n                          src="https://brands.home-assistant.io/','/logo.png"\n                          referrerpolicy="no-referrer"\n                          @error=',"\n                          @load=","\n                        />\n                      </div>\n                      <h2>\n                        ","\n                      </h2>\n                      <mwc-button\n                        @click=","\n                        .entry=","\n                        aria-label=","\n                        >","</mwc-button\n                      >\n                    </div>\n                  </ha-card>\n                "]);return Fe=function(){return e},e}function Le(){var e=Ne(['\n              <div class="search">\n                <search-input\n                  no-label-float\n                  no-underline\n                  .filter=',"\n                  @value-changed=","\n                  .label=","\n                ></search-input>\n              </div>\n            "]);return Le=function(){return e},e}function Me(){var e=Ne(['\n              <div slot="header">\n                <slot name="header">\n                  <search-input\n                    .filter=','\n                    class="header"\n                    no-label-float\n                    no-underline\n                    @value-changed=',"\n                    .label=","\n                  ></search-input>\n                </slot>\n              </div>\n            "]);return Me=function(){return e},e}function Be(){var e=Ne(["\n      <hass-tabs-subpage\n        .hass=","\n        .narrow=",'\n        back-path="/config"\n        .route=',"\n        .tabs=","\n      >\n        ",'\n        <ha-button-menu\n          corner="BOTTOM_START"\n          slot="toolbar-icon"\n          @action=',"\n        >\n          <mwc-icon-button\n            .title=","\n            .label=",'\n            slot="trigger"\n          >\n            <ha-svg-icon .path=',"></ha-svg-icon>\n          </mwc-icon-button>\n          <mwc-list-item>\n            ","\n          </mwc-list-item>\n        </ha-button-menu>\n\n        ",'\n\n        <div\n          class="container"\n          @entry-removed=',"\n          @entry-updated=","\n        >\n          ","\n          ","\n          ","\n          ",'\n        </div>\n        <mwc-fab\n          slot="fab"\n          aria-label=',"\n          title=","\n          @click=",'\n        >\n          <ha-svg-icon slot="icon" .path=',"></ha-svg-icon>\n        </mwc-fab>\n      </hass-tabs-subpage>\n    "]);return Be=function(){return e},e}function qe(e,t){return ct(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||ot(e,t)||it()}function Ue(){var e=Ne(["<hass-loading-screen></hass-loading-screen>"]);return Ue=function(){return e},e}function Ne(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ze(e){return function(e){if(Array.isArray(e))return at(e)}(e)||st(e)||ot(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ke(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function We(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Ke(o,r,i,a,s,"next",e)}function s(e){Ke(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qe(e,t){return(Qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ut(e);if(t){var i=ut(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return He(this,n)}}function He(e,t){return!t||"object"!==Oe(t)&&"function"!=typeof t?Xe(e):t}function Xe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Je(){Je=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(n){t.forEach((function(t){t.kind===n&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var n=e.prototype;["method","field"].forEach((function(r){t.forEach((function(t){var i=t.placement;if(t.kind===r&&("static"===i||"prototype"===i)){var o="static"===i?e:n;this.defineClassElement(o,t)}}),this)}),this)},defineClassElement:function(e,t){var n=t.descriptor;if("field"===t.kind){var r=t.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===r?void 0:r.call(e)}}Object.defineProperty(e,t.key,n)},decorateClass:function(e,t){var n=[],r=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!et(e))return n.push(e);var t=this.decorateElement(e,i);n.push(t.element),n.push.apply(n,t.extras),r.push.apply(r,t.finishers)}),this),!t)return{elements:n,finishers:r};var o=this.decorateConstructor(n,t);return r.push.apply(r,o.finishers),o.finishers=r,o},addElementPlacement:function(e,t,n){var r=t[e.placement];if(!n&&-1!==r.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");r.push(e.key)},decorateElement:function(e,t){for(var n=[],r=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&r.push(c.finisher);var l=c.extras;if(l){for(var u=0;u<l.length;u++)this.addElementPlacement(l[u],t);n.push.apply(n,l)}}return{element:e,finishers:r,extras:n}},decorateConstructor:function(e,t){for(var n=[],r=t.length-1;r>=0;r--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[r])(i)||i);if(void 0!==o.finisher&&n.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:n}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,ct(t)||st(t)||ot(t)||it()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var n=rt(e.key),r=String(e.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+r+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var o={kind:t,key:n,placement:r,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),o.initializer=e.initializer),o},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:nt(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var n=nt(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:n}},runClassFinishers:function(e,t){for(var n=0;n<t.length;n++){var r=(0,t[n])(e);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");e=r}}return e},disallowProperty:function(e,t,n){if(void 0!==e[t])throw new TypeError(n+" can't have a ."+t+" property.")}};return e}function Ve(e){var t,n=rt(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===e.kind?"field":"method",key:n,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(r.decorators=e.decorators),"field"===e.kind&&(r.initializer=e.value),r}function Ye(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function et(e){return e.decorators&&e.decorators.length}function tt(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function nt(e,t){var n=e[t];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+t+"' to be a function");return n}function rt(e){var t=function(e,t){if("object"!==Oe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Oe(t)?t:String(t)}function it(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ot(e,t){if(e){if("string"==typeof e)return at(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?at(e,t):void 0}}function at(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function st(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function ct(e){if(Array.isArray(e))return e}function lt(e,t,n){return(lt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ut(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ut(e){return(ut=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e,t,n,r){var i=Je();if(r)for(var o=0;o<r.length;o++)i=r[o](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),n),s=i.decorateClass(function(e){for(var t=[],n=function(e){return"method"===e.kind&&e.key===o.key&&e.placement===o.placement},r=0;r<e.length;r++){var i,o=e[r];if("method"===o.kind&&(i=t.find(n)))if(tt(o.descriptor)||tt(i.descriptor)){if(et(o)||et(i))throw new ReferenceError("Duplicated methods ("+o.key+") can't be decorated.");i.descriptor=o.descriptor}else{if(et(o)){if(et(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+o.key+").");i.decorators=o.decorators}Ye(o,i)}else t.push(o)}return t}(a.d.map(Ve)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,o.Mo)("ha-config-integrations")],(function(e,t){var n,f,d,y,g=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qe(e,t)}(r,t);var n=$e(r);function r(){var t;Ge(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return t=n.call.apply(n,[this].concat(o)),e(Xe(t)),t}return r}(t);return{F:g,d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"narrow",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"isWide",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"showAdvanced",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"route",value:void 0},{kind:"field",decorators:[(0,o.sz)()],key:"_configEntries",value:void 0},{kind:"field",decorators:[(0,o.Cb)()],key:"_configEntriesInProgress",value:function(){return[]}},{kind:"field",decorators:[(0,o.sz)()],key:"_entityRegistryEntries",value:function(){return[]}},{kind:"field",decorators:[(0,o.sz)()],key:"_deviceRegistryEntries",value:function(){return[]}},{kind:"field",decorators:[(0,o.sz)()],key:"_manifests",value:void 0},{kind:"field",decorators:[(0,o.sz)()],key:"_showIgnored",value:function(){return!1}},{kind:"field",decorators:[(0,o.sz)()],key:"_searchParms",value:function(){return new URLSearchParams(window.location.hash.substring(1))}},{kind:"field",decorators:[(0,o.sz)()],key:"_filter",value:void 0},{kind:"method",key:"hassSubscribe",value:function(){var e,t,n=this;return[(0,z.LM)(this.hass.connection,(function(e){n._entityRegistryEntries=e})),(0,S.q4)(this.hass.connection,(function(e){n._deviceRegistryEntries=e})),(e=this.hass,t=function(){var e=We(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[],t.forEach((function(e){e.context.title_placeholders&&r.push(n.hass.loadBackendTranslation("config",e.handler))})),e.next=4,Promise.all(r);case 4:return e.next=6,(0,l.y)();case 6:n._configEntriesInProgress=t.map((function(e){return Object.assign({},e,{localized_title:x(n.hass.localize,e)})}));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E(e.connection).subscribe(t))]}},{kind:"field",key:"_filterConfigEntries",value:function(){return(0,s.Z)((function(e,t){if(!t)return Ze(e);return new i.Z(e,{keys:["domain","localized_domain_name","title"],isCaseSensitive:!1,minMatchCharLength:2,threshold:.2}).search(t).map((function(e){return e.item}))}))}},{kind:"field",key:"_filterGroupConfigEntries",value:function(){var e=this;return(0,s.Z)((function(t,n){for(var r,i,o=e._filterConfigEntries(t,n),a=[],s=o.length-1;s>=0;s--)"ignore"===o[s].source&&a.push(o.splice(s,1)[0]);return[(r=o,i=new Map,r.forEach((function(e){i.has(e.domain)?i.get(e.domain).push(e):i.set(e.domain,[e])})),i),a]}))}},{kind:"field",key:"_filterConfigEntriesInProgress",value:function(){var e=this;return(0,s.Z)((function(t,n){if(t=t.map((function(t){return Object.assign({},t,{title:x(e.hass.localize,t)})})),!n)return t;return new i.Z(t,{keys:["handler","localized_title"],isCaseSensitive:!1,minMatchCharLength:2,threshold:.2}).search(n).map((function(e){return e.item}))}))}},{kind:"method",key:"firstUpdated",value:function(e){lt(ut(g.prototype),"firstUpdated",this).call(this,e),this._loadConfigEntries(),this.hass.loadBackendTranslation("title",void 0,!0),this._fetchManifests()}},{kind:"method",key:"updated",value:function(e){lt(ut(g.prototype),"updated",this).call(this,e),this._searchParms.has("config_entry")&&e.has("_configEntries")&&!e.get("_configEntries")&&this._configEntries&&this._highlightEntry()}},{kind:"method",key:"render",value:function(){var e=this;if(!this._configEntries)return(0,o.dy)(Ue());var t=qe(this._filterGroupConfigEntries(this._configEntries,this._filter),2),n=t[0],i=t[1],s=this._filterConfigEntriesInProgress(this._configEntriesInProgress,this._filter);return(0,o.dy)(Be(),this.hass,this.narrow,this.route,K.configSections.integrations,this.narrow?(0,o.dy)(Me(),this._filter,this._handleSearchChange,this.hass.localize("ui.panel.config.integrations.search")):"",this._toggleShowIgnored,this.hass.localize("ui.common.menu"),this.hass.localize("ui.common.overflow_menu"),r.SXi,this.hass.localize(this._showIgnored?"ui.panel.config.integrations.ignore.hide_ignored":"ui.panel.config.integrations.ignore.show_ignored"),this.narrow?"":(0,o.dy)(Le(),this._filter,this._handleSearchChange,this.hass.localize("ui.panel.config.integrations.search")),this._handleRemoved,this._handleUpdated,this._showIgnored?i.map((function(t){return(0,o.dy)(Fe(),e.hass.localize("ui.panel.config.integrations.ignore.ignored"),t.domain,e._onImageError,e._onImageLoad,t.localized_domain_name,e._removeIgnoredIntegration,t,e.hass.localize("ui.panel.config.integrations.ignore.stop_ignore"),e.hass.localize("ui.panel.config.integrations.ignore.stop_ignore"))})):"",s.length?s.map((function(t){var n=m.includes(t.context.source);return(0,o.dy)(Ie(),(0,a.$)({discovered:!n,attention:n}),e.hass.localize("ui.panel.config.integrations.".concat(n?"attention":"discovered")),t.handler,e._onImageError,e._onImageLoad,t.localized_title,e._continueFlow,t.flow_id,e.hass.localize("ui.panel.config.integrations.".concat(n?"reconfigure":"configure")),p.includes(t.context.source)&&t.context.unique_id?(0,o.dy)(Te(),e._ignoreFlow,t,e.hass.localize("ui.panel.config.integrations.ignore.ignore")):"")})):"",n.size?Array.from(n.entries()).map((function(t){var n=qe(t,2),r=n[0],i=n[1];return(0,o.dy)(Re(),r,e.hass,r,i,e._manifests[r],e._entityRegistryEntries,e._deviceRegistryEntries)})):this._configEntries.length?"":(0,o.dy)(De(),this.hass.localize("ui.panel.config.integrations.none"),this.hass.localize("ui.panel.config.integrations.no_integrations"),this._createFlow,this.hass.localize("ui.panel.config.integrations.add_integration")),this._filter&&!s.length&&!n.size&&this._configEntries.length?(0,o.dy)(Ae(),this.hass.localize("ui.panel.config.integrations.none_found"),this.hass.localize("ui.panel.config.integrations.none_found_detail")):"",this.hass.localize("ui.panel.config.integrations.new"),this.hass.localize("ui.panel.config.integrations.new"),this._createFlow,r.qX5)}},{kind:"method",key:"_loadConfigEntries",value:function(){var e=this;(0,u.pB)(this.hass).then((function(t){e._configEntries=t.map((function(t){return Object.assign({},t,{localized_domain_name:(0,h.Lh)(e.hass.localize,t.domain)})})).sort((function(e,t){return(0,c.w)(e.localized_domain_name+e.title,t.localized_domain_name+t.title)}))}))}},{kind:"method",key:"_fetchManifests",value:(y=We(regeneratorRuntime.mark((function e(){var t,n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={},e.next=3,(0,h.F3)(this.hass);case 3:n=e.sent,r=je(n);try{for(r.s();!(i=r.n()).done;)o=i.value,t[o.domain]=o}catch(a){r.e(a)}finally{r.f()}this._manifests=t;case 7:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{kind:"method",key:"_handleRemoved",value:function(e){this._configEntries=this._configEntries.filter((function(t){return t.entry_id!==e.detail.entryId}))}},{kind:"method",key:"_handleUpdated",value:function(e){var t=e.detail.entry;this._configEntries=this._configEntries.map((function(e){return e.entry_id===t.entry_id?Object.assign({},t,{localized_domain_name:e.localized_domain_name}):e}))}},{kind:"method",key:"_createFlow",value:function(){var e=this;q(this,{dialogClosedCallback:function(){e._loadConfigEntries(),E(e.hass.connection).refresh()},showAdvanced:this.showAdvanced}),this.hass.loadBackendTranslation("title",void 0,!0)}},{kind:"method",key:"_continueFlow",value:function(e){var t=this;q(this,{continueFlowId:e.target.flowId,dialogClosedCallback:function(){t._loadConfigEntries(),E(t.hass.connection).refresh()}})}},{kind:"method",key:"_ignoreFlow",value:(d=We(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.target.flow,e.next=3,(0,U.g7)(this,{title:this.hass.localize("ui.panel.config.integrations.ignore.confirm_ignore_title","name",x(this.hass.localize,n)),text:this.hass.localize("ui.panel.config.integrations.ignore.confirm_ignore"),confirmText:this.hass.localize("ui.panel.config.integrations.ignore.ignore")});case 3:if(e.sent){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,r=this.hass,i=n.flow_id,r.callWS({type:"config_entries/ignore_flow",flow_id:i});case 8:this._loadConfigEntries(),E(this.hass.connection).refresh();case 10:case"end":return e.stop()}var r,i}),e,this)}))),function(e){return d.apply(this,arguments)})},{kind:"method",key:"_toggleShowIgnored",value:function(){this._showIgnored=!this._showIgnored}},{kind:"method",key:"_removeIgnoredIntegration",value:(f=We(regeneratorRuntime.mark((function e(t){var n,r=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.target.entry,(0,U.g7)(this,{title:this.hass.localize("ui.panel.config.integrations.ignore.confirm_delete_ignore_title","name",this.hass.localize("component.".concat(n.domain,".title"))),text:this.hass.localize("ui.panel.config.integrations.ignore.confirm_delete_ignore"),confirmText:this.hass.localize("ui.panel.config.integrations.ignore.stop_ignore"),confirm:function(){var e=We(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.iJ)(r.hass,n.entry_id);case 2:e.sent.require_restart&&alert(r.hass.localize("ui.panel.config.integrations.config_entry.restart_confirm")),r._loadConfigEntries();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 2:case"end":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{kind:"method",key:"_handleSearchChange",value:function(e){this._filter=e.detail.value}},{kind:"method",key:"_onImageLoad",value:function(e){e.target.style.visibility="initial"}},{kind:"method",key:"_onImageError",value:function(e){e.target.style.visibility="hidden"}},{kind:"method",key:"_highlightEntry",value:(n=We(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.y)();case 2:if(t=this._searchParms.get("config_entry"),n=this._configEntries.find((function(e){return e.entry_id===t}))){e.next=6;break}return e.abrupt("return");case 6:(r=this.shadowRoot.querySelector("[data-domain=".concat(null==n?void 0:n.domain,"]")))&&(r.scrollIntoView({block:"center"}),r.classList.add("highlight"),r.selectedConfigEntryId=t);case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{kind:"get",static:!0,key:"styles",value:function(){return[Z.Qx,(0,o.iv)(Ce())]}}]}}),(0,N.f)(o.oi))}}]);
//# sourceMappingURL=chunk.38b4fd3dcc4e30eabb10.js.map