diff --git a/hassio/api/panel/chunk.42328fc4c4b31ed4a23b.js b/hassio/api/panel/chunk.42328fc4c4b31ed4a23b.js deleted file mode 100644 index bdd968f9f..000000000 --- a/hassio/api/panel/chunk.42328fc4c4b31ed4a23b.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{2:function(e,n,t){"use strict";t.r(n),t(75);var o,a,r=t(4),i=t(6),s=(t(27),t(74),t(56),t(20),t(11)),l=function(){function e(e,n){for(var t=0;t\n .invisible {\n visibility: hidden;\n }\n \n \n'],a=['\n \n \n'],Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(a)}}))),u=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,p(i.a)),c(n,[{key:"computeMenuButtonClass",value:function(e,n){return!e&&n?"invisible":""}},{key:"toggleMenu",value:function(e){e.stopPropagation(),this.fire("hass-open-menu")}}],[{key:"template",get:function(){return Object(r.a)(d)}},{key:"properties",get:function(){return{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1}}}}]),n}();customElements.define("ha-menu-button",u);var h=function(){function e(e,n){for(var t=0;t\n .placeholder {\n height: 100%;\n }\n\n .layout {\n height: calc(100% - 64px);\n }\n \n\n
\n \n \n
[[title]]
\n
\n
\n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n\n
\n \n \n
[[title]]
\n
\n
\n \n
\n
\n'])}})),b=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),h(n,null,[{key:"template",get:function(){return Object(r.a)(f)}},{key:"properties",get:function(){return{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},title:{type:String,value:""}}}}]),n}();customElements.define("hass-loading-screen",b),t(72),t(57),t(101),t(3);var m=document.createElement("template");m.setAttribute("style","display: none;"),m.innerHTML='\n \n\n \n\n \n\n \n',document.head.appendChild(m.content),t(70),t(55);var y=function(){function e(e,n){for(var t=0;t\n paper-dialog {\n min-width: 350px;\n font-size: 14px;\n border-radius: 2px;\n }\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n paper-checkbox {\n display: block;\n margin: 4px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n paper-dialog {\n max-height: 100%;\n }\n paper-dialog::before {\n content: "";\n position: fixed;\n z-index: -1;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n background-color: inherit;\n }\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n }\n \n \n \n \n
[[title]]
\n
\n \n \n \n
\n'],{raw:{value:Object.freeze(['\n \n \n \n \n
[[title]]
\n
\n \n \n \n
\n'])}})),O=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),w(n,[{key:"openDialog",value:function(){this.$.dialog.open()}}],[{key:"template",get:function(){return Object(r.a)(k)}},{key:"properties",get:function(){return{title:String,content:String}}}]),n}();customElements.define("hassio-markdown-dialog",O),t(93),t(13),t(12),t(86),t(84),t(92);var _=function(){function e(e,n){for(var t=0;t\n :host,\n paper-card,\n paper-dropdown-menu {\n display: block;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n paper-item {\n width: 450px;\n }\n .card-actions {\n text-align: right;\n }\n \n \n
\n \n\n \n \n \n \n \n \n \n \n \n \n
\n
\n Save\n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n \n\n \n \n \n \n \n \n \n \n \n \n
\n
\n Save\n
\n
\n'])}})),x=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,p(i.a)),_(n,[{key:"addonChanged",value:function(e){var n=this;if(this.setProperties({selectedInput:e.audio_input||"null",selectedOutput:e.audio_output||"null"}),!this.outputDevices){var t=[{device:"null",name:"-"}];this.hass.callApi("get","hassio/hardware/audio").then(function(e){var o=e.data.audio,a=Object.keys(o.input).map(function(e){return{device:e,name:o.input[e]}}),r=Object.keys(o.output).map(function(e){return{device:e,name:o.output[e]}});n.setProperties({inputDevices:t.concat(a),outputDevices:t.concat(r)})},function(){n.setProperties({inputDevices:t,outputDevices:t})})}}},{key:"_saveSettings",value:function(){var e=this;this.error=null;var n="hassio/addons/"+this.addon.slug+"/options";this.hass.callApi("post",n,{audio_input:"null"===this.selectedInput?null:this.selectedInput,audio_output:"null"===this.selectedOutput?null:this.selectedOutput}).then(function(){e.fire("hass-api-called",{success:!0,path:n})},function(n){e.error=n.body.message})}}],[{key:"template",get:function(){return Object(r.a)(j)}},{key:"properties",get:function(){return{hass:Object,addon:{type:Object,observer:"addonChanged"},inputDevices:Array,outputDevices:Array,selectedInput:String,selectedOutput:String,error:String}}}]),n}();customElements.define("hassio-addon-audio",x),t(91);var S=function(){function e(e,n){for(var t=0;t\n .container {\n position: relative;\n display: inline-block;\n }\n\n paper-button {\n transition: all 1s;\n }\n\n .success paper-button {\n color: white;\n background-color: var(--google-green-500);\n transition: none;\n }\n\n .error paper-button {\n color: white;\n background-color: var(--google-red-500);\n transition: none;\n }\n\n paper-button[disabled] {\n color: #c8c8c8;\n }\n\n .progress {\n @apply --layout;\n @apply --layout-center-center;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n \n
\n \n \n \n \n
\n'],{raw:{value:Object.freeze(['\n \n
\n \n \n \n \n
\n'])}})),C=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),S(n,[{key:"tempClass",value:function(e){var n=this.$.container.classList;n.add(e),setTimeout(function(){n.remove(e)},1e3)}},{key:"ready",value:function(){var e=this;(function e(n,t,o){null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,t);if(void 0===a){var r=Object.getPrototypeOf(n);return null===r?void 0:e(r,t,o)}if("value"in a)return a.value;var i=a.get;return void 0!==i?i.call(o):void 0})(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this.addEventListener("click",function(n){return e.buttonTapped(n)})}},{key:"buttonTapped",value:function(e){this.progress&&e.stopPropagation()}},{key:"actionSuccess",value:function(){this.tempClass("success")}},{key:"actionError",value:function(){this.tempClass("error")}},{key:"computeDisabled",value:function(e,n){return e||n}}],[{key:"template",get:function(){return Object(r.a)(P)}},{key:"properties",get:function(){return{hass:{type:Object},progress:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1}}}}]),n}();customElements.define("ha-progress-button",C);var E=function(){function e(e,n){for(var t=0;t\n'],{raw:{value:Object.freeze(['\n \n'])}})),A=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,p(i.a)),E(n,[{key:"buttonTapped",value:function(){var e=this;this.progress=!0;var n={method:this.method,path:this.path,data:this.data};this.hass.callApi(this.method,this.path,this.data).then(function(t){e.progress=!1,e.$.progress.actionSuccess(),n.success=!0,n.response=t},function(t){e.progress=!1,e.$.progress.actionError(),n.success=!1,n.response=t}).then(function(){e.fire("hass-api-called",n)})}}],[{key:"template",get:function(){return Object(r.a)(T)}},{key:"properties",get:function(){return{hass:Object,progress:{type:Boolean,value:!1},path:String,method:{type:String,value:"POST"},data:{type:Object,value:{}},disabled:{type:Boolean,value:!1}}}}]),n}();customElements.define("ha-call-api-button",A);var R=function(){function e(e,n){for(var t=0;t\n :host {\n display: block;\n }\n paper-card {\n display: block;\n }\n .card-actions {\n @apply --layout;\n @apply --layout-justified;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n iron-autogrow-textarea {\n width: 100%;\n font-family: monospace;\n }\n .syntaxerror {\n color: var(--google-red-500);\n }\n \n \n
\n \n \n
\n
\n Reset to defaults\n Save\n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n \n \n
\n
\n Reset to defaults\n Save\n
\n
\n'])}})),I=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),R(n,[{key:"addonChanged",value:function(e){this.config=e?JSON.stringify(e.options,null,2):""}},{key:"configChanged",value:function(e){try{this.$.config.classList.remove("syntaxerror"),this.configParsed=JSON.parse(e)}catch(e){this.$.config.classList.add("syntaxerror"),this.configParsed=null}}},{key:"saveTapped",value:function(){var e=this;this.error=null,this.hass.callApi("post","hassio/addons/"+this.addonSlug+"/options",{options:this.configParsed}).catch(function(n){e.error=n.body.message})}}],[{key:"template",get:function(){return Object(r.a)(D)}},{key:"properties",get:function(){return{hass:Object,addon:{type:Object,observer:"addonChanged"},addonSlug:String,config:{type:String,observer:"configChanged"},configParsed:Object,error:String,resetData:{type:Object,value:{options:null}}}}}]),n}();customElements.define("hassio-addon-config",I),t(19),t(90);var z=t(7),q=[60,"second",60,"minute",24,"hour",7,"day"],L=t(76),H=(t(82),t(85)),M={__localizationCache:{requests:{},messages:{},ajax:null},properties:{language:{type:String},resources:{type:Object},formats:{type:Object,value:function(){return{}}},useKeyIfMissing:{type:Boolean,value:!1},localize:{type:Function,computed:"__computeLocalize(language, resources, formats)"},bubbleEvent:{type:Boolean,value:!1}},loadResources:function(e,n,t){var o=this.constructor.prototype;this.__checkLocalizationCache(o);var a,r=o.__localizationCache.ajax;function i(e){this.__onRequestResponse(e,n,t)}r||(r=o.__localizationCache.ajax=document.createElement("iron-ajax")),(a=o.__localizationCache.requests[e])?a.completes.then(i.bind(this),this.__onRequestError.bind(this)):(r.url=e,(a=r.generateRequest()).completes.then(i.bind(this),this.__onRequestError.bind(this)),o.__localizationCache.requests[e]=a)},__computeLocalize:function(e,n,t){var o=this.constructor.prototype;return this.__checkLocalizationCache(o),o.__localizationCache||(o.__localizationCache={requests:{},messages:{},ajax:null}),o.__localizationCache.messages={},function(){var a=arguments[0];if(a&&n&&e&&n[e]){var r=n[e][a];if(!r)return this.useKeyIfMissing?a:"";var i=a+r,s=o.__localizationCache.messages[i];s||(s=new H.a(r,e,t),o.__localizationCache.messages[i]=s);for(var l={},p=1;p=0?"past":"future";n=Math.abs(n);for(var o=0;o\n iron-icon {\n margin-right: 16px;\n margin-top: 16px;\n float: left;\n color: var(--secondary-text-color);\n }\n iron-icon.update {\n color: var(--paper-orange-400);\n }\n iron-icon.running,\n iron-icon.installed {\n color: var(--paper-green-400);\n }\n iron-icon.hassupdate,\n iron-icon.snapshot {\n color: var(--paper-item-icon-color);\n }\n .title {\n color: var(--primary-text-color);\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n .addition {\n color: var(--secondary-text-color);\n overflow: hidden;\n position: relative;\n height: 2.4em;\n line-height: 1.2em;\n }\n ha-relative-time {\n display: block;\n }\n \n \n
\n
[[title]]
\n
\n \n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n
[[title]]
\n
\n \n \n
\n
\n'])}})),J=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),W(n,null,[{key:"template",get:function(){return Object(r.a)(Y)}},{key:"properties",get:function(){return{hass:Object,title:String,description:String,datetime:String,icon:{type:String,value:"hass:help-circle"},iconTitle:String,iconClass:String}}}]),n}();customElements.define("hassio-card-content",J);var G=function(){function e(e,n){for(var t=0;t\n :host {\n display: block;\n }\n paper-card {\n display: block;\n margin-bottom: 16px;\n }\n .addon-header {\n @apply --paper-font-headline;\n }\n .light-color {\n color: var(--secondary-text-color);\n }\n .addon-version {\n float: right;\n font-size: 15px;\n vertical-align: middle;\n }\n .description {\n margin-bottom: 16px;\n }\n .logo img {\n max-height: 60px;\n margin: 16px 0;\n display: block;\n }\n .state div{\n width: 150px;\n display: inline-block;\n }\n paper-toggle-button {\n display: inline;\n }\n iron-icon.running {\n color: var(--paper-green-400);\n }\n iron-icon.stopped {\n color: var(--google-red-300);\n }\n ha-call-api-button {\n font-weight: 500;\n color: var(--primary-color);\n }\n .right {\n float: right;\n }\n ha-markdown img {\n max-width: 100%;\n }\n \n \n\n \n
\n
[[addon.name]]\n
\n \n \n
\n
\n
\n [[addon.description]].
\n Visit [[addon.name]] page for details.\n
\n \n \n
\n
\n \n \n
\n
\n \n'],{raw:{value:Object.freeze(['\n \n \n\n \n
\n
[[addon.name]]\n
\n \n \n
\n
\n
\n [[addon.description]].
\n Visit [[addon.name]] page for details.\n
\n \n \n
\n
\n \n \n
\n
\n \n'])}})),X=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,p(i.a)),G(n,[{key:"computeIsRunning",value:function(e){return e&&"started"===e.state}},{key:"computeUpdateAvailable",value:function(e){return e&&!e.detached&&e.version&&e.version!==e.last_version}},{key:"pathWebui",value:function(e){return e&&e.replace("[HOST]",document.location.hostname)}},{key:"computeShowWebUI",value:function(e,n){return e&&n}},{key:"computeStartOnBoot",value:function(e){return"auto"===e}},{key:"startOnBootToggled",value:function(){var e={boot:"auto"===this.addon.boot?"manual":"auto"};this.hass.callApi("POST","hassio/addons/"+this.addonSlug+"/options",e)}},{key:"autoUpdateToggled",value:function(){var e={auto_update:!this.addon.auto_update};this.hass.callApi("POST","hassio/addons/"+this.addonSlug+"/options",e)}},{key:"openChangelog",value:function(){var e=this;this.hass.callApi("get","hassio/addons/"+this.addonSlug+"/changelog").then(function(e){return e},function(){return"Error getting changelog"}).then(function(n){e.fire("hassio-markdown-dialog",{title:"Changelog",content:n})})}},{key:"_unistallClicked",value:function(){var e=this;if(confirm("Are you sure you want to uninstall this add-on?")){var n="hassio/addons/"+this.addonSlug+"/uninstall",t={path:n};this.hass.callApi("post",n).then(function(e){t.success=!0,t.response=e},function(e){t.success=!1,t.response=e}).then(function(){e.fire("hass-api-called",t)})}}}],[{key:"template",get:function(){return Object(r.a)(V)}},{key:"properties",get:function(){return{hass:Object,addon:Object,addonSlug:String,isRunning:{type:Boolean,computed:"computeIsRunning(addon)"}}}}]),n}();customElements.define("hassio-addon-info",X);var K=function(){function e(e,n){for(var t=0;t\n :host,\n paper-card {\n display: block;\n }\n \n \n
\n
[[log]]
\n
\n
\n Refresh\n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n
[[log]]
\n
\n
\n Refresh\n
\n
\n'])}})),Z=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),K(n,[{key:"addonSlugChanged",value:function(e){var n=this;this.hass?this.refresh():setTimeout(function(){n.addonChanged(e)},0)}},{key:"refresh",value:function(){var e=this;this.hass.callApi("get","hassio/addons/"+this.addonSlug+"/logs").then(function(n){e.log=n})}}],[{key:"template",get:function(){return Object(r.a)(Q)}},{key:"properties",get:function(){return{hass:Object,addonSlug:{type:String,observer:"addonSlugChanged"},log:String}}}]),n}();customElements.define("hassio-addon-logs",Z),t(24);var ee=function(){function e(e,n){for(var t=0;t\n :host {\n display: block;\n }\n paper-card {\n display: block;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n .card-actions {\n @apply --layout;\n @apply --layout-justified;\n }\n \n \n
\n \n\n \n \n \n \n \n \n
ContainerHost
\n
\n
\n Reset to defaults\n Save\n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n \n\n \n \n \n \n \n \n
ContainerHost
\n
\n
\n Reset to defaults\n Save\n
\n
\n'])}})),te=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,p(i.a)),ee(n,[{key:"addonChanged",value:function(e){if(e){var n=e.network||{},t=Object.keys(n).map(function(e){return{container:e,host:n[e]}});this.config=t.sort(function(e,n){return e.host-n.host})}}},{key:"saveTapped",value:function(){var e=this;this.error=null;var n={};this.config.forEach(function(e){n[e.container]=parseInt(e.host)});var t="hassio/addons/"+this.addonSlug+"/options";this.hass.callApi("post",t,{network:n}).then(function(){e.fire("hass-api-called",{success:!0,path:t})},function(n){e.error=n.body.message})}}],[{key:"template",get:function(){return Object(r.a)(ne)}},{key:"properties",get:function(){return{hass:Object,addonSlug:String,config:Object,addon:{type:Object,observer:"addonChanged"},error:String,resetData:{type:Object,value:{network:null}}}}}]),n}();customElements.define("hassio-addon-network",te);var oe=function(){function e(e,n){for(var t=0;t\n :host {\n color: var(--primary-text-color);\n --paper-card-header-color: var(--primary-text-color);\n }\n .content {\n padding: 24px 0 32px;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config {\n margin-bottom: 24px;\n width: 600px;\n }\n hassio-addon-logs {\n min-width: 600px;\n }\n @media only screen and (max-width: 600px) {\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config,\n hassio-addon-logs {\n max-width: 100%;\n }\n }\n \n \n \n \n \n \n \n
Hass.io: add-on details
\n
\n
\n
\n \n\n \n
\n
\n\n \n'],{raw:{value:Object.freeze(['\n \n \n \n \n \n \n \n
Hass.io: add-on details
\n
\n
\n
\n \n\n \n
\n
\n\n \n'])}})),re=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),oe(n,[{key:"ready",value:function(){var e=this;(function e(n,t,o){null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,t);if(void 0===a){var r=Object.getPrototypeOf(n);return null===r?void 0:e(r,t,o)}if("value"in a)return a.value;var i=a.get;return void 0!==i?i.call(o):void 0})(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(n){return e.apiCalled(n)}),this.addEventListener("hassio-markdown-dialog",function(n){return e.openMarkdown(n)})}},{key:"apiCalled",value:function(e){var n=e.detail.path;n&&("uninstall"===n.substr(n.lastIndexOf("/")+1)?this.backTapped():this.routeDataChanged(this.routeData))}},{key:"routeDataChanged",value:function(e){var n=this;this.routeMatches&&e&&e.slug&&this.hass.callApi("get","hassio/addons/"+e.slug+"/info").then(function(e){n.addon=e.data},function(){n.addon=null})}},{key:"backTapped",value:function(){history.back()}},{key:"openMarkdown",value:function(e){this.setProperties({markdownTitle:e.detail.title,markdownContent:e.detail.content}),this.shadowRoot.querySelector("hassio-markdown-dialog").openDialog()}}],[{key:"template",get:function(){return Object(r.a)(ae)}},{key:"properties",get:function(){return{hass:Object,showMenu:Boolean,narrow:Boolean,route:Object,routeData:{type:Object,observer:"routeDataChanged"},routeMatches:Boolean,addon:Object,markdownTitle:String,markdownContent:{type:String,value:""}}}}]),n}();customElements.define("hassio-addon-view",re);var ie=function(){function e(e,n){for(var t=0;t1&&void 0!==arguments[1]&&arguments[1]?history.replaceState(null,null,e):history.pushState(null,null,e),this.fire("location-changed")}}]),t}()}),ce=function(){function e(e,n){for(var t=0;t\n paper-card {\n cursor: pointer;\n }\n a.repo {\n display: block;\n color: var(--primary-text-color);\n }\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}})),ue=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,pe(i.a)),ce(n,[{key:"sortAddons",value:function(e,n){return e.name\n .add {\n padding: 12px 16px;\n }\n iron-icon {\n color: var(--secondary-text-color);\n margin-right: 16px;\n display: inline-block;\n }\n paper-input {\n width: calc(100% - 49px);\n display: inline-block;\n }\n \n
\n
\n Repositories\n
\n Configure which add-on repositories to fetch data from:\n
\n
\n \n \n
\n \n \n
\n
\n Add\n
\n
\n
\n'],{raw:{value:Object.freeze(['\n \n
\n
\n Repositories\n
\n Configure which add-on repositories to fetch data from:\n
\n
\n \n \n
\n \n \n
\n
\n Add\n
\n
\n
\n'])}})),be=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),he(n,[{key:"reposChanged",value:function(e){this.repoList=e.filter(function(e){return"core"!==e.slug&&"local"!==e.slug}),this.repoUrl=""}},{key:"sortRepos",value:function(e,n){return e.name\n hassio-addon-repository {\n margin-top: 24px;\n }\n \n \n\n \n'],{raw:{value:Object.freeze(['\n \n \n\n \n'])}})),ve=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),me(n,[{key:"ready",value:function(){var e=this;(function e(n,t,o){null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,t);if(void 0===a){var r=Object.getPrototypeOf(n);return null===r?void 0:e(r,t,o)}if("value"in a)return a.value;var i=a.get;return void 0!==i?i.call(o):void 0})(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(n){return e.apiCalled(n)}),this.loadData()}},{key:"apiCalled",value:function(e){e.detail.success&&this.loadData()}},{key:"sortRepos",value:function(e,n){return"local"===e.slug?-1:"local"===n.slug?1:"core"===e.slug?-1:"core"===n.slug?1:e.name\n paper-card {\n cursor: pointer;\n }\n \n
\n
Add-ons
\n \n \n
\n'],{raw:{value:Object.freeze(['\n \n
\n
Add-ons
\n \n \n
\n'])}})),ke=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,pe(i.a)),ge(n,[{key:"sortAddons",value:function(e,n){return e.name\n paper-card {\n display: block;\n height: 100%;\n margin-bottom: 32px;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}})),xe=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),_e(n,[{key:"ready",value:function(){var e=this;(function e(n,t,o){null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,t);if(void 0===a){var r=Object.getPrototypeOf(n);return null===r?void 0:e(r,t,o)}if("value"in a)return a.value;var i=a.get;return void 0!==i?i.call(o):void 0})(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(n){return e.apiCalled(n)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var n=e.detail.response;"object"===Oe(n.body)?this.errors=n.body.message||"Unknown error":this.errors=n.body}}},{key:"computeUpdateAvailable",value:function(e){return e.version!==e.last_version}}],[{key:"template",get:function(){return Object(r.a)(je)}},{key:"properties",get:function(){return{hass:Object,hassInfo:Object,error:String}}}]),n}();customElements.define("hassio-hass-update",xe);var Se=function(){function e(e,n){for(var t=0;t\n .content {\n margin: 0 auto;\n }\n \n
\n \n \n
\n'],{raw:{value:Object.freeze(['\n \n
\n \n \n
\n'])}})),Ce=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,p(i.a)),Se(n,null,[{key:"template",get:function(){return Object(r.a)(Pe)}},{key:"properties",get:function(){return{hass:Object,supervisorInfo:Object,hassInfo:Object}}}]),n}();customElements.define("hassio-dashboard",Ce),t(61);var Ee=function(){function e(e,n){for(var t=0;t\n paper-dialog {\n min-width: 350px;\n font-size: 14px;\n border-radius: 2px;\n }\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n paper-dialog-scrollable {\n margin: 0;\n }\n paper-checkbox {\n display: block;\n margin: 4px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n paper-dialog {\n max-height: 100%;\n height: 100%;\n }\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n }\n .details {\n color: var(--secondary-text-color);\n }\n .download {\n color: var(--primary-color);\n }\n .warning,\n .error {\n color: var(--google-red-500);\n }\n \n \n \n \n
[[_computeName(snapshot)]]
\n
\n
\n [[_computeType(snapshot.type)]] ([[_computeSize(snapshot.size)]])
\n [[_formatDatetime(snapshot.date)]]\n
\n
Home Assistant:
\n \n Home Assistant [[snapshot.homeassistant]]\n \n \n \n \n \n
\n \n \n \n \n Restore selected\n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n \n \n
[[_computeName(snapshot)]]
\n
\n
\n [[_computeType(snapshot.type)]] ([[_computeSize(snapshot.size)]])
\n [[_formatDatetime(snapshot.date)]]\n
\n
Home Assistant:
\n \n Home Assistant [[snapshot.homeassistant]]\n \n \n \n \n \n
\n \n \n \n \n Restore selected\n \n
\n
\n'])}})),Ae=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),Ee(n,[{key:"_snapshotSlugChanged",value:function(e){var n=this;e&&"update"!==e&&this.hass.callApi("get","hassio/snapshots/"+e+"/info").then(function(e){e.data.folders=n._computeFolders(e.data.folders),e.data.addons=n._computeAddons(e.data.addons),n.snapshot=e.data,n.$.dialog.open()},function(){n.snapshot=null})}},{key:"_computeFolders",value:function(e){var n=[];return e.includes("homeassistant")&&n.push({slug:"homeassistant",name:"Home Assistant configuration",checked:!0}),e.includes("ssl")&&n.push({slug:"ssl",name:"SSL",checked:!0}),e.includes("share")&&n.push({slug:"share",name:"Share",checked:!0}),e.includes("addons/local")&&n.push({slug:"addons/local",name:"Local add-ons",checked:!0}),n}},{key:"_computeAddons",value:function(e){return e.map(function(e){return{slug:e.slug,name:e.name,version:e.version,checked:!0}})}},{key:"_isFullSnapshot",value:function(e){return"full"===e}},{key:"_partialRestoreClicked",value:function(){var e=this;if(confirm("Are you sure you want to restore this snapshot?")){var n=this.snapshot.addons.filter(function(e){return e.checked}).map(function(e){return e.slug}),t=this.snapshot.folders.filter(function(e){return e.checked}).map(function(e){return e.slug}),o={homeassistant:this.restoreHass,addons:n,folders:t};this.snapshot.protected&&(o.password=this.snapshotPassword),this.hass.callApi("post","hassio/snapshots/"+this.snapshotSlug+"/restore/partial",o).then(function(){alert("Snapshot restored!"),e.$.dialog.close()},function(n){e.error=n.body.message})}}},{key:"_fullRestoreClicked",value:function(){var e=this;if(confirm("Are you sure you want to restore this snapshot?")){var n=this.snapshot.protected?{password:this.snapshotPassword}:null;this.hass.callApi("post","hassio/snapshots/"+this.snapshotSlug+"/restore/full",n).then(function(){alert("Snapshot restored!"),e.$.dialog.close()},function(n){e.error=n.body.message})}}},{key:"_deleteClicked",value:function(){var e=this;confirm("Are you sure you want to delete this snapshot?")&&this.hass.callApi("post","hassio/snapshots/"+this.snapshotSlug+"/remove").then(function(){e.$.dialog.close(),e.snapshotDeleted=!0},function(n){e.error=n.body.message})}},{key:"_computeDownloadUrl",value:function(e){return"/api/hassio/snapshots/"+e+"/download?api_password="+encodeURIComponent(this.hass.connection.options.authToken)}},{key:"_computeDownloadName",value:function(e){return"Hass_io_"+this._computeName(e).replace(/[^a-z0-9]+/gi,"_")+".tar"}},{key:"_computeName",value:function(e){return e.name||e.slug}},{key:"_computeType",value:function(e){return"full"===e?"Full snapshot":"Partial snapshot"}},{key:"_computeSize",value:function(e){return Math.ceil(10*e)/10+" MB"}},{key:"_sortAddons",value:function(e,n){return e.name\n paper-radio-group {\n display: block;\n }\n paper-radio-button {\n padding: 0 0 2px 2px;\n }\n paper-radio-button,\n paper-checkbox,\n paper-input[type="password"] {\n display: block;\n margin: 4px 0 4px 48px;\n }\n .pointer {\n cursor: pointer;\n }\n \n
\n
\n
\n Create snapshot\n
\n Snapshots allow you to easily backup and\n restore all data of your Hass.io instance.\n
\n
\n \n
\n \n Type:\n \n \n Full snapshot\n \n \n Partial snapshot\n \n \n \n Security:\n Password protection\n \n \n
\n
\n Create\n
\n
\n
\n\n
\n
Available snapshots
\n \n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n
\n
\n
\n Create snapshot\n
\n Snapshots allow you to easily backup and\n restore all data of your Hass.io instance.\n
\n
\n \n
\n \n Type:\n \n \n Full snapshot\n \n \n Partial snapshot\n \n \n \n Security:\n Password protection\n \n \n
\n
\n Create\n
\n
\n
\n\n
\n
Available snapshots
\n \n \n
\n
\n'])}})),Ie=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,p(i.a)),Re(n,[{key:"ready",value:function(){var e=this;(function e(n,t,o){null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,t);if(void 0===a){var r=Object.getPrototypeOf(n);return null===r?void 0:e(r,t,o)}if("value"in a)return a.value;var i=a.get;return void 0!==i?i.call(o):void 0})(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(n){return e._apiCalled(n)}),this._updateSnapshots()}},{key:"_apiCalled",value:function(e){e.detail.success&&this._updateSnapshots()}},{key:"_updateSnapshots",value:function(){var e=this;this.hass.callApi("get","hassio/snapshots").then(function(n){e.snapshots=n.data.snapshots},function(n){e.error=n.message})}},{key:"_createSnapshot",value:function(){var e=this;if(this.error="",!this.snapshotHasPassword||this.snapshotPassword.length){this.creatingSnapshot=!0;var n=this.snapshotName;n.length||(n=(new Date).toLocaleDateString(navigator.language,{weekday:"long",year:"numeric",month:"short",day:"numeric"}));var t=void 0,o=void 0;if("full"===this.snapshotType)t={name:n},o="hassio/snapshots/new/full";else{var a=this.addonList.filter(function(e){return e.checked}).map(function(e){return e.slug});t={name:n,folders:this.folderList.filter(function(e){return e.checked}).map(function(e){return e.slug}),addons:a},o="hassio/snapshots/new/partial"}this.snapshotHasPassword&&(t.password=this.snapshotPassword),this.hass.callApi("post",o,t).then(function(){e.creatingSnapshot=!1,e.fire("hass-api-called",{success:!0})},function(n){e.creatingSnapshot=!1,e.error=n.message})}else this.error="Please enter a password."}},{key:"_installedAddonsChanged",value:function(e){this.addonList=e.map(function(e){return{slug:e.slug,name:e.name,checked:!0}})}},{key:"_sortAddons",value:function(e,n){return e.name\n paper-card {\n display: inline-block;\n width: 400px;\n margin-left: 8px;\n }\n .card-content {\n height: 200px;\n }\n @media screen and (max-width: 830px) {\n paper-card {\n margin-top: 8px;\n margin-left: 0;\n width: 100%;\n }\n .card-content {\n height: 100%;\n }\n }\n .info {\n width: 100%;\n }\n .info td:nth-child(2) {\n text-align: right;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n paper-button.info {\n max-width: 50%;\n }\n \n \n
\n

Host system

\n \n \n \n \n \n \n \n \n \n \n
Hostname[[data.hostname]]
System[[data.operating_system]]
\n Show hardware\n \n
\n
\n \n \n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n

Host system

\n \n \n \n \n \n \n \n \n \n \n
Hostname[[data.hostname]]
System[[data.operating_system]]
\n Show hardware\n \n
\n
\n \n \n \n
\n
\n'])}})),He=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,p(i.a)),qe(n,[{key:"ready",value:function(){var e=this;(function e(n,t,o){null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,t);if(void 0===a){var r=Object.getPrototypeOf(n);return null===r?void 0:e(r,t,o)}if("value"in a)return a.value;var i=a.get;return void 0!==i?i.call(o):void 0})(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(n){return e.apiCalled(n)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var n=e.detail.response;"object"===ze(n.body)?this.errors=n.body.message||"Unknown error":this.errors=n.body}}},{key:"computeUpdateAvailable",value:function(e){return e.version!==e.last_version}},{key:"computeRebootAvailable",value:function(e){return e.features&&e.features.includes("reboot")}},{key:"computeShutdownAvailable",value:function(e){return e.features&&e.features.includes("shutdown")}},{key:"_showHardware",value:function(){var e=this;this.hass.callApi("get","hassio/hardware/info").then(function(n){return e._objectToMarkdown(n.data)},function(){return"Error getting hardware info"}).then(function(n){e.fire("hassio-markdown-dialog",{title:"Hardware",content:n})})}},{key:"_objectToMarkdown",value:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o="";return Object.keys(e).forEach(function(a){"object"!==ze(e[a])?o+=t+"- "+a+": "+e[a]+"\n":(o+=t+"- "+a+":\n",Array.isArray(e[a])?e[a].length&&(o+=t+" - "+e[a].join("\n"+t+" - ")+"\n"):o+=n._objectToMarkdown(e[a]," "+t))}),o}}],[{key:"template",get:function(){return Object(r.a)(Le)}},{key:"properties",get:function(){return{hass:Object,data:Object,errors:String}}}]),n}();customElements.define("hassio-host-info",He);var Me="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},Ue=function(){function e(e,n){for(var t=0;t\n paper-card {\n display: inline-block;\n width: 400px;\n }\n .card-content {\n height: 200px;\n }\n @media screen and (max-width: 830px) {\n paper-card {\n width: 100%;\n }\n .card-content {\n height: 100%;\n }\n }\n .info {\n width: 100%;\n }\n .info td:nth-child(2) {\n text-align: right;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n \n \n
\n

Hass.io supervisor

\n \n \n \n \n \n \n \n \n \n \n
Version\n [[data.version]]\n
Latest version[[data.last_version]]
\n \n
\n
\n Reload\n \n \n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n

Hass.io supervisor

\n \n \n \n \n \n \n \n \n \n \n
Version\n [[data.version]]\n
Latest version[[data.last_version]]
\n \n
\n
\n Reload\n \n \n \n
\n
\n'])}})),Fe=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,p(i.a)),Ue(n,[{key:"ready",value:function(){var e=this;(function e(n,t,o){null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,t);if(void 0===a){var r=Object.getPrototypeOf(n);return null===r?void 0:e(r,t,o)}if("value"in a)return a.value;var i=a.get;return void 0!==i?i.call(o):void 0})(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(n){return e.apiCalled(n)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var n=e.detail.response;"object"===Me(n.body)?this.errors=n.body.message||"Unknown error":this.errors=n.body}}},{key:"computeUpdateAvailable",value:function(e){return e.version!==e.last_version}},{key:"_equals",value:function(e,n){return e===n}},{key:"_joinBeta",value:function(){var e=this;if(confirm("WARNING:\nBeta releases are for testers and early adopters and can contain unstable code changes. Make sure you have backups of your data before you activate this feature.\n\nThis inludes beta releases for:\n- Home Assistant (Release Candidates)\n- Hass.io supervisor\n- Host system")){var n="hassio/supervisor/options",t={channel:"beta"},o={method:"post",path:n,data:t};this.hass.callApi("post",n,t).then(function(e){o.success=!0,o.response=e},function(e){o.success=!1,o.response=e}).then(function(){e.fire("hass-api-called",o)})}}}],[{key:"template",get:function(){return Object(r.a)(Be)}},{key:"properties",get:function(){return{hass:Object,data:Object,errors:String,leaveBeta:{type:Object,value:{channel:"stable"}}}}}]),n}();customElements.define("hassio-supervisor-info",Fe);var Ne=function(){function e(e,n){for(var t=0;t\n paper-card {\n display: block;\n }\n \n \n
\n
[[log]]
\n
\n
\n Refresh\n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n
[[log]]
\n
\n
\n Refresh\n
\n
\n'])}})),We=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),Ne(n,[{key:"ready",value:function(){(function e(n,t,o){null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,t);if(void 0===a){var r=Object.getPrototypeOf(n);return null===r?void 0:e(r,t,o)}if("value"in a)return a.value;var i=a.get;return void 0!==i?i.call(o):void 0})(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this.loadData()}},{key:"loadData",value:function(){var e=this;this.hass.callApi("get","hassio/supervisor/logs").then(function(n){e.log=n},function(){e.log="Error fetching logs"})}},{key:"refreshTapped",value:function(){this.loadData()}}],[{key:"template",get:function(){return Object(r.a)($e)}},{key:"properties",get:function(){return{hass:Object,log:String}}}]),n}();customElements.define("hassio-supervisor-log",We);var Ye=function(){function e(e,n){for(var t=0;t\n .content {\n margin: 4px;\n }\n .title {\n margin-top: 24px;\n color: var(--primary-text-color);\n font-size: 2em;\n padding-left: 8px;\n margin-bottom: 8px;\n }\n \n
\n
Information
\n \n \n
System log
\n \n
\n'],{raw:{value:Object.freeze(['\n \n
\n
Information
\n \n \n
System log
\n \n
\n'])}})),Ge=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,i.a),Ye(n,null,[{key:"template",get:function(){return Object(r.a)(Je)}},{key:"properties",get:function(){return{hass:Object,supervisorInfo:Object,hostInfo:Object}}}]),n}();customElements.define("hassio-system",Ge);var Ve=function(){function e(e,n){for(var t=0;t\n :host {\n color: var(--primary-text-color);\n --paper-card-header-color: var(--primary-text-color);\n }\n paper-tabs {\n margin-left: 12px;\n --paper-tabs-selection-bar-color: #FFF;\n text-transform: uppercase;\n }\n \n \n \n \n \n
Hass.io
\n \n
\n \n Dashboard\n Snapshots\n Add-on store\n System\n \n
\n \n \n \n \n
\n\n \n\n \n'],{raw:{value:Object.freeze(['\n \n \n \n \n \n
Hass.io
\n \n
\n \n Dashboard\n Snapshots\n Add-on store\n System\n \n
\n \n \n \n \n
\n\n \n\n \n'])}})),Ke=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,pe(i.a)),Ve(n,[{key:"ready",value:function(){var e=this;(function e(n,t,o){null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,t);if(void 0===a){var r=Object.getPrototypeOf(n);return null===r?void 0:e(r,t,o)}if("value"in a)return a.value;var i=a.get;return void 0!==i?i.call(o):void 0})(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this.addEventListener("hassio-markdown-dialog",function(n){return e.openMarkdown(n)})}},{key:"handlePageSelected",value:function(e){var n=e.detail.item.getAttribute("page-name");n!==this.page&&this.navigate("/hassio/"+n)}},{key:"equals",value:function(e,n){return e===n}},{key:"showRefreshButton",value:function(e){return"store"===e||"snapshots"===e}},{key:"refreshClicked",value:function(){"snapshots"===this.page?this.shadowRoot.querySelector("hassio-snapshots").refreshData():this.shadowRoot.querySelector("hassio-addon-store").refreshData()}},{key:"openMarkdown",value:function(e){this.setProperties({markdownTitle:e.detail.title,markdownContent:e.detail.content}),this.shadowRoot.querySelector("hassio-markdown-dialog").openDialog()}}],[{key:"template",get:function(){return Object(r.a)(Xe)}},{key:"properties",get:function(){return{hass:Object,showMenu:Boolean,narrow:Boolean,page:String,supervisorInfo:Object,hostInfo:Object,hassInfo:Object,snapshotSlug:String,snapshotDeleted:Boolean,markdownTitle:String,markdownContent:{type:String,value:""}}}}]),n}();customElements.define("hassio-pages-with-tabs",Ke);var Qe=function(){function e(e,n){for(var t=0;t\n \n\n \n\n \n'],{raw:{value:Object.freeze(['\n \n \n\n \n\n \n'])}})),nn=function(e){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,pe(i.a)),Qe(n,[{key:"ready",value:function(){var e=this;Ze(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),function(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e._themes||(e._themes={});var a=n.default_theme;("default"===t||t&&n.themes[t])&&(a=t);var r=Object.assign({},e._themes);if("default"!==a){var i=n.themes[a];Object.keys(i).forEach(function(n){var t="--"+n;e._themes[t]="",r[t]=i[n]})}if(e.updateStyles?e.updateStyles(r):window.ShadyCSS&&window.ShadyCSS.styleSubtree(e,r),o){var s=document.querySelector("meta[name=theme-color]");if(s){s.hasAttribute("default-content")||s.setAttribute("default-content",s.getAttribute("content"));var l=r["--primary-color"]||s.getAttribute("default-content");s.setAttribute("content",l)}}}(this,this.hass.themes,this.hass.selectedTheme,!0),this.addEventListener("hass-api-called",function(n){return e.apiCalled(n)})}},{key:"connectedCallback",value:function(){Ze(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"connectedCallback",this).call(this),this.routeChanged(this.route)}},{key:"apiCalled",value:function(e){var n=this;if(e.detail.success){var t=1;!function e(){n.$.data.refresh().catch(function(){t+=1,setTimeout(e,1e3*Math.min(t,5))})}()}}},{key:"computeIsLoaded",value:function(e,n,t){return null!==e&&null!==n&&null!==t}},{key:"routeChanged",value:function(e){""===e.path&&"/hassio"===e.prefix&&this.navigate("/hassio/dashboard",!0)}},{key:"equalsAddon",value:function(e){return e&&"addon"===e}}],[{key:"template",get:function(){return Object(r.a)(en)}},{key:"properties",get:function(){return{hass:Object,narrow:Boolean,showMenu:Boolean,route:{type:Object,value:{prefix:"/hassio",path:"/dashboard",__queryParams:{}},observer:"routeChanged"},routeData:Object,supervisorInfo:Object,hostInfo:Object,hassInfo:Object,loaded:{type:Boolean,computed:"computeIsLoaded(supervisorInfo, hostInfo, hassInfo)"}}}}]),n}();customElements.define("hassio-main",nn)},25:function(e,n){var t=document.createElement("template");t.setAttribute("style","display: none;"),t.innerHTML='\n \n',document.head.appendChild(t.content)}}]); \ No newline at end of file diff --git a/hassio/api/panel/chunk.42328fc4c4b31ed4a23b.js.gz b/hassio/api/panel/chunk.42328fc4c4b31ed4a23b.js.gz deleted file mode 100644 index 5979a8faf..000000000 Binary files a/hassio/api/panel/chunk.42328fc4c4b31ed4a23b.js.gz and /dev/null differ diff --git a/hassio/api/panel/chunk.4ac8b99259327a51f355.js b/hassio/api/panel/chunk.4ac8b99259327a51f355.js deleted file mode 100644 index 8be0265dc..000000000 --- a/hassio/api/panel/chunk.4ac8b99259327a51f355.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],[,function(e,t,n){"use strict";n.r(t),n(52);var C=function(){function e(e,t){for(var n=0;n /*! For license information please see app.js.LICENSE */ -!function(e){function t(t){for(var n,o,r=t[0],a=t[1],s=0,c=[];s1?n-1:0),o=1;o=0}function M(e){var t=e.indexOf(".");return-1===t?e:e.slice(0,t)}function B(e,t){return 0===e.indexOf(t+".")}function H(e,t){return 0===t.indexOf(e+".")}function q(e,t,n){return t+n.slice(e.length)}function $(e){if(Array.isArray(e)){for(var t=[],n=0;n1){for(var a=0;a=0){if(!ee[t])throw new Error("invalid async handle: "+e);ee[t]=null}}},se="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},le=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0},ce=function(){function e(e,t){for(var n=0;nc.source.length&&"property"==l.kind&&!l.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]){var p=n[t];t=q(c.source,l.target,t),s._setPendingPropertyOrPath(t,p,!1,!0)&&e._enqueueClient(s)}else!function(e,t,n,i,o){if(o=function(e,t,n,i){if(n.isCompound){var o=e.__dataCompoundStorage[n.target];o[i.compoundIndex]=t,t=o.join("")}return"attribute"!==n.kind&&("textContent"!==n.target&&("value"!==n.target||"input"!==e.localName&&"textarea"!==e.localName)||(t=void 0==t?"":t)),t}(t,o,n,i),b&&(o=b(o,n.target,n.kind,t)),"attribute"==n.kind)e._valueToNodeAttribute(t,o,n.target);else{var r=n.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?t[Le.READ_ONLY]&&t[Le.READ_ONLY][r]||t._setPendingProperty(r,o)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,r,o)}}(e,s,l,c,o.evaluator._evaluateBinding(e,c,t,n,i,r))}function Ze(e,t){if(t.isCompound){for(var n=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),i=t.parts,o=new Array(i.length),r=0;r="0"&&i<="9"&&(i="#"),i){case"'":case'"':n.value=t.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(t),n.literal=!0}return n.literal||(n.rootProperty=M(t),n.structured=F(t),n.structured&&(n.wildcard=".*"==t.slice(-2),n.wildcard&&(n.name=t.slice(0,-2)))),n}function ot(e,t,n,i){var o=n+".splices";e.notifyPath(o,{indexSplices:i}),e.notifyPath(n+".length",t.length),e.__data[o]={indexSplices:null}}function rt(e,t,n,i,o,r){ot(e,t,n,[{index:i,addedCount:o,removed:r,object:t,type:"splice"}])}var at=k(function(e){var t=Ee(_e(e)),n=function(e){function n(){!function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.__isPropertyEffectsClient=!0,e.__dataCounter=0,e.__dataClientsReady,e.__dataPendingClients,e.__dataToNotify,e.__dataLinkedPaths,e.__dataHasPaths,e.__dataCompoundStorage,e.__dataHost,e.__dataTemp,e.__dataClientsInitialized,e.__data,e.__dataPending,e.__dataOld,e.__computeEffects,e.__reflectEffects,e.__notifyEffects,e.__propagateEffects,e.__observeEffects,e.__readOnly,e.__templateInfo,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),Te(n,[{key:"_initializeProperties",value:function(){Ae(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"_initializeProperties",this).call(this),st.registerHost(this),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}},{key:"_initializeProtoProperties",value:function(e){this.__data=Object.create(e),this.__dataPending=Object.create(e),this.__dataOld={}}},{key:"_initializeInstanceProperties",value:function(e){var t=this[Le.READ_ONLY];for(var n in e)t&&t[n]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=e[n])}},{key:"_addPropertyEffect",value:function(e,t,n){this._createPropertyAccessor(e,t==Le.READ_ONLY);var i=Ne(this,t)[e];i||(i=this[t][e]=[]),i.push(n)}},{key:"_removePropertyEffect",value:function(e,t,n){var i=Ne(this,t)[e],o=i.indexOf(n);o>=0&&i.splice(o,1)}},{key:"_hasPropertyEffect",value:function(e,t){var n=this[t];return Boolean(n&&n[e])}},{key:"_hasReadOnlyEffect",value:function(e){return this._hasPropertyEffect(e,Le.READ_ONLY)}},{key:"_hasNotifyEffect",value:function(e){return this._hasPropertyEffect(e,Le.NOTIFY)}},{key:"_hasReflectEffect",value:function(e){return this._hasPropertyEffect(e,Le.REFLECT)}},{key:"_hasComputedEffect",value:function(e){return this._hasPropertyEffect(e,Le.COMPUTE)}},{key:"_setPendingPropertyOrPath",value:function(e,t,i,o){if(o||M(Array.isArray(e)?e[0]:e)!==e){if(!o){var r=V(this,e);if(!(e=K(this,e,t))||!Ae(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"_shouldPropertyChange",this).call(this,e,t,r))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(e,t,i))return function(e,t,n){var i=e.__dataLinkedPaths;if(i){var o=void 0;for(var r in i){var a=i[r];H(r,t)?(o=q(r,a,t),e._setPendingPropertyOrPath(o,n,!0,!0)):H(a,t)&&(o=q(a,r,t),e._setPendingPropertyOrPath(o,n,!0,!0))}}}(this,e,t),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[e])return this._setPendingProperty(e,t,i);this[e]=t}return!1}},{key:"_setUnmanagedPropertyToNode",value:function(e,t,n){n===e[t]&&"object"!=(void 0===n?"undefined":je(n))||(e[t]=n)}},{key:"_setPendingProperty",value:function(e,t,n){var i=this.__dataHasPaths&&F(e),o=i?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(e,t,o[e])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),e in this.__dataOld||(this.__dataOld[e]=this.__data[e]),i?this.__dataTemp[e]=t:this.__data[e]=t,this.__dataPending[e]=t,(i||this[Le.NOTIFY]&&this[Le.NOTIFY][e])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[e]=n),!0)}},{key:"_setProperty",value:function(e,t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}},{key:"_invalidateProperties",value:function(){this.__dataReady&&this._flushProperties()}},{key:"_enqueueClient",value:function(e){this.__dataPendingClients=this.__dataPendingClients||[],e!==this&&this.__dataPendingClients.push(e)}},{key:"_flushProperties",value:function(){this.__dataCounter++,Ae(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"_flushProperties",this).call(this),this.__dataCounter--}},{key:"_flushClients",value:function(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}},{key:"__enableOrFlushClients",value:function(){var e=this.__dataPendingClients;if(e){this.__dataPendingClients=null;for(var t=0;t1?o-1:0),a=1;a3?i-3:0),r=3;r1?i-1:0),r=1;ri&&n.push({literal:e.slice(i,o.index)});var r=o[1][0],a=Boolean(o[2]),s=o[3].trim(),l=!1,c="",p=-1;"{"==r&&(p=s.indexOf("::"))>0&&(c=s.substring(p+2),s=s.substring(0,p),l=!0);var u=nt(s),d=[];if(u){for(var h=u.args,f=u.methodName,m=0;m2&&void 0!==arguments[2]?arguments[2]:"",o="";if(t.cssText||t.rules){var r=t.rules;if(r&&!function(e){var t=r[0];return Boolean(t)&&Boolean(t.selector)&&0===t.selector.indexOf(St)}())for(var a,s=0,l=r.length;s1&&void 0!==arguments[1]?arguments[1]:"",n=Dt(e);return this.transformRules(n,t),e.textContent=Nt(n),n}},{key:"transformCustomStyle",value:function(e){var t=this,n=Dt(e);return Ft(n,function(e){":root"===e.selector&&(e.selector="html"),t.transformRule(e)}),e.textContent=Nt(n),n}},{key:"transformRules",value:function(e,t){var n=this;this._currentElement=t,Ft(e,function(e){n.transformRule(e)}),this._currentElement=null}},{key:"transformRule",value:function(e){e.cssText=this.transformCssText(e.parsedCssText),":root"===e.selector&&(e.selector=":host > *")}},{key:"transformCssText",value:function(e){var t=this;return e=e.replace(Tt,function(e,n,i,o){return t._produceCssProperties(e,n,i,o)}),this._consumeCssProperties(e)}},{key:"_getInitialValueForProperty",value:function(e){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}},{key:"_consumeCssProperties",value:function(e){for(var t=null;t=At.exec(e);){var n=t[0],i=t[1],o=t.index,r=o+n.indexOf("@apply"),a=o+n.length,s=e.slice(0,r),l=e.slice(a),c=this._cssTextToMap(s),p=this._atApplyToCssProperties(i,c);e=""+s+p+l,At.lastIndex=o+p.length}return e}},{key:"_atApplyToCssProperties",value:function(e,t){e=e.replace($t,"");var n=[],i=this._map.get(e);if(i||(this._map.set(e,{}),i=this._map.get(e)),i){this._currentElement&&(i.dependants[this._currentElement]=!0);var o=void 0,r=void 0,a=void 0,s=i.properties;for(o in s)r=[o,": var(",e,"_-_",o],(a=t&&t[o])&&r.push(",",a.replace(Vt,"")),r.push(")"),Vt.test(s[o])&&r.push(" !important"),n.push(r.join(""))}return n.join("; ")}},{key:"_replaceInitialOrInherit",value:function(e,t){var n=Ut.exec(t);return n&&(t=n[1]?this._getInitialValueForProperty(e):"apply-shim-inherit"),t}},{key:"_cssTextToMap",value:function(e){for(var t,n,i=e.split(";"),o=void 0,r=void 0,a={},s=0;s1&&(o=n[0].trim(),r=this._replaceInitialOrInherit(o,n.slice(1).join(":")),a[o]=r);return a}},{key:"_invalidateMixinEntry",value:function(e){if(Wt)for(var t in e.dependants)t!==this._currentElement&&Wt(t)}},{key:"_produceCssProperties",value:function(e,t,n,i){var o=this;if(n&&function e(t,n){var i=t.indexOf("var(");if(-1===i)return n(t,"","","");var o=function(e,t){for(var n=0,i=t,o=e.length;i-1?n=t:(i=t,n=e.getAttribute&&e.getAttribute("is")||""):(n=e.is,i=e.extends),{is:n,typeExtension:i}}(e).is,n=Xt[t];if(n&&!nn(n)){(function(e){return!nn(e)&&e[Qt]===e[Jt]})(n)||(this.prepareTemplate(n,t),function(e){e[Qt]=e[Jt],e._validating||(e._validating=!0,en.then(function(){e[Gt]=e[Jt],e._validating=!1}))}(n));var i=e.shadowRoot;if(i){var o=i.querySelector("style");o&&(o.__cssRules=n._styleAst,o.textContent=Nt(n._styleAst))}}}},{key:"styleDocument",value:function(e){this.ensure(),this.styleSubtree(document.body,e)}}]),e}();if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){var vn=new yn,bn=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate:function(e,t,n){vn.flushCustomStyles(),vn.prepareTemplate(e,t)},styleSubtree:function(e,t){vn.flushCustomStyles(),vn.styleSubtree(e,t)},styleElement:function(e){vn.flushCustomStyles(),vn.styleElement(e)},styleDocument:function(e){vn.flushCustomStyles(),vn.styleDocument(e)},getComputedStyleValue:function(e,t){return Bt(e,t)},flushCustomStyles:function(){vn.flushCustomStyles()},nativeCss:gt,nativeShadow:yt},bn&&(window.ShadyCSS.CustomStyleInterface=bn)}window.ShadyCSS.ApplyShim=mn;var gn=function(){function e(e,t){for(var n=0;n-1}var Tn=!1;function An(e){if(!En(e)&&"touchend"!==e)return wn&&Tn&&g?{passive:!0}:void 0}!function(){try{var e=Object.defineProperty({},"passive",{get:function(){Tn=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}}();var jn=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),In=function(){};In.prototype.reset,In.prototype.mousedown,In.prototype.mousemove,In.prototype.mouseup,In.prototype.touchstart,In.prototype.touchmove,In.prototype.touchend,In.prototype.click;var Rn=[],Ln={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0};function zn(e){var t=Array.prototype.slice.call(e.labels||[]);if(!t.length){t=[];var n=e.getRootNode();if(e.id)for(var i=n.querySelectorAll("label[for = "+e.id+"]"),o=0;o-1;if(o[r]===Mn.mouse.target)return}if(i)return;e.preventDefault(),e.stopPropagation()}};function Dn(e){for(var t,n=jn?["click"]:Cn,i=0;i0?t[0]:e.target}return e.target}function Kn(e){var t=void 0,n=e.type,i=e.currentTarget[kn];if(i){var o=i[n];if(o){if(!e[xn]&&(e[xn]={},"touch"===n.slice(0,5))){var r=(e=e).changedTouches[0];if("touchstart"===n&&1===e.touches.length&&(Mn.touch.id=r.identifier),Mn.touch.id!==r.identifier)return;wn||"touchstart"!==n&&"touchmove"!==n||function(e){var t=e.changedTouches[0],n=e.type;if("touchstart"===n)Mn.touch.x=t.clientX,Mn.touch.y=t.clientY,Mn.touch.scrollDecided=!1;else if("touchmove"===n){if(Mn.touch.scrollDecided)return;Mn.touch.scrollDecided=!0;var i=function(e){var t="auto",n=e.composedPath&&e.composedPath();if(n)for(var i,o=0;or:"pan-y"===i&&(o=r>a)),o?e.preventDefault():o("track")}}(e)}if(!(t=e[xn]).skip){for(var a,s=0;s<$n.length;s++)o[(a=$n[s]).name]&&!t[a.name]&&a.flow&&a.flow.start.indexOf(e.type)>-1&&a.reset&&a.reset();for(var l,c=0;c<$n.length;c++)o[(l=$n[c]).name]&&!t[l.name]&&(t[l.name]=!0,l[n](e))}}}}function Wn(e,t,n){return!!qn[t]&&(function(e,t,n){var i=qn[t],o=i.deps,r=i.name,a=e[kn];a||(e[kn]=a={});for(var s,l,c=0;c2&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Hn(this.info)},hasMovedEnough:function(e,t){if(this.info.prevent)return!1;if(this.info.started)return!0;var n=Math.abs(this.info.x-e),i=Math.abs(this.info.y-t);return n>=5||i>=5},mousedown:function(e){if(Fn(e)){var t=Vn(e),n=this,i=function(e){var i=e.clientX,o=e.clientY;n.hasMovedEnough(i,o)&&(n.info.state=n.info.started?"mouseup"===e.type?"end":"track":"start","start"===n.info.state&&Jn("tap"),n.info.addMove({x:i,y:o}),Fn(e)||(n.info.state="end",Hn(n.info)),n._fire(t,e),n.info.started=!0)};Bn(this.info,i,function(e){n.info.started&&i(e),Hn(n.info)}),this.info.x=e.clientX,this.info.y=e.clientY}},touchstart:function(e){var t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){var t=Vn(e),n=e.changedTouches[0],i=n.clientX,o=n.clientY;this.hasMovedEnough(i,o)&&("start"===this.info.state&&Jn("tap"),this.info.addMove({x:i,y:o}),this._fire(t,n),this.info.state="track",this.info.started=!0)},touchend:function(e){var t=Vn(e),n=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),this._fire(t,n,e))},_fire:function(e,t){var n=this.info.moves[this.info.moves.length-2],i=this.info.moves[this.info.moves.length-1],o=i.x-this.info.x,r=i.y-this.info.y,a=void 0,s=0;n&&(a=i.x-n.x,s=i.y-n.y),Gn(e,"track",{state:this.info.state,x:t.clientX,y:t.clientY,dx:o,dy:r,ddx:a,ddy:s,sourceEvent:t,hover:function(){return Un(t.clientX,t.clientY)}})}}),Zn({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},save:function(e){this.info.x=e.clientX,this.info.y=e.clientY},mousedown:function(e){Fn(e)&&this.save(e)},click:function(e){Fn(e)&&this.forward(e)},touchstart:function(e){this.save(e.changedTouches[0],e)},touchend:function(e){this.forward(e.changedTouches[0],e)},forward:function(e,t){var n=Math.abs(e.clientX-this.info.x),i=Math.abs(e.clientY-this.info.y),o=Vn(t||e);o&&!o.disabled&&(isNaN(n)||isNaN(i)||n<=25&&i<=25||function(e){if("click"===e.type){if(0===e.detail)return!0;var t=Vn(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;var n=t.getBoundingClientRect(),i=e.pageX,o=e.pageY;return!(i>=n.left&&i<=n.right&&o>=n.top&&o<=n.bottom)}return!1}(e))&&(this.info.prevent||Gn(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:t}))}});var ei=Vn,ti=Wn,ni=Yn,ii=function(){function e(e,t){for(var n=0;n-1&&ui.splice(e,1)}}}]),n}();return n.__activateDir=!1,n}),bi=!1,gi=[],_i=[];function wi(){bi=!0,requestAnimationFrame(function(){bi=!1,function(e){for(;e.length;)ki(e.shift())}(gi),setTimeout(function(){!function(e){for(var t=0,n=e.length;t0||n>0;)if(0!=t)if(0!=n){var r,a=e[t-1][n-1],s=e[t-1][n],l=e[t][n-1];(r=s0?ie.after(n):ae,t.bind(this))}},{key:"isDebouncerActive",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];return!(!t||!t.isActive())}},{key:"flushDebouncer",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];t&&t.flush()}},{key:"cancelDebouncer",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];t&&t.cancel()}},{key:"async",value:function(e,t){return t>0?ie.run(e.bind(this),t):~ae.run(e.bind(this))}},{key:"cancelAsync",value:function(e){e<0?ae.cancel(~e):ie.cancel(e)}},{key:"create",value:function(e,t){var n=document.createElement(e);if(t)if(n.setProperties)n.setProperties(t);else for(var i in t)n[i]=t[i];return n}},{key:"elementMatches",value:function(e,t){return qi(t||this,e)}},{key:"toggleAttribute",value:function(e,t,n){n=n||this,1==arguments.length&&(t=!n.hasAttribute(e)),t?n.setAttribute(e,""):n.removeAttribute(e)}},{key:"toggleClass",value:function(e,t,n){n=n||this,1==arguments.length&&(t=!n.classList.contains(e)),t?n.classList.add(e):n.classList.remove(e)}},{key:"transform",value:function(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e}},{key:"translate3d",value:function(e,t,n,i){i=i||this,this.transform("translate3d("+e+","+t+","+n+")",i)}},{key:"arrayDelete",value:function(e,t){var n=void 0;if(Array.isArray(e)){if((n=e.indexOf(t))>=0)return e.splice(n,1)}else if((n=V(this,e).indexOf(t))>=0)return this.splice(e,n,1);return null}},{key:"_logger",value:function(e,t){var n;switch(Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":(n=console)[e].apply(n,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?t-1:0),i=1;i=0;o--){var r=t[o];r?Array.isArray(r)?e(r,n):n.indexOf(r)<0&&(!i||i.indexOf(r)<0)&&n.unshift(r):console.warn("behavior is null, check for missing or 404 import")}return n}(e,null,n),t),n&&(e=n.concat(e)),t.prototype.behaviors=e,t}function eo(e,t){var n=function(n){function i(){return function(e,t){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,t),Xi(i,[{key:"created",value:function(){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"created",this).call(this),e.created&&e.created.call(this)}},{key:"_registered",value:function(){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"_registered",this).call(this),e.beforeRegister&&e.beforeRegister.call(Object.getPrototypeOf(this)),e.registered&&e.registered.call(Object.getPrototypeOf(this))}},{key:"_applyListeners",value:function(){if(Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"_applyListeners",this).call(this),e.listeners)for(var t in e.listeners)this._addMethodEventListenerToNode(this,t,e.listeners[t])}},{key:"_ensureAttributes",value:function(){if(e.hostAttributes)for(var t in e.hostAttributes)this._ensureAttribute(t,e.hostAttributes[t]);Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"_ensureAttributes",this).call(this)}},{key:"ready",value:function(){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"ready",this).call(this),e.ready&&e.ready.call(this)}},{key:"attached",value:function(){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"attached",this).call(this),e.attached&&e.attached.call(this)}},{key:"detached",value:function(){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"detached",this).call(this),e.detached&&e.detached.call(this)}},{key:"attributeChanged",value:function(t,n,o){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"attributeChanged",this).call(this,t,n,o),e.attributeChanged&&e.attributeChanged.call(this,t,n,o)}}],[{key:"properties",get:function(){return e.properties}},{key:"observers",get:function(){return e.observers}},{key:"template",get:function(){return e._template||D&&D.import(this.is,"template")||t.template||this.prototype._template||null}}]),i}();for(var i in n.generatedFrom=e,e)if(!(i in Ji)){var o=Object.getOwnPropertyDescriptor(e,i);o&&Object.defineProperty(n.prototype,i,o)}return n}var to=function e(t){var n;return n="function"==typeof t?t:e.Class(t),customElements.define(n.is,n),n};to.Class=function(e){e||console.warn("Polymer's Class function requires `info` argument");var t=eo(e,e.behaviors?Qi(e.behaviors,HTMLElement):Zi(HTMLElement));return t.is=e.is,t};var no=function(){function e(e,t){for(var n=0;n can only be templatized once");e.__templatizeOwner=t;var i=(t?t.constructor:_o)._parseTemplate(e),o=i.templatizeInstanceClass;o||(o=function(e,t,n){var i=n.mutableData?wo:_o,o=function(e){function t(){return fo(this,t),uo(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ho(t,i),t}();return o.prototype.__templatizeOptions=n,o.prototype._bindTemplate(e),function(e,t,n,i){var o=n.hostProps||{};for(var r in i.instanceProps){delete o[r];var a=i.notifyInstanceProp;a&&e.prototype._addPropertyEffect(r,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:xo(0,a)})}if(i.forwardHostProp&&t.__dataHost)for(var s in o)e.prototype._addPropertyEffect(s,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(e,t,n){e.__dataHost._setPendingPropertyOrPath("_host_"+t,n[t],!0,!0)}})}(o,e,t,n),o}(e,i,n),i.templatizeInstanceClass=o),function(e,t,n){var i=n.forwardHostProp;if(i){var o=t.templatizeTemplateClass;if(!o){var r=n.mutableData?bo:vo;o=t.templatizeTemplateClass=function(e){function t(){return fo(this,t),uo(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ho(t,r),t}();var a=t.hostProps;for(var s in a)o.prototype._addPropertyEffect("_host_"+s,o.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:ko(0,i)}),o.prototype._createNotifyingProperty("_host_"+s)}!function(e,t){mo=e,Object.setPrototypeOf(e,t.prototype),new t,mo=null}(e,o),e.__dataProto&&Object.assign(e.__data,e.__dataProto),e.__dataTemp={},e.__dataPending=null,e.__dataOld=null,e._enableProperties()}}(e,i,n);var r=function(e){function t(){return fo(this,t),uo(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ho(t,o),t}();return r.prototype._methodHost=function(e){var t=e.__dataHost;return t&&t._methodHost||t}(e),r.prototype.__dataHost=e,r.prototype.__templatizeOwner=t,r.prototype.__hostProps=i.hostProps,r}var Co=function(){function e(e,t){for(var n=0;n child");n.disconnect(),e.render()});return void n.observe(this,{childList:!0})}this.root=this._stampTemplate(t),this.$=this.root.$,this.__children=[];for(var i=this.root.firstChild;i;i=i.nextSibling)this.__children[this.__children.length]=i;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}}]),t}();customElements.define("dom-bind",Po);var Eo=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0},To=function(){function e(e,t){for(var n=0;n child");n.disconnect(),e.__render()});return n.observe(this,{childList:!0}),!1}var i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=Oo(t,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(e,t){for(var n,i=this.__instances,o=0;o1&&void 0!==arguments[1]?arguments[1]:0;this.__renderDebouncer=_n.debounce(this.__renderDebouncer,t>0?ie.after(t):ae,e.bind(this)),zi(this.__renderDebouncer)}},{key:"render",value:function(){this.__debounceRender(this.__render),Di()}},{key:"__render",value:function(){this.__ensureTemplatized()&&(this.__applyFullRefresh(),this.__pool.length=0,this._setRenderedItemCount(this.__instances.length),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this.__tryRenderChunk())}},{key:"__applyFullRefresh",value:function(){for(var e=this,t=this.items||[],n=new Array(t.length),i=0;i=r;p--)this.__detachAndRemoveInstance(p)}},{key:"__detachInstance",value:function(e){for(var t=this.__instances[e],n=0;n child");i.disconnect(),e.__render()});return i.observe(this,{childList:!0}),!1}this.__ctor=Oo(n,this,{mutableData:!0,forwardHostProp:function(e,t){this.__instance&&(this.if?this.__instance.forwardHostProp(e,t):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[M(e)]=!0))}})}if(this.__instance){this.__syncHostProperties();var o=this.__instance.children;if(o&&o.length&&this.previousSibling!==o[o.length-1])for(var r,a=0;a=o.index+o.removed.length?n.set(t,e+o.addedCount-o.removed.length):n.set(t,-1))});for(var r=0;r=0&&e.linkPaths("items."+n,"selected."+t++)})}else this.__selectedMap.forEach(function(t){e.linkPaths("selected","items."+t),e.linkPaths("selectedItem","items."+t)})}},{key:"clearSelection",value:function(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}},{key:"isSelected",value:function(e){return this.__selectedMap.has(e)}},{key:"isIndexSelected",value:function(e){return this.isSelected(this.items[e])}},{key:"__deselectChangedIdx",value:function(e){var t=this,n=this.__selectedIndexForItemIndex(e);if(n>=0){var i=0;this.__selectedMap.forEach(function(e,o){n==i++&&t.deselect(o)})}}},{key:"__selectedIndexForItemIndex",value:function(e){var t=this.__dataLinkedPaths["items."+e];if(t)return parseInt(t.slice("selected.".length),10)}},{key:"deselect",value:function(e){var t=this.__selectedMap.get(e);if(t>=0){this.__selectedMap.delete(e);var n=void 0;this.multi&&(n=this.__selectedIndexForItemIndex(t)),this.__updateLinks(),this.multi?this.splice("selected",n,1):this.selected=this.selectedItem=null}}},{key:"deselectIndex",value:function(e){this.deselect(this.items[e])}},{key:"select",value:function(e){this.selectIndex(this.items.indexOf(e))}},{key:"selectIndex",value:function(e){var t=this.items[e];this.isSelected(t)?this.toggle&&this.deselectIndex(e):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(t,e),this.__updateLinks(),this.multi?this.push("selected",t):this.selected=this.selectedItem=t)}}]),n}()})(mt),Bo=function(e){function t(){return No(this,t),Do(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Fo(t,Mo),zo(t,null,[{key:"is",get:function(){return"array-selector"}}]),t}();customElements.define(Bo.is,Bo);var Ho=new hn;window.ShadyCSS||(window.ShadyCSS={prepareTemplate:function(e,t,n){},styleSubtree:function(e,t){Ho.processStyles(),Mt(e,t)},styleElement:function(e){Ho.processStyles()},styleDocument:function(e){Ho.processStyles(),Mt(document.body,e)},getComputedStyleValue:function(e,t){return Bt(e,t)},flushCustomStyles:function(){},nativeCss:gt,nativeShadow:yt}),window.ShadyCSS.CustomStyleInterface=Ho;var qo=function(){function e(e,t){for(var n=0;n0&&(u="/"+u),this.tail&&this.tail.prefix===p&&this.tail.path===u||(c.tail={prefix:p,path:u,__queryParams:this.route.__queryParams}),c.data=r,this._dataInUrl={},r)this._dataInUrl[d]=r[d];this.setProperties?this.setProperties(c,!0):this.__setMulti(c)}else this.__resetProperties()}},__tailPathChanged:function(e){if(this.active){var t=e,n=this._matched;t&&("/"!==t.charAt(0)&&(t="/"+t),n+=t),this.set("route.path",n)}},__updatePathOnDataChange:function(){if(this.route&&this.active){var e=this.__getLink({});e!==this.__getLink(this._dataInUrl)&&this.set("route.path",e)}},__getLink:function(e){var t={tail:null};for(var n in this.data)t[n]=this.data[n];for(var n in e)t[n]=e[n];var i=this.pattern.split("/").map(function(e){return":"==e[0]&&(e=t[e.slice(1)]),e},this);return t.tail&&t.tail.path&&(i.length>0&&"/"===t.tail.path.charAt(0)?i.push(t.tail.path.slice(1)):i.push(t.tail.path)),i.join("/")},__setMulti:function(e){for(var t in e)this._propertySetter(t,e[t]);void 0!==e.data&&(this._pathEffector("data",this.data),this._notifyChange("data")),void 0!==e.active&&(this._pathEffector("active",this.active),this._notifyChange("active")),void 0!==e.tail&&(this._pathEffector("tail",this.tail),this._notifyChange("tail"))}});var Ko=document.createElement("template");Ko.setAttribute("style","display: none;"),Ko.innerHTML='\n \n\n \n',document.head.appendChild(Ko.content);var Wo=document.createElement("style");Wo.textContent="[hidden] { display: none !important; }",document.head.appendChild(Wo);var Yo,Zo,Xo=(Yo=["\n \n\n \n"],Zo=["\n \n\n \n"],Object.freeze(Object.defineProperties(Yo,{raw:{value:Object.freeze(Zo)}})));to({_template:l(Xo),is:"app-toolbar"});var Go=document.createElement("template");Go.setAttribute("style","display: none;"),Go.innerHTML='\n \n\n \n\n \n\n \n\n \n',document.head.appendChild(Go.content);var Jo=document.createElement("template");Jo.setAttribute("style","display: none;"),Jo.innerHTML='\n \n',document.head.appendChild(Jo.content);var Qo={properties:{active:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__activeChanged"},alt:{type:String,value:"loading",observer:"__altChanged"},__coolingDown:{type:Boolean,value:!1}},__computeContainerClasses:function(e,t){return[e||t?"active":"",t?"cooldown":""].join(" ")},__activeChanged:function(e,t){this.__setAriaHidden(!e),this.__coolingDown=!e&&t},__altChanged:function(e){"loading"===e?this.alt=this.getAttribute("aria-label")||e:(this.__setAriaHidden(""===e),this.setAttribute("aria-label",e))},__setAriaHidden:function(e){e?this.setAttribute("aria-hidden","true"):this.removeAttribute("aria-hidden")},__reset:function(){this.active=!1,this.__coolingDown=!1}},er=(n(7),document.createElement("template"));er.setAttribute("style","display: none;"),er.innerHTML='\n \n\n \n',document.head.appendChild(er.content),to({is:"paper-spinner",behaviors:[Qo]});var tr=function e(t){e[" "](t),this.type=t&&t.type||"default",this.key=t&&t.key,t&&"value"in t&&(this.value=t.value)};tr[" "]=function(){},tr.types={},tr.prototype={get value(){var e=this.type,t=this.key;if(e&&t)return tr.types[e]&&tr.types[e][t]},set value(e){var t=this.type,n=this.key;t&&n&&(t=tr.types[t]=tr.types[t]||{},null==e?delete t[n]:t[n]=e)},get list(){if(this.type){var e=tr.types[this.type];return e?Object.keys(e).map(function(e){return nr[this.type][e]},this):[]}},byKey:function(e){return this.key=e,this.value}};var nr=tr.types;to({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,n){var i=new tr({type:e,key:t});return void 0!==n&&n!==i.value?i.value=n:this.value!==i.value&&(this.value=i.value),i},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new tr({type:this.type,key:e}).value}});var ir=Object.freeze(Object.defineProperties(["\n \n"],{raw:{value:Object.freeze(["\n \n"])}}));to({_template:l(ir),is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:Vo.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&Vi(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,Vi(this.root).appendChild(this._img))}});var or={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},rr={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},ar={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},sr=/[a-z0-9*]/,lr=/U\+/,cr=/^arrow/,pr=/^space(bar)?/,ur=/^escape$/;function dr(e,t){var n="";if(e){var i=e.toLowerCase();" "===i||pr.test(i)?n="space":ur.test(i)?n="esc":1==i.length?t&&!sr.test(i)||(n=i):n=cr.test(i)?i.replace("arrow",""):"multiply"==i?"*":i}return n}function hr(e,t){return n=t,i=e.hasModifiers,(n.key?dr(n.key,i):n.detail&&n.detail.key?dr(n.detail.key,i):(r="",(o=n.keyIdentifier)&&(o in or?r=or[o]:lr.test(o)?(o=parseInt(o.replace("U+","0x"),16),r=String.fromCharCode(o).toLowerCase()):r=o.toLowerCase()),r||function(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):rr[e]),t}(n.keyCode)||""))===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey);var n,i,o,r}function fr(e){return e.trim().split(" ").map(function(e){return function(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce(function(e,t){var n=t.split(":"),i=n[0],o=n[1];return i in ar?(e[ar[i]]=!0,e.hasModifiers=!0):(e.key=i,e.event=o||"keydown"),e},{combo:e.split(":").shift()})}(e)})}var mr={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var n=fr(t),i=0;i\n :host {\n display: block;\n position: absolute;\n border-radius: inherit;\n overflow: hidden;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n /* See PolymerElements/paper-behaviors/issues/34. On non-Chrome browsers,\n * creating a node (with a position:absolute) in the middle of an event\n * handler "interrupts" that event handler (which happens when the\n * ripple is created on demand) */\n pointer-events: none;\n }\n\n :host([animating]) {\n /* This resolves a rendering issue in Chrome (as of 40) where the\n ripple is not properly clipped by its parent (which may have\n rounded corners). See: http://jsbin.com/temexa/4\n\n Note: We only apply this style conditionally. Otherwise, the browser\n will create a new compositing layer for every ripple element on the\n page, and that would be bad. */\n -webkit-transform: translate(0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n #background,\n #waves,\n .wave-container,\n .wave {\n pointer-events: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n #background,\n .wave {\n opacity: 0;\n }\n\n #waves,\n .wave {\n overflow: hidden;\n }\n\n .wave-container,\n .wave {\n border-radius: 50%;\n }\n\n :host(.circle) #background,\n :host(.circle) #waves {\n border-radius: 50%;\n }\n\n :host(.circle) .wave-container {\n overflow: hidden;\n }\n \n\n
\n
\n'],{raw:{value:Object.freeze(['\n \n\n
\n
\n'])}})),_r={distance:function(e,t,n,i){var o=e-n,r=t-i;return Math.sqrt(o*o+r*r)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};function wr(e){this.element=e,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}function kr(e){this.element=e,this.color=window.getComputedStyle(e).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),Vi(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}wr.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(e,t){var n=_r.distance(e,t,0,0),i=_r.distance(e,t,this.width,0),o=_r.distance(e,t,0,this.height),r=_r.distance(e,t,this.width,this.height);return Math.max(n,i,o,r)}},kr.MAX_RADIUS=300,kr.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var e;return this.mouseDownStart?(e=_r.now()-this.mouseDownStart,this.mouseUpStart&&(e-=this.mouseUpElapsed),e):0},get mouseUpElapsed(){return this.mouseUpStart?_r.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var e=this.containerMetrics.width*this.containerMetrics.width,t=this.containerMetrics.height*this.containerMetrics.height,n=1.1*Math.min(Math.sqrt(e+t),kr.MAX_RADIUS)+5,i=1.1-n/kr.MAX_RADIUS*.2,o=this.mouseInteractionSeconds/i,r=n*(1-Math.pow(80,-o));return Math.abs(r)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var e=.3*this.mouseUpElapsedSeconds,t=this.opacity;return Math.max(0,Math.min(e,t))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,kr.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,kr.MAX_RADIUS)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},resetInteractionState:function(){this.maxRadius=0,this.mouseDownStart=0,this.mouseUpStart=0,this.xStart=0,this.yStart=0,this.xEnd=0,this.yEnd=0,this.slideDistance=0,this.containerMetrics=new wr(this.element)},draw:function(){var e,t,n;this.wave.style.opacity=this.opacity,e=this.radius/(this.containerMetrics.size/2),t=this.xNow-this.containerMetrics.width/2,n=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+t+"px, "+n+"px)",this.waveContainer.style.transform="translate3d("+t+"px, "+n+"px, 0)",this.wave.style.webkitTransform="scale("+e+","+e+")",this.wave.style.transform="scale3d("+e+","+e+",1)"},downAction:function(e){var t=this.containerMetrics.width/2,n=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=_r.now(),this.center?(this.xStart=t,this.yStart=n,this.slideDistance=_r.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=e?e.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=e?e.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=t,this.yEnd=n,this.slideDistance=_r.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(e){this.isMouseDown&&(this.mouseUpStart=_r.now())},remove:function(){Vi(this.waveContainer.parentNode).removeChild(this.waveContainer)}},to({_template:l(gr),is:"paper-ripple",behaviors:[mr],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){11==this.parentNode.nodeType?this.keyEventTarget=Vi(this).getOwnerRoot().host:this.keyEventTarget=this.parentNode;var e=this.keyEventTarget;this.listen(e,"up","uiUpAction"),this.listen(e,"down","uiDownAction")},detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction"),this.unlisten(this.keyEventTarget,"down","uiDownAction"),this.keyEventTarget=null},get shouldKeepAnimating(){for(var e=0;e0||(this.addRipple().downAction(e),this._animating||(this._animating=!0,this.animate()))},uiUpAction:function(e){this.noink||this.upAction(e)},upAction:function(e){this.holdDown||(this.ripples.forEach(function(t){t.upAction(e)}),this._animating=!0,this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor=null,this.fire("transitionend")},addRipple:function(){var e=new kr(this);return Vi(this.$.waves).appendChild(e.waveContainer),this.$.background.style.backgroundColor=e.color,this.ripples.push(e),this._setAnimating(!0),e},removeRipple:function(e){var t=this.ripples.indexOf(e);t<0||(this.ripples.splice(t,1),e.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){if(this._animating){var e,t;for(e=0;e\n .invisible {\n visibility: hidden;\n }\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}})),Ir=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),Ar(t,[{key:"computeMenuButtonClass",value:function(e,t){return!e&&t?"invisible":""}},{key:"toggleMenu",value:function(e){e.stopPropagation(),this.fire("hass-open-menu")}}],[{key:"template",get:function(){return l(jr)}},{key:"properties",get:function(){return{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1}}}}]),t}();customElements.define("ha-menu-button",Ir);var Rr=function(){function e(e,t){for(var n=0;n\n .placeholder {\n height: 100%;\n }\n\n .layout {\n height: calc(100% - 64px);\n }\n \n\n
\n \n \n
[[title]]
\n
\n
\n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n\n
\n \n \n
[[title]]
\n
\n
\n \n
\n
\n'])}})),zr=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),Rr(t,null,[{key:"template",get:function(){return l(Lr)}},{key:"properties",get:function(){return{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},title:{type:String,value:""}}}}]),t}();customElements.define("hass-loading-screen",zr);var Nr={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):window.removeEventListener("resize",this._boundNotifyResize),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this),this._fireResize())},assignParentResizable:function(e){this._parentResizable=e},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this.unlisten(e,"iron-resize","_onDescendantIronResize"))},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){this._notifyingDescendant?e.stopPropagation():y||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var t=Vi(e).rootTarget;t!==this&&(-1===this._interestedResizables.indexOf(t)&&(this._interestedResizables.push(t),this.listen(t,"iron-resize","_onDescendantIronResize")),t.assignParentResizable(this),this._notifyDescendant(t),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",function t(){document.removeEventListener("readystatechange",t),e()})}else this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable||(window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())}},Dr=[Nr,{listeners:{"app-reset-layout":"_appResetLayoutHandler","iron-resize":"resetLayout"},attached:function(){this.fire("app-reset-layout")},_appResetLayoutHandler:function(e){Vi(e).path[0]!==this&&(this.resetLayout(),e.stopPropagation())},_updateLayoutStates:function(){console.error("unimplemented")},resetLayout:function(){var e=this._updateLayoutStates.bind(this);o&&oe?(this._layoutDebouncer=_n.debounce(this._layoutDebouncer,oe,e),zi(this._layoutDebouncer)):this.debounce("resetLayout",e),this._notifyDescendantResize()},_notifyLayoutChanged:function(){var e=this;requestAnimationFrame(function(){e.fire("app-reset-layout")})},_notifyDescendantResize:function(){this.isAttached&&this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this)}}],Fr=Object.freeze(Object.defineProperties(['\n \n\n
\n \n\n
\n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n\n
\n \n\n
\n \n
\n
\n'])}}));to({_template:l(Fr),is:"app-header-layout",behaviors:[Dr],properties:{hasScrollingRegion:{type:Boolean,value:!1,reflectToAttribute:!0}},observers:["resetLayout(isAttached, hasScrollingRegion)"],get header(){return Vi(this.$.headerSlot).getDistributedNodes()[0]},_updateLayoutStates:function(){var e=this.header;if(this.isAttached&&e){this.$.wrapper.classList.remove("initializing"),e.scrollTarget=this.hasScrollingRegion?this.$.contentContainer:this.ownerDocument.documentElement;var t=e.offsetHeight;this.hasScrollingRegion?(e.style.left="",e.style.right=""):requestAnimationFrame(function(){var t=this.getBoundingClientRect(),n=document.documentElement.clientWidth-t.right;e.style.left=t.left+"px",e.style.right=n+"px"}.bind(this));var n=this.$.contentContainer.style;e.fixed&&!e.condenses&&this.hasScrollingRegion?(n.marginTop=t+"px",n.paddingTop=""):(n.paddingTop=t+"px",n.marginTop="")}}});var Mr="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},Br={},Hr=[{properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(e,t){if(this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),t)if("document"===e)this.scrollTarget=this._doc;else if("string"==typeof e){var n=this.domHost;this.scrollTarget=n&&n.$?n.$[e]:Vi(this.ownerDocument).querySelector("#"+e)}else this._isValidScrollTarget()&&(this._oldScrollTarget=e,this._toggleScrollListener(this._shouldHaveListener,e))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(e){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=e)},set _scrollLeft(e){this.scrollTarget===this._doc?window.scrollTo(e,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=e)},scroll:function(e,t){var n;"object"===(void 0===e?"undefined":Mr(e))?(n=e.left,t=e.top):n=e,n=n||0,t=t||0,this.scrollTarget===this._doc?window.scrollTo(n,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=n,this.scrollTarget.scrollTop=t)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(e,t){var n=t===this._doc?window:t;e?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),n.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(n.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(e){this._shouldHaveListener=e,this._toggleScrollListener(e,this.scrollTarget)}},{properties:{effects:{type:String},effectsConfig:{type:Object,value:function(){return{}}},disabled:{type:Boolean,reflectToAttribute:!0,value:!1},threshold:{type:Number,value:0},thresholdTriggered:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_effectsChanged(effects, effectsConfig, isAttached)"],_updateScrollState:function(e){},isOnScreen:function(){return!1},isContentBelow:function(){return!1},_effectsRunFn:null,_effects:null,get _clampedScrollTop(){return Math.max(0,this._scrollTop)},detached:function(){this._tearDownEffects()},createEffect:function(e,t){var n=Br[e];if(!n)throw new ReferenceError(this._getUndefinedMsg(e));var i=this._boundEffect(n,t||{});return i.setUp(),i},_effectsChanged:function(e,t,n){this._tearDownEffects(),e&&n&&(e.split(" ").forEach(function(e){var n;""!==e&&((n=Br[e])?this._effects.push(this._boundEffect(n,t[e])):console.warn(this._getUndefinedMsg(e)))},this),this._setUpEffect())},_layoutIfDirty:function(){return this.offsetWidth},_boundEffect:function(e,t){t=t||{};var n=parseFloat(t.startsAt||0),i=parseFloat(t.endsAt||1),o=i-n,r=function(){},a=0===n&&1===i?e.run:function(t,i){e.run.call(this,Math.max(0,(t-n)/o),i)};return{setUp:e.setUp?e.setUp.bind(this,t):r,run:e.run?a.bind(this):r,tearDown:e.tearDown?e.tearDown.bind(this):r}},_setUpEffect:function(){this.isAttached&&this._effects&&(this._effectsRunFn=[],this._effects.forEach(function(e){!1!==e.setUp()&&this._effectsRunFn.push(e.run)},this))},_tearDownEffects:function(){this._effects&&this._effects.forEach(function(e){e.tearDown()}),this._effectsRunFn=[],this._effects=[]},_runEffects:function(e,t){this._effectsRunFn&&this._effectsRunFn.forEach(function(n){n(e,t)})},_scrollHandler:function(){if(!this.disabled){var e=this._clampedScrollTop;this._updateScrollState(e),this.threshold>0&&this._setThresholdTriggered(e>=this.threshold)}},_getDOMRef:function(e){console.warn("_getDOMRef","`"+e+"` is undefined")},_getUndefinedMsg:function(e){return"Scroll effect `"+e+"` is undefined. Did you forget to import app-layout/app-scroll-effects/effects/"+e+".html ?"}}],qr=Object.freeze(Object.defineProperties(['\n \n
\n \n
\n'],{raw:{value:Object.freeze(['\n \n
\n \n
\n'])}}));to({_template:l(qr),is:"app-header",behaviors:[Hr,Dr],properties:{condenses:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},reveals:{type:Boolean,value:!1},shadow:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["_configChanged(isAttached, condenses, fixed)"],_height:0,_dHeight:0,_stickyElTop:0,_stickyElRef:null,_top:0,_progress:0,_wasScrollingDown:!1,_initScrollTop:0,_initTimestamp:0,_lastTimestamp:0,_lastScrollTop:0,get _maxHeaderTop(){return this.fixed?this._dHeight:this._height+5},get _stickyEl(){if(this._stickyElRef)return this._stickyElRef;for(var e,t=Vi(this.$.slot).getDistributedNodes(),n=0;e=t[n];n++)if(e.nodeType===Node.ELEMENT_NODE){if(e.hasAttribute("sticky")){this._stickyElRef=e;break}this._stickyElRef||(this._stickyElRef=e)}return this._stickyElRef},_configChanged:function(){this.resetLayout(),this._notifyLayoutChanged()},_updateLayoutStates:function(){if(0!==this.offsetWidth||0!==this.offsetHeight){var e=this._clampedScrollTop,t=0===this._height||0===e,n=this.disabled;this._height=this.offsetHeight,this._stickyElRef=null,this.disabled=!0,t||this._updateScrollState(0,!0),this._mayMove()?this._dHeight=this._stickyEl?this._height-this._stickyEl.offsetHeight:0:this._dHeight=0,this._stickyElTop=this._stickyEl?this._stickyEl.offsetTop:0,this._setUpEffect(),t?this._updateScrollState(e,!0):(this._updateScrollState(this._lastScrollTop,!0),this._layoutIfDirty()),this.disabled=n}},_updateScrollState:function(e,t){if(0!==this._height){var n,i=0,o=this._top,r=(this._lastScrollTop,this._maxHeaderTop),a=e-this._lastScrollTop,s=Math.abs(a),l=e>this._lastScrollTop,c=performance.now();if(this._mayMove()&&(i=this._clamp(this.reveals?o+a:e,0,r)),e>=this._dHeight&&(i=this.condenses&&!this.fixed?Math.max(this._dHeight,i):i,this.style.transitionDuration="0ms"),this.reveals&&!this.disabled&&s<100&&((c-this._initTimestamp>300||this._wasScrollingDown!==l)&&(this._initScrollTop=e,this._initTimestamp=c),e>=r))if(Math.abs(this._initScrollTop-e)>30||s>10){l&&e>=r?i=r:!l&&e>=this._dHeight&&(i=this.condenses&&!this.fixed?this._dHeight:0);var p=a/(c-this._lastTimestamp);this.style.transitionDuration=this._clamp((i-o)/p,0,300)+"ms"}else i=this._top;n=0===this._dHeight?e>0?1:0:i/this._dHeight,t||(this._lastScrollTop=e,this._top=i,this._wasScrollingDown=l,this._lastTimestamp=c),(t||n!==this._progress||o!==i||0===e)&&(this._progress=n,this._runEffects(n,i),this._transformHeader(i))}},_mayMove:function(){return this.condenses||!this.fixed},willCondense:function(){return this._dHeight>0&&this.condenses},isOnScreen:function(){return 0!==this._height&&this._top0:this._clampedScrollTop-this._maxHeaderTop>=0},_transformHeader:function(e){this.translate3d(0,-e+"px",0),this._stickyEl&&this.translate3d(0,this.condenses&&e>=this._stickyElTop?Math.min(e,this._dHeight)-this._stickyElTop+"px":0,0,this._stickyEl)},_clamp:function(e,t,n){return Math.min(n,Math.max(t,e))},_ensureBgContainers:function(){this._bgContainer||(this._bgContainer=document.createElement("div"),this._bgContainer.id="background",this._bgRear=document.createElement("div"),this._bgRear.id="backgroundRearLayer",this._bgContainer.appendChild(this._bgRear),this._bgFront=document.createElement("div"),this._bgFront.id="backgroundFrontLayer",this._bgContainer.appendChild(this._bgFront),Vi(this.root).insertBefore(this._bgContainer,this.$.contentContainer))},_getDOMRef:function(e){switch(e){case"backgroundFrontLayer":return this._ensureBgContainers(),this._bgFront;case"backgroundRearLayer":return this._ensureBgContainers(),this._bgRear;case"background":return this._ensureBgContainers(),this._bgContainer;case"mainTitle":return Vi(this).querySelector("[main-title]");case"condensedTitle":return Vi(this).querySelector("[condensed-title]")}return null},getScrollState:function(){return{progress:this._progress,top:this._top}}});var $r=document.createElement("template");$r.setAttribute("style","display: none;"),$r.innerHTML='\n \n',document.head.appendChild($r.content),n(6);var Ur=document.createElement("template");Ur.setAttribute("style","display: none;"),Ur.innerHTML="\n \n",document.head.appendChild(Ur.content);var Vr=document.createElement("template");Vr.setAttribute("style","display: none;"),Vr.innerHTML='\n \n\n \n\n \n\n \n',document.head.appendChild(Vr.content);var Kr={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){return this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){return this.fitInto===window?this.fitInto.innerHeight:this.fitInto.getBoundingClientRect().height},get _fitLeft(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var e=Vi(this).parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(e=e.host),e},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign},get __shouldPosition(){return(this.horizontalAlign||this.verticalAlign)&&("center"!==this.horizontalAlign||"middle"!==this.verticalAlign)},attached:function(){void 0===this._isRTL&&(this._isRTL="rtl"==window.getComputedStyle(this).direction),this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))},detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var e=window.getComputedStyle(this),t=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==e.top?"top":"auto"!==e.bottom?"bottom":null,horizontally:"auto"!==e.left?"left":"auto"!==e.right?"right":null},sizedBy:{height:"none"!==t.maxHeight,width:"none"!==t.maxWidth,minWidth:parseInt(t.minWidth,10)||0,minHeight:parseInt(t.minHeight,10)||0},margin:{top:parseInt(e.marginTop,10)||0,right:parseInt(e.marginRight,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0}}}},resetFit:function(){var e=this._fitInfo||{};for(var t in e.sizerInlineStyle)this.sizingTarget.style[t]=e.sizerInlineStyle[t];for(var t in e.inlineStyle)this.style[t]=e.inlineStyle[t];this._fitInfo=null},refit:function(){var e=this.sizingTarget.scrollLeft,t=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=e,this.sizingTarget.scrollTop=t},position:function(){if(this.__shouldPosition){this._discoverInfo(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var e=this.getBoundingClientRect(),t=this.__getNormalizedRect(this.positionTarget),n=this.__getNormalizedRect(this.fitInto),i=this._fitInfo.margin,o={width:e.width+i.left+i.right,height:e.height+i.top+i.bottom},r=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,o,e,t,n),a=r.left+i.left,s=r.top+i.top,l=Math.min(n.right-i.right,a+e.width),c=Math.min(n.bottom-i.bottom,s+e.height);a=Math.max(n.left+i.left,Math.min(a,l-this._fitInfo.sizedBy.minWidth)),s=Math.max(n.top+i.top,Math.min(s,c-this._fitInfo.sizedBy.minHeight)),this.sizingTarget.style.maxWidth=Math.max(l-a,this._fitInfo.sizedBy.minWidth)+"px",this.sizingTarget.style.maxHeight=Math.max(c-s,this._fitInfo.sizedBy.minHeight)+"px",this.style.left=a-e.left+"px",this.style.top=s-e.top+"px"}},constrain:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo;e.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),e.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var t=this.getBoundingClientRect();e.sizedBy.height||this.__sizeDimension(t,e.positionedBy.vertically,"top","bottom","Height"),e.sizedBy.width||this.__sizeDimension(t,e.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(e,t,n,i,o){this.__sizeDimension(e,t,n,i,o)},__sizeDimension:function(e,t,n,i,o){var r=this._fitInfo,a=this.__getNormalizedRect(this.fitInto),s="Width"===o?a.width:a.height,l=t===i,c=l?s-e[i]:e[n],p=r.margin[l?n:i],u="offset"+o,d=this[u]-this.sizingTarget[u];this.sizingTarget.style["max"+o]=s-p-c-d+"px"},center:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo.positionedBy;if(!e.vertically||!e.horizontally){this.style.position="fixed",e.vertically||(this.style.top="0px"),e.horizontally||(this.style.left="0px");var t=this.getBoundingClientRect(),n=this.__getNormalizedRect(this.fitInto);if(!e.vertically){var i=n.top-t.top+(n.height-t.height)/2;this.style.top=i+"px"}if(!e.horizontally){var o=n.left-t.left+(n.width-t.width)/2;this.style.left=o+"px"}}}},__getNormalizedRect:function(e){return e===document.documentElement||e===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:e.getBoundingClientRect()},__getOffscreenArea:function(e,t,n){var i=Math.min(0,e.top)+Math.min(0,n.bottom-(e.top+t.height)),o=Math.min(0,e.left)+Math.min(0,n.right-(e.left+t.width));return Math.abs(i)*t.width+Math.abs(o)*t.height},__getPosition:function(e,t,n,i,o,r){var a,s=[{verticalAlign:"top",horizontalAlign:"left",top:o.top+this.verticalOffset,left:o.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:o.top+this.verticalOffset,left:o.right-n.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:o.bottom-n.height-this.verticalOffset,left:o.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:o.bottom-n.height-this.verticalOffset,left:o.right-n.width-this.horizontalOffset}];if(this.noOverlap){for(var l=0,c=s.length;l\n :host {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: var(--iron-overlay-backdrop-background-color, #000);\n opacity: 0;\n transition: opacity 0.2s;\n pointer-events: none;\n @apply --iron-overlay-backdrop;\n }\n\n :host(.opened) {\n opacity: var(--iron-overlay-backdrop-opacity, 0.6);\n pointer-events: auto;\n @apply --iron-overlay-backdrop-opened;\n }\n \n\n \n"],{raw:{value:Object.freeze(["\n \n\n \n"])}}));to({_template:l(Wr),is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&Vi(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||Vi(this.parentNode).removeChild(this)},_onTransitionend:function(e){e&&e.target===this&&this.complete()},_openedChanged:function(e){if(e)this.prepare();else{var t=window.getComputedStyle(this);"0s"!==t.transitionDuration&&0!=t.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}});var Yr=function(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,ti(document.documentElement,"tap",function(){}),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)};Yr.prototype={constructor:Yr,get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement},get deepActiveElement(){var e=document.activeElement;for(e&&e instanceof Element!=0||(e=document.body);e.root&&Vi(e.root).activeElement;)e=Vi(e.root).activeElement;return e},_bringOverlayAtIndexToFront:function(e){var t=this._overlays[e];if(t){var n=this._overlays.length-1,i=this._overlays[n];if(i&&this._shouldBeBehindOverlay(t,i)&&n--,!(e>=n)){var o=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(t)<=o&&this._applyOverlayZ(t,o);e=0)return this._bringOverlayAtIndexToFront(t),void this.trackBackdrop();var n=this._overlays.length,i=this._overlays[n-1],o=Math.max(this._getZ(i),this._minimumZ),r=this._getZ(e);if(i&&this._shouldBeBehindOverlay(e,i)){this._applyOverlayZ(i,o),n--;var a=this._overlays[n-1];o=Math.max(this._getZ(a),this._minimumZ)}r<=o&&this._applyOverlayZ(e,o),this._overlays.splice(n,0,e),this.trackBackdrop()},removeOverlay:function(e){var t=this._overlays.indexOf(e);-1!==t&&(this._overlays.splice(t,1),this.trackBackdrop())},currentOverlay:function(){var e=this._overlays.length-1;return this._overlays[e]},currentOverlayZ:function(){return this._getZ(this.currentOverlay())},ensureMinimumZ:function(e){this._minimumZ=Math.max(this._minimumZ,e)},focusOverlay:function(){var e=this.currentOverlay();e&&e._applyFocus()},trackBackdrop:function(){var e=this._overlayWithBackdrop();(e||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(e)-1,this.backdropElement.opened=!!e,this.backdropElement.prepare())},getBackdrops:function(){for(var e=[],t=0;t=0;e--)if(this._overlays[e].withBackdrop)return this._overlays[e]},_getZ:function(e){var t=this._minimumZ;if(e){var n=Number(e.style.zIndex||window.getComputedStyle(e).zIndex);n==n&&(t=n)}return t},_setZ:function(e,t){e.style.zIndex=t},_applyOverlayZ:function(e,t){this._setZ(e,t+2)},_overlayInPath:function(e){e=e||[];for(var t=0;t0;o>=0&&t.push(i),n="content"===i.localName||"slot"===i.localName?Vi(i).getDistributedNodes():Vi(i.root||i).children;for(var a=0;a0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?n.push(t.shift()):n.push(e.shift());return n.concat(e,t)},_hasLowerTabOrder:function(e,t){var n=Math.max(e.tabIndex,0),i=Math.max(t.tabIndex,0);return 0===n||0===i?i>n:n>i}},aa={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},scrollAction:{type:String},_manager:{type:Object,value:Gr},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},observers:["__updateScrollObservers(isAttached, opened, scrollAction)"],get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||Vi(this).querySelector("[autofocus]")||this},get _focusableNodes(){return ra.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__rafs={},this.__restoreFocusNode=null,this.__scrollTop=this.__scrollLeft=null,this.__onCaptureScroll=this.__onCaptureScroll.bind(this),this.__rootNodes=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=Vi(this).observeNodes(this._onNodesChange)},detached:function(){for(var e in Vi(this).unobserveNodes(this._observer),this._observer=null,this.__rafs)null!==this.__rafs[e]&&cancelAnimationFrame(this.__rafs[e]);this.__rafs={},this._manager.removeOverlay(this),this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(e){this.fire("iron-overlay-canceled",e,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(e){e?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__deraf("__openedChanged",this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this.restoreFocusOnClose&&this.__restoreFocusNode){var e=this._manager.deepActiveElement;(e===document.body||Vi(this).deepContains(e))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null,this._focusNode.blur(),this._focusedChild=null}},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this.cancel(e)},_onCaptureFocus:function(e){if(this.withBackdrop){var t=Vi(e).path;-1===t.indexOf(this)?(e.stopPropagation(),this._applyFocus()):this._focusedChild=t[0]}},_onCaptureEsc:function(e){this.noCancelOnEscKey||this.cancel(e)},_onCaptureTab:function(e){if(this.withBackdrop){this.__ensureFirstLastFocusables();var t=e.shiftKey,n=t?this.__firstFocusableNode:this.__lastFocusableNode,i=t?this.__lastFocusableNode:this.__firstFocusableNode,o=!1;if(n===i)o=!0;else{var r=this._manager.deepActiveElement;o=r===n||r===this}o&&(e.preventDefault(),this._focusedChild=i,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__deraf("refit",this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){if(!this.__firstFocusableNode||!this.__lastFocusableNode){var e=this._focusableNodes;this.__firstFocusableNode=e[0],this.__lastFocusableNode=e[e.length-1]}},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__deraf:function(e,t){var n=this.__rafs;null!==n[e]&&cancelAnimationFrame(n[e]),n[e]=requestAnimationFrame(function(){n[e]=null,t.call(this)}.bind(this))},__updateScrollObservers:function(e,t,n){var i;e&&t&&this.__isValidScrollAction(n)?("lock"===n&&(this.__saveScrollPosition(),i=this,na.indexOf(i)>=0||(0===na.length&&function(){Zr=Zr||function(e){if(e.cancelable&&function(e){var t=Vi(e).rootTarget;if("touchmove"!==e.type&&Qr!==t&&(Qr=t,ea=function(e){for(var t=[],n=e.indexOf(Xr),i=0;i<=n;i++)if(e[i].nodeType===Node.ELEMENT_NODE){var o=e[i],r=o.style;"scroll"!==r.overflow&&"auto"!==r.overflow&&(r=window.getComputedStyle(o)),"scroll"!==r.overflow&&"auto"!==r.overflow||t.push(o)}return t}(Vi(e).path)),!ea.length)return!0;if("touchstart"===e.type)return!1;var n=function(e){var t={deltaX:e.deltaX,deltaY:e.deltaY};if("deltaX"in e);else if("wheelDeltaX"in e&&"wheelDeltaY"in e)t.deltaX=-e.wheelDeltaX,t.deltaY=-e.wheelDeltaY;else if("wheelDelta"in e)t.deltaX=0,t.deltaY=-e.wheelDelta;else if("axis"in e)t.deltaX=1===e.axis?e.detail:0,t.deltaY=2===e.axis?e.detail:0;else if(e.targetTouches){var n=e.targetTouches[0];t.deltaX=Jr.pageX-n.pageX,t.deltaY=Jr.pageY-n.pageY}return t}(e);return!function(e,t,n){if(t||n)for(var i=Math.abs(n)>=Math.abs(t),o=0;o0:r.scrollTop0:r.scrollLeft=0))switch(this.scrollAction){case"lock":this.__restoreScrollPosition();break;case"refit":this.__deraf("refit",this.refit);break;case"cancel":this.cancel(e)}},__saveScrollPosition:function(){document.scrollingElement?(this.__scrollTop=document.scrollingElement.scrollTop,this.__scrollLeft=document.scrollingElement.scrollLeft):(this.__scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this.__scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},__restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this.__scrollTop,document.scrollingElement.scrollLeft=this.__scrollLeft):(document.documentElement.scrollTop=document.body.scrollTop=this.__scrollTop,document.documentElement.scrollLeft=document.body.scrollLeft=this.__scrollLeft)}},sa=[Kr,Nr,aa],la={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(e,t){t&&(e?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(e){this.closingReason=this.closingReason||{},this.closingReason.confirmed=e},_onDialogClick:function(e){for(var t=Vi(e).path,n=0,i=t.indexOf(this);n\n\n :host {\n display: block;\n @apply --layout-relative;\n }\n\n :host(.is-scrolled:not(:first-child))::before {\n content: \'\';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 1px;\n background: var(--divider-color);\n }\n\n :host(.can-scroll:not(.scrolled-to-bottom):not(:last-child))::after {\n content: \'\';\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 1px;\n background: var(--divider-color);\n }\n\n .scrollable {\n padding: 0 24px;\n\n @apply --layout-scroll;\n @apply --paper-dialog-scrollable;\n }\n\n .fit {\n @apply --layout-fit;\n }\n \n\n
\n \n
\n'],{raw:{value:Object.freeze(['\n \n\n
\n \n
\n'])}}));to({_template:l(pa),is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget(),this.classList.add("no-padding")},attached:function(){this._ensureTarget(),requestAnimationFrame(this.updateScrollState.bind(this))},updateScrollState:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||this.parentElement,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(la)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}});var ua=[{properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(e,t){for(var n in t)e[n]=t[n]},_cloneConfig:function(e){var t={isClone:!0};return this._copyProperties(t,e),t},_getAnimationConfigRecursive:function(e,t,n){var i;if(this.animationConfig)if(this.animationConfig.value&&"function"==typeof this.animationConfig.value)this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));else if(i=e?this.animationConfig[e]:this.animationConfig,Array.isArray(i)||(i=[i]),i)for(var o,r=0;o=i[r];r++)if(o.animatable)o.animatable._getAnimationConfigRecursive(o.type||e,t,n);else if(o.id){var a=t[o.id];a?(a.isClone||(t[o.id]=this._cloneConfig(a),a=t[o.id]),this._copyProperties(a,o)):t[o.id]=o}else n.push(o)},getAnimationConfig:function(e){var t={},n=[];for(var i in this._getAnimationConfigRecursive(e,t,n),t)n.push(t[i]);return n}},{_configureAnimations:function(e){var t=[],n=[];if(e.length>0)for(var i=0;s=e[i];i++){var o=document.createElement(s.name);if(o.isNeonAnimation){var r=null;o.configure||(o.configure=function(e){return null}),r=o.configure(s),n.push({result:r,config:s})}else console.warn(this.is+":",s.name,"not found!")}for(var a=0;a\n \n'],{raw:{value:Object.freeze(['\n \n \n'])}}));to({_template:l(ha),is:"paper-dialog",behaviors:[ca,ua],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}});var fa=function(){function e(e,t){for(var n=0;n\n paper-dialog {\n min-width: 350px;\n font-size: 14px;\n border-radius: 2px;\n }\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n paper-checkbox {\n display: block;\n margin: 4px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n paper-dialog {\n max-height: 100%;\n }\n paper-dialog::before {\n content: "";\n position: fixed;\n z-index: -1;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n background-color: inherit;\n }\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n }\n \n \n \n \n
[[title]]
\n
\n \n \n \n
\n'],{raw:{value:Object.freeze(['\n \n \n \n \n
[[title]]
\n
\n \n \n \n
\n'])}})),ga=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),va(t,[{key:"openDialog",value:function(){this.$.dialog.open()}}],[{key:"template",get:function(){return l(ba)}},{key:"properties",get:function(){return{title:String,content:String}}}]),t}();customElements.define("hassio-markdown-dialog",ga),n(5);var _a={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var e=1;this.disabled?e=0:this.active||this.pressed?e=4:this.receivedFocusFromKeyboard&&(e=3),this._setElevation(e)},_computeKeyboardClass:function(e){this.toggleClass("keyboard-focus",e)},_spaceKeyDownHandler:function(e){vr._spaceKeyDownHandler.call(this,e),this.hasRipple()&&this.getRipple().ripples.length<1&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(e){vr._spaceKeyUpHandler.call(this,e),this.hasRipple()&&this._ripple.uiUpAction()}},wa=[br,yr,xr,_a],ka=document.createElement("template");ka.setAttribute("style","display: none;"),ka.innerHTML='\n \n',document.head.appendChild(ka.content);var xa=document.createElement("template");xa.setAttribute("style","display: none;"),xa.innerHTML='\n \n\n \n',document.head.appendChild(xa.content),to({is:"paper-button",behaviors:[wa],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?_a._calculateElevation.apply(this):this._setElevation(0)}});var Oa=Object.freeze(Object.defineProperties(['\n \n\n \n \n \n
\n'],{raw:{value:Object.freeze(['\n \n\n \n \n \n
\n'])}}));to({_template:l(Oa),is:"iron-image",properties:{src:{type:String,value:""},alt:{type:String,value:null},crossorigin:{type:String,value:null},preventLoad:{type:Boolean,value:!1},sizing:{type:String,value:null,reflectToAttribute:!0},position:{type:String,value:"center"},preload:{type:Boolean,value:!1},placeholder:{type:String,value:null,observer:"_placeholderChanged"},fade:{type:Boolean,value:!1},loaded:{notify:!0,readOnly:!0,type:Boolean,value:!1},loading:{notify:!0,readOnly:!0,type:Boolean,value:!1},error:{notify:!0,readOnly:!0,type:Boolean,value:!1},width:{observer:"_widthChanged",type:Number,value:null},height:{observer:"_heightChanged",type:Number,value:null}},observers:["_transformChanged(sizing, position)","_loadStateObserver(src, preventLoad)"],created:function(){this._resolvedSrc=""},_imgOnLoad:function(){this.$.img.src===this._resolveSrc(this.src)&&(this._setLoading(!1),this._setLoaded(!0),this._setError(!1))},_imgOnError:function(){this.$.img.src===this._resolveSrc(this.src)&&(this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",this._setLoading(!1),this._setLoaded(!1),this._setError(!0))},_computePlaceholderHidden:function(){return!this.preload||!this.fade&&!this.loading&&this.loaded},_computePlaceholderClassName:function(){return this.preload&&this.fade&&!this.loading&&this.loaded?"faded-out":""},_computeImgDivHidden:function(){return!this.sizing},_computeImgDivARIAHidden:function(){return""===this.alt?"true":void 0},_computeImgDivARIALabel:function(){return null!==this.alt?this.alt:""===this.src?"":this._resolveSrc(this.src).replace(/[?|#].*/g,"").split("/").pop()},_computeImgHidden:function(){return!!this.sizing},_widthChanged:function(){this.style.width=isNaN(this.width)?this.width:this.width+"px"},_heightChanged:function(){this.style.height=isNaN(this.height)?this.height:this.height+"px"},_loadStateObserver:function(e,t){var n=this._resolveSrc(e);n!==this._resolvedSrc&&(this._resolvedSrc="",this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",""===e||t?(this._setLoading(!1),this._setLoaded(!1),this._setError(!1)):(this._resolvedSrc=n,this.$.img.src=this._resolvedSrc,this.$.sizedImgDiv.style.backgroundImage='url("'+this._resolvedSrc+'")',this._setLoading(!0),this._setLoaded(!1),this._setError(!1)))},_placeholderChanged:function(){this.$.placeholder.style.backgroundImage=this.placeholder?'url("'+this.placeholder+'")':""},_transformChanged:function(){var e=this.$.sizedImgDiv.style,t=this.$.placeholder.style;e.backgroundSize=t.backgroundSize=this.sizing,e.backgroundPosition=t.backgroundPosition=this.sizing?this.position:"",e.backgroundRepeat=t.backgroundRepeat=this.sizing?"no-repeat":""},_resolveSrc:function(e){var t=h(e,this.$.baseURIAnchor.href);return"/"===t[0]&&(t=(location.origin||location.protocol+"//"+location.host)+t),t}});var Ca=Object.freeze(Object.defineProperties(['\n \n\n
\n \n
[[heading]]
\n
\n\n \n'],{raw:{value:Object.freeze(['\n \n\n
\n \n
[[heading]]
\n
\n\n \n'])}}));to({_template:l(Ca),is:"paper-card",properties:{heading:{type:String,value:"",observer:"_headingChanged"},image:{type:String,value:""},alt:{type:String},preloadImage:{type:Boolean,value:!1},fadeImage:{type:Boolean,value:!1},placeholderImage:{type:String,value:null},elevation:{type:Number,value:1,reflectToAttribute:!0},animatedShadow:{type:Boolean,value:!1},animated:{type:Boolean,reflectToAttribute:!0,readOnly:!0,computed:"_computeAnimated(animatedShadow)"}},_isHidden:function(e){return e?"false":"true"},_headingChanged:function(e){var t=this.getAttribute("heading"),n=this.getAttribute("aria-label");"string"==typeof n&&n!==t||this.setAttribute("aria-label",e)},_computeHeadingClass:function(e){return e?" over-image":""},_computeAnimated:function(e){return e}});var Sa={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1},_parentForm:{type:Object}},attached:function(){mt||this.fire("iron-form-element-register")},detached:function(){!mt&&this._parentForm&&this._parentForm.fire("iron-form-element-unregister",{target:this})}},Pa=null,Ea={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1,observer:"_invalidChanged"}},registered:function(){Pa=new tr({type:"validator"})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},get _validator(){return Pa&&Pa.byKey(this.validator)},hasValidator:function(){return null!=this._validator},validate:function(e){return void 0===e&&void 0!==this.value?this.invalid=!this._getValidity(this.value):this.invalid=!this._getValidity(e),!this.invalid},_getValidity:function(e){return!this.hasValidator()||this._validator.validate(e)}},Ta=Object.freeze(Object.defineProperties(['\n \n
[[_text]]
\n'],{raw:{value:Object.freeze(['\n \n
[[_text]]
\n'])}})),Aa=to({_template:l(Ta),is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},_text:{type:String,value:""}},created:function(){Aa.instance||(Aa.instance=this),document.body.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async(function(){this._text=e},100)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});Aa.instance=null,Aa.requestAvailability=function(){Aa.instance||(Aa.instance=document.createElement("iron-a11y-announcer")),document.body.appendChild(Aa.instance)};var ja=Object.freeze(Object.defineProperties(['\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}}));to({_template:l(ja),is:"iron-input",behaviors:[Ea],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){Aa.requestAvailability(),this._previousValidInput="",this._patternAlreadyChecked=!1},attached:function(){this._observer=Vi(this).observeNodes(function(e){this._initSlottedInput()}.bind(this))},detached:function(){this._observer&&(Vi(this).unobserveNodes(this._observer),this._observer=null)},get inputElement(){return this._inputElement},_initSlottedInput:function(){this._inputElement=this.getEffectiveChildren()[0],this.inputElement&&this.inputElement.value&&(this.bindValue=this.inputElement.value),this.fire("iron-input-ready")},get _patternRegExp(){var e;if(this.allowedPattern)e=new RegExp(this.allowedPattern);else switch(this.inputElement.type){case"number":e=/[0-9.,e-]/}return e},_bindValueChanged:function(e,t){t&&(void 0===e?t.value=null:e!==t.value&&(this.inputElement.value=e),this.autoValidate&&this.validate(),this.fire("bind-value-changed",{value:e}))},_onInput:function(){this.allowedPattern&&!this._patternAlreadyChecked&&(this._checkPatternValidity()||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.inputElement.value=this._previousValidInput)),this.bindValue=this._previousValidInput=this.inputElement.value,this._patternAlreadyChecked=!1},_isPrintable:function(e){var t=8==e.keyCode||9==e.keyCode||13==e.keyCode||27==e.keyCode,n=19==e.keyCode||20==e.keyCode||45==e.keyCode||46==e.keyCode||144==e.keyCode||145==e.keyCode||e.keyCode>32&&e.keyCode<41||e.keyCode>111&&e.keyCode<124;return!(t||0==e.charCode&&n)},_onKeypress:function(e){if(this.allowedPattern||"number"===this.inputElement.type){var t=this._patternRegExp;if(t&&!(e.metaKey||e.ctrlKey||e.altKey)){this._patternAlreadyChecked=!0;var n=String.fromCharCode(e.charCode);this._isPrintable(e)&&!t.test(n)&&(e.preventDefault(),this._announceInvalidCharacter("Invalid character "+n+" not entered."))}}},_checkPatternValidity:function(){var e=this._patternRegExp;if(!e)return!0;for(var t=0;t\n :host {\n display: inline-block;\n float: right;\n\n @apply --paper-font-caption;\n @apply --paper-input-char-counter;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host(:dir(rtl)) {\n float: left;\n }\n \n\n [[_charCounterStr]]\n"],{raw:{value:Object.freeze(["\n \n\n [[_charCounterStr]]\n"])}}));to({_template:l(Na),is:"paper-input-char-counter",behaviors:[za],properties:{_charCounterStr:{type:String,value:"0"}},update:function(e){if(e.inputElement){e.value=e.value||"";var t=e.value.toString().length.toString();e.inputElement.hasAttribute("maxlength")&&(t+="/"+e.inputElement.getAttribute("maxlength")),this._charCounterStr=t}}});var Da=Object.freeze(Object.defineProperties(['\n \n\n \n\n
\n \n\n
\n \n \n
\n\n \n
\n\n
\n
\n
\n
\n\n
\n \n
\n'],{raw:{value:Object.freeze(['\n \n\n \n\n
\n \n\n
\n \n \n
\n\n \n
\n\n
\n
\n
\n
\n\n
\n \n
\n'])}})),Fa=document.createElement("template");Fa.setAttribute("style","display: none;"),Fa.innerHTML='\n \n',document.head.appendChild(Fa.content),to({_template:l(Da),is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return X(this.attrForValue)},get _inputElement(){return Vi(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this.__isFirstValueUpdate=!0,this._addons||(this._addons=[]),this.addEventListener("focus",this._boundOnFocus,!0),this.addEventListener("blur",this._boundOnBlur,!0)},attached:function(){this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput),this._inputElementValue&&""!=this._inputElementValue?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)},_onAddonAttached:function(e){this._addons||(this._addons=[]);var t=e.target;-1===this._addons.indexOf(t)&&(this._addons.push(t),this.isAttached&&this._handleValue(this._inputElement))},_onFocus:function(){this._setFocused(!0)},_onBlur:function(){this._setFocused(!1),this._handleValueAndAutoValidate(this._inputElement)},_onInput:function(e){this._handleValueAndAutoValidate(e.target)},_onValueChanged:function(e){var t=e.target;this.__isFirstValueUpdate&&(this.__isFirstValueUpdate=!1,void 0===t.value)||this._handleValueAndAutoValidate(e.target)},_handleValue:function(e){var t=this._inputElementValue;t||0===t||"number"===e.type&&!e.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1,this.updateAddons({inputElement:e,value:t,invalid:this.invalid})},_handleValueAndAutoValidate:function(e){var t;this.autoValidate&&e&&(t=e.validate?e.validate(this._inputElementValue):e.checkValidity(),this.invalid=!t),this._handleValue(e)},_onIronInputValidate:function(e){this.invalid=this._inputElement.invalid},_invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})},updateAddons:function(e){for(var t,n=0;t=this._addons[n];n++)t.update(e)},_computeInputContentClass:function(e,t,n,i,o){var r="input-content";if(e)o&&(r+=" label-is-hidden"),i&&(r+=" is-invalid");else{var a=this.querySelector("label");t||o?(r+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",i?r+=" is-invalid":n&&(r+=" label-is-highlighted")):(a&&(this.$.labelAndInputContainer.style.position="relative"),i&&(r+=" is-invalid"))}return n&&(r+=" focused"),r},_computeUnderlineClass:function(e,t){var n="underline";return t?n+=" is-invalid":e&&(n+=" is-highlighted"),n},_computeAddOnContentClass:function(e,t){var n="add-on-content";return t?n+=" is-invalid":e&&(n+=" is-highlighted"),n}});var Ma=Object.freeze(Object.defineProperties(["\n \n\n \n"],{raw:{value:Object.freeze(["\n \n\n \n"])}}));to({_template:l(Ma),is:"paper-input-error",behaviors:[za],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(e){this._setInvalid(e.invalid)}});var Ba=document.createElement("template");Ba.setAttribute("style","display: none;"),Ba.innerHTML='\n \n\n \x3c!-- This is a fresh new hell to make this element hybrid. Basically, in 2.0\n we lost is=, so the example same template can\'t be used with iron-input 1.0 and 2.0.\n Expect some conditional code (especially in the tests).\n --\x3e\n \n\n \n\n',document.head.appendChild(Ba.content),to({is:"paper-input",behaviors:[La,Sa],properties:{value:{type:String}},beforeRegister:function(){var e="function"==typeof document.createElement("iron-input")._initSlottedInput?"v1":"v0",t=D.import("paper-input","template"),n=D.import("paper-input","template#"+e),i=t.content.querySelector("#template-placeholder");i&&i.parentNode.replaceChild(n.content,i)},get _focusableElement(){return mt?this.inputElement._inputElement:this.inputElement},listeners:{"iron-input-ready":"_onIronInputReady"},_onIronInputReady:function(){this.$.nativeInput||(this.$.nativeInput=this.$$("input")),this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.$.nativeInput.type)&&(this.alwaysFloatLabel=!0),this.inputElement.bindValue&&this.$.container._handleValueAndAutoValidate(this.inputElement)}});var Ha=Object.freeze(Object.defineProperties(['\n \n\n
\n \n
\n'],{raw:{value:Object.freeze(['\n \n\n
\n \n
\n'])}}));to({_template:l(Ha),is:"iron-dropdown",behaviors:[yr,mr,sa,ua],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1,observer:"_allowOutsideScrollChanged"}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"],get containedElement(){for(var e=Vi(this.$.content).getDistributedNodes(),t=0,n=e.length;t\n :host {\n display: inline-block;\n position: relative;\n padding: 8px;\n outline: none;\n\n @apply --paper-menu-button;\n }\n\n :host([disabled]) {\n cursor: auto;\n color: var(--disabled-text-color);\n\n @apply --paper-menu-button-disabled;\n }\n\n iron-dropdown {\n @apply --paper-menu-button-dropdown;\n }\n\n .dropdown-content {\n @apply --shadow-elevation-2dp;\n\n position: relative;\n border-radius: 2px;\n background-color: var(--paper-menu-button-dropdown-background, var(--primary-background-color));\n\n @apply --paper-menu-button-content;\n }\n\n :host([vertical-align="top"]) .dropdown-content {\n margin-bottom: 20px;\n margin-top: -10px;\n top: 10px;\n }\n\n :host([vertical-align="bottom"]) .dropdown-content {\n bottom: 10px;\n margin-bottom: -10px;\n margin-top: 20px;\n }\n\n #trigger {\n cursor: pointer;\n }\n \n\n
\n \n
\n\n \n \n \n'],{raw:{value:Object.freeze(['\n \n\n
\n \n
\n\n \n \n \n'])}})),Ua={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400},Va=to({_template:l($a),is:"paper-menu-button",behaviors:[mr,yr],properties:{opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},noOverlap:{type:Boolean},noAnimations:{type:Boolean,value:!1},ignoreSelect:{type:Boolean,value:!1},closeOnActivate:{type:Boolean,value:!1},openAnimationConfig:{type:Object,value:function(){return[{name:"fade-in-animation",timing:{delay:100,duration:200}},{name:"paper-menu-grow-width-animation",timing:{delay:100,duration:150,easing:Ua.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-grow-height-animation",timing:{delay:100,duration:275,easing:Ua.ANIMATION_CUBIC_BEZIER}}]}},closeAnimationConfig:{type:Object,value:function(){return[{name:"fade-out-animation",timing:{duration:150}},{name:"paper-menu-shrink-width-animation",timing:{delay:100,duration:50,easing:Ua.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-shrink-height-animation",timing:{duration:200,easing:"ease-in"}}]}},allowOutsideScroll:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!0},_dropdownContent:{type:Object}},hostAttributes:{role:"group","aria-haspopup":"true"},listeners:{"iron-activate":"_onIronActivate","iron-select":"_onIronSelect"},get contentElement(){for(var e=Vi(this.$.content).getDistributedNodes(),t=0,n=e.length;t-1&&e.preventDefault()}});Object.keys(Ua).forEach(function(e){Va[e]=Ua[e]}),to({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new tr({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map(function(e){return this.name+":"+e},this)},applyIcon:function(e,t){this.removeIcon(e);var n=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(n){var i=Vi(e.root||e);return i.insertBefore(n,i.childNodes[0]),e._svgIcon=n}return null},removeIcon:function(e){e._svgIcon&&(Vi(e.root||e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var t=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===t.getAttribute("dir")}else e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&"rtl"===window.getComputedStyle(e).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async(function(){this.fire("iron-iconset-added",this,{node:window})})},_createIconMap:function(){var e=Object.create(null);return Vi(this).querySelectorAll("[id]").forEach(function(t){e[t.id]=t}),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,n){if(e){var i=e.cloneNode(!0),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=i.getAttribute("viewBox")||"0 0 "+t+" "+t,a="pointer-events: none; display: block; width: 100%; height: 100%;";return n&&i.hasAttribute("mirror-in-rtl")&&(a+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),o.setAttribute("viewBox",r),o.setAttribute("preserveAspectRatio","xMidYMid meet"),o.setAttribute("focusable","false"),o.style.cssText=a,o.appendChild(i).removeAttribute("id"),o}return null}});var Ka=document.createElement("template");Ka.setAttribute("style","display: none;"),Ka.innerHTML='\n\n\n\n',document.head.appendChild(Ka.content);var Wa=document.createElement("template");Wa.setAttribute("style","display: none;"),Wa.innerHTML='\n \n',document.head.appendChild(Wa.content);var Ya=Object.freeze(Object.defineProperties(['\n \n\n \x3c!-- this div fulfills an a11y requirement for combobox, do not remove --\x3e\n \n \n \x3c!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via --\x3e\n \n \n \n'],{raw:{value:Object.freeze(['\n \n\n \x3c!-- this div fulfills an a11y requirement for combobox, do not remove --\x3e\n \n \n \x3c!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via --\x3e\n \n \n \n'])}}));to({_template:l(Ya),is:"paper-dropdown-menu",behaviors:[br,yr,Sa,Ea],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0},label:{type:String},placeholder:{type:String},errorMessage:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,dynamicAlign:{type:Boolean},restoreFocusOnClose:{type:Boolean,value:!0}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},hostAttributes:{role:"combobox","aria-autocomplete":"none","aria-haspopup":"true"},observers:["_selectedItemChanged(selectedItem)"],attached:function(){var e=this.contentElement;e&&e.selectedItem&&this._setSelectedItem(e.selectedItem)},get contentElement(){for(var e=Vi(this.$.content).getDistributedNodes(),t=0,n=e.length;t\n \n",document.head.appendChild(Xa.content);var Ga=Object.freeze(Object.defineProperties(['\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}}));to({_template:l(Ga),is:"paper-item",behaviors:[Za]});var Ja=function(e){this.selection=[],this.selectCallback=e};Ja.prototype={get:function(){return this.multi?this.selection.slice():this.selection[0]},clear:function(e){this.selection.slice().forEach(function(t){(!e||e.indexOf(t)<0)&&this.setItemSelected(t,!1)},this)},isSelected:function(e){return this.selection.indexOf(e)>=0},setItemSelected:function(e,t){if(null!=e&&t!==this.isSelected(e)){if(t)this.selection.push(e);else{var n=this.selection.indexOf(e);n>=0&&this.selection.splice(n,1)}this.selectCallback&&this.selectCallback(e,t)}},select:function(e){this.multi?this.toggle(e):this.get()!==e&&(this.setItemSelected(this.get(),!1),this.setItemSelected(e,!0))},toggle:function(e){this.setItemSelected(e,!this.isSelected(e))}};var Qa={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},fallbackSelection:{type:String,value:null},items:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}},_excludedLocalNames:{type:Object,value:function(){return{template:1,"dom-bind":1,"dom-if":1,"dom-repeat":1}}}},observers:["_updateAttrForSelected(attrForSelected)","_updateSelected(selected)","_checkFallback(fallbackSelection)"],created:function(){this._bindFilterItem=this._filterItem.bind(this),this._selection=new Ja(this._applySelection.bind(this))},attached:function(){this._observer=this._observeItems(this),this._addListener(this.activateEvent)},detached:function(){this._observer&&Vi(this).unobserveNodes(this._observer),this._removeListener(this.activateEvent)},indexOf:function(e){return this.items?this.items.indexOf(e):-1},select:function(e){this.selected=e},selectPrevious:function(){var e=this.items.length,t=(Number(this._valueToIndex(this.selected))-1+e)%e;this.selected=this._indexToValue(t)},selectNext:function(){var e=(Number(this._valueToIndex(this.selected))+1)%this.items.length;this.selected=this._indexToValue(e)},selectIndex:function(e){this.select(this._indexToValue(e))},forceSynchronousItemUpdate:function(){this._observer&&"function"==typeof this._observer.flush?this._observer.flush():this._updateItems()},get _shouldUpdateSelection(){return null!=this.selected},_checkFallback:function(){this._updateSelected()},_addListener:function(e){this.listen(this,e,"_activateHandler")},_removeListener:function(e){this.unlisten(this,e,"_activateHandler")},_activateEventChanged:function(e,t){this._removeListener(t),this._addListener(e)},_updateItems:function(){var e=Vi(this).queryDistributedElements(this.selectable||"*");e=Array.prototype.filter.call(e,this._bindFilterItem),this._setItems(e)},_updateAttrForSelected:function(){this.selectedItem&&(this.selected=this._valueForItem(this.selectedItem))},_updateSelected:function(){this._selectSelected(this.selected)},_selectSelected:function(e){if(this.items){var t=this._valueToItem(this.selected);t?this._selection.select(t):this._selection.clear(),this.fallbackSelection&&this.items.length&&void 0===this._selection.get()&&(this.selected=this.fallbackSelection)}},_filterItem:function(e){return!this._excludedLocalNames[e.localName]},_valueToItem:function(e){return null==e?null:this.items[this._valueToIndex(e)]},_valueToIndex:function(e){if(!this.attrForSelected)return Number(e);for(var t,n=0;t=this.items[n];n++)if(this._valueForItem(t)==e)return n},_indexToValue:function(e){if(!this.attrForSelected)return e;var t=this.items[e];return t?this._valueForItem(t):void 0},_valueForItem:function(e){if(!e)return null;if(!this.attrForSelected){var t=this.indexOf(e);return-1===t?null:t}var n=e[X(this.attrForSelected)];return void 0!=n?n:e.getAttribute(this.attrForSelected)},_applySelection:function(e,t){this.selectedClass&&this.toggleClass(this.selectedClass,t,e),this.selectedAttribute&&this.toggleAttribute(this.selectedAttribute,t,e),this._selectionChange(),this.fire("iron-"+(t?"select":"deselect"),{item:e})},_selectionChange:function(){this._setSelectedItem(this._selection.get())},_observeItems:function(e){return Vi(e).observeNodes(function(e){this._updateItems(),this._updateSelected(),this.fire("iron-items-changed",e,{bubbles:!1,cancelable:!1})})},_activateHandler:function(e){for(var t=e.target,n=this.items;t&&t!=this;){var i=n.indexOf(t);if(i>=0){var o=this._indexToValue(i);return void this._itemActivate(o,t)}t=t.parentNode}},_itemActivate:function(e,t){this.fire("iron-activate",{selected:e,item:t},{cancelable:!0}).defaultPrevented||this.select(e)}},es={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}},selectedItems:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}}},observers:["_updateSelected(selectedValues.splices)"],select:function(e){this.multi?this._toggleSelected(e):this.selected=e},multiChanged:function(e){this._selection.multi=e,this._updateSelected()},get _shouldUpdateSelection(){return null!=this.selected||null!=this.selectedValues&&this.selectedValues.length},_updateAttrForSelected:function(){this.multi?this.selectedItems&&this.selectedItems.length>0&&(this.selectedValues=this.selectedItems.map(function(e){return this._indexToValue(this.indexOf(e))},this).filter(function(e){return null!=e},this)):Qa._updateAttrForSelected.apply(this)},_updateSelected:function(){this.multi?this._selectMulti(this.selectedValues):this._selectSelected(this.selected)},_selectMulti:function(e){e=e||[];var t=(this._valuesToItems(e)||[]).filter(function(e){return null!==e&&void 0!==e});this._selection.clear(t);for(var n=0;n\n :host {\n display: block;\n padding: 8px 0;\n\n background: var(--paper-listbox-background-color, var(--primary-background-color));\n color: var(--paper-listbox-color, var(--primary-text-color));\n\n @apply --paper-listbox;\n }\n \n\n \n"],{raw:{value:Object.freeze(["\n \n\n \n"])}}));to({_template:l(is),is:"paper-listbox",behaviors:[ns],hostAttributes:{role:"listbox"}});var os=function(){function e(e,t){for(var n=0;n\n :host,\n paper-card,\n paper-dropdown-menu {\n display: block;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n paper-item {\n width: 450px;\n }\n .card-actions {\n text-align: right;\n }\n \n \n
\n \n\n \n \n \n \n \n \n \n \n \n \n
\n
\n Save\n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n \n\n \n \n \n \n \n \n \n \n \n \n
\n
\n Save\n
\n
\n'])}})),as=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),os(t,[{key:"addonChanged",value:function(e){var t=this;if(this.setProperties({selectedInput:e.audio_input||"null",selectedOutput:e.audio_output||"null"}),!this.outputDevices){var n=[{device:"null",name:"-"}];this.hass.callApi("get","hassio/hardware/audio").then(function(e){var i=e.data.audio,o=Object.keys(i.input).map(function(e){return{device:e,name:i.input[e]}}),r=Object.keys(i.output).map(function(e){return{device:e,name:i.output[e]}});t.setProperties({inputDevices:n.concat(o),outputDevices:n.concat(r)})},function(){t.setProperties({inputDevices:n,outputDevices:n})})}}},{key:"_saveSettings",value:function(){var e=this;this.error=null;var t="hassio/addons/"+this.addon.slug+"/options";this.hass.callApi("post",t,{audio_input:"null"===this.selectedInput?null:this.selectedInput,audio_output:"null"===this.selectedOutput?null:this.selectedOutput}).then(function(){e.fire("hass-api-called",{success:!0,path:t})},function(t){e.error=t.body.message})}}],[{key:"template",get:function(){return l(rs)}},{key:"properties",get:function(){return{hass:Object,addon:{type:Object,observer:"addonChanged"},inputDevices:Array,outputDevices:Array,selectedInput:String,selectedOutput:String,error:String}}}]),t}();customElements.define("hassio-addon-audio",as);var ss=Object.freeze(Object.defineProperties(['\n \n\n \x3c!-- the mirror sizes the input/textarea so it grows with typing --\x3e\n \x3c!-- use   instead   of to allow this element to be used in XHTML --\x3e\n \n\n \x3c!-- size the input/textarea with a div, because the textarea has intrinsic size in ff --\x3e\n
\n \n
\n'],{raw:{value:Object.freeze(['\n \n\n \x3c!-- the mirror sizes the input/textarea so it grows with typing --\x3e\n \x3c!-- use   instead   of to allow this element to be used in XHTML --\x3e\n \n\n \x3c!-- size the input/textarea with a div, because the textarea has intrinsic size in ff --\x3e\n
\n \n
\n'])}}));to({_template:l(ss),is:"iron-autogrow-textarea",behaviors:[Ea,yr],properties:{value:{observer:"_valueChanged",type:String,notify:!0},bindValue:{observer:"_bindValueChanged",type:String,notify:!0},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean},minlength:{type:Number},maxlength:{type:Number},label:{type:String}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(e){this.$.textarea.selectionStart=e},set selectionEnd(e){this.$.textarea.selectionEnd=e},attached:function(){navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&(this.$.textarea.style.marginLeft="-3px")},validate:function(){var e=this.$.textarea.validity.valid;return e&&(this.required&&""===this.value?e=!1:this.hasValidator()&&(e=Ea.validate.call(this,this.value))),this.invalid=!e,this.fire("iron-input-validate"),e},_bindValueChanged:function(e){this.value=e},_valueChanged:function(e){var t=this.textarea;t&&(t.value!==e&&(t.value=e||0===e?e:""),this.bindValue=e,this.$.mirror.innerHTML=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))},_onInput:function(e){var t=Vi(e).path;this.value=t?t[0].value:e.target.value},_constrain:function(e){var t;for(e=e||[""],t=this.maxRows>0&&e.length>this.maxRows?e.slice(0,this.maxRows):e.slice(0);this.rows>0&&t.length")+" "},_valueForMirror:function(){var e=this.textarea;if(e)return this.tokens=e&&e.value?e.value.replace(/&/gm,"&").replace(/"/gm,""").replace(/'/gm,"'").replace(//gm,">").split("\n"):[""],this._constrain(this.tokens)},_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)}});var ls=function(){function e(e,t){for(var n=0;n\n .container {\n position: relative;\n display: inline-block;\n }\n\n paper-button {\n transition: all 1s;\n }\n\n .success paper-button {\n color: white;\n background-color: var(--google-green-500);\n transition: none;\n }\n\n .error paper-button {\n color: white;\n background-color: var(--google-red-500);\n transition: none;\n }\n\n paper-button[disabled] {\n color: #c8c8c8;\n }\n\n .progress {\n @apply --layout;\n @apply --layout-center-center;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n \n
\n \n \n \n \n
\n'],{raw:{value:Object.freeze(['\n \n
\n \n \n \n \n
\n'])}})),ps=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),ls(t,[{key:"tempClass",value:function(e){var t=this.$.container.classList;t.add(e),setTimeout(function(){t.remove(e)},1e3)}},{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("click",function(t){return e.buttonTapped(t)})}},{key:"buttonTapped",value:function(e){this.progress&&e.stopPropagation()}},{key:"actionSuccess",value:function(){this.tempClass("success")}},{key:"actionError",value:function(){this.tempClass("error")}},{key:"computeDisabled",value:function(e,t){return e||t}}],[{key:"template",get:function(){return l(cs)}},{key:"properties",get:function(){return{hass:{type:Object},progress:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1}}}}]),t}();customElements.define("ha-progress-button",ps);var us=function(){function e(e,t){for(var n=0;n\n'],{raw:{value:Object.freeze(['\n \n'])}})),hs=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),us(t,[{key:"buttonTapped",value:function(){var e=this;this.progress=!0;var t={method:this.method,path:this.path,data:this.data};this.hass.callApi(this.method,this.path,this.data).then(function(n){e.progress=!1,e.$.progress.actionSuccess(),t.success=!0,t.response=n},function(n){e.progress=!1,e.$.progress.actionError(),t.success=!1,t.response=n}).then(function(){e.fire("hass-api-called",t)})}}],[{key:"template",get:function(){return l(ds)}},{key:"properties",get:function(){return{hass:Object,progress:{type:Boolean,value:!1},path:String,method:{type:String,value:"POST"},data:{type:Object,value:{}},disabled:{type:Boolean,value:!1}}}}]),t}();customElements.define("ha-call-api-button",hs);var fs=function(){function e(e,t){for(var n=0;n\n :host {\n display: block;\n }\n paper-card {\n display: block;\n }\n .card-actions {\n @apply --layout;\n @apply --layout-justified;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n iron-autogrow-textarea {\n width: 100%;\n font-family: monospace;\n }\n .syntaxerror {\n color: var(--google-red-500);\n }\n \n \n
\n \n \n
\n
\n Reset to defaults\n Save\n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n \n \n
\n
\n Reset to defaults\n Save\n
\n
\n'])}})),ys=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),fs(t,[{key:"addonChanged",value:function(e){this.config=e?JSON.stringify(e.options,null,2):""}},{key:"configChanged",value:function(e){try{this.$.config.classList.remove("syntaxerror"),this.configParsed=JSON.parse(e)}catch(e){this.$.config.classList.add("syntaxerror"),this.configParsed=null}}},{key:"saveTapped",value:function(){var e=this;this.error=null,this.hass.callApi("post","hassio/addons/"+this.addonSlug+"/options",{options:this.configParsed}).catch(function(t){e.error=t.body.message})}}],[{key:"template",get:function(){return l(ms)}},{key:"properties",get:function(){return{hass:Object,addon:{type:Object,observer:"addonChanged"},addonSlug:String,config:{type:String,observer:"configChanged"},configParsed:Object,error:String,resetData:{type:Object,value:{options:null}}}}}]),t}();customElements.define("hassio-addon-config",ys);var vs={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(e){return this.disabled||!this.required||this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){void 0!==this.value&&null!==this.value||(this.value="on")}},bs=[Cr,[Sa,Ea,vs],{_checkedChanged:function(){vs._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){xr._buttonStateChanged.call(this),this.disabled||this.isAttached&&(this.checked=this.active)}}],gs=document.createElement("template");gs.setAttribute("style","display: none;"),gs.innerHTML='\n \n\n \n',document.head.appendChild(gs.content),to({is:"paper-toggle-button",behaviors:[bs],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},attached:function(){xi(this,function(){Xn(this,"pan-y")})},_ontrack:function(e){var t=e.detail;"start"===t.state?this._trackStart(t):"track"===t.state?this._trackMove(t):"end"===t.state&&this._trackEnd(t)},_trackStart:function(e){this._width=this.$.toggleBar.offsetWidth/2,this._trackChecked=this.checked,this.$.toggleButton.classList.add("dragging")},_trackMove:function(e){var t=e.dx;this._x=Math.min(this._width,Math.max(0,this._trackChecked?this._width+t:t)),this.translate3d(this._x+"px",0,0,this.$.toggleButton),this._userActivate(this._x>this._width/2)},_trackEnd:function(e){this.$.toggleButton.classList.remove("dragging"),this.transform("",this.$.toggleButton)},_createRipple:function(){this._rippleContainer=this.$.toggleButton;var e=xr._createRipple();return e.id="ink",e.setAttribute("recenters",""),e.classList.add("circle","toggle-ink"),e}});var _s=[60,"second",60,"minute",24,"hour",7,"day"];to({is:"iron-request",hostAttributes:{hidden:!0},properties:{xhr:{type:Object,notify:!0,readOnly:!0,value:function(){return new XMLHttpRequest}},response:{type:Object,notify:!0,readOnly:!0,value:function(){return null}},status:{type:Number,notify:!0,readOnly:!0,value:0},statusText:{type:String,notify:!0,readOnly:!0,value:""},completes:{type:Object,readOnly:!0,notify:!0,value:function(){return new Promise(function(e,t){this.resolveCompletes=e,this.rejectCompletes=t}.bind(this))}},progress:{type:Object,notify:!0,readOnly:!0,value:function(){return{}}},aborted:{type:Boolean,notify:!0,readOnly:!0,value:!1},errored:{type:Boolean,notify:!0,readOnly:!0,value:!1},timedOut:{type:Boolean,notify:!0,readOnly:!0,value:!1}},get succeeded(){if(this.errored||this.aborted||this.timedOut)return!1;var e=this.xhr.status||0;return 0===e||e>=200&&e<300},send:function(e){var t=this.xhr;if(t.readyState>0)return null;t.addEventListener("progress",function(e){this._setProgress({lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total}),this.fire("iron-request-progress-changed",{value:this.progress})}.bind(this)),t.addEventListener("error",function(t){this._setErrored(!0),this._updateStatus();var n=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(n)}.bind(this)),t.addEventListener("timeout",function(t){this._setTimedOut(!0),this._updateStatus();var n=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(n)}.bind(this)),t.addEventListener("abort",function(){this._setAborted(!0),this._updateStatus();var t=new Error("Request aborted."),n=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(n)}.bind(this)),t.addEventListener("loadend",function(){if(this._updateStatus(),this._setResponse(this.parseResponse()),this.succeeded)this.resolveCompletes(this);else{var t=new Error("The request failed with status code: "+this.xhr.status),n=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(n)}}.bind(this)),this.url=e.url;var n=!1!==e.async;t.open(e.method||"GET",e.url,n);var i={json:"application/json",text:"text/plain",html:"text/html",xml:"application/xml",arraybuffer:"application/octet-stream"}[e.handleAs],o=e.headers||Object.create(null),r=Object.create(null);for(var a in o)r[a.toLowerCase()]=o[a];if(o=r,i&&!o.accept&&(o.accept=i),Object.keys(o).forEach(function(e){/[A-Z]/.test(e)&&Vo._error("Headers must be lower case, got",e),t.setRequestHeader(e,o[e])},this),n){t.timeout=e.timeout;var s=e.handleAs;!e.jsonPrefix&&s||(s="text"),t.responseType=t._responseType=s,e.jsonPrefix&&(t._jsonPrefix=e.jsonPrefix)}t.withCredentials=!!e.withCredentials;var l=this._encodeBodyObject(e.body,o["content-type"]);return t.send(l),this.completes},parseResponse:function(){var e=this.xhr,t=e.responseType||e._responseType,n=!this.xhr.responseType,i=e._jsonPrefix&&e._jsonPrefix.length||0;try{switch(t){case"json":if(n||void 0===e.response)try{return JSON.parse(e.responseText)}catch(t){return console.warn("Failed to parse JSON sent from "+e.responseURL),null}return e.response;case"xml":return e.responseXML;case"blob":case"document":case"arraybuffer":return e.response;case"text":default:if(i)try{return JSON.parse(e.responseText.substring(i))}catch(t){return console.warn("Failed to parse JSON sent from "+e.responseURL),null}return e.responseText}}catch(e){this.rejectCompletes(new Error("Could not parse response. "+e.message))}},abort:function(){this._setAborted(!0),this.xhr.abort()},_encodeBodyObject:function(e,t){if("string"==typeof e)return e;var n=e;switch(t){case"application/json":return JSON.stringify(n);case"application/x-www-form-urlencoded":return this._wwwFormUrlEncode(n)}return e},_wwwFormUrlEncode:function(e){if(!e)return"";var t=[];return Object.keys(e).forEach(function(n){t.push(this._wwwFormUrlEncodePiece(n)+"="+this._wwwFormUrlEncodePiece(e[n]))},this),t.join("&")},_wwwFormUrlEncodePiece:function(e){return null!==e&&void 0!==e&&e.toString?encodeURIComponent(e.toString().replace(/\r?\n/g,"\r\n")).replace(/%20/g,"+"):""},_updateStatus:function(){this._setStatus(this.xhr.status),this._setStatusText(void 0===this.xhr.statusText?"":this.xhr.statusText)}});var ws="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};to({is:"iron-ajax",hostAttributes:{hidden:!0},properties:{url:{type:String},params:{type:Object,value:function(){return{}}},method:{type:String,value:"GET"},headers:{type:Object,value:function(){return{}}},contentType:{type:String,value:null},body:{type:Object,value:null},sync:{type:Boolean,value:!1},handleAs:{type:String,value:"json"},withCredentials:{type:Boolean,value:!1},timeout:{type:Number,value:0},auto:{type:Boolean,value:!1},verbose:{type:Boolean,value:!1},lastRequest:{type:Object,notify:!0,readOnly:!0},lastProgress:{type:Object,notify:!0,readOnly:!0},loading:{type:Boolean,notify:!0,readOnly:!0},lastResponse:{type:Object,notify:!0,readOnly:!0},lastError:{type:Object,notify:!0,readOnly:!0},activeRequests:{type:Array,notify:!0,readOnly:!0,value:function(){return[]}},debounceDuration:{type:Number,value:0,notify:!0},jsonPrefix:{type:String,value:""},bubbles:{type:Boolean,value:!1},rejectWithRequest:{type:Boolean,value:!1},_boundHandleResponse:{type:Function,value:function(){return this._handleResponse.bind(this)}}},observers:["_requestOptionsChanged(url, method, params.*, headers, contentType, body, sync, handleAs, jsonPrefix, withCredentials, timeout, auto)"],created:function(){this._boundOnProgressChanged=this._onProgressChanged.bind(this)},get queryString(){var e,t,n=[];for(e in this.params)if(t=this.params[e],e=window.encodeURIComponent(e),Array.isArray(t))for(var i=0;i=0?"&":"?")+e:t},get requestHeaders(){var e,t={},n=this.contentType;if(null==n&&"string"==typeof this.body&&(n="application/x-www-form-urlencoded"),n&&(t["content-type"]=n),"object"===ws(this.headers))for(e in this.headers)t[e]=this.headers[e].toString();return t},_onProgressChanged:function(e){this._setLastProgress(e.detail.value)},toRequestOptions:function(){return{url:this.requestUrl||"",method:this.method,headers:this.requestHeaders,body:this.body,async:!this.sync,handleAs:this.handleAs,jsonPrefix:this.jsonPrefix,withCredentials:this.withCredentials,timeout:this.timeout,rejectWithRequest:this.rejectWithRequest}},generateRequest:function(){var e=document.createElement("iron-request"),t=this.toRequestOptions();return this.push("activeRequests",e),e.completes.then(this._boundHandleResponse).catch(this._handleError.bind(this,e)).then(this._discardRequest.bind(this,e)),this.fire("iron-ajax-presend",{request:e,options:t},{bubbles:this.bubbles,cancelable:!0}).defaultPrevented?(e.abort(),e.rejectCompletes(e),e):(this.lastRequest&&this.lastRequest.removeEventListener("iron-request-progress-changed",this._boundOnProgressChanged),e.addEventListener("iron-request-progress-changed",this._boundOnProgressChanged),e.send(t),this._setLastProgress(null),this._setLastRequest(e),this._setLoading(!0),this.fire("request",{request:e,options:t},{bubbles:this.bubbles,composed:!0}),this.fire("iron-ajax-request",{request:e,options:t},{bubbles:this.bubbles,composed:!0}),e)},_handleResponse:function(e){e===this.lastRequest&&(this._setLastResponse(e.response),this._setLastError(null),this._setLoading(!1)),this.fire("response",e,{bubbles:this.bubbles,composed:!0}),this.fire("iron-ajax-response",e,{bubbles:this.bubbles,composed:!0})},_handleError:function(e,t){this.verbose&&Vo._error(t),e===this.lastRequest&&(this._setLastError({request:e,error:t,status:e.xhr.status,statusText:e.xhr.statusText,response:e.xhr.response}),this._setLastResponse(null),this._setLoading(!1)),this.fire("iron-ajax-error",{request:e,error:t},{bubbles:this.bubbles,composed:!0}),this.fire("error",{request:e,error:t},{bubbles:this.bubbles,composed:!0})},_discardRequest:function(e){var t=this.activeRequests.indexOf(e);t>-1&&this.splice("activeRequests",t,1)},_requestOptionsChanged:function(){this.debounce("generate-request",function(){null!=this.url&&this.auto&&this.generateRequest()},this.debounceDuration)}});var ks=Object.prototype.hasOwnProperty;function xs(e){var t,n,i,o,r=Array.prototype.slice.call(arguments,1);for(t=0,n=r.length;t=0?"past":"future";t=Math.abs(t);for(var i=0;i<_s.length;i+=2){if(t<_s[i])return{tense:n,value:t=Math.floor(t),unit:_s[i+1]};t/=_s[i]}return{tense:n,value:t=Math.floor(t),unit:"week"}}(this.parsedDateTime),n=this.localize("ui.duration."+t.unit,"count",t.value),i=this.localize("ui.components.relative_time."+t.tense,"time",n);e.innerHTML=i}else e.innerHTML=this.localize("ui.components.relative_time.never")}}]),t}();customElements.define("ha-relative-time",Us);var Vs=function(){function e(e,t){for(var n=0;n\n iron-icon {\n margin-right: 16px;\n margin-top: 16px;\n float: left;\n color: var(--secondary-text-color);\n }\n iron-icon.update {\n color: var(--paper-orange-400);\n }\n iron-icon.running,\n iron-icon.installed {\n color: var(--paper-green-400);\n }\n iron-icon.hassupdate,\n iron-icon.snapshot {\n color: var(--paper-item-icon-color);\n }\n .title {\n color: var(--primary-text-color);\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n .addition {\n color: var(--secondary-text-color);\n overflow: hidden;\n position: relative;\n height: 2.4em;\n line-height: 1.2em;\n }\n ha-relative-time {\n display: block;\n }\n \n \n
\n
[[title]]
\n
\n \n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n
[[title]]
\n
\n \n \n
\n
\n'])}})),Ws=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),Vs(t,null,[{key:"template",get:function(){return l(Ks)}},{key:"properties",get:function(){return{hass:Object,title:String,description:String,datetime:String,icon:{type:String,value:"hass:help-circle"},iconTitle:String,iconClass:String}}}]),t}();customElements.define("hassio-card-content",Ws);var Ys=function(){function e(e,t){for(var n=0;n\n :host {\n display: block;\n }\n paper-card {\n display: block;\n margin-bottom: 16px;\n }\n .addon-header {\n @apply --paper-font-headline;\n }\n .light-color {\n color: var(--secondary-text-color);\n }\n .addon-version {\n float: right;\n font-size: 15px;\n vertical-align: middle;\n }\n .description {\n margin-bottom: 16px;\n }\n .logo img {\n max-height: 60px;\n margin: 16px 0;\n display: block;\n }\n .state div{\n width: 150px;\n display: inline-block;\n }\n paper-toggle-button {\n display: inline;\n }\n iron-icon.running {\n color: var(--paper-green-400);\n }\n iron-icon.stopped {\n color: var(--google-red-300);\n }\n ha-call-api-button {\n font-weight: 500;\n color: var(--primary-color);\n }\n .right {\n float: right;\n }\n ha-markdown img {\n max-width: 100%;\n }\n \n \n\n \n
\n
[[addon.name]]\n
\n \n \n
\n
\n
\n [[addon.description]].
\n Visit [[addon.name]] page for details.\n
\n \n \n
\n
\n \n \n
\n
\n \n'],{raw:{value:Object.freeze(['\n \n \n\n \n
\n
[[addon.name]]\n
\n \n \n
\n
\n
\n [[addon.description]].
\n Visit [[addon.name]] page for details.\n
\n \n \n
\n
\n \n \n
\n
\n \n'])}})),Xs=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),Ys(t,[{key:"computeIsRunning",value:function(e){return e&&"started"===e.state}},{key:"computeUpdateAvailable",value:function(e){return e&&!e.detached&&e.version&&e.version!==e.last_version}},{key:"pathWebui",value:function(e){return e&&e.replace("[HOST]",document.location.hostname)}},{key:"computeShowWebUI",value:function(e,t){return e&&t}},{key:"computeStartOnBoot",value:function(e){return"auto"===e}},{key:"startOnBootToggled",value:function(){var e={boot:"auto"===this.addon.boot?"manual":"auto"};this.hass.callApi("POST","hassio/addons/"+this.addonSlug+"/options",e)}},{key:"autoUpdateToggled",value:function(){var e={auto_update:!this.addon.auto_update};this.hass.callApi("POST","hassio/addons/"+this.addonSlug+"/options",e)}},{key:"openChangelog",value:function(){var e=this;this.hass.callApi("get","hassio/addons/"+this.addonSlug+"/changelog").then(function(e){return e},function(){return"Error getting changelog"}).then(function(t){e.fire("hassio-markdown-dialog",{title:"Changelog",content:t})})}},{key:"_unistallClicked",value:function(){var e=this;if(confirm("Are you sure you want to uninstall this add-on?")){var t="hassio/addons/"+this.addonSlug+"/uninstall",n={path:t};this.hass.callApi("post",t).then(function(e){n.success=!0,n.response=e},function(e){n.success=!1,n.response=e}).then(function(){e.fire("hass-api-called",n)})}}}],[{key:"template",get:function(){return l(Zs)}},{key:"properties",get:function(){return{hass:Object,addon:Object,addonSlug:String,isRunning:{type:Boolean,computed:"computeIsRunning(addon)"}}}}]),t}();customElements.define("hassio-addon-info",Xs);var Gs=function(){function e(e,t){for(var n=0;n\n :host,\n paper-card {\n display: block;\n }\n \n \n
\n
[[log]]
\n
\n
\n Refresh\n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n
[[log]]
\n
\n
\n Refresh\n
\n
\n'])}})),Qs=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),Gs(t,[{key:"addonSlugChanged",value:function(e){var t=this;this.hass?this.refresh():setTimeout(function(){t.addonChanged(e)},0)}},{key:"refresh",value:function(){var e=this;this.hass.callApi("get","hassio/addons/"+this.addonSlug+"/logs").then(function(t){e.log=t})}}],[{key:"template",get:function(){return l(Js)}},{key:"properties",get:function(){return{hass:Object,addonSlug:{type:String,observer:"addonSlugChanged"},log:String}}}]),t}();customElements.define("hassio-addon-logs",Qs);var el=function(){function e(e,t){for(var n=0;n\n :host {\n display: block;\n }\n paper-card {\n display: block;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n .card-actions {\n @apply --layout;\n @apply --layout-justified;\n }\n \n \n
\n \n\n \n \n \n \n \n \n
ContainerHost
\n
\n
\n Reset to defaults\n Save\n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n \n\n \n \n \n \n \n \n
ContainerHost
\n
\n
\n Reset to defaults\n Save\n
\n
\n'])}})),nl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),el(t,[{key:"addonChanged",value:function(e){if(e){var t=e.network||{},n=Object.keys(t).map(function(e){return{container:e,host:t[e]}});this.config=n.sort(function(e,t){return e.host-t.host})}}},{key:"saveTapped",value:function(){var e=this;this.error=null;var t={};this.config.forEach(function(e){t[e.container]=parseInt(e.host)});var n="hassio/addons/"+this.addonSlug+"/options";this.hass.callApi("post",n,{network:t}).then(function(){e.fire("hass-api-called",{success:!0,path:n})},function(t){e.error=t.body.message})}}],[{key:"template",get:function(){return l(tl)}},{key:"properties",get:function(){return{hass:Object,addonSlug:String,config:Object,addon:{type:Object,observer:"addonChanged"},error:String,resetData:{type:Object,value:{network:null}}}}}]),t}();customElements.define("hassio-addon-network",nl);var il=function(){function e(e,t){for(var n=0;n\n :host {\n color: var(--primary-text-color);\n --paper-card-header-color: var(--primary-text-color);\n }\n .content {\n padding: 24px 0 32px;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config {\n margin-bottom: 24px;\n width: 600px;\n }\n hassio-addon-logs {\n min-width: 600px;\n }\n @media only screen and (max-width: 600px) {\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config,\n hassio-addon-logs {\n max-width: 100%;\n }\n }\n \n \n \n \n \n \n \n
Hass.io: add-on details
\n
\n
\n
\n \n\n \n
\n
\n\n \n'],{raw:{value:Object.freeze(['\n \n \n \n \n \n \n \n
Hass.io: add-on details
\n
\n
\n
\n \n\n \n
\n
\n\n \n'])}})),rl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),il(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)}),this.addEventListener("hassio-markdown-dialog",function(t){return e.openMarkdown(t)})}},{key:"apiCalled",value:function(e){var t=e.detail.path;t&&("uninstall"===t.substr(t.lastIndexOf("/")+1)?this.backTapped():this.routeDataChanged(this.routeData))}},{key:"routeDataChanged",value:function(e){var t=this;this.routeMatches&&e&&e.slug&&this.hass.callApi("get","hassio/addons/"+e.slug+"/info").then(function(e){t.addon=e.data},function(){t.addon=null})}},{key:"backTapped",value:function(){history.back()}},{key:"openMarkdown",value:function(e){this.setProperties({markdownTitle:e.detail.title,markdownContent:e.detail.content}),this.shadowRoot.querySelector("hassio-markdown-dialog").openDialog()}}],[{key:"template",get:function(){return l(ol)}},{key:"properties",get:function(){return{hass:Object,showMenu:Boolean,narrow:Boolean,route:Object,routeData:{type:Object,observer:"routeDataChanged"},routeMatches:Boolean,addon:Object,markdownTitle:String,markdownContent:{type:String,value:""}}}}]),t}();customElements.define("hassio-addon-view",rl);var al=function(){function e(e,t){for(var n=0;n\n :host {\n @apply --layout-inline;\n @apply --layout-center;\n @apply --layout-center-justified;\n @apply --layout-flex-auto;\n\n position: relative;\n padding: 0 12px;\n overflow: hidden;\n cursor: pointer;\n vertical-align: middle;\n\n @apply --paper-font-common-base;\n @apply --paper-tab;\n }\n\n :host(:focus) {\n outline: none;\n }\n\n :host([link]) {\n padding: 0;\n }\n\n .tab-content {\n height: 100%;\n transform: translateZ(0);\n -webkit-transform: translateZ(0);\n transition: opacity 0.1s cubic-bezier(0.4, 0.0, 1, 1);\n @apply --layout-horizontal;\n @apply --layout-center-center;\n @apply --layout-flex-auto;\n @apply --paper-tab-content;\n }\n\n :host(:not(.iron-selected)) > .tab-content {\n opacity: 0.8;\n\n @apply --paper-tab-content-unselected;\n }\n\n :host(:focus) .tab-content {\n opacity: 1;\n font-weight: 700;\n }\n\n paper-ripple {\n color: var(--paper-tab-ink, var(--paper-yellow-a100));\n }\n\n .tab-content > ::slotted(a) {\n @apply --layout-flex-auto;\n\n height: 100%;\n }\n \n\n
\n \n
\n'],{raw:{value:Object.freeze(['\n \n\n
\n \n
\n'])}}));to({_template:l(ll),is:"paper-tab",behaviors:[yr,br,xr],properties:{link:{type:Boolean,value:!1,reflectToAttribute:!0}},hostAttributes:{role:"tab"},listeners:{down:"_updateNoink",tap:"_onTap"},attached:function(){this._updateNoink()},get _parentNoink(){var e=Vi(this).parentNode;return!!e&&!!e.noink},_updateNoink:function(){this.noink=!!this.noink||!!this._parentNoink},_onTap:function(e){if(this.link){var t=this.queryEffectiveChildren("a");if(!t)return;if(e.target===t)return;t.click()}}});var cl={hostAttributes:{role:"menubar"},keyBindings:{left:"_onLeftKey",right:"_onRightKey"},_onUpKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},get _isRTL(){return"rtl"===window.getComputedStyle(this).direction},_onLeftKey:function(e){this._isRTL?this._focusNext():this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onRightKey:function(e){this._isRTL?this._focusPrevious():this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down left right esc")||this._focusWithKeyboardEvent(e)}},pl=[ns,cl],ul=document.createElement("template");ul.setAttribute("style","display: none;"),ul.innerHTML='\n\n\n\n\n',document.head.appendChild(ul.content);var dl=Object.freeze(Object.defineProperties(['\n \n\n \n\n
\n
\n
\n \n
\n
\n\n \n'],{raw:{value:Object.freeze(['\n \n\n \n\n
\n
\n
\n \n
\n
\n\n \n'])}}));to({_template:l(dl),is:"paper-tabs",behaviors:[Nr,pl],properties:{noink:{type:Boolean,value:!1,observer:"_noinkChanged"},noBar:{type:Boolean,value:!1},noSlide:{type:Boolean,value:!1},scrollable:{type:Boolean,value:!1},fitContainer:{type:Boolean,value:!1},disableDrag:{type:Boolean,value:!1},hideScrollButtons:{type:Boolean,value:!1},alignBottom:{type:Boolean,value:!1},selectable:{type:String,value:"paper-tab"},autoselect:{type:Boolean,value:!1},autoselectDelay:{type:Number,value:0},_step:{type:Number,value:10},_holdDelay:{type:Number,value:1},_leftHidden:{type:Boolean,value:!1},_rightHidden:{type:Boolean,value:!1},_previousTab:{type:Object}},hostAttributes:{role:"tablist"},listeners:{"iron-resize":"_onTabSizingChanged","iron-items-changed":"_onTabSizingChanged","iron-select":"_onIronSelect","iron-deselect":"_onIronDeselect"},keyBindings:{"left:keyup right:keyup":"_onArrowKeyup"},created:function(){this._holdJob=null,this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,this._bindDelayedActivationHandler=this._delayedActivationHandler.bind(this),this.addEventListener("blur",this._onBlurCapture.bind(this),!0)},ready:function(){this.setScrollDirection("y",this.$.tabsContainer)},detached:function(){this._cancelPendingActivation()},_noinkChanged:function(e){Vi(this).querySelectorAll("paper-tab").forEach(e?this._setNoinkAttribute:this._removeNoinkAttribute)},_setNoinkAttribute:function(e){e.setAttribute("noink","")},_removeNoinkAttribute:function(e){e.removeAttribute("noink")},_computeScrollButtonClass:function(e,t,n){return!t||n?"hidden":e?"not-visible":""},_computeTabsContentClass:function(e,t){return e?"scrollable"+(t?" fit-container":""):" fit-container"},_computeSelectionBarClass:function(e,t){return e?"hidden":t?"align-bottom":""},_onTabSizingChanged:function(){this.debounce("_onTabSizingChanged",function(){this._scroll(),this._tabChanged(this.selectedItem)},10)},_onIronSelect:function(e){this._tabChanged(e.detail.item,this._previousTab),this._previousTab=e.detail.item,this.cancelDebouncer("tab-changed")},_onIronDeselect:function(e){this.debounce("tab-changed",function(){this._tabChanged(null,this._previousTab),this._previousTab=null},1)},_activateHandler:function(){this._cancelPendingActivation(),ts._activateHandler.apply(this,arguments)},_scheduleActivation:function(e,t){this._pendingActivationItem=e,this._pendingActivationTimeout=this.async(this._bindDelayedActivationHandler,t)},_delayedActivationHandler:function(){var e=this._pendingActivationItem;this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,e.fire(this.activateEvent,null,{bubbles:!0,cancelable:!0})},_cancelPendingActivation:function(){void 0!==this._pendingActivationTimeout&&(this.cancelAsync(this._pendingActivationTimeout),this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0)},_onArrowKeyup:function(e){this.autoselect&&this._scheduleActivation(this.focusedItem,this.autoselectDelay)},_onBlurCapture:function(e){e.target===this._pendingActivationItem&&this._cancelPendingActivation()},get _tabContainerScrollSize(){return Math.max(0,this.$.tabsContainer.scrollWidth-this.$.tabsContainer.offsetWidth)},_scroll:function(e,t){if(this.scrollable){var n=t&&-t.ddx||0;this._affectScroll(n)}},_down:function(e){this.async(function(){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null)},1)},_affectScroll:function(e){this.$.tabsContainer.scrollLeft+=e;var t=this.$.tabsContainer.scrollLeft;this._leftHidden=0===t,this._rightHidden=t===this._tabContainerScrollSize},_onLeftScrollButtonDown:function(){this._scrollToLeft(),this._holdJob=setInterval(this._scrollToLeft.bind(this),this._holdDelay)},_onRightScrollButtonDown:function(){this._scrollToRight(),this._holdJob=setInterval(this._scrollToRight.bind(this),this._holdDelay)},_onScrollButtonUp:function(){clearInterval(this._holdJob),this._holdJob=null},_scrollToLeft:function(){this._affectScroll(-this._step)},_scrollToRight:function(){this._affectScroll(this._step)},_tabChanged:function(e,t){if(!e)return this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),void this._positionBar(0,0);var n=this.$.tabsContent.getBoundingClientRect(),i=n.width,o=e.getBoundingClientRect(),r=o.left-n.left;if(this._pos={width:this._calcPercent(o.width,i),left:this._calcPercent(r,i)},this.noSlide||null==t)return this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),void this._positionBar(this._pos.width,this._pos.left);var a=t.getBoundingClientRect(),s=this.items.indexOf(t),l=this.items.indexOf(e);this.$.selectionBar.classList.add("expand");var c=s0&&(this.$.tabsContainer.scrollLeft+=n)},_calcPercent:function(e,t){return 100*e/t},_positionBar:function(e,t){e=e||0,t=t||0,this._width=e,this._left=t,this.transform("translateX("+t+"%) scaleX("+e/100+")",this.$.selectionBar)},_onBarTransitionEnd:function(e){var t=this.$.selectionBar.classList;t.contains("expand")?(t.remove("expand"),t.add("contract"),this._positionBar(this._pos.width,this._pos.left)):t.contains("contract")&&t.remove("contract")}}),n(1);var hl=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1]?history.replaceState(null,null,e):history.pushState(null,null,e),this.fire("location-changed")}}]),n}()}),ml=function(){function e(e,t){for(var n=0;n\n paper-card {\n cursor: pointer;\n }\n a.repo {\n display: block;\n color: var(--primary-text-color);\n }\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}})),vl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,fl(mt)),ml(t,[{key:"sortAddons",value:function(e,t){return e.name\n .add {\n padding: 12px 16px;\n }\n iron-icon {\n color: var(--secondary-text-color);\n margin-right: 16px;\n display: inline-block;\n }\n paper-input {\n width: calc(100% - 49px);\n display: inline-block;\n }\n \n
\n
\n Repositories\n
\n Configure which add-on repositories to fetch data from:\n
\n
\n \n \n
\n \n \n
\n
\n Add\n
\n
\n
\n'],{raw:{value:Object.freeze(['\n \n
\n
\n Repositories\n
\n Configure which add-on repositories to fetch data from:\n
\n
\n \n \n
\n \n \n
\n
\n Add\n
\n
\n
\n'])}})),_l=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),bl(t,[{key:"reposChanged",value:function(e){this.repoList=e.filter(function(e){return"core"!==e.slug&&"local"!==e.slug}),this.repoUrl=""}},{key:"sortRepos",value:function(e,t){return e.name\n hassio-addon-repository {\n margin-top: 24px;\n }\n \n \n\n \n'],{raw:{value:Object.freeze(['\n \n \n\n \n'])}})),xl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),wl(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)}),this.loadData()}},{key:"apiCalled",value:function(e){e.detail.success&&this.loadData()}},{key:"sortRepos",value:function(e,t){return"local"===e.slug?-1:"local"===t.slug?1:"core"===e.slug?-1:"core"===t.slug?1:e.name\n paper-card {\n cursor: pointer;\n }\n \n
\n
Add-ons
\n \n \n
\n'],{raw:{value:Object.freeze(['\n \n
\n
Add-ons
\n \n \n
\n'])}})),Sl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,fl(mt)),Ol(t,[{key:"sortAddons",value:function(e,t){return e.name\n paper-card {\n display: block;\n height: 100%;\n margin-bottom: 32px;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}})),Al=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),El(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var t=e.detail.response;"object"===Pl(t.body)?this.errors=t.body.message||"Unknown error":this.errors=t.body}}},{key:"computeUpdateAvailable",value:function(e){return e.version!==e.last_version}}],[{key:"template",get:function(){return l(Tl)}},{key:"properties",get:function(){return{hass:Object,hassInfo:Object,error:String}}}]),t}();customElements.define("hassio-hass-update",Al);var jl=function(){function e(e,t){for(var n=0;n\n .content {\n margin: 0 auto;\n }\n \n
\n \n \n
\n'],{raw:{value:Object.freeze(['\n \n
\n \n \n
\n'])}})),Rl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),jl(t,null,[{key:"template",get:function(){return l(Il)}},{key:"properties",get:function(){return{hass:Object,supervisorInfo:Object,hassInfo:Object}}}]),t}();customElements.define("hassio-dashboard",Rl);var Ll=document.createElement("template");Ll.setAttribute("style","display: none;"),Ll.innerHTML='\n \n\n \n',document.head.appendChild(Ll.content),to({is:"paper-checkbox",behaviors:[bs],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){xi(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim()){var e=this.getComputedStyleValue("--calculated-paper-checkbox-size").trim(),t="px",n=e.match(/[A-Za-z]+$/);null!==n&&(t=n[0]);var i=parseFloat(e),o=8/3*i;"px"===t&&(o=Math.floor(o))%2!=i%2&&o++,this.updateStyles({"--paper-checkbox-ink-size":o+t})}})},_computeCheckboxClass:function(e,t){var n="";return e&&(n+="checked "),t&&(n+="invalid"),n},_computeCheckmarkClass:function(e){return e?"":"hidden"},_createRipple:function(){return this._rippleContainer=this.$.checkboxContainer,Or._createRipple.call(this)}});var zl=function(){function e(e,t){for(var n=0;n\n paper-dialog {\n min-width: 350px;\n font-size: 14px;\n border-radius: 2px;\n }\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n paper-dialog-scrollable {\n margin: 0;\n }\n paper-checkbox {\n display: block;\n margin: 4px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n paper-dialog {\n max-height: 100%;\n height: 100%;\n }\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n }\n .details {\n color: var(--secondary-text-color);\n }\n .download {\n color: var(--primary-color);\n }\n .warning,\n .error {\n color: var(--google-red-500);\n }\n \n \n \n \n
[[_computeName(snapshot)]]
\n
\n
\n [[_computeType(snapshot.type)]] ([[_computeSize(snapshot.size)]])
\n [[_formatDatetime(snapshot.date)]]\n
\n
Home Assistant:
\n \n Home Assistant [[snapshot.homeassistant]]\n \n \n \n \n \n
\n \n \n \n \n Restore selected\n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n \n \n
[[_computeName(snapshot)]]
\n
\n
\n [[_computeType(snapshot.type)]] ([[_computeSize(snapshot.size)]])
\n [[_formatDatetime(snapshot.date)]]\n
\n
Home Assistant:
\n \n Home Assistant [[snapshot.homeassistant]]\n \n \n \n \n \n
\n \n \n \n \n Restore selected\n \n
\n
\n'])}})),Dl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),zl(t,[{key:"_snapshotSlugChanged",value:function(e){var t=this;e&&"update"!==e&&this.hass.callApi("get","hassio/snapshots/"+e+"/info").then(function(e){e.data.folders=t._computeFolders(e.data.folders),e.data.addons=t._computeAddons(e.data.addons),t.snapshot=e.data,t.$.dialog.open()},function(){t.snapshot=null})}},{key:"_computeFolders",value:function(e){var t=[];return e.includes("homeassistant")&&t.push({slug:"homeassistant",name:"Home Assistant configuration",checked:!0}),e.includes("ssl")&&t.push({slug:"ssl",name:"SSL",checked:!0}),e.includes("share")&&t.push({slug:"share",name:"Share",checked:!0}),e.includes("addons/local")&&t.push({slug:"addons/local",name:"Local add-ons",checked:!0}),t}},{key:"_computeAddons",value:function(e){return e.map(function(e){return{slug:e.slug,name:e.name,version:e.version,checked:!0}})}},{key:"_isFullSnapshot",value:function(e){return"full"===e}},{key:"_partialRestoreClicked",value:function(){var e=this;if(confirm("Are you sure you want to restore this snapshot?")){var t=this.snapshot.addons.filter(function(e){return e.checked}).map(function(e){return e.slug}),n=this.snapshot.folders.filter(function(e){return e.checked}).map(function(e){return e.slug}),i={homeassistant:this.restoreHass,addons:t,folders:n};this.snapshot.protected&&(i.password=this.snapshotPassword),this.hass.callApi("post","hassio/snapshots/"+this.snapshotSlug+"/restore/partial",i).then(function(){alert("Snapshot restored!"),e.$.dialog.close()},function(t){e.error=t.body.message})}}},{key:"_fullRestoreClicked",value:function(){var e=this;if(confirm("Are you sure you want to restore this snapshot?")){var t=this.snapshot.protected?{password:this.snapshotPassword}:null;this.hass.callApi("post","hassio/snapshots/"+this.snapshotSlug+"/restore/full",t).then(function(){alert("Snapshot restored!"),e.$.dialog.close()},function(t){e.error=t.body.message})}}},{key:"_deleteClicked",value:function(){var e=this;confirm("Are you sure you want to delete this snapshot?")&&this.hass.callApi("post","hassio/snapshots/"+this.snapshotSlug+"/remove").then(function(){e.$.dialog.close(),e.snapshotDeleted=!0},function(t){e.error=t.body.message})}},{key:"_computeDownloadUrl",value:function(e){return"/api/hassio/snapshots/"+e+"/download?api_password="+encodeURIComponent(this.hass.connection.options.authToken)}},{key:"_computeDownloadName",value:function(e){return"Hass_io_"+this._computeName(e).replace(/[^a-z0-9]+/gi,"_")+".tar"}},{key:"_computeName",value:function(e){return e.name||e.slug}},{key:"_computeType",value:function(e){return"full"===e?"Full snapshot":"Partial snapshot"}},{key:"_computeSize",value:function(e){return Math.ceil(10*e)/10+" MB"}},{key:"_sortAddons",value:function(e,t){return e.name\n\n
\n
\n
\n
\n\n
\n \n\n \n',document.head.appendChild(Fl.content),to({is:"paper-radio-button",behaviors:[bs],hostAttributes:{role:"radio","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},ready:function(){this._rippleContainer=this.$.radioContainer},attached:function(){xi(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-radio-button-ink-size").trim()){var e=parseFloat(this.getComputedStyleValue("--calculated-paper-radio-button-size").trim()),t=Math.floor(3*e);t%2!=e%2&&t++,this.updateStyles({"--paper-radio-button-ink-size":t+"px"})}})}});var Ml=Object.freeze(Object.defineProperties(["\n \n\n \n"],{raw:{value:Object.freeze(["\n \n\n \n"])}}));to({_template:l(Ml),is:"paper-radio-group",behaviors:[pl],hostAttributes:{role:"radiogroup"},properties:{attrForSelected:{type:String,value:"name"},selectedAttribute:{type:String,value:"checked"},selectable:{type:String,value:"paper-radio-button"},allowEmptySelection:{type:Boolean,value:!1}},select:function(e){var t=this._valueToItem(e);if(!t||!t.hasAttribute("disabled")){if(this.selected){var n=this._valueToItem(this.selected);if(this.selected==e){if(!this.allowEmptySelection)return void(n&&(n.checked=!0));e=""}n&&(n.checked=!1)}Qa.select.apply(this,[e]),this.fire("paper-radio-group-changed")}},_activateFocusedItem:function(){this._itemActivate(this._valueForItem(this.focusedItem),this.focusedItem)},_onUpKey:function(e){this._focusPrevious(),e.preventDefault(),this._activateFocusedItem()},_onDownKey:function(e){this._focusNext(),e.preventDefault(),this._activateFocusedItem()},_onLeftKey:function(e){cl._onLeftKey.apply(this,arguments),this._activateFocusedItem()},_onRightKey:function(e){cl._onRightKey.apply(this,arguments),this._activateFocusedItem()}});var Bl=function(){function e(e,t){for(var n=0;n\n paper-radio-group {\n display: block;\n }\n paper-radio-button {\n padding: 0 0 2px 2px;\n }\n paper-radio-button,\n paper-checkbox,\n paper-input[type="password"] {\n display: block;\n margin: 4px 0 4px 48px;\n }\n .pointer {\n cursor: pointer;\n }\n \n
\n
\n
\n Create snapshot\n
\n Snapshots allow you to easily backup and\n restore all data of your Hass.io instance.\n
\n
\n \n
\n \n Type:\n \n \n Full snapshot\n \n \n Partial snapshot\n \n \n \n Security:\n Password protection\n \n \n
\n
\n Create\n
\n
\n
\n\n
\n
Available snapshots
\n \n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n
\n
\n
\n Create snapshot\n
\n Snapshots allow you to easily backup and\n restore all data of your Hass.io instance.\n
\n
\n \n
\n \n Type:\n \n \n Full snapshot\n \n \n Partial snapshot\n \n \n \n Security:\n Password protection\n \n \n
\n
\n Create\n
\n
\n
\n\n
\n
Available snapshots
\n \n \n
\n
\n'])}})),ql=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),Bl(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e._apiCalled(t)}),this._updateSnapshots()}},{key:"_apiCalled",value:function(e){e.detail.success&&this._updateSnapshots()}},{key:"_updateSnapshots",value:function(){var e=this;this.hass.callApi("get","hassio/snapshots").then(function(t){e.snapshots=t.data.snapshots},function(t){e.error=t.message})}},{key:"_createSnapshot",value:function(){var e=this;if(this.error="",!this.snapshotHasPassword||this.snapshotPassword.length){this.creatingSnapshot=!0;var t=this.snapshotName;t.length||(t=(new Date).toLocaleDateString(navigator.language,{weekday:"long",year:"numeric",month:"short",day:"numeric"}));var n=void 0,i=void 0;if("full"===this.snapshotType)n={name:t},i="hassio/snapshots/new/full";else{var o=this.addonList.filter(function(e){return e.checked}).map(function(e){return e.slug});n={name:t,folders:this.folderList.filter(function(e){return e.checked}).map(function(e){return e.slug}),addons:o},i="hassio/snapshots/new/partial"}this.snapshotHasPassword&&(n.password=this.snapshotPassword),this.hass.callApi("post",i,n).then(function(){e.creatingSnapshot=!1,e.fire("hass-api-called",{success:!0})},function(t){e.creatingSnapshot=!1,e.error=t.message})}else this.error="Please enter a password."}},{key:"_installedAddonsChanged",value:function(e){this.addonList=e.map(function(e){return{slug:e.slug,name:e.name,checked:!0}})}},{key:"_sortAddons",value:function(e,t){return e.name\n paper-card {\n display: inline-block;\n width: 400px;\n margin-left: 8px;\n }\n .card-content {\n height: 200px;\n }\n @media screen and (max-width: 830px) {\n paper-card {\n margin-top: 8px;\n margin-left: 0;\n width: 100%;\n }\n .card-content {\n height: 100%;\n }\n }\n .info {\n width: 100%;\n }\n .info td:nth-child(2) {\n text-align: right;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n paper-button.info {\n max-width: 50%;\n }\n \n \n
\n

Host system

\n \n \n \n \n \n \n \n \n \n \n
Hostname[[data.hostname]]
System[[data.operating_system]]
\n Show hardware\n \n
\n
\n \n \n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n

Host system

\n \n \n \n \n \n \n \n \n \n \n
Hostname[[data.hostname]]
System[[data.operating_system]]
\n Show hardware\n \n
\n
\n \n \n \n
\n
\n'])}})),Kl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),Ul(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var t=e.detail.response;"object"===$l(t.body)?this.errors=t.body.message||"Unknown error":this.errors=t.body}}},{key:"computeUpdateAvailable",value:function(e){return e.version!==e.last_version}},{key:"computeRebootAvailable",value:function(e){return e.features&&e.features.includes("reboot")}},{key:"computeShutdownAvailable",value:function(e){return e.features&&e.features.includes("shutdown")}},{key:"_showHardware",value:function(){var e=this;this.hass.callApi("get","hassio/hardware/info").then(function(t){return e._objectToMarkdown(t.data)},function(){return"Error getting hardware info"}).then(function(t){e.fire("hassio-markdown-dialog",{title:"Hardware",content:t})})}},{key:"_objectToMarkdown",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i="";return Object.keys(e).forEach(function(o){"object"!==$l(e[o])?i+=n+"- "+o+": "+e[o]+"\n":(i+=n+"- "+o+":\n",Array.isArray(e[o])?e[o].length&&(i+=n+" - "+e[o].join("\n"+n+" - ")+"\n"):i+=t._objectToMarkdown(e[o]," "+n))}),i}}],[{key:"template",get:function(){return l(Vl)}},{key:"properties",get:function(){return{hass:Object,data:Object,errors:String}}}]),t}();customElements.define("hassio-host-info",Kl);var Wl="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},Yl=function(){function e(e,t){for(var n=0;n\n paper-card {\n display: inline-block;\n width: 400px;\n }\n .card-content {\n height: 200px;\n }\n @media screen and (max-width: 830px) {\n paper-card {\n width: 100%;\n }\n .card-content {\n height: 100%;\n }\n }\n .info {\n width: 100%;\n }\n .info td:nth-child(2) {\n text-align: right;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n \n \n
\n

Hass.io supervisor

\n \n \n \n \n \n \n \n \n \n \n
Version\n [[data.version]]\n
Latest version[[data.last_version]]
\n \n
\n
\n Reload\n \n \n \n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n

Hass.io supervisor

\n \n \n \n \n \n \n \n \n \n \n
Version\n [[data.version]]\n
Latest version[[data.last_version]]
\n \n
\n
\n Reload\n \n \n \n
\n
\n'])}})),Xl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),Yl(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var t=e.detail.response;"object"===Wl(t.body)?this.errors=t.body.message||"Unknown error":this.errors=t.body}}},{key:"computeUpdateAvailable",value:function(e){return e.version!==e.last_version}},{key:"_equals",value:function(e,t){return e===t}},{key:"_joinBeta",value:function(){var e=this;if(confirm("WARNING:\nBeta releases are for testers and early adopters and can contain unstable code changes. Make sure you have backups of your data before you activate this feature.\n\nThis inludes beta releases for:\n- Home Assistant (Release Candidates)\n- Hass.io supervisor\n- Host system")){var t="hassio/supervisor/options",n={channel:"beta"},i={method:"post",path:t,data:n};this.hass.callApi("post",t,n).then(function(e){i.success=!0,i.response=e},function(e){i.success=!1,i.response=e}).then(function(){e.fire("hass-api-called",i)})}}}],[{key:"template",get:function(){return l(Zl)}},{key:"properties",get:function(){return{hass:Object,data:Object,errors:String,leaveBeta:{type:Object,value:{channel:"stable"}}}}}]),t}();customElements.define("hassio-supervisor-info",Xl);var Gl=function(){function e(e,t){for(var n=0;n\n paper-card {\n display: block;\n }\n \n \n
\n
[[log]]
\n
\n
\n Refresh\n
\n
\n'],{raw:{value:Object.freeze(['\n \n \n
\n
[[log]]
\n
\n
\n Refresh\n
\n
\n'])}})),Ql=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),Gl(t,[{key:"ready",value:function(){(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.loadData()}},{key:"loadData",value:function(){var e=this;this.hass.callApi("get","hassio/supervisor/logs").then(function(t){e.log=t},function(){e.log="Error fetching logs"})}},{key:"refreshTapped",value:function(){this.loadData()}}],[{key:"template",get:function(){return l(Jl)}},{key:"properties",get:function(){return{hass:Object,log:String}}}]),t}();customElements.define("hassio-supervisor-log",Ql);var ec=function(){function e(e,t){for(var n=0;n\n .content {\n margin: 4px;\n }\n .title {\n margin-top: 24px;\n color: var(--primary-text-color);\n font-size: 2em;\n padding-left: 8px;\n margin-bottom: 8px;\n }\n \n
\n
Information
\n \n \n
System log
\n \n
\n'],{raw:{value:Object.freeze(['\n \n
\n
Information
\n \n \n
System log
\n \n
\n'])}})),nc=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),ec(t,null,[{key:"template",get:function(){return l(tc)}},{key:"properties",get:function(){return{hass:Object,supervisorInfo:Object,hostInfo:Object}}}]),t}();customElements.define("hassio-system",nc);var ic=function(){function e(e,t){for(var n=0;n\n :host {\n color: var(--primary-text-color);\n --paper-card-header-color: var(--primary-text-color);\n }\n paper-tabs {\n margin-left: 12px;\n --paper-tabs-selection-bar-color: #FFF;\n text-transform: uppercase;\n }\n \n \n \n \n \n
Hass.io
\n \n
\n \n Dashboard\n Snapshots\n Add-on store\n System\n \n
\n \n \n \n \n
\n\n \n\n \n'],{raw:{value:Object.freeze(['\n \n \n \n \n \n
Hass.io
\n \n
\n \n Dashboard\n Snapshots\n Add-on store\n System\n \n
\n \n \n \n \n
\n\n \n\n \n'])}})),rc=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,fl(mt)),ic(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hassio-markdown-dialog",function(t){return e.openMarkdown(t)})}},{key:"handlePageSelected",value:function(e){var t=e.detail.item.getAttribute("page-name");t!==this.page&&this.navigate("/hassio/"+t)}},{key:"equals",value:function(e,t){return e===t}},{key:"showRefreshButton",value:function(e){return"store"===e||"snapshots"===e}},{key:"refreshClicked",value:function(){"snapshots"===this.page?this.shadowRoot.querySelector("hassio-snapshots").refreshData():this.shadowRoot.querySelector("hassio-addon-store").refreshData()}},{key:"openMarkdown",value:function(e){this.setProperties({markdownTitle:e.detail.title,markdownContent:e.detail.content}),this.shadowRoot.querySelector("hassio-markdown-dialog").openDialog()}}],[{key:"template",get:function(){return l(oc)}},{key:"properties",get:function(){return{hass:Object,showMenu:Boolean,narrow:Boolean,page:String,supervisorInfo:Object,hostInfo:Object,hassInfo:Object,snapshotSlug:String,snapshotDeleted:Boolean,markdownTitle:String,markdownContent:{type:String,value:""}}}}]),t}();customElements.define("hassio-pages-with-tabs",rc);var ac=function(){function e(e,t){for(var n=0;n\n \n\n \n\n \n'],{raw:{value:Object.freeze(['\n \n \n\n \n\n \n'])}})),cc=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,fl(mt)),ac(t,[{key:"ready",value:function(){var e=this;sc(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e._themes||(e._themes={});var o=t.default_theme;("default"===n||n&&t.themes[n])&&(o=n);var r=Object.assign({},e._themes);if("default"!==o){var a=t.themes[o];Object.keys(a).forEach(function(t){var n="--"+t;e._themes[n]="",r[n]=a[t]})}if(e.updateStyles?e.updateStyles(r):window.ShadyCSS&&window.ShadyCSS.styleSubtree(e,r),i){var s=document.querySelector("meta[name=theme-color]");if(s){s.hasAttribute("default-content")||s.setAttribute("default-content",s.getAttribute("content"));var l=r["--primary-color"]||s.getAttribute("default-content");s.setAttribute("content",l)}}}(this,this.hass.themes,this.hass.selectedTheme,!0),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)})}},{key:"connectedCallback",value:function(){sc(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"connectedCallback",this).call(this),this.routeChanged(this.route)}},{key:"apiCalled",value:function(e){var t=this;if(e.detail.success){var n=1;!function e(){t.$.data.refresh().catch(function(){n+=1,setTimeout(e,1e3*Math.min(n,5))})}()}}},{key:"computeIsLoaded",value:function(e,t,n){return null!==e&&null!==t&&null!==n}},{key:"routeChanged",value:function(e){""===e.path&&"/hassio"===e.prefix&&this.navigate("/hassio/dashboard",!0)}},{key:"equalsAddon",value:function(e){return e&&"addon"===e}}],[{key:"template",get:function(){return l(lc)}},{key:"properties",get:function(){return{hass:Object,narrow:Boolean,showMenu:Boolean,route:{type:Object,value:{prefix:"/hassio",path:"/dashboard",__queryParams:{}},observer:"routeChanged"},routeData:Object,supervisorInfo:Object,hostInfo:Object,hassInfo:Object,loaded:{type:Boolean,computed:"computeIsLoaded(supervisorInfo, hostInfo, hassInfo)"}}}}]),t}();customElements.define("hassio-main",cc);var pc=function(){function e(e,t){for(var n=0;n\n \n \n'],{raw:{value:Object.freeze(['\n \n'])}})),yc=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),fc(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),window.setProperties=this.setProperties.bind(this),this.addEventListener("location-changed",function(){return e._locationChanged()}),this.addEventListener("hass-open-menu",function(){return e._menuEvent(!0)}),this.addEventListener("hass-close-menu",function(){return e._menuEvent(!1)})}},{key:"_menuEvent",value:function(e){this.hassioPanel.fire(e?"hass-open-menu":"hass-close-menu")}},{key:"_locationChanged",value:function(){this.hassioPanel.navigate(window.location.pathname)}}],[{key:"template",get:function(){return l(mc)}},{key:"properties",get:function(){return{hass:Object,narrow:Boolean,showMenu:Boolean,route:Object,hassioPanel:{type:Object,value:window.parent.hassioPanel}}}}]),t}();customElements.define("hassio-app",yc)},function(e,t,n){"use strict";t.default=function(){function e(t,n,i,o){this.message=t,this.expected=n,this.found=i,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(e,Error),{SyntaxError:e,parse:function(t){var n,i=arguments.length>1?arguments[1]:{},o={},r={start:Te},a=Te,s=function(e){return{type:"messageFormatPattern",elements:e,location:Ce()}},l=function(e){var t,n,i,o,r,a="";for(t=0,i=e.length;tke&&(ke=ge,xe=[]),xe.push(e))}function Te(){return Ae()}function Ae(){var e,t,n;for(e=ge,t=[],n=je();n!==o;)t.push(n),n=je();return t!==o&&(_e=e,t=s(t)),t}function je(){var e;return(e=function(){var e,n;return e=ge,(n=function(){var e,n,i,r,a,s;if(e=ge,n=[],i=ge,(r=ze())!==o&&(a=Be())!==o&&(s=ze())!==o?i=r=[r,a,s]:(ge=i,i=o),i!==o)for(;i!==o;)n.push(i),i=ge,(r=ze())!==o&&(a=Be())!==o&&(s=ze())!==o?i=r=[r,a,s]:(ge=i,i=o);else n=o;return n!==o&&(_e=e,n=l(n)),(e=n)===o&&(e=ge,e=(n=Le())!==o?t.substring(e,ge):n),e}())!==o&&(_e=e,n=c(n)),n}())===o&&(e=function(){var e,n,i,r,a,s,l;return e=ge,123===t.charCodeAt(ge)?(n=d,ge++):(n=o,0===Oe&&Ee(h)),n!==o&&ze()!==o&&(i=function(){var e,n,i;if((e=Fe())===o){if(e=ge,n=[],p.test(t.charAt(ge))?(i=t.charAt(ge),ge++):(i=o,0===Oe&&Ee(u)),i!==o)for(;i!==o;)n.push(i),p.test(t.charAt(ge))?(i=t.charAt(ge),ge++):(i=o,0===Oe&&Ee(u));else n=o;e=n!==o?t.substring(e,ge):n}return e}())!==o&&ze()!==o?(r=ge,44===t.charCodeAt(ge)?(a=f,ge++):(a=o,0===Oe&&Ee(m)),a!==o&&(s=ze())!==o&&(l=function(){var e;return(e=function(){var e,n,i,r,a,s;return e=ge,t.substr(ge,6)===g?(n=g,ge+=6):(n=o,0===Oe&&Ee(_)),n===o&&(t.substr(ge,4)===w?(n=w,ge+=4):(n=o,0===Oe&&Ee(k)),n===o&&(t.substr(ge,4)===x?(n=x,ge+=4):(n=o,0===Oe&&Ee(O)))),n!==o&&ze()!==o?(i=ge,44===t.charCodeAt(ge)?(r=f,ge++):(r=o,0===Oe&&Ee(m)),r!==o&&(a=ze())!==o&&(s=Be())!==o?i=r=[r,a,s]:(ge=i,i=o),i===o&&(i=null),i!==o?(_e=e,e=n=C(n,i)):(ge=e,e=o)):(ge=e,e=o),e}())===o&&(e=function(){var e,n,i,r;return e=ge,t.substr(ge,6)===S?(n=S,ge+=6):(n=o,0===Oe&&Ee(P)),n!==o&&ze()!==o?(44===t.charCodeAt(ge)?(i=f,ge++):(i=o,0===Oe&&Ee(m)),i!==o&&ze()!==o&&(r=Re())!==o?(_e=e,e=n=E(r)):(ge=e,e=o)):(ge=e,e=o),e}())===o&&(e=function(){var e,n,i,r;return e=ge,t.substr(ge,13)===T?(n=T,ge+=13):(n=o,0===Oe&&Ee(A)),n!==o&&ze()!==o?(44===t.charCodeAt(ge)?(i=f,ge++):(i=o,0===Oe&&Ee(m)),i!==o&&ze()!==o&&(r=Re())!==o?(_e=e,e=n=j(r)):(ge=e,e=o)):(ge=e,e=o),e}())===o&&(e=function(){var e,n,i,r,a;if(e=ge,t.substr(ge,6)===I?(n=I,ge+=6):(n=o,0===Oe&&Ee(R)),n!==o)if(ze()!==o)if(44===t.charCodeAt(ge)?(i=f,ge++):(i=o,0===Oe&&Ee(m)),i!==o)if(ze()!==o){if(r=[],(a=Ie())!==o)for(;a!==o;)r.push(a),a=Ie();else r=o;r!==o?(_e=e,e=n=L(r)):(ge=e,e=o)}else ge=e,e=o;else ge=e,e=o;else ge=e,e=o;else ge=e,e=o;return e}()),e}())!==o?r=a=[a,s,l]:(ge=r,r=o),r===o&&(r=null),r!==o&&(a=ze())!==o?(125===t.charCodeAt(ge)?(s=y,ge++):(s=o,0===Oe&&Ee(v)),s!==o?(_e=e,e=n=b(i,r)):(ge=e,e=o)):(ge=e,e=o)):(ge=e,e=o),e}()),e}function Ie(){var e,n,i,r,a;return e=ge,ze()!==o&&(n=function(){var e,n,i,r;return e=ge,n=ge,61===t.charCodeAt(ge)?(i=z,ge++):(i=o,0===Oe&&Ee(N)),i!==o&&(r=Fe())!==o?n=i=[i,r]:(ge=n,n=o),(e=n!==o?t.substring(e,ge):n)===o&&(e=Be()),e}())!==o&&ze()!==o?(123===t.charCodeAt(ge)?(i=d,ge++):(i=o,0===Oe&&Ee(h)),i!==o&&ze()!==o&&(r=Ae())!==o&&ze()!==o?(125===t.charCodeAt(ge)?(a=y,ge++):(a=o,0===Oe&&Ee(v)),a!==o?(_e=e,e=D(n,r)):(ge=e,e=o)):(ge=e,e=o)):(ge=e,e=o),e}function Re(){var e,n,i,r;if(e=ge,(n=function(){var e,n,i;return e=ge,t.substr(ge,7)===F?(n=F,ge+=7):(n=o,0===Oe&&Ee(M)),n!==o&&ze()!==o&&(i=Fe())!==o?(_e=e,e=n=B(i)):(ge=e,e=o),e}())===o&&(n=null),n!==o)if(ze()!==o){if(i=[],(r=Ie())!==o)for(;r!==o;)i.push(r),r=Ie();else i=o;i!==o?(_e=e,e=n=H(n,i)):(ge=e,e=o)}else ge=e,e=o;else ge=e,e=o;return e}function Le(){var e,n;if(Oe++,e=[],$.test(t.charAt(ge))?(n=t.charAt(ge),ge++):(n=o,0===Oe&&Ee(U)),n!==o)for(;n!==o;)e.push(n),$.test(t.charAt(ge))?(n=t.charAt(ge),ge++):(n=o,0===Oe&&Ee(U));else e=o;return Oe--,e===o&&(n=o,0===Oe&&Ee(q)),e}function ze(){var e,n,i;for(Oe++,e=ge,n=[],i=Le();i!==o;)n.push(i),i=Le();return e=n!==o?t.substring(e,ge):n,Oe--,e===o&&(n=o,0===Oe&&Ee(V)),e}function Ne(){var e;return K.test(t.charAt(ge))?(e=t.charAt(ge),ge++):(e=o,0===Oe&&Ee(W)),e}function De(){var e;return Y.test(t.charAt(ge))?(e=t.charAt(ge),ge++):(e=o,0===Oe&&Ee(Z)),e}function Fe(){var e,n,i,r,a,s;if(e=ge,48===t.charCodeAt(ge)?(n=X,ge++):(n=o,0===Oe&&Ee(G)),n===o){if(n=ge,i=ge,J.test(t.charAt(ge))?(r=t.charAt(ge),ge++):(r=o,0===Oe&&Ee(Q)),r!==o){for(a=[],s=Ne();s!==o;)a.push(s),s=Ne();a!==o?i=r=[r,a]:(ge=i,i=o)}else ge=i,i=o;n=i!==o?t.substring(n,ge):i}return n!==o&&(_e=e,n=ee(n)),n}function Me(){var e,n,i,r,a,s,l,c;return te.test(t.charAt(ge))?(e=t.charAt(ge),ge++):(e=o,0===Oe&&Ee(ne)),e===o&&(e=ge,t.substr(ge,2)===ie?(n=ie,ge+=2):(n=o,0===Oe&&Ee(oe)),n!==o&&(_e=e,n=re()),(e=n)===o&&(e=ge,t.substr(ge,2)===ae?(n=ae,ge+=2):(n=o,0===Oe&&Ee(se)),n!==o&&(_e=e,n=le()),(e=n)===o&&(e=ge,t.substr(ge,2)===ce?(n=ce,ge+=2):(n=o,0===Oe&&Ee(pe)),n!==o&&(_e=e,n=ue()),(e=n)===o&&(e=ge,t.substr(ge,2)===de?(n=de,ge+=2):(n=o,0===Oe&&Ee(he)),n!==o&&(_e=e,n=fe()),(e=n)===o&&(e=ge,t.substr(ge,2)===me?(n=me,ge+=2):(n=o,0===Oe&&Ee(ye)),n!==o?(i=ge,r=ge,(a=De())!==o&&(s=De())!==o&&(l=De())!==o&&(c=De())!==o?r=a=[a,s,l,c]:(ge=r,r=o),(i=r!==o?t.substring(i,ge):r)!==o?(_e=e,e=n=ve(i)):(ge=e,e=o)):(ge=e,e=o)))))),e}function Be(){var e,t,n;if(e=ge,t=[],(n=Me())!==o)for(;n!==o;)t.push(n),n=Me();else t=o;return t!==o&&(_e=e,t=be(t)),t}if((n=a())!==o&&ge===t.length)return n;throw n!==o&&get.description?1:0});t1?i.slice(0,-1).join(", ")+" or "+i[e.length-1]:i[0])+" but "+(t?'"'+function(e){function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(e){return"\\x0"+n(e)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(e){return"\\x"+n(e)}).replace(/[\u0100-\u0FFF]/g,function(e){return"\\u0"+n(e)}).replace(/[\u1000-\uFFFF]/g,function(e){return"\\u"+n(e)})}()+'"':"end of input")+" found."}(n,i),n,i,o)}(null,xe,ke1||n<0||n>1?d:function(o){function r(e,t,n){return 3*e*(1-n)*(1-n)*n+3*t*(1-n)*n*n+n*n*n}if(o<=0){var a=0;return e>0?a=t/e:!t&&n>0&&(a=i/n),a*o}if(o>=1){var s=0;return n<1?s=(i-1)/(n-1):1==n&&e<1&&(s=(t-1)/(e-1)),1+s*(o-1)}for(var l=0,c=1;l=1)return 1;var i=1/e;return(n+=t*i)-n%i}}function s(e){v||(v=document.createElement("div").style),v.animationTimingFunction="",v.animationTimingFunction=e;var t=v.animationTimingFunction;if(""==t&&i())throw new TypeError(e+" is not a valid value for easing");return t}function l(e){if("linear"==e)return d;var t=g.exec(e);if(t)return r.apply(this,t.slice(1).map(Number));var n=_.exec(e);return n?a(Number(n[1]),{start:h,middle:f,end:m}[n[2]]):y[e]||d}function c(e,t,n){if(null==t)return w;var i=n.delay+e+n.endDelay;return t=Math.min(n.delay+e,i)?x:O}var p="backwards|forwards|both|none".split("|"),u="reverse|alternate|alternate-reverse".split("|"),d=function(e){return e};n.prototype={_setMember:function(t,n){this["_"+t]=n,this._effect&&(this._effect._timingInput[t]=n,this._effect._timing=e.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=e.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(e){this._setMember("delay",e)},get delay(){return this._delay},set endDelay(e){this._setMember("endDelay",e)},get endDelay(){return this._endDelay},set fill(e){this._setMember("fill",e)},get fill(){return this._fill},set iterationStart(e){if((isNaN(e)||e<0)&&i())throw new TypeError("iterationStart must be a non-negative number, received: "+timing.iterationStart);this._setMember("iterationStart",e)},get iterationStart(){return this._iterationStart},set duration(e){if("auto"!=e&&(isNaN(e)||e<0)&&i())throw new TypeError("duration must be non-negative or auto, received: "+e);this._setMember("duration",e)},get duration(){return this._duration},set direction(e){this._setMember("direction",e)},get direction(){return this._direction},set easing(e){this._easingFunction=l(s(e)),this._setMember("easing",e)},get easing(){return this._easing},set iterations(e){if((isNaN(e)||e<0)&&i())throw new TypeError("iterations must be non-negative, received: "+e);this._setMember("iterations",e)},get iterations(){return this._iterations}};var h=1,f=.5,m=0,y={ease:r(.25,.1,.25,1),"ease-in":r(.42,0,1,1),"ease-out":r(0,0,.58,1),"ease-in-out":r(.42,0,.58,1),"step-start":a(1,h),"step-middle":a(1,f),"step-end":a(1,m)},v=null,b="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",g=new RegExp("cubic-bezier\\("+b+","+b+","+b+","+b+"\\)"),_=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,w=0,k=1,x=2,O=3;e.cloneTimingInput=function(e){if("number"==typeof e)return e;var t={};for(var n in e)t[n]=e[n];return t},e.makeTiming=o,e.numericTimingToObject=function(e){return"number"==typeof e&&(e=isNaN(e)?{duration:0}:{duration:e}),e},e.normalizeTimingInput=function(t,n){return o(t=e.numericTimingToObject(t),n)},e.calculateActiveDuration=function(e){return Math.abs(function(e){return 0===e.duration||0===e.iterations?0:e.duration*e.iterations}(e)/e.playbackRate)},e.calculateIterationProgress=function(e,t,n){var i=c(e,t,n),o=function(e,t,n,i,o){switch(i){case k:return"backwards"==t||"both"==t?0:null;case O:return n-o;case x:return"forwards"==t||"both"==t?e:null;case w:return null}}(e,n.fill,t,i,n.delay);if(null===o)return null;var r=function(e,t,n,i,o){var r=o;return 0===e?t!==k&&(r+=n):r+=i/e,r}(n.duration,i,n.iterations,o,n.iterationStart),a=function(e,t,n,i,o,r){var a=e===1/0?t%1:e%1;return 0!==a||n!==x||0===i||0===o&&0!==r||(a=1),a}(r,n.iterationStart,i,n.iterations,o,n.duration),s=function(e,t,n,i){return e===x&&t===1/0?1/0:1===a?Math.floor(i)-1:Math.floor(i)}(i,n.iterations,0,r),l=function(e,t,n){var i=e;if("normal"!==e&&"reverse"!==e){var o=s;"alternate-reverse"===e&&(o+=1),i="normal",o!==1/0&&o%2!=0&&(i="reverse")}return"normal"===i?a:1-a}(n.direction);return n._easingFunction(l)},e.calculatePhase=c,e.normalizeEasing=s,e.parseEasingFunction=l}(i={}),function(e,t){function n(e,t){return e in l&&l[e][t]||t}function i(e,t,i){if(!function(e){return"display"===e||0===e.lastIndexOf("animation",0)||0===e.lastIndexOf("transition",0)}(e)){var o=r[e];if(o)for(var s in a.style[e]=t,o){var l=o[s],c=a.style[l];i[l]=n(l,c)}else i[e]=n(e,t)}}function o(e){var t=[];for(var n in e)if(!(n in["easing","offset","composite"])){var i=e[n];Array.isArray(i)||(i=[i]);for(var o,r=i.length,a=0;a1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==o){if("add"==r||"accumulate"==r)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=r)throw new TypeError("Invalid composite mode "+r+".")}else r="easing"==o?e.normalizeEasing(r):""+r;i(o,r,n)}return void 0==n.offset&&(n.offset=null),void 0==n.easing&&(n.easing="linear"),n}),r=!0,a=-1/0,s=0;s=0&&e.offset<=1}),r||function(){var e=n.length;null==n[e-1].offset&&(n[e-1].offset=1),e>1&&null==n[0].offset&&(n[0].offset=0);for(var t=0,i=n[0].offset,o=1;o=e.applyFrom&&n0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(e){e=+e,isNaN(e)||(t.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-e/this._playbackRate),this._currentTimePending=!1,this._currentTime!=e&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(e,!0),t.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(e){e=+e,isNaN(e)||this._paused||this._idle||(this._startTime=e,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),t.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(e){if(e!=this._playbackRate){var n=this.currentTime;this._playbackRate=e,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),t.applyDirtiedAnimation(this)),null!=n&&(this.currentTime=n)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),t.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,t.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._isFinished=!0,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),t.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(e,t){"function"==typeof t&&"finish"==e&&this._finishHandlers.push(t)},removeEventListener:function(e,t){if("finish"==e){var n=this._finishHandlers.indexOf(t);n>=0&&this._finishHandlers.splice(n,1)}},_fireEvents:function(e){if(this._isFinished){if(!this._finishedFlag){var t=new function(e,t,n){this.target=e,this.currentTime=t,this.timelineTime=n,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=e,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()}(this,this._currentTime,e),n=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){n.forEach(function(e){e.call(t.target,t)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(e,t){this._idle||this._paused||(null==this._startTime?t&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((e-this._startTime)*this.playbackRate)),t&&(this._currentTimePending=!1,this._fireEvents(e))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var e=this._effect._target;return e._activeAnimations||(e._activeAnimations=[]),e._activeAnimations},_markTarget:function(){var e=this._targetAnimations();-1===e.indexOf(this)&&e.push(this)},_unmarkTarget:function(){var e=this._targetAnimations(),t=e.indexOf(this);-1!==t&&e.splice(t,1)}}}(i,o),function(e,t,n){function i(e){var t=c;c=[],ei?n%=i:i%=n;return e*t/(n+i)}(i.length,o.length),c=0;c=1?t:"visible"}]},["visibility"]),function(e,t){function n(e){e=e.trim(),r.fillStyle="#000",r.fillStyle=e;var t=r.fillStyle;if(r.fillStyle="#fff",r.fillStyle=e,t==r.fillStyle){r.fillRect(0,0,1,1);var n=r.getImageData(0,0,1,1).data;r.clearRect(0,0,1,1);var i=n[3]/255;return[n[0]*i,n[1]*i,n[2]*i,i]}}function i(t,n){return[t,n,function(t){function n(e){return Math.max(0,Math.min(255,e))}if(t[3])for(var i=0;i<3;i++)t[i]=Math.round(n(t[i]/t[3]));return t[3]=e.numberToString(e.clamp(0,1,t[3])),"rgba("+t.join(",")+")"}]}var o=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");o.width=o.height=1;var r=o.getContext("2d");e.addPropertiesHandler(n,i,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]),e.consumeColor=e.consumeParenthesised.bind(null,n),e.mergeColors=i}(o),function(e,t){function n(e){function t(){var t=a.exec(e);r=t?t[0]:void 0}function n(){if("("!==r)return function(){var e=Number(r);return t(),e}();t();var e=o();return")"!==r?NaN:(t(),e)}function i(){for(var e=n();"*"===r||"/"===r;){var i=r;t();var o=n();"*"===i?e*=o:e/=o}return e}function o(){for(var e=i();"+"===r||"-"===r;){var n=r;t();var o=i();"+"===n?e+=o:e-=o}return e}var r,a=/([\+\-\w\.]+|[\(\)\*\/])/g;return t(),o()}function i(e,t){if("0"==(t=t.trim().toLowerCase())&&"px".search(e)>=0)return{px:0};if(/^[^(]*$|^calc/.test(t)){var i={};t=(t=t.replace(/calc\(/g,"(")).replace(e,function(e){return i[e]=null,"U"+e});for(var o="U("+e.source+")",r=t.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+o,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),a=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],s=0;s1?"calc("+n+")":n}]}var a="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",s=i.bind(null,new RegExp(a,"g")),l=i.bind(null,new RegExp(a+"|%","g")),c=i.bind(null,/deg|rad|grad|turn/g);e.parseLength=s,e.parseLengthOrPercent=l,e.consumeLengthOrPercent=e.consumeParenthesised.bind(null,l),e.parseAngle=c,e.mergeDimensions=r;var p=e.consumeParenthesised.bind(null,s),u=e.consumeRepeated.bind(void 0,p,/^/),d=e.consumeRepeated.bind(void 0,u,/^,/);e.consumeSizePairList=d;var h=e.mergeNestedRepeated.bind(void 0,o," "),f=e.mergeNestedRepeated.bind(void 0,h,",");e.mergeNonNegativeSizePair=h,e.addPropertiesHandler(function(e){var t=d(e);if(t&&""==t[1])return t[0]},f,["background-size"]),e.addPropertiesHandler(l,o,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),e.addPropertiesHandler(l,r,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"])}(o),function(e,t){function n(t){return e.consumeLengthOrPercent(t)||e.consumeToken(/^auto/,t)}function i(t){var i=e.consumeList([e.ignore(e.consumeToken.bind(null,/^rect/)),e.ignore(e.consumeToken.bind(null,/^\(/)),e.consumeRepeated.bind(null,n,/^,/),e.ignore(e.consumeToken.bind(null,/^\)/))],t);if(i&&4==i[0].length)return i[0]}var o=e.mergeWrappedNestedRepeated.bind(null,function(e){return"rect("+e+")"},function(t,n){return"auto"==t||"auto"==n?[!0,!1,function(i){var o=i?t:n;if("auto"==o)return"auto";var r=e.mergeDimensions(o,o);return r[2](r[0])}]:e.mergeDimensions(t,n)},", ");e.parseBox=i,e.mergeBoxes=o,e.addPropertiesHandler(i,o,["clip"])}(o),function(e,t){function n(e){return function(t){var n=0;return e.map(function(e){return e===c?t[n++]:e})}}function i(e){return e}function o(t){if("none"==(t=t.toLowerCase().trim()))return[];for(var n,i=/\s*(\w+)\(([^)]*)\)/g,o=[],r=0;n=i.exec(t);){if(n.index!=r)return;r=n.index+n[0].length;var a=n[1],s=d[a];if(!s)return;var l=n[2].split(","),c=s[0];if(c.length=0&&this._cancelHandlers.splice(n,1)}else s.call(this,e,t)},o}}}(),function(e){var t=document.documentElement,n=null,i=!1;try{var o="0"==getComputedStyle(t).getPropertyValue("opacity")?"1":"0";(n=t.animate({opacity:[o,o]},{duration:1})).currentTime=0,i=getComputedStyle(t).getPropertyValue("opacity")==o}catch(e){}finally{n&&n.cancel()}if(!i){var r=window.Element.prototype.animate;window.Element.prototype.animate=function(t,n){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&t[Symbol.iterator]&&(t=Array.from(t)),Array.isArray(t)||null===t||(t=e.convertToArrayForm(t)),r.call(this,t,n)}}}(i),function(e,t,n){function i(e){var n=t.timeline;n.currentTime=e,n._discardAnimations(),0==n._animations.length?r=!1:requestAnimationFrame(i)}var o=window.requestAnimationFrame;window.requestAnimationFrame=function(e){return o(function(n){t.timeline._updateAnimationsPromises(),e(n),t.timeline._updateAnimationsPromises()})},t.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},t.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){t.animationsWithPromises=t.animationsWithPromises.filter(function(e){return e._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(e){return"finished"!=e.playState&&"idle"!=e.playState})},_play:function(e){var n=new t.Animation(e,this);return this._animations.push(n),t.restartWebAnimationsNextTick(),n._updatePromises(),n._animation.play(),n._updatePromises(),n},play:function(e){return e&&e.remove(),this._play(e)}};var r=!1;t.restartWebAnimationsNextTick=function(){r||(r=!0,requestAnimationFrame(i))};var a=new t.AnimationTimeline;t.timeline=a;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return a}})}catch(e){}try{window.document.timeline=a}catch(e){}}(0,r),function(e,t,n){t.animationsWithPromises=[],t.Animation=function(t,n){if(this.id="",t&&t._id&&(this.id=t._id),this.effect=t,t&&(t._animation=this),!n)throw new Error("Animation with null timeline is not supported");this._timeline=n,this._sequenceNumber=e.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},t.Animation.prototype={_updatePromises:function(){var e=this._oldPlayState,t=this.playState;return this._readyPromise&&t!==e&&("idle"==t?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==e?this._resolveReadyPromise():"pending"==t&&(this._readyPromise=void 0)),this._finishedPromise&&t!==e&&("idle"==t?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==t?this._resolveFinishedPromise():"finished"==e&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var e,n,i,o,r=!!this._animation;r&&(e=this.playbackRate,n=this._paused,i=this.startTime,o=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=t.newUnderlyingAnimationForKeyframeEffect(this.effect),t.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=t.newUnderlyingAnimationForGroup(this.effect),t.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&t.bindAnimationForCustomEffect(this),r&&(1!=e&&(this.playbackRate=e),null!==i?this.startTime=i:null!==o?this.currentTime=o:null!==this._holdTime&&(this.currentTime=this._holdTime),n&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var e=this.effect._timing.delay;this._childAnimations.forEach(function(n){this._arrangeChildren(n,e),this.effect instanceof window.SequenceEffect&&(e+=t.groupChildDuration(n.effect))}.bind(this))}},_setExternalAnimation:function(e){if(this.effect&&this._isGroup)for(var t=0;t\n \n",document.head.appendChild(n.content)},function(e,t){function n(){document.body.removeAttribute("unresolved")}"interactive"===document.readyState||"complete"===document.readyState?n():window.addEventListener("DOMContentLoaded",n)}]);(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[,,,,,,,,,function(t,e){t.exports={indexOf:function(t,e){var r,n;if(Array.prototype.indexOf)return t.indexOf(e);for(r=0,n=t.length;r0;e--){var r=t[e];if(" "!==r)return"="===r?e:-1}}function c(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}e.parseTag=function(t,e,r){"user strict";var n="",s=0,a=!1,l=!1,c=0,p=t.length,u="",g="";for(c=0;c"===h){n+=r(t.slice(s,a)),u=i(g=t.slice(a,c+1)),n+=e(a,n.length,u,g,o(g)),s=c+1,a=!1;continue}if(('"'===h||"'"===h)&&"="===t.charAt(c-1)){l=h;continue}}else if(h===l){l=!1;continue}}return s/g,p=/"/g,u=/"/g,g=/&#([a-zA-Z0-9]*);?/gim,h=/:?/gim,d=/&newline;?/gim,f=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,m=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,b=/u\s*r\s*l\s*\(.*/gi;function x(t){return t.replace(p,""")}function k(t){return t.replace(u,'"')}function y(t){return t.replace(g,function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))})}function w(t){return t.replace(h,":").replace(d," ")}function v(t){for(var e="",r=0,n=t.length;r/g;e.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},e.getDefaultWhiteList=function(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}},e.onTag=function(t,e,r){},e.onIgnoreTag=function(t,e,r){},e.onTagAttr=function(t,e,r){},e.onIgnoreTagAttr=function(t,e,r){},e.safeAttrValue=function(t,e,r,n){if(r=A(r),"href"===e||"src"===e){if("#"===(r=o.trim(r)))return"#";if("http://"!==r.substr(0,7)&&"https://"!==r.substr(0,8)&&"mailto:"!==r.substr(0,7)&&"tel:"!==r.substr(0,4)&&"#"!==r[0]&&"/"!==r[0])return""}else if("background"===e){if(f.lastIndex=0,f.test(r))return""}else if("style"===e){if(m.lastIndex=0,m.test(r))return"";if(b.lastIndex=0,b.test(r)&&(f.lastIndex=0,f.test(r)))return"";!1!==n&&(r=(n=n||s).process(r))}return _(r)},e.escapeHtml=a,e.escapeQuote=x,e.unescapeQuote=k,e.escapeHtmlEntities=y,e.escapeDangerHtml5Entities=w,e.clearNonPrintableCharacter=v,e.friendlyAttrValue=A,e.escapeAttrValue=_,e.onIgnoreTagStripAll=function(){return""},e.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var r=!Array.isArray(t),n=[],i=!1;return{onIgnoreTag:function(s,a,l){if(function(e){return!!r||-1!==o.indexOf(t,e)}(s)){if(l.isClosing){var c="[/removed]",p=l.position+c.length;return n.push([!1!==i?i:l.position,p]),i=!1,c}return i||(i=l.position),"[removed]"}return e(s,a,l)},remove:function(t){var e="",r=0;return o.forEach(n,function(n){e+=t.slice(r,n[0]),r=n[1]}),e+=t.slice(r)}}},e.stripCommentTag=function(t){return t.replace(S,"")},e.stripBlankChar=function(t){var e=t.split("");return(e=e.filter(function(t){var e=t.charCodeAt(0);return!(127===e||e<=31&&10!==e&&13!==e)})).join("")},e.cssFilter=s,e.getDefaultCSSWhiteList=i},function(t,e,r){var n=r(10).FilterCSS,i=r(14),o=r(11),s=o.parseTag,a=o.parseAttr,l=r(9);function c(t){return void 0===t||null===t}function p(t){(t=function(t){var e={};for(var r in t)e[r]=t[r];return e}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=i.onIgnoreTagStripAll),t.whiteList=t.whiteList||i.whiteList,t.onTag=t.onTag||i.onTag,t.onTagAttr=t.onTagAttr||i.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||i.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||i.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||i.safeAttrValue,t.escapeHtml=t.escapeHtml||i.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new n(t.css))}p.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,r=e.whiteList,n=e.onTag,o=e.onIgnoreTag,p=e.onTagAttr,u=e.onIgnoreTagAttr,g=e.safeAttrValue,h=e.escapeHtml,d=this.cssFilter;e.stripBlankChar&&(t=i.stripBlankChar(t)),e.allowCommentTag||(t=i.stripCommentTag(t));var f=!1;e.stripIgnoreTagBody&&(f=i.StripTagBody(e.stripIgnoreTagBody,o),o=f.onIgnoreTag);var m=s(t,function(t,e,i,s,f){var m,b={sourcePosition:t,position:e,isClosing:f,isWhite:r.hasOwnProperty(i)};if(!c(m=n(i,s,b)))return m;if(b.isWhite){if(b.isClosing)return"";var x=function(t){var e=l.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var r="/"===(t=l.trim(t.slice(e+1,-1)))[t.length-1];return r&&(t=l.trim(t.slice(0,-1))),{html:t,closing:r}}(s),k=r[i],y=a(x.html,function(t,e){var r,n=-1!==l.indexOf(k,t);return c(r=p(i,t,e,n))?n?(e=g(i,t,e,d))?t+'="'+e+'"':t:c(r=u(i,t,e,n))?void 0:r:r});return s="<"+i,y&&(s+=" "+y),x.closing&&(s+=" /"),s+">"}return c(m=o(i,s,b))?h(s):m},h);return f&&(m=f.remove(m)),m},t.exports=p},function(t,e,r){var n=r(12);t.exports=function(t,e){";"!==(t=n.trimRight(t))[t.length-1]&&(t+=";");var r=t.length,i=!1,o=0,s=0,a="";function l(){if(!i){var r=n.trim(t.slice(o,s)),l=r.indexOf(":");if(-1!==l){var c=n.trim(r.slice(0,l)),p=n.trim(r.slice(l+1));if(c){var u=e(o,a.length,c,p,r);u&&(a+=u+"; ")}}}o=s+1}for(;s ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:k,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n?(?!hr|heading|lheading| {0,3}>|tag)[^\n]+)+)/,text:/^[^\n]+/};function a(t){this.tokens=[],this.tokens.links={},this.options=t||w.defaults,this.rules=s.normal,this.options.gfm&&(this.options.tables?this.rules=s.tables:this.rules=s.gfm)}s._label=/(?:\\[\[\]]|[^\[\]])+/,s._title=/(?:"(?:\\"|[^"]|"[^"\n]*")*"|'\n?(?:[^'\n]+\n?)*'|\([^()]*\))/,s.def=f(s.def).replace("label",s._label).replace("title",s._title).getRegex(),s.bullet=/(?:[*+-]|\d+\.)/,s.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,s.item=f(s.item,"gm").replace(/bull/g,s.bullet).getRegex(),s.list=f(s.list).replace(/bull/g,s.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+s.def.source+")").getRegex(),s._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b",s.html=f(s.html).replace("comment",//).replace("closed",/<(tag)[\s\S]+?<\/\1>/).replace("closing",/\s]*)*?\/?>/).replace(/tag/g,s._tag).getRegex(),s.paragraph=f(s.paragraph).replace("hr",s.hr).replace("heading",s.heading).replace("lheading",s.lheading).replace("tag","<"+s._tag).getRegex(),s.blockquote=f(s.blockquote).replace("paragraph",s.paragraph).getRegex(),s.normal=y({},s),s.gfm=y({},s.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),s.gfm.paragraph=f(s.paragraph).replace("(?!","(?!"+s.gfm.fences.source.replace("\\1","\\2")+"|"+s.list.source.replace("\\1","\\3")+"|").getRegex(),s.tables=y({},s.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),a.rules=s,a.lex=function(t,e){return new a(e).lex(t)},a.prototype.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(t,!0)},a.prototype.token=function(t,e){var r,n,i,o,a,l,c,p,u,g,h;for(t=t.replace(/^ +$/gm,"");t;)if((i=this.rules.newline.exec(t))&&(t=t.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(t))t=t.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(t))t=t.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]||""});else if(i=this.rules.heading.exec(t))t=t.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(e&&(i=this.rules.nptable.exec(t))){for(t=t.substring(i[0].length),l={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},p=0;p ?/gm,""),this.token(i,e),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(t)){for(t=t.substring(i[0].length),h=(o=i[2]).length>1,this.tokens.push({type:"list_start",ordered:h,start:h?+o:""}),r=!1,g=(i=i[0].match(this.rules.item)).length,p=0;p1&&a.length>1||(t=i.slice(p+1).join("\n")+t,p=g-1)),n=r||/\n\n(?!\s*$)/.test(l),p!==g-1&&(r="\n"===l.charAt(l.length-1),n||(n=r)),this.tokens.push({type:n?"loose_item_start":"list_item_start"}),this.token(l,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(t))t=t.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(e&&(i=this.rules.def.exec(t)))t=t.substring(i[0].length),i[3]&&(i[3]=i[3].substring(1,i[3].length-1)),u=i[1].toLowerCase(),this.tokens.links[u]||(this.tokens.links[u]={href:i[2],title:i[3]});else if(e&&(i=this.rules.table.exec(t))){for(t=t.substring(i[0].length),l={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},p=0;p])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:k,tag:/^|^<\/?[a-zA-Z0-9\-]+(?:"[^"]*"|'[^']*'|\s[^<'">\/\s]*)*?\/?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^_([^\s_](?:[^_]|__)+?[^\s_])_\b|^\*((?:\*\*|[^*])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:k,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function d(t){return t.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""})}function f(t,e){return t=t.source,e=e||"",{replace:function(e,r){return r=(r=r.source||r).replace(/(^|[^\[])\^/g,"$1"),t=t.replace(e,r),this},getRegex:function(){return new RegExp(t,e)}}}function m(t,e){return b[" "+t]||(/^[^:]+:\/*[^/]*$/.test(t)?b[" "+t]=t+"/":b[" "+t]=t.replace(/[^/]*$/,"")),t=b[" "+t],"//"===e.slice(0,2)?t.replace(/:[\s\S]*/,":")+e:"/"===e.charAt(0)?t.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+e:t+e}l._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,l._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,l.autolink=f(l.autolink).replace("scheme",l._scheme).replace("email",l._email).getRegex(),l._inside=/(?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]]|\](?=[^\[]*\]))*/,l._href=/\s*?(?:\s+['"]([\s\S]*?)['"])?\s*/,l.link=f(l.link).replace("inside",l._inside).replace("href",l._href).getRegex(),l.reflink=f(l.reflink).replace("inside",l._inside).getRegex(),l.normal=y({},l),l.pedantic=y({},l.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),l.gfm=y({},l.normal,{escape:f(l.escape).replace("])","~|])").getRegex(),url:f(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",l._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:f(l.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),l.breaks=y({},l.gfm,{br:f(l.br).replace("{2,}","*").getRegex(),text:f(l.gfm.text).replace("{2,}","*").getRegex()}),c.rules=l,c.output=function(t,e,r){return new c(e,r).output(t)},c.prototype.output=function(t){for(var e,r,n,i,o="";t;)if(i=this.rules.escape.exec(t))t=t.substring(i[0].length),o+=i[1];else if(i=this.rules.autolink.exec(t))t=t.substring(i[0].length),n="@"===i[2]?"mailto:"+(r=h(this.mangle(i[1]))):r=h(i[1]),o+=this.renderer.link(n,null,r);else if(this.inLink||!(i=this.rules.url.exec(t))){if(i=this.rules.tag.exec(t))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),t=t.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):h(i[0]):i[0];else if(i=this.rules.link.exec(t))t=t.substring(i[0].length),this.inLink=!0,o+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(t))||(i=this.rules.nolink.exec(t))){if(t=t.substring(i[0].length),e=(i[2]||i[1]).replace(/\s+/g," "),!(e=this.links[e.toLowerCase()])||!e.href){o+=i[0].charAt(0),t=i[0].substring(1)+t;continue}this.inLink=!0,o+=this.outputLink(i,e),this.inLink=!1}else if(i=this.rules.strong.exec(t))t=t.substring(i[0].length),o+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(t))t=t.substring(i[0].length),o+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(t))t=t.substring(i[0].length),o+=this.renderer.codespan(h(i[2].trim(),!0));else if(i=this.rules.br.exec(t))t=t.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(t))t=t.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(t))t=t.substring(i[0].length),o+=this.renderer.text(h(this.smartypants(i[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else i[0]=this.rules._backpedal.exec(i[0])[0],t=t.substring(i[0].length),"@"===i[2]?n="mailto:"+(r=h(i[0])):(r=h(i[0]),n="www."===i[1]?"http://"+r:r),o+=this.renderer.link(n,null,r);return o},c.prototype.outputLink=function(t,e){var r=h(e.href),n=e.title?h(e.title):null;return"!"!==t[0].charAt(0)?this.renderer.link(r,n,this.output(t[1])):this.renderer.image(r,n,h(t[1]))},c.prototype.smartypants=function(t){return this.options.smartypants?t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):t},c.prototype.mangle=function(t){if(!this.options.mangle)return t;for(var e,r="",n=t.length,i=0;i.5&&(e="x"+e.toString(16)),r+="&#"+e+";";return r},p.prototype.code=function(t,e,r){if(this.options.highlight){var n=this.options.highlight(t,e);null!=n&&n!==t&&(r=!0,t=n)}return e?'
'+(r?t:h(t,!0))+"\n
\n":"
"+(r?t:h(t,!0))+"\n
"},p.prototype.blockquote=function(t){return"
\n"+t+"
\n"},p.prototype.html=function(t){return t},p.prototype.heading=function(t,e,r){return"'+t+"\n"},p.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},p.prototype.list=function(t,e,r){var n=e?"ol":"ul";return"<"+n+(e&&1!==r?' start="'+r+'"':"")+">\n"+t+"\n"},p.prototype.listitem=function(t){return"
  • "+t+"
  • \n"},p.prototype.paragraph=function(t){return"

    "+t+"

    \n"},p.prototype.table=function(t,e){return"\n\n"+t+"\n\n"+e+"\n
    \n"},p.prototype.tablerow=function(t){return"\n"+t+"\n"},p.prototype.tablecell=function(t,e){var r=e.header?"th":"td";return(e.align?"<"+r+' style="text-align:'+e.align+'">':"<"+r+">")+t+"\n"},p.prototype.strong=function(t){return""+t+""},p.prototype.em=function(t){return""+t+""},p.prototype.codespan=function(t){return""+t+""},p.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},p.prototype.del=function(t){return""+t+""},p.prototype.link=function(t,e,r){if(this.options.sanitize){try{var n=decodeURIComponent(d(t)).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return r}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return r}this.options.baseUrl&&!x.test(t)&&(t=m(this.options.baseUrl,t));var i='
    "+r+""},p.prototype.image=function(t,e,r){this.options.baseUrl&&!x.test(t)&&(t=m(this.options.baseUrl,t));var n=''+r+'":">")},p.prototype.text=function(t){return t},u.prototype.strong=u.prototype.em=u.prototype.codespan=u.prototype.del=u.prototype.text=function(t){return t},u.prototype.link=u.prototype.image=function(t,e,r){return""+r},u.prototype.br=function(){return""},g.parse=function(t,e){return new g(e).parse(t)},g.prototype.parse=function(t){this.inline=new c(t.links,this.options),this.inlineText=new c(t.links,y({},this.options,{renderer:new u})),this.tokens=t.reverse();for(var e="";this.next();)e+=this.tok();return e},g.prototype.next=function(){return this.token=this.tokens.pop()},g.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},g.prototype.parseText=function(){for(var t=this.token.text;"text"===this.peek().type;)t+="\n"+this.next().text;return this.inline.output(t)},g.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,d(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,e,r,n,i="",o="";for(r="",t=0;tAn error occurred:

    "+h(t.message+"",!0)+"
    ";throw t}}k.exec=k,w.options=w.setOptions=function(t){return y(w.defaults,t),w},w.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new p,xhtml:!1,baseUrl:null},w.Parser=g,w.parser=g.parse,w.Renderer=p,w.TextRenderer=u,w.Lexer=a,w.lexer=a.lex,w.InlineLexer=c,w.inlineLexer=c.output,w.parse=w,void 0!==t&&"object"===o(e)?t.exports=w:void 0===(i=function(){return w}.call(e,r,e,t))||(t.exports=i)}(this||"undefined"!=typeof window&&window)}).call(this,r(19))}]]);(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{21:function(n,r,t){"use strict";t.r(r),t.d(r,"marked",function(){return a}),t.d(r,"filterXSS",function(){return c});var e=t(20),i=t.n(e),o=t(18),u=t.n(o),a=i.a,c=u.a}}]); +!function(e){function t(t){for(var n,o,r=t[0],a=t[1],s=0,c=[];s1?n-1:0),o=1;o=0}function M(e){var t=e.indexOf(".");return-1===t?e:e.slice(0,t)}function B(e,t){return 0===e.indexOf(t+".")}function H(e,t){return 0===t.indexOf(e+".")}function q(e,t,n){return t+n.slice(e.length)}function $(e){if(Array.isArray(e)){for(var t=[],n=0;n1){for(var a=0;a=0){if(!ee[t])throw new Error("invalid async handle: "+e);ee[t]=null}}},se="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},le=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0},ce=function(){function e(e,t){for(var n=0;nc.source.length&&"property"==l.kind&&!l.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]){var p=n[t];t=q(c.source,l.target,t),s._setPendingPropertyOrPath(t,p,!1,!0)&&e._enqueueClient(s)}else!function(e,t,n,i,o){if(o=function(e,t,n,i){if(n.isCompound){var o=e.__dataCompoundStorage[n.target];o[i.compoundIndex]=t,t=o.join("")}return"attribute"!==n.kind&&("textContent"!==n.target&&("value"!==n.target||"input"!==e.localName&&"textarea"!==e.localName)||(t=void 0==t?"":t)),t}(t,o,n,i),b&&(o=b(o,n.target,n.kind,t)),"attribute"==n.kind)e._valueToNodeAttribute(t,o,n.target);else{var r=n.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?t[Le.READ_ONLY]&&t[Le.READ_ONLY][r]||t._setPendingProperty(r,o)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,r,o)}}(e,s,l,c,o.evaluator._evaluateBinding(e,c,t,n,i,r))}function Ze(e,t){if(t.isCompound){for(var n=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),i=t.parts,o=new Array(i.length),r=0;r="0"&&i<="9"&&(i="#"),i){case"'":case'"':n.value=t.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(t),n.literal=!0}return n.literal||(n.rootProperty=M(t),n.structured=F(t),n.structured&&(n.wildcard=".*"==t.slice(-2),n.wildcard&&(n.name=t.slice(0,-2)))),n}function ot(e,t,n,i){var o=n+".splices";e.notifyPath(o,{indexSplices:i}),e.notifyPath(n+".length",t.length),e.__data[o]={indexSplices:null}}function rt(e,t,n,i,o,r){ot(e,t,n,[{index:i,addedCount:o,removed:r,object:t,type:"splice"}])}var at=k(function(e){var t=Ee(_e(e)),n=function(e){function n(){!function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.__isPropertyEffectsClient=!0,e.__dataCounter=0,e.__dataClientsReady,e.__dataPendingClients,e.__dataToNotify,e.__dataLinkedPaths,e.__dataHasPaths,e.__dataCompoundStorage,e.__dataHost,e.__dataTemp,e.__dataClientsInitialized,e.__data,e.__dataPending,e.__dataOld,e.__computeEffects,e.__reflectEffects,e.__notifyEffects,e.__propagateEffects,e.__observeEffects,e.__readOnly,e.__templateInfo,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),Te(n,[{key:"_initializeProperties",value:function(){Ae(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"_initializeProperties",this).call(this),st.registerHost(this),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}},{key:"_initializeProtoProperties",value:function(e){this.__data=Object.create(e),this.__dataPending=Object.create(e),this.__dataOld={}}},{key:"_initializeInstanceProperties",value:function(e){var t=this[Le.READ_ONLY];for(var n in e)t&&t[n]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=e[n])}},{key:"_addPropertyEffect",value:function(e,t,n){this._createPropertyAccessor(e,t==Le.READ_ONLY);var i=Ne(this,t)[e];i||(i=this[t][e]=[]),i.push(n)}},{key:"_removePropertyEffect",value:function(e,t,n){var i=Ne(this,t)[e],o=i.indexOf(n);o>=0&&i.splice(o,1)}},{key:"_hasPropertyEffect",value:function(e,t){var n=this[t];return Boolean(n&&n[e])}},{key:"_hasReadOnlyEffect",value:function(e){return this._hasPropertyEffect(e,Le.READ_ONLY)}},{key:"_hasNotifyEffect",value:function(e){return this._hasPropertyEffect(e,Le.NOTIFY)}},{key:"_hasReflectEffect",value:function(e){return this._hasPropertyEffect(e,Le.REFLECT)}},{key:"_hasComputedEffect",value:function(e){return this._hasPropertyEffect(e,Le.COMPUTE)}},{key:"_setPendingPropertyOrPath",value:function(e,t,i,o){if(o||M(Array.isArray(e)?e[0]:e)!==e){if(!o){var r=V(this,e);if(!(e=K(this,e,t))||!Ae(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"_shouldPropertyChange",this).call(this,e,t,r))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(e,t,i))return function(e,t,n){var i=e.__dataLinkedPaths;if(i){var o=void 0;for(var r in i){var a=i[r];H(r,t)?(o=q(r,a,t),e._setPendingPropertyOrPath(o,n,!0,!0)):H(a,t)&&(o=q(a,r,t),e._setPendingPropertyOrPath(o,n,!0,!0))}}}(this,e,t),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[e])return this._setPendingProperty(e,t,i);this[e]=t}return!1}},{key:"_setUnmanagedPropertyToNode",value:function(e,t,n){n===e[t]&&"object"!=(void 0===n?"undefined":je(n))||(e[t]=n)}},{key:"_setPendingProperty",value:function(e,t,n){var i=this.__dataHasPaths&&F(e),o=i?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(e,t,o[e])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),e in this.__dataOld||(this.__dataOld[e]=this.__data[e]),i?this.__dataTemp[e]=t:this.__data[e]=t,this.__dataPending[e]=t,(i||this[Le.NOTIFY]&&this[Le.NOTIFY][e])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[e]=n),!0)}},{key:"_setProperty",value:function(e,t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}},{key:"_invalidateProperties",value:function(){this.__dataReady&&this._flushProperties()}},{key:"_enqueueClient",value:function(e){this.__dataPendingClients=this.__dataPendingClients||[],e!==this&&this.__dataPendingClients.push(e)}},{key:"_flushProperties",value:function(){this.__dataCounter++,Ae(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"_flushProperties",this).call(this),this.__dataCounter--}},{key:"_flushClients",value:function(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}},{key:"__enableOrFlushClients",value:function(){var e=this.__dataPendingClients;if(e){this.__dataPendingClients=null;for(var t=0;t1?o-1:0),a=1;a3?i-3:0),r=3;r1?i-1:0),r=1;ri&&n.push({literal:e.slice(i,o.index)});var r=o[1][0],a=Boolean(o[2]),s=o[3].trim(),l=!1,c="",p=-1;"{"==r&&(p=s.indexOf("::"))>0&&(c=s.substring(p+2),s=s.substring(0,p),l=!0);var u=nt(s),d=[];if(u){for(var h=u.args,f=u.methodName,m=0;m2&&void 0!==arguments[2]?arguments[2]:"",o="";if(t.cssText||t.rules){var r=t.rules;if(r&&!function(e){var t=r[0];return Boolean(t)&&Boolean(t.selector)&&0===t.selector.indexOf(St)}())for(var a,s=0,l=r.length;s1&&void 0!==arguments[1]?arguments[1]:"",n=Dt(e);return this.transformRules(n,t),e.textContent=Nt(n),n}},{key:"transformCustomStyle",value:function(e){var t=this,n=Dt(e);return Ft(n,function(e){":root"===e.selector&&(e.selector="html"),t.transformRule(e)}),e.textContent=Nt(n),n}},{key:"transformRules",value:function(e,t){var n=this;this._currentElement=t,Ft(e,function(e){n.transformRule(e)}),this._currentElement=null}},{key:"transformRule",value:function(e){e.cssText=this.transformCssText(e.parsedCssText),":root"===e.selector&&(e.selector=":host > *")}},{key:"transformCssText",value:function(e){var t=this;return e=e.replace(Tt,function(e,n,i,o){return t._produceCssProperties(e,n,i,o)}),this._consumeCssProperties(e)}},{key:"_getInitialValueForProperty",value:function(e){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}},{key:"_consumeCssProperties",value:function(e){for(var t=null;t=At.exec(e);){var n=t[0],i=t[1],o=t.index,r=o+n.indexOf("@apply"),a=o+n.length,s=e.slice(0,r),l=e.slice(a),c=this._cssTextToMap(s),p=this._atApplyToCssProperties(i,c);e=""+s+p+l,At.lastIndex=o+p.length}return e}},{key:"_atApplyToCssProperties",value:function(e,t){e=e.replace($t,"");var n=[],i=this._map.get(e);if(i||(this._map.set(e,{}),i=this._map.get(e)),i){this._currentElement&&(i.dependants[this._currentElement]=!0);var o=void 0,r=void 0,a=void 0,s=i.properties;for(o in s)r=[o,": var(",e,"_-_",o],(a=t&&t[o])&&r.push(",",a.replace(Vt,"")),r.push(")"),Vt.test(s[o])&&r.push(" !important"),n.push(r.join(""))}return n.join("; ")}},{key:"_replaceInitialOrInherit",value:function(e,t){var n=Ut.exec(t);return n&&(t=n[1]?this._getInitialValueForProperty(e):"apply-shim-inherit"),t}},{key:"_cssTextToMap",value:function(e){for(var t,n,i=e.split(";"),o=void 0,r=void 0,a={},s=0;s1&&(o=n[0].trim(),r=this._replaceInitialOrInherit(o,n.slice(1).join(":")),a[o]=r);return a}},{key:"_invalidateMixinEntry",value:function(e){if(Wt)for(var t in e.dependants)t!==this._currentElement&&Wt(t)}},{key:"_produceCssProperties",value:function(e,t,n,i){var o=this;if(n&&function e(t,n){var i=t.indexOf("var(");if(-1===i)return n(t,"","","");var o=function(e,t){for(var n=0,i=t,o=e.length;i-1?n=t:(i=t,n=e.getAttribute&&e.getAttribute("is")||""):(n=e.is,i=e.extends),{is:n,typeExtension:i}}(e).is,n=Xt[t];if(n&&!nn(n)){(function(e){return!nn(e)&&e[Qt]===e[Jt]})(n)||(this.prepareTemplate(n,t),function(e){e[Qt]=e[Jt],e._validating||(e._validating=!0,en.then(function(){e[Gt]=e[Jt],e._validating=!1}))}(n));var i=e.shadowRoot;if(i){var o=i.querySelector("style");o&&(o.__cssRules=n._styleAst,o.textContent=Nt(n._styleAst))}}}},{key:"styleDocument",value:function(e){this.ensure(),this.styleSubtree(document.body,e)}}]),e}();if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){var vn=new yn,bn=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate:function(e,t,n){vn.flushCustomStyles(),vn.prepareTemplate(e,t)},styleSubtree:function(e,t){vn.flushCustomStyles(),vn.styleSubtree(e,t)},styleElement:function(e){vn.flushCustomStyles(),vn.styleElement(e)},styleDocument:function(e){vn.flushCustomStyles(),vn.styleDocument(e)},getComputedStyleValue:function(e,t){return Bt(e,t)},flushCustomStyles:function(){vn.flushCustomStyles()},nativeCss:gt,nativeShadow:yt},bn&&(window.ShadyCSS.CustomStyleInterface=bn)}window.ShadyCSS.ApplyShim=mn;var gn=function(){function e(e,t){for(var n=0;n-1}var Tn=!1;function An(e){if(!En(e)&&"touchend"!==e)return wn&&Tn&&g?{passive:!0}:void 0}!function(){try{var e=Object.defineProperty({},"passive",{get:function(){Tn=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}}();var jn=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),In=function(){};In.prototype.reset,In.prototype.mousedown,In.prototype.mousemove,In.prototype.mouseup,In.prototype.touchstart,In.prototype.touchmove,In.prototype.touchend,In.prototype.click;var Rn=[],Ln={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0};function zn(e){var t=Array.prototype.slice.call(e.labels||[]);if(!t.length){t=[];var n=e.getRootNode();if(e.id)for(var i=n.querySelectorAll("label[for = "+e.id+"]"),o=0;o-1;if(o[r]===Mn.mouse.target)return}if(i)return;e.preventDefault(),e.stopPropagation()}};function Dn(e){for(var t,n=jn?["click"]:Cn,i=0;i0?t[0]:e.target}return e.target}function Kn(e){var t=void 0,n=e.type,i=e.currentTarget[kn];if(i){var o=i[n];if(o){if(!e[xn]&&(e[xn]={},"touch"===n.slice(0,5))){var r=(e=e).changedTouches[0];if("touchstart"===n&&1===e.touches.length&&(Mn.touch.id=r.identifier),Mn.touch.id!==r.identifier)return;wn||"touchstart"!==n&&"touchmove"!==n||function(e){var t=e.changedTouches[0],n=e.type;if("touchstart"===n)Mn.touch.x=t.clientX,Mn.touch.y=t.clientY,Mn.touch.scrollDecided=!1;else if("touchmove"===n){if(Mn.touch.scrollDecided)return;Mn.touch.scrollDecided=!0;var i=function(e){var t="auto",n=e.composedPath&&e.composedPath();if(n)for(var i,o=0;or:"pan-y"===i&&(o=r>a)),o?e.preventDefault():o("track")}}(e)}if(!(t=e[xn]).skip){for(var a,s=0;s<$n.length;s++)o[(a=$n[s]).name]&&!t[a.name]&&a.flow&&a.flow.start.indexOf(e.type)>-1&&a.reset&&a.reset();for(var l,c=0;c<$n.length;c++)o[(l=$n[c]).name]&&!t[l.name]&&(t[l.name]=!0,l[n](e))}}}}function Wn(e,t,n){return!!qn[t]&&(function(e,t,n){var i=qn[t],o=i.deps,r=i.name,a=e[kn];a||(e[kn]=a={});for(var s,l,c=0;c2&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Hn(this.info)},hasMovedEnough:function(e,t){if(this.info.prevent)return!1;if(this.info.started)return!0;var n=Math.abs(this.info.x-e),i=Math.abs(this.info.y-t);return n>=5||i>=5},mousedown:function(e){if(Fn(e)){var t=Vn(e),n=this,i=function(e){var i=e.clientX,o=e.clientY;n.hasMovedEnough(i,o)&&(n.info.state=n.info.started?"mouseup"===e.type?"end":"track":"start","start"===n.info.state&&Jn("tap"),n.info.addMove({x:i,y:o}),Fn(e)||(n.info.state="end",Hn(n.info)),n._fire(t,e),n.info.started=!0)};Bn(this.info,i,function(e){n.info.started&&i(e),Hn(n.info)}),this.info.x=e.clientX,this.info.y=e.clientY}},touchstart:function(e){var t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){var t=Vn(e),n=e.changedTouches[0],i=n.clientX,o=n.clientY;this.hasMovedEnough(i,o)&&("start"===this.info.state&&Jn("tap"),this.info.addMove({x:i,y:o}),this._fire(t,n),this.info.state="track",this.info.started=!0)},touchend:function(e){var t=Vn(e),n=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),this._fire(t,n,e))},_fire:function(e,t){var n=this.info.moves[this.info.moves.length-2],i=this.info.moves[this.info.moves.length-1],o=i.x-this.info.x,r=i.y-this.info.y,a=void 0,s=0;n&&(a=i.x-n.x,s=i.y-n.y),Gn(e,"track",{state:this.info.state,x:t.clientX,y:t.clientY,dx:o,dy:r,ddx:a,ddy:s,sourceEvent:t,hover:function(){return Un(t.clientX,t.clientY)}})}}),Zn({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},save:function(e){this.info.x=e.clientX,this.info.y=e.clientY},mousedown:function(e){Fn(e)&&this.save(e)},click:function(e){Fn(e)&&this.forward(e)},touchstart:function(e){this.save(e.changedTouches[0],e)},touchend:function(e){this.forward(e.changedTouches[0],e)},forward:function(e,t){var n=Math.abs(e.clientX-this.info.x),i=Math.abs(e.clientY-this.info.y),o=Vn(t||e);o&&!o.disabled&&(isNaN(n)||isNaN(i)||n<=25&&i<=25||function(e){if("click"===e.type){if(0===e.detail)return!0;var t=Vn(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;var n=t.getBoundingClientRect(),i=e.pageX,o=e.pageY;return!(i>=n.left&&i<=n.right&&o>=n.top&&o<=n.bottom)}return!1}(e))&&(this.info.prevent||Gn(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:t}))}});var ei=Vn,ti=Wn,ni=Yn,ii=function(){function e(e,t){for(var n=0;n-1&&ui.splice(e,1)}}}]),n}();return n.__activateDir=!1,n}),bi=!1,gi=[],_i=[];function wi(){bi=!0,requestAnimationFrame(function(){bi=!1,function(e){for(;e.length;)ki(e.shift())}(gi),setTimeout(function(){!function(e){for(var t=0,n=e.length;t0||n>0;)if(0!=t)if(0!=n){var r,a=e[t-1][n-1],s=e[t-1][n],l=e[t][n-1];(r=s0?ie.after(n):ae,t.bind(this))}},{key:"isDebouncerActive",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];return!(!t||!t.isActive())}},{key:"flushDebouncer",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];t&&t.flush()}},{key:"cancelDebouncer",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];t&&t.cancel()}},{key:"async",value:function(e,t){return t>0?ie.run(e.bind(this),t):~ae.run(e.bind(this))}},{key:"cancelAsync",value:function(e){e<0?ae.cancel(~e):ie.cancel(e)}},{key:"create",value:function(e,t){var n=document.createElement(e);if(t)if(n.setProperties)n.setProperties(t);else for(var i in t)n[i]=t[i];return n}},{key:"elementMatches",value:function(e,t){return qi(t||this,e)}},{key:"toggleAttribute",value:function(e,t,n){n=n||this,1==arguments.length&&(t=!n.hasAttribute(e)),t?n.setAttribute(e,""):n.removeAttribute(e)}},{key:"toggleClass",value:function(e,t,n){n=n||this,1==arguments.length&&(t=!n.classList.contains(e)),t?n.classList.add(e):n.classList.remove(e)}},{key:"transform",value:function(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e}},{key:"translate3d",value:function(e,t,n,i){i=i||this,this.transform("translate3d("+e+","+t+","+n+")",i)}},{key:"arrayDelete",value:function(e,t){var n=void 0;if(Array.isArray(e)){if((n=e.indexOf(t))>=0)return e.splice(n,1)}else if((n=V(this,e).indexOf(t))>=0)return this.splice(e,n,1);return null}},{key:"_logger",value:function(e,t){var n;switch(Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":(n=console)[e].apply(n,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?t-1:0),i=1;i=0;o--){var r=t[o];r?Array.isArray(r)?e(r,n):n.indexOf(r)<0&&(!i||i.indexOf(r)<0)&&n.unshift(r):console.warn("behavior is null, check for missing or 404 import")}return n}(e,null,n),t),n&&(e=n.concat(e)),t.prototype.behaviors=e,t}function eo(e,t){var n=function(n){function i(){return function(e,t){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,t),Xi(i,[{key:"created",value:function(){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"created",this).call(this),e.created&&e.created.call(this)}},{key:"_registered",value:function(){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"_registered",this).call(this),e.beforeRegister&&e.beforeRegister.call(Object.getPrototypeOf(this)),e.registered&&e.registered.call(Object.getPrototypeOf(this))}},{key:"_applyListeners",value:function(){if(Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"_applyListeners",this).call(this),e.listeners)for(var t in e.listeners)this._addMethodEventListenerToNode(this,t,e.listeners[t])}},{key:"_ensureAttributes",value:function(){if(e.hostAttributes)for(var t in e.hostAttributes)this._ensureAttribute(t,e.hostAttributes[t]);Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"_ensureAttributes",this).call(this)}},{key:"ready",value:function(){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"ready",this).call(this),e.ready&&e.ready.call(this)}},{key:"attached",value:function(){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"attached",this).call(this),e.attached&&e.attached.call(this)}},{key:"detached",value:function(){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"detached",this).call(this),e.detached&&e.detached.call(this)}},{key:"attributeChanged",value:function(t,n,o){Gi(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"attributeChanged",this).call(this,t,n,o),e.attributeChanged&&e.attributeChanged.call(this,t,n,o)}}],[{key:"properties",get:function(){return e.properties}},{key:"observers",get:function(){return e.observers}},{key:"template",get:function(){return e._template||D&&D.import(this.is,"template")||t.template||this.prototype._template||null}}]),i}();for(var i in n.generatedFrom=e,e)if(!(i in Ji)){var o=Object.getOwnPropertyDescriptor(e,i);o&&Object.defineProperty(n.prototype,i,o)}return n}var to=function e(t){var n;return n="function"==typeof t?t:e.Class(t),customElements.define(n.is,n),n};to.Class=function(e){e||console.warn("Polymer's Class function requires `info` argument");var t=eo(e,e.behaviors?Qi(e.behaviors,HTMLElement):Zi(HTMLElement));return t.is=e.is,t};var no=function(){function e(e,t){for(var n=0;n can only be templatized once");e.__templatizeOwner=t;var i=(t?t.constructor:_o)._parseTemplate(e),o=i.templatizeInstanceClass;o||(o=function(e,t,n){var i=n.mutableData?wo:_o,o=function(e){function t(){return fo(this,t),uo(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ho(t,i),t}();return o.prototype.__templatizeOptions=n,o.prototype._bindTemplate(e),function(e,t,n,i){var o=n.hostProps||{};for(var r in i.instanceProps){delete o[r];var a=i.notifyInstanceProp;a&&e.prototype._addPropertyEffect(r,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:xo(0,a)})}if(i.forwardHostProp&&t.__dataHost)for(var s in o)e.prototype._addPropertyEffect(s,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(e,t,n){e.__dataHost._setPendingPropertyOrPath("_host_"+t,n[t],!0,!0)}})}(o,e,t,n),o}(e,i,n),i.templatizeInstanceClass=o),function(e,t,n){var i=n.forwardHostProp;if(i){var o=t.templatizeTemplateClass;if(!o){var r=n.mutableData?bo:vo;o=t.templatizeTemplateClass=function(e){function t(){return fo(this,t),uo(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ho(t,r),t}();var a=t.hostProps;for(var s in a)o.prototype._addPropertyEffect("_host_"+s,o.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:ko(0,i)}),o.prototype._createNotifyingProperty("_host_"+s)}!function(e,t){mo=e,Object.setPrototypeOf(e,t.prototype),new t,mo=null}(e,o),e.__dataProto&&Object.assign(e.__data,e.__dataProto),e.__dataTemp={},e.__dataPending=null,e.__dataOld=null,e._enableProperties()}}(e,i,n);var r=function(e){function t(){return fo(this,t),uo(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return ho(t,o),t}();return r.prototype._methodHost=function(e){var t=e.__dataHost;return t&&t._methodHost||t}(e),r.prototype.__dataHost=e,r.prototype.__templatizeOwner=t,r.prototype.__hostProps=i.hostProps,r}var Co=function(){function e(e,t){for(var n=0;n child");n.disconnect(),e.render()});return void n.observe(this,{childList:!0})}this.root=this._stampTemplate(t),this.$=this.root.$,this.__children=[];for(var i=this.root.firstChild;i;i=i.nextSibling)this.__children[this.__children.length]=i;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}}]),t}();customElements.define("dom-bind",Po);var Eo=function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0},To=function(){function e(e,t){for(var n=0;n child");n.disconnect(),e.__render()});return n.observe(this,{childList:!0}),!1}var i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=Oo(t,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(e,t){for(var n,i=this.__instances,o=0;o1&&void 0!==arguments[1]?arguments[1]:0;this.__renderDebouncer=_n.debounce(this.__renderDebouncer,t>0?ie.after(t):ae,e.bind(this)),zi(this.__renderDebouncer)}},{key:"render",value:function(){this.__debounceRender(this.__render),Di()}},{key:"__render",value:function(){this.__ensureTemplatized()&&(this.__applyFullRefresh(),this.__pool.length=0,this._setRenderedItemCount(this.__instances.length),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this.__tryRenderChunk())}},{key:"__applyFullRefresh",value:function(){for(var e=this,t=this.items||[],n=new Array(t.length),i=0;i=r;p--)this.__detachAndRemoveInstance(p)}},{key:"__detachInstance",value:function(e){for(var t=this.__instances[e],n=0;n child");i.disconnect(),e.__render()});return i.observe(this,{childList:!0}),!1}this.__ctor=Oo(n,this,{mutableData:!0,forwardHostProp:function(e,t){this.__instance&&(this.if?this.__instance.forwardHostProp(e,t):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[M(e)]=!0))}})}if(this.__instance){this.__syncHostProperties();var o=this.__instance.children;if(o&&o.length&&this.previousSibling!==o[o.length-1])for(var r,a=0;a=o.index+o.removed.length?n.set(t,e+o.addedCount-o.removed.length):n.set(t,-1))});for(var r=0;r=0&&e.linkPaths("items."+n,"selected."+t++)})}else this.__selectedMap.forEach(function(t){e.linkPaths("selected","items."+t),e.linkPaths("selectedItem","items."+t)})}},{key:"clearSelection",value:function(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}},{key:"isSelected",value:function(e){return this.__selectedMap.has(e)}},{key:"isIndexSelected",value:function(e){return this.isSelected(this.items[e])}},{key:"__deselectChangedIdx",value:function(e){var t=this,n=this.__selectedIndexForItemIndex(e);if(n>=0){var i=0;this.__selectedMap.forEach(function(e,o){n==i++&&t.deselect(o)})}}},{key:"__selectedIndexForItemIndex",value:function(e){var t=this.__dataLinkedPaths["items."+e];if(t)return parseInt(t.slice("selected.".length),10)}},{key:"deselect",value:function(e){var t=this.__selectedMap.get(e);if(t>=0){this.__selectedMap.delete(e);var n=void 0;this.multi&&(n=this.__selectedIndexForItemIndex(t)),this.__updateLinks(),this.multi?this.splice("selected",n,1):this.selected=this.selectedItem=null}}},{key:"deselectIndex",value:function(e){this.deselect(this.items[e])}},{key:"select",value:function(e){this.selectIndex(this.items.indexOf(e))}},{key:"selectIndex",value:function(e){var t=this.items[e];this.isSelected(t)?this.toggle&&this.deselectIndex(e):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(t,e),this.__updateLinks(),this.multi?this.push("selected",t):this.selected=this.selectedItem=t)}}]),n}()})(mt),Bo=function(e){function t(){return No(this,t),Do(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Fo(t,Mo),zo(t,null,[{key:"is",get:function(){return"array-selector"}}]),t}();customElements.define(Bo.is,Bo);var Ho=new hn;window.ShadyCSS||(window.ShadyCSS={prepareTemplate:function(e,t,n){},styleSubtree:function(e,t){Ho.processStyles(),Mt(e,t)},styleElement:function(e){Ho.processStyles()},styleDocument:function(e){Ho.processStyles(),Mt(document.body,e)},getComputedStyleValue:function(e,t){return Bt(e,t)},flushCustomStyles:function(){},nativeCss:gt,nativeShadow:yt}),window.ShadyCSS.CustomStyleInterface=Ho;var qo=function(){function e(e,t){for(var n=0;n0&&(u="/"+u),this.tail&&this.tail.prefix===p&&this.tail.path===u||(c.tail={prefix:p,path:u,__queryParams:this.route.__queryParams}),c.data=r,this._dataInUrl={},r)this._dataInUrl[d]=r[d];this.setProperties?this.setProperties(c,!0):this.__setMulti(c)}else this.__resetProperties()}},__tailPathChanged:function(e){if(this.active){var t=e,n=this._matched;t&&("/"!==t.charAt(0)&&(t="/"+t),n+=t),this.set("route.path",n)}},__updatePathOnDataChange:function(){if(this.route&&this.active){var e=this.__getLink({});e!==this.__getLink(this._dataInUrl)&&this.set("route.path",e)}},__getLink:function(e){var t={tail:null};for(var n in this.data)t[n]=this.data[n];for(var n in e)t[n]=e[n];var i=this.pattern.split("/").map(function(e){return":"==e[0]&&(e=t[e.slice(1)]),e},this);return t.tail&&t.tail.path&&(i.length>0&&"/"===t.tail.path.charAt(0)?i.push(t.tail.path.slice(1)):i.push(t.tail.path)),i.join("/")},__setMulti:function(e){for(var t in e)this._propertySetter(t,e[t]);void 0!==e.data&&(this._pathEffector("data",this.data),this._notifyChange("data")),void 0!==e.active&&(this._pathEffector("active",this.active),this._notifyChange("active")),void 0!==e.tail&&(this._pathEffector("tail",this.tail),this._notifyChange("tail"))}});var Ko=document.createElement("template");Ko.setAttribute("style","display: none;"),Ko.innerHTML='\n \n\n \n',document.head.appendChild(Ko.content);var Wo=document.createElement("style");Wo.textContent="[hidden] { display: none !important; }",document.head.appendChild(Wo);var Yo,Zo,Xo=(Yo=["\n \n\n \n"],Zo=["\n \n\n \n"],Object.freeze(Object.defineProperties(Yo,{raw:{value:Object.freeze(Zo)}})));to({_template:l(Xo),is:"app-toolbar"});var Go=document.createElement("template");Go.setAttribute("style","display: none;"),Go.innerHTML='\n \n\n \n\n \n\n \n\n \n',document.head.appendChild(Go.content);var Jo=document.createElement("template");Jo.setAttribute("style","display: none;"),Jo.innerHTML='\n \n',document.head.appendChild(Jo.content);var Qo={properties:{active:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__activeChanged"},alt:{type:String,value:"loading",observer:"__altChanged"},__coolingDown:{type:Boolean,value:!1}},__computeContainerClasses:function(e,t){return[e||t?"active":"",t?"cooldown":""].join(" ")},__activeChanged:function(e,t){this.__setAriaHidden(!e),this.__coolingDown=!e&&t},__altChanged:function(e){"loading"===e?this.alt=this.getAttribute("aria-label")||e:(this.__setAriaHidden(""===e),this.setAttribute("aria-label",e))},__setAriaHidden:function(e){e?this.setAttribute("aria-hidden","true"):this.removeAttribute("aria-hidden")},__reset:function(){this.active=!1,this.__coolingDown=!1}},er=(n(7),document.createElement("template"));er.setAttribute("style","display: none;"),er.innerHTML='\n \n\n \n',document.head.appendChild(er.content),to({is:"paper-spinner",behaviors:[Qo]});var tr=function e(t){e[" "](t),this.type=t&&t.type||"default",this.key=t&&t.key,t&&"value"in t&&(this.value=t.value)};tr[" "]=function(){},tr.types={},tr.prototype={get value(){var e=this.type,t=this.key;if(e&&t)return tr.types[e]&&tr.types[e][t]},set value(e){var t=this.type,n=this.key;t&&n&&(t=tr.types[t]=tr.types[t]||{},null==e?delete t[n]:t[n]=e)},get list(){if(this.type){var e=tr.types[this.type];return e?Object.keys(e).map(function(e){return nr[this.type][e]},this):[]}},byKey:function(e){return this.key=e,this.value}};var nr=tr.types;to({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,n){var i=new tr({type:e,key:t});return void 0!==n&&n!==i.value?i.value=n:this.value!==i.value&&(this.value=i.value),i},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new tr({type:this.type,key:e}).value}});var ir=Object.freeze(Object.defineProperties(["\n \n"],{raw:{value:Object.freeze(["\n \n"])}}));to({_template:l(ir),is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:Vo.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&Vi(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,Vi(this.root).appendChild(this._img))}});var or={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},rr={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},ar={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},sr=/[a-z0-9*]/,lr=/U\+/,cr=/^arrow/,pr=/^space(bar)?/,ur=/^escape$/;function dr(e,t){var n="";if(e){var i=e.toLowerCase();" "===i||pr.test(i)?n="space":ur.test(i)?n="esc":1==i.length?t&&!sr.test(i)||(n=i):n=cr.test(i)?i.replace("arrow",""):"multiply"==i?"*":i}return n}function hr(e,t){return n=t,i=e.hasModifiers,(n.key?dr(n.key,i):n.detail&&n.detail.key?dr(n.detail.key,i):(r="",(o=n.keyIdentifier)&&(o in or?r=or[o]:lr.test(o)?(o=parseInt(o.replace("U+","0x"),16),r=String.fromCharCode(o).toLowerCase()):r=o.toLowerCase()),r||function(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):rr[e]),t}(n.keyCode)||""))===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey);var n,i,o,r}function fr(e){return e.trim().split(" ").map(function(e){return function(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce(function(e,t){var n=t.split(":"),i=n[0],o=n[1];return i in ar?(e[ar[i]]=!0,e.hasModifiers=!0):(e.key=i,e.event=o||"keydown"),e},{combo:e.split(":").shift()})}(e)})}var mr={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var n=fr(t),i=0;i\n :host {\n display: block;\n position: absolute;\n border-radius: inherit;\n overflow: hidden;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n /* See PolymerElements/paper-behaviors/issues/34. On non-Chrome browsers,\n * creating a node (with a position:absolute) in the middle of an event\n * handler "interrupts" that event handler (which happens when the\n * ripple is created on demand) */\n pointer-events: none;\n }\n\n :host([animating]) {\n /* This resolves a rendering issue in Chrome (as of 40) where the\n ripple is not properly clipped by its parent (which may have\n rounded corners). See: http://jsbin.com/temexa/4\n\n Note: We only apply this style conditionally. Otherwise, the browser\n will create a new compositing layer for every ripple element on the\n page, and that would be bad. */\n -webkit-transform: translate(0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n #background,\n #waves,\n .wave-container,\n .wave {\n pointer-events: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n #background,\n .wave {\n opacity: 0;\n }\n\n #waves,\n .wave {\n overflow: hidden;\n }\n\n .wave-container,\n .wave {\n border-radius: 50%;\n }\n\n :host(.circle) #background,\n :host(.circle) #waves {\n border-radius: 50%;\n }\n\n :host(.circle) .wave-container {\n overflow: hidden;\n }\n \n\n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n\n
    \n
    \n'])}})),_r={distance:function(e,t,n,i){var o=e-n,r=t-i;return Math.sqrt(o*o+r*r)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};function wr(e){this.element=e,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}function kr(e){this.element=e,this.color=window.getComputedStyle(e).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),Vi(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}wr.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(e,t){var n=_r.distance(e,t,0,0),i=_r.distance(e,t,this.width,0),o=_r.distance(e,t,0,this.height),r=_r.distance(e,t,this.width,this.height);return Math.max(n,i,o,r)}},kr.MAX_RADIUS=300,kr.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var e;return this.mouseDownStart?(e=_r.now()-this.mouseDownStart,this.mouseUpStart&&(e-=this.mouseUpElapsed),e):0},get mouseUpElapsed(){return this.mouseUpStart?_r.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var e=this.containerMetrics.width*this.containerMetrics.width,t=this.containerMetrics.height*this.containerMetrics.height,n=1.1*Math.min(Math.sqrt(e+t),kr.MAX_RADIUS)+5,i=1.1-n/kr.MAX_RADIUS*.2,o=this.mouseInteractionSeconds/i,r=n*(1-Math.pow(80,-o));return Math.abs(r)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var e=.3*this.mouseUpElapsedSeconds,t=this.opacity;return Math.max(0,Math.min(e,t))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,kr.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,kr.MAX_RADIUS)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},resetInteractionState:function(){this.maxRadius=0,this.mouseDownStart=0,this.mouseUpStart=0,this.xStart=0,this.yStart=0,this.xEnd=0,this.yEnd=0,this.slideDistance=0,this.containerMetrics=new wr(this.element)},draw:function(){var e,t,n;this.wave.style.opacity=this.opacity,e=this.radius/(this.containerMetrics.size/2),t=this.xNow-this.containerMetrics.width/2,n=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+t+"px, "+n+"px)",this.waveContainer.style.transform="translate3d("+t+"px, "+n+"px, 0)",this.wave.style.webkitTransform="scale("+e+","+e+")",this.wave.style.transform="scale3d("+e+","+e+",1)"},downAction:function(e){var t=this.containerMetrics.width/2,n=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=_r.now(),this.center?(this.xStart=t,this.yStart=n,this.slideDistance=_r.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=e?e.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=e?e.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=t,this.yEnd=n,this.slideDistance=_r.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(e){this.isMouseDown&&(this.mouseUpStart=_r.now())},remove:function(){Vi(this.waveContainer.parentNode).removeChild(this.waveContainer)}},to({_template:l(gr),is:"paper-ripple",behaviors:[mr],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){11==this.parentNode.nodeType?this.keyEventTarget=Vi(this).getOwnerRoot().host:this.keyEventTarget=this.parentNode;var e=this.keyEventTarget;this.listen(e,"up","uiUpAction"),this.listen(e,"down","uiDownAction")},detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction"),this.unlisten(this.keyEventTarget,"down","uiDownAction"),this.keyEventTarget=null},get shouldKeepAnimating(){for(var e=0;e0||(this.addRipple().downAction(e),this._animating||(this._animating=!0,this.animate()))},uiUpAction:function(e){this.noink||this.upAction(e)},upAction:function(e){this.holdDown||(this.ripples.forEach(function(t){t.upAction(e)}),this._animating=!0,this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor=null,this.fire("transitionend")},addRipple:function(){var e=new kr(this);return Vi(this.$.waves).appendChild(e.waveContainer),this.$.background.style.backgroundColor=e.color,this.ripples.push(e),this._setAnimating(!0),e},removeRipple:function(e){var t=this.ripples.indexOf(e);t<0||(this.ripples.splice(t,1),e.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){if(this._animating){var e,t;for(e=0;e\n .invisible {\n visibility: hidden;\n }\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}})),Ir=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),Ar(t,[{key:"computeMenuButtonClass",value:function(e,t){return!e&&t?"invisible":""}},{key:"toggleMenu",value:function(e){e.stopPropagation(),this.fire("hass-open-menu")}},{key:"_getIcon",value:function(e){return(e?"hassio":"hass")+":menu"}}],[{key:"template",get:function(){return l(jr)}},{key:"properties",get:function(){return{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},hassio:{type:Boolean,value:!1}}}}]),t}();customElements.define("ha-menu-button",Ir);var Rr=function(){function e(e,t){for(var n=0;n\n .placeholder {\n height: 100%;\n }\n\n .layout {\n height: calc(100% - 64px);\n }\n \n\n
    \n \n \n
    [[title]]
    \n
    \n
    \n \n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n\n
    \n \n \n
    [[title]]
    \n
    \n
    \n \n
    \n
    \n'])}})),zr=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),Rr(t,null,[{key:"template",get:function(){return l(Lr)}},{key:"properties",get:function(){return{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},title:{type:String,value:""}}}}]),t}();customElements.define("hass-loading-screen",zr);var Nr={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):window.removeEventListener("resize",this._boundNotifyResize),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this),this._fireResize())},assignParentResizable:function(e){this._parentResizable=e},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this.unlisten(e,"iron-resize","_onDescendantIronResize"))},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){this._notifyingDescendant?e.stopPropagation():y||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var t=Vi(e).rootTarget;t!==this&&(-1===this._interestedResizables.indexOf(t)&&(this._interestedResizables.push(t),this.listen(t,"iron-resize","_onDescendantIronResize")),t.assignParentResizable(this),this._notifyDescendant(t),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",function t(){document.removeEventListener("readystatechange",t),e()})}else this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable||(window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())}},Dr=[Nr,{listeners:{"app-reset-layout":"_appResetLayoutHandler","iron-resize":"resetLayout"},attached:function(){this.fire("app-reset-layout")},_appResetLayoutHandler:function(e){Vi(e).path[0]!==this&&(this.resetLayout(),e.stopPropagation())},_updateLayoutStates:function(){console.error("unimplemented")},resetLayout:function(){var e=this._updateLayoutStates.bind(this);o&&oe?(this._layoutDebouncer=_n.debounce(this._layoutDebouncer,oe,e),zi(this._layoutDebouncer)):this.debounce("resetLayout",e),this._notifyDescendantResize()},_notifyLayoutChanged:function(){var e=this;requestAnimationFrame(function(){e.fire("app-reset-layout")})},_notifyDescendantResize:function(){this.isAttached&&this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this)}}],Fr=Object.freeze(Object.defineProperties(['\n \n\n
    \n \n\n
    \n \n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n\n
    \n \n\n
    \n \n
    \n
    \n'])}}));to({_template:l(Fr),is:"app-header-layout",behaviors:[Dr],properties:{hasScrollingRegion:{type:Boolean,value:!1,reflectToAttribute:!0}},observers:["resetLayout(isAttached, hasScrollingRegion)"],get header(){return Vi(this.$.headerSlot).getDistributedNodes()[0]},_updateLayoutStates:function(){var e=this.header;if(this.isAttached&&e){this.$.wrapper.classList.remove("initializing"),e.scrollTarget=this.hasScrollingRegion?this.$.contentContainer:this.ownerDocument.documentElement;var t=e.offsetHeight;this.hasScrollingRegion?(e.style.left="",e.style.right=""):requestAnimationFrame(function(){var t=this.getBoundingClientRect(),n=document.documentElement.clientWidth-t.right;e.style.left=t.left+"px",e.style.right=n+"px"}.bind(this));var n=this.$.contentContainer.style;e.fixed&&!e.condenses&&this.hasScrollingRegion?(n.marginTop=t+"px",n.paddingTop=""):(n.paddingTop=t+"px",n.marginTop="")}}});var Mr="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},Br={},Hr=[{properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(e,t){if(this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),t)if("document"===e)this.scrollTarget=this._doc;else if("string"==typeof e){var n=this.domHost;this.scrollTarget=n&&n.$?n.$[e]:Vi(this.ownerDocument).querySelector("#"+e)}else this._isValidScrollTarget()&&(this._oldScrollTarget=e,this._toggleScrollListener(this._shouldHaveListener,e))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(e){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=e)},set _scrollLeft(e){this.scrollTarget===this._doc?window.scrollTo(e,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=e)},scroll:function(e,t){var n;"object"===(void 0===e?"undefined":Mr(e))?(n=e.left,t=e.top):n=e,n=n||0,t=t||0,this.scrollTarget===this._doc?window.scrollTo(n,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=n,this.scrollTarget.scrollTop=t)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(e,t){var n=t===this._doc?window:t;e?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),n.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(n.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(e){this._shouldHaveListener=e,this._toggleScrollListener(e,this.scrollTarget)}},{properties:{effects:{type:String},effectsConfig:{type:Object,value:function(){return{}}},disabled:{type:Boolean,reflectToAttribute:!0,value:!1},threshold:{type:Number,value:0},thresholdTriggered:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_effectsChanged(effects, effectsConfig, isAttached)"],_updateScrollState:function(e){},isOnScreen:function(){return!1},isContentBelow:function(){return!1},_effectsRunFn:null,_effects:null,get _clampedScrollTop(){return Math.max(0,this._scrollTop)},detached:function(){this._tearDownEffects()},createEffect:function(e,t){var n=Br[e];if(!n)throw new ReferenceError(this._getUndefinedMsg(e));var i=this._boundEffect(n,t||{});return i.setUp(),i},_effectsChanged:function(e,t,n){this._tearDownEffects(),e&&n&&(e.split(" ").forEach(function(e){var n;""!==e&&((n=Br[e])?this._effects.push(this._boundEffect(n,t[e])):console.warn(this._getUndefinedMsg(e)))},this),this._setUpEffect())},_layoutIfDirty:function(){return this.offsetWidth},_boundEffect:function(e,t){t=t||{};var n=parseFloat(t.startsAt||0),i=parseFloat(t.endsAt||1),o=i-n,r=function(){},a=0===n&&1===i?e.run:function(t,i){e.run.call(this,Math.max(0,(t-n)/o),i)};return{setUp:e.setUp?e.setUp.bind(this,t):r,run:e.run?a.bind(this):r,tearDown:e.tearDown?e.tearDown.bind(this):r}},_setUpEffect:function(){this.isAttached&&this._effects&&(this._effectsRunFn=[],this._effects.forEach(function(e){!1!==e.setUp()&&this._effectsRunFn.push(e.run)},this))},_tearDownEffects:function(){this._effects&&this._effects.forEach(function(e){e.tearDown()}),this._effectsRunFn=[],this._effects=[]},_runEffects:function(e,t){this._effectsRunFn&&this._effectsRunFn.forEach(function(n){n(e,t)})},_scrollHandler:function(){if(!this.disabled){var e=this._clampedScrollTop;this._updateScrollState(e),this.threshold>0&&this._setThresholdTriggered(e>=this.threshold)}},_getDOMRef:function(e){console.warn("_getDOMRef","`"+e+"` is undefined")},_getUndefinedMsg:function(e){return"Scroll effect `"+e+"` is undefined. Did you forget to import app-layout/app-scroll-effects/effects/"+e+".html ?"}}],qr=Object.freeze(Object.defineProperties(['\n \n
    \n \n
    \n'],{raw:{value:Object.freeze(['\n \n
    \n \n
    \n'])}}));to({_template:l(qr),is:"app-header",behaviors:[Hr,Dr],properties:{condenses:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},reveals:{type:Boolean,value:!1},shadow:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["_configChanged(isAttached, condenses, fixed)"],_height:0,_dHeight:0,_stickyElTop:0,_stickyElRef:null,_top:0,_progress:0,_wasScrollingDown:!1,_initScrollTop:0,_initTimestamp:0,_lastTimestamp:0,_lastScrollTop:0,get _maxHeaderTop(){return this.fixed?this._dHeight:this._height+5},get _stickyEl(){if(this._stickyElRef)return this._stickyElRef;for(var e,t=Vi(this.$.slot).getDistributedNodes(),n=0;e=t[n];n++)if(e.nodeType===Node.ELEMENT_NODE){if(e.hasAttribute("sticky")){this._stickyElRef=e;break}this._stickyElRef||(this._stickyElRef=e)}return this._stickyElRef},_configChanged:function(){this.resetLayout(),this._notifyLayoutChanged()},_updateLayoutStates:function(){if(0!==this.offsetWidth||0!==this.offsetHeight){var e=this._clampedScrollTop,t=0===this._height||0===e,n=this.disabled;this._height=this.offsetHeight,this._stickyElRef=null,this.disabled=!0,t||this._updateScrollState(0,!0),this._mayMove()?this._dHeight=this._stickyEl?this._height-this._stickyEl.offsetHeight:0:this._dHeight=0,this._stickyElTop=this._stickyEl?this._stickyEl.offsetTop:0,this._setUpEffect(),t?this._updateScrollState(e,!0):(this._updateScrollState(this._lastScrollTop,!0),this._layoutIfDirty()),this.disabled=n}},_updateScrollState:function(e,t){if(0!==this._height){var n,i=0,o=this._top,r=(this._lastScrollTop,this._maxHeaderTop),a=e-this._lastScrollTop,s=Math.abs(a),l=e>this._lastScrollTop,c=performance.now();if(this._mayMove()&&(i=this._clamp(this.reveals?o+a:e,0,r)),e>=this._dHeight&&(i=this.condenses&&!this.fixed?Math.max(this._dHeight,i):i,this.style.transitionDuration="0ms"),this.reveals&&!this.disabled&&s<100&&((c-this._initTimestamp>300||this._wasScrollingDown!==l)&&(this._initScrollTop=e,this._initTimestamp=c),e>=r))if(Math.abs(this._initScrollTop-e)>30||s>10){l&&e>=r?i=r:!l&&e>=this._dHeight&&(i=this.condenses&&!this.fixed?this._dHeight:0);var p=a/(c-this._lastTimestamp);this.style.transitionDuration=this._clamp((i-o)/p,0,300)+"ms"}else i=this._top;n=0===this._dHeight?e>0?1:0:i/this._dHeight,t||(this._lastScrollTop=e,this._top=i,this._wasScrollingDown=l,this._lastTimestamp=c),(t||n!==this._progress||o!==i||0===e)&&(this._progress=n,this._runEffects(n,i),this._transformHeader(i))}},_mayMove:function(){return this.condenses||!this.fixed},willCondense:function(){return this._dHeight>0&&this.condenses},isOnScreen:function(){return 0!==this._height&&this._top0:this._clampedScrollTop-this._maxHeaderTop>=0},_transformHeader:function(e){this.translate3d(0,-e+"px",0),this._stickyEl&&this.translate3d(0,this.condenses&&e>=this._stickyElTop?Math.min(e,this._dHeight)-this._stickyElTop+"px":0,0,this._stickyEl)},_clamp:function(e,t,n){return Math.min(n,Math.max(t,e))},_ensureBgContainers:function(){this._bgContainer||(this._bgContainer=document.createElement("div"),this._bgContainer.id="background",this._bgRear=document.createElement("div"),this._bgRear.id="backgroundRearLayer",this._bgContainer.appendChild(this._bgRear),this._bgFront=document.createElement("div"),this._bgFront.id="backgroundFrontLayer",this._bgContainer.appendChild(this._bgFront),Vi(this.root).insertBefore(this._bgContainer,this.$.contentContainer))},_getDOMRef:function(e){switch(e){case"backgroundFrontLayer":return this._ensureBgContainers(),this._bgFront;case"backgroundRearLayer":return this._ensureBgContainers(),this._bgRear;case"background":return this._ensureBgContainers(),this._bgContainer;case"mainTitle":return Vi(this).querySelector("[main-title]");case"condensedTitle":return Vi(this).querySelector("[condensed-title]")}return null},getScrollState:function(){return{progress:this._progress,top:this._top}}});var $r=document.createElement("template");$r.setAttribute("style","display: none;"),$r.innerHTML='\n \n',document.head.appendChild($r.content),n(6);var Ur=document.createElement("template");Ur.setAttribute("style","display: none;"),Ur.innerHTML="\n \n",document.head.appendChild(Ur.content);var Vr=document.createElement("template");Vr.setAttribute("style","display: none;"),Vr.innerHTML='\n \n\n \n\n \n\n \n',document.head.appendChild(Vr.content);var Kr={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){return this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){return this.fitInto===window?this.fitInto.innerHeight:this.fitInto.getBoundingClientRect().height},get _fitLeft(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var e=Vi(this).parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(e=e.host),e},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign},get __shouldPosition(){return(this.horizontalAlign||this.verticalAlign)&&("center"!==this.horizontalAlign||"middle"!==this.verticalAlign)},attached:function(){void 0===this._isRTL&&(this._isRTL="rtl"==window.getComputedStyle(this).direction),this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))},detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var e=window.getComputedStyle(this),t=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==e.top?"top":"auto"!==e.bottom?"bottom":null,horizontally:"auto"!==e.left?"left":"auto"!==e.right?"right":null},sizedBy:{height:"none"!==t.maxHeight,width:"none"!==t.maxWidth,minWidth:parseInt(t.minWidth,10)||0,minHeight:parseInt(t.minHeight,10)||0},margin:{top:parseInt(e.marginTop,10)||0,right:parseInt(e.marginRight,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0}}}},resetFit:function(){var e=this._fitInfo||{};for(var t in e.sizerInlineStyle)this.sizingTarget.style[t]=e.sizerInlineStyle[t];for(var t in e.inlineStyle)this.style[t]=e.inlineStyle[t];this._fitInfo=null},refit:function(){var e=this.sizingTarget.scrollLeft,t=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=e,this.sizingTarget.scrollTop=t},position:function(){if(this.__shouldPosition){this._discoverInfo(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var e=this.getBoundingClientRect(),t=this.__getNormalizedRect(this.positionTarget),n=this.__getNormalizedRect(this.fitInto),i=this._fitInfo.margin,o={width:e.width+i.left+i.right,height:e.height+i.top+i.bottom},r=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,o,e,t,n),a=r.left+i.left,s=r.top+i.top,l=Math.min(n.right-i.right,a+e.width),c=Math.min(n.bottom-i.bottom,s+e.height);a=Math.max(n.left+i.left,Math.min(a,l-this._fitInfo.sizedBy.minWidth)),s=Math.max(n.top+i.top,Math.min(s,c-this._fitInfo.sizedBy.minHeight)),this.sizingTarget.style.maxWidth=Math.max(l-a,this._fitInfo.sizedBy.minWidth)+"px",this.sizingTarget.style.maxHeight=Math.max(c-s,this._fitInfo.sizedBy.minHeight)+"px",this.style.left=a-e.left+"px",this.style.top=s-e.top+"px"}},constrain:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo;e.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),e.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var t=this.getBoundingClientRect();e.sizedBy.height||this.__sizeDimension(t,e.positionedBy.vertically,"top","bottom","Height"),e.sizedBy.width||this.__sizeDimension(t,e.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(e,t,n,i,o){this.__sizeDimension(e,t,n,i,o)},__sizeDimension:function(e,t,n,i,o){var r=this._fitInfo,a=this.__getNormalizedRect(this.fitInto),s="Width"===o?a.width:a.height,l=t===i,c=l?s-e[i]:e[n],p=r.margin[l?n:i],u="offset"+o,d=this[u]-this.sizingTarget[u];this.sizingTarget.style["max"+o]=s-p-c-d+"px"},center:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo.positionedBy;if(!e.vertically||!e.horizontally){this.style.position="fixed",e.vertically||(this.style.top="0px"),e.horizontally||(this.style.left="0px");var t=this.getBoundingClientRect(),n=this.__getNormalizedRect(this.fitInto);if(!e.vertically){var i=n.top-t.top+(n.height-t.height)/2;this.style.top=i+"px"}if(!e.horizontally){var o=n.left-t.left+(n.width-t.width)/2;this.style.left=o+"px"}}}},__getNormalizedRect:function(e){return e===document.documentElement||e===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:e.getBoundingClientRect()},__getOffscreenArea:function(e,t,n){var i=Math.min(0,e.top)+Math.min(0,n.bottom-(e.top+t.height)),o=Math.min(0,e.left)+Math.min(0,n.right-(e.left+t.width));return Math.abs(i)*t.width+Math.abs(o)*t.height},__getPosition:function(e,t,n,i,o,r){var a,s=[{verticalAlign:"top",horizontalAlign:"left",top:o.top+this.verticalOffset,left:o.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:o.top+this.verticalOffset,left:o.right-n.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:o.bottom-n.height-this.verticalOffset,left:o.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:o.bottom-n.height-this.verticalOffset,left:o.right-n.width-this.horizontalOffset}];if(this.noOverlap){for(var l=0,c=s.length;l\n :host {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: var(--iron-overlay-backdrop-background-color, #000);\n opacity: 0;\n transition: opacity 0.2s;\n pointer-events: none;\n @apply --iron-overlay-backdrop;\n }\n\n :host(.opened) {\n opacity: var(--iron-overlay-backdrop-opacity, 0.6);\n pointer-events: auto;\n @apply --iron-overlay-backdrop-opened;\n }\n \n\n \n"],{raw:{value:Object.freeze(["\n \n\n \n"])}}));to({_template:l(Wr),is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&Vi(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||Vi(this.parentNode).removeChild(this)},_onTransitionend:function(e){e&&e.target===this&&this.complete()},_openedChanged:function(e){if(e)this.prepare();else{var t=window.getComputedStyle(this);"0s"!==t.transitionDuration&&0!=t.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}});var Yr=function(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,ti(document.documentElement,"tap",function(){}),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)};Yr.prototype={constructor:Yr,get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement},get deepActiveElement(){var e=document.activeElement;for(e&&e instanceof Element!=0||(e=document.body);e.root&&Vi(e.root).activeElement;)e=Vi(e.root).activeElement;return e},_bringOverlayAtIndexToFront:function(e){var t=this._overlays[e];if(t){var n=this._overlays.length-1,i=this._overlays[n];if(i&&this._shouldBeBehindOverlay(t,i)&&n--,!(e>=n)){var o=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(t)<=o&&this._applyOverlayZ(t,o);e=0)return this._bringOverlayAtIndexToFront(t),void this.trackBackdrop();var n=this._overlays.length,i=this._overlays[n-1],o=Math.max(this._getZ(i),this._minimumZ),r=this._getZ(e);if(i&&this._shouldBeBehindOverlay(e,i)){this._applyOverlayZ(i,o),n--;var a=this._overlays[n-1];o=Math.max(this._getZ(a),this._minimumZ)}r<=o&&this._applyOverlayZ(e,o),this._overlays.splice(n,0,e),this.trackBackdrop()},removeOverlay:function(e){var t=this._overlays.indexOf(e);-1!==t&&(this._overlays.splice(t,1),this.trackBackdrop())},currentOverlay:function(){var e=this._overlays.length-1;return this._overlays[e]},currentOverlayZ:function(){return this._getZ(this.currentOverlay())},ensureMinimumZ:function(e){this._minimumZ=Math.max(this._minimumZ,e)},focusOverlay:function(){var e=this.currentOverlay();e&&e._applyFocus()},trackBackdrop:function(){var e=this._overlayWithBackdrop();(e||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(e)-1,this.backdropElement.opened=!!e,this.backdropElement.prepare())},getBackdrops:function(){for(var e=[],t=0;t=0;e--)if(this._overlays[e].withBackdrop)return this._overlays[e]},_getZ:function(e){var t=this._minimumZ;if(e){var n=Number(e.style.zIndex||window.getComputedStyle(e).zIndex);n==n&&(t=n)}return t},_setZ:function(e,t){e.style.zIndex=t},_applyOverlayZ:function(e,t){this._setZ(e,t+2)},_overlayInPath:function(e){e=e||[];for(var t=0;t0;o>=0&&t.push(i),n="content"===i.localName||"slot"===i.localName?Vi(i).getDistributedNodes():Vi(i.root||i).children;for(var a=0;a0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?n.push(t.shift()):n.push(e.shift());return n.concat(e,t)},_hasLowerTabOrder:function(e,t){var n=Math.max(e.tabIndex,0),i=Math.max(t.tabIndex,0);return 0===n||0===i?i>n:n>i}},aa={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},scrollAction:{type:String},_manager:{type:Object,value:Gr},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},observers:["__updateScrollObservers(isAttached, opened, scrollAction)"],get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||Vi(this).querySelector("[autofocus]")||this},get _focusableNodes(){return ra.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__rafs={},this.__restoreFocusNode=null,this.__scrollTop=this.__scrollLeft=null,this.__onCaptureScroll=this.__onCaptureScroll.bind(this),this.__rootNodes=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=Vi(this).observeNodes(this._onNodesChange)},detached:function(){for(var e in Vi(this).unobserveNodes(this._observer),this._observer=null,this.__rafs)null!==this.__rafs[e]&&cancelAnimationFrame(this.__rafs[e]);this.__rafs={},this._manager.removeOverlay(this),this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(e){this.fire("iron-overlay-canceled",e,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(e){e?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__deraf("__openedChanged",this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this.restoreFocusOnClose&&this.__restoreFocusNode){var e=this._manager.deepActiveElement;(e===document.body||Vi(this).deepContains(e))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null,this._focusNode.blur(),this._focusedChild=null}},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this.cancel(e)},_onCaptureFocus:function(e){if(this.withBackdrop){var t=Vi(e).path;-1===t.indexOf(this)?(e.stopPropagation(),this._applyFocus()):this._focusedChild=t[0]}},_onCaptureEsc:function(e){this.noCancelOnEscKey||this.cancel(e)},_onCaptureTab:function(e){if(this.withBackdrop){this.__ensureFirstLastFocusables();var t=e.shiftKey,n=t?this.__firstFocusableNode:this.__lastFocusableNode,i=t?this.__lastFocusableNode:this.__firstFocusableNode,o=!1;if(n===i)o=!0;else{var r=this._manager.deepActiveElement;o=r===n||r===this}o&&(e.preventDefault(),this._focusedChild=i,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__deraf("refit",this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){if(!this.__firstFocusableNode||!this.__lastFocusableNode){var e=this._focusableNodes;this.__firstFocusableNode=e[0],this.__lastFocusableNode=e[e.length-1]}},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__deraf:function(e,t){var n=this.__rafs;null!==n[e]&&cancelAnimationFrame(n[e]),n[e]=requestAnimationFrame(function(){n[e]=null,t.call(this)}.bind(this))},__updateScrollObservers:function(e,t,n){var i;e&&t&&this.__isValidScrollAction(n)?("lock"===n&&(this.__saveScrollPosition(),i=this,na.indexOf(i)>=0||(0===na.length&&function(){Zr=Zr||function(e){if(e.cancelable&&function(e){var t=Vi(e).rootTarget;if("touchmove"!==e.type&&Qr!==t&&(Qr=t,ea=function(e){for(var t=[],n=e.indexOf(Xr),i=0;i<=n;i++)if(e[i].nodeType===Node.ELEMENT_NODE){var o=e[i],r=o.style;"scroll"!==r.overflow&&"auto"!==r.overflow&&(r=window.getComputedStyle(o)),"scroll"!==r.overflow&&"auto"!==r.overflow||t.push(o)}return t}(Vi(e).path)),!ea.length)return!0;if("touchstart"===e.type)return!1;var n=function(e){var t={deltaX:e.deltaX,deltaY:e.deltaY};if("deltaX"in e);else if("wheelDeltaX"in e&&"wheelDeltaY"in e)t.deltaX=-e.wheelDeltaX,t.deltaY=-e.wheelDeltaY;else if("wheelDelta"in e)t.deltaX=0,t.deltaY=-e.wheelDelta;else if("axis"in e)t.deltaX=1===e.axis?e.detail:0,t.deltaY=2===e.axis?e.detail:0;else if(e.targetTouches){var n=e.targetTouches[0];t.deltaX=Jr.pageX-n.pageX,t.deltaY=Jr.pageY-n.pageY}return t}(e);return!function(e,t,n){if(t||n)for(var i=Math.abs(n)>=Math.abs(t),o=0;o0:r.scrollTop0:r.scrollLeft=0))switch(this.scrollAction){case"lock":this.__restoreScrollPosition();break;case"refit":this.__deraf("refit",this.refit);break;case"cancel":this.cancel(e)}},__saveScrollPosition:function(){document.scrollingElement?(this.__scrollTop=document.scrollingElement.scrollTop,this.__scrollLeft=document.scrollingElement.scrollLeft):(this.__scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this.__scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},__restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this.__scrollTop,document.scrollingElement.scrollLeft=this.__scrollLeft):(document.documentElement.scrollTop=document.body.scrollTop=this.__scrollTop,document.documentElement.scrollLeft=document.body.scrollLeft=this.__scrollLeft)}},sa=[Kr,Nr,aa],la={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(e,t){t&&(e?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(e){this.closingReason=this.closingReason||{},this.closingReason.confirmed=e},_onDialogClick:function(e){for(var t=Vi(e).path,n=0,i=t.indexOf(this);n\n\n :host {\n display: block;\n @apply --layout-relative;\n }\n\n :host(.is-scrolled:not(:first-child))::before {\n content: \'\';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 1px;\n background: var(--divider-color);\n }\n\n :host(.can-scroll:not(.scrolled-to-bottom):not(:last-child))::after {\n content: \'\';\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 1px;\n background: var(--divider-color);\n }\n\n .scrollable {\n padding: 0 24px;\n\n @apply --layout-scroll;\n @apply --paper-dialog-scrollable;\n }\n\n .fit {\n @apply --layout-fit;\n }\n \n\n
    \n \n
    \n'],{raw:{value:Object.freeze(['\n \n\n
    \n \n
    \n'])}}));to({_template:l(pa),is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget(),this.classList.add("no-padding")},attached:function(){this._ensureTarget(),requestAnimationFrame(this.updateScrollState.bind(this))},updateScrollState:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||this.parentElement,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(la)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}});var ua=[{properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(e,t){for(var n in t)e[n]=t[n]},_cloneConfig:function(e){var t={isClone:!0};return this._copyProperties(t,e),t},_getAnimationConfigRecursive:function(e,t,n){var i;if(this.animationConfig)if(this.animationConfig.value&&"function"==typeof this.animationConfig.value)this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));else if(i=e?this.animationConfig[e]:this.animationConfig,Array.isArray(i)||(i=[i]),i)for(var o,r=0;o=i[r];r++)if(o.animatable)o.animatable._getAnimationConfigRecursive(o.type||e,t,n);else if(o.id){var a=t[o.id];a?(a.isClone||(t[o.id]=this._cloneConfig(a),a=t[o.id]),this._copyProperties(a,o)):t[o.id]=o}else n.push(o)},getAnimationConfig:function(e){var t={},n=[];for(var i in this._getAnimationConfigRecursive(e,t,n),t)n.push(t[i]);return n}},{_configureAnimations:function(e){var t=[],n=[];if(e.length>0)for(var i=0;s=e[i];i++){var o=document.createElement(s.name);if(o.isNeonAnimation){var r=null;o.configure||(o.configure=function(e){return null}),r=o.configure(s),n.push({result:r,config:s})}else console.warn(this.is+":",s.name,"not found!")}for(var a=0;a\n \n'],{raw:{value:Object.freeze(['\n \n \n'])}}));to({_template:l(ha),is:"paper-dialog",behaviors:[ca,ua],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}});var fa=function(){function e(e,t){for(var n=0;n\n paper-dialog {\n min-width: 350px;\n font-size: 14px;\n border-radius: 2px;\n }\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n paper-checkbox {\n display: block;\n margin: 4px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n paper-dialog {\n max-height: 100%;\n }\n paper-dialog::before {\n content: "";\n position: fixed;\n z-index: -1;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n background-color: inherit;\n }\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n }\n \n \n \n \n
    [[title]]
    \n
    \n \n \n \n
    \n'],{raw:{value:Object.freeze(['\n \n \n \n \n
    [[title]]
    \n
    \n \n \n \n
    \n'])}})),ga=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),va(t,[{key:"openDialog",value:function(){this.$.dialog.open()}}],[{key:"template",get:function(){return l(ba)}},{key:"properties",get:function(){return{title:String,content:String}}}]),t}();customElements.define("hassio-markdown-dialog",ga),n(5);var _a={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var e=1;this.disabled?e=0:this.active||this.pressed?e=4:this.receivedFocusFromKeyboard&&(e=3),this._setElevation(e)},_computeKeyboardClass:function(e){this.toggleClass("keyboard-focus",e)},_spaceKeyDownHandler:function(e){vr._spaceKeyDownHandler.call(this,e),this.hasRipple()&&this.getRipple().ripples.length<1&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(e){vr._spaceKeyUpHandler.call(this,e),this.hasRipple()&&this._ripple.uiUpAction()}},wa=[br,yr,xr,_a],ka=document.createElement("template");ka.setAttribute("style","display: none;"),ka.innerHTML='\n \n',document.head.appendChild(ka.content);var xa=document.createElement("template");xa.setAttribute("style","display: none;"),xa.innerHTML='\n \n\n \n',document.head.appendChild(xa.content),to({is:"paper-button",behaviors:[wa],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?_a._calculateElevation.apply(this):this._setElevation(0)}});var Oa=Object.freeze(Object.defineProperties(['\n \n\n \n \n \n
    \n'],{raw:{value:Object.freeze(['\n \n\n \n \n \n
    \n'])}}));to({_template:l(Oa),is:"iron-image",properties:{src:{type:String,value:""},alt:{type:String,value:null},crossorigin:{type:String,value:null},preventLoad:{type:Boolean,value:!1},sizing:{type:String,value:null,reflectToAttribute:!0},position:{type:String,value:"center"},preload:{type:Boolean,value:!1},placeholder:{type:String,value:null,observer:"_placeholderChanged"},fade:{type:Boolean,value:!1},loaded:{notify:!0,readOnly:!0,type:Boolean,value:!1},loading:{notify:!0,readOnly:!0,type:Boolean,value:!1},error:{notify:!0,readOnly:!0,type:Boolean,value:!1},width:{observer:"_widthChanged",type:Number,value:null},height:{observer:"_heightChanged",type:Number,value:null}},observers:["_transformChanged(sizing, position)","_loadStateObserver(src, preventLoad)"],created:function(){this._resolvedSrc=""},_imgOnLoad:function(){this.$.img.src===this._resolveSrc(this.src)&&(this._setLoading(!1),this._setLoaded(!0),this._setError(!1))},_imgOnError:function(){this.$.img.src===this._resolveSrc(this.src)&&(this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",this._setLoading(!1),this._setLoaded(!1),this._setError(!0))},_computePlaceholderHidden:function(){return!this.preload||!this.fade&&!this.loading&&this.loaded},_computePlaceholderClassName:function(){return this.preload&&this.fade&&!this.loading&&this.loaded?"faded-out":""},_computeImgDivHidden:function(){return!this.sizing},_computeImgDivARIAHidden:function(){return""===this.alt?"true":void 0},_computeImgDivARIALabel:function(){return null!==this.alt?this.alt:""===this.src?"":this._resolveSrc(this.src).replace(/[?|#].*/g,"").split("/").pop()},_computeImgHidden:function(){return!!this.sizing},_widthChanged:function(){this.style.width=isNaN(this.width)?this.width:this.width+"px"},_heightChanged:function(){this.style.height=isNaN(this.height)?this.height:this.height+"px"},_loadStateObserver:function(e,t){var n=this._resolveSrc(e);n!==this._resolvedSrc&&(this._resolvedSrc="",this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",""===e||t?(this._setLoading(!1),this._setLoaded(!1),this._setError(!1)):(this._resolvedSrc=n,this.$.img.src=this._resolvedSrc,this.$.sizedImgDiv.style.backgroundImage='url("'+this._resolvedSrc+'")',this._setLoading(!0),this._setLoaded(!1),this._setError(!1)))},_placeholderChanged:function(){this.$.placeholder.style.backgroundImage=this.placeholder?'url("'+this.placeholder+'")':""},_transformChanged:function(){var e=this.$.sizedImgDiv.style,t=this.$.placeholder.style;e.backgroundSize=t.backgroundSize=this.sizing,e.backgroundPosition=t.backgroundPosition=this.sizing?this.position:"",e.backgroundRepeat=t.backgroundRepeat=this.sizing?"no-repeat":""},_resolveSrc:function(e){var t=h(e,this.$.baseURIAnchor.href);return"/"===t[0]&&(t=(location.origin||location.protocol+"//"+location.host)+t),t}});var Ca=Object.freeze(Object.defineProperties(['\n \n\n
    \n \n
    [[heading]]
    \n
    \n\n \n'],{raw:{value:Object.freeze(['\n \n\n
    \n \n
    [[heading]]
    \n
    \n\n \n'])}}));to({_template:l(Ca),is:"paper-card",properties:{heading:{type:String,value:"",observer:"_headingChanged"},image:{type:String,value:""},alt:{type:String},preloadImage:{type:Boolean,value:!1},fadeImage:{type:Boolean,value:!1},placeholderImage:{type:String,value:null},elevation:{type:Number,value:1,reflectToAttribute:!0},animatedShadow:{type:Boolean,value:!1},animated:{type:Boolean,reflectToAttribute:!0,readOnly:!0,computed:"_computeAnimated(animatedShadow)"}},_isHidden:function(e){return e?"false":"true"},_headingChanged:function(e){var t=this.getAttribute("heading"),n=this.getAttribute("aria-label");"string"==typeof n&&n!==t||this.setAttribute("aria-label",e)},_computeHeadingClass:function(e){return e?" over-image":""},_computeAnimated:function(e){return e}});var Sa={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1},_parentForm:{type:Object}},attached:function(){mt||this.fire("iron-form-element-register")},detached:function(){!mt&&this._parentForm&&this._parentForm.fire("iron-form-element-unregister",{target:this})}},Pa=null,Ea={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1,observer:"_invalidChanged"}},registered:function(){Pa=new tr({type:"validator"})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},get _validator(){return Pa&&Pa.byKey(this.validator)},hasValidator:function(){return null!=this._validator},validate:function(e){return void 0===e&&void 0!==this.value?this.invalid=!this._getValidity(this.value):this.invalid=!this._getValidity(e),!this.invalid},_getValidity:function(e){return!this.hasValidator()||this._validator.validate(e)}},Ta=Object.freeze(Object.defineProperties(['\n \n
    [[_text]]
    \n'],{raw:{value:Object.freeze(['\n \n
    [[_text]]
    \n'])}})),Aa=to({_template:l(Ta),is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},_text:{type:String,value:""}},created:function(){Aa.instance||(Aa.instance=this),document.body.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async(function(){this._text=e},100)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});Aa.instance=null,Aa.requestAvailability=function(){Aa.instance||(Aa.instance=document.createElement("iron-a11y-announcer")),document.body.appendChild(Aa.instance)};var ja=Object.freeze(Object.defineProperties(['\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}}));to({_template:l(ja),is:"iron-input",behaviors:[Ea],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){Aa.requestAvailability(),this._previousValidInput="",this._patternAlreadyChecked=!1},attached:function(){this._observer=Vi(this).observeNodes(function(e){this._initSlottedInput()}.bind(this))},detached:function(){this._observer&&(Vi(this).unobserveNodes(this._observer),this._observer=null)},get inputElement(){return this._inputElement},_initSlottedInput:function(){this._inputElement=this.getEffectiveChildren()[0],this.inputElement&&this.inputElement.value&&(this.bindValue=this.inputElement.value),this.fire("iron-input-ready")},get _patternRegExp(){var e;if(this.allowedPattern)e=new RegExp(this.allowedPattern);else switch(this.inputElement.type){case"number":e=/[0-9.,e-]/}return e},_bindValueChanged:function(e,t){t&&(void 0===e?t.value=null:e!==t.value&&(this.inputElement.value=e),this.autoValidate&&this.validate(),this.fire("bind-value-changed",{value:e}))},_onInput:function(){this.allowedPattern&&!this._patternAlreadyChecked&&(this._checkPatternValidity()||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.inputElement.value=this._previousValidInput)),this.bindValue=this._previousValidInput=this.inputElement.value,this._patternAlreadyChecked=!1},_isPrintable:function(e){var t=8==e.keyCode||9==e.keyCode||13==e.keyCode||27==e.keyCode,n=19==e.keyCode||20==e.keyCode||45==e.keyCode||46==e.keyCode||144==e.keyCode||145==e.keyCode||e.keyCode>32&&e.keyCode<41||e.keyCode>111&&e.keyCode<124;return!(t||0==e.charCode&&n)},_onKeypress:function(e){if(this.allowedPattern||"number"===this.inputElement.type){var t=this._patternRegExp;if(t&&!(e.metaKey||e.ctrlKey||e.altKey)){this._patternAlreadyChecked=!0;var n=String.fromCharCode(e.charCode);this._isPrintable(e)&&!t.test(n)&&(e.preventDefault(),this._announceInvalidCharacter("Invalid character "+n+" not entered."))}}},_checkPatternValidity:function(){var e=this._patternRegExp;if(!e)return!0;for(var t=0;t\n :host {\n display: inline-block;\n float: right;\n\n @apply --paper-font-caption;\n @apply --paper-input-char-counter;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host(:dir(rtl)) {\n float: left;\n }\n \n\n [[_charCounterStr]]\n"],{raw:{value:Object.freeze(["\n \n\n [[_charCounterStr]]\n"])}}));to({_template:l(Na),is:"paper-input-char-counter",behaviors:[za],properties:{_charCounterStr:{type:String,value:"0"}},update:function(e){if(e.inputElement){e.value=e.value||"";var t=e.value.toString().length.toString();e.inputElement.hasAttribute("maxlength")&&(t+="/"+e.inputElement.getAttribute("maxlength")),this._charCounterStr=t}}});var Da=Object.freeze(Object.defineProperties(['\n \n\n \n\n
    \n \n\n
    \n \n \n
    \n\n \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n \n
    \n'],{raw:{value:Object.freeze(['\n \n\n \n\n
    \n \n\n
    \n \n \n
    \n\n \n
    \n\n
    \n
    \n
    \n
    \n\n
    \n \n
    \n'])}})),Fa=document.createElement("template");Fa.setAttribute("style","display: none;"),Fa.innerHTML='\n \n',document.head.appendChild(Fa.content),to({_template:l(Da),is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return X(this.attrForValue)},get _inputElement(){return Vi(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this.__isFirstValueUpdate=!0,this._addons||(this._addons=[]),this.addEventListener("focus",this._boundOnFocus,!0),this.addEventListener("blur",this._boundOnBlur,!0)},attached:function(){this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput),this._inputElementValue&&""!=this._inputElementValue?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)},_onAddonAttached:function(e){this._addons||(this._addons=[]);var t=e.target;-1===this._addons.indexOf(t)&&(this._addons.push(t),this.isAttached&&this._handleValue(this._inputElement))},_onFocus:function(){this._setFocused(!0)},_onBlur:function(){this._setFocused(!1),this._handleValueAndAutoValidate(this._inputElement)},_onInput:function(e){this._handleValueAndAutoValidate(e.target)},_onValueChanged:function(e){var t=e.target;this.__isFirstValueUpdate&&(this.__isFirstValueUpdate=!1,void 0===t.value)||this._handleValueAndAutoValidate(e.target)},_handleValue:function(e){var t=this._inputElementValue;t||0===t||"number"===e.type&&!e.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1,this.updateAddons({inputElement:e,value:t,invalid:this.invalid})},_handleValueAndAutoValidate:function(e){var t;this.autoValidate&&e&&(t=e.validate?e.validate(this._inputElementValue):e.checkValidity(),this.invalid=!t),this._handleValue(e)},_onIronInputValidate:function(e){this.invalid=this._inputElement.invalid},_invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})},updateAddons:function(e){for(var t,n=0;t=this._addons[n];n++)t.update(e)},_computeInputContentClass:function(e,t,n,i,o){var r="input-content";if(e)o&&(r+=" label-is-hidden"),i&&(r+=" is-invalid");else{var a=this.querySelector("label");t||o?(r+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",i?r+=" is-invalid":n&&(r+=" label-is-highlighted")):(a&&(this.$.labelAndInputContainer.style.position="relative"),i&&(r+=" is-invalid"))}return n&&(r+=" focused"),r},_computeUnderlineClass:function(e,t){var n="underline";return t?n+=" is-invalid":e&&(n+=" is-highlighted"),n},_computeAddOnContentClass:function(e,t){var n="add-on-content";return t?n+=" is-invalid":e&&(n+=" is-highlighted"),n}});var Ma=Object.freeze(Object.defineProperties(["\n \n\n \n"],{raw:{value:Object.freeze(["\n \n\n \n"])}}));to({_template:l(Ma),is:"paper-input-error",behaviors:[za],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(e){this._setInvalid(e.invalid)}});var Ba=document.createElement("template");Ba.setAttribute("style","display: none;"),Ba.innerHTML='\n \n\n \x3c!-- This is a fresh new hell to make this element hybrid. Basically, in 2.0\n we lost is=, so the example same template can\'t be used with iron-input 1.0 and 2.0.\n Expect some conditional code (especially in the tests).\n --\x3e\n \n\n \n\n',document.head.appendChild(Ba.content),to({is:"paper-input",behaviors:[La,Sa],properties:{value:{type:String}},beforeRegister:function(){var e="function"==typeof document.createElement("iron-input")._initSlottedInput?"v1":"v0",t=D.import("paper-input","template"),n=D.import("paper-input","template#"+e),i=t.content.querySelector("#template-placeholder");i&&i.parentNode.replaceChild(n.content,i)},get _focusableElement(){return mt?this.inputElement._inputElement:this.inputElement},listeners:{"iron-input-ready":"_onIronInputReady"},_onIronInputReady:function(){this.$.nativeInput||(this.$.nativeInput=this.$$("input")),this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.$.nativeInput.type)&&(this.alwaysFloatLabel=!0),this.inputElement.bindValue&&this.$.container._handleValueAndAutoValidate(this.inputElement)}});var Ha=Object.freeze(Object.defineProperties(['\n \n\n
    \n \n
    \n'],{raw:{value:Object.freeze(['\n \n\n
    \n \n
    \n'])}}));to({_template:l(Ha),is:"iron-dropdown",behaviors:[yr,mr,sa,ua],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1,observer:"_allowOutsideScrollChanged"}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"],get containedElement(){for(var e=Vi(this.$.content).getDistributedNodes(),t=0,n=e.length;t\n :host {\n display: inline-block;\n position: relative;\n padding: 8px;\n outline: none;\n\n @apply --paper-menu-button;\n }\n\n :host([disabled]) {\n cursor: auto;\n color: var(--disabled-text-color);\n\n @apply --paper-menu-button-disabled;\n }\n\n iron-dropdown {\n @apply --paper-menu-button-dropdown;\n }\n\n .dropdown-content {\n @apply --shadow-elevation-2dp;\n\n position: relative;\n border-radius: 2px;\n background-color: var(--paper-menu-button-dropdown-background, var(--primary-background-color));\n\n @apply --paper-menu-button-content;\n }\n\n :host([vertical-align="top"]) .dropdown-content {\n margin-bottom: 20px;\n margin-top: -10px;\n top: 10px;\n }\n\n :host([vertical-align="bottom"]) .dropdown-content {\n bottom: 10px;\n margin-bottom: -10px;\n margin-top: 20px;\n }\n\n #trigger {\n cursor: pointer;\n }\n \n\n
    \n \n
    \n\n \n \n \n'],{raw:{value:Object.freeze(['\n \n\n
    \n \n
    \n\n \n \n \n'])}})),Ua={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400},Va=to({_template:l($a),is:"paper-menu-button",behaviors:[mr,yr],properties:{opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},noOverlap:{type:Boolean},noAnimations:{type:Boolean,value:!1},ignoreSelect:{type:Boolean,value:!1},closeOnActivate:{type:Boolean,value:!1},openAnimationConfig:{type:Object,value:function(){return[{name:"fade-in-animation",timing:{delay:100,duration:200}},{name:"paper-menu-grow-width-animation",timing:{delay:100,duration:150,easing:Ua.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-grow-height-animation",timing:{delay:100,duration:275,easing:Ua.ANIMATION_CUBIC_BEZIER}}]}},closeAnimationConfig:{type:Object,value:function(){return[{name:"fade-out-animation",timing:{duration:150}},{name:"paper-menu-shrink-width-animation",timing:{delay:100,duration:50,easing:Ua.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-shrink-height-animation",timing:{duration:200,easing:"ease-in"}}]}},allowOutsideScroll:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!0},_dropdownContent:{type:Object}},hostAttributes:{role:"group","aria-haspopup":"true"},listeners:{"iron-activate":"_onIronActivate","iron-select":"_onIronSelect"},get contentElement(){for(var e=Vi(this.$.content).getDistributedNodes(),t=0,n=e.length;t-1&&e.preventDefault()}});Object.keys(Ua).forEach(function(e){Va[e]=Ua[e]}),to({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new tr({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map(function(e){return this.name+":"+e},this)},applyIcon:function(e,t){this.removeIcon(e);var n=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(n){var i=Vi(e.root||e);return i.insertBefore(n,i.childNodes[0]),e._svgIcon=n}return null},removeIcon:function(e){e._svgIcon&&(Vi(e.root||e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var t=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===t.getAttribute("dir")}else e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&"rtl"===window.getComputedStyle(e).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async(function(){this.fire("iron-iconset-added",this,{node:window})})},_createIconMap:function(){var e=Object.create(null);return Vi(this).querySelectorAll("[id]").forEach(function(t){e[t.id]=t}),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,n){if(e){var i=e.cloneNode(!0),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=i.getAttribute("viewBox")||"0 0 "+t+" "+t,a="pointer-events: none; display: block; width: 100%; height: 100%;";return n&&i.hasAttribute("mirror-in-rtl")&&(a+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),o.setAttribute("viewBox",r),o.setAttribute("preserveAspectRatio","xMidYMid meet"),o.setAttribute("focusable","false"),o.style.cssText=a,o.appendChild(i).removeAttribute("id"),o}return null}});var Ka=document.createElement("template");Ka.setAttribute("style","display: none;"),Ka.innerHTML='\n\n\n\n',document.head.appendChild(Ka.content);var Wa=document.createElement("template");Wa.setAttribute("style","display: none;"),Wa.innerHTML='\n \n',document.head.appendChild(Wa.content);var Ya=Object.freeze(Object.defineProperties(['\n \n\n \x3c!-- this div fulfills an a11y requirement for combobox, do not remove --\x3e\n \n \n \x3c!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via --\x3e\n \n \n \n'],{raw:{value:Object.freeze(['\n \n\n \x3c!-- this div fulfills an a11y requirement for combobox, do not remove --\x3e\n \n \n \x3c!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via --\x3e\n \n \n \n'])}}));to({_template:l(Ya),is:"paper-dropdown-menu",behaviors:[br,yr,Sa,Ea],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0},label:{type:String},placeholder:{type:String},errorMessage:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,dynamicAlign:{type:Boolean},restoreFocusOnClose:{type:Boolean,value:!0}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},hostAttributes:{role:"combobox","aria-autocomplete":"none","aria-haspopup":"true"},observers:["_selectedItemChanged(selectedItem)"],attached:function(){var e=this.contentElement;e&&e.selectedItem&&this._setSelectedItem(e.selectedItem)},get contentElement(){for(var e=Vi(this.$.content).getDistributedNodes(),t=0,n=e.length;t\n \n",document.head.appendChild(Xa.content);var Ga=Object.freeze(Object.defineProperties(['\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}}));to({_template:l(Ga),is:"paper-item",behaviors:[Za]});var Ja=function(e){this.selection=[],this.selectCallback=e};Ja.prototype={get:function(){return this.multi?this.selection.slice():this.selection[0]},clear:function(e){this.selection.slice().forEach(function(t){(!e||e.indexOf(t)<0)&&this.setItemSelected(t,!1)},this)},isSelected:function(e){return this.selection.indexOf(e)>=0},setItemSelected:function(e,t){if(null!=e&&t!==this.isSelected(e)){if(t)this.selection.push(e);else{var n=this.selection.indexOf(e);n>=0&&this.selection.splice(n,1)}this.selectCallback&&this.selectCallback(e,t)}},select:function(e){this.multi?this.toggle(e):this.get()!==e&&(this.setItemSelected(this.get(),!1),this.setItemSelected(e,!0))},toggle:function(e){this.setItemSelected(e,!this.isSelected(e))}};var Qa={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},fallbackSelection:{type:String,value:null},items:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}},_excludedLocalNames:{type:Object,value:function(){return{template:1,"dom-bind":1,"dom-if":1,"dom-repeat":1}}}},observers:["_updateAttrForSelected(attrForSelected)","_updateSelected(selected)","_checkFallback(fallbackSelection)"],created:function(){this._bindFilterItem=this._filterItem.bind(this),this._selection=new Ja(this._applySelection.bind(this))},attached:function(){this._observer=this._observeItems(this),this._addListener(this.activateEvent)},detached:function(){this._observer&&Vi(this).unobserveNodes(this._observer),this._removeListener(this.activateEvent)},indexOf:function(e){return this.items?this.items.indexOf(e):-1},select:function(e){this.selected=e},selectPrevious:function(){var e=this.items.length,t=(Number(this._valueToIndex(this.selected))-1+e)%e;this.selected=this._indexToValue(t)},selectNext:function(){var e=(Number(this._valueToIndex(this.selected))+1)%this.items.length;this.selected=this._indexToValue(e)},selectIndex:function(e){this.select(this._indexToValue(e))},forceSynchronousItemUpdate:function(){this._observer&&"function"==typeof this._observer.flush?this._observer.flush():this._updateItems()},get _shouldUpdateSelection(){return null!=this.selected},_checkFallback:function(){this._updateSelected()},_addListener:function(e){this.listen(this,e,"_activateHandler")},_removeListener:function(e){this.unlisten(this,e,"_activateHandler")},_activateEventChanged:function(e,t){this._removeListener(t),this._addListener(e)},_updateItems:function(){var e=Vi(this).queryDistributedElements(this.selectable||"*");e=Array.prototype.filter.call(e,this._bindFilterItem),this._setItems(e)},_updateAttrForSelected:function(){this.selectedItem&&(this.selected=this._valueForItem(this.selectedItem))},_updateSelected:function(){this._selectSelected(this.selected)},_selectSelected:function(e){if(this.items){var t=this._valueToItem(this.selected);t?this._selection.select(t):this._selection.clear(),this.fallbackSelection&&this.items.length&&void 0===this._selection.get()&&(this.selected=this.fallbackSelection)}},_filterItem:function(e){return!this._excludedLocalNames[e.localName]},_valueToItem:function(e){return null==e?null:this.items[this._valueToIndex(e)]},_valueToIndex:function(e){if(!this.attrForSelected)return Number(e);for(var t,n=0;t=this.items[n];n++)if(this._valueForItem(t)==e)return n},_indexToValue:function(e){if(!this.attrForSelected)return e;var t=this.items[e];return t?this._valueForItem(t):void 0},_valueForItem:function(e){if(!e)return null;if(!this.attrForSelected){var t=this.indexOf(e);return-1===t?null:t}var n=e[X(this.attrForSelected)];return void 0!=n?n:e.getAttribute(this.attrForSelected)},_applySelection:function(e,t){this.selectedClass&&this.toggleClass(this.selectedClass,t,e),this.selectedAttribute&&this.toggleAttribute(this.selectedAttribute,t,e),this._selectionChange(),this.fire("iron-"+(t?"select":"deselect"),{item:e})},_selectionChange:function(){this._setSelectedItem(this._selection.get())},_observeItems:function(e){return Vi(e).observeNodes(function(e){this._updateItems(),this._updateSelected(),this.fire("iron-items-changed",e,{bubbles:!1,cancelable:!1})})},_activateHandler:function(e){for(var t=e.target,n=this.items;t&&t!=this;){var i=n.indexOf(t);if(i>=0){var o=this._indexToValue(i);return void this._itemActivate(o,t)}t=t.parentNode}},_itemActivate:function(e,t){this.fire("iron-activate",{selected:e,item:t},{cancelable:!0}).defaultPrevented||this.select(e)}},es={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}},selectedItems:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}}},observers:["_updateSelected(selectedValues.splices)"],select:function(e){this.multi?this._toggleSelected(e):this.selected=e},multiChanged:function(e){this._selection.multi=e,this._updateSelected()},get _shouldUpdateSelection(){return null!=this.selected||null!=this.selectedValues&&this.selectedValues.length},_updateAttrForSelected:function(){this.multi?this.selectedItems&&this.selectedItems.length>0&&(this.selectedValues=this.selectedItems.map(function(e){return this._indexToValue(this.indexOf(e))},this).filter(function(e){return null!=e},this)):Qa._updateAttrForSelected.apply(this)},_updateSelected:function(){this.multi?this._selectMulti(this.selectedValues):this._selectSelected(this.selected)},_selectMulti:function(e){e=e||[];var t=(this._valuesToItems(e)||[]).filter(function(e){return null!==e&&void 0!==e});this._selection.clear(t);for(var n=0;n\n :host {\n display: block;\n padding: 8px 0;\n\n background: var(--paper-listbox-background-color, var(--primary-background-color));\n color: var(--paper-listbox-color, var(--primary-text-color));\n\n @apply --paper-listbox;\n }\n \n\n \n"],{raw:{value:Object.freeze(["\n \n\n \n"])}}));to({_template:l(is),is:"paper-listbox",behaviors:[ns],hostAttributes:{role:"listbox"}});var os=function(){function e(e,t){for(var n=0;n\n :host,\n paper-card,\n paper-dropdown-menu {\n display: block;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n paper-item {\n width: 450px;\n }\n .card-actions {\n text-align: right;\n }\n \n \n
    \n \n\n \n \n \n \n \n \n \n \n \n \n
    \n
    \n Save\n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n \n
    \n \n\n \n \n \n \n \n \n \n \n \n \n
    \n
    \n Save\n
    \n
    \n'])}})),as=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),os(t,[{key:"addonChanged",value:function(e){var t=this;if(this.setProperties({selectedInput:e.audio_input||"null",selectedOutput:e.audio_output||"null"}),!this.outputDevices){var n=[{device:"null",name:"-"}];this.hass.callApi("get","hassio/hardware/audio").then(function(e){var i=e.data.audio,o=Object.keys(i.input).map(function(e){return{device:e,name:i.input[e]}}),r=Object.keys(i.output).map(function(e){return{device:e,name:i.output[e]}});t.setProperties({inputDevices:n.concat(o),outputDevices:n.concat(r)})},function(){t.setProperties({inputDevices:n,outputDevices:n})})}}},{key:"_saveSettings",value:function(){var e=this;this.error=null;var t="hassio/addons/"+this.addon.slug+"/options";this.hass.callApi("post",t,{audio_input:"null"===this.selectedInput?null:this.selectedInput,audio_output:"null"===this.selectedOutput?null:this.selectedOutput}).then(function(){e.fire("hass-api-called",{success:!0,path:t})},function(t){e.error=t.body.message})}}],[{key:"template",get:function(){return l(rs)}},{key:"properties",get:function(){return{hass:Object,addon:{type:Object,observer:"addonChanged"},inputDevices:Array,outputDevices:Array,selectedInput:String,selectedOutput:String,error:String}}}]),t}();customElements.define("hassio-addon-audio",as);var ss=Object.freeze(Object.defineProperties(['\n \n\n \x3c!-- the mirror sizes the input/textarea so it grows with typing --\x3e\n \x3c!-- use   instead   of to allow this element to be used in XHTML --\x3e\n \n\n \x3c!-- size the input/textarea with a div, because the textarea has intrinsic size in ff --\x3e\n
    \n \n
    \n'],{raw:{value:Object.freeze(['\n \n\n \x3c!-- the mirror sizes the input/textarea so it grows with typing --\x3e\n \x3c!-- use   instead   of to allow this element to be used in XHTML --\x3e\n \n\n \x3c!-- size the input/textarea with a div, because the textarea has intrinsic size in ff --\x3e\n
    \n \n
    \n'])}}));to({_template:l(ss),is:"iron-autogrow-textarea",behaviors:[Ea,yr],properties:{value:{observer:"_valueChanged",type:String,notify:!0},bindValue:{observer:"_bindValueChanged",type:String,notify:!0},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean},minlength:{type:Number},maxlength:{type:Number},label:{type:String}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(e){this.$.textarea.selectionStart=e},set selectionEnd(e){this.$.textarea.selectionEnd=e},attached:function(){navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&(this.$.textarea.style.marginLeft="-3px")},validate:function(){var e=this.$.textarea.validity.valid;return e&&(this.required&&""===this.value?e=!1:this.hasValidator()&&(e=Ea.validate.call(this,this.value))),this.invalid=!e,this.fire("iron-input-validate"),e},_bindValueChanged:function(e){this.value=e},_valueChanged:function(e){var t=this.textarea;t&&(t.value!==e&&(t.value=e||0===e?e:""),this.bindValue=e,this.$.mirror.innerHTML=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))},_onInput:function(e){var t=Vi(e).path;this.value=t?t[0].value:e.target.value},_constrain:function(e){var t;for(e=e||[""],t=this.maxRows>0&&e.length>this.maxRows?e.slice(0,this.maxRows):e.slice(0);this.rows>0&&t.length")+" "},_valueForMirror:function(){var e=this.textarea;if(e)return this.tokens=e&&e.value?e.value.replace(/&/gm,"&").replace(/"/gm,""").replace(/'/gm,"'").replace(//gm,">").split("\n"):[""],this._constrain(this.tokens)},_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)}});var ls=function(){function e(e,t){for(var n=0;n\n .container {\n position: relative;\n display: inline-block;\n }\n\n paper-button {\n transition: all 1s;\n }\n\n .success paper-button {\n color: white;\n background-color: var(--google-green-500);\n transition: none;\n }\n\n .error paper-button {\n color: white;\n background-color: var(--google-red-500);\n transition: none;\n }\n\n paper-button[disabled] {\n color: #c8c8c8;\n }\n\n .progress {\n @apply --layout;\n @apply --layout-center-center;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n \n
    \n \n \n \n \n
    \n'],{raw:{value:Object.freeze(['\n \n
    \n \n \n \n \n
    \n'])}})),ps=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),ls(t,[{key:"tempClass",value:function(e){var t=this.$.container.classList;t.add(e),setTimeout(function(){t.remove(e)},1e3)}},{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("click",function(t){return e.buttonTapped(t)})}},{key:"buttonTapped",value:function(e){this.progress&&e.stopPropagation()}},{key:"actionSuccess",value:function(){this.tempClass("success")}},{key:"actionError",value:function(){this.tempClass("error")}},{key:"computeDisabled",value:function(e,t){return e||t}}],[{key:"template",get:function(){return l(cs)}},{key:"properties",get:function(){return{hass:{type:Object},progress:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1}}}}]),t}();customElements.define("ha-progress-button",ps);var us=function(){function e(e,t){for(var n=0;n\n'],{raw:{value:Object.freeze(['\n \n'])}})),hs=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),us(t,[{key:"buttonTapped",value:function(){var e=this;this.progress=!0;var t={method:this.method,path:this.path,data:this.data};this.hass.callApi(this.method,this.path,this.data).then(function(n){e.progress=!1,e.$.progress.actionSuccess(),t.success=!0,t.response=n},function(n){e.progress=!1,e.$.progress.actionError(),t.success=!1,t.response=n}).then(function(){e.fire("hass-api-called",t)})}}],[{key:"template",get:function(){return l(ds)}},{key:"properties",get:function(){return{hass:Object,progress:{type:Boolean,value:!1},path:String,method:{type:String,value:"POST"},data:{type:Object,value:{}},disabled:{type:Boolean,value:!1}}}}]),t}();customElements.define("ha-call-api-button",hs);var fs=function(){function e(e,t){for(var n=0;n\n :host {\n display: block;\n }\n paper-card {\n display: block;\n }\n .card-actions {\n @apply --layout;\n @apply --layout-justified;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n iron-autogrow-textarea {\n width: 100%;\n font-family: monospace;\n }\n .syntaxerror {\n color: var(--google-red-500);\n }\n \n \n
    \n \n \n
    \n
    \n Reset to defaults\n Save\n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n \n
    \n \n \n
    \n
    \n Reset to defaults\n Save\n
    \n
    \n'])}})),ys=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),fs(t,[{key:"addonChanged",value:function(e){this.config=e?JSON.stringify(e.options,null,2):""}},{key:"configChanged",value:function(e){try{this.$.config.classList.remove("syntaxerror"),this.configParsed=JSON.parse(e)}catch(e){this.$.config.classList.add("syntaxerror"),this.configParsed=null}}},{key:"saveTapped",value:function(){var e=this;this.error=null,this.hass.callApi("post","hassio/addons/"+this.addonSlug+"/options",{options:this.configParsed}).catch(function(t){e.error=t.body.message})}}],[{key:"template",get:function(){return l(ms)}},{key:"properties",get:function(){return{hass:Object,addon:{type:Object,observer:"addonChanged"},addonSlug:String,config:{type:String,observer:"configChanged"},configParsed:Object,error:String,resetData:{type:Object,value:{options:null}}}}}]),t}();customElements.define("hassio-addon-config",ys);var vs={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(e){return this.disabled||!this.required||this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){void 0!==this.value&&null!==this.value||(this.value="on")}},bs=[Cr,[Sa,Ea,vs],{_checkedChanged:function(){vs._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){xr._buttonStateChanged.call(this),this.disabled||this.isAttached&&(this.checked=this.active)}}],gs=document.createElement("template");gs.setAttribute("style","display: none;"),gs.innerHTML='\n \n\n \n',document.head.appendChild(gs.content),to({is:"paper-toggle-button",behaviors:[bs],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},attached:function(){xi(this,function(){Xn(this,"pan-y")})},_ontrack:function(e){var t=e.detail;"start"===t.state?this._trackStart(t):"track"===t.state?this._trackMove(t):"end"===t.state&&this._trackEnd(t)},_trackStart:function(e){this._width=this.$.toggleBar.offsetWidth/2,this._trackChecked=this.checked,this.$.toggleButton.classList.add("dragging")},_trackMove:function(e){var t=e.dx;this._x=Math.min(this._width,Math.max(0,this._trackChecked?this._width+t:t)),this.translate3d(this._x+"px",0,0,this.$.toggleButton),this._userActivate(this._x>this._width/2)},_trackEnd:function(e){this.$.toggleButton.classList.remove("dragging"),this.transform("",this.$.toggleButton)},_createRipple:function(){this._rippleContainer=this.$.toggleButton;var e=xr._createRipple();return e.id="ink",e.setAttribute("recenters",""),e.classList.add("circle","toggle-ink"),e}});var _s=[60,"second",60,"minute",24,"hour",7,"day"];to({is:"iron-request",hostAttributes:{hidden:!0},properties:{xhr:{type:Object,notify:!0,readOnly:!0,value:function(){return new XMLHttpRequest}},response:{type:Object,notify:!0,readOnly:!0,value:function(){return null}},status:{type:Number,notify:!0,readOnly:!0,value:0},statusText:{type:String,notify:!0,readOnly:!0,value:""},completes:{type:Object,readOnly:!0,notify:!0,value:function(){return new Promise(function(e,t){this.resolveCompletes=e,this.rejectCompletes=t}.bind(this))}},progress:{type:Object,notify:!0,readOnly:!0,value:function(){return{}}},aborted:{type:Boolean,notify:!0,readOnly:!0,value:!1},errored:{type:Boolean,notify:!0,readOnly:!0,value:!1},timedOut:{type:Boolean,notify:!0,readOnly:!0,value:!1}},get succeeded(){if(this.errored||this.aborted||this.timedOut)return!1;var e=this.xhr.status||0;return 0===e||e>=200&&e<300},send:function(e){var t=this.xhr;if(t.readyState>0)return null;t.addEventListener("progress",function(e){this._setProgress({lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total}),this.fire("iron-request-progress-changed",{value:this.progress})}.bind(this)),t.addEventListener("error",function(t){this._setErrored(!0),this._updateStatus();var n=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(n)}.bind(this)),t.addEventListener("timeout",function(t){this._setTimedOut(!0),this._updateStatus();var n=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(n)}.bind(this)),t.addEventListener("abort",function(){this._setAborted(!0),this._updateStatus();var t=new Error("Request aborted."),n=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(n)}.bind(this)),t.addEventListener("loadend",function(){if(this._updateStatus(),this._setResponse(this.parseResponse()),this.succeeded)this.resolveCompletes(this);else{var t=new Error("The request failed with status code: "+this.xhr.status),n=e.rejectWithRequest?{error:t,request:this}:t;this.rejectCompletes(n)}}.bind(this)),this.url=e.url;var n=!1!==e.async;t.open(e.method||"GET",e.url,n);var i={json:"application/json",text:"text/plain",html:"text/html",xml:"application/xml",arraybuffer:"application/octet-stream"}[e.handleAs],o=e.headers||Object.create(null),r=Object.create(null);for(var a in o)r[a.toLowerCase()]=o[a];if(o=r,i&&!o.accept&&(o.accept=i),Object.keys(o).forEach(function(e){/[A-Z]/.test(e)&&Vo._error("Headers must be lower case, got",e),t.setRequestHeader(e,o[e])},this),n){t.timeout=e.timeout;var s=e.handleAs;!e.jsonPrefix&&s||(s="text"),t.responseType=t._responseType=s,e.jsonPrefix&&(t._jsonPrefix=e.jsonPrefix)}t.withCredentials=!!e.withCredentials;var l=this._encodeBodyObject(e.body,o["content-type"]);return t.send(l),this.completes},parseResponse:function(){var e=this.xhr,t=e.responseType||e._responseType,n=!this.xhr.responseType,i=e._jsonPrefix&&e._jsonPrefix.length||0;try{switch(t){case"json":if(n||void 0===e.response)try{return JSON.parse(e.responseText)}catch(t){return console.warn("Failed to parse JSON sent from "+e.responseURL),null}return e.response;case"xml":return e.responseXML;case"blob":case"document":case"arraybuffer":return e.response;case"text":default:if(i)try{return JSON.parse(e.responseText.substring(i))}catch(t){return console.warn("Failed to parse JSON sent from "+e.responseURL),null}return e.responseText}}catch(e){this.rejectCompletes(new Error("Could not parse response. "+e.message))}},abort:function(){this._setAborted(!0),this.xhr.abort()},_encodeBodyObject:function(e,t){if("string"==typeof e)return e;var n=e;switch(t){case"application/json":return JSON.stringify(n);case"application/x-www-form-urlencoded":return this._wwwFormUrlEncode(n)}return e},_wwwFormUrlEncode:function(e){if(!e)return"";var t=[];return Object.keys(e).forEach(function(n){t.push(this._wwwFormUrlEncodePiece(n)+"="+this._wwwFormUrlEncodePiece(e[n]))},this),t.join("&")},_wwwFormUrlEncodePiece:function(e){return null!==e&&void 0!==e&&e.toString?encodeURIComponent(e.toString().replace(/\r?\n/g,"\r\n")).replace(/%20/g,"+"):""},_updateStatus:function(){this._setStatus(this.xhr.status),this._setStatusText(void 0===this.xhr.statusText?"":this.xhr.statusText)}});var ws="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};to({is:"iron-ajax",hostAttributes:{hidden:!0},properties:{url:{type:String},params:{type:Object,value:function(){return{}}},method:{type:String,value:"GET"},headers:{type:Object,value:function(){return{}}},contentType:{type:String,value:null},body:{type:Object,value:null},sync:{type:Boolean,value:!1},handleAs:{type:String,value:"json"},withCredentials:{type:Boolean,value:!1},timeout:{type:Number,value:0},auto:{type:Boolean,value:!1},verbose:{type:Boolean,value:!1},lastRequest:{type:Object,notify:!0,readOnly:!0},lastProgress:{type:Object,notify:!0,readOnly:!0},loading:{type:Boolean,notify:!0,readOnly:!0},lastResponse:{type:Object,notify:!0,readOnly:!0},lastError:{type:Object,notify:!0,readOnly:!0},activeRequests:{type:Array,notify:!0,readOnly:!0,value:function(){return[]}},debounceDuration:{type:Number,value:0,notify:!0},jsonPrefix:{type:String,value:""},bubbles:{type:Boolean,value:!1},rejectWithRequest:{type:Boolean,value:!1},_boundHandleResponse:{type:Function,value:function(){return this._handleResponse.bind(this)}}},observers:["_requestOptionsChanged(url, method, params.*, headers, contentType, body, sync, handleAs, jsonPrefix, withCredentials, timeout, auto)"],created:function(){this._boundOnProgressChanged=this._onProgressChanged.bind(this)},get queryString(){var e,t,n=[];for(e in this.params)if(t=this.params[e],e=window.encodeURIComponent(e),Array.isArray(t))for(var i=0;i=0?"&":"?")+e:t},get requestHeaders(){var e,t={},n=this.contentType;if(null==n&&"string"==typeof this.body&&(n="application/x-www-form-urlencoded"),n&&(t["content-type"]=n),"object"===ws(this.headers))for(e in this.headers)t[e]=this.headers[e].toString();return t},_onProgressChanged:function(e){this._setLastProgress(e.detail.value)},toRequestOptions:function(){return{url:this.requestUrl||"",method:this.method,headers:this.requestHeaders,body:this.body,async:!this.sync,handleAs:this.handleAs,jsonPrefix:this.jsonPrefix,withCredentials:this.withCredentials,timeout:this.timeout,rejectWithRequest:this.rejectWithRequest}},generateRequest:function(){var e=document.createElement("iron-request"),t=this.toRequestOptions();return this.push("activeRequests",e),e.completes.then(this._boundHandleResponse).catch(this._handleError.bind(this,e)).then(this._discardRequest.bind(this,e)),this.fire("iron-ajax-presend",{request:e,options:t},{bubbles:this.bubbles,cancelable:!0}).defaultPrevented?(e.abort(),e.rejectCompletes(e),e):(this.lastRequest&&this.lastRequest.removeEventListener("iron-request-progress-changed",this._boundOnProgressChanged),e.addEventListener("iron-request-progress-changed",this._boundOnProgressChanged),e.send(t),this._setLastProgress(null),this._setLastRequest(e),this._setLoading(!0),this.fire("request",{request:e,options:t},{bubbles:this.bubbles,composed:!0}),this.fire("iron-ajax-request",{request:e,options:t},{bubbles:this.bubbles,composed:!0}),e)},_handleResponse:function(e){e===this.lastRequest&&(this._setLastResponse(e.response),this._setLastError(null),this._setLoading(!1)),this.fire("response",e,{bubbles:this.bubbles,composed:!0}),this.fire("iron-ajax-response",e,{bubbles:this.bubbles,composed:!0})},_handleError:function(e,t){this.verbose&&Vo._error(t),e===this.lastRequest&&(this._setLastError({request:e,error:t,status:e.xhr.status,statusText:e.xhr.statusText,response:e.xhr.response}),this._setLastResponse(null),this._setLoading(!1)),this.fire("iron-ajax-error",{request:e,error:t},{bubbles:this.bubbles,composed:!0}),this.fire("error",{request:e,error:t},{bubbles:this.bubbles,composed:!0})},_discardRequest:function(e){var t=this.activeRequests.indexOf(e);t>-1&&this.splice("activeRequests",t,1)},_requestOptionsChanged:function(){this.debounce("generate-request",function(){null!=this.url&&this.auto&&this.generateRequest()},this.debounceDuration)}});var ks=Object.prototype.hasOwnProperty;function xs(e){var t,n,i,o,r=Array.prototype.slice.call(arguments,1);for(t=0,n=r.length;t=0?"past":"future";t=Math.abs(t);for(var i=0;i<_s.length;i+=2){if(t<_s[i])return{tense:n,value:t=Math.floor(t),unit:_s[i+1]};t/=_s[i]}return{tense:n,value:t=Math.floor(t),unit:"week"}}(this.parsedDateTime),n=this.localize("ui.duration."+t.unit,"count",t.value),i=this.localize("ui.components.relative_time."+t.tense,"time",n);e.innerHTML=i}else e.innerHTML=this.localize("ui.components.relative_time.never")}}]),t}();customElements.define("ha-relative-time",Us);var Vs=function(){function e(e,t){for(var n=0;n\n iron-icon {\n margin-right: 16px;\n margin-top: 16px;\n float: left;\n color: var(--secondary-text-color);\n }\n iron-icon.update {\n color: var(--paper-orange-400);\n }\n iron-icon.running,\n iron-icon.installed {\n color: var(--paper-green-400);\n }\n iron-icon.hassupdate,\n iron-icon.snapshot {\n color: var(--paper-item-icon-color);\n }\n .title {\n color: var(--primary-text-color);\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n .addition {\n color: var(--secondary-text-color);\n overflow: hidden;\n position: relative;\n height: 2.4em;\n line-height: 1.2em;\n }\n ha-relative-time {\n display: block;\n }\n \n \n
    \n
    [[title]]
    \n
    \n \n \n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n \n
    \n
    [[title]]
    \n
    \n \n \n
    \n
    \n'])}})),Ws=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),Vs(t,null,[{key:"template",get:function(){return l(Ks)}},{key:"properties",get:function(){return{hass:Object,title:String,description:String,datetime:String,icon:{type:String,value:"hass:help-circle"},iconTitle:String,iconClass:String}}}]),t}();customElements.define("hassio-card-content",Ws);var Ys=function(){function e(e,t){for(var n=0;n\n :host {\n display: block;\n }\n paper-card {\n display: block;\n margin-bottom: 16px;\n }\n .addon-header {\n @apply --paper-font-headline;\n }\n .light-color {\n color: var(--secondary-text-color);\n }\n .addon-version {\n float: right;\n font-size: 15px;\n vertical-align: middle;\n }\n .description {\n margin-bottom: 16px;\n }\n .logo img {\n max-height: 60px;\n margin: 16px 0;\n display: block;\n }\n .state div{\n width: 150px;\n display: inline-block;\n }\n paper-toggle-button {\n display: inline;\n }\n iron-icon.running {\n color: var(--paper-green-400);\n }\n iron-icon.stopped {\n color: var(--google-red-300);\n }\n ha-call-api-button {\n font-weight: 500;\n color: var(--primary-color);\n }\n .right {\n float: right;\n }\n ha-markdown img {\n max-width: 100%;\n }\n \n \n\n \n
    \n
    [[addon.name]]\n
    \n \n \n
    \n
    \n
    \n [[addon.description]].
    \n Visit [[addon.name]] page for details.\n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n'],{raw:{value:Object.freeze(['\n \n \n\n \n
    \n
    [[addon.name]]\n
    \n \n \n
    \n
    \n
    \n [[addon.description]].
    \n Visit [[addon.name]] page for details.\n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n'])}})),Xs=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),Ys(t,[{key:"computeIsRunning",value:function(e){return e&&"started"===e.state}},{key:"computeUpdateAvailable",value:function(e){return e&&!e.detached&&e.version&&e.version!==e.last_version}},{key:"pathWebui",value:function(e){return e&&e.replace("[HOST]",document.location.hostname)}},{key:"computeShowWebUI",value:function(e,t){return e&&t}},{key:"computeStartOnBoot",value:function(e){return"auto"===e}},{key:"startOnBootToggled",value:function(){var e={boot:"auto"===this.addon.boot?"manual":"auto"};this.hass.callApi("POST","hassio/addons/"+this.addonSlug+"/options",e)}},{key:"autoUpdateToggled",value:function(){var e={auto_update:!this.addon.auto_update};this.hass.callApi("POST","hassio/addons/"+this.addonSlug+"/options",e)}},{key:"openChangelog",value:function(){var e=this;this.hass.callApi("get","hassio/addons/"+this.addonSlug+"/changelog").then(function(e){return e},function(){return"Error getting changelog"}).then(function(t){e.fire("hassio-markdown-dialog",{title:"Changelog",content:t})})}},{key:"_unistallClicked",value:function(){var e=this;if(confirm("Are you sure you want to uninstall this add-on?")){var t="hassio/addons/"+this.addonSlug+"/uninstall",n={path:t};this.hass.callApi("post",t).then(function(e){n.success=!0,n.response=e},function(e){n.success=!1,n.response=e}).then(function(){e.fire("hass-api-called",n)})}}}],[{key:"template",get:function(){return l(Zs)}},{key:"properties",get:function(){return{hass:Object,addon:Object,addonSlug:String,isRunning:{type:Boolean,computed:"computeIsRunning(addon)"}}}}]),t}();customElements.define("hassio-addon-info",Xs);var Gs=function(){function e(e,t){for(var n=0;n\n :host,\n paper-card {\n display: block;\n }\n \n \n
    \n
    [[log]]
    \n
    \n
    \n Refresh\n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n \n
    \n
    [[log]]
    \n
    \n
    \n Refresh\n
    \n
    \n'])}})),Qs=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),Gs(t,[{key:"addonSlugChanged",value:function(e){var t=this;this.hass?this.refresh():setTimeout(function(){t.addonChanged(e)},0)}},{key:"refresh",value:function(){var e=this;this.hass.callApi("get","hassio/addons/"+this.addonSlug+"/logs").then(function(t){e.log=t})}}],[{key:"template",get:function(){return l(Js)}},{key:"properties",get:function(){return{hass:Object,addonSlug:{type:String,observer:"addonSlugChanged"},log:String}}}]),t}();customElements.define("hassio-addon-logs",Qs);var el=function(){function e(e,t){for(var n=0;n\n :host {\n display: block;\n }\n paper-card {\n display: block;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n .card-actions {\n @apply --layout;\n @apply --layout-justified;\n }\n \n \n
    \n \n\n \n \n \n \n \n \n
    ContainerHost
    \n
    \n
    \n Reset to defaults\n Save\n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n \n
    \n \n\n \n \n \n \n \n \n
    ContainerHost
    \n
    \n
    \n Reset to defaults\n Save\n
    \n
    \n'])}})),nl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),el(t,[{key:"addonChanged",value:function(e){if(e){var t=e.network||{},n=Object.keys(t).map(function(e){return{container:e,host:t[e]}});this.config=n.sort(function(e,t){return e.host-t.host})}}},{key:"saveTapped",value:function(){var e=this;this.error=null;var t={};this.config.forEach(function(e){t[e.container]=parseInt(e.host)});var n="hassio/addons/"+this.addonSlug+"/options";this.hass.callApi("post",n,{network:t}).then(function(){e.fire("hass-api-called",{success:!0,path:n})},function(t){e.error=t.body.message})}}],[{key:"template",get:function(){return l(tl)}},{key:"properties",get:function(){return{hass:Object,addonSlug:String,config:Object,addon:{type:Object,observer:"addonChanged"},error:String,resetData:{type:Object,value:{network:null}}}}}]),t}();customElements.define("hassio-addon-network",nl);var il=function(){function e(e,t){for(var n=0;n\n :host {\n color: var(--primary-text-color);\n --paper-card-header-color: var(--primary-text-color);\n }\n .content {\n padding: 24px 0 32px;\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config {\n margin-bottom: 24px;\n width: 600px;\n }\n hassio-addon-logs {\n min-width: 600px;\n }\n @media only screen and (max-width: 600px) {\n hassio-addon-info,\n hassio-addon-network,\n hassio-addon-audio,\n hassio-addon-config,\n hassio-addon-logs {\n max-width: 100%;\n }\n }\n \n \n \n \n \n \n \n
    Hass.io: add-on details
    \n
    \n
    \n
    \n \n\n \n
    \n
    \n\n \n'],{raw:{value:Object.freeze(['\n \n \n \n \n \n \n \n
    Hass.io: add-on details
    \n
    \n
    \n
    \n \n\n \n
    \n
    \n\n \n'])}})),rl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),il(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)}),this.addEventListener("hassio-markdown-dialog",function(t){return e.openMarkdown(t)})}},{key:"apiCalled",value:function(e){var t=e.detail.path;t&&("uninstall"===t.substr(t.lastIndexOf("/")+1)?this.backTapped():this.routeDataChanged(this.routeData))}},{key:"routeDataChanged",value:function(e){var t=this;this.routeMatches&&e&&e.slug&&this.hass.callApi("get","hassio/addons/"+e.slug+"/info").then(function(e){t.addon=e.data},function(){t.addon=null})}},{key:"backTapped",value:function(){history.back()}},{key:"openMarkdown",value:function(e){this.setProperties({markdownTitle:e.detail.title,markdownContent:e.detail.content}),this.shadowRoot.querySelector("hassio-markdown-dialog").openDialog()}}],[{key:"template",get:function(){return l(ol)}},{key:"properties",get:function(){return{hass:Object,showMenu:Boolean,narrow:Boolean,route:Object,routeData:{type:Object,observer:"routeDataChanged"},routeMatches:Boolean,addon:Object,markdownTitle:String,markdownContent:{type:String,value:""}}}}]),t}();customElements.define("hassio-addon-view",rl);var al=function(){function e(e,t){for(var n=0;n\n :host {\n @apply --layout-inline;\n @apply --layout-center;\n @apply --layout-center-justified;\n @apply --layout-flex-auto;\n\n position: relative;\n padding: 0 12px;\n overflow: hidden;\n cursor: pointer;\n vertical-align: middle;\n\n @apply --paper-font-common-base;\n @apply --paper-tab;\n }\n\n :host(:focus) {\n outline: none;\n }\n\n :host([link]) {\n padding: 0;\n }\n\n .tab-content {\n height: 100%;\n transform: translateZ(0);\n -webkit-transform: translateZ(0);\n transition: opacity 0.1s cubic-bezier(0.4, 0.0, 1, 1);\n @apply --layout-horizontal;\n @apply --layout-center-center;\n @apply --layout-flex-auto;\n @apply --paper-tab-content;\n }\n\n :host(:not(.iron-selected)) > .tab-content {\n opacity: 0.8;\n\n @apply --paper-tab-content-unselected;\n }\n\n :host(:focus) .tab-content {\n opacity: 1;\n font-weight: 700;\n }\n\n paper-ripple {\n color: var(--paper-tab-ink, var(--paper-yellow-a100));\n }\n\n .tab-content > ::slotted(a) {\n @apply --layout-flex-auto;\n\n height: 100%;\n }\n \n\n
    \n \n
    \n'],{raw:{value:Object.freeze(['\n \n\n
    \n \n
    \n'])}}));to({_template:l(ll),is:"paper-tab",behaviors:[yr,br,xr],properties:{link:{type:Boolean,value:!1,reflectToAttribute:!0}},hostAttributes:{role:"tab"},listeners:{down:"_updateNoink",tap:"_onTap"},attached:function(){this._updateNoink()},get _parentNoink(){var e=Vi(this).parentNode;return!!e&&!!e.noink},_updateNoink:function(){this.noink=!!this.noink||!!this._parentNoink},_onTap:function(e){if(this.link){var t=this.queryEffectiveChildren("a");if(!t)return;if(e.target===t)return;t.click()}}});var cl={hostAttributes:{role:"menubar"},keyBindings:{left:"_onLeftKey",right:"_onRightKey"},_onUpKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},get _isRTL(){return"rtl"===window.getComputedStyle(this).direction},_onLeftKey:function(e){this._isRTL?this._focusNext():this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onRightKey:function(e){this._isRTL?this._focusPrevious():this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down left right esc")||this._focusWithKeyboardEvent(e)}},pl=[ns,cl],ul=document.createElement("template");ul.setAttribute("style","display: none;"),ul.innerHTML='\n\n\n\n\n',document.head.appendChild(ul.content);var dl=Object.freeze(Object.defineProperties(['\n \n\n \n\n
    \n
    \n
    \n \n
    \n
    \n\n \n'],{raw:{value:Object.freeze(['\n \n\n \n\n
    \n
    \n
    \n \n
    \n
    \n\n \n'])}}));to({_template:l(dl),is:"paper-tabs",behaviors:[Nr,pl],properties:{noink:{type:Boolean,value:!1,observer:"_noinkChanged"},noBar:{type:Boolean,value:!1},noSlide:{type:Boolean,value:!1},scrollable:{type:Boolean,value:!1},fitContainer:{type:Boolean,value:!1},disableDrag:{type:Boolean,value:!1},hideScrollButtons:{type:Boolean,value:!1},alignBottom:{type:Boolean,value:!1},selectable:{type:String,value:"paper-tab"},autoselect:{type:Boolean,value:!1},autoselectDelay:{type:Number,value:0},_step:{type:Number,value:10},_holdDelay:{type:Number,value:1},_leftHidden:{type:Boolean,value:!1},_rightHidden:{type:Boolean,value:!1},_previousTab:{type:Object}},hostAttributes:{role:"tablist"},listeners:{"iron-resize":"_onTabSizingChanged","iron-items-changed":"_onTabSizingChanged","iron-select":"_onIronSelect","iron-deselect":"_onIronDeselect"},keyBindings:{"left:keyup right:keyup":"_onArrowKeyup"},created:function(){this._holdJob=null,this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,this._bindDelayedActivationHandler=this._delayedActivationHandler.bind(this),this.addEventListener("blur",this._onBlurCapture.bind(this),!0)},ready:function(){this.setScrollDirection("y",this.$.tabsContainer)},detached:function(){this._cancelPendingActivation()},_noinkChanged:function(e){Vi(this).querySelectorAll("paper-tab").forEach(e?this._setNoinkAttribute:this._removeNoinkAttribute)},_setNoinkAttribute:function(e){e.setAttribute("noink","")},_removeNoinkAttribute:function(e){e.removeAttribute("noink")},_computeScrollButtonClass:function(e,t,n){return!t||n?"hidden":e?"not-visible":""},_computeTabsContentClass:function(e,t){return e?"scrollable"+(t?" fit-container":""):" fit-container"},_computeSelectionBarClass:function(e,t){return e?"hidden":t?"align-bottom":""},_onTabSizingChanged:function(){this.debounce("_onTabSizingChanged",function(){this._scroll(),this._tabChanged(this.selectedItem)},10)},_onIronSelect:function(e){this._tabChanged(e.detail.item,this._previousTab),this._previousTab=e.detail.item,this.cancelDebouncer("tab-changed")},_onIronDeselect:function(e){this.debounce("tab-changed",function(){this._tabChanged(null,this._previousTab),this._previousTab=null},1)},_activateHandler:function(){this._cancelPendingActivation(),ts._activateHandler.apply(this,arguments)},_scheduleActivation:function(e,t){this._pendingActivationItem=e,this._pendingActivationTimeout=this.async(this._bindDelayedActivationHandler,t)},_delayedActivationHandler:function(){var e=this._pendingActivationItem;this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,e.fire(this.activateEvent,null,{bubbles:!0,cancelable:!0})},_cancelPendingActivation:function(){void 0!==this._pendingActivationTimeout&&(this.cancelAsync(this._pendingActivationTimeout),this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0)},_onArrowKeyup:function(e){this.autoselect&&this._scheduleActivation(this.focusedItem,this.autoselectDelay)},_onBlurCapture:function(e){e.target===this._pendingActivationItem&&this._cancelPendingActivation()},get _tabContainerScrollSize(){return Math.max(0,this.$.tabsContainer.scrollWidth-this.$.tabsContainer.offsetWidth)},_scroll:function(e,t){if(this.scrollable){var n=t&&-t.ddx||0;this._affectScroll(n)}},_down:function(e){this.async(function(){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null)},1)},_affectScroll:function(e){this.$.tabsContainer.scrollLeft+=e;var t=this.$.tabsContainer.scrollLeft;this._leftHidden=0===t,this._rightHidden=t===this._tabContainerScrollSize},_onLeftScrollButtonDown:function(){this._scrollToLeft(),this._holdJob=setInterval(this._scrollToLeft.bind(this),this._holdDelay)},_onRightScrollButtonDown:function(){this._scrollToRight(),this._holdJob=setInterval(this._scrollToRight.bind(this),this._holdDelay)},_onScrollButtonUp:function(){clearInterval(this._holdJob),this._holdJob=null},_scrollToLeft:function(){this._affectScroll(-this._step)},_scrollToRight:function(){this._affectScroll(this._step)},_tabChanged:function(e,t){if(!e)return this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),void this._positionBar(0,0);var n=this.$.tabsContent.getBoundingClientRect(),i=n.width,o=e.getBoundingClientRect(),r=o.left-n.left;if(this._pos={width:this._calcPercent(o.width,i),left:this._calcPercent(r,i)},this.noSlide||null==t)return this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),void this._positionBar(this._pos.width,this._pos.left);var a=t.getBoundingClientRect(),s=this.items.indexOf(t),l=this.items.indexOf(e);this.$.selectionBar.classList.add("expand");var c=s0&&(this.$.tabsContainer.scrollLeft+=n)},_calcPercent:function(e,t){return 100*e/t},_positionBar:function(e,t){e=e||0,t=t||0,this._width=e,this._left=t,this.transform("translateX("+t+"%) scaleX("+e/100+")",this.$.selectionBar)},_onBarTransitionEnd:function(e){var t=this.$.selectionBar.classList;t.contains("expand")?(t.remove("expand"),t.add("contract"),this._positionBar(this._pos.width,this._pos.left)):t.contains("contract")&&t.remove("contract")}}),n(1);var hl=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1]?history.replaceState(null,null,e):history.pushState(null,null,e),this.fire("location-changed")}}]),n}()}),ml=function(){function e(e,t){for(var n=0;n\n paper-card {\n cursor: pointer;\n }\n a.repo {\n display: block;\n color: var(--primary-text-color);\n }\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}})),vl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,fl(mt)),ml(t,[{key:"sortAddons",value:function(e,t){return e.name\n .add {\n padding: 12px 16px;\n }\n iron-icon {\n color: var(--secondary-text-color);\n margin-right: 16px;\n display: inline-block;\n }\n paper-input {\n width: calc(100% - 49px);\n display: inline-block;\n }\n \n
    \n
    \n Repositories\n
    \n Configure which add-on repositories to fetch data from:\n
    \n
    \n \n \n
    \n \n \n
    \n
    \n Add\n
    \n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n
    \n
    \n Repositories\n
    \n Configure which add-on repositories to fetch data from:\n
    \n
    \n \n \n
    \n \n \n
    \n
    \n Add\n
    \n
    \n
    \n'])}})),_l=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),bl(t,[{key:"reposChanged",value:function(e){this.repoList=e.filter(function(e){return"core"!==e.slug&&"local"!==e.slug}),this.repoUrl=""}},{key:"sortRepos",value:function(e,t){return e.name\n hassio-addon-repository {\n margin-top: 24px;\n }\n \n \n\n \n'],{raw:{value:Object.freeze(['\n \n \n\n \n'])}})),xl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),wl(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)}),this.loadData()}},{key:"apiCalled",value:function(e){e.detail.success&&this.loadData()}},{key:"sortRepos",value:function(e,t){return"local"===e.slug?-1:"local"===t.slug?1:"core"===e.slug?-1:"core"===t.slug?1:e.name\n paper-card {\n cursor: pointer;\n }\n \n
    \n
    Add-ons
    \n \n \n
    \n'],{raw:{value:Object.freeze(['\n \n
    \n
    Add-ons
    \n \n \n
    \n'])}})),Sl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,fl(mt)),Ol(t,[{key:"sortAddons",value:function(e,t){return e.name\n paper-card {\n display: block;\n margin-bottom: 32px;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n \n \n'],{raw:{value:Object.freeze(['\n \n \n'])}})),Al=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),El(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var t=e.detail.response;"object"===Pl(t.body)?this.errors=t.body.message||"Unknown error":this.errors=t.body}}},{key:"computeUpdateAvailable",value:function(e){return e.version!==e.last_version}}],[{key:"template",get:function(){return l(Tl)}},{key:"properties",get:function(){return{hass:Object,hassInfo:Object,error:String}}}]),t}();customElements.define("hassio-hass-update",Al);var jl=function(){function e(e,t){for(var n=0;n\n .content {\n margin: 0 auto;\n }\n \n
    \n \n \n
    \n'],{raw:{value:Object.freeze(['\n \n
    \n \n \n
    \n'])}})),Rl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),jl(t,null,[{key:"template",get:function(){return l(Il)}},{key:"properties",get:function(){return{hass:Object,supervisorInfo:Object,hassInfo:Object}}}]),t}();customElements.define("hassio-dashboard",Rl);var Ll=document.createElement("template");Ll.setAttribute("style","display: none;"),Ll.innerHTML='\n \n\n \n',document.head.appendChild(Ll.content),to({is:"paper-checkbox",behaviors:[bs],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){xi(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim()){var e=this.getComputedStyleValue("--calculated-paper-checkbox-size").trim(),t="px",n=e.match(/[A-Za-z]+$/);null!==n&&(t=n[0]);var i=parseFloat(e),o=8/3*i;"px"===t&&(o=Math.floor(o))%2!=i%2&&o++,this.updateStyles({"--paper-checkbox-ink-size":o+t})}})},_computeCheckboxClass:function(e,t){var n="";return e&&(n+="checked "),t&&(n+="invalid"),n},_computeCheckmarkClass:function(e){return e?"":"hidden"},_createRipple:function(){return this._rippleContainer=this.$.checkboxContainer,Or._createRipple.call(this)}});var zl=function(){function e(e,t){for(var n=0;n\n paper-dialog {\n min-width: 350px;\n font-size: 14px;\n border-radius: 2px;\n }\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n paper-dialog-scrollable {\n margin: 0;\n }\n paper-checkbox {\n display: block;\n margin: 4px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n paper-dialog {\n max-height: 100%;\n height: 100%;\n }\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n }\n .details {\n color: var(--secondary-text-color);\n }\n .download {\n color: var(--primary-color);\n }\n .warning,\n .error {\n color: var(--google-red-500);\n }\n \n \n \n \n
    [[_computeName(snapshot)]]
    \n
    \n
    \n [[_computeType(snapshot.type)]] ([[_computeSize(snapshot.size)]])
    \n [[_formatDatetime(snapshot.date)]]\n
    \n
    Home Assistant:
    \n \n Home Assistant [[snapshot.homeassistant]]\n \n \n \n \n \n
    \n \n \n \n \n Restore selected\n \n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n \n \n \n
    [[_computeName(snapshot)]]
    \n
    \n
    \n [[_computeType(snapshot.type)]] ([[_computeSize(snapshot.size)]])
    \n [[_formatDatetime(snapshot.date)]]\n
    \n
    Home Assistant:
    \n \n Home Assistant [[snapshot.homeassistant]]\n \n \n \n \n \n
    \n \n \n \n \n Restore selected\n \n
    \n
    \n'])}})),Dl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),zl(t,[{key:"_snapshotSlugChanged",value:function(e){var t=this;e&&"update"!==e&&this.hass.callApi("get","hassio/snapshots/"+e+"/info").then(function(e){e.data.folders=t._computeFolders(e.data.folders),e.data.addons=t._computeAddons(e.data.addons),t.snapshot=e.data,t.$.dialog.open()},function(){t.snapshot=null})}},{key:"_computeFolders",value:function(e){var t=[];return e.includes("homeassistant")&&t.push({slug:"homeassistant",name:"Home Assistant configuration",checked:!0}),e.includes("ssl")&&t.push({slug:"ssl",name:"SSL",checked:!0}),e.includes("share")&&t.push({slug:"share",name:"Share",checked:!0}),e.includes("addons/local")&&t.push({slug:"addons/local",name:"Local add-ons",checked:!0}),t}},{key:"_computeAddons",value:function(e){return e.map(function(e){return{slug:e.slug,name:e.name,version:e.version,checked:!0}})}},{key:"_isFullSnapshot",value:function(e){return"full"===e}},{key:"_partialRestoreClicked",value:function(){var e=this;if(confirm("Are you sure you want to restore this snapshot?")){var t=this.snapshot.addons.filter(function(e){return e.checked}).map(function(e){return e.slug}),n=this.snapshot.folders.filter(function(e){return e.checked}).map(function(e){return e.slug}),i={homeassistant:this.restoreHass,addons:t,folders:n};this.snapshot.protected&&(i.password=this.snapshotPassword),this.hass.callApi("post","hassio/snapshots/"+this.snapshotSlug+"/restore/partial",i).then(function(){alert("Snapshot restored!"),e.$.dialog.close()},function(t){e.error=t.body.message})}}},{key:"_fullRestoreClicked",value:function(){var e=this;if(confirm("Are you sure you want to restore this snapshot?")){var t=this.snapshot.protected?{password:this.snapshotPassword}:null;this.hass.callApi("post","hassio/snapshots/"+this.snapshotSlug+"/restore/full",t).then(function(){alert("Snapshot restored!"),e.$.dialog.close()},function(t){e.error=t.body.message})}}},{key:"_deleteClicked",value:function(){var e=this;confirm("Are you sure you want to delete this snapshot?")&&this.hass.callApi("post","hassio/snapshots/"+this.snapshotSlug+"/remove").then(function(){e.$.dialog.close(),e.snapshotDeleted=!0},function(t){e.error=t.body.message})}},{key:"_computeDownloadUrl",value:function(e){return"/api/hassio/snapshots/"+e+"/download?api_password="+encodeURIComponent(this.hass.connection.options.authToken)}},{key:"_computeDownloadName",value:function(e){return"Hass_io_"+this._computeName(e).replace(/[^a-z0-9]+/gi,"_")+".tar"}},{key:"_computeName",value:function(e){return e.name||e.slug}},{key:"_computeType",value:function(e){return"full"===e?"Full snapshot":"Partial snapshot"}},{key:"_computeSize",value:function(e){return Math.ceil(10*e)/10+" MB"}},{key:"_sortAddons",value:function(e,t){return e.name\n\n
    \n
    \n
    \n
    \n\n
    \n \n\n \n',document.head.appendChild(Fl.content),to({is:"paper-radio-button",behaviors:[bs],hostAttributes:{role:"radio","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},ready:function(){this._rippleContainer=this.$.radioContainer},attached:function(){xi(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-radio-button-ink-size").trim()){var e=parseFloat(this.getComputedStyleValue("--calculated-paper-radio-button-size").trim()),t=Math.floor(3*e);t%2!=e%2&&t++,this.updateStyles({"--paper-radio-button-ink-size":t+"px"})}})}});var Ml=Object.freeze(Object.defineProperties(["\n \n\n \n"],{raw:{value:Object.freeze(["\n \n\n \n"])}}));to({_template:l(Ml),is:"paper-radio-group",behaviors:[pl],hostAttributes:{role:"radiogroup"},properties:{attrForSelected:{type:String,value:"name"},selectedAttribute:{type:String,value:"checked"},selectable:{type:String,value:"paper-radio-button"},allowEmptySelection:{type:Boolean,value:!1}},select:function(e){var t=this._valueToItem(e);if(!t||!t.hasAttribute("disabled")){if(this.selected){var n=this._valueToItem(this.selected);if(this.selected==e){if(!this.allowEmptySelection)return void(n&&(n.checked=!0));e=""}n&&(n.checked=!1)}Qa.select.apply(this,[e]),this.fire("paper-radio-group-changed")}},_activateFocusedItem:function(){this._itemActivate(this._valueForItem(this.focusedItem),this.focusedItem)},_onUpKey:function(e){this._focusPrevious(),e.preventDefault(),this._activateFocusedItem()},_onDownKey:function(e){this._focusNext(),e.preventDefault(),this._activateFocusedItem()},_onLeftKey:function(e){cl._onLeftKey.apply(this,arguments),this._activateFocusedItem()},_onRightKey:function(e){cl._onRightKey.apply(this,arguments),this._activateFocusedItem()}});var Bl=function(){function e(e,t){for(var n=0;n\n paper-radio-group {\n display: block;\n }\n paper-radio-button {\n padding: 0 0 2px 2px;\n }\n paper-radio-button,\n paper-checkbox,\n paper-input[type="password"] {\n display: block;\n margin: 4px 0 4px 48px;\n }\n .pointer {\n cursor: pointer;\n }\n \n
    \n
    \n
    \n Create snapshot\n
    \n Snapshots allow you to easily backup and\n restore all data of your Hass.io instance.\n
    \n
    \n \n
    \n \n Type:\n \n \n Full snapshot\n \n \n Partial snapshot\n \n \n \n Security:\n Password protection\n \n \n
    \n
    \n Create\n
    \n
    \n
    \n\n
    \n
    Available snapshots
    \n \n \n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n
    \n
    \n
    \n Create snapshot\n
    \n Snapshots allow you to easily backup and\n restore all data of your Hass.io instance.\n
    \n
    \n \n
    \n \n Type:\n \n \n Full snapshot\n \n \n Partial snapshot\n \n \n \n Security:\n Password protection\n \n \n
    \n
    \n Create\n
    \n
    \n
    \n\n
    \n
    Available snapshots
    \n \n \n
    \n
    \n'])}})),ql=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),Bl(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e._apiCalled(t)}),this._updateSnapshots()}},{key:"_apiCalled",value:function(e){e.detail.success&&this._updateSnapshots()}},{key:"_updateSnapshots",value:function(){var e=this;this.hass.callApi("get","hassio/snapshots").then(function(t){e.snapshots=t.data.snapshots},function(t){e.error=t.message})}},{key:"_createSnapshot",value:function(){var e=this;if(this.error="",!this.snapshotHasPassword||this.snapshotPassword.length){this.creatingSnapshot=!0;var t=this.snapshotName;t.length||(t=(new Date).toLocaleDateString(navigator.language,{weekday:"long",year:"numeric",month:"short",day:"numeric"}));var n=void 0,i=void 0;if("full"===this.snapshotType)n={name:t},i="hassio/snapshots/new/full";else{var o=this.addonList.filter(function(e){return e.checked}).map(function(e){return e.slug});n={name:t,folders:this.folderList.filter(function(e){return e.checked}).map(function(e){return e.slug}),addons:o},i="hassio/snapshots/new/partial"}this.snapshotHasPassword&&(n.password=this.snapshotPassword),this.hass.callApi("post",i,n).then(function(){e.creatingSnapshot=!1,e.fire("hass-api-called",{success:!0})},function(t){e.creatingSnapshot=!1,e.error=t.message})}else this.error="Please enter a password."}},{key:"_installedAddonsChanged",value:function(e){this.addonList=e.map(function(e){return{slug:e.slug,name:e.name,checked:!0}})}},{key:"_sortAddons",value:function(e,t){return e.name\n paper-card {\n display: inline-block;\n width: 400px;\n margin-left: 8px;\n }\n .card-content {\n height: 200px;\n }\n @media screen and (max-width: 830px) {\n paper-card {\n margin-top: 8px;\n margin-left: 0;\n width: 100%;\n }\n .card-content {\n height: 100%;\n }\n }\n .info {\n width: 100%;\n }\n .info td:nth-child(2) {\n text-align: right;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n paper-button.info {\n max-width: 50%;\n }\n \n \n
    \n

    Host system

    \n \n \n \n \n \n \n \n \n \n \n
    Hostname[[data.hostname]]
    System[[data.operating_system]]
    \n Show hardware\n \n
    \n
    \n \n \n \n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n \n
    \n

    Host system

    \n \n \n \n \n \n \n \n \n \n \n
    Hostname[[data.hostname]]
    System[[data.operating_system]]
    \n Show hardware\n \n
    \n
    \n \n \n \n
    \n
    \n'])}})),Kl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),Ul(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var t=e.detail.response;"object"===$l(t.body)?this.errors=t.body.message||"Unknown error":this.errors=t.body}}},{key:"computeUpdateAvailable",value:function(e){return e.version!==e.last_version}},{key:"computeRebootAvailable",value:function(e){return e.features&&e.features.includes("reboot")}},{key:"computeShutdownAvailable",value:function(e){return e.features&&e.features.includes("shutdown")}},{key:"_showHardware",value:function(){var e=this;this.hass.callApi("get","hassio/hardware/info").then(function(t){return e._objectToMarkdown(t.data)},function(){return"Error getting hardware info"}).then(function(t){e.fire("hassio-markdown-dialog",{title:"Hardware",content:t})})}},{key:"_objectToMarkdown",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i="";return Object.keys(e).forEach(function(o){"object"!==$l(e[o])?i+=n+"- "+o+": "+e[o]+"\n":(i+=n+"- "+o+":\n",Array.isArray(e[o])?e[o].length&&(i+=n+" - "+e[o].join("\n"+n+" - ")+"\n"):i+=t._objectToMarkdown(e[o]," "+n))}),i}}],[{key:"template",get:function(){return l(Vl)}},{key:"properties",get:function(){return{hass:Object,data:Object,errors:String}}}]),t}();customElements.define("hassio-host-info",Kl);var Wl="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},Yl=function(){function e(e,t){for(var n=0;n\n paper-card {\n display: inline-block;\n width: 400px;\n }\n .card-content {\n height: 200px;\n }\n @media screen and (max-width: 830px) {\n paper-card {\n width: 100%;\n }\n .card-content {\n height: 100%;\n }\n }\n .info {\n width: 100%;\n }\n .info td:nth-child(2) {\n text-align: right;\n }\n .errors {\n color: var(--google-red-500);\n margin-top: 16px;\n }\n \n \n
    \n

    Hass.io supervisor

    \n \n \n \n \n \n \n \n \n \n \n
    Version\n [[data.version]]\n
    Latest version[[data.last_version]]
    \n \n
    \n
    \n Reload\n \n \n \n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n \n
    \n

    Hass.io supervisor

    \n \n \n \n \n \n \n \n \n \n \n
    Version\n [[data.version]]\n
    Latest version[[data.last_version]]
    \n \n
    \n
    \n Reload\n \n \n \n
    \n
    \n'])}})),Xl=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Tr(mt)),Yl(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)})}},{key:"apiCalled",value:function(e){if(e.detail.success)this.errors=null;else{var t=e.detail.response;"object"===Wl(t.body)?this.errors=t.body.message||"Unknown error":this.errors=t.body}}},{key:"computeUpdateAvailable",value:function(e){return e.version!==e.last_version}},{key:"_equals",value:function(e,t){return e===t}},{key:"_joinBeta",value:function(){var e=this;if(confirm("WARNING:\nBeta releases are for testers and early adopters and can contain unstable code changes. Make sure you have backups of your data before you activate this feature.\n\nThis inludes beta releases for:\n- Home Assistant (Release Candidates)\n- Hass.io supervisor\n- Host system")){var t="hassio/supervisor/options",n={channel:"beta"},i={method:"post",path:t,data:n};this.hass.callApi("post",t,n).then(function(e){i.success=!0,i.response=e},function(e){i.success=!1,i.response=e}).then(function(){e.fire("hass-api-called",i)})}}}],[{key:"template",get:function(){return l(Zl)}},{key:"properties",get:function(){return{hass:Object,data:Object,errors:String,leaveBeta:{type:Object,value:{channel:"stable"}}}}}]),t}();customElements.define("hassio-supervisor-info",Xl);var Gl=function(){function e(e,t){for(var n=0;n\n paper-card {\n display: block;\n }\n pre {\n overflow-x: auto;\n }\n \n \n
    \n
    [[log]]
    \n
    \n
    \n Refresh\n
    \n
    \n'],{raw:{value:Object.freeze(['\n \n \n
    \n
    [[log]]
    \n
    \n
    \n Refresh\n
    \n
    \n'])}})),Ql=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),Gl(t,[{key:"ready",value:function(){(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.loadData()}},{key:"loadData",value:function(){var e=this;this.hass.callApi("get","hassio/supervisor/logs").then(function(t){e.log=t},function(){e.log="Error fetching logs"})}},{key:"refreshTapped",value:function(){this.loadData()}}],[{key:"template",get:function(){return l(Jl)}},{key:"properties",get:function(){return{hass:Object,log:String}}}]),t}();customElements.define("hassio-supervisor-log",Ql);var ec=function(){function e(e,t){for(var n=0;n\n .content {\n margin: 4px;\n }\n .title {\n margin-top: 24px;\n color: var(--primary-text-color);\n font-size: 2em;\n padding-left: 8px;\n margin-bottom: 8px;\n }\n \n
    \n
    Information
    \n \n \n
    System log
    \n \n
    \n'],{raw:{value:Object.freeze(['\n \n
    \n
    Information
    \n \n \n
    System log
    \n \n
    \n'])}})),nc=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),ec(t,null,[{key:"template",get:function(){return l(tc)}},{key:"properties",get:function(){return{hass:Object,supervisorInfo:Object,hostInfo:Object}}}]),t}();customElements.define("hassio-system",nc);var ic=function(){function e(e,t){for(var n=0;n\n :host {\n color: var(--primary-text-color);\n --paper-card-header-color: var(--primary-text-color);\n }\n paper-tabs {\n margin-left: 12px;\n --paper-tabs-selection-bar-color: #FFF;\n text-transform: uppercase;\n }\n \n \n \n \n \n
    Hass.io
    \n \n
    \n \n Dashboard\n Snapshots\n Add-on store\n System\n \n
    \n \n \n \n \n
    \n\n \n\n \n'],{raw:{value:Object.freeze(['\n \n \n \n \n \n
    Hass.io
    \n \n
    \n \n Dashboard\n Snapshots\n Add-on store\n System\n \n
    \n \n \n \n \n
    \n\n \n\n \n'])}})),rc=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,fl(mt)),ic(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("hassio-markdown-dialog",function(t){return e.openMarkdown(t)})}},{key:"handlePageSelected",value:function(e){var t=e.detail.item.getAttribute("page-name");t!==this.page&&this.navigate("/hassio/"+t)}},{key:"equals",value:function(e,t){return e===t}},{key:"showRefreshButton",value:function(e){return"store"===e||"snapshots"===e}},{key:"refreshClicked",value:function(){"snapshots"===this.page?this.shadowRoot.querySelector("hassio-snapshots").refreshData():this.shadowRoot.querySelector("hassio-addon-store").refreshData()}},{key:"openMarkdown",value:function(e){this.setProperties({markdownTitle:e.detail.title,markdownContent:e.detail.content}),this.shadowRoot.querySelector("hassio-markdown-dialog").openDialog()}}],[{key:"template",get:function(){return l(oc)}},{key:"properties",get:function(){return{hass:Object,showMenu:Boolean,narrow:Boolean,page:String,supervisorInfo:Object,hostInfo:Object,hassInfo:Object,snapshotSlug:String,snapshotDeleted:Boolean,markdownTitle:String,markdownContent:{type:String,value:""}}}}]),t}();customElements.define("hassio-pages-with-tabs",rc);var ac=function(){function e(e,t){for(var n=0;n\n \n\n \n\n \n'],{raw:{value:Object.freeze(['\n \n \n\n \n\n \n'])}})),cc=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,fl(mt)),ac(t,[{key:"ready",value:function(){var e=this;sc(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e._themes||(e._themes={});var o=t.default_theme;("default"===n||n&&t.themes[n])&&(o=n);var r=Object.assign({},e._themes);if("default"!==o){var a=t.themes[o];Object.keys(a).forEach(function(t){var n="--"+t;e._themes[n]="",r[n]=a[t]})}if(e.updateStyles?e.updateStyles(r):window.ShadyCSS&&window.ShadyCSS.styleSubtree(e,r),i){var s=document.querySelector("meta[name=theme-color]");if(s){s.hasAttribute("default-content")||s.setAttribute("default-content",s.getAttribute("content"));var l=r["--primary-color"]||s.getAttribute("default-content");s.setAttribute("content",l)}}}(this,this.hass.themes,this.hass.selectedTheme,!0),this.addEventListener("hass-api-called",function(t){return e.apiCalled(t)})}},{key:"connectedCallback",value:function(){sc(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"connectedCallback",this).call(this),this.routeChanged(this.route)}},{key:"apiCalled",value:function(e){var t=this;if(e.detail.success){var n=1;!function e(){t.$.data.refresh().catch(function(){n+=1,setTimeout(e,1e3*Math.min(n,5))})}()}}},{key:"computeIsLoaded",value:function(e,t,n){return null!==e&&null!==t&&null!==n}},{key:"routeChanged",value:function(e){""===e.path&&"/hassio"===e.prefix&&this.navigate("/hassio/dashboard",!0)}},{key:"equalsAddon",value:function(e){return e&&"addon"===e}}],[{key:"template",get:function(){return l(lc)}},{key:"properties",get:function(){return{hass:Object,narrow:Boolean,showMenu:Boolean,route:{type:Object,value:{prefix:"/hassio",path:"/dashboard",__queryParams:{}},observer:"routeChanged"},routeData:Object,supervisorInfo:Object,hostInfo:Object,hassInfo:Object,loaded:{type:Boolean,computed:"computeIsLoaded(supervisorInfo, hostInfo, hassInfo)"}}}}]),t}();customElements.define("hassio-main",cc);var pc=function(){function e(e,t){for(var n=0;n\n \n \n'],{raw:{value:Object.freeze(['\n \n'])}})),yc=function(e){function t(){return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,mt),fc(t,[{key:"ready",value:function(){var e=this;(function e(t,n,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,n,i)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(i):void 0})(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),window.setProperties=this.setProperties.bind(this),this.addEventListener("location-changed",function(){return e._locationChanged()}),this.addEventListener("hass-open-menu",function(){return e._menuEvent(!0)}),this.addEventListener("hass-close-menu",function(){return e._menuEvent(!1)})}},{key:"_menuEvent",value:function(e){this.hassioPanel.fire(e?"hass-open-menu":"hass-close-menu")}},{key:"_locationChanged",value:function(){this.hassioPanel.navigate(window.location.pathname)}}],[{key:"template",get:function(){return l(mc)}},{key:"properties",get:function(){return{hass:Object,narrow:Boolean,showMenu:Boolean,route:Object,hassioPanel:{type:Object,value:window.parent.hassioPanel}}}}]),t}();customElements.define("hassio-app",yc)},function(e,t,n){"use strict";t.default=function(){function e(t,n,i,o){this.message=t,this.expected=n,this.found=i,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}return function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(e,Error),{SyntaxError:e,parse:function(t){var n,i=arguments.length>1?arguments[1]:{},o={},r={start:Te},a=Te,s=function(e){return{type:"messageFormatPattern",elements:e,location:Ce()}},l=function(e){var t,n,i,o,r,a="";for(t=0,i=e.length;tke&&(ke=ge,xe=[]),xe.push(e))}function Te(){return Ae()}function Ae(){var e,t,n;for(e=ge,t=[],n=je();n!==o;)t.push(n),n=je();return t!==o&&(_e=e,t=s(t)),t}function je(){var e;return(e=function(){var e,n;return e=ge,(n=function(){var e,n,i,r,a,s;if(e=ge,n=[],i=ge,(r=ze())!==o&&(a=Be())!==o&&(s=ze())!==o?i=r=[r,a,s]:(ge=i,i=o),i!==o)for(;i!==o;)n.push(i),i=ge,(r=ze())!==o&&(a=Be())!==o&&(s=ze())!==o?i=r=[r,a,s]:(ge=i,i=o);else n=o;return n!==o&&(_e=e,n=l(n)),(e=n)===o&&(e=ge,e=(n=Le())!==o?t.substring(e,ge):n),e}())!==o&&(_e=e,n=c(n)),n}())===o&&(e=function(){var e,n,i,r,a,s,l;return e=ge,123===t.charCodeAt(ge)?(n=d,ge++):(n=o,0===Oe&&Ee(h)),n!==o&&ze()!==o&&(i=function(){var e,n,i;if((e=Fe())===o){if(e=ge,n=[],p.test(t.charAt(ge))?(i=t.charAt(ge),ge++):(i=o,0===Oe&&Ee(u)),i!==o)for(;i!==o;)n.push(i),p.test(t.charAt(ge))?(i=t.charAt(ge),ge++):(i=o,0===Oe&&Ee(u));else n=o;e=n!==o?t.substring(e,ge):n}return e}())!==o&&ze()!==o?(r=ge,44===t.charCodeAt(ge)?(a=f,ge++):(a=o,0===Oe&&Ee(m)),a!==o&&(s=ze())!==o&&(l=function(){var e;return(e=function(){var e,n,i,r,a,s;return e=ge,t.substr(ge,6)===g?(n=g,ge+=6):(n=o,0===Oe&&Ee(_)),n===o&&(t.substr(ge,4)===w?(n=w,ge+=4):(n=o,0===Oe&&Ee(k)),n===o&&(t.substr(ge,4)===x?(n=x,ge+=4):(n=o,0===Oe&&Ee(O)))),n!==o&&ze()!==o?(i=ge,44===t.charCodeAt(ge)?(r=f,ge++):(r=o,0===Oe&&Ee(m)),r!==o&&(a=ze())!==o&&(s=Be())!==o?i=r=[r,a,s]:(ge=i,i=o),i===o&&(i=null),i!==o?(_e=e,e=n=C(n,i)):(ge=e,e=o)):(ge=e,e=o),e}())===o&&(e=function(){var e,n,i,r;return e=ge,t.substr(ge,6)===S?(n=S,ge+=6):(n=o,0===Oe&&Ee(P)),n!==o&&ze()!==o?(44===t.charCodeAt(ge)?(i=f,ge++):(i=o,0===Oe&&Ee(m)),i!==o&&ze()!==o&&(r=Re())!==o?(_e=e,e=n=E(r)):(ge=e,e=o)):(ge=e,e=o),e}())===o&&(e=function(){var e,n,i,r;return e=ge,t.substr(ge,13)===T?(n=T,ge+=13):(n=o,0===Oe&&Ee(A)),n!==o&&ze()!==o?(44===t.charCodeAt(ge)?(i=f,ge++):(i=o,0===Oe&&Ee(m)),i!==o&&ze()!==o&&(r=Re())!==o?(_e=e,e=n=j(r)):(ge=e,e=o)):(ge=e,e=o),e}())===o&&(e=function(){var e,n,i,r,a;if(e=ge,t.substr(ge,6)===I?(n=I,ge+=6):(n=o,0===Oe&&Ee(R)),n!==o)if(ze()!==o)if(44===t.charCodeAt(ge)?(i=f,ge++):(i=o,0===Oe&&Ee(m)),i!==o)if(ze()!==o){if(r=[],(a=Ie())!==o)for(;a!==o;)r.push(a),a=Ie();else r=o;r!==o?(_e=e,e=n=L(r)):(ge=e,e=o)}else ge=e,e=o;else ge=e,e=o;else ge=e,e=o;else ge=e,e=o;return e}()),e}())!==o?r=a=[a,s,l]:(ge=r,r=o),r===o&&(r=null),r!==o&&(a=ze())!==o?(125===t.charCodeAt(ge)?(s=y,ge++):(s=o,0===Oe&&Ee(v)),s!==o?(_e=e,e=n=b(i,r)):(ge=e,e=o)):(ge=e,e=o)):(ge=e,e=o),e}()),e}function Ie(){var e,n,i,r,a;return e=ge,ze()!==o&&(n=function(){var e,n,i,r;return e=ge,n=ge,61===t.charCodeAt(ge)?(i=z,ge++):(i=o,0===Oe&&Ee(N)),i!==o&&(r=Fe())!==o?n=i=[i,r]:(ge=n,n=o),(e=n!==o?t.substring(e,ge):n)===o&&(e=Be()),e}())!==o&&ze()!==o?(123===t.charCodeAt(ge)?(i=d,ge++):(i=o,0===Oe&&Ee(h)),i!==o&&ze()!==o&&(r=Ae())!==o&&ze()!==o?(125===t.charCodeAt(ge)?(a=y,ge++):(a=o,0===Oe&&Ee(v)),a!==o?(_e=e,e=D(n,r)):(ge=e,e=o)):(ge=e,e=o)):(ge=e,e=o),e}function Re(){var e,n,i,r;if(e=ge,(n=function(){var e,n,i;return e=ge,t.substr(ge,7)===F?(n=F,ge+=7):(n=o,0===Oe&&Ee(M)),n!==o&&ze()!==o&&(i=Fe())!==o?(_e=e,e=n=B(i)):(ge=e,e=o),e}())===o&&(n=null),n!==o)if(ze()!==o){if(i=[],(r=Ie())!==o)for(;r!==o;)i.push(r),r=Ie();else i=o;i!==o?(_e=e,e=n=H(n,i)):(ge=e,e=o)}else ge=e,e=o;else ge=e,e=o;return e}function Le(){var e,n;if(Oe++,e=[],$.test(t.charAt(ge))?(n=t.charAt(ge),ge++):(n=o,0===Oe&&Ee(U)),n!==o)for(;n!==o;)e.push(n),$.test(t.charAt(ge))?(n=t.charAt(ge),ge++):(n=o,0===Oe&&Ee(U));else e=o;return Oe--,e===o&&(n=o,0===Oe&&Ee(q)),e}function ze(){var e,n,i;for(Oe++,e=ge,n=[],i=Le();i!==o;)n.push(i),i=Le();return e=n!==o?t.substring(e,ge):n,Oe--,e===o&&(n=o,0===Oe&&Ee(V)),e}function Ne(){var e;return K.test(t.charAt(ge))?(e=t.charAt(ge),ge++):(e=o,0===Oe&&Ee(W)),e}function De(){var e;return Y.test(t.charAt(ge))?(e=t.charAt(ge),ge++):(e=o,0===Oe&&Ee(Z)),e}function Fe(){var e,n,i,r,a,s;if(e=ge,48===t.charCodeAt(ge)?(n=X,ge++):(n=o,0===Oe&&Ee(G)),n===o){if(n=ge,i=ge,J.test(t.charAt(ge))?(r=t.charAt(ge),ge++):(r=o,0===Oe&&Ee(Q)),r!==o){for(a=[],s=Ne();s!==o;)a.push(s),s=Ne();a!==o?i=r=[r,a]:(ge=i,i=o)}else ge=i,i=o;n=i!==o?t.substring(n,ge):i}return n!==o&&(_e=e,n=ee(n)),n}function Me(){var e,n,i,r,a,s,l,c;return te.test(t.charAt(ge))?(e=t.charAt(ge),ge++):(e=o,0===Oe&&Ee(ne)),e===o&&(e=ge,t.substr(ge,2)===ie?(n=ie,ge+=2):(n=o,0===Oe&&Ee(oe)),n!==o&&(_e=e,n=re()),(e=n)===o&&(e=ge,t.substr(ge,2)===ae?(n=ae,ge+=2):(n=o,0===Oe&&Ee(se)),n!==o&&(_e=e,n=le()),(e=n)===o&&(e=ge,t.substr(ge,2)===ce?(n=ce,ge+=2):(n=o,0===Oe&&Ee(pe)),n!==o&&(_e=e,n=ue()),(e=n)===o&&(e=ge,t.substr(ge,2)===de?(n=de,ge+=2):(n=o,0===Oe&&Ee(he)),n!==o&&(_e=e,n=fe()),(e=n)===o&&(e=ge,t.substr(ge,2)===me?(n=me,ge+=2):(n=o,0===Oe&&Ee(ye)),n!==o?(i=ge,r=ge,(a=De())!==o&&(s=De())!==o&&(l=De())!==o&&(c=De())!==o?r=a=[a,s,l,c]:(ge=r,r=o),(i=r!==o?t.substring(i,ge):r)!==o?(_e=e,e=n=ve(i)):(ge=e,e=o)):(ge=e,e=o)))))),e}function Be(){var e,t,n;if(e=ge,t=[],(n=Me())!==o)for(;n!==o;)t.push(n),n=Me();else t=o;return t!==o&&(_e=e,t=be(t)),t}if((n=a())!==o&&ge===t.length)return n;throw n!==o&&get.description?1:0});t1?i.slice(0,-1).join(", ")+" or "+i[e.length-1]:i[0])+" but "+(t?'"'+function(e){function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(e){return"\\x0"+n(e)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(e){return"\\x"+n(e)}).replace(/[\u0100-\u0FFF]/g,function(e){return"\\u0"+n(e)}).replace(/[\u1000-\uFFFF]/g,function(e){return"\\u"+n(e)})}()+'"':"end of input")+" found."}(n,i),n,i,o)}(null,xe,ke1||n<0||n>1?d:function(o){function r(e,t,n){return 3*e*(1-n)*(1-n)*n+3*t*(1-n)*n*n+n*n*n}if(o<=0){var a=0;return e>0?a=t/e:!t&&n>0&&(a=i/n),a*o}if(o>=1){var s=0;return n<1?s=(i-1)/(n-1):1==n&&e<1&&(s=(t-1)/(e-1)),1+s*(o-1)}for(var l=0,c=1;l=1)return 1;var i=1/e;return(n+=t*i)-n%i}}function s(e){v||(v=document.createElement("div").style),v.animationTimingFunction="",v.animationTimingFunction=e;var t=v.animationTimingFunction;if(""==t&&i())throw new TypeError(e+" is not a valid value for easing");return t}function l(e){if("linear"==e)return d;var t=g.exec(e);if(t)return r.apply(this,t.slice(1).map(Number));var n=_.exec(e);return n?a(Number(n[1]),{start:h,middle:f,end:m}[n[2]]):y[e]||d}function c(e,t,n){if(null==t)return w;var i=n.delay+e+n.endDelay;return t=Math.min(n.delay+e,i)?x:O}var p="backwards|forwards|both|none".split("|"),u="reverse|alternate|alternate-reverse".split("|"),d=function(e){return e};n.prototype={_setMember:function(t,n){this["_"+t]=n,this._effect&&(this._effect._timingInput[t]=n,this._effect._timing=e.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=e.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(e){this._setMember("delay",e)},get delay(){return this._delay},set endDelay(e){this._setMember("endDelay",e)},get endDelay(){return this._endDelay},set fill(e){this._setMember("fill",e)},get fill(){return this._fill},set iterationStart(e){if((isNaN(e)||e<0)&&i())throw new TypeError("iterationStart must be a non-negative number, received: "+timing.iterationStart);this._setMember("iterationStart",e)},get iterationStart(){return this._iterationStart},set duration(e){if("auto"!=e&&(isNaN(e)||e<0)&&i())throw new TypeError("duration must be non-negative or auto, received: "+e);this._setMember("duration",e)},get duration(){return this._duration},set direction(e){this._setMember("direction",e)},get direction(){return this._direction},set easing(e){this._easingFunction=l(s(e)),this._setMember("easing",e)},get easing(){return this._easing},set iterations(e){if((isNaN(e)||e<0)&&i())throw new TypeError("iterations must be non-negative, received: "+e);this._setMember("iterations",e)},get iterations(){return this._iterations}};var h=1,f=.5,m=0,y={ease:r(.25,.1,.25,1),"ease-in":r(.42,0,1,1),"ease-out":r(0,0,.58,1),"ease-in-out":r(.42,0,.58,1),"step-start":a(1,h),"step-middle":a(1,f),"step-end":a(1,m)},v=null,b="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",g=new RegExp("cubic-bezier\\("+b+","+b+","+b+","+b+"\\)"),_=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,w=0,k=1,x=2,O=3;e.cloneTimingInput=function(e){if("number"==typeof e)return e;var t={};for(var n in e)t[n]=e[n];return t},e.makeTiming=o,e.numericTimingToObject=function(e){return"number"==typeof e&&(e=isNaN(e)?{duration:0}:{duration:e}),e},e.normalizeTimingInput=function(t,n){return o(t=e.numericTimingToObject(t),n)},e.calculateActiveDuration=function(e){return Math.abs(function(e){return 0===e.duration||0===e.iterations?0:e.duration*e.iterations}(e)/e.playbackRate)},e.calculateIterationProgress=function(e,t,n){var i=c(e,t,n),o=function(e,t,n,i,o){switch(i){case k:return"backwards"==t||"both"==t?0:null;case O:return n-o;case x:return"forwards"==t||"both"==t?e:null;case w:return null}}(e,n.fill,t,i,n.delay);if(null===o)return null;var r=function(e,t,n,i,o){var r=o;return 0===e?t!==k&&(r+=n):r+=i/e,r}(n.duration,i,n.iterations,o,n.iterationStart),a=function(e,t,n,i,o,r){var a=e===1/0?t%1:e%1;return 0!==a||n!==x||0===i||0===o&&0!==r||(a=1),a}(r,n.iterationStart,i,n.iterations,o,n.duration),s=function(e,t,n,i){return e===x&&t===1/0?1/0:1===a?Math.floor(i)-1:Math.floor(i)}(i,n.iterations,0,r),l=function(e,t,n){var i=e;if("normal"!==e&&"reverse"!==e){var o=s;"alternate-reverse"===e&&(o+=1),i="normal",o!==1/0&&o%2!=0&&(i="reverse")}return"normal"===i?a:1-a}(n.direction);return n._easingFunction(l)},e.calculatePhase=c,e.normalizeEasing=s,e.parseEasingFunction=l}(i={}),function(e,t){function n(e,t){return e in l&&l[e][t]||t}function i(e,t,i){if(!function(e){return"display"===e||0===e.lastIndexOf("animation",0)||0===e.lastIndexOf("transition",0)}(e)){var o=r[e];if(o)for(var s in a.style[e]=t,o){var l=o[s],c=a.style[l];i[l]=n(l,c)}else i[e]=n(e,t)}}function o(e){var t=[];for(var n in e)if(!(n in["easing","offset","composite"])){var i=e[n];Array.isArray(i)||(i=[i]);for(var o,r=i.length,a=0;a1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==o){if("add"==r||"accumulate"==r)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=r)throw new TypeError("Invalid composite mode "+r+".")}else r="easing"==o?e.normalizeEasing(r):""+r;i(o,r,n)}return void 0==n.offset&&(n.offset=null),void 0==n.easing&&(n.easing="linear"),n}),r=!0,a=-1/0,s=0;s=0&&e.offset<=1}),r||function(){var e=n.length;null==n[e-1].offset&&(n[e-1].offset=1),e>1&&null==n[0].offset&&(n[0].offset=0);for(var t=0,i=n[0].offset,o=1;o=e.applyFrom&&n0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(e){e=+e,isNaN(e)||(t.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-e/this._playbackRate),this._currentTimePending=!1,this._currentTime!=e&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(e,!0),t.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(e){e=+e,isNaN(e)||this._paused||this._idle||(this._startTime=e,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),t.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(e){if(e!=this._playbackRate){var n=this.currentTime;this._playbackRate=e,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),t.applyDirtiedAnimation(this)),null!=n&&(this.currentTime=n)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),t.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,t.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._isFinished=!0,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),t.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(e,t){"function"==typeof t&&"finish"==e&&this._finishHandlers.push(t)},removeEventListener:function(e,t){if("finish"==e){var n=this._finishHandlers.indexOf(t);n>=0&&this._finishHandlers.splice(n,1)}},_fireEvents:function(e){if(this._isFinished){if(!this._finishedFlag){var t=new function(e,t,n){this.target=e,this.currentTime=t,this.timelineTime=n,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=e,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()}(this,this._currentTime,e),n=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){n.forEach(function(e){e.call(t.target,t)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(e,t){this._idle||this._paused||(null==this._startTime?t&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((e-this._startTime)*this.playbackRate)),t&&(this._currentTimePending=!1,this._fireEvents(e))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var e=this._effect._target;return e._activeAnimations||(e._activeAnimations=[]),e._activeAnimations},_markTarget:function(){var e=this._targetAnimations();-1===e.indexOf(this)&&e.push(this)},_unmarkTarget:function(){var e=this._targetAnimations(),t=e.indexOf(this);-1!==t&&e.splice(t,1)}}}(i,o),function(e,t,n){function i(e){var t=c;c=[],ei?n%=i:i%=n;return e*t/(n+i)}(i.length,o.length),c=0;c=1?t:"visible"}]},["visibility"]),function(e,t){function n(e){e=e.trim(),r.fillStyle="#000",r.fillStyle=e;var t=r.fillStyle;if(r.fillStyle="#fff",r.fillStyle=e,t==r.fillStyle){r.fillRect(0,0,1,1);var n=r.getImageData(0,0,1,1).data;r.clearRect(0,0,1,1);var i=n[3]/255;return[n[0]*i,n[1]*i,n[2]*i,i]}}function i(t,n){return[t,n,function(t){function n(e){return Math.max(0,Math.min(255,e))}if(t[3])for(var i=0;i<3;i++)t[i]=Math.round(n(t[i]/t[3]));return t[3]=e.numberToString(e.clamp(0,1,t[3])),"rgba("+t.join(",")+")"}]}var o=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");o.width=o.height=1;var r=o.getContext("2d");e.addPropertiesHandler(n,i,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]),e.consumeColor=e.consumeParenthesised.bind(null,n),e.mergeColors=i}(o),function(e,t){function n(e){function t(){var t=a.exec(e);r=t?t[0]:void 0}function n(){if("("!==r)return function(){var e=Number(r);return t(),e}();t();var e=o();return")"!==r?NaN:(t(),e)}function i(){for(var e=n();"*"===r||"/"===r;){var i=r;t();var o=n();"*"===i?e*=o:e/=o}return e}function o(){for(var e=i();"+"===r||"-"===r;){var n=r;t();var o=i();"+"===n?e+=o:e-=o}return e}var r,a=/([\+\-\w\.]+|[\(\)\*\/])/g;return t(),o()}function i(e,t){if("0"==(t=t.trim().toLowerCase())&&"px".search(e)>=0)return{px:0};if(/^[^(]*$|^calc/.test(t)){var i={};t=(t=t.replace(/calc\(/g,"(")).replace(e,function(e){return i[e]=null,"U"+e});for(var o="U("+e.source+")",r=t.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+o,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),a=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],s=0;s1?"calc("+n+")":n}]}var a="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",s=i.bind(null,new RegExp(a,"g")),l=i.bind(null,new RegExp(a+"|%","g")),c=i.bind(null,/deg|rad|grad|turn/g);e.parseLength=s,e.parseLengthOrPercent=l,e.consumeLengthOrPercent=e.consumeParenthesised.bind(null,l),e.parseAngle=c,e.mergeDimensions=r;var p=e.consumeParenthesised.bind(null,s),u=e.consumeRepeated.bind(void 0,p,/^/),d=e.consumeRepeated.bind(void 0,u,/^,/);e.consumeSizePairList=d;var h=e.mergeNestedRepeated.bind(void 0,o," "),f=e.mergeNestedRepeated.bind(void 0,h,",");e.mergeNonNegativeSizePair=h,e.addPropertiesHandler(function(e){var t=d(e);if(t&&""==t[1])return t[0]},f,["background-size"]),e.addPropertiesHandler(l,o,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),e.addPropertiesHandler(l,r,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"])}(o),function(e,t){function n(t){return e.consumeLengthOrPercent(t)||e.consumeToken(/^auto/,t)}function i(t){var i=e.consumeList([e.ignore(e.consumeToken.bind(null,/^rect/)),e.ignore(e.consumeToken.bind(null,/^\(/)),e.consumeRepeated.bind(null,n,/^,/),e.ignore(e.consumeToken.bind(null,/^\)/))],t);if(i&&4==i[0].length)return i[0]}var o=e.mergeWrappedNestedRepeated.bind(null,function(e){return"rect("+e+")"},function(t,n){return"auto"==t||"auto"==n?[!0,!1,function(i){var o=i?t:n;if("auto"==o)return"auto";var r=e.mergeDimensions(o,o);return r[2](r[0])}]:e.mergeDimensions(t,n)},", ");e.parseBox=i,e.mergeBoxes=o,e.addPropertiesHandler(i,o,["clip"])}(o),function(e,t){function n(e){return function(t){var n=0;return e.map(function(e){return e===c?t[n++]:e})}}function i(e){return e}function o(t){if("none"==(t=t.toLowerCase().trim()))return[];for(var n,i=/\s*(\w+)\(([^)]*)\)/g,o=[],r=0;n=i.exec(t);){if(n.index!=r)return;r=n.index+n[0].length;var a=n[1],s=d[a];if(!s)return;var l=n[2].split(","),c=s[0];if(c.length=0&&this._cancelHandlers.splice(n,1)}else s.call(this,e,t)},o}}}(),function(e){var t=document.documentElement,n=null,i=!1;try{var o="0"==getComputedStyle(t).getPropertyValue("opacity")?"1":"0";(n=t.animate({opacity:[o,o]},{duration:1})).currentTime=0,i=getComputedStyle(t).getPropertyValue("opacity")==o}catch(e){}finally{n&&n.cancel()}if(!i){var r=window.Element.prototype.animate;window.Element.prototype.animate=function(t,n){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&t[Symbol.iterator]&&(t=Array.from(t)),Array.isArray(t)||null===t||(t=e.convertToArrayForm(t)),r.call(this,t,n)}}}(i),function(e,t,n){function i(e){var n=t.timeline;n.currentTime=e,n._discardAnimations(),0==n._animations.length?r=!1:requestAnimationFrame(i)}var o=window.requestAnimationFrame;window.requestAnimationFrame=function(e){return o(function(n){t.timeline._updateAnimationsPromises(),e(n),t.timeline._updateAnimationsPromises()})},t.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},t.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){t.animationsWithPromises=t.animationsWithPromises.filter(function(e){return e._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(e){return"finished"!=e.playState&&"idle"!=e.playState})},_play:function(e){var n=new t.Animation(e,this);return this._animations.push(n),t.restartWebAnimationsNextTick(),n._updatePromises(),n._animation.play(),n._updatePromises(),n},play:function(e){return e&&e.remove(),this._play(e)}};var r=!1;t.restartWebAnimationsNextTick=function(){r||(r=!0,requestAnimationFrame(i))};var a=new t.AnimationTimeline;t.timeline=a;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return a}})}catch(e){}try{window.document.timeline=a}catch(e){}}(0,r),function(e,t,n){t.animationsWithPromises=[],t.Animation=function(t,n){if(this.id="",t&&t._id&&(this.id=t._id),this.effect=t,t&&(t._animation=this),!n)throw new Error("Animation with null timeline is not supported");this._timeline=n,this._sequenceNumber=e.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},t.Animation.prototype={_updatePromises:function(){var e=this._oldPlayState,t=this.playState;return this._readyPromise&&t!==e&&("idle"==t?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==e?this._resolveReadyPromise():"pending"==t&&(this._readyPromise=void 0)),this._finishedPromise&&t!==e&&("idle"==t?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==t?this._resolveFinishedPromise():"finished"==e&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var e,n,i,o,r=!!this._animation;r&&(e=this.playbackRate,n=this._paused,i=this.startTime,o=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=t.newUnderlyingAnimationForKeyframeEffect(this.effect),t.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=t.newUnderlyingAnimationForGroup(this.effect),t.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&t.bindAnimationForCustomEffect(this),r&&(1!=e&&(this.playbackRate=e),null!==i?this.startTime=i:null!==o?this.currentTime=o:null!==this._holdTime&&(this.currentTime=this._holdTime),n&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var e=this.effect._timing.delay;this._childAnimations.forEach(function(n){this._arrangeChildren(n,e),this.effect instanceof window.SequenceEffect&&(e+=t.groupChildDuration(n.effect))}.bind(this))}},_setExternalAnimation:function(e){if(this.effect&&this._isGroup)for(var t=0;t\n \n",document.head.appendChild(n.content)},function(e,t){function n(){document.body.removeAttribute("unresolved")}"interactive"===document.readyState||"complete"===document.readyState?n():window.addEventListener("DOMContentLoaded",n)}]);(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[,,,,,,,,,function(t,e){t.exports={indexOf:function(t,e){var r,n;if(Array.prototype.indexOf)return t.indexOf(e);for(r=0,n=t.length;r0;e--){var r=t[e];if(" "!==r)return"="===r?e:-1}}function c(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}e.parseTag=function(t,e,r){"user strict";var n="",s=0,a=!1,l=!1,c=0,p=t.length,u="",g="";for(c=0;c"===h){n+=r(t.slice(s,a)),u=i(g=t.slice(a,c+1)),n+=e(a,n.length,u,g,o(g)),s=c+1,a=!1;continue}if(('"'===h||"'"===h)&&"="===t.charAt(c-1)){l=h;continue}}else if(h===l){l=!1;continue}}return s/g,p=/"/g,u=/"/g,g=/&#([a-zA-Z0-9]*);?/gim,h=/:?/gim,d=/&newline;?/gim,f=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,m=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,b=/u\s*r\s*l\s*\(.*/gi;function x(t){return t.replace(p,""")}function k(t){return t.replace(u,'"')}function y(t){return t.replace(g,function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))})}function w(t){return t.replace(h,":").replace(d," ")}function v(t){for(var e="",r=0,n=t.length;r/g;e.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},e.getDefaultWhiteList=function(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}},e.onTag=function(t,e,r){},e.onIgnoreTag=function(t,e,r){},e.onTagAttr=function(t,e,r){},e.onIgnoreTagAttr=function(t,e,r){},e.safeAttrValue=function(t,e,r,n){if(r=A(r),"href"===e||"src"===e){if("#"===(r=o.trim(r)))return"#";if("http://"!==r.substr(0,7)&&"https://"!==r.substr(0,8)&&"mailto:"!==r.substr(0,7)&&"tel:"!==r.substr(0,4)&&"#"!==r[0]&&"/"!==r[0])return""}else if("background"===e){if(f.lastIndex=0,f.test(r))return""}else if("style"===e){if(m.lastIndex=0,m.test(r))return"";if(b.lastIndex=0,b.test(r)&&(f.lastIndex=0,f.test(r)))return"";!1!==n&&(r=(n=n||s).process(r))}return _(r)},e.escapeHtml=a,e.escapeQuote=x,e.unescapeQuote=k,e.escapeHtmlEntities=y,e.escapeDangerHtml5Entities=w,e.clearNonPrintableCharacter=v,e.friendlyAttrValue=A,e.escapeAttrValue=_,e.onIgnoreTagStripAll=function(){return""},e.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var r=!Array.isArray(t),n=[],i=!1;return{onIgnoreTag:function(s,a,l){if(function(e){return!!r||-1!==o.indexOf(t,e)}(s)){if(l.isClosing){var c="[/removed]",p=l.position+c.length;return n.push([!1!==i?i:l.position,p]),i=!1,c}return i||(i=l.position),"[removed]"}return e(s,a,l)},remove:function(t){var e="",r=0;return o.forEach(n,function(n){e+=t.slice(r,n[0]),r=n[1]}),e+=t.slice(r)}}},e.stripCommentTag=function(t){return t.replace(S,"")},e.stripBlankChar=function(t){var e=t.split("");return(e=e.filter(function(t){var e=t.charCodeAt(0);return!(127===e||e<=31&&10!==e&&13!==e)})).join("")},e.cssFilter=s,e.getDefaultCSSWhiteList=i},function(t,e,r){var n=r(10).FilterCSS,i=r(14),o=r(11),s=o.parseTag,a=o.parseAttr,l=r(9);function c(t){return void 0===t||null===t}function p(t){(t=function(t){var e={};for(var r in t)e[r]=t[r];return e}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=i.onIgnoreTagStripAll),t.whiteList=t.whiteList||i.whiteList,t.onTag=t.onTag||i.onTag,t.onTagAttr=t.onTagAttr||i.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||i.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||i.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||i.safeAttrValue,t.escapeHtml=t.escapeHtml||i.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new n(t.css))}p.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,r=e.whiteList,n=e.onTag,o=e.onIgnoreTag,p=e.onTagAttr,u=e.onIgnoreTagAttr,g=e.safeAttrValue,h=e.escapeHtml,d=this.cssFilter;e.stripBlankChar&&(t=i.stripBlankChar(t)),e.allowCommentTag||(t=i.stripCommentTag(t));var f=!1;e.stripIgnoreTagBody&&(f=i.StripTagBody(e.stripIgnoreTagBody,o),o=f.onIgnoreTag);var m=s(t,function(t,e,i,s,f){var m,b={sourcePosition:t,position:e,isClosing:f,isWhite:r.hasOwnProperty(i)};if(!c(m=n(i,s,b)))return m;if(b.isWhite){if(b.isClosing)return"";var x=function(t){var e=l.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var r="/"===(t=l.trim(t.slice(e+1,-1)))[t.length-1];return r&&(t=l.trim(t.slice(0,-1))),{html:t,closing:r}}(s),k=r[i],y=a(x.html,function(t,e){var r,n=-1!==l.indexOf(k,t);return c(r=p(i,t,e,n))?n?(e=g(i,t,e,d))?t+'="'+e+'"':t:c(r=u(i,t,e,n))?void 0:r:r});return s="<"+i,y&&(s+=" "+y),x.closing&&(s+=" /"),s+">"}return c(m=o(i,s,b))?h(s):m},h);return f&&(m=f.remove(m)),m},t.exports=p},function(t,e,r){var n=r(12);t.exports=function(t,e){";"!==(t=n.trimRight(t))[t.length-1]&&(t+=";");var r=t.length,i=!1,o=0,s=0,a="";function l(){if(!i){var r=n.trim(t.slice(o,s)),l=r.indexOf(":");if(-1!==l){var c=n.trim(r.slice(0,l)),p=n.trim(r.slice(l+1));if(c){var u=e(o,a.length,c,p,r);u&&(a+=u+"; ")}}}o=s+1}for(;s ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:k,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n?(?!hr|heading|lheading| {0,3}>|tag)[^\n]+)+)/,text:/^[^\n]+/};function a(t){this.tokens=[],this.tokens.links={},this.options=t||w.defaults,this.rules=s.normal,this.options.gfm&&(this.options.tables?this.rules=s.tables:this.rules=s.gfm)}s._label=/(?:\\[\[\]]|[^\[\]])+/,s._title=/(?:"(?:\\"|[^"]|"[^"\n]*")*"|'\n?(?:[^'\n]+\n?)*'|\([^()]*\))/,s.def=f(s.def).replace("label",s._label).replace("title",s._title).getRegex(),s.bullet=/(?:[*+-]|\d+\.)/,s.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,s.item=f(s.item,"gm").replace(/bull/g,s.bullet).getRegex(),s.list=f(s.list).replace(/bull/g,s.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+s.def.source+")").getRegex(),s._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b",s.html=f(s.html).replace("comment",//).replace("closed",/<(tag)[\s\S]+?<\/\1>/).replace("closing",/\s]*)*?\/?>/).replace(/tag/g,s._tag).getRegex(),s.paragraph=f(s.paragraph).replace("hr",s.hr).replace("heading",s.heading).replace("lheading",s.lheading).replace("tag","<"+s._tag).getRegex(),s.blockquote=f(s.blockquote).replace("paragraph",s.paragraph).getRegex(),s.normal=y({},s),s.gfm=y({},s.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),s.gfm.paragraph=f(s.paragraph).replace("(?!","(?!"+s.gfm.fences.source.replace("\\1","\\2")+"|"+s.list.source.replace("\\1","\\3")+"|").getRegex(),s.tables=y({},s.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),a.rules=s,a.lex=function(t,e){return new a(e).lex(t)},a.prototype.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(t,!0)},a.prototype.token=function(t,e){var r,n,i,o,a,l,c,p,u,g,h;for(t=t.replace(/^ +$/gm,"");t;)if((i=this.rules.newline.exec(t))&&(t=t.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(t))t=t.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(t))t=t.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]||""});else if(i=this.rules.heading.exec(t))t=t.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(e&&(i=this.rules.nptable.exec(t))){for(t=t.substring(i[0].length),l={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},p=0;p ?/gm,""),this.token(i,e),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(t)){for(t=t.substring(i[0].length),h=(o=i[2]).length>1,this.tokens.push({type:"list_start",ordered:h,start:h?+o:""}),r=!1,g=(i=i[0].match(this.rules.item)).length,p=0;p1&&a.length>1||(t=i.slice(p+1).join("\n")+t,p=g-1)),n=r||/\n\n(?!\s*$)/.test(l),p!==g-1&&(r="\n"===l.charAt(l.length-1),n||(n=r)),this.tokens.push({type:n?"loose_item_start":"list_item_start"}),this.token(l,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(t))t=t.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(e&&(i=this.rules.def.exec(t)))t=t.substring(i[0].length),i[3]&&(i[3]=i[3].substring(1,i[3].length-1)),u=i[1].toLowerCase(),this.tokens.links[u]||(this.tokens.links[u]={href:i[2],title:i[3]});else if(e&&(i=this.rules.table.exec(t))){for(t=t.substring(i[0].length),l={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},p=0;p])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:k,tag:/^|^<\/?[a-zA-Z0-9\-]+(?:"[^"]*"|'[^']*'|\s[^<'">\/\s]*)*?\/?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^_([^\s_](?:[^_]|__)+?[^\s_])_\b|^\*((?:\*\*|[^*])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:k,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function d(t){return t.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""})}function f(t,e){return t=t.source,e=e||"",{replace:function(e,r){return r=(r=r.source||r).replace(/(^|[^\[])\^/g,"$1"),t=t.replace(e,r),this},getRegex:function(){return new RegExp(t,e)}}}function m(t,e){return b[" "+t]||(/^[^:]+:\/*[^/]*$/.test(t)?b[" "+t]=t+"/":b[" "+t]=t.replace(/[^/]*$/,"")),t=b[" "+t],"//"===e.slice(0,2)?t.replace(/:[\s\S]*/,":")+e:"/"===e.charAt(0)?t.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+e:t+e}l._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,l._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,l.autolink=f(l.autolink).replace("scheme",l._scheme).replace("email",l._email).getRegex(),l._inside=/(?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]]|\](?=[^\[]*\]))*/,l._href=/\s*?(?:\s+['"]([\s\S]*?)['"])?\s*/,l.link=f(l.link).replace("inside",l._inside).replace("href",l._href).getRegex(),l.reflink=f(l.reflink).replace("inside",l._inside).getRegex(),l.normal=y({},l),l.pedantic=y({},l.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),l.gfm=y({},l.normal,{escape:f(l.escape).replace("])","~|])").getRegex(),url:f(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",l._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:f(l.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),l.breaks=y({},l.gfm,{br:f(l.br).replace("{2,}","*").getRegex(),text:f(l.gfm.text).replace("{2,}","*").getRegex()}),c.rules=l,c.output=function(t,e,r){return new c(e,r).output(t)},c.prototype.output=function(t){for(var e,r,n,i,o="";t;)if(i=this.rules.escape.exec(t))t=t.substring(i[0].length),o+=i[1];else if(i=this.rules.autolink.exec(t))t=t.substring(i[0].length),n="@"===i[2]?"mailto:"+(r=h(this.mangle(i[1]))):r=h(i[1]),o+=this.renderer.link(n,null,r);else if(this.inLink||!(i=this.rules.url.exec(t))){if(i=this.rules.tag.exec(t))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),t=t.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):h(i[0]):i[0];else if(i=this.rules.link.exec(t))t=t.substring(i[0].length),this.inLink=!0,o+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(t))||(i=this.rules.nolink.exec(t))){if(t=t.substring(i[0].length),e=(i[2]||i[1]).replace(/\s+/g," "),!(e=this.links[e.toLowerCase()])||!e.href){o+=i[0].charAt(0),t=i[0].substring(1)+t;continue}this.inLink=!0,o+=this.outputLink(i,e),this.inLink=!1}else if(i=this.rules.strong.exec(t))t=t.substring(i[0].length),o+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(t))t=t.substring(i[0].length),o+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(t))t=t.substring(i[0].length),o+=this.renderer.codespan(h(i[2].trim(),!0));else if(i=this.rules.br.exec(t))t=t.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(t))t=t.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(t))t=t.substring(i[0].length),o+=this.renderer.text(h(this.smartypants(i[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else i[0]=this.rules._backpedal.exec(i[0])[0],t=t.substring(i[0].length),"@"===i[2]?n="mailto:"+(r=h(i[0])):(r=h(i[0]),n="www."===i[1]?"http://"+r:r),o+=this.renderer.link(n,null,r);return o},c.prototype.outputLink=function(t,e){var r=h(e.href),n=e.title?h(e.title):null;return"!"!==t[0].charAt(0)?this.renderer.link(r,n,this.output(t[1])):this.renderer.image(r,n,h(t[1]))},c.prototype.smartypants=function(t){return this.options.smartypants?t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):t},c.prototype.mangle=function(t){if(!this.options.mangle)return t;for(var e,r="",n=t.length,i=0;i.5&&(e="x"+e.toString(16)),r+="&#"+e+";";return r},p.prototype.code=function(t,e,r){if(this.options.highlight){var n=this.options.highlight(t,e);null!=n&&n!==t&&(r=!0,t=n)}return e?'
    '+(r?t:h(t,!0))+"\n
    \n":"
    "+(r?t:h(t,!0))+"\n
    "},p.prototype.blockquote=function(t){return"
    \n"+t+"
    \n"},p.prototype.html=function(t){return t},p.prototype.heading=function(t,e,r){return"'+t+"\n"},p.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},p.prototype.list=function(t,e,r){var n=e?"ol":"ul";return"<"+n+(e&&1!==r?' start="'+r+'"':"")+">\n"+t+"\n"},p.prototype.listitem=function(t){return"
  • "+t+"
  • \n"},p.prototype.paragraph=function(t){return"

    "+t+"

    \n"},p.prototype.table=function(t,e){return"\n\n"+t+"\n\n"+e+"\n
    \n"},p.prototype.tablerow=function(t){return"\n"+t+"\n"},p.prototype.tablecell=function(t,e){var r=e.header?"th":"td";return(e.align?"<"+r+' style="text-align:'+e.align+'">':"<"+r+">")+t+"\n"},p.prototype.strong=function(t){return""+t+""},p.prototype.em=function(t){return""+t+""},p.prototype.codespan=function(t){return""+t+""},p.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},p.prototype.del=function(t){return""+t+""},p.prototype.link=function(t,e,r){if(this.options.sanitize){try{var n=decodeURIComponent(d(t)).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return r}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return r}this.options.baseUrl&&!x.test(t)&&(t=m(this.options.baseUrl,t));var i='
    "+r+""},p.prototype.image=function(t,e,r){this.options.baseUrl&&!x.test(t)&&(t=m(this.options.baseUrl,t));var n=''+r+'":">")},p.prototype.text=function(t){return t},u.prototype.strong=u.prototype.em=u.prototype.codespan=u.prototype.del=u.prototype.text=function(t){return t},u.prototype.link=u.prototype.image=function(t,e,r){return""+r},u.prototype.br=function(){return""},g.parse=function(t,e){return new g(e).parse(t)},g.prototype.parse=function(t){this.inline=new c(t.links,this.options),this.inlineText=new c(t.links,y({},this.options,{renderer:new u})),this.tokens=t.reverse();for(var e="";this.next();)e+=this.tok();return e},g.prototype.next=function(){return this.token=this.tokens.pop()},g.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},g.prototype.parseText=function(){for(var t=this.token.text;"text"===this.peek().type;)t+="\n"+this.next().text;return this.inline.output(t)},g.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,d(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,e,r,n,i="",o="";for(r="",t=0;tAn error occurred:

    "+h(t.message+"",!0)+"
    ";throw t}}k.exec=k,w.options=w.setOptions=function(t){return y(w.defaults,t),w},w.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new p,xhtml:!1,baseUrl:null},w.Parser=g,w.parser=g.parse,w.Renderer=p,w.TextRenderer=u,w.Lexer=a,w.lexer=a.lex,w.InlineLexer=c,w.inlineLexer=c.output,w.parse=w,void 0!==t&&"object"===o(e)?t.exports=w:void 0===(i=function(){return w}.call(e,r,e,t))||(t.exports=i)}(this||"undefined"!=typeof window&&window)}).call(this,r(19))}]]);(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{21:function(n,r,t){"use strict";t.r(r),t.d(r,"marked",function(){return a}),t.d(r,"filterXSS",function(){return c});var e=t(20),i=t.n(e),o=t(18),u=t.n(o),a=i.a,c=u.a}}]); diff --git a/hassio/api/panel/hassio-app.html.gz b/hassio/api/panel/hassio-app.html.gz index ef6857a97..1418dcd3e 100644 Binary files a/hassio/api/panel/hassio-app.html.gz and b/hassio/api/panel/hassio-app.html.gz differ diff --git a/hassio/api/panel/index.html.gz b/hassio/api/panel/index.html.gz index 25ecd6619..a46b4a704 100644 Binary files a/hassio/api/panel/index.html.gz and b/hassio/api/panel/index.html.gz differ diff --git a/home-assistant-polymer b/home-assistant-polymer index b43b34263..626b05454 160000 --- a/home-assistant-polymer +++ b/home-assistant-polymer @@ -1 +1 @@ -Subproject commit b43b34263ea81054c2490f87cea0273e26706fb4 +Subproject commit 626b05454031523c1208515afe5d3012c458f32d