diff --git a/hassio/api/panel/chunk.05994812bec7a524b566.js b/hassio/api/panel/chunk.05994812bec7a524b566.js new file mode 100644 index 000000000..6f6dc8e70 --- /dev/null +++ b/hassio/api/panel/chunk.05994812bec7a524b566.js @@ -0,0 +1 @@ +(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:"_getIcon",value:function(e){return(e?"hassio":"hass")+":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},hassio:{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 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 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'])}})),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.05994812bec7a524b566.js.gz b/hassio/api/panel/chunk.05994812bec7a524b566.js.gz new file mode 100644 index 000000000..cadb60d63 Binary files /dev/null and b/hassio/api/panel/chunk.05994812bec7a524b566.js.gz differ diff --git a/hassio/api/panel/chunk.ff92199b0d422767d108.js b/hassio/api/panel/chunk.ff92199b0d422767d108.js new file mode 100644 index 000000000..3ea11f5e0 --- /dev/null +++ b/hassio/api/panel/chunk.ff92199b0d422767d108.js @@ -0,0 +1 @@ +(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