!function(e){function t(t){for(var n,o,c=t[0],u=t[1],l=0,i=[];l<c.length;l++)o=c[l],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&i.push(r[o][0]),r[o]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(a&&a(t);i.length;)i.shift()()}var n={},r={42:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,o){n=r[e]=[t,o]}));t.push(n[2]=c);var u,l=document.createElement("script");l.charset="utf-8",l.timeout=120,o.nc&&l.setAttribute("nonce",o.nc),l.src=function(e){return o.p+"chunk."+{91:"dca69b1a1b3dd78352f4"}[e]+".js"}(e);var a=new Error;u=function(t){l.onerror=l.onload=null,clearTimeout(i);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",a.name="ChunkLoadError",a.type=o,a.request=c,n[1](a)}r[e]=void 0}};var i=setTimeout((function(){u({type:"timeout",target:l})}),12e4);l.onerror=l.onload=u,document.head.appendChild(l)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/frontend_latest/",o.oe=function(e){throw console.error(e),e};var c=self.webpackJsonp=self.webpackJsonp||[],u=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var a=u;o(o.s=198)}({100:function(e,t){},111:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));const r=(e,t,n)=>new Promise((r,o)=>{const c=document.createElement(e);let u="src",l="body";switch(c.onload=()=>r(t),c.onerror=()=>o(t),e){case"script":c.async=!0,n&&(c.type=n);break;case"link":c.type="text/css",c.rel="stylesheet",u="href",l="head"}c[u]=t,document[l].appendChild(c)}),o=e=>r("link",e),c=e=>r("script",e),u=e=>r("script",e,"module")},13:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=(e,t,n,r)=>{r=r||{},n=null==n?{}:n;const o=new Event(t,{bubbles:void 0===r.bubbles||r.bubbles,cancelable:Boolean(r.cancelable),composed:void 0===r.composed||r.composed});return o.detail=n,e.dispatchEvent(o),o}},172:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>{const t="html_url"in e?"ha-panel-"+e.name:e.name;return document.createElement(t)}},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(111);const o={},c=e=>e.html_url?{type:"html",url:e.html_url}:e.module_url&&e.js_url||e.module_url?{type:"module",url:e.module_url}:{type:"js",url:e.js_url},u=e=>{const t=c(e);if("html"===t.type){const e=[n.e(91).then(n.bind(null,199))];return Promise.all(e).then(([{importHrefPromise:e}])=>e(t.url))}return"js"===t.type?(t.url in o||(o[t.url]=Object(r.b)(t.url)),o[t.url]):"module"===t.type?Object(r.c)(t.url):Promise.reject("No valid url found in panel config.")}},174:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=(e,t)=>{"setProperties"in e?e.setProperties(t):Object.keys(t).forEach(n=>{e[n]=t[n]})}},198:function(e,t,n){"use strict";n.r(t);n(100);var r=n(13),o=n(111);const c="customElements"in window&&"content"in document.createElement("template");var u=n(172),l=n(173),a=n(174);let i,s;function d(e){s&&Object(a.a)(s,e)}function p(e,t){const n=document.createElement("style");n.innerHTML="body{margin:0}",document.head.appendChild(n);const a=e.config._panel_custom;let p=Promise.resolve();c||(p=p.then(()=>Object(o.b)("/static/polyfills/webcomponents-bundle.js"))),p.then(()=>Object(l.b)(a)).then(()=>i||Promise.resolve()).then(()=>{s=Object(u.a)(a);s.addEventListener("hass-toggle-menu",e=>{window.parent.customPanel&&Object(r.a)(window.parent.customPanel,e.type,e.detail)}),window.addEventListener("location-changed",e=>{window.parent.customPanel&&window.parent.customPanel.navigate(window.location.pathname,!!e.detail&&e.detail.replace)}),d({panel:e,...t}),document.body.appendChild(s)},t=>{console.error(t,e),alert(`Unable to load the panel source: ${t}.`)})}window.loadES5Adapter=()=>(i||(i=Object(o.b)("/static/polyfills/custom-elements-es5-adapter.js").catch()),i),document.addEventListener("DOMContentLoaded",()=>window.parent.customPanel.registerIframe(p,d),{once:!0})}});
//# sourceMappingURL=custom-panel.6279aaa3.js.map