\n Protection mode on this add-on is disabled! This gives the add-on full access to the entire system, which adds security risks, and could damage your system when used incorrectly. Only disable the protection mode if you know, need AND trust the source of this add-on.\n
\n \n\n ","\n "]);return Mt=function(){return e},e}function Ut(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Lt(e){return(Lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bt(e,t){return(Bt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qt(e){var t,r=Kt(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:r,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function Wt(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function Gt(e){return e.decorators&&e.decorators.length}function Yt(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function Jt(e,t){var r=e[t];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+t+"' to be a function");return r}function Kt(e){var t=function(e,t){if("object"!==rt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==rt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===rt(t)?t:String(t)}function Qt(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Xt(e){if(Array.isArray(e))return e}var Zt={rating:{title:"Add-on Security Rating",description:"Hass.io provides a security rating to each of the add-ons, which indicates the risks involved when using this add-on. The more access an add-on requires on your system, the lower the score, thus raising the possible security risks.\n\nA score is on a scale from 1 to 6. Where 1 is the lowest score (considered the most insecure and highest risk) and a score of 6 is the highest score (considered the most secure and lowest risk)."},host_network:{title:"Host Network",description:"Add-ons usually run in their own isolated network layer, which prevents them from accessing the network of the host operating system. In some cases, this network isolation can limit add-ons in providing their services and therefore, the isolation can be lifted by the add-on author, giving the add-on full access to the network capabilities of the host machine. This gives the add-on more networking capabilities but lowers the security, hence, the security rating of the add-on will be lowered when this option is used by the add-on."},homeassistant_api:{title:"Home Assistant API Access",description:"This add-on is allowed to access your running Home Assistant instance directly via the Home Assistant API. This mode handles authentication for the add-on as well, which enables an add-on to interact with Home Assistant without the need for additional authentication tokens."},full_access:{title:"Full Hardware Access",description:"This add-on is given full access to the hardware of your system, by request of the add-on author. Access is comparable to the privileged mode in Docker. Since this opens up possible security risks, this feature impacts the add-on security score negatively.\n\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on."},hassio_api:{title:"Hass.io API Access",description:"The add-on was given access to the Hass.io API, by request of the add-on author. By default, the add-on can access general version information of your system. When the add-on requests 'manager' or 'admin' level access to the API, it will gain access to control multiple parts of your Hass.io system. This permission is indicated by this badge and will impact the security score of the addon negatively."},docker_api:{title:"Full Docker Access",description:"The add-on author has requested the add-on to have management access to the Docker instance running on your system. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\n\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on."},host_pid:{title:"Host Processes Namespace",description:"Usually, the processes the add-on runs, are isolated from all other system processes. The add-on author has requested the add-on to have access to the system processes running on the host system instance, and allow the add-on to spawn processes on the host system as well. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\n\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on."},apparmor:{title:"AppArmor",description:"AppArmor ('Application Armor') is a Linux kernel security module that restricts add-ons capabilities like network access, raw socket access, and permission to read, write, or execute specific files.\n\nAdd-on authors can provide their security profiles, optimized for the add-on, or request it to be disabled. If AppArmor is disabled, it will raise security risks and therefore, has a negative impact on the security score of the add-on."},auth_api:{title:"Home Assistant Authentication",description:"An add-on can authenticate users against Home Assistant, allowing add-ons to give users the possibility to log into applications running inside add-ons, using their Home Assistant username/password. This badge indicates if the add-on author requests this capability."},ingress:{title:"Ingress",description:"This add-on is using Ingress to embed its interface securely into Home Assistant."}},$t=(function(e,t,r,n){var i=function(){var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(r){t.forEach(function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}},this)},this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!Gt(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a0||"0"===t&&Number(r)>=92}},{kind:"method",key:"_startOnBootToggled",value:function(){var e=it(regeneratorRuntime.mark(function e(){var t,r,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={boot:"auto"===this.addon.boot?"manual":"auto"},e.prev=2,e.next=5,Object(i.g)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},Object(C.a)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error="Failed to set addon option, ".concat((null===(n=e.t0.body)||void 0===n?void 0:n.message)||e.t0);case 12:case"end":return e.stop()}},e,this,[[2,9]])}));return function(){return e.apply(this,arguments)}}()},{kind:"method",key:"_autoUpdateToggled",value:function(){var e=it(regeneratorRuntime.mark(function e(){var t,r,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={auto_update:!this.addon.auto_update},e.prev=2,e.next=5,Object(i.g)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},Object(C.a)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error="Failed to set addon option, ".concat((null===(n=e.t0.body)||void 0===n?void 0:n.message)||e.t0);case 12:case"end":return e.stop()}},e,this,[[2,9]])}));return function(){return e.apply(this,arguments)}}()},{kind:"method",key:"_protectionToggled",value:function(){var e=it(regeneratorRuntime.mark(function e(){var t,r,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={protected:!this.addon.protected},e.prev=2,e.next=5,Object(i.h)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"security"},Object(C.a)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error="Failed to set addon security option, ".concat((null===(n=e.t0.body)||void 0===n?void 0:n.message)||e.t0);case 12:case"end":return e.stop()}},e,this,[[2,9]])}));return function(){return e.apply(this,arguments)}}()},{kind:"method",key:"_panelToggled",value:function(){var e=it(regeneratorRuntime.mark(function e(){var t,r,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,t={ingress_panel:!this.addon.ingress_panel},e.prev=2,e.next=5,Object(i.g)(this.hass,this.addon.slug,t);case 5:r={success:!0,response:void 0,path:"option"},Object(C.a)(this,"hass-api-called",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error="Failed to set addon option, ".concat((null===(n=e.t0.body)||void 0===n?void 0:n.message)||e.t0);case 12:case"end":return e.stop()}},e,this,[[2,9]])}));return function(){return e.apply(this,arguments)}}()},{kind:"method",key:"_openChangelog",value:function(){var e=it(regeneratorRuntime.mark(function e(){var t,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,e.prev=1,e.next=4,Object(i.a)(this.hass,this.addon.slug);case 4:t=e.sent,Object(tt.a)(this,{title:"Changelog",content:t}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this._error="Failed to get addon changelog, ".concat((null===(r=e.t0.body)||void 0===r?void 0:r.message)||e.t0);case 11:case"end":return e.stop()}},e,this,[[1,8]])}));return function(){return e.apply(this,arguments)}}()},{kind:"method",key:"_installClicked",value:function(){var e=it(regeneratorRuntime.mark(function e(){var t,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._error=void 0,this._installing=!0,e.prev=2,e.next=5,Object(i.e)(this.hass,this.addon.slug);case 5:t={success:!0,response:void 0,path:"install"},Object(C.a)(this,"hass-api-called",t),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),this._error="Failed to install addon, ".concat((null===(r=e.t0.body)||void 0===r?void 0:r.message)||e.t0);case 12:this._installing=!1;case 13:case"end":return e.stop()}},e,this,[[2,9]])}));return function(){return e.apply(this,arguments)}}()},{kind:"method",key:"_uninstallClicked",value:function(){var e=it(regeneratorRuntime.mark(function e(){var t,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(confirm("Are you sure you want to uninstall this add-on?")){e.next=2;break}return e.abrupt("return");case 2:return this._error=void 0,e.prev=3,e.next=6,Object(i.i)(this.hass,this.addon.slug);case 6:t={success:!0,response:void 0,path:"uninstall"},Object(C.a)(this,"hass-api-called",t),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),this._error="Failed to uninstall addon, ".concat((null===(r=e.t0.body)||void 0===r?void 0:r.message)||e.t0);case 13:case"end":return e.stop()}},e,this,[[3,10]])}));return function(){return e.apply(this,arguments)}}()}]}},n.a),r(119));function er(e){return(er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tr(){var e=ir(["\n :host,\n paper-card {\n display: block;\n }\n pre {\n overflow-x: auto;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n "]);return tr=function(){return e},e}function rr(){var e=ir(['\n
\n `;\n }\n\n static get styles(): CSSResult[] {\n return [\n css`\n .badge-container {\n display: inline-block;\n text-align: center;\n vertical-align: top;\n }\n .label-badge {\n position: relative;\n display: block;\n margin: 0 auto;\n width: var(--ha-label-badge-size, 2.5em);\n text-align: center;\n height: var(--ha-label-badge-size, 2.5em);\n line-height: var(--ha-label-badge-size, 2.5em);\n font-size: var(--ha-label-badge-font-size, 1.5em);\n border-radius: 50%;\n border: 0.1em solid var(--ha-label-badge-color, var(--primary-color));\n color: var(--label-badge-text-color, rgb(76, 76, 76));\n\n white-space: nowrap;\n background-color: var(--label-badge-background-color, white);\n background-size: cover;\n transition: border 0.3s ease-in-out;\n }\n .label-badge .value {\n font-size: 90%;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .label-badge .value.big {\n font-size: 70%;\n }\n .label-badge .label {\n position: absolute;\n bottom: -1em;\n /* Make the label as wide as container+border. (parent_borderwidth / font-size) */\n left: -0.2em;\n right: -0.2em;\n line-height: 1em;\n font-size: 0.5em;\n }\n .label-badge .label span {\n box-sizing: border-box;\n max-width: 100%;\n display: inline-block;\n background-color: var(--ha-label-badge-color, var(--primary-color));\n color: var(--ha-label-badge-label-color, white);\n border-radius: 1em;\n padding: 9% 16% 8% 16%; /* mostly apitalized text, not much descenders => bit more top margin */\n font-weight: 500;\n overflow: hidden;\n text-transform: uppercase;\n text-overflow: ellipsis;\n transition: background-color 0.3s ease-in-out;\n text-transform: var(--ha-label-badge-label-text-transform, uppercase);\n }\n .label-badge .label.big span {\n font-size: 90%;\n padding: 10% 12% 7% 12%; /* push smaller text a bit down to center vertically */\n }\n .badge-container .title {\n margin-top: 1em;\n font-size: var(--ha-label-badge-title-font-size, 0.9em);\n width: var(--ha-label-badge-title-width, 5em);\n font-weight: var(--ha-label-badge-title-font-weight, 400);\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: normal;\n }\n `,\n ];\n }\n\n protected updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has(\"image\")) {\n this.shadowRoot!.getElementById(\"badge\")!.style.backgroundImage = this\n .image\n ? `url(${this.image})`\n : \"\";\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-label-badge\": HaLabelBadge;\n }\n}\n\ncustomElements.define(\"ha-label-badge\", HaLabelBadge);\n","import \"@material/mwc-button\";\nimport \"@polymer/iron-icon/iron-icon\";\nimport \"@polymer/paper-card/paper-card\";\nimport \"@polymer/paper-tooltip/paper-tooltip\";\nimport {\n css,\n CSSResult,\n customElement,\n html,\n LitElement,\n property,\n TemplateResult,\n} from \"lit-element\";\nimport { classMap } from \"lit-html/directives/class-map\";\n\nimport \"../../../src/components/buttons/ha-call-api-button\";\nimport \"../../../src/components/buttons/ha-progress-button\";\nimport \"../../../src/components/ha-label-badge\";\nimport \"../../../src/components/ha-markdown\";\nimport \"../../../src/components/ha-switch\";\nimport \"../components/hassio-card-content\";\n\nimport { fireEvent } from \"../../../src/common/dom/fire_event\";\nimport {\n HassioAddonDetails,\n HassioAddonSetOptionParams,\n HassioAddonSetSecurityParams,\n setHassioAddonOption,\n setHassioAddonSecurity,\n uninstallHassioAddon,\n installHassioAddon,\n fetchHassioAddonChangelog,\n} from \"../../../src/data/hassio/addon\";\nimport { hassioStyle } from \"../resources/hassio-style\";\nimport { haStyle } from \"../../../src/resources/styles\";\nimport { HomeAssistant } from \"../../../src/types\";\nimport { navigate } from \"../../../src/common/navigate\";\nimport { showHassioMarkdownDialog } from \"../dialogs/markdown/show-dialog-hassio-markdown\";\n\nconst PERMIS_DESC = {\n rating: {\n title: \"Add-on Security Rating\",\n description:\n \"Hass.io provides a security rating to each of the add-ons, which indicates the risks involved when using this add-on. The more access an add-on requires on your system, the lower the score, thus raising the possible security risks.\\n\\nA score is on a scale from 1 to 6. Where 1 is the lowest score (considered the most insecure and highest risk) and a score of 6 is the highest score (considered the most secure and lowest risk).\",\n },\n host_network: {\n title: \"Host Network\",\n description:\n \"Add-ons usually run in their own isolated network layer, which prevents them from accessing the network of the host operating system. In some cases, this network isolation can limit add-ons in providing their services and therefore, the isolation can be lifted by the add-on author, giving the add-on full access to the network capabilities of the host machine. This gives the add-on more networking capabilities but lowers the security, hence, the security rating of the add-on will be lowered when this option is used by the add-on.\",\n },\n homeassistant_api: {\n title: \"Home Assistant API Access\",\n description:\n \"This add-on is allowed to access your running Home Assistant instance directly via the Home Assistant API. This mode handles authentication for the add-on as well, which enables an add-on to interact with Home Assistant without the need for additional authentication tokens.\",\n },\n full_access: {\n title: \"Full Hardware Access\",\n description:\n \"This add-on is given full access to the hardware of your system, by request of the add-on author. Access is comparable to the privileged mode in Docker. Since this opens up possible security risks, this feature impacts the add-on security score negatively.\\n\\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on.\",\n },\n hassio_api: {\n title: \"Hass.io API Access\",\n description:\n \"The add-on was given access to the Hass.io API, by request of the add-on author. By default, the add-on can access general version information of your system. When the add-on requests 'manager' or 'admin' level access to the API, it will gain access to control multiple parts of your Hass.io system. This permission is indicated by this badge and will impact the security score of the addon negatively.\",\n },\n docker_api: {\n title: \"Full Docker Access\",\n description:\n \"The add-on author has requested the add-on to have management access to the Docker instance running on your system. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\\n\\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on.\",\n },\n host_pid: {\n title: \"Host Processes Namespace\",\n description:\n \"Usually, the processes the add-on runs, are isolated from all other system processes. The add-on author has requested the add-on to have access to the system processes running on the host system instance, and allow the add-on to spawn processes on the host system as well. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\\n\\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on.\",\n },\n apparmor: {\n title: \"AppArmor\",\n description:\n \"AppArmor ('Application Armor') is a Linux kernel security module that restricts add-ons capabilities like network access, raw socket access, and permission to read, write, or execute specific files.\\n\\nAdd-on authors can provide their security profiles, optimized for the add-on, or request it to be disabled. If AppArmor is disabled, it will raise security risks and therefore, has a negative impact on the security score of the add-on.\",\n },\n auth_api: {\n title: \"Home Assistant Authentication\",\n description:\n \"An add-on can authenticate users against Home Assistant, allowing add-ons to give users the possibility to log into applications running inside add-ons, using their Home Assistant username/password. This badge indicates if the add-on author requests this capability.\",\n },\n ingress: {\n title: \"Ingress\",\n description:\n \"This add-on is using Ingress to embed its interface securely into Home Assistant.\",\n },\n};\n\n@customElement(\"hassio-addon-info\")\nclass HassioAddonInfo extends LitElement {\n @property() public hass!: HomeAssistant;\n @property() public addon!: HassioAddonDetails;\n @property() private _error?: string;\n @property({ type: Boolean }) private _installing = false;\n\n protected render(): TemplateResult {\n return html`\n ${this._computeUpdateAvailable\n ? html`\n \n
\n \n ${!this.addon.available\n ? html`\n
\n This update is no longer compatible with your system.\n
\n Protection mode on this add-on is disabled! This gives the add-on full access to the entire system, which adds security risks, and could damage your system when used incorrectly. Only disable the protection mode if you know, need AND trust the source of this add-on.\n
\n \n \n \n \n \n `;\n }\n\n static get styles(): CSSResult[] {\n return [\n haStyleDialog,\n hassioStyle,\n css`\n ha-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 ha-paper-dialog {\n max-height: 100%;\n }\n ha-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\ndeclare global {\n interface HTMLElementTagNameMap {\n \"dialog-hassio-markdown\": HassioMarkdownDialog;\n }\n}\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {IronOverlayBehavior} from '@polymer/iron-overlay-behavior/iron-overlay-behavior.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\n\n/**\n Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to\n implement a Material Design dialog.\n\n For example, if `` implements this behavior:\n\n \n
Header
\n
Dialog body
\n
\n Cancel\n Accept\n
\n \n\n `paper-dialog-shared-styles.html` provide styles for a header, content area,\n and an action area for buttons. Use the `
` tag for the header and the\n `buttons` class for the action area. You can use the `paper-dialog-scrollable`\n element (in its own repository) if you need a scrolling content area.\n\n Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive\n controls to close the dialog. If the user dismisses the dialog with\n `dialog-confirm`, the `closingReason` will update to include `confirmed:\n true`.\n\n ### Accessibility\n\n This element has `role=\"dialog\"` by default. Depending on the context, it may\n be more appropriate to override this attribute with `role=\"alertdialog\"`.\n\n If `modal` is set, the element will prevent the focus from exiting the\n element. It will also ensure that focus remains in the dialog.\n\n @hero hero.svg\n @demo demo/index.html\n @polymerBehavior PaperDialogBehavior\n */\nexport const PaperDialogBehaviorImpl = {\n\n hostAttributes: {'role': 'dialog', 'tabindex': '-1'},\n\n properties: {\n\n /**\n * If `modal` is true, this implies `no-cancel-on-outside-click`,\n * `no-cancel-on-esc-key` and `with-backdrop`.\n */\n modal: {type: Boolean, value: false},\n\n __readied: {type: Boolean, value: false}\n\n },\n\n observers: ['_modalChanged(modal, __readied)'],\n\n listeners: {'tap': '_onDialogClick'},\n\n /**\n * @return {void}\n */\n ready: function() {\n // Only now these properties can be read.\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.__readied = true;\n },\n\n _modalChanged: function(modal, readied) {\n // modal implies noCancelOnOutsideClick, noCancelOnEscKey and withBackdrop.\n // We need to wait for the element to be ready before we can read the\n // properties values.\n if (!readied) {\n return;\n }\n\n if (modal) {\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.noCancelOnOutsideClick = true;\n this.noCancelOnEscKey = true;\n this.withBackdrop = true;\n } else {\n // If the value was changed to false, let it false.\n this.noCancelOnOutsideClick =\n this.noCancelOnOutsideClick && this.__prevNoCancelOnOutsideClick;\n this.noCancelOnEscKey =\n this.noCancelOnEscKey && this.__prevNoCancelOnEscKey;\n this.withBackdrop = this.withBackdrop && this.__prevWithBackdrop;\n }\n },\n\n _updateClosingReasonConfirmed: function(confirmed) {\n this.closingReason = this.closingReason || {};\n this.closingReason.confirmed = confirmed;\n },\n\n /**\n * Will dismiss the dialog if user clicked on an element with dialog-dismiss\n * or dialog-confirm attribute.\n */\n _onDialogClick: function(event) {\n // Search for the element with dialog-confirm or dialog-dismiss,\n // from the root target until this (excluded).\n var path = dom(event).path;\n for (var i = 0, l = path.indexOf(this); i < l; i++) {\n var target = path[i];\n if (target.hasAttribute &&\n (target.hasAttribute('dialog-dismiss') ||\n target.hasAttribute('dialog-confirm'))) {\n this._updateClosingReasonConfirmed(\n target.hasAttribute('dialog-confirm'));\n this.close();\n event.stopPropagation();\n break;\n }\n }\n }\n\n};\n\n/** @polymerBehavior */\nexport const PaperDialogBehavior =\n [IronOverlayBehavior, PaperDialogBehaviorImpl];\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\n\nimport {PaperDialogBehaviorImpl} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`paper-dialog-scrollable` implements a scrolling area used in a Material Design\ndialog. It shows a divider at the top and/or bottom indicating more content,\ndepending on scroll position. Use this together with elements implementing\n`Polymer.PaperDialogBehavior`.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n OK\n
\n \n\nIt shows a top divider after scrolling if it is not the first child in its\nparent container, indicating there is more content above. It shows a bottom\ndivider if it is scrollable and it is not the last child in its parent\ncontainer, indicating there is more content below. The bottom divider is hidden\nif it is scrolled to the bottom.\n\nIf `paper-dialog-scrollable` is not a direct child of the element implementing\n`Polymer.PaperDialogBehavior`, remember to set the `dialogElement`:\n\n \n
Header
\n
\n
Sub-header
\n \n Lorem ipsum...\n \n
\n
\n OK\n
\n \n\n \n\n### Styling\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-scrollable` | Mixin for the scrollable content | {}\n\n@group Paper Elements\n@element paper-dialog-scrollable\n@demo demo/index.html\n@hero hero.svg\n*/\nPolymer({\n _template: html`\n \n\n
\n \n
\n`,\n\n is: 'paper-dialog-scrollable',\n\n properties: {\n\n /**\n * The dialog element that implements `Polymer.PaperDialogBehavior`\n * containing this element.\n * @type {?Node}\n */\n dialogElement: {type: Object}\n\n },\n\n /**\n * Returns the scrolling element.\n */\n get scrollTarget() {\n return this.$.scrollable;\n },\n\n ready: function() {\n this._ensureTarget();\n this.classList.add('no-padding');\n },\n\n attached: function() {\n this._ensureTarget();\n requestAnimationFrame(this.updateScrollState.bind(this));\n },\n\n updateScrollState: function() {\n this.toggleClass('is-scrolled', this.scrollTarget.scrollTop > 0);\n this.toggleClass(\n 'can-scroll',\n this.scrollTarget.offsetHeight < this.scrollTarget.scrollHeight);\n this.toggleClass(\n 'scrolled-to-bottom',\n this.scrollTarget.scrollTop + this.scrollTarget.offsetHeight >=\n this.scrollTarget.scrollHeight);\n },\n\n _ensureTarget: function() {\n // Read parentElement instead of parentNode in order to skip shadowRoots.\n this.dialogElement = this.dialogElement || this.parentElement;\n // Check if dialog implements paper-dialog-behavior. If not, fit\n // scrollTarget to host.\n if (this.dialogElement && this.dialogElement.behaviors &&\n this.dialogElement.behaviors.indexOf(PaperDialogBehaviorImpl) >= 0) {\n this.dialogElement.sizingTarget = this.scrollTarget;\n this.scrollTarget.classList.remove('fit');\n } else if (this.dialogElement) {\n this.scrollTarget.classList.add('fit');\n }\n }\n});\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n### Styling\n\nThe following custom properties and mixins are available for styling.\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-background-color` | Dialog background color | `--primary-background-color`\n`--paper-dialog-color` | Dialog foreground color | `--primary-text-color`\n`--paper-dialog` | Mixin applied to the dialog | `{}`\n`--paper-dialog-title` | Mixin applied to the title (`
`) element | `{}`\n`--paper-dialog-button-color` | Button area foreground color | `--default-primary-color`\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\nimport '@polymer/paper-styles/typography.js';\nimport '@polymer/paper-styles/shadow.js';\nconst $_documentContainer = document.createElement('template');\n$_documentContainer.setAttribute('style', 'display: none;');\n\n$_documentContainer.innerHTML = `\n \n \n \n`;\n\ndocument.head.appendChild($_documentContainer.content);\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/paper-dialog-behavior/paper-dialog-shared-styles.js';\n\nimport {NeonAnimationRunnerBehavior} from '@polymer/neon-animation/neon-animation-runner-behavior.js';\nimport {PaperDialogBehavior} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`` is a dialog with Material Design styling and optional\nanimations when it is opened or closed. It provides styles for a header, content\narea, and an action area for buttons. You can use the\n`` element (in its own repository) if you need a\nscrolling content area. To autofocus a specific child element after opening the\ndialog, give it the `autofocus` attribute. See `Polymer.PaperDialogBehavior` and\n`Polymer.IronOverlayBehavior` for specifics.\n\nFor example, the following code implements a dialog with a header, scrolling\ncontent area and buttons. Focus will be given to the `dialog-confirm` button\nwhen the dialog is opened.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n Cancel\n Accept\n
\n \n\n### Styling\n\nSee the docs for `Polymer.PaperDialogBehavior` for the custom properties\navailable for styling this element.\n\n### Animations\n\nSet the `entry-animation` and/or `exit-animation` attributes to add an animation\nwhen the dialog is opened or closed. See the documentation in\n[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation)\nfor more info.\n\nFor example:\n\n \n\n \n
Header
\n
Dialog body
\n \n\n### Accessibility\n\nSee the docs for `Polymer.PaperDialogBehavior` for accessibility features\nimplemented by this element.\n\n@group Paper Elements\n@element paper-dialog\n@hero hero.svg\n@demo demo/index.html\n*/\nPolymer({\n _template: html`\n \n \n`,\n\n is: 'paper-dialog',\n behaviors: [PaperDialogBehavior, NeonAnimationRunnerBehavior],\n listeners: {'neon-animation-finish': '_onNeonAnimationFinish'},\n\n _renderOpened: function() {\n this.cancelAnimation();\n this.playAnimation('entry');\n },\n\n _renderClosed: function() {\n this.cancelAnimation();\n this.playAnimation('exit');\n },\n\n _onNeonAnimationFinish: function() {\n if (this.opened) {\n this._finishRenderOpened();\n } else {\n this._finishRenderClosed();\n }\n }\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n Fixes issue with not using shadow dom properly in iron-overlay-behavior/icon-focusables-helper.js\n*/\nimport { dom } from \"@polymer/polymer/lib/legacy/polymer.dom.js\";\n\nimport { IronFocusablesHelper } from \"@polymer/iron-overlay-behavior/iron-focusables-helper.js\";\n\nexport const HaIronFocusablesHelper = {\n /**\n * Returns a sorted array of tabbable nodes, including the root node.\n * It searches the tabbable nodes in the light and shadow dom of the chidren,\n * sorting the result by tabindex.\n * @param {!Node} node\n * @return {!Array}\n */\n getTabbableNodes: function(node) {\n var result = [];\n // If there is at least one element with tabindex > 0, we need to sort\n // the final array by tabindex.\n var needsSortByTabIndex = this._collectTabbableNodes(node, result);\n if (needsSortByTabIndex) {\n return IronFocusablesHelper._sortByTabIndex(result);\n }\n return result;\n },\n\n /**\n * Searches for nodes that are tabbable and adds them to the `result` array.\n * Returns if the `result` array needs to be sorted by tabindex.\n * @param {!Node} node The starting point for the search; added to `result`\n * if tabbable.\n * @param {!Array} result\n * @return {boolean}\n * @private\n */\n _collectTabbableNodes: function(node, result) {\n // If not an element or not visible, no need to explore children.\n if (\n node.nodeType !== Node.ELEMENT_NODE ||\n !IronFocusablesHelper._isVisible(node)\n ) {\n return false;\n }\n var element = /** @type {!HTMLElement} */ (node);\n var tabIndex = IronFocusablesHelper._normalizedTabIndex(element);\n var needsSort = tabIndex > 0;\n if (tabIndex >= 0) {\n result.push(element);\n }\n\n // In ShadowDOM v1, tab order is affected by the order of distrubution.\n // E.g. getTabbableNodes(#root) in ShadowDOM v1 should return [#A, #B];\n // in ShadowDOM v0 tab order is not affected by the distrubution order,\n // in fact getTabbableNodes(#root) returns [#B, #A].\n //
\n // \n // \n // \n // \n // \n // \n //
\n // TODO(valdrin) support ShadowDOM v1 when upgrading to Polymer v2.0.\n var children;\n if (element.localName === \"content\" || element.localName === \"slot\") {\n children = dom(element).getDistributedNodes();\n } else {\n // /////////////////////////\n // Use shadow root if possible, will check for distributed nodes.\n // THIS IS THE CHANGED LINE\n children = dom(element.shadowRoot || element.root || element).children;\n // /////////////////////////\n }\n for (var i = 0; i < children.length; i++) {\n // Ensure method is always invoked to collect tabbable children.\n needsSort = this._collectTabbableNodes(children[i], result) || needsSort;\n }\n return needsSort;\n },\n};\n","import \"@polymer/paper-dialog/paper-dialog\";\nimport { mixinBehaviors } from \"@polymer/polymer/lib/legacy/class\";\nimport { HaIronFocusablesHelper } from \"./ha-iron-focusables-helper.js\";\n// tslint:disable-next-line\nimport { PaperDialogElement } from \"@polymer/paper-dialog/paper-dialog\";\n\nconst paperDialogClass = customElements.get(\"paper-dialog\");\n\n// behavior that will override existing iron-overlay-behavior and call the fixed implementation\nconst haTabFixBehaviorImpl = {\n get _focusableNodes() {\n return HaIronFocusablesHelper.getTabbableNodes(this);\n },\n};\n\n// paper-dialog that uses the haTabFixBehaviorImpl behvaior\n// export class HaPaperDialog extends paperDialogClass {}\n// @ts-ignore\nexport class HaPaperDialog\n extends mixinBehaviors([haTabFixBehaviorImpl], paperDialogClass)\n implements PaperDialogElement {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-paper-dialog\": HaPaperDialog;\n }\n}\ncustomElements.define(\"ha-paper-dialog\", HaPaperDialog);\n","import { UpdatingElement, property, customElement } from \"lit-element\";\n// eslint-disable-next-line import/no-webpack-loader-syntax\n// @ts-ignore\n// tslint:disable-next-line: no-implicit-dependencies\nimport markdownWorker from \"workerize-loader!../resources/markdown_worker\";\nimport { fireEvent } from \"../common/dom/fire_event\";\n\nlet worker: any | undefined;\n\n@customElement(\"ha-markdown\")\nclass HaMarkdown extends UpdatingElement {\n @property() public content = \"\";\n @property({ type: Boolean }) public allowSvg = false;\n\n protected update(changedProps) {\n super.update(changedProps);\n\n if (!worker) {\n worker = markdownWorker();\n }\n\n this._render();\n }\n\n private async _render() {\n this.innerHTML = await worker.renderMarkdown(\n this.content,\n {\n breaks: true,\n gfm: true,\n tables: true,\n },\n {\n allowSvg: this.allowSvg,\n }\n );\n\n this._resize();\n\n const walker = document.createTreeWalker(\n this,\n 1 /* SHOW_ELEMENT */,\n null,\n false\n );\n\n while (walker.nextNode()) {\n const node = walker.currentNode;\n\n // Open external links in a new window\n if (\n node instanceof HTMLAnchorElement &&\n node.host !== document.location.host\n ) {\n node.target = \"_blank\";\n\n // protect referrer on external links and deny window.opener access for security reasons\n // (see https://mathiasbynens.github.io/rel-noopener/)\n node.rel = \"noreferrer noopener\";\n\n // Fire a resize event when images loaded to notify content resized\n } else if (node) {\n node.addEventListener(\"load\", this._resize);\n }\n }\n }\n\n private _resize = () => fireEvent(this, \"iron-resize\");\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-markdown\": HaMarkdown;\n }\n}\n","\n\t\t\t\tvar addMethods = require(\"../../node_modules/workerize-loader/dist/rpc-wrapper.js\")\n\t\t\t\tvar methods = [\"renderMarkdown\"]\n\t\t\t\tmodule.exports = function() {\n\t\t\t\t\tvar w = new Worker(__webpack_public_path__ + \"a1ebfa0a88593a3b571c.worker.js\", { name: \"[hash].worker.js\" })\n\t\t\t\t\taddMethods(w, methods)\n\t\t\t\t\t\n\t\t\t\t\treturn w\n\t\t\t\t}\n\t\t\t","export default function addMethods(worker, methods) {\n\tlet c = 0;\n\tlet callbacks = {};\n\tworker.addEventListener('message', (e) => {\n\t\tlet d = e.data;\n\t\tif (d.type!=='RPC') return;\n\t\tif (d.id) {\n\t\t\tlet f = callbacks[d.id];\n\t\t\tif (f) {\n\t\t\t\tdelete callbacks[d.id];\n\t\t\t\tif (d.error) {\n\t\t\t\t\tf[1](Object.assign(Error(d.error.message), d.error));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tf[0](d.result);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tlet evt = document.createEvent('Event');\n\t\t\tevt.initEvent(d.method, false, false);\n\t\t\tevt.data = d.params;\n\t\t\tworker.dispatchEvent(evt);\n\t\t}\n\t});\n\tmethods.forEach( method => {\n\t\tworker[method] = (...params) => new Promise( (a, b) => {\n\t\t\tlet id = ++c;\n\t\t\tcallbacks[id] = [a, b];\n\t\t\tworker.postMessage({ type: 'RPC', id, method, params });\n\t\t});\n\t});\n}\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.35929da61d769e57c884.js b/supervisor/api/panel/chunk.35929da61d769e57c884.js
new file mode 100644
index 000000000..39b9253da
--- /dev/null
+++ b/supervisor/api/panel/chunk.35929da61d769e57c884.js
@@ -0,0 +1,2 @@
+(self.webpackJsonp=self.webpackJsonp||[]).push([[9],{176:function(e,t,r){"use strict";r.r(t);var n=r(5),i=r(64),o=r(27);r(107),r(105);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(){var e=d(["\n iframe {\n display: block;\n width: 100%;\n height: 100%;\n border: 0;\n }\n paper-icon-button {\n color: var(--text-primary-color);\n }\n "]);return a=function(){return e},e}function c(e,t){return E(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(c){i=!0,o=c}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||k()}function l(e,t,r,n,i,o,s){try{var a=e[o](s),c=a.value}catch(l){return void r(l)}a.done?t(c):Promise.resolve(c).then(n,i)}function f(){var e=d(["\n \n \n \n "]);return f=function(){return e},e}function u(){var e=d(["\n \n "]);return u=function(){return e},e}function d(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t,r=g(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:r,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function y(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function v(e){return e.decorators&&e.decorators.length}function b(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function w(e,t){var r=e[t];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+t+"' to be a function");return r}function g(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===s(t)?t:String(t)}function k(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function E(e){if(Array.isArray(e))return e}function O(e,t,r){return(O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=j(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e,t,r,n){var i=function(){var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(r){t.forEach(function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}},this)},this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!v(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var s=t[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(a)||a);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var f=0;f=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var s=0;s\n `;\n }\n\n return html`\n \n \n \n `;\n }\n\n protected updated(changedProps: PropertyValues) {\n super.firstUpdated(changedProps);\n\n if (!changedProps.has(\"route\")) {\n return;\n }\n\n const addon = this.route.path.substr(1);\n\n const oldRoute = changedProps.get(\"route\") as this[\"route\"] | undefined;\n const oldAddon = oldRoute ? oldRoute.path.substr(1) : undefined;\n\n if (addon && addon !== oldAddon) {\n this._fetchData(addon);\n }\n }\n\n private async _fetchData(addonSlug: string) {\n try {\n const [addon] = await Promise.all([\n fetchHassioAddonInfo(this.hass, addonSlug).catch(() => {\n throw new Error(\"Failed to fetch add-on info\");\n }),\n createHassioSession(this.hass).catch(() => {\n throw new Error(\"Failed to create an ingress session\");\n }),\n ]);\n\n if (!addon.ingress) {\n throw new Error(\"This add-on does not support ingress\");\n }\n\n this._addon = addon;\n } catch (err) {\n // tslint:disable-next-line\n console.error(err);\n alert(err.message || \"Unknown error starting ingress.\");\n history.back();\n }\n }\n\n static get styles(): CSSResult {\n return css`\n iframe {\n display: block;\n width: 100%;\n height: 100%;\n border: 0;\n }\n paper-icon-button {\n color: var(--text-primary-color);\n }\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"hassio-ingress-view\": HassioIngressView;\n }\n}\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.541d0b76b660d8646074.js b/supervisor/api/panel/chunk.541d0b76b660d8646074.js
new file mode 100644
index 000000000..f2f1b4189
--- /dev/null
+++ b/supervisor/api/panel/chunk.541d0b76b660d8646074.js
@@ -0,0 +1,3 @@
+/*! For license information please see chunk.541d0b76b660d8646074.js.LICENSE */
+(self.webpackJsonp=self.webpackJsonp||[]).push([[15],[,,,,,function(t,e,n){"use strict";var i=n(16),o=n(29),r=n(21),a=133;function s(t,e){for(var n=t.element.content,i=t.parts,o=document.createTreeWalker(n,a,null,!1),r=c(i),s=i[r],l=-1,d=0,u=[],p=null;o.nextNode();){l++;var h=o.currentNode;for(h.previousSibling===p&&(p=null),e.has(h)&&(u.push(h),null===p&&(p=h)),null!==p&&d++;void 0!==s&&s.index===l;)s.index=null!==p?-1:s.index-d,s=i[r=c(i,r)]}u.forEach(function(t){return t.parentNode.removeChild(t)})}var l=function(t){for(var e=11===t.nodeType?0:1,n=document.createTreeWalker(t,a,null,!1);n.nextNode();)e++;return e},c=function(t){for(var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1)+1;e2&&void 0!==arguments[2]?arguments[2]:null,i=t.element.content,o=t.parts;if(null!=n)for(var r=document.createTreeWalker(i,a,null,!1),s=c(o),d=0,u=-1;r.nextNode();)for(u++,r.currentNode===n&&(d=l(e),n.parentNode.insertBefore(e,n));-1!==s&&o[s].index===u;){if(d>0){for(;-1!==s;)o[s].index+=d,s=c(o,s);return}s=c(o,s)}else i.appendChild(e)}(n,d,b.firstChild):b.insertBefore(d,b.firstChild),window.ShadyCSS.prepareTemplateStyles(i,t);var v=b.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==v)e.insertBefore(v.cloneNode(!0),e.firstChild);else if(n){b.insertBefore(d,b.firstChild);var g=new Set;g.add(d),s(n,g)}}else window.ShadyCSS.prepareTemplateStyles(i,t)};function _(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e2&&void 0!==arguments[2]?arguments[2]:z,i=this.constructor,o=i._attributeNameForProperty(t,n);if(void 0!==o){var r=i._propertyValueToAttribute(e,n);if(void 0===r)return;this._updateState=8|this._updateState,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._updateState=-9&this._updateState}}},{key:"_attributeToProperty",value:function(t,e){if(!(8&this._updateState)){var n=this.constructor,i=n._attributeToPropertyMap.get(t);if(void 0!==i){var o=n._classProperties.get(i)||z;this._updateState=16|this._updateState,this[i]=n._propertyValueFromAttribute(e,o),this._updateState=-17&this._updateState}}}},{key:"_requestUpdate",value:function(t,e){var n=!0;if(void 0!==t){var i=this.constructor,o=i._classProperties.get(t)||z;i._valueHasChanged(this[t],e,o.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==o.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,o))):n=!1}!this._hasRequestedUpdate&&n&&this._enqueueUpdate()}},{key:"requestUpdate",value:function(t,e){return this._requestUpdate(t,e),this.updateComplete}},{key:"_enqueueUpdate",value:function(){var t,e=(t=regeneratorRuntime.mark(function t(){var e,n,i,o,r=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this._updateState=4|this._updateState,i=this._updatePromise,this._updatePromise=new Promise(function(t,i){e=t,n=i}),t.prev=3,t.next=6,i;case 6:t.next=10;break;case 8:t.prev=8,t.t0=t.catch(3);case 10:if(this._hasConnected){t.next=13;break}return t.next=13,new Promise(function(t){return r._hasConnectedResolver=t});case 13:if(t.prev=13,null==(o=this.performUpdate())){t.next=18;break}return t.next=18,o;case 18:t.next=23;break;case 20:t.prev=20,t.t1=t.catch(13),n(t.t1);case 23:e(!this._hasRequestedUpdate);case 24:case"end":return t.stop()}},t,this,[[3,8],[13,20]])}),function(){var e=this,n=arguments;return new Promise(function(i,o){var r=t.apply(e,n);function a(t){x(r,i,o,a,s,"next",t)}function s(t){x(r,i,o,a,s,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}()},{key:"performUpdate",value:function(){this._instanceProperties&&this._applyInstanceProperties();var t=!1,e=this._changedProperties;try{(t=this.shouldUpdate(e))&&this.update(e)}catch(n){throw t=!1,n}finally{this._markUpdated()}t&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(e)),this.updated(e))}},{key:"_markUpdated",value:function(){this._changedProperties=new Map,this._updateState=-5&this._updateState}},{key:"_getUpdateComplete",value:function(){return this._updatePromise}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach(function(t,n){return e._propertyToAttribute(n,e[n],t)}),this._reflectingProperties=void 0)}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}},{key:"_hasConnected",get:function(){return 32&this._updateState}},{key:"_hasRequestedUpdate",get:function(){return 4&this._updateState}},{key:"hasUpdated",get:function(){return 1&this._updateState}},{key:"updateComplete",get:function(){return this._getUpdateComplete()}}],o=[{key:"_ensureClassProperties",value:function(){var t=this;if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;var e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach(function(e,n){return t._classProperties.set(n,e)})}}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z;if(this._ensureClassProperties(),this._classProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){var n="symbol"===w(t)?Symbol():"__".concat(t);Object.defineProperty(this.prototype,t,{get:function(){return this[n]},set:function(e){var i=this[t];this[n]=e,this._requestUpdate(t,i)},configurable:!0,enumerable:!0})}}},{key:"finalize",value:function(){var t=Object.getPrototypeOf(this);if(t.hasOwnProperty("finalized")||t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){var e=this.properties,n=[].concat(_(Object.getOwnPropertyNames(e)),_("function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[])),i=!0,o=!1,r=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var l=a.value;this.createProperty(l,e[l])}}catch(c){o=!0,r=c}finally{try{i||null==s.return||s.return()}finally{if(o)throw r}}}}},{key:"_attributeNameForProperty",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}},{key:"_valueHasChanged",value:function(t,e){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:I)(t,e)}},{key:"_propertyValueFromAttribute",value:function(t,e){var n=e.type,i=e.converter||T,o="function"==typeof i?i:i.fromAttribute;return o?o(t,n):t}},{key:"_propertyValueToAttribute",value:function(t,e){if(void 0!==e.reflect){var n=e.type,i=e.converter;return(i&&i.toAttribute||T.toAttribute)(t,n)}}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this._classProperties.forEach(function(n,i){var o=t._attributeNameForProperty(i,n);void 0!==o&&(t._attributeToPropertyMap.set(o,i),e.push(o))}),e}}],i&&k(n.prototype,i),o&&k(n,o),e}();R.finalized=!0;var B=function(t){return function(e){return"function"==typeof e?function(t,e){return window.customElements.define(t,e),e}(t,e):function(t,e){return{kind:e.kind,elements:e.elements,finisher:function(e){window.customElements.define(t,e)}}}(t,e)}},P=function(t,e){return"method"!==e.kind||!e.descriptor||"value"in e.descriptor?{kind:"field",key:Symbol(),placement:"own",descriptor:{},initializer:function(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher:function(n){n.createProperty(e.key,t)}}:Object.assign({},e,{finisher:function(n){n.createProperty(e.key,t)}})},N=function(t,e,n){e.constructor.createProperty(n,t)};function L(t){return function(e,n){return void 0!==n?N(t,e,n):P(t,e)}}function F(t){return function(e,n){var i={get:function(){return this.renderRoot.querySelector(t)},enumerable:!0,configurable:!0};return void 0!==n?M(i,e,n):D(i,e)}}var M=function(t,e,n){Object.defineProperty(e,n,t)},D=function(t,e){return{kind:"method",placement:"prototype",key:e.key,descriptor:t}};function H(t,e){for(var n=0;n1?e-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:[],i=0,o=e.length;i\n \n\n\n \n']);return o=function(){return t},t}var r=Object(i.a)(o());r.setAttribute("style","display: none;"),document.head.appendChild(r.content);var a=document.createElement("style");a.textContent="[hidden] { display: none !important; }",document.head.appendChild(a)},function(t,e,n){"use strict";n(4),n(101);var i=n(6);function o(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n\n \n'],['\n\n \n']);return o=function(){return t},t}var r=Object(i.a)(o());r.setAttribute("style","display: none;"),document.head.appendChild(r.content)},,,function(t,e,n){"use strict";var i=n(20);function o(t,e){for(var n=0;n1?e-1:0),i=1;i\n \n ','\n ',"\n ","\n \n "]);return l=function(){return t},t}function c(){var t=d(['',""]);return c=function(){return t},t}function d(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function u(t,e){for(var n=0;n\n :host {\n display: inline-block;\n overflow: hidden;\n position: relative;\n }\n\n #baseURIAnchor {\n display: none;\n }\n\n #sizedImgDiv {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n display: none;\n }\n\n #img {\n display: block;\n width: var(--iron-image-width, auto);\n height: var(--iron-image-height, auto);\n }\n\n :host([sizing]) #sizedImgDiv {\n display: block;\n }\n\n :host([sizing]) #img {\n display: none;\n }\n\n #placeholder {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n background-color: inherit;\n opacity: 1;\n\n @apply --iron-image-placeholder;\n }\n\n #placeholder.faded-out {\n transition: opacity 0.5s linear;\n opacity: 0;\n }\n \n\n \n \n \n \n']);return a=function(){return t},t}Object(i.a)({_template:Object(o.a)(a()),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(t,e){var n=this._resolveSrc(t);n!==this._resolvedSrc&&(this._resolvedSrc="",this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",""===t||e?(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 t=this.$.sizedImgDiv.style,e=this.$.placeholder.style;t.backgroundSize=e.backgroundSize=this.sizing,t.backgroundPosition=e.backgroundPosition=this.sizing?this.position:"",t.backgroundRepeat=e.backgroundRepeat=this.sizing?"no-repeat":""},_resolveSrc:function(t){var e=Object(r.c)(t,this.$.baseURIAnchor.href);return e.length>=2&&"/"===e[0]&&"/"!==e[1]&&(e=(location.origin||location.protocol+"//"+location.host)+e),e}});n(35);function s(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n\n \n \n \n']);return s=function(){return t},t}var l=Object(o.a)(s());l.setAttribute("style","display: none;"),document.head.appendChild(l.content);n(13);function c(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n \n\n
\n \n
[[heading]]
\n
\n\n \n'],['\n \n\n
\n \n
[[heading]]
\n
\n\n \n']);return c=function(){return t},t}Object(i.a)({_template:Object(o.a)(c()),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(t){return t?"false":"true"},_headingChanged:function(t){var e=this.getAttribute("heading"),n=this.getAttribute("aria-label");"string"==typeof n&&n!==e||this.setAttribute("aria-label",t)},_computeHeadingClass:function(t){return t?" over-image":""},_computeAnimated:function(t){return t}})},function(t,e,n){"use strict";n.d(e,"a",function(){return _}),n.d(e,"b",function(){return w}),n.d(e,"e",function(){return x}),n.d(e,"c",function(){return k}),n.d(e,"f",function(){return S}),n.d(e,"g",function(){return C}),n.d(e,"d",function(){return E});var i=n(60),o=n(29),r=n(61),a=n(62),s=n(43),l=n(21);function c(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t,e,n){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.startNode;Object(o.b)(this.startNode.parentNode,t.nextSibling,this.endNode)}}]),t}(),k=function(){function t(e,n,i){if(f(this,t),this.value=void 0,this.__pendingValue=void 0,2!==i.length||""!==i[0]||""!==i[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=n,this.strings=i}return v(t,[{key:"setValue",value:function(t){this.__pendingValue=t}},{key:"commit",value:function(){for(;Object(i.b)(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=r.a,t(this)}if(this.__pendingValue!==r.a){var e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=r.a}}}]),t}(),S=function(t){function e(t,n,i){var o;return f(this,e),(o=c(this,u(e).call(this,t,n,i))).single=2===i.length&&""===i[0]&&""===i[1],o}return p(e,_),v(e,[{key:"_createPart",value:function(){return new C(this)}},{key:"_getValue",value:function(){return this.single?this.parts[0].value:d(u(e.prototype),"_getValue",this).call(this)}},{key:"commit",value:function(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}]),e}(),C=function(t){function e(){return f(this,e),c(this,u(e).apply(this,arguments))}return p(e,w),e}(),O=!1;try{var A={get capture(){return O=!0,!1}};window.addEventListener("test",A,A),window.removeEventListener("test",A,A)}catch(I){}var E=function(){function t(e,n,i){var o=this;f(this,t),this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=n,this.eventContext=i,this.__boundHandleEvent=function(t){return o.handleEvent(t)}}return v(t,[{key:"setValue",value:function(t){this.__pendingValue=t}},{key:"commit",value:function(){for(;Object(i.b)(this.__pendingValue);){var t=this.__pendingValue;this.__pendingValue=r.a,t(this)}if(this.__pendingValue!==r.a){var e=this.__pendingValue,n=this.value,o=null==e||null!=n&&(e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive),a=null!=e&&(null==n||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),a&&(this.__options=T(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=r.a}}},{key:"handleEvent",value:function(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}]),t}(),T=function(t){return t&&(O?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)}},function(t,e,n){"use strict";n.d(e,"f",function(){return i}),n.d(e,"g",function(){return o}),n.d(e,"b",function(){return a}),n.d(e,"a",function(){return s}),n.d(e,"d",function(){return c}),n.d(e,"c",function(){return d}),n.d(e,"e",function(){return u});var i="{{lit-".concat(String(Math.random()).slice(2),"}}"),o="\x3c!--".concat(i,"--\x3e"),r=new RegExp("".concat(i,"|").concat(o)),a="$lit$",s=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.parts=[],this.element=n;for(var o=[],s=[],c=document.createTreeWalker(n.content,133,null,!1),p=0,h=-1,f=0,b=e.strings,v=e.values.length;f0;){var x=b[f],k=u.exec(x)[2],S=k.toLowerCase()+a,C=m.getAttribute(S);m.removeAttribute(S);var O=C.split(r);this.parts.push({type:"attribute",index:h,name:k,strings:O}),f+=O.length-1}}"TEMPLATE"===m.tagName&&(s.push(m),c.currentNode=m.content)}else if(3===m.nodeType){var A=m.data;if(A.indexOf(i)>=0){for(var E=m.parentNode,T=A.split(r),I=T.length-1,z=0;z=0&&t.slice(n)===e},c=function(t){return-1!==t.index},d=function(){return document.createComment("")},u=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=\/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/},function(t,e,n){"use strict";n(12),n(79);var i=n(7),o=n(8),r=n(6),a=n(4);function s(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(["\n \n"]);return s=function(){return t},t}Object(i.a)({_template:Object(r.a)(s()),is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:a.a.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(t){var e=(t||"").split(":");this._iconName=e.pop(),this._iconsetName=e.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(t){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&Object(o.a)(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,Object(o.a)(this.root).appendChild(this._img))}})},,function(t,e,n){"use strict";n(4),n(22),n(13);var i=n(80),o=n(7),r=n(6);function a(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n \n\n \n '],['\n \n\n \n ']);return a=function(){return t},t}Object(o.a)({is:"paper-icon-button",_template:Object(r.a)(a()),hostAttributes:{role:"button",tabindex:"0"},behaviors:[i.a],registered:function(){this._template.setAttribute("strip-whitespace","")},properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(t,e){var n=this.getAttribute("aria-label");n&&e!=n||this.setAttribute("aria-label",t)}})},function(t,e,n){"use strict";n.d(e,"a",function(){return i});n(4),n(8);var i={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:String},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0),this.addEventListener("blur",this._boundFocusBlurHandler,!0)},_focusBlurHandler:function(t){this._setFocused("focus"===t.type)},_disabledChanged:function(t,e){this.setAttribute("aria-disabled",t?"true":"false"),this.style.pointerEvents=t?"none":"",t?(this._oldTabIndex=this.getAttribute("tabindex"),this._setFocused(!1),this.tabIndex=-1,this.blur()):void 0!==this._oldTabIndex&&(null===this._oldTabIndex?this.removeAttribute("tabindex"):this.setAttribute("tabindex",this._oldTabIndex))},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}}},function(t,e,n){"use strict";n.d(e,"a",function(){return b});n(4);var i={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},o={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:"*"},r={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},a=/[a-z0-9*]/,s=/U\+/,l=/^arrow/,c=/^space(bar)?/,d=/^escape$/;function u(t,e){var n="";if(t){var i=t.toLowerCase();" "===i||c.test(i)?n="space":d.test(i)?n="esc":1==i.length?e&&!a.test(i)||(n=i):n=l.test(i)?i.replace("arrow",""):"multiply"==i?"*":i}return n}function p(t,e){return t.key?u(t.key,e):t.detail&&t.detail.key?u(t.detail.key,e):(n=t.keyIdentifier,r="",n&&(n in i?r=i[n]:s.test(n)?(n=parseInt(n.replace("U+","0x"),16),r=String.fromCharCode(n).toLowerCase()):r=n.toLowerCase()),r||function(t){var e="";return Number(t)&&(e=t>=65&&t<=90?String.fromCharCode(32+t):t>=112&&t<=123?"f"+(t-112+1):t>=48&&t<=57?String(t-48):t>=96&&t<=105?String(t-96):o[t]),e}(t.keyCode)||"");var n,r}function h(t,e){return p(e,t.hasModifiers)===t.key&&(!t.hasModifiers||!!e.shiftKey==!!t.shiftKey&&!!e.ctrlKey==!!t.ctrlKey&&!!e.altKey==!!t.altKey&&!!e.metaKey==!!t.metaKey)}function f(t){return t.trim().split(" ").map(function(t){return function(t){return 1===t.length?{combo:t,key:t,event:"keydown"}:t.split("+").reduce(function(t,e){var n=e.split(":"),i=n[0],o=n[1];return i in r?(t[r[i]]=!0,t.hasModifiers=!0):(t.key=i,t.event=o||"keydown"),t},{combo:t.split(":").shift()})}(t)})}var b={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(t,e){this._imperativeKeyBindings[t]=e,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(t,e){for(var n=f(e),i=0;i2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;e!==n;){var o=e.nextSibling;t.insertBefore(e,i),e=o}},r=function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e!==n;){var i=e.nextSibling;t.removeChild(e),e=i}}},function(t,e,n){"use strict";n(4),n(46);var i=n(6);function o(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(["\n \n"]);return o=function(){return t},t}var r=Object(i.a)(o());r.setAttribute("style","display: none;"),document.head.appendChild(r.content)},,,,,function(t,e,n){"use strict";n(4);var i=n(6);function o(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n\n \n']);return o=function(){return t},t}var r=Object(i.a)(o());r.setAttribute("style","display: none;"),document.head.appendChild(r.content)},function(t,e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.d(e,"c",function(){return r}),n.d(e,"a",function(){return a}),n.d(e,"b",function(){return s});var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n=0;l--)(r=t[l])&&(s=(a<3?r(s):a>3?r(e,n,s):r(e,n))||s);return a>3&&s&&Object.defineProperty(e,n,s),s}},,,,function(t,e,n){"use strict";n(4);var i=n(7),o=n(6);function r(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n \n
\n']);return h=function(){return t},t}function f(){var t=b(['\n\n \n\n']);return f=function(){return t},t}function b(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var v=Object(o.a)(f());function m(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n \n\n \x3c!--\n If the paper-input-error element is directly referenced by an\n `aria-describedby` attribute, such as when used as a paper-input add-on,\n then applying `visibility: hidden;` to the paper-input-error element itself\n does not hide the error.\n\n For more information, see:\n https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description\n --\x3e\n
\n \n
\n'],['\n \n\n \x3c!--\n If the paper-input-error element is directly referenced by an\n \\`aria-describedby\\` attribute, such as when used as a paper-input add-on,\n then applying \\`visibility: hidden;\\` to the paper-input-error element itself\n does not hide the error.\n\n For more information, see:\n https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description\n --\x3e\n
\n\n@group Paper Elements\n@demo demo/index.html\n*/\n\nimport '@polymer/polymer/polymer-legacy.js';\nimport '../shadow.js';\n\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\nconst template = html`\n\n \n \n \n`;\ntemplate.setAttribute('style', 'display: none;');\ndocument.head.appendChild(template.content);\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/iron-image/iron-image.js';\nimport '@polymer/paper-styles/element-styles/paper-material-styles.js';\nimport '@polymer/paper-styles/default-theme.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Cards](https://www.google.com/design/spec/components/cards.html)\n\n`paper-card` is a container with a drop shadow.\n\nExample:\n\n \n
Some content
\n
\n Some action\n
\n \n\nExample - top card image:\n\n \n ...\n \n\n### Accessibility\n\nBy default, the `aria-label` will be set to the value of the `heading`\nattribute.\n\n### Styling\n\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-card-background-color` | The background color of the card | `--primary-background-color`\n`--paper-card-header-color` | The color of the header text | `#000`\n`--paper-card-header` | Mixin applied to the card header section | `{}`\n`--paper-card-header-text` | Mixin applied to the title in the card header section | `{}`\n`--paper-card-header-image` | Mixin applied to the image in the card header section | `{}`\n`--paper-card-header-image-text` | Mixin applied to the text overlapping the image in the card header section | `{}`\n`--paper-card-content` | Mixin applied to the card content section| `{}`\n`--paper-card-actions` | Mixin applied to the card action section | `{}`\n`--paper-card` | Mixin applied to the card | `{}`\n\n@group Paper Elements\n@element paper-card\n@demo demo/index.html\n*/\nPolymer({\n _template: html`\n \n\n
\n \n
[[heading]]
\n
\n\n \n`,\n\n is: 'paper-card',\n\n properties: {\n /**\n * The title of the card.\n */\n heading: {type: String, value: '', observer: '_headingChanged'},\n\n /**\n * The url of the title image of the card.\n */\n image: {type: String, value: ''},\n\n /**\n * The text alternative of the card's title image.\n */\n alt: {type: String},\n\n /**\n * When `true`, any change to the image url property will cause the\n * `placeholder` image to be shown until the image is fully rendered.\n */\n preloadImage: {type: Boolean, value: false},\n\n /**\n * When `preloadImage` is true, setting `fadeImage` to true will cause the\n * image to fade into place.\n */\n fadeImage: {type: Boolean, value: false},\n\n /**\n * This image will be used as a background/placeholder until the src image\n * has loaded. Use of a data-URI for placeholder is encouraged for instant\n * rendering.\n */\n placeholderImage: {type: String, value: null},\n\n /**\n * The z-depth of the card, from 0-5.\n */\n elevation: {type: Number, value: 1, reflectToAttribute: true},\n\n /**\n * Set this to true to animate the card shadow when setting a new\n * `z` value.\n */\n animatedShadow: {type: Boolean, value: false},\n\n /**\n * Read-only property used to pass down the `animatedShadow` value to\n * the underlying paper-material style (since they have different names).\n */\n animated: {\n type: Boolean,\n reflectToAttribute: true,\n readOnly: true,\n computed: '_computeAnimated(animatedShadow)'\n }\n },\n\n /**\n * Format function for aria-hidden. Use the ! operator results in the\n * empty string when given a falsy value.\n */\n _isHidden: function(image) {\n return image ? 'false' : 'true';\n },\n\n _headingChanged: function(heading) {\n var currentHeading = this.getAttribute('heading'),\n currentLabel = this.getAttribute('aria-label');\n\n if (typeof currentLabel !== 'string' || currentLabel === currentHeading) {\n this.setAttribute('aria-label', heading);\n }\n },\n\n _computeHeadingClass: function(image) {\n return image ? ' over-image' : '';\n },\n\n _computeAnimated: function(animatedShadow) {\n return animatedShadow;\n }\n});\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * @module lit-html\n */\n\nimport {isDirective} from './directive.js';\nimport {removeNodes} from './dom.js';\nimport {noChange, nothing, Part} from './part.js';\nimport {RenderOptions} from './render-options.js';\nimport {TemplateInstance} from './template-instance.js';\nimport {TemplateResult} from './template-result.js';\nimport {createMarker} from './template.js';\n\n// https://tc39.github.io/ecma262/#sec-typeof-operator\nexport type Primitive = null|undefined|boolean|number|string|Symbol|bigint;\nexport const isPrimitive = (value: unknown): value is Primitive => {\n return (\n value === null ||\n !(typeof value === 'object' || typeof value === 'function'));\n};\nexport const isIterable = (value: unknown): value is Iterable => {\n return Array.isArray(value) ||\n // tslint:disable-next-line:no-any\n !!(value && (value as any)[Symbol.iterator]);\n};\n\n/**\n * Writes attribute values to the DOM for a group of AttributeParts bound to a\n * single attibute. The value is only set once even if there are multiple parts\n * for an attribute.\n */\nexport class AttributeCommitter {\n readonly element: Element;\n readonly name: string;\n readonly strings: ReadonlyArray;\n readonly parts: ReadonlyArray;\n dirty = true;\n\n constructor(element: Element, name: string, strings: ReadonlyArray) {\n this.element = element;\n this.name = name;\n this.strings = strings;\n this.parts = [];\n for (let i = 0; i < strings.length - 1; i++) {\n (this.parts as AttributePart[])[i] = this._createPart();\n }\n }\n\n /**\n * Creates a single part. Override this to create a differnt type of part.\n */\n protected _createPart(): AttributePart {\n return new AttributePart(this);\n }\n\n protected _getValue(): unknown {\n const strings = this.strings;\n const l = strings.length - 1;\n let text = '';\n\n for (let i = 0; i < l; i++) {\n text += strings[i];\n const part = this.parts[i];\n if (part !== undefined) {\n const v = part.value;\n if (isPrimitive(v) || !isIterable(v)) {\n text += typeof v === 'string' ? v : String(v);\n } else {\n for (const t of v) {\n text += typeof t === 'string' ? t : String(t);\n }\n }\n }\n }\n\n text += strings[l];\n return text;\n }\n\n commit(): void {\n if (this.dirty) {\n this.dirty = false;\n this.element.setAttribute(this.name, this._getValue() as string);\n }\n }\n}\n\n/**\n * A Part that controls all or part of an attribute value.\n */\nexport class AttributePart implements Part {\n readonly committer: AttributeCommitter;\n value: unknown = undefined;\n\n constructor(committer: AttributeCommitter) {\n this.committer = committer;\n }\n\n setValue(value: unknown): void {\n if (value !== noChange && (!isPrimitive(value) || value !== this.value)) {\n this.value = value;\n // If the value is a not a directive, dirty the committer so that it'll\n // call setAttribute. If the value is a directive, it'll dirty the\n // committer if it calls setValue().\n if (!isDirective(value)) {\n this.committer.dirty = true;\n }\n }\n }\n\n commit() {\n while (isDirective(this.value)) {\n const directive = this.value;\n this.value = noChange;\n directive(this);\n }\n if (this.value === noChange) {\n return;\n }\n this.committer.commit();\n }\n}\n\n/**\n * A Part that controls a location within a Node tree. Like a Range, NodePart\n * has start and end locations and can set and update the Nodes between those\n * locations.\n *\n * NodeParts support several value types: primitives, Nodes, TemplateResults,\n * as well as arrays and iterables of those types.\n */\nexport class NodePart implements Part {\n readonly options: RenderOptions;\n startNode!: Node;\n endNode!: Node;\n value: unknown = undefined;\n private __pendingValue: unknown = undefined;\n\n constructor(options: RenderOptions) {\n this.options = options;\n }\n\n /**\n * Appends this part into a container.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n appendInto(container: Node) {\n this.startNode = container.appendChild(createMarker());\n this.endNode = container.appendChild(createMarker());\n }\n\n /**\n * Inserts this part after the `ref` node (between `ref` and `ref`'s next\n * sibling). Both `ref` and its next sibling must be static, unchanging nodes\n * such as those that appear in a literal section of a template.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n insertAfterNode(ref: Node) {\n this.startNode = ref;\n this.endNode = ref.nextSibling!;\n }\n\n /**\n * Appends this part into a parent part.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n appendIntoPart(part: NodePart) {\n part.__insert(this.startNode = createMarker());\n part.__insert(this.endNode = createMarker());\n }\n\n /**\n * Inserts this part after the `ref` part.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n insertAfterPart(ref: NodePart) {\n ref.__insert(this.startNode = createMarker());\n this.endNode = ref.endNode;\n ref.endNode = this.startNode;\n }\n\n setValue(value: unknown): void {\n this.__pendingValue = value;\n }\n\n commit() {\n while (isDirective(this.__pendingValue)) {\n const directive = this.__pendingValue;\n this.__pendingValue = noChange;\n directive(this);\n }\n const value = this.__pendingValue;\n if (value === noChange) {\n return;\n }\n if (isPrimitive(value)) {\n if (value !== this.value) {\n this.__commitText(value);\n }\n } else if (value instanceof TemplateResult) {\n this.__commitTemplateResult(value);\n } else if (value instanceof Node) {\n this.__commitNode(value);\n } else if (isIterable(value)) {\n this.__commitIterable(value);\n } else if (value === nothing) {\n this.value = nothing;\n this.clear();\n } else {\n // Fallback, will render the string representation\n this.__commitText(value);\n }\n }\n\n private __insert(node: Node) {\n this.endNode.parentNode!.insertBefore(node, this.endNode);\n }\n\n private __commitNode(value: Node): void {\n if (this.value === value) {\n return;\n }\n this.clear();\n this.__insert(value);\n this.value = value;\n }\n\n private __commitText(value: unknown): void {\n const node = this.startNode.nextSibling!;\n value = value == null ? '' : value;\n // If `value` isn't already a string, we explicitly convert it here in case\n // it can't be implicitly converted - i.e. it's a symbol.\n const valueAsString: string =\n typeof value === 'string' ? value : String(value);\n if (node === this.endNode.previousSibling &&\n node.nodeType === 3 /* Node.TEXT_NODE */) {\n // If we only have a single text node between the markers, we can just\n // set its value, rather than replacing it.\n // TODO(justinfagnani): Can we just check if this.value is primitive?\n (node as Text).data = valueAsString;\n } else {\n this.__commitNode(document.createTextNode(valueAsString));\n }\n this.value = value;\n }\n\n private __commitTemplateResult(value: TemplateResult): void {\n const template = this.options.templateFactory(value);\n if (this.value instanceof TemplateInstance &&\n this.value.template === template) {\n this.value.update(value.values);\n } else {\n // Make sure we propagate the template processor from the TemplateResult\n // so that we use its syntax extension, etc. The template factory comes\n // from the render function options so that it can control template\n // caching and preprocessing.\n const instance =\n new TemplateInstance(template, value.processor, this.options);\n const fragment = instance._clone();\n instance.update(value.values);\n this.__commitNode(fragment);\n this.value = instance;\n }\n }\n\n private __commitIterable(value: Iterable): void {\n // For an Iterable, we create a new InstancePart per item, then set its\n // value to the item. This is a little bit of overhead for every item in\n // an Iterable, but it lets us recurse easily and efficiently update Arrays\n // of TemplateResults that will be commonly returned from expressions like:\n // array.map((i) => html`${i}`), by reusing existing TemplateInstances.\n\n // If _value is an array, then the previous render was of an\n // iterable and _value will contain the NodeParts from the previous\n // render. If _value is not an array, clear this part and make a new\n // array for NodeParts.\n if (!Array.isArray(this.value)) {\n this.value = [];\n this.clear();\n }\n\n // Lets us keep track of how many items we stamped so we can clear leftover\n // items from a previous render\n const itemParts = this.value as NodePart[];\n let partIndex = 0;\n let itemPart: NodePart|undefined;\n\n for (const item of value) {\n // Try to reuse an existing part\n itemPart = itemParts[partIndex];\n\n // If no existing part, create a new one\n if (itemPart === undefined) {\n itemPart = new NodePart(this.options);\n itemParts.push(itemPart);\n if (partIndex === 0) {\n itemPart.appendIntoPart(this);\n } else {\n itemPart.insertAfterPart(itemParts[partIndex - 1]);\n }\n }\n itemPart.setValue(item);\n itemPart.commit();\n partIndex++;\n }\n\n if (partIndex < itemParts.length) {\n // Truncate the parts array so _value reflects the current state\n itemParts.length = partIndex;\n this.clear(itemPart && itemPart.endNode);\n }\n }\n\n clear(startNode: Node = this.startNode) {\n removeNodes(\n this.startNode.parentNode!, startNode.nextSibling!, this.endNode);\n }\n}\n\n/**\n * Implements a boolean attribute, roughly as defined in the HTML\n * specification.\n *\n * If the value is truthy, then the attribute is present with a value of\n * ''. If the value is falsey, the attribute is removed.\n */\nexport class BooleanAttributePart implements Part {\n readonly element: Element;\n readonly name: string;\n readonly strings: ReadonlyArray;\n value: unknown = undefined;\n private __pendingValue: unknown = undefined;\n\n constructor(element: Element, name: string, strings: ReadonlyArray) {\n if (strings.length !== 2 || strings[0] !== '' || strings[1] !== '') {\n throw new Error(\n 'Boolean attributes can only contain a single expression');\n }\n this.element = element;\n this.name = name;\n this.strings = strings;\n }\n\n setValue(value: unknown): void {\n this.__pendingValue = value;\n }\n\n commit() {\n while (isDirective(this.__pendingValue)) {\n const directive = this.__pendingValue;\n this.__pendingValue = noChange;\n directive(this);\n }\n if (this.__pendingValue === noChange) {\n return;\n }\n const value = !!this.__pendingValue;\n if (this.value !== value) {\n if (value) {\n this.element.setAttribute(this.name, '');\n } else {\n this.element.removeAttribute(this.name);\n }\n this.value = value;\n }\n this.__pendingValue = noChange;\n }\n}\n\n/**\n * Sets attribute values for PropertyParts, so that the value is only set once\n * even if there are multiple parts for a property.\n *\n * If an expression controls the whole property value, then the value is simply\n * assigned to the property under control. If there are string literals or\n * multiple expressions, then the strings are expressions are interpolated into\n * a string first.\n */\nexport class PropertyCommitter extends AttributeCommitter {\n readonly single: boolean;\n\n constructor(element: Element, name: string, strings: ReadonlyArray) {\n super(element, name, strings);\n this.single =\n (strings.length === 2 && strings[0] === '' && strings[1] === '');\n }\n\n protected _createPart(): PropertyPart {\n return new PropertyPart(this);\n }\n\n protected _getValue() {\n if (this.single) {\n return this.parts[0].value;\n }\n return super._getValue();\n }\n\n commit(): void {\n if (this.dirty) {\n this.dirty = false;\n // tslint:disable-next-line:no-any\n (this.element as any)[this.name] = this._getValue();\n }\n }\n}\n\nexport class PropertyPart extends AttributePart {}\n\n// Detect event listener options support. If the `capture` property is read\n// from the options object, then options are supported. If not, then the thrid\n// argument to add/removeEventListener is interpreted as the boolean capture\n// value so we should only pass the `capture` property.\nlet eventOptionsSupported = false;\n\ntry {\n const options = {\n get capture() {\n eventOptionsSupported = true;\n return false;\n }\n };\n // tslint:disable-next-line:no-any\n window.addEventListener('test', options as any, options);\n // tslint:disable-next-line:no-any\n window.removeEventListener('test', options as any, options);\n} catch (_e) {\n}\n\n\ntype EventHandlerWithOptions =\n EventListenerOrEventListenerObject&Partial;\nexport class EventPart implements Part {\n readonly element: Element;\n readonly eventName: string;\n readonly eventContext?: EventTarget;\n value: undefined|EventHandlerWithOptions = undefined;\n private __options?: AddEventListenerOptions;\n private __pendingValue: undefined|EventHandlerWithOptions = undefined;\n private readonly __boundHandleEvent: (event: Event) => void;\n\n constructor(element: Element, eventName: string, eventContext?: EventTarget) {\n this.element = element;\n this.eventName = eventName;\n this.eventContext = eventContext;\n this.__boundHandleEvent = (e) => this.handleEvent(e);\n }\n\n setValue(value: undefined|EventHandlerWithOptions): void {\n this.__pendingValue = value;\n }\n\n commit() {\n while (isDirective(this.__pendingValue)) {\n const directive = this.__pendingValue;\n this.__pendingValue = noChange as EventHandlerWithOptions;\n directive(this);\n }\n if (this.__pendingValue === noChange) {\n return;\n }\n\n const newListener = this.__pendingValue;\n const oldListener = this.value;\n const shouldRemoveListener = newListener == null ||\n oldListener != null &&\n (newListener.capture !== oldListener.capture ||\n newListener.once !== oldListener.once ||\n newListener.passive !== oldListener.passive);\n const shouldAddListener =\n newListener != null && (oldListener == null || shouldRemoveListener);\n\n if (shouldRemoveListener) {\n this.element.removeEventListener(\n this.eventName, this.__boundHandleEvent, this.__options);\n }\n if (shouldAddListener) {\n this.__options = getOptions(newListener);\n this.element.addEventListener(\n this.eventName, this.__boundHandleEvent, this.__options);\n }\n this.value = newListener;\n this.__pendingValue = noChange as EventHandlerWithOptions;\n }\n\n handleEvent(event: Event) {\n if (typeof this.value === 'function') {\n this.value.call(this.eventContext || this.element, event);\n } else {\n (this.value as EventListenerObject).handleEvent(event);\n }\n }\n}\n\n// We copy options because of the inconsistent behavior of browsers when reading\n// the third argument of add/removeEventListener. IE11 doesn't support options\n// at all. Chrome 41 only reads `capture` if the argument is an object.\nconst getOptions = (o: AddEventListenerOptions|undefined) => o &&\n (eventOptionsSupported ?\n {capture: o.capture, passive: o.passive, once: o.once} :\n o.capture as AddEventListenerOptions);\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * @module lit-html\n */\n\nimport {TemplateResult} from './template-result.js';\n\n/**\n * An expression marker with embedded unique key to avoid collision with\n * possible text in templates.\n */\nexport const marker = `{{lit-${String(Math.random()).slice(2)}}}`;\n\n/**\n * An expression marker used text-positions, multi-binding attributes, and\n * attributes with markup-like text values.\n */\nexport const nodeMarker = ``;\n\nexport const markerRegex = new RegExp(`${marker}|${nodeMarker}`);\n\n/**\n * Suffix appended to all bound attribute names.\n */\nexport const boundAttributeSuffix = '$lit$';\n\n/**\n * An updateable Template that tracks the location of dynamic parts.\n */\nexport class Template {\n readonly parts: TemplatePart[] = [];\n readonly element: HTMLTemplateElement;\n\n constructor(result: TemplateResult, element: HTMLTemplateElement) {\n this.element = element;\n\n const nodesToRemove: Node[] = [];\n const stack: Node[] = [];\n // Edge needs all 4 parameters present; IE11 needs 3rd parameter to be null\n const walker = document.createTreeWalker(\n element.content,\n 133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */,\n null,\n false);\n // Keeps track of the last index associated with a part. We try to delete\n // unnecessary nodes, but we never want to associate two different parts\n // to the same index. They must have a constant node between.\n let lastPartIndex = 0;\n let index = -1;\n let partIndex = 0;\n const {strings, values: {length}} = result;\n while (partIndex < length) {\n const node = walker.nextNode() as Element | Comment | Text | null;\n if (node === null) {\n // We've exhausted the content inside a nested template element.\n // Because we still have parts (the outer for-loop), we know:\n // - There is a template in the stack\n // - The walker will find a nextNode outside the template\n walker.currentNode = stack.pop()!;\n continue;\n }\n index++;\n\n if (node.nodeType === 1 /* Node.ELEMENT_NODE */) {\n if ((node as Element).hasAttributes()) {\n const attributes = (node as Element).attributes;\n const {length} = attributes;\n // Per\n // https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap,\n // attributes are not guaranteed to be returned in document order.\n // In particular, Edge/IE can return them out of order, so we cannot\n // assume a correspondence between part index and attribute index.\n let count = 0;\n for (let i = 0; i < length; i++) {\n if (endsWith(attributes[i].name, boundAttributeSuffix)) {\n count++;\n }\n }\n while (count-- > 0) {\n // Get the template literal section leading up to the first\n // expression in this attribute\n const stringForPart = strings[partIndex];\n // Find the attribute name\n const name = lastAttributeNameRegex.exec(stringForPart)![2];\n // Find the corresponding attribute\n // All bound attributes have had a suffix added in\n // TemplateResult#getHTML to opt out of special attribute\n // handling. To look up the attribute value we also need to add\n // the suffix.\n const attributeLookupName =\n name.toLowerCase() + boundAttributeSuffix;\n const attributeValue =\n (node as Element).getAttribute(attributeLookupName)!;\n (node as Element).removeAttribute(attributeLookupName);\n const statics = attributeValue.split(markerRegex);\n this.parts.push({type: 'attribute', index, name, strings: statics});\n partIndex += statics.length - 1;\n }\n }\n if ((node as Element).tagName === 'TEMPLATE') {\n stack.push(node);\n walker.currentNode = (node as HTMLTemplateElement).content;\n }\n } else if (node.nodeType === 3 /* Node.TEXT_NODE */) {\n const data = (node as Text).data;\n if (data.indexOf(marker) >= 0) {\n const parent = node.parentNode!;\n const strings = data.split(markerRegex);\n const lastIndex = strings.length - 1;\n // Generate a new text node for each literal section\n // These nodes are also used as the markers for node parts\n for (let i = 0; i < lastIndex; i++) {\n let insert: Node;\n let s = strings[i];\n if (s === '') {\n insert = createMarker();\n } else {\n const match = lastAttributeNameRegex.exec(s);\n if (match !== null && endsWith(match[2], boundAttributeSuffix)) {\n s = s.slice(0, match.index) + match[1] +\n match[2].slice(0, -boundAttributeSuffix.length) + match[3];\n }\n insert = document.createTextNode(s);\n }\n parent.insertBefore(insert, node);\n this.parts.push({type: 'node', index: ++index});\n }\n // If there's no text, we must insert a comment to mark our place.\n // Else, we can trust it will stick around after cloning.\n if (strings[lastIndex] === '') {\n parent.insertBefore(createMarker(), node);\n nodesToRemove.push(node);\n } else {\n (node as Text).data = strings[lastIndex];\n }\n // We have a part for each match found\n partIndex += lastIndex;\n }\n } else if (node.nodeType === 8 /* Node.COMMENT_NODE */) {\n if ((node as Comment).data === marker) {\n const parent = node.parentNode!;\n // Add a new marker node to be the startNode of the Part if any of\n // the following are true:\n // * We don't have a previousSibling\n // * The previousSibling is already the start of a previous part\n if (node.previousSibling === null || index === lastPartIndex) {\n index++;\n parent.insertBefore(createMarker(), node);\n }\n lastPartIndex = index;\n this.parts.push({type: 'node', index});\n // If we don't have a nextSibling, keep this node so we have an end.\n // Else, we can remove it to save future costs.\n if (node.nextSibling === null) {\n (node as Comment).data = '';\n } else {\n nodesToRemove.push(node);\n index--;\n }\n partIndex++;\n } else {\n let i = -1;\n while ((i = (node as Comment).data.indexOf(marker, i + 1)) !== -1) {\n // Comment node has a binding marker inside, make an inactive part\n // The binding won't work, but subsequent bindings will\n // TODO (justinfagnani): consider whether it's even worth it to\n // make bindings in comments work\n this.parts.push({type: 'node', index: -1});\n partIndex++;\n }\n }\n }\n }\n\n // Remove text binding nodes after the walk to not disturb the TreeWalker\n for (const n of nodesToRemove) {\n n.parentNode!.removeChild(n);\n }\n }\n}\n\nconst endsWith = (str: string, suffix: string): boolean => {\n const index = str.length - suffix.length;\n return index >= 0 && str.slice(index) === suffix;\n};\n\n/**\n * A placeholder for a dynamic expression in an HTML template.\n *\n * There are two built-in part types: AttributePart and NodePart. NodeParts\n * always represent a single dynamic expression, while AttributeParts may\n * represent as many expressions are contained in the attribute.\n *\n * A Template's parts are mutable, so parts can be replaced or modified\n * (possibly to implement different template semantics). The contract is that\n * parts can only be replaced, not removed, added or reordered, and parts must\n * always consume the correct number of values in their `update()` method.\n *\n * TODO(justinfagnani): That requirement is a little fragile. A\n * TemplateInstance could instead be more careful about which values it gives\n * to Part.update().\n */\nexport type TemplatePart = {\n readonly type: 'node',\n index: number\n}|{readonly type: 'attribute', index: number, readonly name: string, readonly strings: ReadonlyArray};\n\nexport const isTemplatePartActive = (part: TemplatePart) => part.index !== -1;\n\n// Allows `document.createComment('')` to be renamed for a\n// small manual size-savings.\nexport const createMarker = () => document.createComment('');\n\n/**\n * This regex extracts the attribute name preceding an attribute-position\n * expression. It does this by matching the syntax allowed for attributes\n * against the string literal directly preceding the expression, assuming that\n * the expression is in an attribute-value position.\n *\n * See attributes in the HTML spec:\n * https://www.w3.org/TR/html5/syntax.html#elements-attributes\n *\n * \" \\x09\\x0a\\x0c\\x0d\" are HTML space characters:\n * https://www.w3.org/TR/html5/infrastructure.html#space-characters\n *\n * \"\\0-\\x1F\\x7F-\\x9F\" are Unicode control characters, which includes every\n * space character except \" \".\n *\n * So an attribute is:\n * * The name: any character except a control character, space character, ('),\n * (\"), \">\", \"=\", or \"/\"\n * * Followed by zero or more space characters\n * * Followed by \"=\"\n * * Followed by zero or more space characters\n * * Followed by:\n * * Any character except space, ('), (\"), \"<\", \">\", \"=\", (`), or\n * * (\") then any non-(\"), or\n * * (') then any non-(')\n */\nexport const lastAttributeNameRegex =\n /([ \\x09\\x0a\\x0c\\x0d])([^\\0-\\x1F\\x7F-\\x9F \"'>=/]+)([ \\x09\\x0a\\x0c\\x0d]*=[ \\x09\\x0a\\x0c\\x0d]*(?:[^ \\x09\\x0a\\x0c\\x0d\"'`<>=]*|\"[^\"]*|'[^']*))$/;\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\n\nimport {IronMeta} from '@polymer/iron-meta/iron-meta.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\nimport {Base} from '@polymer/polymer/polymer-legacy.js';\n\n/**\n\nThe `iron-icon` element displays an icon. By default an icon renders as a 24px\nsquare.\n\nExample using src:\n\n \n\nExample setting size to 32px x 32px:\n\n \n\n \n\nThe iron elements include several sets of icons. To use the default set of\nicons, import `iron-icons.js` and use the `icon` attribute to specify an icon:\n\n \n\n \n\nTo use a different built-in set of icons, import the specific\n`iron-icons/-icons.js`, and specify the icon as `:`.\nFor example, to use a communication icon, you would use:\n\n \n\n \n\nYou can also create custom icon sets of bitmap or SVG icons.\n\nExample of using an icon named `cherry` from a custom iconset with the ID\n`fruit`:\n\n \n\nSee `` and `` for more information about how to\ncreate a custom iconset.\n\nSee the `iron-icons` demo to see the icons available in the various iconsets.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--iron-icon` | Mixin applied to the icon | {}\n`--iron-icon-width` | Width of the icon | `24px`\n`--iron-icon-height` | Height of the icon | `24px`\n`--iron-icon-fill-color` | Fill color of the svg icon | `currentcolor`\n`--iron-icon-stroke-color` | Stroke color of the svg icon | none\n\n@group Iron Elements\n@element iron-icon\n@demo demo/index.html\n@hero hero.svg\n@homepage polymer.github.io\n*/\nPolymer({\n _template: html`\n \n`,\n\n is: 'iron-icon',\n\n properties: {\n\n /**\n * The name of the icon to use. The name should be of the form:\n * `iconset_name:icon_name`.\n */\n icon: {type: String},\n\n /**\n * The name of the theme to used, if one is specified by the\n * iconset.\n */\n theme: {type: String},\n\n /**\n * If using iron-icon without an iconset, you can set the src to be\n * the URL of an individual icon image file. Note that this will take\n * precedence over a given icon attribute.\n */\n src: {type: String},\n\n /**\n * @type {!IronMeta}\n */\n _meta: {value: Base.create('iron-meta', {type: 'iconset'})}\n\n },\n\n observers: [\n '_updateIcon(_meta, isAttached)',\n '_updateIcon(theme, isAttached)',\n '_srcChanged(src, isAttached)',\n '_iconChanged(icon, isAttached)'\n ],\n\n _DEFAULT_ICONSET: 'icons',\n\n _iconChanged: function(icon) {\n var parts = (icon || '').split(':');\n this._iconName = parts.pop();\n this._iconsetName = parts.pop() || this._DEFAULT_ICONSET;\n this._updateIcon();\n },\n\n _srcChanged: function(src) {\n this._updateIcon();\n },\n\n _usesIconset: function() {\n return this.icon || !this.src;\n },\n\n /** @suppress {visibility} */\n _updateIcon: function() {\n if (this._usesIconset()) {\n if (this._img && this._img.parentNode) {\n dom(this.root).removeChild(this._img);\n }\n if (this._iconName === '') {\n if (this._iconset) {\n this._iconset.removeIcon(this);\n }\n } else if (this._iconsetName && this._meta) {\n this._iconset = /** @type {?Polymer.Iconset} */ (\n this._meta.byKey(this._iconsetName));\n if (this._iconset) {\n this._iconset.applyIcon(this, this._iconName, this.theme);\n this.unlisten(window, 'iron-iconset-added', '_updateIcon');\n } else {\n this.listen(window, 'iron-iconset-added', '_updateIcon');\n }\n }\n } else {\n if (this._iconset) {\n this._iconset.removeIcon(this);\n }\n if (!this._img) {\n this._img = document.createElement('img');\n this._img.style.width = '100%';\n this._img.style.height = '100%';\n this._img.draggable = false;\n }\n this._img.src = this.src;\n dom(this.root).appendChild(this._img);\n }\n }\n});\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-icon/iron-icon.js';\nimport '@polymer/paper-styles/default-theme.js';\n\nimport {PaperInkyFocusBehavior} from '@polymer/paper-behaviors/paper-inky-focus-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design: [Icon\ntoggles](https://www.google.com/design/spec/components/buttons.html#buttons-toggle-buttons)\n\n`paper-icon-button` is a button with an image placed at the center. When the\nuser touches the button, a ripple effect emanates from the center of the button.\n\n`paper-icon-button` does not include a default icon set. To use icons from the\ndefault set, include `PolymerElements/iron-icons/iron-icons.html`, and use the\n`icon` attribute to specify which icon from the icon set to use.\n\n \n\nSee [`iron-iconset`](iron-iconset) for more information about\nhow to use a custom icon set.\n\nExample:\n\n \n\n \n \n\nTo use `paper-icon-button` as a link, wrap it in an anchor tag. Since\n`paper-icon-button` will already receive focus, you may want to prevent the\nanchor tag from receiving focus as well by setting its tabindex to -1.\n\n \n \n \n\n### Styling\n\nStyle the button with CSS as you would a normal DOM element. If you are using\nthe icons provided by `iron-icons`, they will inherit the foreground color of\nthe button.\n\n /* make a red \"favorite\" button *\\/\n \n\nBy default, the ripple is the same color as the foreground at 25% opacity. You\nmay customize the color using the `--paper-icon-button-ink-color` custom\nproperty.\n\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-icon-button-disabled-text` | The color of the disabled button | `--disabled-text-color`\n`--paper-icon-button-ink-color` | Selected/focus ripple color | `--primary-text-color`\n`--paper-icon-button` | Mixin for a button | `{}`\n`--paper-icon-button-disabled` | Mixin for a disabled button | `{}`\n`--paper-icon-button-hover` | Mixin for button on hover | `{}`\n\n@group Paper Elements\n@element paper-icon-button\n@demo demo/index.html\n*/\nPolymer({\n is: 'paper-icon-button',\n\n _template: html`\n \n\n \n `,\n\n hostAttributes: {role: 'button', tabindex: '0'},\n\n behaviors: [PaperInkyFocusBehavior],\n\n registered: function() {\n this._template.setAttribute('strip-whitespace', '');\n },\n\n properties: {\n /**\n * The URL of an image for the icon. If the src property is specified,\n * the icon property should not be.\n */\n src: {type: String},\n\n /**\n * Specifies the icon name or index in the set of icons available in\n * the icon's icon set. If the icon property is specified,\n * the src property should not be.\n */\n icon: {type: String},\n\n /**\n * Specifies the alternate text for the button, for accessibility.\n */\n alt: {type: String, observer: '_altChanged'}\n },\n\n _altChanged: function(newValue, oldValue) {\n var label = this.getAttribute('aria-label');\n\n // Don't stomp over a user-set aria-label.\n if (!label || oldValue == label) {\n this.setAttribute('aria-label', newValue);\n }\n }\n});\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\n\n/**\n * @demo demo/index.html\n * @polymerBehavior\n */\nexport const IronControlState = {\n\n properties: {\n\n /**\n * If true, the element currently has focus.\n */\n focused: {\n type: Boolean,\n value: false,\n notify: true,\n readOnly: true,\n reflectToAttribute: true\n },\n\n /**\n * If true, the user cannot interact with this element.\n */\n disabled: {\n type: Boolean,\n value: false,\n notify: true,\n observer: '_disabledChanged',\n reflectToAttribute: true\n },\n\n /**\n * Value of the `tabindex` attribute before `disabled` was activated.\n * `null` means the attribute was not present.\n * @type {?string|undefined}\n */\n _oldTabIndex: {type: String},\n\n _boundFocusBlurHandler: {\n type: Function,\n value: function() {\n return this._focusBlurHandler.bind(this);\n }\n }\n },\n\n observers: ['_changedControlState(focused, disabled)'],\n\n /**\n * @return {void}\n */\n ready: function() {\n this.addEventListener('focus', this._boundFocusBlurHandler, true);\n this.addEventListener('blur', this._boundFocusBlurHandler, true);\n },\n\n _focusBlurHandler: function(event) {\n // Polymer takes care of retargeting events.\n this._setFocused(event.type === 'focus');\n return;\n },\n\n _disabledChanged: function(disabled, old) {\n this.setAttribute('aria-disabled', disabled ? 'true' : 'false');\n this.style.pointerEvents = disabled ? 'none' : '';\n if (disabled) {\n // Read the `tabindex` attribute instead of the `tabIndex` property.\n // The property returns `-1` if there is no `tabindex` attribute.\n // This distinction is important when restoring the value because\n // leaving `-1` hides shadow root children from the tab order.\n this._oldTabIndex = this.getAttribute('tabindex');\n this._setFocused(false);\n this.tabIndex = -1;\n this.blur();\n } else if (this._oldTabIndex !== undefined) {\n if (this._oldTabIndex === null) {\n this.removeAttribute('tabindex');\n } else {\n this.setAttribute('tabindex', this._oldTabIndex);\n }\n }\n },\n\n _changedControlState: function() {\n // _controlStateChanged is abstract, follow-on behaviors may implement it\n if (this._controlStateChanged) {\n this._controlStateChanged();\n }\n }\n\n};\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\n/**\n * Chrome uses an older version of DOM Level 3 Keyboard Events\n *\n * Most keys are labeled as text, but some are Unicode codepoints.\n * Values taken from:\n * http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/keyset.html#KeySet-Set\n */\nvar KEY_IDENTIFIER = {\n 'U+0008': 'backspace',\n 'U+0009': 'tab',\n 'U+001B': 'esc',\n 'U+0020': 'space',\n 'U+007F': 'del'\n};\n\n/**\n * Special table for KeyboardEvent.keyCode.\n * KeyboardEvent.keyIdentifier is better, and KeyBoardEvent.key is even better\n * than that.\n *\n * Values from:\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.keyCode#Value_of_keyCode\n */\nvar KEY_CODE = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 27: 'esc',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 32: 'space',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 46: 'del',\n 106: '*'\n};\n\n/**\n * MODIFIER_KEYS maps the short name for modifier keys used in a key\n * combo string to the property name that references those same keys\n * in a KeyboardEvent instance.\n */\nvar MODIFIER_KEYS = {\n 'shift': 'shiftKey',\n 'ctrl': 'ctrlKey',\n 'alt': 'altKey',\n 'meta': 'metaKey'\n};\n\n/**\n * KeyboardEvent.key is mostly represented by printable character made by\n * the keyboard, with unprintable keys labeled nicely.\n *\n * However, on OS X, Alt+char can make a Unicode character that follows an\n * Apple-specific mapping. In this case, we fall back to .keyCode.\n */\nvar KEY_CHAR = /[a-z0-9*]/;\n\n/**\n * Matches a keyIdentifier string.\n */\nvar IDENT_CHAR = /U\\+/;\n\n/**\n * Matches arrow keys in Gecko 27.0+\n */\nvar ARROW_KEY = /^arrow/;\n\n/**\n * Matches space keys everywhere (notably including IE10's exceptional name\n * `spacebar`).\n */\nvar SPACE_KEY = /^space(bar)?/;\n\n/**\n * Matches ESC key.\n *\n * Value from: http://w3c.github.io/uievents-key/#key-Escape\n */\nvar ESC_KEY = /^escape$/;\n\n/**\n * Transforms the key.\n * @param {string} key The KeyBoardEvent.key\n * @param {Boolean} [noSpecialChars] Limits the transformation to\n * alpha-numeric characters.\n */\nfunction transformKey(key, noSpecialChars) {\n var validKey = '';\n if (key) {\n var lKey = key.toLowerCase();\n if (lKey === ' ' || SPACE_KEY.test(lKey)) {\n validKey = 'space';\n } else if (ESC_KEY.test(lKey)) {\n validKey = 'esc';\n } else if (lKey.length == 1) {\n if (!noSpecialChars || KEY_CHAR.test(lKey)) {\n validKey = lKey;\n }\n } else if (ARROW_KEY.test(lKey)) {\n validKey = lKey.replace('arrow', '');\n } else if (lKey == 'multiply') {\n // numpad '*' can map to Multiply on IE/Windows\n validKey = '*';\n } else {\n validKey = lKey;\n }\n }\n return validKey;\n}\n\nfunction transformKeyIdentifier(keyIdent) {\n var validKey = '';\n if (keyIdent) {\n if (keyIdent in KEY_IDENTIFIER) {\n validKey = KEY_IDENTIFIER[keyIdent];\n } else if (IDENT_CHAR.test(keyIdent)) {\n keyIdent = parseInt(keyIdent.replace('U+', '0x'), 16);\n validKey = String.fromCharCode(keyIdent).toLowerCase();\n } else {\n validKey = keyIdent.toLowerCase();\n }\n }\n return validKey;\n}\n\nfunction transformKeyCode(keyCode) {\n var validKey = '';\n if (Number(keyCode)) {\n if (keyCode >= 65 && keyCode <= 90) {\n // ascii a-z\n // lowercase is 32 offset from uppercase\n validKey = String.fromCharCode(32 + keyCode);\n } else if (keyCode >= 112 && keyCode <= 123) {\n // function keys f1-f12\n validKey = 'f' + (keyCode - 112 + 1);\n } else if (keyCode >= 48 && keyCode <= 57) {\n // top 0-9 keys\n validKey = String(keyCode - 48);\n } else if (keyCode >= 96 && keyCode <= 105) {\n // num pad 0-9\n validKey = String(keyCode - 96);\n } else {\n validKey = KEY_CODE[keyCode];\n }\n }\n return validKey;\n}\n\n/**\n * Calculates the normalized key for a KeyboardEvent.\n * @param {KeyboardEvent} keyEvent\n * @param {Boolean} [noSpecialChars] Set to true to limit keyEvent.key\n * transformation to alpha-numeric chars. This is useful with key\n * combinations like shift + 2, which on FF for MacOS produces\n * keyEvent.key = @\n * To get 2 returned, set noSpecialChars = true\n * To get @ returned, set noSpecialChars = false\n */\nfunction normalizedKeyForEvent(keyEvent, noSpecialChars) {\n // Fall back from .key, to .detail.key for artifical keyboard events,\n // and then to deprecated .keyIdentifier and .keyCode.\n if (keyEvent.key) {\n return transformKey(keyEvent.key, noSpecialChars);\n }\n if (keyEvent.detail && keyEvent.detail.key) {\n return transformKey(keyEvent.detail.key, noSpecialChars);\n }\n return transformKeyIdentifier(keyEvent.keyIdentifier) ||\n transformKeyCode(keyEvent.keyCode) || '';\n}\n\nfunction keyComboMatchesEvent(keyCombo, event) {\n // For combos with modifiers we support only alpha-numeric keys\n var keyEvent = normalizedKeyForEvent(event, keyCombo.hasModifiers);\n return keyEvent === keyCombo.key &&\n (!keyCombo.hasModifiers ||\n (!!event.shiftKey === !!keyCombo.shiftKey &&\n !!event.ctrlKey === !!keyCombo.ctrlKey &&\n !!event.altKey === !!keyCombo.altKey &&\n !!event.metaKey === !!keyCombo.metaKey));\n}\n\nfunction parseKeyComboString(keyComboString) {\n if (keyComboString.length === 1) {\n return {combo: keyComboString, key: keyComboString, event: 'keydown'};\n }\n return keyComboString.split('+')\n .reduce(function(parsedKeyCombo, keyComboPart) {\n var eventParts = keyComboPart.split(':');\n var keyName = eventParts[0];\n var event = eventParts[1];\n\n if (keyName in MODIFIER_KEYS) {\n parsedKeyCombo[MODIFIER_KEYS[keyName]] = true;\n parsedKeyCombo.hasModifiers = true;\n } else {\n parsedKeyCombo.key = keyName;\n parsedKeyCombo.event = event || 'keydown';\n }\n\n return parsedKeyCombo;\n }, {combo: keyComboString.split(':').shift()});\n}\n\nfunction parseEventString(eventString) {\n return eventString.trim().split(' ').map(function(keyComboString) {\n return parseKeyComboString(keyComboString);\n });\n}\n\n/**\n * `Polymer.IronA11yKeysBehavior` provides a normalized interface for processing\n * keyboard commands that pertain to [WAI-ARIA best\n * practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding). The\n * element takes care of browser differences with respect to Keyboard events and\n * uses an expressive syntax to filter key presses.\n *\n * Use the `keyBindings` prototype property to express what combination of keys\n * will trigger the callback. A key binding has the format\n * `\"KEY+MODIFIER:EVENT\": \"callback\"` (`\"KEY\": \"callback\"` or\n * `\"KEY:EVENT\": \"callback\"` are valid as well). Some examples:\n *\n * keyBindings: {\n * 'space': '_onKeydown', // same as 'space:keydown'\n * 'shift+tab': '_onKeydown',\n * 'enter:keypress': '_onKeypress',\n * 'esc:keyup': '_onKeyup'\n * }\n *\n * The callback will receive with an event containing the following information\n * in `event.detail`:\n *\n * _onKeydown: function(event) {\n * console.log(event.detail.combo); // KEY+MODIFIER, e.g. \"shift+tab\"\n * console.log(event.detail.key); // KEY only, e.g. \"tab\"\n * console.log(event.detail.event); // EVENT, e.g. \"keydown\"\n * console.log(event.detail.keyboardEvent); // the original KeyboardEvent\n * }\n *\n * Use the `keyEventTarget` attribute to set up event handlers on a specific\n * node.\n *\n * See the [demo source\n * code](https://github.com/PolymerElements/iron-a11y-keys-behavior/blob/master/demo/x-key-aware.html)\n * for an example.\n *\n * @demo demo/index.html\n * @polymerBehavior\n */\nexport const IronA11yKeysBehavior = {\n properties: {\n /**\n * The EventTarget that will be firing relevant KeyboardEvents. Set it to\n * `null` to disable the listeners.\n * @type {?EventTarget}\n */\n keyEventTarget: {\n type: Object,\n value: function() {\n return this;\n }\n },\n\n /**\n * If true, this property will cause the implementing element to\n * automatically stop propagation on any handled KeyboardEvents.\n */\n stopKeyboardEventPropagation: {type: Boolean, value: false},\n\n _boundKeyHandlers: {\n type: Array,\n value: function() {\n return [];\n }\n },\n\n // We use this due to a limitation in IE10 where instances will have\n // own properties of everything on the \"prototype\".\n _imperativeKeyBindings: {\n type: Object,\n value: function() {\n return {};\n }\n }\n },\n\n observers: ['_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)'],\n\n\n /**\n * To be used to express what combination of keys will trigger the relative\n * callback. e.g. `keyBindings: { 'esc': '_onEscPressed'}`\n * @type {!Object}\n */\n keyBindings: {},\n\n registered: function() {\n this._prepKeyBindings();\n },\n\n attached: function() {\n this._listenKeyEventListeners();\n },\n\n detached: function() {\n this._unlistenKeyEventListeners();\n },\n\n /**\n * Can be used to imperatively add a key binding to the implementing\n * element. This is the imperative equivalent of declaring a keybinding\n * in the `keyBindings` prototype property.\n *\n * @param {string} eventString\n * @param {string} handlerName\n */\n addOwnKeyBinding: function(eventString, handlerName) {\n this._imperativeKeyBindings[eventString] = handlerName;\n this._prepKeyBindings();\n this._resetKeyEventListeners();\n },\n\n /**\n * When called, will remove all imperatively-added key bindings.\n */\n removeOwnKeyBindings: function() {\n this._imperativeKeyBindings = {};\n this._prepKeyBindings();\n this._resetKeyEventListeners();\n },\n\n /**\n * Returns true if a keyboard event matches `eventString`.\n *\n * @param {KeyboardEvent} event\n * @param {string} eventString\n * @return {boolean}\n */\n keyboardEventMatchesKeys: function(event, eventString) {\n var keyCombos = parseEventString(eventString);\n for (var i = 0; i < keyCombos.length; ++i) {\n if (keyComboMatchesEvent(keyCombos[i], event)) {\n return true;\n }\n }\n return false;\n },\n\n _collectKeyBindings: function() {\n var keyBindings = this.behaviors.map(function(behavior) {\n return behavior.keyBindings;\n });\n\n if (keyBindings.indexOf(this.keyBindings) === -1) {\n keyBindings.push(this.keyBindings);\n }\n\n return keyBindings;\n },\n\n _prepKeyBindings: function() {\n this._keyBindings = {};\n\n this._collectKeyBindings().forEach(function(keyBindings) {\n for (var eventString in keyBindings) {\n this._addKeyBinding(eventString, keyBindings[eventString]);\n }\n }, this);\n\n for (var eventString in this._imperativeKeyBindings) {\n this._addKeyBinding(\n eventString, this._imperativeKeyBindings[eventString]);\n }\n\n // Give precedence to combos with modifiers to be checked first.\n for (var eventName in this._keyBindings) {\n this._keyBindings[eventName].sort(function(kb1, kb2) {\n var b1 = kb1[0].hasModifiers;\n var b2 = kb2[0].hasModifiers;\n return (b1 === b2) ? 0 : b1 ? -1 : 1;\n })\n }\n },\n\n _addKeyBinding: function(eventString, handlerName) {\n parseEventString(eventString).forEach(function(keyCombo) {\n this._keyBindings[keyCombo.event] =\n this._keyBindings[keyCombo.event] || [];\n\n this._keyBindings[keyCombo.event].push([keyCombo, handlerName]);\n }, this);\n },\n\n _resetKeyEventListeners: function() {\n this._unlistenKeyEventListeners();\n\n if (this.isAttached) {\n this._listenKeyEventListeners();\n }\n },\n\n _listenKeyEventListeners: function() {\n if (!this.keyEventTarget) {\n return;\n }\n Object.keys(this._keyBindings).forEach(function(eventName) {\n var keyBindings = this._keyBindings[eventName];\n var boundKeyHandler = this._onKeyBindingEvent.bind(this, keyBindings);\n\n this._boundKeyHandlers.push(\n [this.keyEventTarget, eventName, boundKeyHandler]);\n\n this.keyEventTarget.addEventListener(eventName, boundKeyHandler);\n }, this);\n },\n\n _unlistenKeyEventListeners: function() {\n var keyHandlerTuple;\n var keyEventTarget;\n var eventName;\n var boundKeyHandler;\n\n while (this._boundKeyHandlers.length) {\n // My kingdom for block-scope binding and destructuring assignment..\n keyHandlerTuple = this._boundKeyHandlers.pop();\n keyEventTarget = keyHandlerTuple[0];\n eventName = keyHandlerTuple[1];\n boundKeyHandler = keyHandlerTuple[2];\n\n keyEventTarget.removeEventListener(eventName, boundKeyHandler);\n }\n },\n\n _onKeyBindingEvent: function(keyBindings, event) {\n if (this.stopKeyboardEventPropagation) {\n event.stopPropagation();\n }\n\n // if event has been already prevented, don't do anything\n if (event.defaultPrevented) {\n return;\n }\n\n for (var i = 0; i < keyBindings.length; i++) {\n var keyCombo = keyBindings[i][0];\n var handlerName = keyBindings[i][1];\n if (keyComboMatchesEvent(keyCombo, event)) {\n this._triggerKeyHandler(keyCombo, handlerName, event);\n // exit the loop if eventDefault was prevented\n if (event.defaultPrevented) {\n return;\n }\n }\n }\n },\n\n _triggerKeyHandler: function(keyCombo, handlerName, keyboardEvent) {\n var detail = Object.create(keyCombo);\n detail.keyboardEvent = keyboardEvent;\n var event =\n new CustomEvent(keyCombo.event, {detail: detail, cancelable: true});\n this[handlerName].call(this, event);\n if (event.defaultPrevented) {\n keyboardEvent.preventDefault();\n }\n }\n};\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * @module lit-html\n */\n\ninterface MaybePolyfilledCe extends CustomElementRegistry {\n readonly polyfillWrapFlushCallback?: object;\n}\n\n/**\n * True if the custom elements polyfill is in use.\n */\nexport const isCEPolyfill = window.customElements !== undefined &&\n (window.customElements as MaybePolyfilledCe).polyfillWrapFlushCallback !==\n undefined;\n\n/**\n * Reparents nodes, starting from `start` (inclusive) to `end` (exclusive),\n * into another container (could be the same container), before `before`. If\n * `before` is null, it appends the nodes to the container.\n */\nexport const reparentNodes =\n (container: Node,\n start: Node|null,\n end: Node|null = null,\n before: Node|null = null): void => {\n while (start !== end) {\n const n = start!.nextSibling;\n container.insertBefore(start!, before);\n start = n;\n }\n };\n\n/**\n * Removes nodes, starting from `start` (inclusive) to `end` (exclusive), from\n * `container`.\n */\nexport const removeNodes =\n (container: Node, start: Node|null, end: Node|null = null): void => {\n while (start !== end) {\n const n = start!.nextSibling;\n container.removeChild(start!);\n start = n;\n }\n };\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\nTypographic styles are provided matching the Material Design standard styles:\nhttp://www.google.com/design/spec/style/typography.html#typography-standard-styles\n\nNote that these are English/Latin centric styles. You may need to further adjust\nline heights and weights for CJK typesetting. See the notes in the Material\nDesign typography section.\n*/\n\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/font-roboto/roboto.js';\n\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\nconst template = html`\n \n`;\ntemplate.setAttribute('style', 'display: none;');\ndocument.head.appendChild(template.content);\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\nconst template = html`\n\n \n`;\ntemplate.setAttribute('style', 'display: none;');\ndocument.head.appendChild(template.content);\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\n`iron-a11y-announcer` is a singleton element that is intended to add a11y\nto features that require on-demand announcement from screen readers. In\norder to make use of the announcer, it is best to request its availability\nin the announcing element.\n\nExample:\n\n Polymer({\n\n is: 'x-chatty',\n\n attached: function() {\n // This will create the singleton element if it has not\n // been created yet:\n Polymer.IronA11yAnnouncer.requestAvailability();\n }\n });\n\nAfter the `iron-a11y-announcer` has been made available, elements can\nmake announces by firing bubbling `iron-announce` events.\n\nExample:\n\n this.fire('iron-announce', {\n text: 'This is an announcement!'\n }, { bubbles: true });\n\nNote: announcements are only audible if you have a screen reader enabled.\n\n@group Iron Elements\n@demo demo/index.html\n*/\nexport const IronA11yAnnouncer = Polymer({\n _template: html`\n \n
[[_text]]
\n`,\n\n is: 'iron-a11y-announcer',\n\n properties: {\n\n /**\n * The value of mode is used to set the `aria-live` attribute\n * for the element that will be announced. Valid values are: `off`,\n * `polite` and `assertive`.\n */\n mode: {type: String, value: 'polite'},\n\n _text: {type: String, value: ''}\n },\n\n created: function() {\n if (!IronA11yAnnouncer.instance) {\n IronA11yAnnouncer.instance = this;\n }\n\n document.body.addEventListener(\n 'iron-announce', this._onIronAnnounce.bind(this));\n },\n\n /**\n * Cause a text string to be announced by screen readers.\n *\n * @param {string} text The text that should be announced.\n */\n announce: function(text) {\n this._text = '';\n this.async(function() {\n this._text = text;\n }, 100);\n },\n\n _onIronAnnounce: function(event) {\n if (event.detail && event.detail.text) {\n this.announce(event.detail.text);\n }\n }\n});\n\nIronA11yAnnouncer.instance = null;\n\nIronA11yAnnouncer.requestAvailability = function() {\n if (!IronA11yAnnouncer.instance) {\n IronA11yAnnouncer.instance = document.createElement('iron-a11y-announcer');\n }\n\n document.body.appendChild(IronA11yAnnouncer.instance);\n};\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {IronA11yAnnouncer} from '@polymer/iron-a11y-announcer/iron-a11y-announcer.js';\nimport {IronValidatableBehavior} from '@polymer/iron-validatable-behavior/iron-validatable-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\n`` is a wrapper to a native `` element, that adds two-way\nbinding and prevention of invalid input. To use it, you must distribute a native\n`` yourself. You can continue to use the native `input` as you would\nnormally:\n\n \n \n \n\n \n \n \n\n### Two-way binding\n\nBy default you can only get notified of changes to a native ``'s `value`\ndue to user input:\n\n \n\nThis means that if you imperatively set the value (i.e. `someNativeInput.value =\n'foo'`), no events will be fired and this change cannot be observed.\n\n`iron-input` adds the `bind-value` property that mirrors the native `input`'s\n'`value` property; this property can be used for two-way data binding.\n`bind-value` will notify if it is changed either by user input or by script.\n\n \n \n \n\nNote: this means that if you want to imperatively set the native `input`'s, you\n_must_ set `bind-value` instead, so that the wrapper `iron-input` can be\nnotified.\n\n### Validation\n\n`iron-input` uses the native `input`'s validation. For simplicity, `iron-input`\nhas a `validate()` method (which internally just checks the distributed\n`input`'s validity), which sets an `invalid` attribute that can also be used for\nstyling.\n\nTo validate automatically as you type, you can use the `auto-validate`\nattribute.\n\n`iron-input` also fires an `iron-input-validate` event after `validate()` is\ncalled. You can use it to implement a custom validator:\n\n var CatsOnlyValidator = {\n validate: function(ironInput) {\n var valid = !ironInput.bindValue || ironInput.bindValue === 'cat';\n ironInput.invalid = !valid;\n return valid;\n }\n }\n ironInput.addEventListener('iron-input-validate', function() {\n CatsOnly.validate(input2);\n });\n\nYou can also use an element implementing an\n[`IronValidatorBehavior`](/element/PolymerElements/iron-validatable-behavior).\nThis example can also be found in the demo for this element:\n\n \n \n \n\n### Preventing invalid input\n\nIt may be desirable to only allow users to enter certain characters. You can use\nthe `allowed-pattern` attribute to accomplish this. This feature is separate\nfrom validation, and `allowed-pattern` does not affect how the input is\nvalidated.\n\n // Only allow typing digits, but a valid input has exactly 5 digits.\n \n \n \n\n@demo demo/index.html\n*/\nPolymer({\n _template: html`\n \n \n`,\n\n is: 'iron-input',\n behaviors: [IronValidatableBehavior],\n\n /**\n * Fired whenever `validate()` is called.\n *\n * @event iron-input-validate\n */\n\n properties: {\n\n /**\n * Use this property instead of `value` for two-way data binding, or to\n * set a default value for the input. **Do not** use the distributed\n * input's `value` property to set a default value.\n */\n bindValue: {type: String, value: ''},\n\n /**\n * Computed property that echoes `bindValue` (mostly used for Polymer 1.0\n * backcompatibility, if you were one-way binding to the Polymer 1.0\n * `input is=\"iron-input\"` value attribute).\n */\n value: {type: String, computed: '_computeValue(bindValue)'},\n\n /**\n * Regex-like list of characters allowed as input; all characters not in the\n * list will be rejected. The recommended format should be a list of allowed\n * characters, for example, `[a-zA-Z0-9.+-!;:]`.\n *\n * This pattern represents the allowed characters for the field; as the user\n * inputs text, each individual character will be checked against the\n * pattern (rather than checking the entire value as a whole). If a\n * character is not a match, it will be rejected.\n *\n * Pasted input will have each character checked individually; if any\n * character doesn't match `allowedPattern`, the entire pasted string will\n * be rejected.\n *\n * Note: if you were using `iron-input` in 1.0, you were also required to\n * set `prevent-invalid-input`. This is no longer needed as of Polymer 2.0,\n * and will be set automatically for you if an `allowedPattern` is provided.\n *\n */\n allowedPattern: {type: String},\n\n /**\n * Set to true to auto-validate the input value as you type.\n */\n autoValidate: {type: Boolean, value: false},\n\n /**\n * The native input element.\n */\n _inputElement: Object,\n },\n\n observers: ['_bindValueChanged(bindValue, _inputElement)'],\n listeners: {'input': '_onInput', 'keypress': '_onKeypress'},\n\n created: function() {\n IronA11yAnnouncer.requestAvailability();\n this._previousValidInput = '';\n this._patternAlreadyChecked = false;\n },\n\n attached: function() {\n // If the input is added at a later time, update the internal reference.\n this._observer = dom(this).observeNodes(function(info) {\n this._initSlottedInput();\n }.bind(this));\n },\n\n detached: function() {\n if (this._observer) {\n dom(this).unobserveNodes(this._observer);\n this._observer = null;\n }\n },\n\n /**\n * Returns the distributed input element.\n */\n get inputElement() {\n return this._inputElement;\n },\n\n _initSlottedInput: function() {\n this._inputElement = this.getEffectiveChildren()[0];\n\n if (this.inputElement && this.inputElement.value) {\n this.bindValue = this.inputElement.value;\n }\n\n this.fire('iron-input-ready');\n },\n\n get _patternRegExp() {\n var pattern;\n if (this.allowedPattern) {\n pattern = new RegExp(this.allowedPattern);\n } else {\n switch (this.inputElement.type) {\n case 'number':\n pattern = /[0-9.,e-]/;\n break;\n }\n }\n return pattern;\n },\n\n /**\n * @suppress {checkTypes}\n */\n _bindValueChanged: function(bindValue, inputElement) {\n // The observer could have run before attached() when we have actually\n // initialized this property.\n if (!inputElement) {\n return;\n }\n\n if (bindValue === undefined) {\n inputElement.value = null;\n } else if (bindValue !== inputElement.value) {\n this.inputElement.value = bindValue;\n }\n\n if (this.autoValidate) {\n this.validate();\n }\n\n // manually notify because we don't want to notify until after setting value\n this.fire('bind-value-changed', {value: bindValue});\n },\n\n _onInput: function() {\n // Need to validate each of the characters pasted if they haven't\n // been validated inside `_onKeypress` already.\n if (this.allowedPattern && !this._patternAlreadyChecked) {\n var valid = this._checkPatternValidity();\n if (!valid) {\n this._announceInvalidCharacter(\n 'Invalid string of characters not entered.');\n this.inputElement.value = this._previousValidInput;\n }\n }\n this.bindValue = this._previousValidInput = this.inputElement.value;\n this._patternAlreadyChecked = false;\n },\n\n _isPrintable: function(event) {\n // What a control/printable character is varies wildly based on the browser.\n // - most control characters (arrows, backspace) do not send a `keypress`\n // event\n // in Chrome, but the *do* on Firefox\n // - in Firefox, when they do send a `keypress` event, control chars have\n // a charCode = 0, keyCode = xx (for ex. 40 for down arrow)\n // - printable characters always send a keypress event.\n // - in Firefox, printable chars always have a keyCode = 0. In Chrome, the\n // keyCode\n // always matches the charCode.\n // None of this makes any sense.\n\n // For these keys, ASCII code == browser keycode.\n var anyNonPrintable = (event.keyCode == 8) || // backspace\n (event.keyCode == 9) || // tab\n (event.keyCode == 13) || // enter\n (event.keyCode == 27); // escape\n\n // For these keys, make sure it's a browser keycode and not an ASCII code.\n var mozNonPrintable = (event.keyCode == 19) || // pause\n (event.keyCode == 20) || // caps lock\n (event.keyCode == 45) || // insert\n (event.keyCode == 46) || // delete\n (event.keyCode == 144) || // num lock\n (event.keyCode == 145) || // scroll lock\n (event.keyCode > 32 &&\n event.keyCode < 41) || // page up/down, end, home, arrows\n (event.keyCode > 111 && event.keyCode < 124); // fn keys\n\n return !anyNonPrintable && !(event.charCode == 0 && mozNonPrintable);\n },\n\n _onKeypress: function(event) {\n if (!this.allowedPattern && this.inputElement.type !== 'number') {\n return;\n }\n var regexp = this._patternRegExp;\n if (!regexp) {\n return;\n }\n\n // Handle special keys and backspace\n if (event.metaKey || event.ctrlKey || event.altKey) {\n return;\n }\n\n // Check the pattern either here or in `_onInput`, but not in both.\n this._patternAlreadyChecked = true;\n\n var thisChar = String.fromCharCode(event.charCode);\n if (this._isPrintable(event) && !regexp.test(thisChar)) {\n event.preventDefault();\n this._announceInvalidCharacter(\n 'Invalid character ' + thisChar + ' not entered.');\n }\n },\n\n _checkPatternValidity: function() {\n var regexp = this._patternRegExp;\n if (!regexp) {\n return true;\n }\n for (var i = 0; i < this.inputElement.value.length; i++) {\n if (!regexp.test(this.inputElement.value[i])) {\n return false;\n }\n }\n return true;\n },\n\n /**\n * Returns true if `value` is valid. The validator provided in `validator`\n * will be used first, then any constraints.\n * @return {boolean} True if the value is valid.\n */\n validate: function() {\n if (!this.inputElement) {\n this.invalid = false;\n return true;\n }\n\n // Use the nested input's native validity.\n var valid = this.inputElement.checkValidity();\n\n // Only do extra checking if the browser thought this was valid.\n if (valid) {\n // Empty, required input is invalid\n if (this.required && this.bindValue === '') {\n valid = false;\n } else if (this.hasValidator()) {\n valid = IronValidatableBehavior.validate.call(this, this.bindValue);\n }\n }\n\n this.invalid = !valid;\n this.fire('iron-input-validate');\n return valid;\n },\n\n _announceInvalidCharacter: function(message) {\n this.fire('iron-announce', {text: message});\n },\n\n _computeValue: function(bindValue) {\n return bindValue;\n }\n});\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\n/**\n * Use `Polymer.PaperInputAddonBehavior` to implement an add-on for\n * ``. A add-on appears below the input, and may display\n * information based on the input value and validity such as a character counter\n * or an error message.\n * @polymerBehavior\n */\nexport const PaperInputAddonBehavior = {\n attached: function() {\n this.fire('addon-attached');\n },\n\n /**\n * The function called by `` when the input value or\n * validity changes.\n * @param {{\n * invalid: boolean,\n * inputElement: (Element|undefined),\n * value: (string|undefined)\n * }} state -\n * inputElement: The input element.\n * value: The input value.\n * invalid: True if the input value is invalid.\n */\n update: function(state) {}\n\n};\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/paper-styles/typography.js';\n\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\nimport {PaperInputAddonBehavior} from './paper-input-addon-behavior.js';\n\n/*\n`` is a character counter for use with\n``. It shows the number of characters entered in the\ninput and the max length if it is specified.\n\n \n \n \n \n\n### Styling\n\nThe following mixin is available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-input-char-counter` | Mixin applied to the element | `{}`\n*/\nPolymer({\n _template: html`\n \n\n [[_charCounterStr]]\n`,\n\n is: 'paper-input-char-counter',\n behaviors: [PaperInputAddonBehavior],\n properties: {_charCounterStr: {type: String, value: '0'}},\n\n /**\n * This overrides the update function in PaperInputAddonBehavior.\n * @param {{\n * inputElement: (Element|undefined),\n * value: (string|undefined),\n * invalid: boolean\n * }} state -\n * inputElement: The input element.\n * value: The input value.\n * invalid: True if the input value is invalid.\n */\n update: function(state) {\n if (!state.inputElement) {\n return;\n }\n\n state.value = state.value || '';\n\n var counter = state.value.toString().length.toString();\n\n if (state.inputElement.hasAttribute('maxlength')) {\n counter += '/' + state.inputElement.getAttribute('maxlength');\n }\n\n this._charCounterStr = counter;\n }\n});\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\nimport '@polymer/paper-styles/typography.js';\n\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\nimport {dashToCamelCase} from '@polymer/polymer/lib/utils/case-map.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\nconst template = html`\n\n \n\n`;\ntemplate.setAttribute('style', 'display: none;');\ndocument.head.appendChild(template.content);\n\n/*\n`` is a container for a `