core/homeassistant/components/frontend/www_static/frontend.html

5 lines
528 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<html><head><meta charset="UTF-8"></head><body><div hidden="" by-vulcanize=""><script>!function(){function e(){document.body.removeAttribute("unresolved")}window.WebComponents?addEventListener("WebComponentsReady",e):"interactive"===document.readyState||"complete"===document.readyState?e():addEventListener("DOMContentLoaded",e)}(),window.Polymer={Settings:function(){var e=window.Polymer||{};if(!e.noUrlSettings)for(var t,r=location.search.slice(1).split("&"),i=0;i<r.length&&(t=r[i]);i++)t=t.split("="),t[0]&&(e[t[0]]=t[1]||!0);return e.wantShadow="shadow"===e.dom,e.hasShadow=Boolean(Element.prototype.createShadowRoot),e.nativeShadow=e.hasShadow&&!window.ShadowDOMPolyfill,e.useShadow=e.wantShadow&&e.hasShadow,e.hasNativeImports=Boolean("import"in document.createElement("link")),e.useNativeImports=e.hasNativeImports,e.useNativeCustomElements=!window.CustomElements||window.CustomElements.useNative,e.useNativeShadow=e.useShadow&&e.nativeShadow,e.usePolyfillProto=!e.useNativeCustomElements&&!Object.__proto__,e.hasNativeCSSProperties=!navigator.userAgent.match("AppleWebKit/601")&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)"),e.useNativeCSSProperties=e.hasNativeCSSProperties&&e.lazyRegister&&e.useNativeCSSProperties,e.isIE=navigator.userAgent.match("Trident"),e}()},function(){var e=window.Polymer;window.Polymer=function(e){"function"==typeof e&&(e=e.prototype),e||(e={});var r=t(e);e=r.prototype;var i={prototype:e};return e.extends&&(i.extends=e.extends),Polymer.telemetry._registrate(e),document.registerElement(e.is,i),r};var t=function(e){var t=Polymer.Base;return e.extends&&(t=Polymer.Base._getExtendedPrototype(e.extends)),e=Polymer.Base.chainObject(e,t),e.registerCallback(),e.constructor};if(e)for(var r in e)Polymer[r]=e[r];Polymer.Class=t}(),Polymer.telemetry={registrations:[],_regLog:function(e){console.log("["+e.is+"]: registered")},_registrate:function(e){this.registrations.push(e),Polymer.log&&this._regLog(e)},dumpRegistrations:function(){this.registrations.forEach(this._regLog)}},Object.defineProperty(window,"currentImport",{enumerable:!0,configurable:!0,get:function(){return(document._currentScript||document.currentScript||{}).ownerDocument}}),Polymer.RenderStatus={_ready:!1,_callbacks:[],whenReady:function(e){this._ready?e():this._callbacks.push(e)},_makeReady:function(){this._ready=!0;for(var e=0;e<this._callbacks.length;e++)this._callbacks[e]();this._callbacks=[]},_catchFirstRender:function(){requestAnimationFrame(function(){Polymer.RenderStatus._makeReady()})},_afterNextRenderQueue:[],_waitingNextRender:!1,afterNextRender:function(e,t,r){this._watchNextRender(),this._afterNextRenderQueue.push([e,t,r])},hasRendered:function(){return this._ready},_watchNextRender:function(){if(!this._waitingNextRender){this._waitingNextRender=!0;var e=function(){Polymer.RenderStatus._flushNextRender()};this._ready?requestAnimationFrame(e):this.whenReady(e)}},_flushNextRender:function(){var e=this;setTimeout(function(){e._flushRenderCallbacks(e._afterNextRenderQueue),e._afterNextRenderQueue=[],e._waitingNextRender=!1})},_flushRenderCallbacks:function(e){for(var t,r=0;r<e.length;r++)t=e[r],t[1].apply(t[0],t[2]||Polymer.nar)}},window.HTMLImports?HTMLImports.whenReady(function(){Polymer.RenderStatus._catchFirstRender()}):Polymer.RenderStatus._catchFirstRender(),Polymer.ImportStatus=Polymer.RenderStatus,Polymer.ImportStatus.whenLoaded=Polymer.ImportStatus.whenReady,function(){"use strict";var e=Polymer.Settings;Polymer.Base={__isPolymerInstance__:!0,_addFeature:function(e){this.extend(this,e)},registerCallback:function(){"max"===e.lazyRegister?this.beforeRegister&&this.beforeRegister():(this._desugarBehaviors(),this._doBehavior("beforeRegister")),this._registerFeatures(),e.lazyRegister||this.ensureRegisterFinished()},createdCallback:function(){this.__hasRegisterFinished||this._ensureRegisterFinished(this.__proto__),Polymer.telemetry.instanceCount++,this.root=this,this._doBehavior("created"),this._initFeatures()},ensureRegisterFinished:function(){this._ensureRegisterFinished(this)},_ensureRegisterFinished:function(t){t.__hasRegisterFinished===t.is&&t.is||("max"===e.lazyRegister&&(t._desugarBehaviors(),t._doBehaviorOnly("beforeRegister")),t.__hasRegisterFinished=t.is,t._finishRegisterFeatures&&t._finishRegisterFeatures(),t._doBehavior("registered"),e.usePolyfillProto&&t!==this&&t.extend(this,t))},attachedCallback:function(){var e=this;Polymer.RenderStatus.whenReady(function(){e.isAttached=!0,e._doBehavior("attached")})},detachedCallback:function(){var e=this;Polymer.RenderStatus.whenReady(function(){e.isAttached=!1,e._doBehavior("detached")})},attributeChangedCallback:function(e,t,r){this._attributeChangedImpl(e),this._doBehavior("attributeChanged",[e,t,r])},_attributeChangedImpl:function(e){this._setAttributeToProperty(this,e)},extend:function(e,t){if(e&&t)for(var r,i=Object.getOwnPropertyNames(t),o=0;o<i.length&&(r=i[o]);o++)this.copyOwnProperty(r,t,e);return e||t},mixin:function(e,t){for(var r in t)e[r]=t[r];return e},copyOwnProperty:function(e,t,r){var i=Object.getOwnPropertyDescriptor(t,e);i&&Object.defineProperty(r,e,i)},_logger:function(e,t){switch(1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":console[e].apply(console,t)}},_log:function(){var e=Array.prototype.slice.call(arguments,0);this._logger("log",e)},_warn:function(){var e=Array.prototype.slice.call(arguments,0);this._logger("warn",e)},_error:function(){var e=Array.prototype.slice.call(arguments,0);this._logger("error",e)},_logf:function(){return this._logPrefix.concat(this.is).concat(Array.prototype.slice.call(arguments,0))}},Polymer.Base._logPrefix=function(){var e=window.chrome&&!/edge/i.test(navigator.userAgent)||/firefox/i.test(navigator.userAgent);return e?["%c[%s::%s]:","font-weight: bold; background-color:#EEEE00;"]:["[%s::%s]:"]}(),Polymer.Base.chainObject=function(e,t){return e&&t&&e!==t&&(Object.__proto__||(e=Polymer.Base.extend(Object.create(t),e)),e.__proto__=t),e},Polymer.Base=Polymer.Base.chainObject(Polymer.Base,HTMLElement.prototype),window.CustomElements?Polymer.instanceof=CustomElements.instanceof:Polymer.instanceof=function(e,t){return e instanceof t},Polymer.isInstance=function(e){return Boolean(e&&e.__isPolymerInstance__)},Polymer.telemetry.instanceCount=0}(),function(){function e(){if(s)for(var e,t=document._currentScript||document.currentScript,r=t&&t.ownerDocument||document,i=r.querySelectorAll("dom-module"),o=i.length-1;o>=0&&(e=i[o]);o--){if(e.__upgraded__)return;CustomElements.upgrade(e)}}var t={},r={},i=function(e){return t[e]||r[e.toLowerCase()]},o=function(){return document.createElement("dom-module")};o.prototype=Object.create(HTMLElement.prototype),Polymer.Base.extend(o.prototype,{constructor:o,createdCallback:function(){this.register()},register:function(e){e=e||this.id||this.getAttribute("name")||this.getAttribute("is"),e&&(this.id=e,t[e]=this,r[e.toLowerCase()]=this)},import:function(t,r){if(t){var o=i(t);return o||(e(),o=i(t)),o&&r&&(o=o.querySelector(r)),o}}});var s=window.CustomElements&&!CustomElements.useNative;document.registerElement("dom-module",o)}(),Polymer.Base._addFeature({_prepIs:function(){if(!this.is){var e=(document._currentScript||document.currentScript).parentNode;if("dom-module"===e.localName){var t=e.id||e.getAttribute("name")||e.getAttribute("is");this.is=t}}this.is&&(this.is=this.is.toLowerCase())}}),Polymer.Base._addFeature({behaviors:[],_desugarBehaviors:function(){this.behaviors.length&&(this.behaviors=this._desugarSomeBehaviors(this.behaviors))},_desugarSomeBehaviors:function(e){var t=[];e=this._flattenBehaviorsList(e);for(var r=e.length-1;r>=0;r--){var i=e[r];t.indexOf(i)===-1&&(this._mixinBehavior(i),t.unshift(i))}return t},_flattenBehaviorsList:function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];i instanceof Array?t=t.concat(this._flattenBehaviorsList(i)):i?t.push(i):this._warn(this._logf("_flattenBehaviorsList","behavior is null, check for missing or 404 import"))}return t},_mixinBehavior:function(e){for(var t,r=Object.getOwnPropertyNames(e),i=0;i<r.length&&(t=r[i]);i++)Polymer.Base._behaviorProperties[t]||this.hasOwnProperty(t)||this.copyOwnProperty(t,e,this)},_prepBehaviors:function(){this._prepFlattenedBehaviors(this.behaviors)},_prepFlattenedBehaviors:function(e){for(var t=0,r=e.length;t<r;t++)this._prepBehavior(e[t]);this._prepBehavior(this)},_doBehavior:function(e,t){for(var r=0;r<this.behaviors.length;r++)this._invokeBehavior(this.behaviors[r],e,t);this._invokeBehavior(this,e,t)},_doBehaviorOnly:function(e,t){for(var r=0;r<this.behaviors.length;r++)this._invokeBehavior(this.behaviors[r],e,t)},_invokeBehavior:function(e,t,r){var i=e[t];i&&i.apply(this,r||Polymer.nar)},_marshalBehaviors:function(){for(var e=0;e<this.behaviors.length;e++)this._marshalBehavior(this.behaviors[e]);this._marshalBehavior(this)}}),Polymer.Base._behaviorProperties={hostAttributes:!0,beforeRegister:!0,registered:!0,properties:!0,observers:!0,listeners:!0,created:!0,attached:!0,detached:!0,attributeChanged:!0,ready:!0},Polymer.Base._addFeature({_getExtendedPrototype:function(e){return this._getExtendedNativePrototype(e)},_nativePrototypes:{},_getExtendedNativePrototype:function(e){var t=this._nativePrototypes[e];if(!t){var r=this.getNativePrototype(e);t=this.extend(Object.create(r),Polymer.Base),this._nativePrototypes[e]=t}return t},getNativePrototype:function(e){return Object.getPrototypeOf(document.createElement(e))}}),Polymer.Base._addFeature({_prepConstructor:function(){this._factoryArgs=this.extends?[this.extends,this.is]:[this.is];var e=function(){return this._factory(arguments)};this.hasOwnProperty("extends")&&(e.extends=this.extends),Object.defineProperty(this,"constructor",{value:e,writable:!0,configurable:!0}),e.prototype=this},_factory:function(e){var t=document.createElement.apply(document,this._factoryArgs);return this.factoryImpl&&this.factoryImpl.apply(t,e),t}}),Polymer.nob=Object.create(null),Polymer.Base._addFeature({properties:{},getPropertyInfo:function(e){var t=this._getPropertyInfo(e,this.properties);if(!t)for(var r=0;r<this.behaviors.length;r++)if(t=this._getPropertyInfo(e,this.behaviors[r].properties))return t;return t||Polymer.nob},_getPropertyInfo:function(e,t){var r=t&&t[e];return"function"==typeof r&&(r=t[e]={type:r}),r&&(r.defined=!0),r},_prepPropertyInfo:function(){this._propertyInfo={};for(var e=0;e<this.behaviors.length;e++)this._addPropertyInfo(this._propertyInfo,this.behaviors[e].properties);this._addPropertyInfo(this._propertyInfo,this.properties),this._addPropertyInfo(this._propertyInfo,this._propertyEffects)},_addPropertyInfo:function(e,t){if(t){var r,i;for(var o in t)r=e[o],i=t[o],("_"!==o[0]||i.readOnly)&&(e[o]?(r.type||(r.type=i.type),r.readOnly||(r.readOnly=i.readOnly)):e[o]={type:"function"==typeof i?i:i.type,readOnly:i.readOnly,attribute:Polymer.CaseMap.camelToDashCase(o)})}}}),Polymer.CaseMap={_caseMap:{},_rx:{dashToCamel:/-[a-z]/g,camelToDash:/([A-Z])/g},dashToCamelCase:function(e){return this._caseMap[e]||(this._caseMap[e]=e.indexOf("-")<0?e:e.replace(this._rx.dashToCamel,function(e){return e[1].toUpperCase()}))},camelToDashCase:function(e){return this._caseMap[e]||(this._caseMap[e]=e.replace(this._rx.camelToDash,"-$1").toLowerCase())}},Polymer.Base._addFeature({_addHostAttributes:function(e){this._aggregatedAttributes||(this._aggregatedAttributes={}),e&&this.mixin(this._aggregatedAttributes,e)},_marshalHostAttributes:function(){this._aggregatedAttributes&&this._applyAttributes(this,this._aggregatedAttributes)},_applyAttributes:function(e,t){for(var r in t)if(!this.hasAttribute(r)&&"class"!==r){var i=t[r];this.serializeValueToAttribute(i,r,this)}},_marshalAttributes:function(){this._takeAttributesToModel(this)},_takeAttributesToModel:function(e){if(this.hasAttributes())for(var t in this._propertyInfo){var r=this._propertyInfo[t];this.hasAttribute(r.attribute)&&this._setAttributeToProperty(e,r.attribute,t,r)}},_setAttributeToProperty:function(e,t,r,i){if(!this._serializing&&(r=r||Polymer.CaseMap.dashToCamelCase(t),i=i||this._propertyInfo&&this._propertyInfo[r],i&&!i.readOnly)){var o=this.getAttribute(t);e[r]=this.deserialize(o,i.type)}},_serializing:!1,reflectPropertyToAttribute:function(e,t,r){this._serializing=!0,r=void 0===r?this[e]:r,this.serializeValueToAttribute(r,t||Polymer.CaseMap.camelToDashCase(e)),this._serializing=!1},serializeValueToAttribute:function(e,t,r){var i=this.serialize(e);r=r||this,void 0===i?r.removeAttribute(t):r.setAttribute(t,i)},deserialize:function(e,t){switch(t){case Number:e=Number(e);break;case Boolean:e=null!=e;break;case Object:try{e=JSON.parse(e)}catch(e){}break;case Array:try{e=JSON.parse(e)}catch(t){e=null,console.warn("Polymer::Attributes: couldn`t decode Array as JSON")}break;case Date:e=new Date(e);break;case String:}return e},serialize:function(e){switch(typeof e){case"boolean":return e?"":void 0;case"object":if(e instanceof Date)return e.toString();if(e)try{return JSON.stringify(e)}catch(e){return""}default:return null!=e?e:void 0}}}),Polymer.version="1.7.1",Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepBehaviors(),this._prepConstructor(),this._prepPropertyInfo()},_prepBehavior:function(e){this._addHostAttributes(e.hostAttributes)},_marshalBehavior:function(e){},_initFeatures:function(){this._marshalHostAttributes(),this._marshalBehaviors()}})</script><script>Polymer.Base._addFeature({_prepTemplate:function(){void 0===this._template&&(this._template=Polymer.DomModule.import(this.is,"template")),this._template&&this._template.hasAttribute("is")&&this._warn(this._logf("_prepTemplate","top-level Polymer template must not be a type-extension, found",this._template,"Move inside simple <template>.")),this._template&&!this._template.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(this._template)},_stampTemplate:function(){this._template&&(this.root=this.instanceTemplate(this._template))},instanceTemplate:function(e){var t=document.importNode(e._content||e.content,!0);return t}}),function(){var e=Polymer.Base.attachedCallback;Polymer.Base._addFeature({_hostStack:[],ready:function(){},_registerHost:function(e){this.dataHost=e=e||Polymer.Base._hostStack[Polymer.Base._hostStack.length-1],e&&e._clients&&e._clients.push(this),this._clients=null,this._clientsReadied=!1},_beginHosting:function(){Polymer.Base._hostStack.push(this),this._clients||(this._clients=[])},_endHosting:function(){Polymer.Base._hostStack.pop()},_tryReady:function(){this._readied=!1,this._canReady()&&this._ready()},_canReady:function(){return!this.dataHost||this.dataHost._clientsReadied},_ready:function(){this._beforeClientsReady(),this._template&&(this._setupRoot(),this._readyClients()),this._clientsReadied=!0,this._clients=null,this._afterClientsReady(),this._readySelf()},_readyClients:function(){this._beginDistribute();var e=this._clients;if(e)for(var t,o=0,i=e.length;o<i&&(t=e[o]);o++)t._ready();this._finishDistribute()},_readySelf:function(){this._doBehavior("ready"),this._readied=!0,this._attachedPending&&(this._attachedPending=!1,this.attachedCallback())},_beforeClientsReady:function(){},_afterClientsReady:function(){},_beforeAttached:function(){},attachedCallback:function(){this._readied?(this._beforeAttached(),e.call(this)):this._attachedPending=!0}})}(),Polymer.ArraySplice=function(){function e(e,t,o){return{index:e,removed:t,addedCount:o}}function t(){}var o=0,i=1,n=2,s=3;return t.prototype={calcEditDistances:function(e,t,o,i,n,s){for(var r=s-n+1,d=o-t+1,a=new Array(r),l=0;l<r;l++)a[l]=new Array(d),a[l][0]=l;for(var h=0;h<d;h++)a[0][h]=h;for(l=1;l<r;l++)for(h=1;h<d;h++)if(this.equals(e[t+h-1],i[n+l-1]))a[l][h]=a[l-1][h-1];else{var u=a[l-1][h]+1,c=a[l][h-1]+1;a[l][h]=u<c?u:c}return a},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,r=e[0].length-1,d=e[t][r],a=[];t>0||r>0;)if(0!=t)if(0!=r){var l,h=e[t-1][r-1],u=e[t-1][r],c=e[t][r-1];l=u<c?u<h?u:h:c<h?c:h,l==h?(h==d?a.push(o):(a.push(i),d=h),t--,r--):l==u?(a.push(s),t--,d=u):(a.push(n),r--,d=c)}else a.push(s),t--;else a.push(n),r--;return a.reverse(),a},calcSplices:function(t,r,d,a,l,h){var u=0,c=0,_=Math.min(d-r,h-l);if(0==r&&0==l&&(u=this.sharedPrefix(t,a,_)),d==t.length&&h==a.length&&(c=this.sharedSuffix(t,a,_-u)),r+=u,l+=u,d-=c,h-=c,d-r==0&&h-l==0)return[];if(r==d){for(var f=e(r,[],0);l<h;)f.removed.push(a[l++]);return[f]}if(l==h)return[e(r,[],d-r)];var m=this.spliceOperationsFromEditDistances(this.calcEditDistances(t,r,d,a,l,h));f=void 0;for(var p=[],v=r,g=l,b=0;b<m.length;b++)switch(m[b]){case o:f&&(p.push(f),f=void 0),v++,g++;break;case i:f||(f=e(v,[],0)),f.addedCount++,v++,f.removed.push(a[g]),g++;break;case n:f||(f=e(v,[],0)),f.addedCount++,v++;break;case s:f||(f=e(v,[],0)),f.removed.push(a[g]),g++}return f&&p.push(f),p},sharedPrefix:function(e,t,o){for(var i=0;i<o;i++)if(!this.equals(e[i],t[i]))return i;return o},sharedSuffix:function(e,t,o){for(var i=e.length,n=t.length,s=0;s<o&&this.equals(e[--i],t[--n]);)s++;return s},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},new t}(),Polymer.domInnerHTML=function(){function e(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}function t(t){return t.replace(r,e)}function o(t){return t.replace(d,e)}function i(e){for(var t={},o=0;o<e.length;o++)t[e[o]]=!0;return t}function n(e,i,n){switch(e.nodeType){case Node.ELEMENT_NODE:for(var r,d=e.localName,h="<"+d,u=e.attributes,c=0;r=u[c];c++)h+=" "+r.name+'="'+t(r.value)+'"';return h+=">",a[d]?h:h+s(e,n)+"</"+d+">";case Node.TEXT_NODE:var _=e.data;return i&&l[i.localName]?_:o(_);case Node.COMMENT_NODE:return"\x3c!--"+e.data+"--\x3e";default:throw console.error(e),new Error("not implemented")}}function s(e,t){e instanceof HTMLTemplateElement&&(e=e.content);for(var o,i="",s=Polymer.dom(e).childNodes,r=0,d=s.length;r<d&&(o=s[r]);r++)i+=n(o,e,t);return i}var r=/[&\u00A0"]/g,d=/[&\u00A0<>]/g,a=i(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),l=i(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);return{getInnerHTML:s}}(),function(){"use strict";var e=Element.prototype.insertBefore,t=Element.prototype.appendChild,o=Element.prototype.removeChild;Polymer.TreeApi={arrayCopyChildNodes:function(e){for(var t=[],o=0,i=e.firstChild;i;i=i.nextSibling)t[o++]=i;return t},arrayCopyChildren:function(e){for(var t=[],o=0,i=e.firstElementChild;i;i=i.nextElementSibling)t[o++]=i;return t},arrayCopy:function(e){for(var t=e.length,o=new Array(t),i=0;i<t;i++)o[i]=e[i];return o}},Polymer.TreeApi.Logical={hasParentNode:function(e){return Boolean(e.__dom&&e.__dom.parentNode)},hasChildNodes:function(e){return Boolean(e.__dom&&void 0!==e.__dom.childNodes)},getChildNodes:function(e){return this.hasChildNodes(e)?this._getChildNodes(e):e.childNodes},_getChildNodes:function(e){if(!e.__dom.childNodes){e.__dom.childNodes=[];for(var t=e.__dom.firstChild;t;t=t.__dom.nextSibling)e.__dom.childNodes.push(t)}return e.__dom.childNodes},getParentNode:function(e){return e.__dom&&void 0!==e.__dom.parentNode?e.__dom.parentNode:e.parentNode},getFirstChild:function(e){return e.__dom&&void 0!==e.__dom.firstChild?e.__dom.firstChild:e.firstChild},getLastChild:function(e){return e.__dom&&void 0!==e.__dom.lastChild?e.__dom.lastChild:e.lastChild},getNextSibling:function(e){return e.__dom&&void 0!==e.__dom.nextSibling?e.__dom.nextSibling:e.nextSibling},getPreviousSibling:function(e){return e.__dom&&void 0!==e.__dom.previousSibling?e.__dom.previousSibling:e.previousSibling},getFirstElementChild:function(e){return e.__dom&&void 0!==e.__dom.firstChild?this._getFirstElementChild(e):e.firstElementChild},_getFirstElementChild:function(e){for(var t=e.__dom.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.__dom.nextSibling;return t},getLastElementChild:function(e){return e.__dom&&void 0!==e.__dom.lastChild?this._getLastElementChild(e):e.lastElementChild},_getLastElementChild:function(e){for(var t=e.__dom.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.__dom.previousSibling;return t},getNextElementSibling:function(e){return e.__dom&&void 0!==e.__dom.nextSibling?this._getNextElementSibling(e):e.nextElementSibling},_getNextElementSibling:function(e){for(var t=e.__dom.nextSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.__dom.nextSibling;return t},getPreviousElementSibling:function(e){return e.__dom&&void 0!==e.__dom.previousSibling?this._getPreviousElementSibling(e):e.previousElementSibling},_getPreviousElementSibling:function(e){for(var t=e.__dom.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.__dom.previousSibling;return t},saveChildNodes:function(e){if(!this.hasChildNodes(e)){e.__dom=e.__dom||{},e.__dom.firstChild=e.firstChild,e.__dom.lastChild=e.lastChild,e.__dom.childNodes=[];for(var t=e.firstChild;t;t=t.nextSibling)t.__dom=t.__dom||{},t.__dom.parentNode=e,e.__dom.childNodes.push(t),t.__dom.nextSibling=t.nextSibling,t.__dom.previousSibling=t.previousSibling}},recordInsertBefore:function(e,t,o){if(t.__dom.childNodes=null,e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var i=e.firstChild;i;i=i.nextSibling)this._linkNode(i,t,o);else this._linkNode(e,t,o)},_linkNode:function(e,t,o){e.__dom=e.__dom||{},t.__dom=t.__dom||{},o&&(o.__dom=o.__dom||{}),e.__dom.previousSibling=o?o.__dom.previousSibling:t.__dom.lastChild,e.__dom.previousSibling&&(e.__dom.previousSibling.__dom.nextSibling=e),e.__dom.nextSibling=o||null,e.__dom.nextSibling&&(e.__dom.nextSibling.__dom.previousSibling=e),e.__dom.parentNode=t,o?o===t.__dom.firstChild&&(t.__dom.firstChild=e):(t.__dom.lastChild=e,t.__dom.firstChild||(t.__dom.firstChild=e)),t.__dom.childNodes=null},recordRemoveChild:function(e,t){e.__dom=e.__dom||{},t.__dom=t.__dom||{},e===t.__dom.firstChild&&(t.__dom.firstChild=e.__dom.nextSibling),e===t.__dom.lastChild&&(t.__dom.lastChild=e.__dom.previousSibling);var o=e.__dom.previousSibling,i=e.__dom.nextSibling;o&&(o.__dom.nextSibling=i),i&&(i.__dom.previousSibling=o),e.__dom.parentNode=e.__dom.previousSibling=e.__dom.nextSibling=void 0,t.__dom.childNodes=null}},Polymer.TreeApi.Composed={getChildNodes:function(e){return Polymer.TreeApi.arrayCopyChildNodes(e)},getParentNode:function(e){return e.parentNode},clearChildNodes:function(e){e.textContent=""},insertBefore:function(t,o,i){return e.call(t,o,i||null)},appendChild:function(e,o){return t.call(e,o)},removeChild:function(e,t){return o.call(e,t)}}}(),Polymer.DomApi=function(){"use strict";var e=Polymer.Settings,t=Polymer.TreeApi,o=function(e){this.node=i?o.wrap(e):e},i=e.hasShadow&&!e.nativeShadow;o.wrap=window.wrap?window.wrap:function(e){return e},o.prototype={flush:function(){Polymer.dom.flush()},deepContains:function(e){if(this.node.contains(e))return!0;for(var t=e,o=e.ownerDocument;t&&t!==o&&t!==this.node;)t=Polymer.dom(t).parentNode||t.host;return t===this.node},queryDistributedElements:function(e){for(var t,i=this.getEffectiveChildNodes(),n=[],s=0,r=i.length;s<r&&(t=i[s]);s++)t.nodeType===Node.ELEMENT_NODE&&o.matchesSelector.call(t,e)&&n.push(t);return n},getEffectiveChildNodes:function(){for(var e,t=[],o=this.childNodes,i=0,r=o.length;i<r&&(e=o[i]);i++)if(e.localName===n)for(var d=s(e).getDistributedNodes(),a=0;a<d.length;a++)t.push(d[a]);else t.push(e);return t},observeNodes:function(e){if(e)return this.observer||(this.observer=this.node.localName===n?new o.DistributedNodesObserver(this):new o.EffectiveNodesObserver(this)),this.observer.addListener(e)},unobserveNodes:function(e){this.observer&&this.observer.removeListener(e)},notifyObserver:function(){this.observer&&this.observer.notify()},_query:function(e,o,i){o=o||this.node;var n=[];return this._queryElements(t.Logical.getChildNodes(o),e,i,n),n},_queryElements:function(e,t,o,i){for(var n,s=0,r=e.length;s<r&&(n=e[s]);s++)if(n.nodeType===Node.ELEMENT_NODE&&this._queryElement(n,t,o,i))return!0},_queryElement:function(e,o,i,n){var s=o(e);return s&&n.push(e),i&&i(s)?s:void this._queryElements(t.Logical.getChildNodes(e),o,i,n)}};var n=o.CONTENT="content",s=o.factory=function(e){return e=e||document,e.__domApi||(e.__domApi=new o.ctor(e)),e.__domApi};o.hasApi=function(e){return Boolean(e.__domApi)},o.ctor=o,Polymer.dom=function(e,t){return e instanceof Event?Polymer.EventApi.factory(e):o.factory(e,t)};var r=Element.prototype;return o.matchesSelector=r.matches||r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector,o}(),function(){"use strict";var e=Polymer.Settings,t=Polymer.DomApi,o=t.factory,i=Polymer.TreeApi,n=Polymer.domInnerHTML.getInnerHTML,s=t.CONTENT;if(!e.useShadow){var r=Element.prototype.cloneNode,d=Document.prototype.importNode;Polymer.Base.extend(t.prototype,{_lazyDistribute:function(e){e.shadyRoot&&e.shadyRoot._distributionClean&&(e.shadyRoot._distributionClean=!1,Polymer.dom.addDebouncer(e.debounce("_distribute",e._distributeContent)))},appendChild:function(e){return this.insertBefore(e)},insertBefore:function(e,n){if(n&&i.Logical.getParentNode(n)!==this.node)throw Error("The ref_node to be inserted before is not a child of this node");if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var r=i.Logical.getParentNode(e);r?(t.hasApi(r)&&o(r).notifyObserver(),this._removeNode(e)):this._removeOwnerShadyRoot(e)}if(!this._addNode(e,n)){n&&(n=n.localName===s?this._firstComposedNode(n):n);var d=this.node._isShadyRoot?this.node.host:this.node;n?i.Composed.insertBefore(d,e,n):i.Composed.appendChild(d,e)}return this.notifyObserver(),e},_addNode:function(e,t){var o=this.getOwnerRoot();if(o){var n=this._maybeAddInsertionPoint(e,this.node);o._invalidInsertionPoints||(o._invalidInsertionPoints=n),this._addNodeToHost(o.host,e)}i.Logical.hasChildNodes(this.node)&&i.Logical.recordInsertBefore(e,this.node,t);var s=this._maybeDistribute(e)||this.node.shadyRoot;if(s)if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(;e.firstChild;)i.Composed.removeChild(e,e.firstChild);else{var r=i.Composed.getParentNode(e);r&&i.Composed.removeChild(r,e)}return s},removeChild:function(e){if(i.Logical.getParentNode(e)!==this.node)throw Error("The node to be removed is not a child of this node: "+e);if(!this._removeNode(e)){var t=this.node._isShadyRoot?this.node.host:this.node,o=i.Composed.getParentNode(e);t===o&&i.Composed.removeChild(t,e)}return this.notifyObserver(),e},_removeNode:function(e){var t,n=i.Logical.hasParentNode(e)&&i.Logical.getParentNode(e),s=this._ownerShadyRootForNode(e);return n&&(t=o(e)._maybeDistributeParent(),i.Logical.recordRemoveChild(e,n),s&&this._removeDistributedChildren(s,e)&&(s._invalidInsertionPoints=!0,this._lazyDistribute(s.host))),this._removeOwnerShadyRoot(e),s&&this._removeNodeFromHost(s.host,e),t},replaceChild:function(e,t){return this.insertBefore(e,t),this.removeChild(t),e},_hasCachedOwnerRoot:function(e){return Boolean(void 0!==e._ownerShadyRoot)},getOwnerRoot:function(){return this._ownerShadyRootForNode(this.node)},_ownerShadyRootForNode:function(e){if(e){var t=e._ownerShadyRoot;if(void 0===t){if(e._isShadyRoot)t=e;else{var o=i.Logical.getParentNode(e);t=o?o._isShadyRoot?o:this._ownerShadyRootForNode(o):null}(t||document.documentElement.contains(e))&&(e._ownerShadyRoot=t)}return t}},_maybeDistribute:function(e){var t=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noContent&&o(e).querySelector(s),n=t&&i.Logical.getParentNode(t).nodeType!==Node.DOCUMENT_FRAGMENT_NODE,r=t||e.localName===s;if(r){var d=this.getOwnerRoot();d&&this._lazyDistribute(d.host)}var a=this._nodeNeedsDistribution(this.node);return a&&this._lazyDistribute(this.node),a||r&&!n},_maybeAddInsertionPoint:function(e,t){var n;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noContent)e.localName===s&&(i.Logical.saveChildNodes(t),i.Logical.saveChildNodes(e),n=!0);else for(var r,d,a,l=o(e).querySelectorAll(s),h=0;h<l.length&&(r=l[h]);h++)d=i.Logical.getParentNode(r),d===e&&(d=t),a=this._maybeAddInsertionPoint(r,d),n=n||a;return n},_updateInsertionPoints:function(e){for(var t,n=e.shadyRoot._insertionPoints=o(e.shadyRoot).querySelectorAll(s),r=0;r<n.length;r++)t=n[r],i.Logical.saveChildNodes(t),i.Logical.saveChildNodes(i.Logical.getParentNode(t))},_nodeNeedsDistribution:function(e){return e&&e.shadyRoot&&t.hasInsertionPoint(e.shadyRoot)},_addNodeToHost:function(e,t){e._elementAdd&&e._elementAdd(t)},_removeNodeFromHost:function(e,t){e._elementRemove&&e._elementRemove(t)},_removeDistributedChildren:function(e,t){for(var n,s=e._insertionPoints,r=0;r<s.length;r++){var d=s[r];if(this._contains(t,d))for(var a=o(d).getDistributedNodes(),l=0;l<a.length;l++){n=!0;var h=a[l],u=i.Composed.getParentNode(h);u&&i.Composed.removeChild(u,h)}}return n},_contains:function(e,t){for(;t;){if(t==e)return!0;t=i.Logical.getParentNode(t)}},_removeOwnerShadyRoot:function(e){if(this._hasCachedOwnerRoot(e))for(var t,o=i.Logical.getChildNodes(e),n=0,s=o.length;n<s&&(t=o[n]);n++)this._removeOwnerShadyRoot(t);e._ownerShadyRoot=void 0},_firstComposedNode:function(e){for(var t,i,n=o(e).getDistributedNodes(),s=0,r=n.length;s<r&&(t=n[s]);s++)if(i=o(t).getDestinationInsertionPoints(),i[i.length-1]===e)return t},querySelector:function(e){var o=this._query(function(o){return t.matchesSelector.call(o,e)},this.node,function(e){return Boolean(e)})[0];return o||null},querySelectorAll:function(e){return this._query(function(o){return t.matchesSelector.call(o,e)},this.node)},getDestinationInsertionPoints:function(){return this.node._destinationInsertionPoints||[]},getDistributedNodes:function(){return this.node._distributedNodes||[]},_clear:function(){for(;this.childNodes.length;)this.removeChild(this.childNodes[0])},setAttribute:function(e,t){this.node.setAttribute(e,t),this._maybeDistributeParent()},removeAttribute:function(e){this.node.removeAttribute(e),this._maybeDistributeParent()},_maybeDistributeParent:function(){if(this._nodeNeedsDistribution(this.parentNode))return this._lazyDistribute(this.parentNode),!0},cloneNode:function(e){var t=r.call(this.node,!1);if(e)for(var i,n=this.childNodes,s=o(t),d=0;d<n.length;d++)i=o(n[d]).cloneNode(!0),s.appendChild(i);return t},importNode:function(e,t){var n=this.node instanceof Document?this.node:this.node.ownerDocument,s=d.call(n,e,!1);if(t)for(var r,a=i.Logical.getChildNodes(e),l=o(s),h=0;h<a.length;h++)r=o(n).importNode(a[h],!0),l.appendChild(r);return s},_getComposedInnerHTML:function(){return n(this.node,!0)}}),Object.defineProperties(t.prototype,{activeElement:{get:function(){var e=document.activeElement;if(!e)return null;var t=!!this.node._isShadyRoot;if(this.node!==document){if(!t)return null;if(this.node.host===e||!this.node.host.contains(e))return null}for(var i=o(e).getOwnerRoot();i&&i!==this.node;)e=i.host,i=o(e).getOwnerRoot();return this.node===document?i?null:e:i===this.node?e:null},configurable:!0},childNodes:{get:function(){var e=i.Logical.getChildNodes(this.node);return Array.isArray(e)?e:i.arrayCopyChildNodes(this.node)},configurable:!0},children:{get:function(){return i.Logical.hasChildNodes(this.node)?Array.prototype.filter.call(this.childNodes,function(e){return e.nodeType===Node.ELEMENT_NODE}):i.arrayCopyChildren(this.node)},configurable:!0},parentNode:{get:function(){return i.Logical.getParentNode(this.node)},configurable:!0},firstChild:{get:function(){return i.Logical.getFirstChild(this.node)},configurable:!0},lastChild:{get:function(){return i.Logical.getLastChild(this.node)},configurable:!0},nextSibling:{get:function(){return i.Logical.getNextSibling(this.node)},configurable:!0},previousSibling:{get:function(){return i.Logical.getPreviousSibling(this.node)},configurable:!0},firstElementChild:{get:function(){return i.Logical.getFirstElementChild(this.node)},configurable:!0},lastElementChild:{get:function(){return i.Logical.getLastElementChild(this.node)},configurable:!0},nextElementSibling:{get:function(){return i.Logical.getNextElementSibling(this.node)},configurable:!0},previousElementSibling:{get:function(){return i.Logical.getPreviousElementSibling(this.node)},configurable:!0},textContent:{get:function(){var e=this.node.nodeType;if(e===Node.TEXT_NODE||e===Node.COMMENT_NODE)return this.node.textContent;for(var t,o=[],i=0,n=this.childNodes;t=n[i];i++)t.nodeType!==Node.COMMENT_NODE&&o.push(t.textContent);return o.join("")},set:function(e){var t=this.node.nodeType;t===Node.TEXT_NODE||t===Node.COMMENT_NODE?this.node.textContent=e:(this._clear(),e&&this.appendChild(document.createTextNode(e)))},configurable:!0},innerHTML:{get:function(){var e=this.node.nodeType;return e===Node.TEXT_NODE||e===Node.COMMENT_NODE?null:n(this.node)},set:function(e){var t=this.node.nodeType;if(t!==Node.TEXT_NODE||t!==Node.COMMENT_NODE){this._clear();var o=document.createElement("div");o.innerHTML=e;for(var n=i.arrayCopyChildNodes(o),s=0;s<n.length;s++)this.appendChild(n[s])}},configurable:!0}}),t.hasInsertionPoint=function(e){return Boolean(e&&e._insertionPoints.length)}}}(),function(){"use strict";var e=Polymer.Settings,t=Polymer.TreeApi,o=Polymer.DomApi;if(e.useShadow){Polymer.Base.extend(o.prototype,{querySelectorAll:function(e){return t.arrayCopy(this.node.querySelectorAll(e))},getOwnerRoot:function(){for(var e=this.node;e;){if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host)return e;e=e.parentNode}},importNode:function(e,t){var o=this.node instanceof Document?this.node:this.node.ownerDocument;return o.importNode(e,t)},getDestinationInsertionPoints:function(){var e=this.node.getDestinationInsertionPoints&&this.node.getDestinationInsertionPoints();return e?t.arrayCopy(e):[]},getDistributedNodes:function(){var e=this.node.getDistributedNodes&&this.node.getDistributedNodes();return e?t.arrayCopy(e):[]}}),Object.defineProperties(o.prototype,{activeElement:{get:function(){var e=o.wrap(this.node),t=e.activeElement;return e.contains(t)?t:null},configurable:!0},childNodes:{get:function(){return t.arrayCopyChildNodes(this.node)},configurable:!0},children:{get:function(){return t.arrayCopyChildren(this.node)},configurable:!0},textContent:{get:function(){return this.node.textContent},set:function(e){return this.node.textContent=e},configurable:!0},innerHTML:{get:function(){return this.node.innerHTML},set:function(e){return this.node.innerHTML=e},configurable:!0}});var i=function(e){for(var t=0;t<e.length;t++)n(e[t])},n=function(e){o.prototype[e]=function(){return this.node[e].apply(this.node,arguments)}};i(["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector"]);var s=function(e){for(var t=0;t<e.length;t++)r(e[t])},r=function(e){Object.defineProperty(o.prototype,e,{get:function(){return this.node[e]},configurable:!0})};s(["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling"])}}(),Polymer.Base.extend(Polymer.dom,{_flushGuard:0,_FLUSH_MAX:100,_needsTakeRecords:!Polymer.Settings.useNativeCustomElements,_debouncers:[],_staticFlushList:[],_finishDebouncer:null,flush:function(){for(this._flushGuard=0,this._prepareFlush();this._debouncers.length&&this._flushGuard<this._FLUSH_MAX;){for(;this._debouncers.length;)this._debouncers.shift().complete();this._finishDebouncer&&this._finishDebouncer.complete(),this._prepareFlush(),this._flushGuard++}this._flushGuard>=this._FLUSH_MAX&&console.warn("Polymer.dom.flush aborted. Flush may not be complete.")},_prepareFlush:function(){this._needsTakeRecords&&CustomElements.takeRecords();for(var e=0;e<this._staticFlushList.length;e++)this._staticFlushList[e]()},addStaticFlush:function(e){this._staticFlushList.push(e)},removeStaticFlush:function(e){var t=this._staticFlushList.indexOf(e);t>=0&&this._staticFlushList.splice(t,1)},addDebouncer:function(e){this._debouncers.push(e),this._finishDebouncer=Polymer.Debounce(this._finishDebouncer,this._finishFlush)},_finishFlush:function(){Polymer.dom._debouncers=[]}}),Polymer.EventApi=function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;e.Event=function(e){this.event=e},t.useShadow?e.Event.prototype={get rootTarget(){return this.event.path[0]},get localTarget(){return this.event.target},get path(){var e=this.event.path;return Array.isArray(e)||(e=Array.prototype.slice.call(e)),e}}:e.Event.prototype={get rootTarget(){return this.event.target},get localTarget(){for(var e=this.event.currentTarget,t=e&&Polymer.dom(e).getOwnerRoot(),o=this.path,i=0;i<o.length;i++)if(Polymer.dom(o[i]).getOwnerRoot()===t)return o[i]},get path(){if(!this.event._path){for(var e=[],t=this.rootTarget;t;){e.push(t);var o=Polymer.dom(t).getDestinationInsertionPoints();if(o.length){for(var i=0;i<o.length-1;i++)e.push(o[i]);t=o[o.length-1]}else t=Polymer.dom(t).parentNode||t.host}e.push(window),this.event._path=e}return this.event._path}};var o=function(t){return t.__eventApi||(t.__eventApi=new e.Event(t)),t.__eventApi};return{factory:o}}(),function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings.useShadow;Object.defineProperty(e.prototype,"classList",{get:function(){return this._classList||(this._classList=new e.ClassList(this)),this._classList},configurable:!0}),e.ClassList=function(e){this.domApi=e,this.node=e.node},e.ClassList.prototype={add:function(){this.node.classList.add.apply(this.node.classList,arguments),this._distributeParent()},remove:function(){this.node.classList.remove.apply(this.node.classList,arguments),this._distributeParent()},toggle:function(){this.node.classList.toggle.apply(this.node.classList,arguments),this._distributeParent()},_distributeParent:function(){t||this.domApi._maybeDistributeParent()},contains:function(){return this.node.classList.contains.apply(this.node.classList,arguments)}}}(),function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;if(e.EffectiveNodesObserver=function(e){this.domApi=e,this.node=this.domApi.node,this._listeners=[]},e.EffectiveNodesObserver.prototype={addListener:function(e){this._isSetup||(this._setup(),this._isSetup=!0);var t={fn:e,_nodes:[]};return this._listeners.push(t),this._scheduleNotify(),t},removeListener:function(e){var t=this._listeners.indexOf(e);t>=0&&(this._listeners.splice(t,1),e._nodes=[]),this._hasListeners()||(this._cleanup(),this._isSetup=!1)},_setup:function(){this._observeContentElements(this.domApi.childNodes)},_cleanup:function(){this._unobserveContentElements(this.domApi.childNodes)},_hasListeners:function(){return Boolean(this._listeners.length)},_scheduleNotify:function(){this._debouncer&&this._debouncer.stop(),this._debouncer=Polymer.Debounce(this._debouncer,this._notify),this._debouncer.context=this,Polymer.dom.addDebouncer(this._debouncer)},notify:function(){this._hasListeners()&&this._scheduleNotify()},_notify:function(){this._beforeCallListeners(),this._callListeners()},_beforeCallListeners:function(){this._updateContentElements()},_updateContentElements:function(){this._observeContentElements(this.domApi.childNodes)},_observeContentElements:function(e){for(var t,o=0;o<e.length&&(t=e[o]);o++)this._isContent(t)&&(t.__observeNodesMap=t.__observeNodesMap||new WeakMap,t.__observeNodesMap.has(this)||t.__observeNodesMap.set(this,this._observeContent(t)))},_observeContent:function(e){var t=this,o=Polymer.dom(e).observeNodes(function(){t._scheduleNotify()});return o._avoidChangeCalculation=!0,o},_unobserveContentElements:function(e){for(var t,o,i=0;i<e.length&&(t=e[i]);i++)this._isContent(t)&&(o=t.__observeNodesMap.get(this),o&&(Polymer.dom(t).unobserveNodes(o),t.__observeNodesMap.delete(this)))},_isContent:function(e){return"content"===e.localName},_callListeners:function(){for(var e,t=this._listeners,o=this._getEffectiveNodes(),i=0;i<t.length&&(e=t[i]);i++){var n=this._generateListenerInfo(e,o);(n||e._alwaysNotify)&&this._callListener(e,n)}},_getEffectiveNodes:function(){return this.domApi.getEffectiveChildNodes()},_generateListenerInfo:function(e,t){if(e._avoidChangeCalculation)return!0;for(var o,i=e._nodes,n={target:this.node,addedNodes:[],removedNodes:[]},s=Polymer.ArraySplice.calculateSplices(t,i),r=0;r<s.length&&(o=s[r]);r++)for(var d,a=0;a<o.removed.length&&(d=o.removed[a]);a++)n.removedNodes.push(d);for(r=0,o;r<s.length&&(o=s[r]);r++)for(a=o.index;a<o.index+o.addedCount;a++)n.addedNodes.push(t[a]);return e._nodes=t,n.addedNodes.length||n.removedNodes.length?n:void 0},_callListener:function(e,t){return e.fn.call(this.node,t)},enableShadowAttributeTracking:function(){}},t.useShadow){var o=e.EffectiveNodesObserver.prototype._setup,i=e.EffectiveNodesObserver.prototype._cleanup;Polymer.Base.extend(e.EffectiveNodesObserver.prototype,{_setup:function(){if(!this._observer){var e=this;this._mutationHandler=function(t){t&&t.length&&e._scheduleNotify()},this._observer=new MutationObserver(this._mutationHandler),this._boundFlush=function(){e._flush()},Polymer.dom.addStaticFlush(this._boundFlush),this._observer.observe(this.node,{childList:!0})}o.call(this)},_cleanup:function(){this._observer.disconnect(),this._observer=null,this._mutationHandler=null,Polymer.dom.removeStaticFlush(this._boundFlush),i.call(this)},_flush:function(){this._observer&&this._mutationHandler(this._observer.takeRecords())},enableShadowAttributeTracking:function(){if(this._observer){this._makeContentListenersAlwaysNotify(),this._observer.disconnect(),this._observer.observe(this.node,{childList:!0,attributes:!0,subtree:!0});var e=this.domApi.getOwnerRoot(),t=e&&e.host;t&&Polymer.dom(t).observer&&Polymer.dom(t).observer.enableShadowAttributeTracking()}},_makeContentListenersAlwaysNotify:function(){for(var e,t=0;t<this._listeners.length;t++)e=this._listeners[t],e._alwaysNotify=e._isContentListener}})}}(),function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;e.DistributedNodesObserver=function(t){e.EffectiveNodesObserver.call(this,t)},e.DistributedNodesObserver.prototype=Object.create(e.EffectiveNodesObserver.prototype),Polymer.Base.extend(e.DistributedNodesObserver.prototype,{_setup:function(){},_cleanup:function(){},_beforeCallListeners:function(){},_getEffectiveNodes:function(){return this.domApi.getDistributedNodes()}}),t.useShadow&&Polymer.Base.extend(e.DistributedNodesObserver.prototype,{_setup:function(){if(!this._observer){var e=this.domApi.getOwnerRoot(),t=e&&e.host;if(t){var o=this;this._observer=Polymer.dom(t).observeNodes(function(){o._scheduleNotify()}),this._observer._isContentListener=!0,this._hasAttrSelect()&&Polymer.dom(t).observer.enableShadowAttributeTracking()}}},_hasAttrSelect:function(){var e=this.node.getAttribute("select");return e&&e.match(/[[.]+/)},_cleanup:function(){var e=this.domApi.getOwnerRoot(),t=e&&e.host;t&&Polymer.dom(t).unobserveNodes(this._observer),this._observer=null}})}(),function(){function e(e,t){t._distributedNodes.push(e);var o=e._destinationInsertionPoints;o?o.push(t):e._destinationInsertionPoints=[t]}function t(e){var t=e._distributedNodes;if(t)for(var o=0;o<t.length;o++){var i=t[o]._destinationInsertionPoints;i&&i.splice(i.indexOf(e)+1,i.length)}}function o(e,t){var o=u.Logical.getParentNode(e);o&&o.shadyRoot&&h.hasInsertionPoint(o.shadyRoot)&&o.shadyRoot._distributionClean&&(o.shadyRoot._distributionClean=!1,t.shadyRoot._dirtyRoots.push(o))}function i(e,t){var o=t._destinationInsertionPoints;return o&&o[o.length-1]===e}function n(e){return"content"==e.localName}function s(e){for(;e&&r(e);)e=e.domHost;return e}function r(e){for(var t,o=u.Logical.getChildNodes(e),i=0;i<o.length;i++)if(t=o[i],t.localName&&"content"===t.localName)return e.domHost}function d(e){for(var t,o=0;o<e._insertionPoints.length;o++)t=e._insertionPoints[o],h.hasApi(t)&&Polymer.dom(t).notifyObserver()}function a(e){h.hasApi(e)&&Polymer.dom(e).notifyObserver()}function l(e){if(c&&e)for(var t=0;t<e.length;t++)CustomElements.upgrade(e[t])}var h=Polymer.DomApi,u=Polymer.TreeApi;Polymer.Base._addFeature({_prepShady:function(){this._useContent=this._useContent||Boolean(this._template)},_setupShady:function(){this.shadyRoot=null,this.__domApi||(this.__domApi=null),this.__dom||(this.__dom=null),this._ownerShadyRoot||(this._ownerShadyRoot=void 0)},_poolContent:function(){this._useContent&&u.Logical.saveChildNodes(this)},_setupRoot:function(){this._useContent&&(this._createLocalRoot(),this.dataHost||l(u.Logical.getChildNodes(this)))},_createLocalRoot:function(){this.shadyRoot=this.root,this.shadyRoot._distributionClean=!1,this.shadyRoot._hasDistributed=!1,this.shadyRoot._isShadyRoot=!0,this.shadyRoot._dirtyRoots=[];var e=this.shadyRoot._insertionPoints=!this._notes||this._notes._hasContent?this.shadyRoot.querySelectorAll("content"):[];u.Logical.saveChildNodes(this.shadyRoot);for(var t,o=0;o<e.length;o++)t=e[o],u.Logical.saveChildNodes(t),u.Logical.saveChildNodes(t.parentNode);this.shadyRoot.host=this},get domHost(){var e=Polymer.dom(this).getOwnerRoot();return e&&e.host},distributeContent:function(e){if(this.shadyRoot){this.shadyRoot._invalidInsertionPoints=this.shadyRoot._invalidInsertionPoints||e;var t=s(this);Polymer.dom(this)._lazyDistribute(t)}},_distributeContent:function(){this._useContent&&!this.shadyRoot._distributionClean&&(this.shadyRoot._invalidInsertionPoints&&(Polymer.dom(this)._updateInsertionPoints(this),this.shadyRoot._invalidInsertionPoints=!1),this._beginDistribute(),this._distributeDirtyRoots(),this._finishDistribute())},_beginDistribute:function(){this._useContent&&h.hasInsertionPoint(this.shadyRoot)&&(this._resetDistribution(),this._distributePool(this.shadyRoot,this._collectPool()));
},_distributeDirtyRoots:function(){for(var e,t=this.shadyRoot._dirtyRoots,o=0,i=t.length;o<i&&(e=t[o]);o++)e._distributeContent();this.shadyRoot._dirtyRoots=[]},_finishDistribute:function(){if(this._useContent){if(this.shadyRoot._distributionClean=!0,h.hasInsertionPoint(this.shadyRoot))this._composeTree(),d(this.shadyRoot);else if(this.shadyRoot._hasDistributed){var e=this._composeNode(this);this._updateChildNodes(this,e)}else u.Composed.clearChildNodes(this),this.appendChild(this.shadyRoot);this.shadyRoot._hasDistributed||a(this),this.shadyRoot._hasDistributed=!0}},elementMatches:function(e,t){return t=t||this,h.matchesSelector.call(t,e)},_resetDistribution:function(){for(var e=u.Logical.getChildNodes(this),o=0;o<e.length;o++){var i=e[o];i._destinationInsertionPoints&&(i._destinationInsertionPoints=void 0),n(i)&&t(i)}for(var s=this.shadyRoot,r=s._insertionPoints,d=0;d<r.length;d++)r[d]._distributedNodes=[]},_collectPool:function(){for(var e=[],t=u.Logical.getChildNodes(this),o=0;o<t.length;o++){var i=t[o];n(i)?e.push.apply(e,i._distributedNodes):e.push(i)}return e},_distributePool:function(e,t){for(var i,n=e._insertionPoints,s=0,r=n.length;s<r&&(i=n[s]);s++)this._distributeInsertionPoint(i,t),o(i,this)},_distributeInsertionPoint:function(t,o){for(var i,n=!1,s=0,r=o.length;s<r;s++)i=o[s],i&&this._matchesContentSelect(i,t)&&(e(i,t),o[s]=void 0,n=!0);if(!n)for(var d=u.Logical.getChildNodes(t),a=0;a<d.length;a++)e(d[a],t)},_composeTree:function(){this._updateChildNodes(this,this._composeNode(this));for(var e,t,o=this.shadyRoot._insertionPoints,i=0,n=o.length;i<n&&(e=o[i]);i++)t=u.Logical.getParentNode(e),t._useContent||t===this||t===this.shadyRoot||this._updateChildNodes(t,this._composeNode(t))},_composeNode:function(e){for(var t=[],o=u.Logical.getChildNodes(e.shadyRoot||e),s=0;s<o.length;s++){var r=o[s];if(n(r))for(var d=r._distributedNodes,a=0;a<d.length;a++){var l=d[a];i(r,l)&&t.push(l)}else t.push(r)}return t},_updateChildNodes:function(e,t){for(var o,i=u.Composed.getChildNodes(e),n=Polymer.ArraySplice.calculateSplices(t,i),s=0,r=0;s<n.length&&(o=n[s]);s++){for(var d,a=0;a<o.removed.length&&(d=o.removed[a]);a++)u.Composed.getParentNode(d)===e&&u.Composed.removeChild(e,d),i.splice(o.index+r,1);r-=o.addedCount}for(var o,l,s=0;s<n.length&&(o=n[s]);s++)for(l=i[o.index],a=o.index,d;a<o.index+o.addedCount;a++)d=t[a],u.Composed.insertBefore(e,d,l),i.splice(a,0,d)},_matchesContentSelect:function(e,t){var o=t.getAttribute("select");if(!o)return!0;if(o=o.trim(),!o)return!0;if(!(e instanceof Element))return!1;var i=/^(:not\()?[*.#[a-zA-Z_|]/;return!!i.test(o)&&this.elementMatches(o,e)},_elementAdd:function(){},_elementRemove:function(){}});var c=window.CustomElements&&!CustomElements.useNative}(),Polymer.Settings.useShadow&&Polymer.Base._addFeature({_poolContent:function(){},_beginDistribute:function(){},distributeContent:function(){},_distributeContent:function(){},_finishDistribute:function(){},_createLocalRoot:function(){this.createShadowRoot(),this.shadowRoot.appendChild(this.root),this.root=this.shadowRoot}}),Polymer.Async={_currVal:0,_lastVal:0,_callbacks:[],_twiddleContent:0,_twiddle:document.createTextNode(""),run:function(e,t){return t>0?~setTimeout(e,t):(this._twiddle.textContent=this._twiddleContent++,this._callbacks.push(e),this._currVal++)},cancel:function(e){if(e<0)clearTimeout(~e);else{var t=e-this._lastVal;if(t>=0){if(!this._callbacks[t])throw"invalid async handle: "+e;this._callbacks[t]=null}}},_atEndOfMicrotask:function(){for(var e=this._callbacks.length,t=0;t<e;t++){var o=this._callbacks[t];if(o)try{o()}catch(e){throw t++,this._callbacks.splice(0,t),this._lastVal+=t,this._twiddle.textContent=this._twiddleContent++,e}}this._callbacks.splice(0,e),this._lastVal+=e}},new window.MutationObserver(function(){Polymer.Async._atEndOfMicrotask()}).observe(Polymer.Async._twiddle,{characterData:!0}),Polymer.Debounce=function(){function e(e,t,i){return e?e.stop():e=new o(this),e.go(t,i),e}var t=Polymer.Async,o=function(e){this.context=e;var t=this;this.boundComplete=function(){t.complete()}};return o.prototype={go:function(e,o){var i;this.finish=function(){t.cancel(i)},i=t.run(this.boundComplete,o),this.callback=e},stop:function(){this.finish&&(this.finish(),this.finish=null,this.callback=null)},complete:function(){if(this.finish){var e=this.callback;this.stop(),e.call(this.context)}}},e}(),Polymer.Base._addFeature({_setupDebouncers:function(){this._debouncers={}},debounce:function(e,t,o){return this._debouncers[e]=Polymer.Debounce.call(this,this._debouncers[e],t,o)},isDebouncerActive:function(e){var t=this._debouncers[e];return!(!t||!t.finish)},flushDebouncer:function(e){var t=this._debouncers[e];t&&t.complete()},cancelDebouncer:function(e){var t=this._debouncers[e];t&&t.stop()}}),Polymer.DomModule=document.createElement("dom-module"),Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepBehaviors(),this._prepConstructor(),this._prepTemplate(),this._prepShady(),this._prepPropertyInfo()},_prepBehavior:function(e){this._addHostAttributes(e.hostAttributes)},_initFeatures:function(){this._registerHost(),this._template&&(this._poolContent(),this._beginHosting(),this._stampTemplate(),this._endHosting()),this._marshalHostAttributes(),this._setupDebouncers(),this._marshalBehaviors(),this._tryReady()},_marshalBehavior:function(e){}})</script><script>Polymer.nar=[],Polymer.Annotations={parseAnnotations:function(e){var t=[],n=e._content||e.content;return this._parseNodeAnnotations(n,t,e.hasAttribute("strip-whitespace")),t},_parseNodeAnnotations:function(e,t,n){return e.nodeType===Node.TEXT_NODE?this._parseTextNodeAnnotation(e,t):this._parseElementAnnotations(e,t,n)},_bindingRegex:function(){var e="(?:[a-zA-Z_$][\\w.:$\\-*]*)",t="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",n="(?:'(?:[^'\\\\]|\\\\.)*')",r='(?:"(?:[^"\\\\]|\\\\.)*")',s="(?:"+n+"|"+r+")",i="(?:"+e+"|"+t+"|"+s+"\\s*)",o="(?:"+i+"(?:,\\s*"+i+")*)",a="(?:\\(\\s*(?:"+o+"?)\\)\\s*)",l="("+e+"\\s*"+a+"?)",c="(\\[\\[|{{)\\s*",h="(?:]]|}})",u="(?:(!)\\s*)?",f=c+u+l+h;return new RegExp(f,"g")}(),_parseBindings:function(e){for(var t,n=this._bindingRegex,r=[],s=0;null!==(t=n.exec(e));){t.index>s&&r.push({literal:e.slice(s,t.index)});var i,o,a,l=t[1][0],c=Boolean(t[2]),h=t[3].trim();"{"==l&&(a=h.indexOf("::"))>0&&(o=h.substring(a+2),h=h.substring(0,a),i=!0),r.push({compoundIndex:r.length,value:h,mode:l,negate:c,event:o,customEvent:i}),s=n.lastIndex}if(s&&s<e.length){var u=e.substring(s);u&&r.push({literal:u})}if(r.length)return r},_literalFromParts:function(e){for(var t="",n=0;n<e.length;n++){var r=e[n].literal;t+=r||""}return t},_parseTextNodeAnnotation:function(e,t){var n=this._parseBindings(e.textContent);if(n){e.textContent=this._literalFromParts(n)||" ";var r={bindings:[{kind:"text",name:"textContent",parts:n,isCompound:1!==n.length}]};return t.push(r),r}},_parseElementAnnotations:function(e,t,n){var r={bindings:[],events:[]};return"content"===e.localName&&(t._hasContent=!0),this._parseChildNodesAnnotations(e,r,t,n),e.attributes&&(this._parseNodeAttributeAnnotations(e,r,t),this.prepElement&&this.prepElement(e)),(r.bindings.length||r.events.length||r.id)&&t.push(r),r},_parseChildNodesAnnotations:function(e,t,n,r){if(e.firstChild)for(var s=e.firstChild,i=0;s;){var o=s.nextSibling;if("template"!==s.localName||s.hasAttribute("preserve-content")||this._parseTemplate(s,i,n,t),"slot"==s.localName&&(s=this._replaceSlotWithContent(s)),s.nodeType===Node.TEXT_NODE){for(var a=o;a&&a.nodeType===Node.TEXT_NODE;)s.textContent+=a.textContent,o=a.nextSibling,e.removeChild(a),a=o;r&&!s.textContent.trim()&&(e.removeChild(s),i--)}if(s.parentNode){var l=this._parseNodeAnnotations(s,n,r);l&&(l.parent=t,l.index=i)}s=o,i++}},_replaceSlotWithContent:function(e){for(var t=e.ownerDocument.createElement("content");e.firstChild;)t.appendChild(e.firstChild);for(var n=e.attributes,r=0;r<n.length;r++){var s=n[r];t.setAttribute(s.name,s.value)}var i=e.getAttribute("name");return i&&t.setAttribute("select","[slot='"+i+"']"),e.parentNode.replaceChild(t,e),t},_parseTemplate:function(e,t,n,r){var s=document.createDocumentFragment();s._notes=this.parseAnnotations(e),s.appendChild(e.content),n.push({bindings:Polymer.nar,events:Polymer.nar,templateContent:s,parent:r,index:t})},_parseNodeAttributeAnnotations:function(e,t){for(var n,r=Array.prototype.slice.call(e.attributes),s=r.length-1;n=r[s];s--){var i,o=n.name,a=n.value;"on-"===o.slice(0,3)?(e.removeAttribute(o),t.events.push({name:o.slice(3),value:a})):(i=this._parseNodeAttributeAnnotation(e,o,a))?t.bindings.push(i):"id"===o&&(t.id=a)}},_parseNodeAttributeAnnotation:function(e,t,n){var r=this._parseBindings(n);if(r){var s=t,i="property";"$"==t[t.length-1]&&(t=t.slice(0,-1),i="attribute");var o=this._literalFromParts(r);o&&"attribute"==i&&e.setAttribute(t,o),"input"===e.localName&&"value"===s&&e.setAttribute(s,""),e.removeAttribute(s);var a=Polymer.CaseMap.dashToCamelCase(t);return"property"===i&&(t=a),{kind:i,name:t,propertyName:a,parts:r,literal:o,isCompound:1!==r.length}}},findAnnotatedNode:function(e,t){var n=t.parent&&Polymer.Annotations.findAnnotatedNode(e,t.parent);if(!n)return e;for(var r=n.firstChild,s=0;r;r=r.nextSibling)if(t.index===s++)return r}},function(){function e(e,t){return e.replace(a,function(e,r,s,i){return r+"'"+n(s.replace(/["']/g,""),t)+"'"+i})}function t(t,r){for(var s in l)for(var i,o,a,c=l[s],u=0,f=c.length;u<f&&(i=c[u]);u++)"*"!==s&&t.localName!==s||(o=t.attributes[i],a=o&&o.value,a&&a.search(h)<0&&(o.value="style"===i?e(a,r):n(a,r)))}function n(e,t){if(e&&c.test(e))return e;var n=s(t);return n.href=e,n.href||e}function r(e,t){return i||(i=document.implementation.createHTMLDocument("temp"),o=i.createElement("base"),i.head.appendChild(o)),o.href=t,n(e,i)}function s(e){return e.body.__urlResolver||(e.body.__urlResolver=e.createElement("a"))}var i,o,a=/(url\()([^)]*)(\))/g,l={"*":["href","src","style","url"],form:["action"]},c=/(^\/)|(^#)|(^[\w-\d]*:)/,h=/\{\{|\[\[/;Polymer.ResolveUrl={resolveCss:e,resolveAttrs:t,resolveUrl:r}}(),Polymer.Path={root:function(e){var t=e.indexOf(".");return t===-1?e:e.slice(0,t)},isDeep:function(e){return e.indexOf(".")!==-1},isAncestor:function(e,t){return 0===e.indexOf(t+".")},isDescendant:function(e,t){return 0===t.indexOf(e+".")},translate:function(e,t,n){return t+n.slice(e.length)},matches:function(e,t,n){return e===n||this.isAncestor(e,n)||Boolean(t)&&this.isDescendant(e,n)}},Polymer.Base._addFeature({_prepAnnotations:function(){if(this._template){var e=this;Polymer.Annotations.prepElement=function(t){e._prepElement(t)},this._template._content&&this._template._content._notes?this._notes=this._template._content._notes:(this._notes=Polymer.Annotations.parseAnnotations(this._template),this._processAnnotations(this._notes)),Polymer.Annotations.prepElement=null}else this._notes=[]},_processAnnotations:function(e){for(var t=0;t<e.length;t++){for(var n=e[t],r=0;r<n.bindings.length;r++)for(var s=n.bindings[r],i=0;i<s.parts.length;i++){var o=s.parts[i];if(!o.literal){var a=this._parseMethod(o.value);a?o.signature=a:o.model=Polymer.Path.root(o.value)}}if(n.templateContent){this._processAnnotations(n.templateContent._notes);var l=n.templateContent._parentProps=this._discoverTemplateParentProps(n.templateContent._notes),c=[];for(var h in l){var u="_parent_"+h;c.push({index:n.index,kind:"property",name:u,propertyName:u,parts:[{mode:"{",model:h,value:h}]})}n.bindings=n.bindings.concat(c)}}},_discoverTemplateParentProps:function(e){for(var t,n={},r=0;r<e.length&&(t=e[r]);r++){for(var s,i=0,o=t.bindings;i<o.length&&(s=o[i]);i++)for(var a,l=0,c=s.parts;l<c.length&&(a=c[l]);l++)if(a.signature){for(var h=a.signature.args,u=0;u<h.length;u++){var f=h[u].model;f&&(n[f]=!0)}a.signature.dynamicFn&&(n[a.signature.method]=!0)}else a.model&&(n[a.model]=!0);if(t.templateContent){var p=t.templateContent._parentProps;Polymer.Base.mixin(n,p)}}return n},_prepElement:function(e){Polymer.ResolveUrl.resolveAttrs(e,this._template.ownerDocument)},_findAnnotatedNode:Polymer.Annotations.findAnnotatedNode,_marshalAnnotationReferences:function(){this._template&&(this._marshalIdNodes(),this._marshalAnnotatedNodes(),this._marshalAnnotatedListeners())},_configureAnnotationReferences:function(){for(var e=this._notes,t=this._nodes,n=0;n<e.length;n++){var r=e[n],s=t[n];this._configureTemplateContent(r,s),this._configureCompoundBindings(r,s)}},_configureTemplateContent:function(e,t){e.templateContent&&(t._content=e.templateContent)},_configureCompoundBindings:function(e,t){for(var n=e.bindings,r=0;r<n.length;r++){var s=n[r];if(s.isCompound){for(var i=t.__compoundStorage__||(t.__compoundStorage__={}),o=s.parts,a=new Array(o.length),l=0;l<o.length;l++)a[l]=o[l].literal;var c=s.name;i[c]=a,s.literal&&"property"==s.kind&&(t._configValue?t._configValue(c,s.literal):t[c]=s.literal)}}},_marshalIdNodes:function(){this.$={};for(var e,t=0,n=this._notes.length;t<n&&(e=this._notes[t]);t++)e.id&&(this.$[e.id]=this._findAnnotatedNode(this.root,e))},_marshalAnnotatedNodes:function(){if(this._notes&&this._notes.length){for(var e=new Array(this._notes.length),t=0;t<this._notes.length;t++)e[t]=this._findAnnotatedNode(this.root,this._notes[t]);this._nodes=e}},_marshalAnnotatedListeners:function(){for(var e,t=0,n=this._notes.length;t<n&&(e=this._notes[t]);t++)if(e.events&&e.events.length)for(var r,s=this._findAnnotatedNode(this.root,e),i=0,o=e.events;i<o.length&&(r=o[i]);i++)this.listen(s,r.name,r.value)}}),Polymer.Base._addFeature({listeners:{},_listenListeners:function(e){var t,n,r;for(r in e)r.indexOf(".")<0?(t=this,n=r):(n=r.split("."),t=this.$[n[0]],n=n[1]),this.listen(t,n,e[r])},listen:function(e,t,n){var r=this._recallEventHandler(this,t,e,n);r||(r=this._createEventHandler(e,t,n)),r._listening||(this._listen(e,t,r),r._listening=!0)},_boundListenerKey:function(e,t){return e+":"+t},_recordEventHandler:function(e,t,n,r,s){var i=e.__boundListeners;i||(i=e.__boundListeners=new WeakMap);var o=i.get(n);o||(o={},Polymer.Settings.isIE&&n==window||i.set(n,o));var a=this._boundListenerKey(t,r);o[a]=s},_recallEventHandler:function(e,t,n,r){var s=e.__boundListeners;if(s){var i=s.get(n);if(i){var o=this._boundListenerKey(t,r);return i[o]}}},_createEventHandler:function(e,t,n){var r=this,s=function(e){r[n]?r[n](e,e.detail):r._warn(r._logf("_createEventHandler","listener method `"+n+"` not defined"))};return s._listening=!1,this._recordEventHandler(r,t,e,n,s),s},unlisten:function(e,t,n){var r=this._recallEventHandler(this,t,e,n);r&&(this._unlisten(e,t,r),r._listening=!1)},_listen:function(e,t,n){e.addEventListener(t,n)},_unlisten:function(e,t,n){e.removeEventListener(t,n)}}),function(){"use strict";function e(e){for(var t,n=P?["click"]:m,r=0;r<n.length;r++)t=n[r],e?document.addEventListener(t,S,!0):document.removeEventListener(t,S,!0)}function t(t){E.mouse.mouseIgnoreJob||e(!0);var n=function(){e(),E.mouse.target=null,E.mouse.mouseIgnoreJob=null};E.mouse.target=Polymer.dom(t).rootTarget,E.mouse.mouseIgnoreJob=Polymer.Debounce(E.mouse.mouseIgnoreJob,n,d)}function n(e){var t=e.type;if(m.indexOf(t)===-1)return!1;if("mousemove"===t){var n=void 0===e.buttons?1:e.buttons;return e instanceof window.MouseEvent&&!v&&(n=y[e.which]||0),Boolean(1&n)}var r=void 0===e.button?0:e.button;return 0===r}function r(e){if("click"===e.type){if(0===e.detail)return!0;var t=C.findOriginalTarget(e),n=t.getBoundingClientRect(),r=e.pageX,s=e.pageY;return!(r>=n.left&&r<=n.right&&s>=n.top&&s<=n.bottom)}return!1}function s(e){for(var t,n=Polymer.dom(e).path,r="auto",s=0;s<n.length;s++)if(t=n[s],t[u]){r=t[u];break}return r}function i(e,t,n){e.movefn=t,e.upfn=n,document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)}function o(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}var a=Polymer.DomApi.wrap,l="string"==typeof document.head.style.touchAction,c="__polymerGestures",h="__polymerGesturesHandled",u="__polymerGesturesTouchAction",f=25,p=5,_=2,d=2500,m=["mousedown","mousemove","mouseup","click"],y=[0,1,4,2],v=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}(),g=!1;!function(){try{var e=Object.defineProperty({},"passive",{get:function(){g=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}}();var P=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),S=function(e){var t=e.sourceCapabilities;if((!t||t.firesTouchEvents)&&(e[h]={skip:!0},"click"===e.type)){for(var n=Polymer.dom(e).path,r=0;r<n.length;r++)if(n[r]===E.mouse.target)return;e.preventDefault(),e.stopPropagation()}},E={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};document.addEventListener("touchend",t,!!g&&{passive:!0});var C={gestures:{},recognizers:[],deepTargetFind:function(e,t){for(var n=document.elementFromPoint(e,t),r=n;r&&r.shadowRoot;)r=r.shadowRoot.elementFromPoint(e,t),r&&(n=r);return n},findOriginalTarget:function(e){return e.path?e.path[0]:e.target},handleNative:function(e){var t,n=e.type,r=a(e.currentTarget),s=r[c];if(s){var i=s[n];if(i){if(!e[h]&&(e[h]={},"touch"===n.slice(0,5))){var o=e.changedTouches[0];if("touchstart"===n&&1===e.touches.length&&(E.touch.id=o.identifier),E.touch.id!==o.identifier)return;l||"touchstart"!==n&&"touchmove"!==n||C.handleTouchAction(e)}if(t=e[h],!t.skip){for(var u,f=C.recognizers,p=0;p<f.length;p++)u=f[p],i[u.name]&&!t[u.name]&&u.flow&&u.flow.start.indexOf(e.type)>-1&&u.reset&&u.reset();for(p=0,u;p<f.length;p++)u=f[p],i[u.name]&&!t[u.name]&&(t[u.name]=!0,u[n](e))}}}},handleTouchAction:function(e){var t=e.changedTouches[0],n=e.type;if("touchstart"===n)E.touch.x=t.clientX,E.touch.y=t.clientY,E.touch.scrollDecided=!1;else if("touchmove"===n){if(E.touch.scrollDecided)return;E.touch.scrollDecided=!0;var r=s(e),i=!1,o=Math.abs(E.touch.x-t.clientX),a=Math.abs(E.touch.y-t.clientY);e.cancelable&&("none"===r?i=!0:"pan-x"===r?i=a>o:"pan-y"===r&&(i=o>a)),i?e.preventDefault():C.prevent("track")}},add:function(e,t,n){e=a(e);var r=this.gestures[t],s=r.deps,i=r.name,o=e[c];o||(e[c]=o={});for(var l,h,u=0;u<s.length;u++)l=s[u],P&&m.indexOf(l)>-1&&"click"!==l||(h=o[l],h||(o[l]=h={_count:0}),0===h._count&&e.addEventListener(l,this.handleNative),h[i]=(h[i]||0)+1,h._count=(h._count||0)+1);e.addEventListener(t,n),r.touchAction&&this.setTouchAction(e,r.touchAction)},remove:function(e,t,n){e=a(e);var r=this.gestures[t],s=r.deps,i=r.name,o=e[c];if(o)for(var l,h,u=0;u<s.length;u++)l=s[u],h=o[l],h&&h[i]&&(h[i]=(h[i]||1)-1,h._count=(h._count||1)-1,0===h._count&&e.removeEventListener(l,this.handleNative));e.removeEventListener(t,n)},register:function(e){this.recognizers.push(e);for(var t=0;t<e.emits.length;t++)this.gestures[e.emits[t]]=e},findRecognizerByEvent:function(e){for(var t,n=0;n<this.recognizers.length;n++){t=this.recognizers[n];for(var r,s=0;s<t.emits.length;s++)if(r=t.emits[s],r===e)return t}return null},setTouchAction:function(e,t){l&&(e.style.touchAction=t),e[u]=t},fire:function(e,t,n){var r=Polymer.Base.fire(t,n,{node:e,bubbles:!0,cancelable:!0});if(r.defaultPrevented){var s=n.preventer||n.sourceEvent;s&&s.preventDefault&&s.preventDefault()}},prevent:function(e){var t=this.findRecognizerByEvent(e);t.info&&(t.info.prevent=!0)},resetMouseCanceller:function(){E.mouse.mouseIgnoreJob&&E.mouse.mouseIgnoreJob.complete()}};C.register({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){o(this.info)},mousedown:function(e){if(n(e)){var t=C.findOriginalTarget(e),r=this,s=function(e){n(e)||(r.fire("up",t,e),o(r.info))},a=function(e){n(e)&&r.fire("up",t,e),o(r.info)};i(this.info,s,a),this.fire("down",t,e)}},touchstart:function(e){this.fire("down",C.findOriginalTarget(e),e.changedTouches[0],e)},touchend:function(e){this.fire("up",C.findOriginalTarget(e),e.changedTouches[0],e)},fire:function(e,t,n,r){C.fire(t,e,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:r,prevent:function(e){return C.prevent(e)}})}}),C.register({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(e){this.moves.length>_&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,o(this.info)},hasMovedEnough:function(e,t){if(this.info.prevent)return!1;if(this.info.started)return!0;var n=Math.abs(this.info.x-e),r=Math.abs(this.info.y-t);return n>=p||r>=p},mousedown:function(e){if(n(e)){var t=C.findOriginalTarget(e),r=this,s=function(e){var s=e.clientX,i=e.clientY;r.hasMovedEnough(s,i)&&(r.info.state=r.info.started?"mouseup"===e.type?"end":"track":"start","start"===r.info.state&&C.prevent("tap"),r.info.addMove({x:s,y:i}),n(e)||(r.info.state="end",o(r.info)),r.fire(t,e),r.info.started=!0)},a=function(e){r.info.started&&s(e),o(r.info)};i(this.info,s,a),this.info.x=e.clientX,this.info.y=e.clientY}},touchstart:function(e){var t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){var t=C.findOriginalTarget(e),n=e.changedTouches[0],r=n.clientX,s=n.clientY;this.hasMovedEnough(r,s)&&("start"===this.info.state&&C.prevent("tap"),this.info.addMove({x:r,y:s}),this.fire(t,n),this.info.state="track",this.info.started=!0)},touchend:function(e){var t=C.findOriginalTarget(e),n=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),this.fire(t,n,e))},fire:function(e,t,n){var r,s=this.info.moves[this.info.moves.length-2],i=this.info.moves[this.info.moves.length-1],o=i.x-this.info.x,a=i.y-this.info.y,l=0;return s&&(r=i.x-s.x,l=i.y-s.y),C.fire(e,"track",{state:this.info.state,x:t.clientX,y:t.clientY,dx:o,dy:a,ddx:r,ddy:l,sourceEvent:t,preventer:n,hover:function(){return C.deepTargetFind(t.clientX,t.clientY)}})}}),C.register({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},save:function(e){this.info.x=e.clientX,this.info.y=e.clientY},mousedown:function(e){n(e)&&this.save(e)},click:function(e){n(e)&&this.forward(e)},touchstart:function(e){this.save(e.changedTouches[0],e)},touchend:function(e){this.forward(e.changedTouches[0],e)},forward:function(e,t){var n=Math.abs(e.clientX-this.info.x),s=Math.abs(e.clientY-this.info.y),i=C.findOriginalTarget(e);(isNaN(n)||isNaN(s)||n<=f&&s<=f||r(e))&&(this.info.prevent||C.fire(i,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:t}))}});var b={x:"pan-x",y:"pan-y",none:"none",all:"auto"};Polymer.Base._addFeature({_setupGestures:function(){this.__polymerGestures=null},_listen:function(e,t,n){C.gestures[t]?C.add(e,t,n):e.addEventListener(t,n)},_unlisten:function(e,t,n){C.gestures[t]?C.remove(e,t,n):e.removeEventListener(t,n)},setScrollDirection:function(e,t){t=t||this,C.setTouchAction(t,b[e]||"auto")}}),Polymer.Gestures=C}(),function(){"use strict";if(Polymer.Base._addFeature({$$:function(e){return Polymer.dom(this.root).querySelector(e)},toggleClass:function(e,t,n){n=n||this,1==arguments.length&&(t=!n.classList.contains(e)),t?Polymer.dom(n).classList.add(e):Polymer.dom(n).classList.remove(e)},toggleAttribute:function(e,t,n){n=n||this,1==arguments.length&&(t=!n.hasAttribute(e)),t?Polymer.dom(n).setAttribute(e,""):Polymer.dom(n).removeAttribute(e)},classFollows:function(e,t,n){n&&Polymer.dom(n).classList.remove(e),t&&Polymer.dom(t).classList.add(e)},attributeFollows:function(e,t,n){n&&Polymer.dom(n).removeAttribute(e),t&&Polymer.dom(t).setAttribute(e,"")},getEffectiveChildNodes:function(){return Polymer.dom(this).getEffectiveChildNodes()},getEffectiveChildren:function(){var e=Polymer.dom(this).getEffectiveChildNodes();return e.filter(function(e){return e.nodeType===Node.ELEMENT_NODE})},getEffectiveTextContent:function(){for(var e,t=this.getEffectiveChildNodes(),n=[],r=0;e=t[r];r++)e.nodeType!==Node.COMMENT_NODE&&n.push(Polymer.dom(e).textContent);return n.join("")},queryEffectiveChildren:function(e){var t=Polymer.dom(this).queryDistributedElements(e);return t&&t[0]},queryAllEffectiveChildren:function(e){return Polymer.dom(this).queryDistributedElements(e)},getContentChildNodes:function(e){var t=Polymer.dom(this.root).querySelector(e||"content");return t?Polymer.dom(t).getDistributedNodes():[]},getContentChildren:function(e){return this.getContentChildNodes(e).filter(function(e){return e.nodeType===Node.ELEMENT_NODE})},fire:function(e,t,n){n=n||Polymer.nob;var r=n.node||this;t=null===t||void 0===t?{}:t;var s=void 0===n.bubbles||n.bubbles,i=Boolean(n.cancelable),o=n._useCache,a=this._getEvent(e,s,i,o);return a.detail=t,o&&(this.__eventCache[e]=null),r.dispatchEvent(a),o&&(this.__eventCache[e]=a),a},__eventCache:{},_getEvent:function(e,t,n,r){var s=r&&this.__eventCache[e];return s&&s.bubbles==t&&s.cancelable==n||(s=new Event(e,{bubbles:Boolean(t),cancelable:n})),s},async:function(e,t){var n=this;return Polymer.Async.run(function(){e.call(n)},t)},cancelAsync:function(e){Polymer.Async.cancel(e)},arrayDelete:function(e,t){var n;if(Array.isArray(e)){if(n=e.indexOf(t),n>=0)return e.splice(n,1)}else{var r=this._get(e);if(n=r.indexOf(t),n>=0)return this.splice(e,n,1)}},transform:function(e,t){t=t||this,t.style.webkitTransform=e,t.style.transform=e},translate3d:function(e,t,n,r){r=r||this,this.transform("translate3d("+e+","+t+","+n+")",r)},importHref:function(e,t,n,r){var s=document.createElement("link");s.rel="import",s.href=e;var i=Polymer.Base.importHref.imported=Polymer.Base.importHref.imported||{},o=i[s.href],a=o||s,l=this,c=function(e){return e.target.__firedLoad=!0,e.target.removeEventListener("load",c),e.target.removeEventListener("error",h),t.call(l,e)},h=function(e){return e.target.__firedError=!0,e.target.removeEventListener("load",c),e.target.removeEventListener("error",h),n.call(l,e)};return t&&a.addEventListener("load",c),n&&a.addEventListener("error",h),o?(o.__firedLoad&&o.dispatchEvent(new Event("load")),o.__firedError&&o.dispatchEvent(new Event("error"))):(i[s.href]=s,r=Boolean(r),r&&s.setAttribute("async",""),document.head.appendChild(s)),a},create:function(e,t){var n=document.createElement(e);if(t)for(var r in t)n[r]=t[r];return n},isLightDescendant:function(e){return this!==e&&this.contains(e)&&Polymer.dom(this).getOwnerRoot()===Polymer.dom(e).getOwnerRoot()},isLocalDescendant:function(e){return this.root===Polymer.dom(e).getOwnerRoot()}}),!Polymer.Settings.useNativeCustomElements){var e=Polymer.Base.importHref;Polymer.Base.importHref=function(t,n,r,s){CustomElements.ready=!1;var i=function(e){if(CustomElements.upgradeDocumentTree(document),CustomElements.ready=!0,n)return n.call(this,e)};return e.call(this,t,i,r,s)}}}(),Polymer.Bind={prepareModel:function(e){Polymer.Base.mixin(e,this._modelApi)},_modelApi:{_notifyChange:function(e,t,n){n=void 0===n?this[e]:n,t=t||Polymer.CaseMap.camelToDashCase(e)+"-changed",this.fire(t,{value:n},{bubbles:!1,cancelable:!1,_useCache:Polymer.Settings.eventDataCache||!Polymer.Settings.isIE})},_propertySetter:function(e,t,n,r){var s=this.__data__[e];return s===t||s!==s&&t!==t||(this.__data__[e]=t,"object"==typeof t&&this._clearPath(e),this._propertyChanged&&this._propertyChanged(e,t,s),n&&this._effectEffects(e,t,n,s,r)),s},__setProperty:function(e,t,n,r){r=r||this;var s=r._propertyEffects&&r._propertyEffects[e];s?r._propertySetter(e,t,s,n):r[e]!==t&&(r[e]=t)},_effectEffects:function(e,t,n,r,s){for(var i,o=0,a=n.length;o<a&&(i=n[o]);o++)i.fn.call(this,e,this[e],i.effect,r,s)},_clearPath:function(e){for(var t in this.__data__)Polymer.Path.isDescendant(e,t)&&(this.__data__[t]=void 0)}},ensurePropertyEffects:function(e,t){e._propertyEffects||(e._propertyEffects={});var n=e._propertyEffects[t];return n||(n=e._propertyEffects[t]=[]),n},addPropertyEffect:function(e,t,n,r){var s=this.ensurePropertyEffects(e,t),i={kind:n,effect:r,fn:Polymer.Bind["_"+n+"Effect"]};return s.push(i),i},createBindings:function(e){var t=e._propertyEffects;if(t)for(var n in t){var r=t[n];r.sort(this._sortPropertyEffects),this._createAccessors(e,n,r)}},_sortPropertyEffects:function(){var e={compute:0,annotation:1,annotatedComputation:2,reflect:3,notify:4,observer:5,complexObserver:6,function:7};return function(t,n){return e[t.kind]-e[n.kind]}}(),_createAccessors:function(e,t,n){var r={get:function(){return this.__data__[t]}},s=function(e){this._propertySetter(t,e,n)},i=e.getPropertyInfo&&e.getPropertyInfo(t);i&&i.readOnly?i.computed||(e["_set"+this.upper(t)]=s):r.set=s,Object.defineProperty(e,t,r)},upper:function(e){return e[0].toUpperCase()+e.substring(1)},_addAnnotatedListener:function(e,t,n,r,s,i){e._bindListeners||(e._bindListeners=[]);var o=this._notedListenerFactory(n,r,Polymer.Path.isDeep(r),i),a=s||Polymer.CaseMap.camelToDashCase(n)+"-changed";e._bindListeners.push({index:t,property:n,path:r,changedFn:o,event:a})},_isEventBogus:function(e,t){return e.path&&e.path[0]!==t},_notedListenerFactory:function(e,t,n,r){return function(s,i,o){if(o){var a=Polymer.Path.translate(e,t,o);this._notifyPath(a,i)}else i=s[e],r&&(i=!i),n?this.__data__[t]!=i&&this.set(t,i):this[t]=i}},prepareInstance:function(e){e.__data__=Object.create(null)},setupBindListeners:function(e){for(var t,n=e._bindListeners,r=0,s=n.length;r<s&&(t=n[r]);r++){var i=e._nodes[t.index];this._addNotifyListener(i,e,t.event,t.changedFn)}},_addNotifyListener:function(e,t,n,r){e.addEventListener(n,function(e){return t._notifyListener(r,e)})}},Polymer.Base.extend(Polymer.Bind,{_shouldAddListener:function(e){return e.name&&"attribute"!=e.kind&&"text"!=e.kind&&!e.isCompound&&"{"===e.parts[0].mode},_annotationEffect:function(e,t,n){e!=n.value&&(t=this._get(n.value),this.__data__[n.value]=t),this._applyEffectValue(n,t)},_reflectEffect:function(e,t,n){this.reflectPropertyToAttribute(e,n.attribute,t)},_notifyEffect:function(e,t,n,r,s){s||this._notifyChange(e,n.event,t)},_functionEffect:function(e,t,n,r,s){n.call(this,e,t,r,s)},_observerEffect:function(e,t,n,r){var s=this[n.method];s?s.call(this,t,r):this._warn(this._logf("_observerEffect","observer method `"+n.method+"` not defined"))},_complexObserverEffect:function(e,t,n){var r=this[n.method];if(r){var s=Polymer.Bind._marshalArgs(this.__data__,n,e,t);s&&r.apply(this,s)}else n.dynamicFn||this._warn(this._logf("_complexObserverEffect","observer method `"+n.method+"` not defined"))},_computeEffect:function(e,t,n){var r=this[n.method];if(r){var s=Polymer.Bind._marshalArgs(this.__data__,n,e,t);if(s){var i=r.apply(this,s);this.__setProperty(n.name,i)}}else n.dynamicFn||this._warn(this._logf("_computeEffect","compute method `"+n.method+"` not defined"))},_annotatedComputationEffect:function(e,t,n){var r=this._rootDataHost||this,s=r[n.method];if(s){var i=Polymer.Bind._marshalArgs(this.__data__,n,e,t);if(i){var o=s.apply(r,i);this._applyEffectValue(n,o)}}else n.dynamicFn||r._warn(r._logf("_annotatedComputationEffect","compute method `"+n.method+"` not defined"))},_marshalArgs:function(e,t,n,r){for(var s=[],i=t.args,o=i.length>1||t.dynamicFn,a=0,l=i.length;a<l;a++){var c,h=i[a],u=h.name;if(h.literal?c=h.value:n===u?c=r:(c=e[u],void 0===c&&h.structured&&(c=Polymer.Base._get(u,e))),o&&void 0===c)return;if(h.wildcard){var f=Polymer.Path.isAncestor(n,u);s[a]={path:f?n:u,value:f?r:c,base:c}}else s[a]=c}return s}}),Polymer.Base._addFeature({_addPropertyEffect:function(e,t,n){var r=Polymer.Bind.addPropertyEffect(this,e,t,n);r.pathFn=this["_"+r.kind+"PathEffect"]},_prepEffects:function(){Polymer.Bind.prepareModel(this),this._addAnnotationEffects(this._notes)},_prepBindings:function(){Polymer.Bind.createBindings(this)},_addPropertyEffects:function(e){if(e)for(var t in e){var n=e[t];if(n.observer&&this._addObserverEffect(t,n.observer),n.computed&&(n.readOnly=!0,this._addComputedEffect(t,n.computed)),n.notify&&this._addPropertyEffect(t,"notify",{event:Polymer.CaseMap.camelToDashCase(t)+"-changed"}),n.reflectToAttribute){var r=Polymer.CaseMap.camelToDashCase(t);"-"===r[0]?this._warn(this._logf("_addPropertyEffects","Property "+t+" cannot be reflected to attribute "+r+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.')):this._addPropertyEffect(t,"reflect",{attribute:r})}n.readOnly&&Polymer.Bind.ensurePropertyEffects(this,t)}},_addComputedEffect:function(e,t){for(var n,r=this._parseMethod(t),s=r.dynamicFn,i=0;i<r.args.length&&(n=r.args[i]);i++)this._addPropertyEffect(n.model,"compute",{method:r.method,args:r.args,trigger:n,name:e,dynamicFn:s});s&&this._addPropertyEffect(r.method,"compute",{method:r.method,args:r.args,trigger:null,name:e,dynamicFn:s})},_addObserverEffect:function(e,t){this._addPropertyEffect(e,"observer",{method:t,property:e})},_addComplexObserverEffects:function(e){if(e)for(var t,n=0;n<e.length&&(t=e[n]);n++)this._addComplexObserverEffect(t)},_addComplexObserverEffect:function(e){var t=this._parseMethod(e);if(!t)throw new Error("Malformed observer expression '"+e+"'");for(var n,r=t.dynamicFn,s=0;s<t.args.length&&(n=t.args[s]);s++)this._addPropertyEffect(n.model,"complexObserver",{method:t.method,args:t.args,trigger:n,dynamicFn:r});r&&this._addPropertyEffect(t.method,"complexObserver",{method:t.method,args:t.args,trigger:null,dynamicFn:r})},_addAnnotationEffects:function(e){for(var t,n=0;n<e.length&&(t=e[n]);n++)for(var r,s=t.bindings,i=0;i<s.length&&(r=s[i]);i++)this._addAnnotationEffect(r,n)},_addAnnotationEffect:function(e,t){Polymer.Bind._shouldAddListener(e)&&Polymer.Bind._addAnnotatedListener(this,t,e.name,e.parts[0].value,e.parts[0].event,e.parts[0].negate);for(var n=0;n<e.parts.length;n++){var r=e.parts[n];r.signature?this._addAnnotatedComputationEffect(e,r,t):r.literal||("attribute"===e.kind&&"-"===e.name[0]?this._warn(this._logf("_addAnnotationEffect","Cannot set attribute "+e.name+' because "-" is not a valid attribute starting character')):this._addPropertyEffect(r.model,"annotation",{kind:e.kind,index:t,name:e.name,propertyName:e.propertyName,value:r.value,isCompound:e.isCompound,compoundIndex:r.compoundIndex,event:r.event,customEvent:r.customEvent,negate:r.negate}))}},_addAnnotatedComputationEffect:function(e,t,n){var r=t.signature;if(r.static)this.__addAnnotatedComputationEffect("__static__",n,e,t,null);else{for(var s,i=0;i<r.args.length&&(s=r.args[i]);i++)s.literal||this.__addAnnotatedComputationEffect(s.model,n,e,t,s);r.dynamicFn&&this.__addAnnotatedComputationEffect(r.method,n,e,t,null)}},__addAnnotatedComputationEffect:function(e,t,n,r,s){this._addPropertyEffect(e,"annotatedComputation",{index:t,isCompound:n.isCompound,compoundIndex:r.compoundIndex,kind:n.kind,name:n.name,negate:r.negate,method:r.signature.method,args:r.signature.args,trigger:s,dynamicFn:r.signature.dynamicFn})},_parseMethod:function(e){var t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){var n={method:t[1],static:!0};if(this.getPropertyInfo(n.method)!==Polymer.nob&&(n.static=!1,n.dynamicFn=!0),t[2].trim()){var r=t[2].replace(/\\,/g,"&comma;").split(",");return this._parseArgs(r,n)}return n.args=Polymer.nar,n}},_parseArgs:function(e,t){return t.args=e.map(function(e){var n=this._parseArg(e);return n.literal||(t.static=!1),n},this),t},_parseArg:function(e){var t=e.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),n={name:t},r=t[0];switch("-"===r&&(r=t[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':n.value=t.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(t),n.literal=!0}return n.literal||(n.model=Polymer.Path.root(t),n.structured=Polymer.Path.isDeep(t),n.structured&&(n.wildcard=".*"==t.slice(-2),n.wildcard&&(n.name=t.slice(0,-2)))),n},_marshalInstanceEffects:function(){Polymer.Bind.prepareInstance(this),this._bindListeners&&Polymer.Bind.setupBindListeners(this)},_applyEffectValue:function(e,t){var n=this._nodes[e.index],r=e.name;if(t=this._computeFinalAnnotationValue(n,r,t,e),"attribute"==e.kind)this.serializeValueToAttribute(t,r,n);else{var s=n._propertyInfo&&n._propertyInfo[r];if(s&&s.readOnly)return;this.__setProperty(r,t,!1,n)}},_computeFinalAnnotationValue:function(e,t,n,r){if(r.negate&&(n=!n),r.isCompound){var s=e.__compoundStorage__[t];s[r.compoundIndex]=n,n=s.join("")}return"attribute"!==r.kind&&("className"===t&&(n=this._scopeElementClass(e,n)),("textContent"===t||"input"==e.localName&&"value"==t)&&(n=void 0==n?"":n)),n},_executeStaticEffects:function(){this._propertyEffects&&this._propertyEffects.__static__&&this._effectEffects("__static__",null,this._propertyEffects.__static__)}}),function(){var e=Polymer.Settings.usePolyfillProto;Polymer.Base._addFeature({_setupConfigure:function(e){if(this._config={},this._handlers=[],this._aboveConfig=null,e)for(var t in e)void 0!==e[t]&&(this._config[t]=e[t])},_marshalAttributes:function(){this._takeAttributesToModel(this._config)},_attributeChangedImpl:function(e){var t=this._clientsReadied?this:this._config;this._setAttributeToProperty(t,e)},_configValue:function(e,t){var n=this._propertyInfo[e];n&&n.readOnly||(this._config[e]=t)},_beforeClientsReady:function(){this._configure()},_configure:function(){this._configureAnnotationReferences(),this._configureInstanceProperties(),this._aboveConfig=this.mixin({},this._config);
for(var e={},t=0;t<this.behaviors.length;t++)this._configureProperties(this.behaviors[t].properties,e);this._configureProperties(this.properties,e),this.mixin(e,this._aboveConfig),this._config=e,this._clients&&this._clients.length&&this._distributeConfig(this._config)},_configureInstanceProperties:function(){for(var t in this._propertyEffects)!e&&this.hasOwnProperty(t)&&(this._configValue(t,this[t]),delete this[t])},_configureProperties:function(e,t){for(var n in e){var r=e[n];if(void 0!==r.value){var s=r.value;"function"==typeof s&&(s=s.call(this,this._config)),t[n]=s}}},_distributeConfig:function(e){var t=this._propertyEffects;if(t)for(var n in e){var r=t[n];if(r)for(var s,i=0,o=r.length;i<o&&(s=r[i]);i++)if("annotation"===s.kind){var a=this._nodes[s.effect.index],l=s.effect.propertyName,c="attribute"==s.effect.kind,h=a._propertyEffects&&a._propertyEffects[l];if(a._configValue&&(h||!c)){var u=n===s.effect.value?e[n]:this._get(s.effect.value,e);u=this._computeFinalAnnotationValue(a,l,u,s.effect),c&&(u=a.deserialize(this.serialize(u),a._propertyInfo[l].type)),a._configValue(l,u)}}}},_afterClientsReady:function(){this._executeStaticEffects(),this._applyConfig(this._config,this._aboveConfig),this._flushHandlers()},_applyConfig:function(e,t){for(var n in e)void 0===this[n]&&this.__setProperty(n,e[n],n in t)},_notifyListener:function(e,t){if(!Polymer.Bind._isEventBogus(t,t.target)){var n,r;if(t.detail&&(n=t.detail.value,r=t.detail.path),this._clientsReadied)return e.call(this,t.target,n,r);this._queueHandler([e,t.target,n,r])}},_queueHandler:function(e){this._handlers.push(e)},_flushHandlers:function(){for(var e,t=this._handlers,n=0,r=t.length;n<r&&(e=t[n]);n++)e[0].call(this,e[1],e[2],e[3]);this._handlers=[]}})}(),function(){"use strict";var e=Polymer.Path;Polymer.Base._addFeature({notifyPath:function(e,t,n){var r={},s=this._get(e,this,r);1===arguments.length&&(t=s),r.path&&this._notifyPath(r.path,t,n)},_notifyPath:function(e,t,n){var r=this._propertySetter(e,t);if(r!==t&&(r===r||t===t))return this._pathEffector(e,t),n||this._notifyPathUp(e,t),!0},_getPathParts:function(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)for(var r=e[n].toString().split("."),s=0;s<r.length;s++)t.push(r[s]);return t}return e.toString().split(".")},set:function(e,t,n){var r,s=n||this,i=this._getPathParts(e),o=i[i.length-1];if(i.length>1){for(var a=0;a<i.length-1;a++){var l=i[a];if(r&&"#"==l[0]?s=Polymer.Collection.get(r).getItem(l):(s=s[l],r&&parseInt(l,10)==l&&(i[a]=Polymer.Collection.get(r).getKey(s))),!s)return;r=Array.isArray(s)?s:null}if(r){var c,h,u=Polymer.Collection.get(r);"#"==o[0]?(h=o,c=u.getItem(h),o=r.indexOf(c),u.setItem(h,t)):parseInt(o,10)==o&&(c=s[o],h=u.getKey(c),i[a]=h,u.setItem(h,t))}s[o]=t,n||this._notifyPath(i.join("."),t)}else s[e]=t},get:function(e,t){return this._get(e,t)},_get:function(e,t,n){for(var r,s=t||this,i=this._getPathParts(e),o=0;o<i.length;o++){if(!s)return;var a=i[o];r&&"#"==a[0]?s=Polymer.Collection.get(r).getItem(a):(s=s[a],n&&r&&parseInt(a,10)==a&&(i[o]=Polymer.Collection.get(r).getKey(s))),r=Array.isArray(s)?s:null}return n&&(n.path=i.join(".")),s},_pathEffector:function(t,n){var r=e.root(t),s=this._propertyEffects&&this._propertyEffects[r];if(s)for(var i,o=0;o<s.length&&(i=s[o]);o++){var a=i.pathFn;a&&a.call(this,t,n,i.effect)}this._boundPaths&&this._notifyBoundPaths(t,n)},_annotationPathEffect:function(t,n,r){if(e.matches(r.value,!1,t))Polymer.Bind._annotationEffect.call(this,t,n,r);else if(!r.negate&&e.isDescendant(r.value,t)){var s=this._nodes[r.index];if(s&&s._notifyPath){var i=e.translate(r.value,r.name,t);s._notifyPath(i,n,!0)}}},_complexObserverPathEffect:function(t,n,r){e.matches(r.trigger.name,r.trigger.wildcard,t)&&Polymer.Bind._complexObserverEffect.call(this,t,n,r)},_computePathEffect:function(t,n,r){e.matches(r.trigger.name,r.trigger.wildcard,t)&&Polymer.Bind._computeEffect.call(this,t,n,r)},_annotatedComputationPathEffect:function(t,n,r){e.matches(r.trigger.name,r.trigger.wildcard,t)&&Polymer.Bind._annotatedComputationEffect.call(this,t,n,r)},linkPaths:function(e,t){this._boundPaths=this._boundPaths||{},t?this._boundPaths[e]=t:this.unlinkPaths(e)},unlinkPaths:function(e){this._boundPaths&&delete this._boundPaths[e]},_notifyBoundPaths:function(t,n){for(var r in this._boundPaths){var s=this._boundPaths[r];e.isDescendant(r,t)?this._notifyPath(e.translate(r,s,t),n):e.isDescendant(s,t)&&this._notifyPath(e.translate(s,r,t),n)}},_notifyPathUp:function(t,n){var r=e.root(t),s=Polymer.CaseMap.camelToDashCase(r),i=s+this._EVENT_CHANGED;this.fire(i,{path:t,value:n},{bubbles:!1,_useCache:Polymer.Settings.eventDataCache||!Polymer.Settings.isIE})},_EVENT_CHANGED:"-changed",notifySplices:function(e,t){var n={},r=this._get(e,this,n);this._notifySplices(r,n.path,t)},_notifySplices:function(e,t,n){var r={keySplices:Polymer.Collection.applySplices(e,n),indexSplices:n},s=t+".splices";this._notifyPath(s,r),this._notifyPath(t+".length",e.length),this.__data__[s]={keySplices:null,indexSplices:null}},_notifySplice:function(e,t,n,r,s){this._notifySplices(e,t,[{index:n,addedCount:r,removed:s,object:e,type:"splice"}])},push:function(e){var t={},n=this._get(e,this,t),r=Array.prototype.slice.call(arguments,1),s=n.length,i=n.push.apply(n,r);return r.length&&this._notifySplice(n,t.path,s,r.length,[]),i},pop:function(e){var t={},n=this._get(e,this,t),r=Boolean(n.length),s=Array.prototype.slice.call(arguments,1),i=n.pop.apply(n,s);return r&&this._notifySplice(n,t.path,n.length,0,[i]),i},splice:function(e,t){var n={},r=this._get(e,this,n);t=t<0?r.length-Math.floor(-t):Math.floor(t),t||(t=0);var s=Array.prototype.slice.call(arguments,1),i=r.splice.apply(r,s),o=Math.max(s.length-2,0);return(o||i.length)&&this._notifySplice(r,n.path,t,o,i),i},shift:function(e){var t={},n=this._get(e,this,t),r=Boolean(n.length),s=Array.prototype.slice.call(arguments,1),i=n.shift.apply(n,s);return r&&this._notifySplice(n,t.path,0,0,[i]),i},unshift:function(e){var t={},n=this._get(e,this,t),r=Array.prototype.slice.call(arguments,1),s=n.unshift.apply(n,r);return r.length&&this._notifySplice(n,t.path,0,r.length,[]),s},prepareModelNotifyPath:function(e){this.mixin(e,{fire:Polymer.Base.fire,_getEvent:Polymer.Base._getEvent,__eventCache:Polymer.Base.__eventCache,notifyPath:Polymer.Base.notifyPath,_get:Polymer.Base._get,_EVENT_CHANGED:Polymer.Base._EVENT_CHANGED,_notifyPath:Polymer.Base._notifyPath,_notifyPathUp:Polymer.Base._notifyPathUp,_pathEffector:Polymer.Base._pathEffector,_annotationPathEffect:Polymer.Base._annotationPathEffect,_complexObserverPathEffect:Polymer.Base._complexObserverPathEffect,_annotatedComputationPathEffect:Polymer.Base._annotatedComputationPathEffect,_computePathEffect:Polymer.Base._computePathEffect,_notifyBoundPaths:Polymer.Base._notifyBoundPaths,_getPathParts:Polymer.Base._getPathParts})}})}(),Polymer.Base._addFeature({resolveUrl:function(e){var t=Polymer.DomModule.import(this.is),n="";if(t){var r=t.getAttribute("assetpath")||"";n=Polymer.ResolveUrl.resolveUrl(r,t.ownerDocument.baseURI)}return Polymer.ResolveUrl.resolveUrl(e,n)}}),Polymer.CssParse=function(){return{parse:function(e){return e=this._clean(e),this._parseCss(this._lex(e),e)},_clean:function(e){return e.replace(this._rx.comments,"").replace(this._rx.port,"")},_lex:function(e){for(var t={start:0,end:e.length},n=t,r=0,s=e.length;r<s;r++)switch(e[r]){case this.OPEN_BRACE:n.rules||(n.rules=[]);var i=n,o=i.rules[i.rules.length-1];n={start:r+1,parent:i,previous:o},i.rules.push(n);break;case this.CLOSE_BRACE:n.end=r+1,n=n.parent||t}return t},_parseCss:function(e,t){var n=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=n.trim(),e.parent){var r=e.previous?e.previous.end:e.parent.start;n=t.substring(r,e.start-1),n=this._expandUnicodeEscapes(n),n=n.replace(this._rx.multipleSpaces," "),n=n.substring(n.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=n.trim();e.atRule=0===s.indexOf(this.AT_START),e.atRule?0===s.indexOf(this.MEDIA_START)?e.type=this.types.MEDIA_RULE:s.match(this._rx.keyframesRule)&&(e.type=this.types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(this._rx.multipleSpaces).pop()):0===s.indexOf(this.VAR_START)?e.type=this.types.MIXIN_RULE:e.type=this.types.STYLE_RULE}var i=e.rules;if(i)for(var o,a=0,l=i.length;a<l&&(o=i[a]);a++)this._parseCss(o,t);return e},_expandUnicodeEscapes:function(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e})},stringify:function(e,t,n){n=n||"";var r="";if(e.cssText||e.rules){var s=e.rules;if(s&&!this._hasMixinRules(s))for(var i,o=0,a=s.length;o<a&&(i=s[o]);o++)r=this.stringify(i,t,r);else r=t?e.cssText:this.removeCustomProps(e.cssText),r=r.trim(),r&&(r=" "+r+"\n")}return r&&(e.selector&&(n+=e.selector+" "+this.OPEN_BRACE+"\n"),n+=r,e.selector&&(n+=this.CLOSE_BRACE+"\n\n")),n},_hasMixinRules:function(e){return 0===e[0].selector.indexOf(this.VAR_START)},removeCustomProps:function(e){return e=this.removeCustomPropAssignment(e),this.removeCustomPropApply(e)},removeCustomPropAssignment:function(e){return e.replace(this._rx.customProp,"").replace(this._rx.mixinProp,"")},removeCustomPropApply:function(e){return e.replace(this._rx.mixinApply,"").replace(this._rx.varApply,"")},types:{STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE:"{",CLOSE_BRACE:"}",_rx:{comments:/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START:"--",MEDIA_START:"@media",AT_START:"@"}}(),Polymer.StyleUtil=function(){var e=Polymer.Settings;return{NATIVE_VARIABLES:Polymer.Settings.useNativeCSSProperties,MODULE_STYLES_SELECTOR:"style, link[rel=import][type~=css], template",INCLUDE_ATTR:"include",toCssText:function(e,t){return"string"==typeof e&&(e=this.parser.parse(e)),t&&this.forEachRule(e,t),this.parser.stringify(e,this.NATIVE_VARIABLES)},forRulesInStyles:function(e,t,n){if(e)for(var r,s=0,i=e.length;s<i&&(r=e[s]);s++)this.forEachRuleInStyle(r,t,n)},forActiveRulesInStyles:function(e,t,n){if(e)for(var r,s=0,i=e.length;s<i&&(r=e[s]);s++)this.forEachRuleInStyle(r,t,n,!0)},rulesForStyle:function(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=this.parser.parse(e.textContent)),e.__cssRules},isKeyframesSelector:function(e){return e.parent&&e.parent.type===this.ruleTypes.KEYFRAMES_RULE},forEachRuleInStyle:function(e,t,n,r){var s,i,o=this.rulesForStyle(e);t&&(s=function(n){t(n,e)}),n&&(i=function(t){n(t,e)}),this.forEachRule(o,s,i,r)},forEachRule:function(e,t,n,r){if(e){var s=!1;if(r&&e.type===this.ruleTypes.MEDIA_RULE){var i=e.selector.match(this.rx.MEDIA_MATCH);i&&(window.matchMedia(i[1]).matches||(s=!0))}e.type===this.ruleTypes.STYLE_RULE?t(e):n&&e.type===this.ruleTypes.KEYFRAMES_RULE?n(e):e.type===this.ruleTypes.MIXIN_RULE&&(s=!0);var o=e.rules;if(o&&!s)for(var a,l=0,c=o.length;l<c&&(a=o[l]);l++)this.forEachRule(a,t,n,r)}},applyCss:function(e,t,n,r){var s=this.createScopeStyle(e,t);return this.applyStyle(s,n,r)},applyStyle:function(e,t,n){t=t||document.head;var r=n&&n.nextSibling||t.firstChild;return this.__lastHeadApplyNode=e,t.insertBefore(e,r)},createScopeStyle:function(e,t){var n=document.createElement("style");return t&&n.setAttribute("scope",t),n.textContent=e,n},__lastHeadApplyNode:null,applyStylePlaceHolder:function(e){var t=document.createComment(" Shady DOM styles for "+e+" "),n=this.__lastHeadApplyNode?this.__lastHeadApplyNode.nextSibling:null,r=document.head;return r.insertBefore(t,n||r.firstChild),this.__lastHeadApplyNode=t,t},cssFromModules:function(e,t){for(var n=e.trim().split(" "),r="",s=0;s<n.length;s++)r+=this.cssFromModule(n[s],t);return r},cssFromModule:function(e,t){var n=Polymer.DomModule.import(e);return n&&!n._cssText&&(n._cssText=this.cssFromElement(n)),!n&&t&&console.warn("Could not find style data in module named",e),n&&n._cssText||""},cssFromElement:function(e){for(var t,n="",r=e.content||e,s=Polymer.TreeApi.arrayCopy(r.querySelectorAll(this.MODULE_STYLES_SELECTOR)),i=0;i<s.length;i++)if(t=s[i],"template"===t.localName)t.hasAttribute("preserve-content")||(n+=this.cssFromElement(t));else if("style"===t.localName){var o=t.getAttribute(this.INCLUDE_ATTR);o&&(n+=this.cssFromModules(o,!0)),t=t.__appliedElement||t,t.parentNode.removeChild(t),n+=this.resolveCss(t.textContent,e.ownerDocument)}else t.import&&t.import.body&&(n+=this.resolveCss(t.import.body.textContent,t.import));return n},isTargetedBuild:function(t){return e.useNativeShadow?"shadow"===t:"shady"===t},cssBuildTypeForModule:function(e){var t=Polymer.DomModule.import(e);if(t)return this.getCssBuildType(t)},getCssBuildType:function(e){return e.getAttribute("css-build")},_findMatchingParen:function(e,t){for(var n=0,r=t,s=e.length;r<s;r++)switch(e[r]){case"(":n++;break;case")":if(0===--n)return r}return-1},processVariableAndFallback:function(e,t){var n=e.indexOf("var(");if(n===-1)return t(e,"","","");var r=this._findMatchingParen(e,n+3),s=e.substring(n+4,r),i=e.substring(0,n),o=this.processVariableAndFallback(e.substring(r+1),t),a=s.indexOf(",");if(a===-1)return t(i,s.trim(),"",o);var l=s.substring(0,a).trim(),c=s.substring(a+1).trim();return t(i,l,c,o)},rx:{VAR_ASSIGN:/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,MIXIN_MATCH:/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,VAR_CONSUMED:/(--[\w-]+)\s*([:,;)]|$)/gi,ANIMATION_MATCH:/(animation\s*:)|(animation-name\s*:)/,MEDIA_MATCH:/@media[^(]*(\([^)]*\))/,IS_VAR:/^--/,BRACKETED:/\{[^}]*\}/g,HOST_PREFIX:"(?:^|[^.#[:])",HOST_SUFFIX:"($|[.:[\\s>+~])"},resolveCss:Polymer.ResolveUrl.resolveCss,parser:Polymer.CssParse,ruleTypes:Polymer.CssParse.types}}(),Polymer.StyleTransformer=function(){var e=Polymer.StyleUtil,t=Polymer.Settings,n={dom:function(e,t,n,r){this._transformDom(e,t||"",n,r)},_transformDom:function(e,t,n,r){e.setAttribute&&this.element(e,t,n,r);for(var s=Polymer.dom(e).childNodes,i=0;i<s.length;i++)this._transformDom(s[i],t,n,r)},element:function(e,t,n,s){if(n)s?e.removeAttribute(r):e.setAttribute(r,t);else if(t)if(e.classList)s?(e.classList.remove(r),e.classList.remove(t)):(e.classList.add(r),e.classList.add(t));else if(e.getAttribute){var i=e.getAttribute(g);s?i&&e.setAttribute(g,i.replace(r,"").replace(t,"")):e.setAttribute(g,(i?i+" ":"")+r+" "+t)}},elementStyles:function(n,r){var s,i=n._styles,o="",a=n.__cssBuild,l=t.useNativeShadow||"shady"===a;if(l){var h=this;s=function(e){e.selector=h._slottedToContent(e.selector),e.selector=e.selector.replace(c,":host > *"),r&&r(e)}}for(var u,f=0,p=i.length;f<p&&(u=i[f]);f++){var _=e.rulesForStyle(u);o+=l?e.toCssText(_,s):this.css(_,n.is,n.extends,r,n._scopeCssViaAttr)+"\n\n"}return o.trim()},css:function(t,n,r,s,i){var o=this._calcHostScope(n,r);n=this._calcElementScope(n,i);var a=this;return e.toCssText(t,function(e){e.isScoped||(a.rule(e,n,o),e.isScoped=!0),s&&s(e,n,o)})},_calcElementScope:function(e,t){return e?t?m+e+y:d+e:""},_calcHostScope:function(e,t){return t?"[is="+e+"]":e},rule:function(e,t,n){this._transformRule(e,this._transformComplexSelector,t,n)},_transformRule:function(e,t,n,r){e.selector=e.transformedSelector=this._transformRuleCss(e,t,n,r)},_transformRuleCss:function(t,n,r,s){var o=t.selector.split(i);if(!e.isKeyframesSelector(t))for(var a,l=0,c=o.length;l<c&&(a=o[l]);l++)o[l]=n.call(this,a,r,s);return o.join(i)},_transformComplexSelector:function(e,t,n){var r=!1,s=!1,a=this;return e=e.trim(),e=this._slottedToContent(e),e=e.replace(c,":host > *"),e=e.replace(P,l+" $1"),e=e.replace(o,function(e,i,o){if(r)o=o.replace(_," ");else{var l=a._transformCompoundSelector(o,i,t,n);r=r||l.stop,s=s||l.hostContext,i=l.combinator,o=l.value}return i+o}),s&&(e=e.replace(f,function(e,t,r,s){return t+r+" "+n+s+i+" "+t+n+r+s})),e},_transformCompoundSelector:function(e,t,n,r){var s=e.search(_),i=!1;e.indexOf(u)>=0?i=!0:e.indexOf(l)>=0?e=this._transformHostSelector(e,r):0!==s&&(e=n?this._transformSimpleSelector(e,n):e),e.indexOf(p)>=0&&(t="");var o;return s>=0&&(e=e.replace(_," "),o=!0),{value:e,combinator:t,stop:o,hostContext:i}},_transformSimpleSelector:function(e,t){var n=e.split(v);return n[0]+=t,n.join(v)},_transformHostSelector:function(e,t){var n=e.match(h),r=n&&n[2].trim()||"";if(r){if(r[0].match(a))return e.replace(h,function(e,n,r){return t+r});var s=r.split(a)[0];return s===t?r:S}return e.replace(l,t)},documentRule:function(e){e.selector=e.parsedSelector,this.normalizeRootSelector(e),t.useNativeShadow||this._transformRule(e,this._transformDocumentSelector)},normalizeRootSelector:function(e){e.selector=e.selector.replace(c,"html")},_transformDocumentSelector:function(e){return e.match(_)?this._transformComplexSelector(e,s):this._transformSimpleSelector(e.trim(),s)},_slottedToContent:function(e){return e.replace(E,p+"> $1")},SCOPE_NAME:"style-scope"},r=n.SCOPE_NAME,s=":not(["+r+"]):not(."+r+")",i=",",o=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,a=/[[.:#*]/,l=":host",c=":root",h=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,u=":host-context",f=/(.*)(?::host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/,p="::content",_=/::content|::shadow|\/deep\//,d=".",m="["+r+"~=",y="]",v=":",g="class",P=new RegExp("^("+p+")"),S="should_not_match",E=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g;return n}(),Polymer.StyleExtends=function(){var e=Polymer.StyleUtil;return{hasExtends:function(e){return Boolean(e.match(this.rx.EXTEND))},transform:function(t){var n=e.rulesForStyle(t),r=this;return e.forEachRule(n,function(e){if(r._mapRuleOntoParent(e),e.parent)for(var t;t=r.rx.EXTEND.exec(e.cssText);){var n=t[1],s=r._findExtendor(n,e);s&&r._extendRule(e,s)}e.cssText=e.cssText.replace(r.rx.EXTEND,"")}),e.toCssText(n,function(e){e.selector.match(r.rx.STRIP)&&(e.cssText="")},!0)},_mapRuleOntoParent:function(e){if(e.parent){for(var t,n=e.parent.map||(e.parent.map={}),r=e.selector.split(","),s=0;s<r.length;s++)t=r[s],n[t.trim()]=e;return n}},_findExtendor:function(e,t){return t.parent&&t.parent.map&&t.parent.map[e]||this._findExtendor(e,t.parent)},_extendRule:function(e,t){e.parent!==t.parent&&this._cloneAndAddRuleToParent(t,e.parent),e.extends=e.extends||[],e.extends.push(t),t.selector=t.selector.replace(this.rx.STRIP,""),t.selector=(t.selector&&t.selector+",\n")+e.selector,t.extends&&t.extends.forEach(function(t){this._extendRule(e,t)},this)},_cloneAndAddRuleToParent:function(e,t){e=Object.create(e),e.parent=t,e.extends&&(e.extends=e.extends.slice()),t.rules.push(e)},rx:{EXTEND:/@extends\(([^)]*)\)\s*?;/gim,STRIP:/%[^,]*$/}}}(),Polymer.ApplyShim=function(){"use strict";function e(e,t){e=e.trim(),m[e]={properties:t,dependants:{}}}function t(e){return e=e.trim(),m[e]}function n(e,t){var n=_.exec(t);return n&&(t=n[1]?y._getInitialValueForProperty(e):"apply-shim-inherit"),t}function r(e){for(var t,r,s,i,o=e.split(";"),a={},l=0;l<o.length;l++)s=o[l],s&&(i=s.split(":"),i.length>1&&(t=i[0].trim(),r=n(t,i.slice(1).join(":")),a[t]=r));return a}function s(e){var t=y.__currentElementProto,n=t&&t.is;for(var r in e.dependants)r!==n&&(e.dependants[r].__applyShimInvalid=!0)}function i(n,i,o,a){if(o&&c.processVariableAndFallback(o,function(e,n){n&&t(n)&&(a="@apply "+n+";")}),!a)return n;var h=l(a),u=n.slice(0,n.indexOf("--")),f=r(h),p=f,_=t(i),m=_&&_.properties;m?(p=Object.create(m),p=Polymer.Base.mixin(p,f)):e(i,p);var y,v,g=[],P=!1;for(y in p)v=f[y],void 0===v&&(v="initial"),!m||y in m||(P=!0),g.push(i+d+y+": "+v);return P&&s(_),_&&(_.properties=p),o&&(u=n+";"+u),u+g.join("; ")+";"}function o(e,t,n){return"var("+t+",var("+n+"))"}function a(n,r){n=n.replace(p,"");var s=[],i=t(n);if(i||(e(n,{}),i=t(n)),i){var o=y.__currentElementProto;o&&(i.dependants[o.is]=o);var a,l,c;for(a in i.properties)c=r&&r[a],l=[a,": var(",n,d,a],c&&l.push(",",c),l.push(")"),s.push(l.join(""))}return s.join("; ")}function l(e){for(var t;t=h.exec(e);){var n=t[0],s=t[1],i=t.index,o=i+n.indexOf("@apply"),l=i+n.length,c=e.slice(0,o),u=e.slice(l),f=r(c),p=a(s,f);e=[c,p,u].join(""),h.lastIndex=i+p.length}return e}var c=Polymer.StyleUtil,h=c.rx.MIXIN_MATCH,u=c.rx.VAR_ASSIGN,f=/var\(\s*(--[^,]*),\s*(--[^)]*)\)/g,p=/;\s*/m,_=/^\s*(initial)|(inherit)\s*$/,d="_-_",m={},y={_measureElement:null,_map:m,_separator:d,transform:function(e,t){this.__currentElementProto=t,c.forRulesInStyles(e,this._boundFindDefinitions),c.forRulesInStyles(e,this._boundFindApplications),t&&(t.__applyShimInvalid=!1),this.__currentElementProto=null},_findDefinitions:function(e){var t=e.parsedCssText;t=t.replace(f,o),t=t.replace(u,i),e.cssText=t,":root"===e.selector&&(e.selector=":host > *")},_findApplications:function(e){e.cssText=l(e.cssText)},transformRule:function(e){this._findDefinitions(e),this._findApplications(e)},_getInitialValueForProperty:function(e){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}};return y._boundTransformRule=y.transformRule.bind(y),y._boundFindDefinitions=y._findDefinitions.bind(y),y._boundFindApplications=y._findApplications.bind(y),y}(),function(){var e=Polymer.Base._prepElement,t=Polymer.Settings.useNativeShadow,n=Polymer.StyleUtil,r=Polymer.StyleTransformer,s=Polymer.StyleExtends,i=Polymer.ApplyShim,o=Polymer.Settings;Polymer.Base._addFeature({_prepElement:function(t){this._encapsulateStyle&&"shady"!==this.__cssBuild&&r.element(t,this.is,this._scopeCssViaAttr),e.call(this,t)},_prepStyles:function(){void 0===this._encapsulateStyle&&(this._encapsulateStyle=!t),t||(this._scopeStyle=n.applyStylePlaceHolder(this.is)),this.__cssBuild=n.cssBuildTypeForModule(this.is)},_prepShimStyles:function(){if(this._template){var e=n.isTargetedBuild(this.__cssBuild);if(o.useNativeCSSProperties&&"shadow"===this.__cssBuild&&e)return;this._styles=this._styles||this._collectStyles(),o.useNativeCSSProperties&&!this.__cssBuild&&i.transform(this._styles,this);var s=o.useNativeCSSProperties&&e?this._styles.length&&this._styles[0].textContent.trim():r.elementStyles(this);this._prepStyleProperties(),!this._needsStyleProperties()&&s&&n.applyCss(s,this.is,t?this._template.content:null,this._scopeStyle)}else this._styles=[]},_collectStyles:function(){var e=[],t="",r=this.styleModules;if(r)for(var i,o=0,a=r.length;o<a&&(i=r[o]);o++)t+=n.cssFromModule(i);t+=n.cssFromModule(this.is);var l=this._template&&this._template.parentNode;if(!this._template||l&&l.id.toLowerCase()===this.is||(t+=n.cssFromElement(this._template)),t){var c=document.createElement("style");c.textContent=t,s.hasExtends(c.textContent)&&(t=s.transform(c)),e.push(c)}return e},_elementAdd:function(e){this._encapsulateStyle&&(e.__styleScoped?e.__styleScoped=!1:r.dom(e,this.is,this._scopeCssViaAttr))},_elementRemove:function(e){this._encapsulateStyle&&r.dom(e,this.is,this._scopeCssViaAttr,!0)},scopeSubtree:function(e,n){if(!t){var r=this,s=function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.getAttribute("class");e.setAttribute("class",r._scopeElementClass(e,t));for(var n,s=e.querySelectorAll("*"),i=0;i<s.length&&(n=s[i]);i++)t=n.getAttribute("class"),n.setAttribute("class",r._scopeElementClass(n,t))}};if(s(e),n){var i=new MutationObserver(function(e){for(var t,n=0;n<e.length&&(t=e[n]);n++)if(t.addedNodes)for(var r=0;r<t.addedNodes.length;r++)s(t.addedNodes[r])});return i.observe(e,{childList:!0,subtree:!0}),i}}}})}(),Polymer.StyleProperties=function(){"use strict";function e(e,t){var n=parseInt(e/32),r=1<<e%32;t[n]=(t[n]||0)|r}var t=Polymer.DomApi.matchesSelector,n=Polymer.StyleUtil,r=Polymer.StyleTransformer,s=navigator.userAgent.match("Trident"),i=Polymer.Settings;return{decorateStyles:function(e,t){var s=this,i={},o=[],a=0,l=r._calcHostScope(t.is,t.extends);n.forRulesInStyles(e,function(e,r){s.decorateRule(e),e.index=a++,s.whenHostOrRootRule(t,e,r,function(r){if(e.parent.type===n.ruleTypes.MEDIA_RULE&&(t.__notStyleScopeCacheable=!0),r.isHost){var s=r.selector.split(" ").some(function(e){return 0===e.indexOf(l)&&e.length!==l.length});t.__notStyleScopeCacheable=t.__notStyleScopeCacheable||s}}),s.collectPropertiesInCssText(e.propertyInfo.cssText,i)},function(e){o.push(e)}),e._keyframes=o;var c=[];for(var h in i)c.push(h);return c},decorateRule:function(e){if(e.propertyInfo)return e.propertyInfo;var t={},n={},r=this.collectProperties(e,n);return r&&(t.properties=n,e.rules=null),t.cssText=this.collectCssText(e),e.propertyInfo=t,t},collectProperties:function(e,t){var n=e.propertyInfo;if(!n){for(var r,s,i,o=this.rx.VAR_ASSIGN,a=e.parsedCssText;r=o.exec(a);)s=(r[2]||r[3]).trim(),"inherit"!==s&&(t[r[1].trim()]=s),i=!0;return i}if(n.properties)return Polymer.Base.mixin(t,n.properties),!0},collectCssText:function(e){return this.collectConsumingCssText(e.parsedCssText)},collectConsumingCssText:function(e){return e.replace(this.rx.BRACKETED,"").replace(this.rx.VAR_ASSIGN,"")},collectPropertiesInCssText:function(e,t){for(var n;n=this.rx.VAR_CONSUMED.exec(e);){var r=n[1];":"!==n[2]&&(t[r]=!0)}},reify:function(e){for(var t,n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++)t=n[r],e[t]=this.valueForProperty(e[t],e)},valueForProperty:function(e,t){if(e)if(e.indexOf(";")>=0)e=this.valueForProperties(e,t);else{var r=this,s=function(e,n,s,i){var o=r.valueForProperty(t[n],t);return o&&"initial"!==o?"apply-shim-inherit"===o&&(o="inherit"):o=r.valueForProperty(t[s]||s,t)||s,e+(o||"")+i};e=n.processVariableAndFallback(e,s)}return e&&e.trim()||""},valueForProperties:function(e,t){for(var n,r,s=e.split(";"),i=0;i<s.length;i++)if(n=s[i]){if(this.rx.MIXIN_MATCH.lastIndex=0,r=this.rx.MIXIN_MATCH.exec(n))n=this.valueForProperty(t[r[1]],t);else{var o=n.indexOf(":");if(o!==-1){var a=n.substring(o);a=a.trim(),a=this.valueForProperty(a,t)||a,n=n.substring(0,o)+a}}s[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return s.join(";")},applyProperties:function(e,t){var n="";e.propertyInfo||this.decorateRule(e),e.propertyInfo.cssText&&(n=this.valueForProperties(e.propertyInfo.cssText,t)),e.cssText=n},applyKeyframeTransforms:function(e,t){var n=e.cssText,r=e.cssText;if(null==e.hasAnimations&&(e.hasAnimations=this.rx.ANIMATION_MATCH.test(n)),e.hasAnimations){var s;if(null==e.keyframeNamesToTransform){e.keyframeNamesToTransform=[];for(var i in t)s=t[i],r=s(n),n!==r&&(n=r,e.keyframeNamesToTransform.push(i))}else{for(var o=0;o<e.keyframeNamesToTransform.length;++o)s=t[e.keyframeNamesToTransform[o]],n=s(n);r=n}}e.cssText=r},propertyDataFromStyles:function(r,s){var i={},o=this,a=[];return n.forActiveRulesInStyles(r,function(n){n.propertyInfo||o.decorateRule(n);var r=n.transformedSelector||n.parsedSelector;s&&n.propertyInfo.properties&&r&&t.call(s,r)&&(o.collectProperties(n,i),e(n.index,a))}),{properties:i,key:a}},_rootSelector:/:root|:host\s*>\s*\*/,_checkRoot:function(e,t){return Boolean(t.match(this._rootSelector))||"html"===e&&t.indexOf("html")>-1},whenHostOrRootRule:function(e,t,n,s){if(t.propertyInfo||self.decorateRule(t),t.propertyInfo.properties){var o=e.is?r._calcHostScope(e.is,e.extends):"html",a=t.parsedSelector,l=this._checkRoot(o,a),c=!l&&0===a.indexOf(":host"),h=e.__cssBuild||n.__cssBuild;if("shady"===h&&(l=a===o+" > *."+o||a.indexOf("html")>-1,c=!l&&0===a.indexOf(o)),l||c){var u=o;c&&(i.useNativeShadow&&!t.transformedSelector&&(t.transformedSelector=r._transformRuleCss(t,r._transformComplexSelector,e.is,o)),u=t.transformedSelector||t.parsedSelector),l&&"html"===o&&(u=t.transformedSelector||t.parsedSelector),s({selector:u,isHost:c,isRoot:l})}}},hostAndRootPropertiesForScope:function(e){var r={},s={},i=this;return n.forActiveRulesInStyles(e._styles,function(n,o){i.whenHostOrRootRule(e,n,o,function(o){var a=e._element||e;t.call(a,o.selector)&&(o.isHost?i.collectProperties(n,r):i.collectProperties(n,s))})}),{rootProps:s,hostProps:r}},transformStyles:function(e,t,n){var s=this,o=r._calcHostScope(e.is,e.extends),a=e.extends?"\\"+o.slice(0,-1)+"\\]":o,l=new RegExp(this.rx.HOST_PREFIX+a+this.rx.HOST_SUFFIX),c=this._elementKeyframeTransforms(e,n);return r.elementStyles(e,function(r){s.applyProperties(r,t),i.useNativeShadow||Polymer.StyleUtil.isKeyframesSelector(r)||!r.cssText||(s.applyKeyframeTransforms(r,c),s._scopeSelector(r,l,o,e._scopeCssViaAttr,n))})},_elementKeyframeTransforms:function(e,t){var n=e._styles._keyframes,r={};if(!i.useNativeShadow&&n)for(var s=0,o=n[s];s<n.length;o=n[++s])this._scopeKeyframes(o,t),r[o.keyframesName]=this._keyframesRuleTransformer(o);return r},_keyframesRuleTransformer:function(e){return function(t){return t.replace(e.keyframesNameRx,e.transformedKeyframesName)}},_scopeKeyframes:function(e,t){e.keyframesNameRx=new RegExp(e.keyframesName,"g"),e.transformedKeyframesName=e.keyframesName+"-"+t,e.transformedSelector=e.transformedSelector||e.selector,e.selector=e.transformedSelector.replace(e.keyframesName,e.transformedKeyframesName)},_scopeSelector:function(e,t,n,s,i){e.transformedSelector=e.transformedSelector||e.selector;for(var o,a=e.transformedSelector,l=s?"["+r.SCOPE_NAME+"~="+i+"]":"."+i,c=a.split(","),h=0,u=c.length;h<u&&(o=c[h]);h++)c[h]=o.match(t)?o.replace(n,l):l+" "+o;e.selector=c.join(",")},applyElementScopeSelector:function(e,t,n,s){var i=s?e.getAttribute(r.SCOPE_NAME):e.getAttribute("class")||"",o=n?i.replace(n,t):(i?i+" ":"")+this.XSCOPE_NAME+" "+t;i!==o&&(s?e.setAttribute(r.SCOPE_NAME,o):e.setAttribute("class",o))},applyElementStyle:function(e,t,r,o){var a=o?o.textContent||"":this.transformStyles(e,t,r),l=e._customStyle;return l&&!i.useNativeShadow&&l!==o&&(l._useCount--,l._useCount<=0&&l.parentNode&&l.parentNode.removeChild(l)),i.useNativeShadow?e._customStyle?(e._customStyle.textContent=a,o=e._customStyle):a&&(o=n.applyCss(a,r,e.root,e._scopeStyle)):o?o.parentNode||(s&&a.indexOf("@media")>-1&&(o.textContent=a),n.applyStyle(o,null,e._scopeStyle)):a&&(o=n.applyCss(a,r,null,e._scopeStyle)),o&&(o._useCount=o._useCount||0,e._customStyle!=o&&o._useCount++,e._customStyle=o),o},mixinCustomStyle:function(e,t){var n;for(var r in t)n=t[r],(n||0===n)&&(e[r]=n)},updateNativeStyleProperties:function(e,t){var n=e.__customStyleProperties;if(n)for(var r=0;r<n.length;r++)e.style.removeProperty(n[r]);var s=[];for(var i in t)null!==t[i]&&(e.style.setProperty(i,t[i]),s.push(i));e.__customStyleProperties=s},rx:n.rx,XSCOPE_NAME:"x-scope"}}(),function(){Polymer.StyleCache=function(){this.cache={}},Polymer.StyleCache.prototype={MAX:100,store:function(e,t,n,r){t.keyValues=n,t.styles=r;var s=this.cache[e]=this.cache[e]||[];s.push(t),s.length>this.MAX&&s.shift()},retrieve:function(e,t,n){var r=this.cache[e];if(r)for(var s,i=r.length-1;i>=0;i--)if(s=r[i],n===s.styles&&this._objectsEqual(t,s.keyValues))return s},clear:function(){this.cache={}},_objectsEqual:function(e,t){var n,r;for(var s in e)if(n=e[s],r=t[s],!("object"==typeof n&&n?this._objectsStrictlyEqual(n,r):n===r))return!1;return!Array.isArray(e)||e.length===t.length},_objectsStrictlyEqual:function(e,t){return this._objectsEqual(e,t)&&this._objectsEqual(t,e)}}}(),Polymer.StyleDefaults=function(){var e=Polymer.StyleProperties,t=Polymer.StyleCache,n=Polymer.Settings.useNativeCSSProperties,r={_styles:[],_properties:null,customStyle:{},_styleCache:new t,_element:Polymer.DomApi.wrap(document.documentElement),addStyle:function(e){this._styles.push(e),this._properties=null},get _styleProperties(){return this._properties||(e.decorateStyles(this._styles,this),this._styles._scopeStyleProperties=null,this._properties=e.hostAndRootPropertiesForScope(this).rootProps,e.mixinCustomStyle(this._properties,this.customStyle),e.reify(this._properties)),this._properties},hasStyleProperties:function(){return Boolean(this._properties)},_needsStyleProperties:function(){},_computeStyleProperties:function(){return this._styleProperties},updateStyles:function(t){this._properties=null,t&&Polymer.Base.mixin(this.customStyle,t),this._styleCache.clear();for(var r,s=0;s<this._styles.length;s++)r=this._styles[s],r=r.__importElement||r,r._apply();
n&&e.updateNativeStyleProperties(document.documentElement,this.customStyle)}};return r}(),function(){"use strict";var e=Polymer.Base.serializeValueToAttribute,t=Polymer.StyleProperties,n=Polymer.StyleTransformer,r=Polymer.StyleDefaults,s=Polymer.Settings.useNativeShadow,i=Polymer.Settings.useNativeCSSProperties;Polymer.Base._addFeature({_prepStyleProperties:function(){i||(this._ownStylePropertyNames=this._styles&&this._styles.length?t.decorateStyles(this._styles,this):null)},customStyle:null,getComputedStyleValue:function(e){return i||this._styleProperties||this._computeStyleProperties(),!i&&this._styleProperties&&this._styleProperties[e]||getComputedStyle(this).getPropertyValue(e)},_setupStyleProperties:function(){this.customStyle={},this._styleCache=null,this._styleProperties=null,this._scopeSelector=null,this._ownStyleProperties=null,this._customStyle=null},_needsStyleProperties:function(){return Boolean(!i&&this._ownStylePropertyNames&&this._ownStylePropertyNames.length)},_validateApplyShim:function(){if(this.__applyShimInvalid){Polymer.ApplyShim.transform(this._styles,this.__proto__);var e=n.elementStyles(this);if(s){var t=this._template.content.querySelector("style");t&&(t.textContent=e)}else{var r=this._scopeStyle&&this._scopeStyle.nextSibling;r&&(r.textContent=e)}}},_beforeAttached:function(){this._scopeSelector&&!this.__stylePropertiesInvalid||!this._needsStyleProperties()||(this.__stylePropertiesInvalid=!1,this._updateStyleProperties())},_findStyleHost:function(){for(var e,t=this;e=Polymer.dom(t).getOwnerRoot();){if(Polymer.isInstance(e.host))return e.host;t=e.host}return r},_updateStyleProperties:function(){var e,n=this._findStyleHost();n._styleProperties||n._computeStyleProperties(),n._styleCache||(n._styleCache=new Polymer.StyleCache);var r=t.propertyDataFromStyles(n._styles,this),i=!this.__notStyleScopeCacheable;i&&(r.key.customStyle=this.customStyle,e=n._styleCache.retrieve(this.is,r.key,this._styles));var a=Boolean(e);a?this._styleProperties=e._styleProperties:this._computeStyleProperties(r.properties),this._computeOwnStyleProperties(),a||(e=o.retrieve(this.is,this._ownStyleProperties,this._styles));var l=Boolean(e)&&!a,c=this._applyStyleProperties(e);a||(c=c&&s?c.cloneNode(!0):c,e={style:c,_scopeSelector:this._scopeSelector,_styleProperties:this._styleProperties},i&&(r.key.customStyle={},this.mixin(r.key.customStyle,this.customStyle),n._styleCache.store(this.is,e,r.key,this._styles)),l||o.store(this.is,Object.create(e),this._ownStyleProperties,this._styles))},_computeStyleProperties:function(e){var n=this._findStyleHost();n._styleProperties||n._computeStyleProperties();var r=Object.create(n._styleProperties),s=t.hostAndRootPropertiesForScope(this);this.mixin(r,s.hostProps),e=e||t.propertyDataFromStyles(n._styles,this).properties,this.mixin(r,e),this.mixin(r,s.rootProps),t.mixinCustomStyle(r,this.customStyle),t.reify(r),this._styleProperties=r},_computeOwnStyleProperties:function(){for(var e,t={},n=0;n<this._ownStylePropertyNames.length;n++)e=this._ownStylePropertyNames[n],t[e]=this._styleProperties[e];this._ownStyleProperties=t},_scopeCount:0,_applyStyleProperties:function(e){var n=this._scopeSelector;this._scopeSelector=e?e._scopeSelector:this.is+"-"+this.__proto__._scopeCount++;var r=t.applyElementStyle(this,this._styleProperties,this._scopeSelector,e&&e.style);return s||t.applyElementScopeSelector(this,this._scopeSelector,n,this._scopeCssViaAttr),r},serializeValueToAttribute:function(t,n,r){if(r=r||this,"class"===n&&!s){var i=r===this?this.domHost||this.dataHost:this;i&&(t=i._scopeElementClass(r,t))}r=this.shadyRoot&&this.shadyRoot._hasDistributed?Polymer.dom(r):r,e.call(this,t,n,r)},_scopeElementClass:function(e,t){return s||this._scopeCssViaAttr||(t=(t?t+" ":"")+a+" "+this.is+(e._scopeSelector?" "+l+" "+e._scopeSelector:"")),t},updateStyles:function(e){e&&this.mixin(this.customStyle,e),i?t.updateNativeStyleProperties(this,this.customStyle):(this.isAttached?this._needsStyleProperties()?this._updateStyleProperties():this._styleProperties=null:this.__stylePropertiesInvalid=!0,this._styleCache&&this._styleCache.clear(),this._updateRootStyles())},_updateRootStyles:function(e){e=e||this.root;for(var t,n=Polymer.dom(e)._query(function(e){return e.shadyRoot||e.shadowRoot}),r=0,s=n.length;r<s&&(t=n[r]);r++)t.updateStyles&&t.updateStyles()}}),Polymer.updateStyles=function(e){r.updateStyles(e),Polymer.Base._updateRootStyles(document)};var o=new Polymer.StyleCache;Polymer.customStyleCache=o;var a=n.SCOPE_NAME,l=t.XSCOPE_NAME}(),Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepConstructor(),this._prepStyles()},_finishRegisterFeatures:function(){this._prepTemplate(),this._prepShimStyles(),this._prepAnnotations(),this._prepEffects(),this._prepBehaviors(),this._prepPropertyInfo(),this._prepBindings(),this._prepShady()},_prepBehavior:function(e){this._addPropertyEffects(e.properties),this._addComplexObserverEffects(e.observers),this._addHostAttributes(e.hostAttributes)},_initFeatures:function(){this._setupGestures(),this._setupConfigure(),this._setupStyleProperties(),this._setupDebouncers(),this._setupShady(),this._registerHost(),this._template&&(this._validateApplyShim(),this._poolContent(),this._beginHosting(),this._stampTemplate(),this._endHosting(),this._marshalAnnotationReferences()),this._marshalInstanceEffects(),this._marshalBehaviors(),this._marshalHostAttributes(),this._marshalAttributes(),this._tryReady()},_marshalBehavior:function(e){e.listeners&&this._listenListeners(e.listeners)}}),function(){var e,t=Polymer.StyleProperties,n=Polymer.StyleUtil,r=Polymer.CssParse,s=Polymer.StyleDefaults,i=Polymer.StyleTransformer,o=Polymer.ApplyShim,a=Polymer.Debounce,l=Polymer.Settings;Polymer({is:"custom-style",extends:"style",_template:null,properties:{include:String},ready:function(){this.__appliedElement=this.__appliedElement||this,this.__cssBuild=n.getCssBuildType(this),this.__appliedElement!==this&&(this.__appliedElement.__cssBuild=this.__cssBuild),this._tryApply()},attached:function(){this._tryApply()},_tryApply:function(){if(!this._appliesToDocument&&this.parentNode&&"dom-module"!==this.parentNode.localName){this._appliesToDocument=!0;var e=this.__appliedElement;if(l.useNativeCSSProperties||(this.__needsUpdateStyles=s.hasStyleProperties(),s.addStyle(e)),e.textContent||this.include)this._apply(!0);else{var t=this,n=new MutationObserver(function(){n.disconnect(),t._apply(!0)});n.observe(e,{childList:!0})}}},_updateStyles:function(){Polymer.updateStyles()},_apply:function(e){var t=this.__appliedElement;if(this.include&&(t.textContent=n.cssFromModules(this.include,!0)+t.textContent),t.textContent){var r=this.__cssBuild,s=n.isTargetedBuild(r);if(!l.useNativeCSSProperties||!s){var a=n.rulesForStyle(t);if(s||(n.forEachRule(a,function(e){i.documentRule(e)}),l.useNativeCSSProperties&&!r&&o.transform([t])),l.useNativeCSSProperties)t.textContent=n.toCssText(a);else{var c=this,h=function(){c._flushCustomProperties()};e?Polymer.RenderStatus.whenReady(h):h()}}}},_flushCustomProperties:function(){this.__needsUpdateStyles?(this.__needsUpdateStyles=!1,e=a(e,this._updateStyles)):this._applyCustomProperties()},_applyCustomProperties:function(){var e=this.__appliedElement;this._computeStyleProperties();var s=this._styleProperties,i=n.rulesForStyle(e);i&&(e.textContent=n.toCssText(i,function(e){var n=e.cssText=e.parsedCssText;e.propertyInfo&&e.propertyInfo.cssText&&(n=r.removeCustomPropAssignment(n),e.cssText=t.valueForProperties(n,s))}))}})}(),Polymer.Templatizer={properties:{__hideTemplateChildren__:{observer:"_showHideChildren"}},_instanceProps:Polymer.nob,_parentPropPrefix:"_parent_",templatize:function(e){if(this._templatized=e,e._content||(e._content=e.content),e._content._ctor)return this.ctor=e._content._ctor,void this._prepParentProperties(this.ctor.prototype,e);var t=Object.create(Polymer.Base);this._customPrepAnnotations(t,e),this._prepParentProperties(t,e),t._prepEffects(),this._customPrepEffects(t),t._prepBehaviors(),t._prepPropertyInfo(),t._prepBindings(),t._notifyPathUp=this._notifyPathUpImpl,t._scopeElementClass=this._scopeElementClassImpl,t.listen=this._listenImpl,t._showHideChildren=this._showHideChildrenImpl,t.__setPropertyOrig=this.__setProperty,t.__setProperty=this.__setPropertyImpl;var n=this._constructorImpl,r=function(e,t){n.call(this,e,t)};r.prototype=t,t.constructor=r,e._content._ctor=r,this.ctor=r},_getRootDataHost:function(){return this.dataHost&&this.dataHost._rootDataHost||this.dataHost},_showHideChildrenImpl:function(e){for(var t=this._children,n=0;n<t.length;n++){var r=t[n];Boolean(e)!=Boolean(r.__hideTemplateChildren__)&&(r.nodeType===Node.TEXT_NODE?e?(r.__polymerTextContent__=r.textContent,r.textContent=""):r.textContent=r.__polymerTextContent__:r.style&&(e?(r.__polymerDisplay__=r.style.display,r.style.display="none"):r.style.display=r.__polymerDisplay__)),r.__hideTemplateChildren__=e}},__setPropertyImpl:function(e,t,n,r){r&&r.__hideTemplateChildren__&&"textContent"==e&&(e="__polymerTextContent__"),this.__setPropertyOrig(e,t,n,r)},_debounceTemplate:function(e){Polymer.dom.addDebouncer(this.debounce("_debounceTemplate",e))},_flushTemplates:function(){Polymer.dom.flush()},_customPrepEffects:function(e){var t=e._parentProps;for(var n in t)e._addPropertyEffect(n,"function",this._createHostPropEffector(n));for(n in this._instanceProps)e._addPropertyEffect(n,"function",this._createInstancePropEffector(n))},_customPrepAnnotations:function(e,t){e._template=t;var n=t._content;if(!n._notes){var r=e._rootDataHost;r&&(Polymer.Annotations.prepElement=function(){r._prepElement()}),n._notes=Polymer.Annotations.parseAnnotations(t),Polymer.Annotations.prepElement=null,this._processAnnotations(n._notes)}e._notes=n._notes,e._parentProps=n._parentProps},_prepParentProperties:function(e,t){var n=this._parentProps=e._parentProps;if(this._forwardParentProp&&n){var r,s=e._parentPropProto;if(!s){for(r in this._instanceProps)delete n[r];s=e._parentPropProto=Object.create(null),t!=this&&(Polymer.Bind.prepareModel(s),Polymer.Base.prepareModelNotifyPath(s));for(r in n){var i=this._parentPropPrefix+r,o=[{kind:"function",effect:this._createForwardPropEffector(r),fn:Polymer.Bind._functionEffect},{kind:"notify",fn:Polymer.Bind._notifyEffect,effect:{event:Polymer.CaseMap.camelToDashCase(i)+"-changed"}}];Polymer.Bind._createAccessors(s,i,o)}}var a=this;t!=this&&(Polymer.Bind.prepareInstance(t),t._forwardParentProp=function(e,t){a._forwardParentProp(e,t)}),this._extendTemplate(t,s),t._pathEffector=function(e,t,n){return a._pathEffectorImpl(e,t,n)}}},_createForwardPropEffector:function(e){return function(t,n){this._forwardParentProp(e,n)}},_createHostPropEffector:function(e){var t=this._parentPropPrefix;return function(n,r){this.dataHost._templatized[t+e]=r}},_createInstancePropEffector:function(e){return function(t,n,r,s){s||this.dataHost._forwardInstanceProp(this,e,n)}},_extendTemplate:function(e,t){var n=Object.getOwnPropertyNames(t);t._propertySetter&&(e._propertySetter=t._propertySetter);for(var r,s=0;s<n.length&&(r=n[s]);s++){var i=e[r],o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o),void 0!==i&&e._propertySetter(r,i)}},_showHideChildren:function(e){},_forwardInstancePath:function(e,t,n){},_forwardInstanceProp:function(e,t,n){},_notifyPathUpImpl:function(e,t){var n=this.dataHost,r=Polymer.Path.root(e);n._forwardInstancePath.call(n,this,e,t),r in n._parentProps&&n._templatized._notifyPath(n._parentPropPrefix+e,t)},_pathEffectorImpl:function(e,t,n){if(this._forwardParentPath&&0===e.indexOf(this._parentPropPrefix)){var r=e.substring(this._parentPropPrefix.length),s=Polymer.Path.root(r);s in this._parentProps&&this._forwardParentPath(r,t)}Polymer.Base._pathEffector.call(this._templatized,e,t,n)},_constructorImpl:function(e,t){this._rootDataHost=t._getRootDataHost(),this._setupConfigure(e),this._registerHost(t),this._beginHosting(),this.root=this.instanceTemplate(this._template),this.root.__noContent=!this._notes._hasContent,this.root.__styleScoped=!0,this._endHosting(),this._marshalAnnotatedNodes(),this._marshalInstanceEffects(),this._marshalAnnotatedListeners();for(var n=[],r=this.root.firstChild;r;r=r.nextSibling)n.push(r),r._templateInstance=this;this._children=n,t.__hideTemplateChildren__&&this._showHideChildren(!0),this._tryReady()},_listenImpl:function(e,t,n){var r=this,s=this._rootDataHost,i=s._createEventHandler(e,t,n),o=function(e){e.model=r,i(e)};s._listen(e,t,o)},_scopeElementClassImpl:function(e,t){var n=this._rootDataHost;return n?n._scopeElementClass(e,t):t},stamp:function(e){if(e=e||{},this._parentProps){var t=this._templatized;for(var n in this._parentProps)void 0===e[n]&&(e[n]=t[this._parentPropPrefix+n])}return new this.ctor(e,this)},modelForElement:function(e){for(var t;e;)if(t=e._templateInstance){if(t.dataHost==this)return t;e=t.dataHost}else e=e.parentNode}},Polymer({is:"dom-template",extends:"template",_template:null,behaviors:[Polymer.Templatizer],ready:function(){this.templatize(this)}}),Polymer._collections=new WeakMap,Polymer.Collection=function(e){Polymer._collections.set(e,this),this.userArray=e,this.store=e.slice(),this.initMap()},Polymer.Collection.prototype={constructor:Polymer.Collection,initMap:function(){for(var e=this.omap=new WeakMap,t=this.pmap={},n=this.store,r=0;r<n.length;r++){var s=n[r];s&&"object"==typeof s?e.set(s,r):t[s]=r}},add:function(e){var t=this.store.push(e)-1;return e&&"object"==typeof e?this.omap.set(e,t):this.pmap[e]=t,"#"+t},removeKey:function(e){(e=this._parseKey(e))&&(this._removeFromMap(this.store[e]),delete this.store[e])},_removeFromMap:function(e){e&&"object"==typeof e?this.omap.delete(e):delete this.pmap[e]},remove:function(e){var t=this.getKey(e);return this.removeKey(t),t},getKey:function(e){var t;if(t=e&&"object"==typeof e?this.omap.get(e):this.pmap[e],void 0!=t)return"#"+t},getKeys:function(){return Object.keys(this.store).map(function(e){return"#"+e})},_parseKey:function(e){if(e&&"#"==e[0])return e.slice(1)},setItem:function(e,t){if(e=this._parseKey(e)){var n=this.store[e];n&&this._removeFromMap(n),t&&"object"==typeof t?this.omap.set(t,e):this.pmap[t]=e,this.store[e]=t}},getItem:function(e){if(e=this._parseKey(e))return this.store[e]},getItems:function(){var e=[],t=this.store;for(var n in t)e.push(t[n]);return e},_applySplices:function(e){for(var t,n,r={},s=0;s<e.length&&(n=e[s]);s++){n.addedKeys=[];for(var i=0;i<n.removed.length;i++)t=this.getKey(n.removed[i]),r[t]=r[t]?null:-1;for(i=0;i<n.addedCount;i++){var o=this.userArray[n.index+i];t=this.getKey(o),t=void 0===t?this.add(o):t,r[t]=r[t]?null:1,n.addedKeys.push(t)}}var a=[],l=[];for(t in r)r[t]<0&&(this.removeKey(t),a.push(t)),r[t]>0&&l.push(t);return[{removed:a,added:l}]}},Polymer.Collection.get=function(e){return Polymer._collections.get(e)||new Polymer.Collection(e)},Polymer.Collection.applySplices=function(e,t){var n=Polymer._collections.get(e);return n?n._applySplices(t):null},Polymer({is:"dom-repeat",extends:"template",_template:null,properties:{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},sort:{type:Function,observer:"_sortChanged"},filter:{type:Function,observer:"_filterChanged"},observe:{type:String,observer:"_observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!0,readOnly:!0},initialCount:{type:Number,observer:"_initializeChunking"},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"_computeFrameTime(targetFramerate)"}},behaviors:[Polymer.Templatizer],observers:["_itemsChanged(items.*)"],created:function(){this._instances=[],this._pool=[],this._limit=1/0;var e=this;this._boundRenderChunk=function(){e._renderChunk()}},detached:function(){this.__isDetached=!0;for(var e=0;e<this._instances.length;e++)this._detachInstance(e)},attached:function(){if(this.__isDetached){this.__isDetached=!1;for(var e=Polymer.dom(Polymer.dom(this).parentNode),t=0;t<this._instances.length;t++)this._attachInstance(t,e)}},ready:function(){this._instanceProps={__key__:!0},this._instanceProps[this.as]=!0,this._instanceProps[this.indexAs]=!0,this.ctor||this.templatize(this)},_sortChanged:function(e){var t=this._getRootDataHost();this._sortFn=e&&("function"==typeof e?e:function(){return t[e].apply(t,arguments)}),this._needFullRefresh=!0,this.items&&this._debounceTemplate(this._render)},_filterChanged:function(e){var t=this._getRootDataHost();this._filterFn=e&&("function"==typeof e?e:function(){return t[e].apply(t,arguments)}),this._needFullRefresh=!0,this.items&&this._debounceTemplate(this._render)},_computeFrameTime:function(e){return Math.ceil(1e3/e)},_initializeChunking:function(){this.initialCount&&(this._limit=this.initialCount,this._chunkCount=this.initialCount,this._lastChunkTime=performance.now())},_tryRenderChunk:function(){this.items&&this._limit<this.items.length&&this.debounce("renderChunk",this._requestRenderChunk)},_requestRenderChunk:function(){requestAnimationFrame(this._boundRenderChunk)},_renderChunk:function(){var e=performance.now(),t=this._targetFrameTime/(e-this._lastChunkTime);this._chunkCount=Math.round(this._chunkCount*t)||1,this._limit+=this._chunkCount,this._lastChunkTime=e,this._debounceTemplate(this._render)},_observeChanged:function(){this._observePaths=this.observe&&this.observe.replace(".*",".").split(" ")},_itemsChanged:function(e){if("items"==e.path)Array.isArray(this.items)?this.collection=Polymer.Collection.get(this.items):this.items?this._error(this._logf("dom-repeat","expected array for `items`, found",this.items)):this.collection=null,this._keySplices=[],this._indexSplices=[],this._needFullRefresh=!0,this._initializeChunking(),this._debounceTemplate(this._render);else if("items.splices"==e.path)this._keySplices=this._keySplices.concat(e.value.keySplices),this._indexSplices=this._indexSplices.concat(e.value.indexSplices),this._debounceTemplate(this._render);else{var t=e.path.slice(6);this._forwardItemPath(t,e.value),this._checkObservedPaths(t)}},_checkObservedPaths:function(e){if(this._observePaths){e=e.substring(e.indexOf(".")+1);for(var t=this._observePaths,n=0;n<t.length;n++)if(0===e.indexOf(t[n]))return this._needFullRefresh=!0,void(this.delay?this.debounce("render",this._render,this.delay):this._debounceTemplate(this._render))}},render:function(){this._needFullRefresh=!0,this._debounceTemplate(this._render),this._flushTemplates()},_render:function(){this._needFullRefresh?(this._applyFullRefresh(),this._needFullRefresh=!1):this._keySplices.length&&(this._sortFn?this._applySplicesUserSort(this._keySplices):this._filterFn?this._applyFullRefresh():this._applySplicesArrayOrder(this._indexSplices)),this._keySplices=[],this._indexSplices=[];for(var e=this._keyToInstIdx={},t=this._instances.length-1;t>=0;t--){var n=this._instances[t];n.isPlaceholder&&t<this._limit?n=this._insertInstance(t,n.__key__):!n.isPlaceholder&&t>=this._limit&&(n=this._downgradeInstance(t,n.__key__)),e[n.__key__]=t,n.isPlaceholder||n.__setProperty(this.indexAs,t,!0)}this._pool.length=0,this._setRenderedItemCount(this._instances.length),this.fire("dom-change"),this._tryRenderChunk()},_applyFullRefresh:function(){var e,t=this.collection;if(this._sortFn)e=t?t.getKeys():[];else{e=[];var n=this.items;if(n)for(var r=0;r<n.length;r++)e.push(t.getKey(n[r]))}var s=this;for(this._filterFn&&(e=e.filter(function(e){return s._filterFn(t.getItem(e))})),this._sortFn&&e.sort(function(e,n){return s._sortFn(t.getItem(e),t.getItem(n))}),r=0;r<e.length;r++){var i=e[r],o=this._instances[r];o?(o.__key__=i,!o.isPlaceholder&&r<this._limit&&o.__setProperty(this.as,t.getItem(i),!0)):r<this._limit?this._insertInstance(r,i):this._insertPlaceholder(r,i)}for(var a=this._instances.length-1;a>=r;a--)this._detachAndRemoveInstance(a)},_numericSort:function(e,t){return e-t},_applySplicesUserSort:function(e){for(var t,n,r=this.collection,s={},i=0;i<e.length&&(n=e[i]);i++){for(var o=0;o<n.removed.length;o++)t=n.removed[o],s[t]=s[t]?null:-1;for(o=0;o<n.added.length;o++)t=n.added[o],s[t]=s[t]?null:1}var a=[],l=[];for(t in s)s[t]===-1&&a.push(this._keyToInstIdx[t]),1===s[t]&&l.push(t);if(a.length)for(a.sort(this._numericSort),i=a.length-1;i>=0;i--){var c=a[i];void 0!==c&&this._detachAndRemoveInstance(c)}var h=this;if(l.length){this._filterFn&&(l=l.filter(function(e){return h._filterFn(r.getItem(e))})),l.sort(function(e,t){return h._sortFn(r.getItem(e),r.getItem(t))});var u=0;for(i=0;i<l.length;i++)u=this._insertRowUserSort(u,l[i])}},_insertRowUserSort:function(e,t){for(var n=this.collection,r=n.getItem(t),s=this._instances.length-1,i=-1;e<=s;){var o=e+s>>1,a=this._instances[o].__key__,l=this._sortFn(n.getItem(a),r);if(l<0)e=o+1;else{if(!(l>0)){i=o;break}s=o-1}}return i<0&&(i=s+1),this._insertPlaceholder(i,t),i},_applySplicesArrayOrder:function(e){for(var t,n=0;n<e.length&&(t=e[n]);n++){for(var r=0;r<t.removed.length;r++)this._detachAndRemoveInstance(t.index);for(r=0;r<t.addedKeys.length;r++)this._insertPlaceholder(t.index+r,t.addedKeys[r])}},_detachInstance:function(e){var t=this._instances[e];if(!t.isPlaceholder){for(var n=0;n<t._children.length;n++){var r=t._children[n];Polymer.dom(t.root).appendChild(r)}return t}},_attachInstance:function(e,t){var n=this._instances[e];n.isPlaceholder||t.insertBefore(n.root,this)},_detachAndRemoveInstance:function(e){var t=this._detachInstance(e);t&&this._pool.push(t),this._instances.splice(e,1)},_insertPlaceholder:function(e,t){this._instances.splice(e,0,{isPlaceholder:!0,__key__:t})},_stampInstance:function(e,t){var n={__key__:t};return n[this.as]=this.collection.getItem(t),n[this.indexAs]=e,this.stamp(n)},_insertInstance:function(e,t){var n=this._pool.pop();n?(n.__setProperty(this.as,this.collection.getItem(t),!0),n.__setProperty("__key__",t,!0)):n=this._stampInstance(e,t);var r=this._instances[e+1],s=r&&!r.isPlaceholder?r._children[0]:this,i=Polymer.dom(this).parentNode;return Polymer.dom(i).insertBefore(n.root,s),this._instances[e]=n,n},_downgradeInstance:function(e,t){var n=this._detachInstance(e);return n&&this._pool.push(n),n={isPlaceholder:!0,__key__:t},this._instances[e]=n,n},_showHideChildren:function(e){for(var t=0;t<this._instances.length;t++)this._instances[t].isPlaceholder||this._instances[t]._showHideChildren(e)},_forwardInstanceProp:function(e,t,n){if(t==this.as){var r;r=this._sortFn||this._filterFn?this.items.indexOf(this.collection.getItem(e.__key__)):e[this.indexAs],this.set("items."+r,n)}},_forwardInstancePath:function(e,t,n){0===t.indexOf(this.as+".")&&this._notifyPath("items."+e.__key__+"."+t.slice(this.as.length+1),n)},_forwardParentProp:function(e,t){for(var n,r=this._instances,s=0;s<r.length&&(n=r[s]);s++)n.isPlaceholder||n.__setProperty(e,t,!0)},_forwardParentPath:function(e,t){for(var n,r=this._instances,s=0;s<r.length&&(n=r[s]);s++)n.isPlaceholder||n._notifyPath(e,t,!0)},_forwardItemPath:function(e,t){if(this._keyToInstIdx){var n=e.indexOf("."),r=e.substring(0,n<0?e.length:n),s=this._keyToInstIdx[r],i=this._instances[s];i&&!i.isPlaceholder&&(n>=0?(e=this.as+"."+e.substring(n+1),i._notifyPath(e,t,!0)):i.__setProperty(this.as,t,!0))}},itemForElement:function(e){var t=this.modelForElement(e);return t&&t[this.as]},keyForElement:function(e){var t=this.modelForElement(e);return t&&t.__key__},indexForElement:function(e){var t=this.modelForElement(e);return t&&t[this.indexAs]}}),Polymer({is:"array-selector",_template:null,properties:{items:{type:Array,observer:"clearSelection"},multi:{type:Boolean,value:!1,observer:"clearSelection"},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}},clearSelection:function(){if(Array.isArray(this.selected))for(var e=0;e<this.selected.length;e++)this.unlinkPaths("selected."+e);else this.unlinkPaths("selected"),this.unlinkPaths("selectedItem");this.multi?this.selected&&!this.selected.length||(this.selected=[],this._selectedColl=Polymer.Collection.get(this.selected)):(this.selected=null,this._selectedColl=null),this.selectedItem=null},isSelected:function(e){return this.multi?void 0!==this._selectedColl.getKey(e):this.selected==e},deselect:function(e){if(this.multi){if(this.isSelected(e)){var t=this._selectedColl.getKey(e);this.arrayDelete("selected",e),this.unlinkPaths("selected."+t)}}else this.selected=null,this.selectedItem=null,this.unlinkPaths("selected"),this.unlinkPaths("selectedItem")},select:function(e){var t=Polymer.Collection.get(this.items),n=t.getKey(e);if(this.multi)if(this.isSelected(e))this.toggle&&this.deselect(e);else{this.push("selected",e);var r=this._selectedColl.getKey(e);this.linkPaths("selected."+r,"items."+n)}else this.toggle&&e==this.selected?this.deselect():(this.selected=e,this.selectedItem=e,this.linkPaths("selected","items."+n),this.linkPaths("selectedItem","items."+n))}}),Polymer({is:"dom-if",extends:"template",_template:null,properties:{if:{type:Boolean,value:!1,observer:"_queueRender"},restamp:{type:Boolean,value:!1,observer:"_queueRender"}},behaviors:[Polymer.Templatizer],_queueRender:function(){this._debounceTemplate(this._render)},detached:function(){this.parentNode&&(this.parentNode.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||Polymer.Settings.hasShadow&&this.parentNode instanceof ShadowRoot)||this._teardownInstance()},attached:function(){this.if&&this.ctor&&this.async(this._ensureInstance)},render:function(){this._flushTemplates()},_render:function(){this.if?(this.ctor||this.templatize(this),this._ensureInstance(),this._showHideChildren()):this.restamp&&this._teardownInstance(),!this.restamp&&this._instance&&this._showHideChildren(),this.if!=this._lastIf&&(this.fire("dom-change"),this._lastIf=this.if)},_ensureInstance:function(){var e=Polymer.dom(this).parentNode;if(e){var t=Polymer.dom(e);if(this._instance){var n=this._instance._children;if(n&&n.length){var r=Polymer.dom(this).previousSibling;if(r!==n[n.length-1])for(var s,i=0;i<n.length&&(s=n[i]);i++)t.insertBefore(s,this)}}else{this._instance=this.stamp();var o=this._instance.root;t.insertBefore(o,this)}}},_teardownInstance:function(){if(this._instance){var e=this._instance._children;if(e&&e.length)for(var t,n=Polymer.dom(Polymer.dom(e[0]).parentNode),r=0;r<e.length&&(t=e[r]);r++)n.removeChild(t);this._instance=null}},_showHideChildren:function(){var e=this.__hideTemplateChildren__||!this.if;this._instance&&this._instance._showHideChildren(e)},_forwardParentProp:function(e,t){this._instance&&this._instance.__setProperty(e,t,!0)},_forwardParentPath:function(e,t){this._instance&&this._instance._notifyPath(e,t,!0)}}),Polymer({is:"dom-bind",extends:"template",_template:null,created:function(){var e=this;Polymer.RenderStatus.whenReady(function(){"loading"==document.readyState?document.addEventListener("DOMContentLoaded",function(){e._markImportsReady()}):e._markImportsReady()})},_ensureReady:function(){this._readied||this._readySelf()},_markImportsReady:function(){this._importsReady=!0,this._ensureReady()},_registerFeatures:function(){this._prepConstructor()},_insertChildren:function(){var e=Polymer.dom(Polymer.dom(this).parentNode);e.insertBefore(this.root,this)},_removeChildren:function(){if(this._children)for(var e=0;e<this._children.length;e++)this.root.appendChild(this._children[e])},_initFeatures:function(){},_scopeElementClass:function(e,t){return this.dataHost?this.dataHost._scopeElementClass(e,t):t},_configureInstanceProperties:function(){},_prepConfigure:function(){var e={};for(var t in this._propertyEffects)e[t]=this[t];var n=this._setupConfigure;this._setupConfigure=function(){n.call(this,e)}},attached:function(){this._importsReady&&this.render()},detached:function(){this._removeChildren()},render:function(){this._ensureReady(),this._children||(this._template=this,this._prepAnnotations(),this._prepEffects(),this._prepBehaviors(),this._prepConfigure(),this._prepBindings(),this._prepPropertyInfo(),Polymer.Base._initFeatures.call(this),this._children=Polymer.TreeApi.arrayCopyChildNodes(this.root)),this._insertChildren(),this.fire("dom-change")}})</script><style>[hidden]{display:none!important}</style><style is="custom-style">:root{--layout:{display:-ms-flexbox;display:-webkit-flex;display:flex};--layout-inline:{display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex};--layout-horizontal:{@apply(--layout);-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row};--layout-horizontal-reverse:{@apply(--layout);-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse};--layout-vertical:{@apply(--layout);-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column};--layout-vertical-reverse:{@apply(--layout);-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse};--layout-wrap:{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap};--layout-wrap-reverse:{-ms-flex-wrap:wrap-reverse;-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse};--layout-flex-auto:{-ms-flex:1 1 auto;-webkit-flex:1 1 auto;flex:1 1 auto};--layout-flex-none:{-ms-flex:none;-webkit-flex:none;flex:none};--layout-flex:{-ms-flex:1 1 0px;-webkit-flex:1;flex:1;-webkit-flex-basis:0px;flex-basis:0px};--layout-flex-2:{-ms-flex:2;-webkit-flex:2;flex:2};--layout-flex-3:{-ms-flex:3;-webkit-flex:3;flex:3};--layout-flex-4:{-ms-flex:4;-webkit-flex:4;flex:4};--layout-flex-5:{-ms-flex:5;-webkit-flex:5;flex:5};--layout-flex-6:{-ms-flex:6;-webkit-flex:6;flex:6};--layout-flex-7:{-ms-flex:7;-webkit-flex:7;flex:7};--layout-flex-8:{-ms-flex:8;-webkit-flex:8;flex:8};--layout-flex-9:{-ms-flex:9;-webkit-flex:9;flex:9};--layout-flex-10:{-ms-flex:10;-webkit-flex:10;flex:10};--layout-flex-11:{-ms-flex:11;-webkit-flex:11;flex:11};--layout-flex-12:{-ms-flex:12;-webkit-flex:12;flex:12};--layout-start:{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start};--layout-center:{-ms-flex-align:center;-webkit-align-items:center;align-items:center};--layout-end:{-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end};--layout-baseline:{-ms-flex-align:baseline;-webkit-align-items:baseline;align-items:baseline};--layout-start-justified:{-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start};--layout-center-justified:{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center};--layout-end-justified:{-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end};--layout-around-justified:{-ms-flex-pack:distribute;-webkit-justify-content:space-around;justify-content:space-around};--layout-justified:{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between};--layout-center-center:{@apply(--layout-center);@apply(--layout-center-justified)};--layout-self-start:{-ms-align-self:flex-start;-webkit-align-self:flex-start;align-self:flex-start};--layout-self-center:{-ms-align-self:center;-webkit-align-self:center;align-self:center};--layout-self-end:{-ms-align-self:flex-end;-webkit-align-self:flex-end;align-self:flex-end};--layout-self-stretch:{-ms-align-self:stretch;-webkit-align-self:stretch;align-self:stretch};--layout-self-baseline:{-ms-align-self:baseline;-webkit-align-self:baseline;align-self:baseline};--layout-start-aligned:{-ms-flex-line-pack:start;-ms-align-content:flex-start;-webkit-align-content:flex-start;align-content:flex-start};--layout-end-aligned:{-ms-flex-line-pack:end;-ms-align-content:flex-end;-webkit-align-content:flex-end;align-content:flex-end};--layout-center-aligned:{-ms-flex-line-pack:center;-ms-align-content:center;-webkit-align-content:center;align-content:center};--layout-between-aligned:{-ms-flex-line-pack:justify;-ms-align-content:space-between;-webkit-align-content:space-between;align-content:space-between};--layout-around-aligned:{-ms-flex-line-pack:distribute;-ms-align-content:space-around;-webkit-align-content:space-around;align-content:space-around};--layout-block:{display:block};--layout-invisible:{visibility:hidden!important};--layout-relative:{position:relative};--layout-fit:{position:absolute;top:0;right:0;bottom:0;left:0};--layout-scroll:{-webkit-overflow-scrolling:touch;overflow:auto};--layout-fullbleed:{margin:0;height:100vh};--layout-fixed-top:{position:fixed;top:0;left:0;right:0};--layout-fixed-right:{position:fixed;top:0;right:0;bottom:0};--layout-fixed-bottom:{position:fixed;right:0;bottom:0;left:0};--layout-fixed-left:{position:fixed;top:0;bottom:0;left:0};}</style><script>Polymer.PaperSpinnerBehavior={listeners:{animationend:"__reset",webkitAnimationEnd:"__reset"},properties:{active:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__activeChanged"},alt:{type:String,value:"loading",observer:"__altChanged"},__coolingDown:{type:Boolean,value:!1}},__computeContainerClasses:function(e,t){return[e||t?"active":"",t?"cooldown":""].join(" ")},__activeChanged:function(e,t){this.__setAriaHidden(!e),this.__coolingDown=!e&&t},__altChanged:function(e){e===this.getPropertyInfo("alt").value?this.alt=this.getAttribute("aria-label")||e:(this.__setAriaHidden(""===e),this.setAttribute("aria-label",e))},__setAriaHidden:function(e){var t="aria-hidden";e?this.setAttribute(t,"true"):this.removeAttribute(t)},__reset:function(){this.active=!1,this.__coolingDown=!1}}</script><dom-module id="paper-spinner-styles" assetpath="../bower_components/paper-spinner/"><template><style>:host{display:inline-block;position:relative;width:28px;height:28px;--paper-spinner-container-rotation-duration:1568ms;--paper-spinner-expand-contract-duration:1333ms;--paper-spinner-full-cycle-duration:5332ms;--paper-spinner-cooldown-duration:400ms}#spinnerContainer{width:100%;height:100%;direction:ltr}#spinnerContainer.active{-webkit-animation:container-rotate var(--paper-spinner-container-rotation-duration) linear infinite;animation:container-rotate var(--paper-spinner-container-rotation-duration) linear infinite}@-webkit-keyframes container-rotate{to{-webkit-transform:rotate(360deg)}}@keyframes container-rotate{to{transform:rotate(360deg)}}.spinner-layer{position:absolute;width:100%;height:100%;opacity:0;white-space:nowrap;border-color:var(--paper-spinner-color,--google-blue-500)}.layer-1{border-color:var(--paper-spinner-layer-1-color,--google-blue-500)}.layer-2{border-color:var(--paper-spinner-layer-2-color,--google-red-500)}.layer-3{border-color:var(--paper-spinner-layer-3-color,--google-yellow-500)}.layer-4{border-color:var(--paper-spinner-layer-4-color,--google-green-500)}.active .spinner-layer{-webkit-animation-name:fill-unfill-rotate;-webkit-animation-duration:var(--paper-spinner-full-cycle-duration);-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-iteration-count:infinite;animation-name:fill-unfill-rotate;animation-duration:var(--paper-spinner-full-cycle-duration);animation-timing-function:cubic-bezier(.4,0,.2,1);animation-iteration-count:infinite;opacity:1}.active .spinner-layer.layer-1{-webkit-animation-name:fill-unfill-rotate,layer-1-fade-in-out;animation-name:fill-unfill-rotate,layer-1-fade-in-out}.active .spinner-layer.layer-2{-webkit-animation-name:fill-unfill-rotate,layer-2-fade-in-out;animation-name:fill-unfill-rotate,layer-2-fade-in-out}.active .spinner-layer.layer-3{-webkit-animation-name:fill-unfill-rotate,layer-3-fade-in-out;animation-name:fill-unfill-rotate,layer-3-fade-in-out}.active .spinner-layer.layer-4{-webkit-animation-name:fill-unfill-rotate,layer-4-fade-in-out;animation-name:fill-unfill-rotate,layer-4-fade-in-out}@-webkit-keyframes fill-unfill-rotate{12.5%{-webkit-transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg)}to{-webkit-transform:rotate(1080deg)}}@keyframes fill-unfill-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}to{transform:rotate(1080deg)}}@-webkit-keyframes layer-1-fade-in-out{0%{opacity:1}25%{opacity:1}26%{opacity:0}89%{opacity:0}90%{opacity:1}to{opacity:1}}@keyframes layer-1-fade-in-out{0%{opacity:1}25%{opacity:1}26%{opacity:0}89%{opacity:0}90%{opacity:1}to{opacity:1}}@-webkit-keyframes layer-2-fade-in-out{0%{opacity:0}15%{opacity:0}25%{opacity:1}50%{opacity:1}51%{opacity:0}to{opacity:0}}@keyframes layer-2-fade-in-out{0%{opacity:0}15%{opacity:0}25%{opacity:1}50%{opacity:1}51%{opacity:0}to{opacity:0}}@-webkit-keyframes layer-3-fade-in-out{0%{opacity:0}40%{opacity:0}50%{opacity:1}75%{opacity:1}76%{opacity:0}to{opacity:0}}@keyframes layer-3-fade-in-out{0%{opacity:0}40%{opacity:0}50%{opacity:1}75%{opacity:1}76%{opacity:0}to{opacity:0}}@-webkit-keyframes layer-4-fade-in-out{0%{opacity:0}65%{opacity:0}75%{opacity:1}90%{opacity:1}to{opacity:0}}@keyframes layer-4-fade-in-out{0%{opacity:0}65%{opacity:0}75%{opacity:1}90%{opacity:1}to{opacity:0}}.circle-clipper{display:inline-block;position:relative;width:50%;height:100%;overflow:hidden;border-color:inherit}.spinner-layer::after{left:45%;width:10%;border-top-style:solid}.circle-clipper::after,.spinner-layer::after{content:'';box-sizing:border-box;position:absolute;top:0;border-width:var(--paper-spinner-stroke-width,3px);border-color:inherit;border-radius:50%}.circle-clipper::after{bottom:0;width:200%;border-style:solid;border-bottom-color:transparent!important}.circle-clipper.left::after{left:0;border-right-color:transparent!important;-webkit-transform:rotate(129deg);transform:rotate(129deg)}.circle-clipper.right::after{left:-100%;border-left-color:transparent!important;-webkit-transform:rotate(-129deg);transform:rotate(-129deg)}.active .circle-clipper::after,.active .gap-patch::after{-webkit-animation-duration:var(--paper-spinner-expand-contract-duration);-webkit-animation-timing-function:cubic-bezier(.4,0,.2,1);-webkit-animation-iteration-count:infinite;animation-duration:var(--paper-spinner-expand-contract-duration);animation-timing-function:cubic-bezier(.4,0,.2,1);animation-iteration-count:infinite}.active .circle-clipper.left::after{-webkit-animation-name:left-spin;animation-name:left-spin}.active .circle-clipper.right::after{-webkit-animation-name:right-spin;animation-name:right-spin}@-webkit-keyframes left-spin{0%{-webkit-transform:rotate(130deg)}50%{-webkit-transform:rotate(-5deg)}to{-webkit-transform:rotate(130deg)}}@keyframes left-spin{0%{transform:rotate(130deg)}50%{transform:rotate(-5deg)}to{transform:rotate(130deg)}}@-webkit-keyframes right-spin{0%{-webkit-transform:rotate(-130deg)}50%{-webkit-transform:rotate(5deg)}to{-webkit-transform:rotate(-130deg)}}@keyframes right-spin{0%{transform:rotate(-130deg)}50%{transform:rotate(5deg)}to{transform:rotate(-130deg)}}#spinnerContainer.cooldown{-webkit-animation:container-rotate var(--paper-spinner-container-rotation-duration) linear infinite,fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(.4,0,.2,1);animation:container-rotate var(--paper-spinner-container-rotation-duration) linear infinite,fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(.4,0,.2,1)}@-webkit-keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}</style></template></dom-module><dom-module id="paper-spinner" assetpath="../bower_components/paper-spinner/"><template strip-whitespace=""><style include="paper-spinner-styles"></style><div id="spinnerContainer" class-name="[[__computeContainerClasses(active, __coolingDown)]]"><div class="spinner-layer layer-1"><div class="circle-clipper left"></div><div class="circle-clipper right"></div></div><div class="spinner-layer layer-2"><div class="circle-clipper left"></div><div class="circle-clipper right"></div></div><div class="spinner-layer layer-3"><div class="circle-clipper left"></div><div class="circle-clipper right"></div></div><div class="spinner-layer layer-4"><div class="circle-clipper left"></div><div class="circle-clipper right"></div></div></div></template><script>Polymer({is:"paper-spinner",behaviors:[Polymer.PaperSpinnerBehavior]})</script></dom-module><style>@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-Thin.ttf) format("truetype");font-weight:100;font-style:normal}@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-ThinItalic.ttf) format("truetype");font-weight:100;font-style:italic}@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-Light.ttf) format("truetype");font-weight:300;font-style:normal}@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-LightItalic.ttf) format("truetype");font-weight:300;font-style:italic}@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-Italic.ttf) format("truetype");font-weight:400;font-style:italic}@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-Medium.ttf) format("truetype");font-weight:500;font-style:normal}@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-MediumItalic.ttf) format("truetype");font-weight:500;font-style:italic}@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-Bold.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-BoldItalic.ttf) format("truetype");font-weight:700;font-style:italic}@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-Black.ttf) format("truetype");font-weight:900;font-style:normal}@font-face{font-family:Roboto;src:url(/static/fonts/roboto/Roboto-BlackItalic.ttf) format("truetype");font-weight:900;font-style:italic}@font-face{font-family:"Roboto Mono";src:url(/static/fonts/robotomono/RobotoMono-Thin.ttf) format("truetype");font-weight:100;font-style:normal}@font-face{font-family:"Roboto Mono";src:url(/static/fonts/robotomono/RobotoMono-ThinItalic.ttf) format("truetype");font-weight:100;font-style:italic}@font-face{font-family:"Roboto Mono";src:url(/static/fonts/robotomono/RobotoMono-Light.ttf) format("truetype");font-weight:300;font-style:normal}@font-face{font-family:"Roboto Mono";src:url(/static/fonts/robotomono/RobotoMono-LightItalic.ttf) format("truetype");font-weight:300;font-style:italic}@font-face{font-family:"Roboto Mono";src:url(/static/fonts/robotomono/RobotoMono-Regular.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:"Roboto Mono";src:url(/static/fonts/robotomono/RobotoMono-Italic.ttf) format("truetype");font-weight:400;font-style:italic}@font-face{font-family:"Roboto Mono";src:url(/static/fonts/robotomono/RobotoMono-Medium.ttf) format("truetype");font-weight:500;font-style:normal}@font-face{font-family:"Roboto Mono";src:url(/static/fonts/robotomono/RobotoMono-MediumItalic.ttf) format("truetype");font-weight:500;font-style:italic}@font-face{font-family:"Roboto Mono";src:url(/static/fonts/robotomono/RobotoMono-Bold.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:"Roboto Mono";src:url(/static/fonts/robotomono/RobotoMono-BoldItalic.ttf) format("truetype");font-weight:700;font-style:italic}</style><style is="custom-style">:root{--paper-font-common-base:{font-family:Roboto,Noto,sans-serif;-webkit-font-smoothing:antialiased};--paper-font-common-code:{font-family:'Roboto Mono',Consolas,Menlo,monospace;-webkit-font-smoothing:antialiased};--paper-font-common-expensive-kerning:{text-rendering:optimizeLegibility};--paper-font-common-nowrap:{white-space:nowrap;overflow:hidden;text-overflow:ellipsis};--paper-font-display4:{@apply(--paper-font-common-base);@apply(--paper-font-common-nowrap);font-size:112px;font-weight:300;letter-spacing:-.044em;line-height:120px};--paper-font-display3:{@apply(--paper-font-common-base);@apply(--paper-font-common-nowrap);font-size:56px;font-weight:400;letter-spacing:-.026em;line-height:60px};--paper-font-display2:{@apply(--paper-font-common-base);font-size:45px;font-weight:400;letter-spacing:-.018em;line-height:48px};--paper-font-display1:{@apply(--paper-font-common-base);font-size:34px;font-weight:400;letter-spacing:-.01em;line-height:40px};--paper-font-headline:{@apply(--paper-font-common-base);font-size:24px;font-weight:400;letter-spacing:-.012em;line-height:32px};--paper-font-title:{@apply(--paper-font-common-base);@apply(--paper-font-common-nowrap);font-size:20px;font-weight:500;line-height:28px};--paper-font-subhead:{@apply(--paper-font-common-base);font-size:16px;font-weight:400;line-height:24px};--paper-font-body2:{@apply(--paper-font-common-base);font-size:14px;font-weight:500;line-height:24px};--paper-font-body1:{@apply(--paper-font-common-base);font-size:14px;font-weight:400;line-height:20px};--paper-font-caption:{@apply(--paper-font-common-base);@apply(--paper-font-common-nowrap);font-size:12px;font-weight:400;letter-spacing:0.011em;line-height:20px};--paper-font-menu:{@apply(--paper-font-common-base);@apply(--paper-font-common-nowrap);font-size:13px;font-weight:500;line-height:24px};--paper-font-button:{@apply(--paper-font-common-base);@apply(--paper-font-common-nowrap);font-size:14px;font-weight:500;letter-spacing:0.018em;line-height:24px;text-transform:uppercase};--paper-font-code2:{@apply(--paper-font-common-code);font-size:14px;font-weight:700;line-height:20px};--paper-font-code1:{@apply(--paper-font-common-code);font-size:14px;font-weight:500;line-height:20px};}</style><dom-module id="iron-flex" assetpath="../bower_components/iron-flex-layout/"><template><style>.layout.horizontal,.layout.vertical{display:-ms-flexbox;display:-webkit-flex;display:flex}.layout.inline{display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex}.layout.horizontal{-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row}.layout.vertical{-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.layout.wrap{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.layout.center,.layout.center-center{-ms-flex-align:center;-webkit-align-items:center;align-items:center}.layout.center-center,.layout.center-justified{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.flex{-ms-flex:1 1 0px;-webkit-flex:1;flex:1;-webkit-flex-basis:0px;flex-basis:0px}.flex-auto{-ms-flex:1 1 auto;-webkit-flex:1 1 auto;flex:1 1 auto}.flex-none{-ms-flex:none;-webkit-flex:none;flex:none}</style></template></dom-module><dom-module id="iron-flex-reverse" assetpath="../bower_components/iron-flex-layout/"><template><style>.layout.horizontal-reverse,.layout.vertical-reverse{display:-ms-flexbox;display:-webkit-flex;display:flex}.layout.horizontal-reverse{-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.layout.vertical-reverse{-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse}.layout.wrap-reverse{-ms-flex-wrap:wrap-reverse;-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse}</style></template></dom-module><dom-module id="iron-flex-alignment" assetpath="../bower_components/iron-flex-layout/"><template><style>.layout.start{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.layout.center,.layout.center-center{-ms-flex-align:center;-webkit-align-items:center;align-items:center}.layout.end{-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}.layout.baseline{-ms-flex-align:baseline;-webkit-align-items:baseline;align-items:baseline}.layout.start-justified{-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.layout.center-center,.layout.center-justified{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.layout.end-justified{-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.layout.around-justified{-ms-flex-pack:distribute;-webkit-justify-content:space-around;justify-content:space-around}.layout.justified{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.self-start{-ms-align-self:flex-start;-webkit-align-self:flex-start;align-self:flex-start}.self-center{-ms-align-self:center;-webkit-align-self:center;align-self:center}.self-end{-ms-align-self:flex-end;-webkit-align-self:flex-end;align-self:flex-end}.self-stretch{-ms-align-self:stretch;-webkit-align-self:stretch;align-self:stretch}.self-baseline{-ms-align-self:baseline;-webkit-align-self:baseline;align-self:baseline}; .layout.start-aligned{-ms-flex-line-pack:start;-ms-align-content:flex-start;-webkit-align-content:flex-start;align-content:flex-start}.layout.end-aligned{-ms-flex-line-pack:end;-ms-align-content:flex-end;-webkit-align-content:flex-end;align-content:flex-end}.layout.center-aligned{-ms-flex-line-pack:center;-ms-align-content:center;-webkit-align-content:center;align-content:center}.layout.between-aligned{-ms-flex-line-pack:justify;-ms-align-content:space-between;-webkit-align-content:space-between;align-content:space-between}.layout.around-aligned{-ms-flex-line-pack:distribute;-ms-align-content:space-around;-webkit-align-content:space-around;align-content:space-around}</style></template></dom-module><dom-module id="iron-flex-factors" assetpath="../bower_components/iron-flex-layout/"><template><style>.flex,.flex-1{-ms-flex:1 1 0px;-webkit-flex:1;flex:1;-webkit-flex-basis:0px;flex-basis:0px}.flex-2{-ms-flex:2;-webkit-flex:2;flex:2}.flex-3{-ms-flex:3;-webkit-flex:3;flex:3}.flex-4{-ms-flex:4;-webkit-flex:4;flex:4}.flex-5{-ms-flex:5;-webkit-flex:5;flex:5}.flex-6{-ms-flex:6;-webkit-flex:6;flex:6}.flex-7{-ms-flex:7;-webkit-flex:7;flex:7}.flex-8{-ms-flex:8;-webkit-flex:8;flex:8}.flex-9{-ms-flex:9;-webkit-flex:9;flex:9}.flex-10{-ms-flex:10;-webkit-flex:10;flex:10}.flex-11{-ms-flex:11;-webkit-flex:11;flex:11}.flex-12{-ms-flex:12;-webkit-flex:12;flex:12}</style></template></dom-module><dom-module id="iron-positioning" assetpath="../bower_components/iron-flex-layout/"><template><style>.block{display:block}[hidden]{display:none!important}.invisible{visibility:hidden!important}.relative{position:relative}.fit{position:absolute;top:0;right:0;bottom:0;left:0}body.fullbleed{margin:0;height:100vh}.scroll{-webkit-overflow-scrolling:touch;overflow:auto}.fixed-bottom,.fixed-left,.fixed-right,.fixed-top{position:fixed}.fixed-top{top:0;left:0;right:0}.fixed-right{top:0;right:0;bottom:0}.fixed-bottom{right:0;bottom:0;left:0}.fixed-left{top:0;bottom:0;left:0}</style></template></dom-module><script>!function(n){"use strict";function t(n,t){for(var e=[],r=0,u=n.length;r<u;r++)e.push(n[r].substr(0,t));return e}function e(n){return function(t,e,r){var u=r[n].indexOf(e.charAt(0).toUpperCase()+e.substr(1).toLowerCase());~u&&(t.month=u)}}function r(n,t){for(n=String(n),t=t||2;n.length<t;)n="0"+n;return n}var u={},o=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,a=/\d\d?/,i=/\d{3}/,s=/\d{4}/,m=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,d=function(){},f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"],h=t(c,3),l=t(f,3);u.i18n={dayNamesShort:l,dayNames:f,monthNamesShort:h,monthNames:c,amPm:["am","pm"],DoFn:function(n){return n+["th","st","nd","rd"][n%10>3?0:(n-n%10!==10)*n%10]}};var M={D:function(n){return n.getDate()},DD:function(n){return r(n.getDate())},Do:function(n,t){return t.DoFn(n.getDate())},d:function(n){return n.getDay()},dd:function(n){return r(n.getDay())},ddd:function(n,t){return t.dayNamesShort[n.getDay()]},dddd:function(n,t){return t.dayNames[n.getDay()]},M:function(n){return n.getMonth()+1},MM:function(n){return r(n.getMonth()+1)},MMM:function(n,t){return t.monthNamesShort[n.getMonth()]},MMMM:function(n,t){return t.monthNames[n.getMonth()]},YY:function(n){return String(n.getFullYear()).substr(2)},YYYY:function(n){return n.getFullYear()},h:function(n){return n.getHours()%12||12},hh:function(n){return r(n.getHours()%12||12)},H:function(n){return n.getHours()},HH:function(n){return r(n.getHours())},m:function(n){return n.getMinutes()},mm:function(n){return r(n.getMinutes())},s:function(n){return n.getSeconds()},ss:function(n){return r(n.getSeconds())},S:function(n){return Math.round(n.getMilliseconds()/100)},SS:function(n){return r(Math.round(n.getMilliseconds()/10),2)},SSS:function(n){return r(n.getMilliseconds(),3)},a:function(n,t){return n.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(n,t){return n.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(n){var t=n.getTimezoneOffset();return(t>0?"-":"+")+r(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)}},g={D:[a,function(n,t){n.day=t}],Do:[new RegExp(a.source+m.source),function(n,t){n.day=parseInt(t,10)}],M:[a,function(n,t){n.month=t-1}],YY:[a,function(n,t){var e=new Date,r=+(""+e.getFullYear()).substr(0,2);n.year=""+(t>68?r-1:r)+t}],h:[a,function(n,t){n.hour=t}],m:[a,function(n,t){n.minute=t}],s:[a,function(n,t){n.second=t}],YYYY:[s,function(n,t){n.year=t}],S:[/\d/,function(n,t){n.millisecond=100*t}],SS:[/\d{2}/,function(n,t){n.millisecond=10*t}],SSS:[i,function(n,t){n.millisecond=t}],d:[a,d],ddd:[m,d],MMM:[m,e("monthNamesShort")],MMMM:[m,e("monthNames")],a:[m,function(n,t,e){var r=t.toLowerCase();r===e.amPm[0]?n.isPm=!1:r===e.amPm[1]&&(n.isPm=!0)}],ZZ:[/[\+\-]\d\d:?\d\d/,function(n,t){var e,r=(t+"").match(/([\+\-]|\d\d)/gi);r&&(e=+(60*r[1])+parseInt(r[2],10),n.timezoneOffset="+"===r[0]?e:-e)}]};g.dd=g.d,g.dddd=g.ddd,g.DD=g.D,g.mm=g.m,g.hh=g.H=g.HH=g.h,g.MM=g.M,g.ss=g.s,g.A=g.a,u.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},u.format=function(n,t,e){var r=e||u.i18n;if("number"==typeof n&&(n=new Date(n)),"[object Date]"!==Object.prototype.toString.call(n)||isNaN(n.getTime()))throw new Error("Invalid Date in fecha.format");return t=u.masks[t]||t||u.masks.default,t.replace(o,function(t){return t in M?M[t](n,r):t.slice(1,t.length-1)})},u.parse=function(n,t,e){var r=e||u.i18n;if("string"!=typeof t)throw new Error("Invalid format in fecha.parse");if(t=u.masks[t]||t,n.length>1e3)return!1;var a=!0,i={};if(t.replace(o,function(t){if(g[t]){var e=g[t],u=n.search(e[0]);~u?n.replace(e[0],function(t){return e[1](i,t,r),n=n.substr(u+t.length),t}):a=!1}return g[t]?"":t.slice(1,t.length-1)}),!a)return!1;var s=new Date;i.isPm===!0&&null!=i.hour&&12!==+i.hour?i.hour=+i.hour+12:i.isPm===!1&&12===+i.hour&&(i.hour=0);var m;return null!=i.timezoneOffset?(i.minute=+(i.minute||0)-+i.timezoneOffset,m=new Date(Date.UTC(i.year||s.getFullYear(),i.month||0,i.day||1,i.hour||0,i.minute||0,i.second||0,i.millisecond||0))):m=new Date(i.year||s.getFullYear(),i.month||0,i.day||1,i.hour||0,i.minute||0,i.second||0,i.millisecond||0),m},"undefined"!=typeof module&&module.exports?module.exports=u:"function"==typeof define&&define.amd?define(function(){return u}):n.fecha=u}(this)</script><script>function toLocaleStringSupportsOptions(){try{(new Date).toLocaleString("i")}catch(e){return"RangeError"===e.name}return!1}function toLocaleDateStringSupportsOptions(){try{(new Date).toLocaleDateString("i")}catch(e){return"RangeError"===e.name}return!1}function toLocaleTimeStringSupportsOptions(){try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}return!1}window.hassUtil=window.hassUtil||{},window.hassUtil.DEFAULT_ICON="mdi:bookmark",window.hassUtil.OFF_STATES=["off","closed","unlocked"],window.hassUtil.DOMAINS_WITH_CARD=["climate","cover","configurator","input_select","input_slider","media_player","scene","script","weblink"],window.hassUtil.DOMAINS_WITH_MORE_INFO=["alarm_control_panel","automation","camera","climate","configurator","cover","fan","group","light","lock","media_player","script","sun","updater"],window.hassUtil.DOMAINS_WITH_NO_HISTORY=["camera","configurator","scene"],window.hassUtil.HIDE_MORE_INFO=["input_select","scene","script","input_slider"],window.hassUtil.LANGUAGE=navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage,window.hassUtil.attributeClassNames=function(e,t){return e?t.map(function(t){return t in e.attributes?"has-"+t:""}).join(" "):""},window.hassUtil.canToggle=function(e,t){return e.reactor.evaluate(e.serviceGetters.canToggleEntity(t))},window.hassUtil.dynamicContentUpdater=function(e,t,i){var n,r=Polymer.dom(e);r.lastChild&&r.lastChild.tagName===t?n=r.lastChild:(r.lastChild&&r.removeChild(r.lastChild),n=document.createElement(t)),Object.keys(i).forEach(function(e){n[e]=i[e]}),null===n.parentNode&&r.appendChild(n)},window.fecha.masks.haDateTime=window.fecha.masks.shortTime+" "+window.fecha.masks.mediumDate,toLocaleStringSupportsOptions()?window.hassUtil.formatDateTime=function(e){return e.toLocaleString(window.hassUtil.LANGUAGE,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}:window.hassUtil.formatDateTime=function(e){return window.fecha.format(e,"haDateTime")},toLocaleDateStringSupportsOptions()?window.hassUtil.formatDate=function(e){return e.toLocaleDateString(window.hassUtil.LANGUAGE,{year:"numeric",month:"long",day:"numeric"})}:window.hassUtil.formatDate=function(e){return window.fecha.format(e,"mediumDate")},toLocaleTimeStringSupportsOptions()?window.hassUtil.formatTime=function(e){return e.toLocaleTimeString(window.hassUtil.LANGUAGE,{hour:"numeric",minute:"2-digit"})}:window.hassUtil.formatTime=function(e){return window.fecha.format(e,"shortTime")},window.hassUtil.relativeTime=function(e){var t,i=Math.abs(new Date-e)/1e3,n=new Date>e?"%s ago":"in %s",r=window.hassUtil.relativeTime.tests;for(t=0;t<r.length;t+=2){if(i<r[t])return i=Math.floor(i),n.replace("%s",1===i?"1 "+r[t+1]:i+" "+r[t+1]+"s");i/=r[t]}return i=Math.floor(i),n.replace("%s",1===i?"1 week":i+" weeks")},window.hassUtil.relativeTime.tests=[60,"second",60,"minute",24,"hour",7,"day"],window.hassUtil.stateCardType=function(e,t){return"unavailable"===t.state?"display":window.hassUtil.DOMAINS_WITH_CARD.indexOf(t.domain)!==-1?t.domain:window.hassUtil.canToggle(e,t.entityId)&&"hidden"!==t.attributes.control?"toggle":"display"},window.hassUtil.stateMoreInfoType=function(e){return window.hassUtil.DOMAINS_WITH_MORE_INFO.indexOf(e.domain)!==-1?e.domain:window.hassUtil.HIDE_MORE_INFO.indexOf(e.domain)!==-1?"hidden":"default"},window.hassUtil.domainIcon=function(e,t){switch(e){case"alarm_control_panel":return t&&"disarmed"===t?"mdi:bell-outline":"mdi:bell";case"automation":return"mdi:playlist-play";case"binary_sensor":return t&&"off"===t?"mdi:radiobox-blank":"mdi:checkbox-marked-circle";case"camera":return"mdi:video";case"climate":return"mdi:nest-thermostat";case"configurator":return"mdi:settings";case"conversation":return"mdi:text-to-speech";case"cover":return t&&"open"===t?"mdi:window-open":"mdi:window-closed";case"device_tracker":return"mdi:account";case"fan":return"mdi:fan";case"group":return"mdi:google-circles-communities";case"homeassistant":return"mdi:home";case"input_boolean":return"mdi:drawing";case"input_select":return"mdi:format-list-bulleted";case"input_slider":return"mdi:ray-vertex";case"light":return"mdi:lightbulb";case"lock":return t&&"unlocked"===t?"mdi:lock-open":"mdi:lock";case"media_player":return t&&"off"!==t&&"idle"!==t?"mdi:cast-connected":"mdi:cast";case"notify":return"mdi:comment-alert";case"proximity":return"mdi:apple-safari";case"remote":return"mdi:remote";case"scene":return"mdi:google-pages";case"script":return"mdi:file-document";case"sensor":return"mdi:eye";case"simple_alarm":return"mdi:bell";case"sun":return"mdi:white-balance-sunny";case"switch":return"mdi:flash";case"updater":return"mdi:cloud-upload";case"weblink":return"mdi:open-in-new";default:return console.warn("Unable to find icon for domain "+e+" ("+t+")"),window.hassUtil.DEFAULT_ICON}},window.hassUtil.binarySensorIcon=function(e){var t=e.state&&"off"===e.state;switch(e.attributes.sensor_class){case"connectivity":return t?"mdi:server-network-off":"mdi:server-network";case"light":return t?"mdi:brightness-5":"mdi:brightness-7";case"moisture":return t?"mdi:water-off":"mdi:water";case"motion":return t?"mdi:walk":"mdi:run";case"occupancy":return t?"mdi:home":"mdi:home-outline";case"opening":return t?"mdi:crop-square":"mdi:exit-to-app";case"sound":return t?"mdi:music-note-off":"mdi:music-note";case"vibration":return t?"mdi:crop-portrait":"mdi:vibrate";case"gas":case"power":case"safety":case"smoke":return t?"mdi:verified":"mdi:alert";default:return t?"mdi:radiobox-blank":"mdi:checkbox-marked-circle"}},window.hassUtil.stateIcon=function(e){var t;if(!e)return window.hassUtil.DEFAULT_ICON;if(e.attributes.icon)return e.attributes.icon;if(t=e.attributes.unit_of_measurement,t&&"sensor"===e.domain){if("°C"===t||"°F"===t)return"mdi:thermometer";if("Mice"===t)return"mdi:mouse-variant"}else if("binary_sensor"===e.domain)return window.hassUtil.binarySensorIcon(e);return window.hassUtil.domainIcon(e.domain,e.state)},window.hassUtil.computeDisplayAttributes=function(e,t){return e?Object.keys(e.attributes).filter(function(e){return t.indexOf(e)===-1}):[]},window.hassUtil.formatAttribute=function(e){return e.replace(/_/g," ")},window.hassUtil.formatAttributeValue=function(e,t){var i=e.attributes[t];return Array.isArray(i)?i.join(", "):i},window.hassUtil.computeAttribution=function(e){return e.attributes.attribution}</script><script>window.hassBehavior={attached:function(){var e=this.hass;if(!e)throw new Error("No hass property found on "+this.nodeName);this.nuclearUnwatchFns=Object.keys(this.properties).reduce(function(t,r){var n;if(!("bindNuclear"in this.properties[r]))return t;if(n=this.properties[r].bindNuclear(e),!n)throw new Error("Undefined getter specified for key "+r+" on "+this.nodeName);return this[r]=e.reactor.evaluate(n),t.concat(e.reactor.observe(n,function(e){this[r]=e}.bind(this)))}.bind(this),[])},detached:function(){for(;this.nuclearUnwatchFns.length;)this.nuclearUnwatchFns.shift()()}}</script><style is="custom-style">:root{--primary-text-color:var(--light-theme-text-color);--primary-background-color:var(--light-theme-background-color);--secondary-text-color:var(--light-theme-secondary-color);--disabled-text-color:var(--light-theme-disabled-color);--divider-color:var(--light-theme-divider-color);--error-color:var(--paper-deep-orange-a700);--primary-color:var(--paper-indigo-500);--light-primary-color:var(--paper-indigo-100);--dark-primary-color:var(--paper-indigo-700);--accent-color:var(--paper-pink-a200);--light-accent-color:var(--paper-pink-a100);--dark-accent-color:var(--paper-pink-a400);--light-theme-background-color:#ffffff;--light-theme-base-color:#000000;--light-theme-text-color:var(--paper-grey-900);--light-theme-secondary-color:#737373;--light-theme-disabled-color:#9b9b9b;--light-theme-divider-color:#dbdbdb;--dark-theme-background-color:var(--paper-grey-900);--dark-theme-base-color:#ffffff;--dark-theme-text-color:#ffffff;--dark-theme-secondary-color:#bcbcbc;--dark-theme-disabled-color:#646464;--dark-theme-divider-color:#3c3c3c;--text-primary-color:var(--dark-theme-text-color);--default-primary-color:var(--primary-color)}</style><script>!function(){var e={},t={},i=null;Polymer.IronMeta=Polymer({is:"iron-meta",properties:{type:{type:String,value:"default",observer:"_typeChanged"},key:{type:String,observer:"_keyChanged"},value:{type:Object,notify:!0,observer:"_valueChanged"},self:{type:Boolean,observer:"_selfChanged"},list:{type:Array,notify:!0}},hostAttributes:{hidden:!0},factoryImpl:function(e){if(e)for(var t in e)switch(t){case"type":case"key":case"value":this[t]=e[t]}},created:function(){this._metaDatas=e,this._metaArrays=t},_keyChanged:function(e,t){this._resetRegistration(t)},_valueChanged:function(e){this._resetRegistration(this.key)},_selfChanged:function(e){e&&(this.value=this)},_typeChanged:function(i){this._unregisterKey(this.key),e[i]||(e[i]={}),this._metaData=e[i],t[i]||(t[i]=[]),this.list=t[i],this._registerKeyValue(this.key,this.value)},byKey:function(e){return this._metaData&&this._metaData[e]},_resetRegistration:function(e){this._unregisterKey(e),this._registerKeyValue(this.key,this.value)},_unregisterKey:function(e){this._unregister(e,this._metaData,this.list)},_registerKeyValue:function(e,t){this._register(e,t,this._metaData,this.list)},_register:function(e,t,i,a){e&&i&&void 0!==t&&(i[e]=t,a.push(t))},_unregister:function(e,t,i){if(e&&t&&e in t){var a=t[e];delete t[e],this.arrayDelete(i,a)}}}),Polymer.IronMeta.getIronMeta=function(){return null===i&&(i=new Polymer.IronMeta),i},Polymer.IronMetaQuery=Polymer({is:"iron-meta-query",properties:{type:{type:String,value:"default",observer:"_typeChanged"},key:{type:String,observer:"_keyChanged"},value:{type:Object,notify:!0,readOnly:!0},list:{type:Array,notify:!0}},factoryImpl:function(e){if(e)for(var t in e)switch(t){case"type":case"key":this[t]=e[t]}},created:function(){this._metaDatas=e,this._metaArrays=t},_keyChanged:function(e){this._setValue(this._metaData&&this._metaData[e])},_typeChanged:function(i){this._metaData=e[i],this.list=t[i],this.key&&this._keyChanged(this.key)},byKey:function(e){return this._metaData&&this._metaData[e]}})}()</script><script>Polymer.IronValidatableBehaviorMeta=null,Polymer.IronValidatableBehavior={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1},_validatorMeta:{type:Object},validatorType:{type:String,value:"validator"},_validator:{type:Object,computed:"__computeValidator(validator)"}},observers:["_invalidChanged(invalid)"],registered:function(){Polymer.IronValidatableBehaviorMeta=new Polymer.IronMeta({type:"validator"})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},hasValidator:function(){return null!=this._validator},validate:function(a){return this.invalid=!this._getValidity(a),!this.invalid},_getValidity:function(a){return!this.hasValidator()||this._validator.validate(a)},__computeValidator:function(){return Polymer.IronValidatableBehaviorMeta&&Polymer.IronValidatableBehaviorMeta.byKey(this.validator)}}</script><script>Polymer.IronFormElementBehavior={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1},_parentForm:{type:Object}},attached:function(){this.fire("iron-form-element-register")},detached:function(){this._parentForm&&this._parentForm.fire("iron-form-element-unregister",{target:this})}}</script><script>Polymer.IronCheckedElementBehaviorImpl={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(e){return this.disabled||!this.required||this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){void 0!==this.value&&null!==this.value||(this.value="on")}},Polymer.IronCheckedElementBehavior=[Polymer.IronFormElementBehavior,Polymer.IronValidatableBehavior,Polymer.IronCheckedElementBehaviorImpl]</script><script>!function(){"use strict";function e(e,t){var n="";if(e){var i=e.toLowerCase();" "===i||v.test(i)?n="space":f.test(i)?n="esc":1==i.length?t&&!u.test(i)||(n=i):n=c.test(i)?i.replace("arrow",""):"multiply"==i?"*":i}return n}function t(e){var t="";return e&&(e in o?t=o[e]:h.test(e)?(e=parseInt(e.replace("U+","0x"),16),t=String.fromCharCode(e).toLowerCase()):t=e.toLowerCase()),t}function n(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):d[e]),t}function i(i,r){return i.key?e(i.key,r):i.detail&&i.detail.key?e(i.detail.key,r):t(i.keyIdentifier)||n(i.keyCode)||""}function r(e,t){var n=i(t,e.hasModifiers);return n===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function s(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce(function(e,t){var n=t.split(":"),i=n[0],r=n[1];return i in y?(e[y[i]]=!0,e.hasModifiers=!0):(e.key=i,e.event=r||"keydown"),e},{combo:e.split(":").shift()})}function a(e){return e.trim().split(" ").map(function(e){return s(e)})}var o={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},d={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:"*"},y={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},u=/[a-z0-9*]/,h=/U\+/,c=/^arrow/,v=/^space(bar)?/,f=/^escape$/;Polymer.IronA11yKeysBehavior={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var n=a(t),i=0;i<n.length;++i)if(r(n[i],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map(function(e){return e.keyBindings});return e.indexOf(this.keyBindings)===-1&&e.push(this.keyBindings),e},_prepKeyBindings:function(){this._keyBindings={},this._collectKeyBindings().forEach(function(e){for(var t in e)this._addKeyBinding(t,e[t])},this);for(var e in this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort(function(e,t){var n=e[0].hasModifiers,i=t[0].hasModifiers;return n===i?0:n?-1:1})},_addKeyBinding:function(e,t){a(e).forEach(function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])},this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach(function(e){var t=this._keyBindings[e],n=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,n]),this.keyEventTarget.addEventListener(e,n)},this)},_unlistenKeyEventListeners:function(){for(var e,t,n,i;this._boundKeyHandlers.length;)e=this._boundKeyHandlers.pop(),t=e[0],n=e[1],i=e[2],t.removeEventListener(n,i)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var n=0;n<e.length;n++){var i=e[n][0],s=e[n][1];if(r(i,t)&&(this._triggerKeyHandler(i,s,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,n){var i=Object.create(e);i.keyboardEvent=n;var r=new CustomEvent(e.event,{detail:i,cancelable:!0});this[t].call(this,r),r.defaultPrevented&&n.preventDefault()}}}()</script><script>Polymer.IronControlState={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:Number},_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(e){if(e.target===this)this._setFocused("focus"===e.type);else if(!this.shadowRoot){var t=Polymer.dom(e).localTarget;this.isLightDescendant(t)||this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})}},_disabledChanged:function(e,t){this.setAttribute("aria-disabled",e?"true":"false"),this.style.pointerEvents=e?"none":"",e?(this._oldTabIndex=this.tabIndex,this._setFocused(!1),this.tabIndex=-1,this.blur()):void 0!==this._oldTabIndex&&(this.tabIndex=this._oldTabIndex)},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}}</script><script>Polymer.IronButtonStateImpl={properties:{pressed:{type:Boolean,readOnly:!0,value:!1,reflectToAttribute:!0,observer:"_pressedChanged"},toggles:{type:Boolean,value:!1,reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},pointerDown:{type:Boolean,readOnly:!0,value:!1},receivedFocusFromKeyboard:{type:Boolean,readOnly:!0},ariaActiveAttribute:{type:String,value:"aria-pressed",observer:"_ariaActiveAttributeChanged"}},listeners:{down:"_downHandler",up:"_upHandler",tap:"_tapHandler"},observers:["_detectKeyboardFocus(focused)","_activeChanged(active, ariaActiveAttribute)"],keyBindings:{"enter:keydown":"_asyncClick","space:keydown":"_spaceKeyDownHandler","space:keyup":"_spaceKeyUpHandler"},_mouseEventRe:/^mouse/,_tapHandler:function(){this.toggles?this._userActivate(!this.active):this.active=!1},_detectKeyboardFocus:function(e){this._setReceivedFocusFromKeyboard(!this.pointerDown&&e)},_userActivate:function(e){this.active!==e&&(this.active=e,this.fire("change"))},_downHandler:function(e){this._setPointerDown(!0),this._setPressed(!0),this._setReceivedFocusFromKeyboard(!1)},_upHandler:function(){this._setPointerDown(!1),this._setPressed(!1)},_spaceKeyDownHandler:function(e){var t=e.detail.keyboardEvent,i=Polymer.dom(t).localTarget;this.isLightDescendant(i)||(t.preventDefault(),t.stopImmediatePropagation(),this._setPressed(!0))},_spaceKeyUpHandler:function(e){var t=e.detail.keyboardEvent,i=Polymer.dom(t).localTarget;this.isLightDescendant(i)||(this.pressed&&this._asyncClick(),this._setPressed(!1))},_asyncClick:function(){this.async(function(){this.click()},1)},_pressedChanged:function(e){this._changedButtonState()},_ariaActiveAttributeChanged:function(e,t){t&&t!=e&&this.hasAttribute(t)&&this.removeAttribute(t)},_activeChanged:function(e,t){this.toggles?this.setAttribute(this.ariaActiveAttribute,e?"true":"false"):this.removeAttribute(this.ariaActiveAttribute),this._changedButtonState()},_controlStateChanged:function(){this.disabled?this._setPressed(!1):this._changedButtonState()},_changedButtonState:function(){this._buttonStateChanged&&this._buttonStateChanged()}},Polymer.IronButtonState=[Polymer.IronA11yKeysBehavior,Polymer.IronButtonStateImpl]</script><dom-module id="paper-ripple" assetpath="../bower_components/paper-ripple/"><template><style>:host{display:block;position:absolute;border-radius:inherit;overflow:hidden;top:0;left:0;right:0;bottom:0;pointer-events:none}:host([animating]){-webkit-transform:translate(0,0);transform:translate3d(0,0,0)}#background,#waves,.wave,.wave-container{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%}#background,.wave{opacity:0}#waves,.wave{overflow:hidden}.wave,.wave-container{border-radius:50%}:host(.circle) #background,:host(.circle) #waves{border-radius:50%}:host(.circle) .wave-container{overflow:hidden}</style><div id="background"></div><div id="waves"></div></template></dom-module><script>!function(){function t(t){this.element=t,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}function i(t){this.element=t,this.color=window.getComputedStyle(t).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),Polymer.dom(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}var e={distance:function(t,i,e,n){var s=t-e,o=i-n;return Math.sqrt(s*s+o*o)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};t.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(t,i){var n=e.distance(t,i,0,0),s=e.distance(t,i,this.width,0),o=e.distance(t,i,0,this.height),a=e.distance(t,i,this.width,this.height);return Math.max(n,s,o,a)}},i.MAX_RADIUS=300,i.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var t;return this.mouseDownStart?(t=e.now()-this.mouseDownStart,this.mouseUpStart&&(t-=this.mouseUpElapsed),t):0},get mouseUpElapsed(){return this.mouseUpStart?e.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var t=this.containerMetrics.width*this.containerMetrics.width,e=this.containerMetrics.height*this.containerMetrics.height,n=1.1*Math.min(Math.sqrt(t+e),i.MAX_RADIUS)+5,s=1.1-.2*(n/i.MAX_RADIUS),o=this.mouseInteractionSeconds/s,a=n*(1-Math.pow(80,-o));return Math.abs(a)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var t=.3*this.mouseUpElapsedSeconds,i=this.opacity;return Math.max(0,Math.min(t,i))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,i.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,i.MAX_RADIUS)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},resetInteractionState:function(){this.maxRadius=0,this.mouseDownStart=0,this.mouseUpStart=0,this.xStart=0,this.yStart=0,this.xEnd=0,this.yEnd=0,this.slideDistance=0,this.containerMetrics=new t(this.element)},draw:function(){var t,i,e;this.wave.style.opacity=this.opacity,t=this.radius/(this.containerMetrics.size/2),i=this.xNow-this.containerMetrics.width/2,e=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+i+"px, "+e+"px)",this.waveContainer.style.transform="translate3d("+i+"px, "+e+"px, 0)",this.wave.style.webkitTransform="scale("+t+","+t+")",this.wave.style.transform="scale3d("+t+","+t+",1)"},downAction:function(t){var i=this.containerMetrics.width/2,n=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=e.now(),this.center?(this.xStart=i,this.yStart=n,this.slideDistance=e.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=t?t.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=t?t.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=i,this.yEnd=n,this.slideDistance=e.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(t){this.isMouseDown&&(this.mouseUpStart=e.now())},remove:function(){Polymer.dom(this.waveContainer.parentNode).removeChild(this.waveContainer)}},Polymer({is:"paper-ripple",behaviors:[Polymer.IronA11yKeysBehavior],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){11==this.parentNode.nodeType?this.keyEventTarget=Polymer.dom(this).getOwnerRoot().host:this.keyEventTarget=this.parentNode;var t=this.keyEventTarget;this.listen(t,"up","uiUpAction"),this.listen(t,"down","uiDownAction")},detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction"),this.unlisten(this.keyEventTarget,"down","uiDownAction"),this.keyEventTarget=null},get shouldKeepAnimating(){for(var t=0;t<this.ripples.length;++t)if(!this.ripples[t].isAnimationComplete)return!0;return!1},simulatedRipple:function(){this.downAction(null),this.async(function(){this.upAction()},1)},uiDownAction:function(t){this.noink||this.downAction(t)},downAction:function(t){if(!(this.holdDown&&this.ripples.length>0)){var i=this.addRipple();i.downAction(t),this._animating||(this._animating=!0,this.animate())}},uiUpAction:function(t){this.noink||this.upAction(t)},upAction:function(t){this.holdDown||(this.ripples.forEach(function(i){i.upAction(t)}),this._animating=!0,this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor=null,this.fire("transitionend")},addRipple:function(){var t=new i(this);return Polymer.dom(this.$.waves).appendChild(t.waveContainer),this.$.background.style.backgroundColor=t.color,this.ripples.push(t),this._setAnimating(!0),t},removeRipple:function(t){var i=this.ripples.indexOf(t);i<0||(this.ripples.splice(i,1),t.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){if(this._animating){var t,i;for(t=0;t<this.ripples.length;++t)i=this.ripples[t],i.draw(),this.$.background.style.opacity=i.outerOpacity,i.isOpacityFullyDecayed&&!i.isRestingAtMaxRadius&&this.removeRipple(i);this.shouldKeepAnimating||0!==this.ripples.length?window.requestAnimationFrame(this._boundAnimate):this.onAnimationComplete()}},_onEnterKeydown:function(){this.uiDownAction(),this.async(this.uiUpAction,1)},_onSpaceKeydown:function(){this.uiDownAction()},_onSpaceKeyup:function(){this.uiUpAction()},_holdDownChanged:function(t,i){void 0!==i&&(t?this.downAction():this.upAction())}})}()</script><script>Polymer.PaperRippleBehavior={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},_downHandler:function(e){Polymer.IronButtonStateImpl._downHandler.call(this,e),this.pressed&&this.ensureRipple(e)},ensureRipple:function(e){if(!this.hasRipple()){this._ripple=this._createRipple(),this._ripple.noink=this.noink;var i=this._rippleContainer||this.root;if(i&&Polymer.dom(i).appendChild(this._ripple),e){var n=Polymer.dom(this._rippleContainer||this),t=Polymer.dom(e).rootTarget;n.deepContains(t)&&this._ripple.uiDownAction(e)}}},getRipple:function(){return this.ensureRipple(),this._ripple},hasRipple:function(){return Boolean(this._ripple)},_createRipple:function(){return document.createElement("paper-ripple")},_noinkChanged:function(e){this.hasRipple()&&(this._ripple.noink=e)}}</script><script>Polymer.PaperInkyFocusBehaviorImpl={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(e){e&&this.ensureRipple(),this.hasRipple()&&(this._ripple.holdDown=e)},_createRipple:function(){var e=Polymer.PaperRippleBehavior._createRipple();return e.id="ink",e.setAttribute("center",""),e.classList.add("circle"),e}},Polymer.PaperInkyFocusBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperInkyFocusBehaviorImpl]</script><script>Polymer.PaperCheckedElementBehaviorImpl={_checkedChanged:function(){Polymer.IronCheckedElementBehaviorImpl._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){Polymer.PaperRippleBehavior._buttonStateChanged.call(this),this.disabled||this.isAttached&&(this.checked=this.active)}},Polymer.PaperCheckedElementBehavior=[Polymer.PaperInkyFocusBehavior,Polymer.IronCheckedElementBehavior,Polymer.PaperCheckedElementBehaviorImpl]</script><dom-module id="paper-checkbox" assetpath="../bower_components/paper-checkbox/"><template strip-whitespace=""><style>:host{display:inline-block;white-space:nowrap;cursor:pointer;--calculated-paper-checkbox-size:var(--paper-checkbox-size, 18px);--calculated-paper-checkbox-ink-size:var(--paper-checkbox-ink-size, -1px);@apply(--paper-font-common-base);line-height:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none!important}:host(:focus){outline:0}.hidden{display:none}#checkboxContainer{display:inline-block;position:relative;width:var(--calculated-paper-checkbox-size);height:var(--calculated-paper-checkbox-size);min-width:var(--calculated-paper-checkbox-size);margin:var(--paper-checkbox-margin,initial);vertical-align:var(--paper-checkbox-vertical-align,middle);background-color:var(--paper-checkbox-unchecked-background-color,transparent)}#ink{position:absolute;top:calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size))/ 2);left:calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size))/ 2);width:var(--calculated-paper-checkbox-ink-size);height:var(--calculated-paper-checkbox-ink-size);color:var(--paper-checkbox-unchecked-ink-color,var(--primary-text-color));opacity:.6;pointer-events:none}:host-context([dir=rtl]) #ink{right:calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size))/ 2);left:auto}#ink[checked]{color:var(--paper-checkbox-checked-ink-color,var(--primary-color))}#checkbox{position:relative;box-sizing:border-box;height:100%;border:solid 2px;border-color:var(--paper-checkbox-unchecked-color,var(--primary-text-color));border-radius:2px;pointer-events:none;-webkit-transition:background-color 140ms,border-color 140ms;transition:background-color 140ms,border-color 140ms}#checkbox.checked #checkmark{-webkit-animation:checkmark-expand 140ms ease-out forwards;animation:checkmark-expand 140ms ease-out forwards}@-webkit-keyframes checkmark-expand{0%{-webkit-transform:scale(0,0) rotate(45deg)}100%{-webkit-transform:scale(1,1) rotate(45deg)}}@keyframes checkmark-expand{0%{transform:scale(0,0) rotate(45deg)}100%{transform:scale(1,1) rotate(45deg)}}#checkbox.checked{background-color:var(--paper-checkbox-checked-color,var(--primary-color));border-color:var(--paper-checkbox-checked-color,var(--primary-color))}#checkmark{position:absolute;width:36%;height:70%;border-style:solid;border-top:none;border-left:none;border-right-width:calc(2/15 * var(--calculated-paper-checkbox-size));border-bottom-width:calc(2/15 * var(--calculated-paper-checkbox-size));border-color:var(--paper-checkbox-checkmark-color,#fff);-webkit-transform-origin:97% 86%;transform-origin:97% 86%;box-sizing:content-box}:host-context([dir=rtl]) #checkmark{-webkit-transform-origin:50% 14%;transform-origin:50% 14%}#checkboxLabel{position:relative;display:inline-block;vertical-align:middle;padding-left:var(--paper-checkbox-label-spacing,8px);white-space:normal;line-height:normal;color:var(--paper-checkbox-label-color,var(--primary-text-color));@apply(--paper-checkbox-label)}:host([checked]) #checkboxLabel{color:var(--paper-checkbox-label-checked-color,var(--paper-checkbox-label-color,var(--primary-text-color)));@apply(--paper-checkbox-label-checked)}:host-context([dir=rtl]) #checkboxLabel{padding-right:var(--paper-checkbox-label-spacing,8px);padding-left:0}#checkboxLabel[hidden]{display:none}:host([disabled]) #checkbox{opacity:.5;border-color:var(--paper-checkbox-unchecked-color,var(--primary-text-color))}:host([disabled][checked]) #checkbox{background-color:var(--paper-checkbox-unchecked-color,var(--primary-text-color));opacity:.5}:host([disabled]) #checkboxLabel{opacity:.65}#checkbox.invalid:not(.checked){border-color:var(--paper-checkbox-error-color,var(--error-color))}</style><div id="checkboxContainer"><div id="checkbox" class$="[[_computeCheckboxClass(checked, invalid)]]"><div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div></div></div><div id="checkboxLabel"><content></content></div></template><script>Polymer({is:"paper-checkbox",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){var e=this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim();if("-1px"===e){var t=parseFloat(this.getComputedStyleValue("--calculated-paper-checkbox-size").trim()),a=Math.floor(8/3*t);a%2!==t%2&&a++,this.customStyle["--paper-checkbox-ink-size"]=a+"px",this.updateStyles()}},_computeCheckboxClass:function(e,t){var a="";return e&&(a+="checked "),t&&(a+="invalid"),a},_computeCheckmarkClass:function(e){return e?"":"hidden"},_createRipple:function(){return this._rippleContainer=this.$.checkboxContainer,Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this)}})</script></dom-module><script>Polymer.PaperButtonBehaviorImpl={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var e=1;this.disabled?e=0:this.active||this.pressed?e=4:this.receivedFocusFromKeyboard&&(e=3),this._setElevation(e)},_computeKeyboardClass:function(e){this.toggleClass("keyboard-focus",e)},_spaceKeyDownHandler:function(e){Polymer.IronButtonStateImpl._spaceKeyDownHandler.call(this,e),this.hasRipple()&&this.getRipple().ripples.length<1&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(e){Polymer.IronButtonStateImpl._spaceKeyUpHandler.call(this,e),this.hasRipple()&&this._ripple.uiUpAction()}},Polymer.PaperButtonBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperButtonBehaviorImpl]</script><style is="custom-style">:root{--shadow-transition:{transition:box-shadow .28s cubic-bezier(.4,0,.2,1)};--shadow-none:{box-shadow:none};--shadow-elevation-2dp:{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)};--shadow-elevation-3dp:{box-shadow:0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12),0 3px 3px -2px rgba(0,0,0,.4)};--shadow-elevation-4dp:{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4)};--shadow-elevation-6dp:{box-shadow:0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12),0 3px 5px -1px rgba(0,0,0,.4)};--shadow-elevation-8dp:{box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.4)};--shadow-elevation-12dp:{box-shadow:0 12px 16px 1px rgba(0,0,0,.14),0 4px 22px 3px rgba(0,0,0,.12),0 6px 7px -4px rgba(0,0,0,.4)};--shadow-elevation-16dp:{box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.4)};--shadow-elevation-24dp:{box-shadow:0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12),0 11px 15px -7px rgba(0,0,0,.4)};}</style><dom-module id="paper-material-shared-styles" assetpath="../bower_components/paper-material/"><template><style>:host{display:block;position:relative}:host([elevation="1"]){@apply(--shadow-elevation-2dp)}:host([elevation="2"]){@apply(--shadow-elevation-4dp)}:host([elevation="3"]){@apply(--shadow-elevation-6dp)}:host([elevation="4"]){@apply(--shadow-elevation-8dp)}:host([elevation="5"]){@apply(--shadow-elevation-16dp)}</style></template></dom-module><dom-module id="paper-button" assetpath="../bower_components/paper-button/"><template strip-whitespace=""><style include="paper-material-shared-styles">:host{@apply(--layout-inline);@apply(--layout-center-center);position:relative;box-sizing:border-box;min-width:5.14em;margin:0 .29em;background:0 0;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent;font:inherit;text-transform:uppercase;outline-width:0;border-radius:3px;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;cursor:pointer;z-index:0;padding:.7em .57em;@apply(--paper-font-common-base);@apply(--paper-button)}:host([hidden]){display:none!important}:host([raised].keyboard-focus){font-weight:700;@apply(--paper-button-raised-keyboard-focus)}:host(:not([raised]).keyboard-focus){font-weight:700;@apply(--paper-button-flat-keyboard-focus)}:host([disabled]){background:#eaeaea;color:#a8a8a8;cursor:auto;pointer-events:none;@apply(--paper-button-disabled)}:host([animated]){@apply(--shadow-transition)}paper-ripple{color:var(--paper-button-ink-color)}</style><content></content></template><script>Polymer({is:"paper-button",behaviors:[Polymer.PaperButtonBehavior],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this):this._setElevation(0)}})</script></dom-module><dom-module id="paper-input-container" assetpath="../bower_components/paper-input/"><template><style>:host{display:block;padding:8px 0;@apply(--paper-input-container)}:host([inline]){display:inline-block}:host([disabled]){pointer-events:none;opacity:.33;@apply(--paper-input-container-disabled)}:host([hidden]){display:none!important}.floated-label-placeholder{@apply(--paper-font-caption)}.underline{height:2px;position:relative}.focused-line{@apply(--layout-fit);border-bottom:2px solid var(--paper-input-container-focus-color,--primary-color);-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:scale3d(0,1,1);transform:scale3d(0,1,1);@apply(--paper-input-container-underline-focus)}.underline.is-highlighted .focused-line{-webkit-transform:none;transform:none;-webkit-transition:-webkit-transform .25s;transition:transform .25s;@apply(--paper-transition-easing)}.underline.is-invalid .focused-line{border-color:var(--paper-input-container-invalid-color,--error-color);-webkit-transform:none;transform:none;-webkit-transition:-webkit-transform .25s;transition:transform .25s;@apply(--paper-transition-easing)}.unfocused-line{@apply(--layout-fit);border-bottom:1px solid var(--paper-input-container-color,--secondary-text-color);@apply(--paper-input-container-underline)}:host([disabled]) .unfocused-line{border-bottom:1px dashed;border-color:var(--paper-input-container-color,--secondary-text-color);@apply(--paper-input-container-underline-disabled)}.label-and-input-container{@apply(--layout-flex-auto);@apply(--layout-relative);width:100%;max-width:100%}.input-content{@apply(--layout-horizontal);@apply(--layout-center);position:relative}.input-content ::content .paper-input-label,.input-content ::content label{position:absolute;top:0;right:0;left:0;width:100%;font:inherit;color:var(--paper-input-container-color,--secondary-text-color);-webkit-transition:-webkit-transform .25s,width .25s;transition:transform .25s,width .25s;-webkit-transform-origin:left top;transform-origin:left top;@apply(--paper-font-common-nowrap);@apply(--paper-font-subhead);@apply(--paper-input-container-label);@apply(--paper-transition-easing)}.input-content.label-is-floating ::content .paper-input-label,.input-content.label-is-floating ::content label{-webkit-transform:translateY(-75%) scale(.75);transform:translateY(-75%) scale(.75);width:133%;@apply(--paper-input-container-label-floating)}:host-context([dir=rtl]) .input-content.label-is-floating ::content .paper-input-label,:host-context([dir=rtl]) .input-content.label-is-floating ::content label{width:100%;-webkit-transform-origin:right top;transform-origin:right top}.input-content.label-is-highlighted ::content .paper-input-label,.input-content.label-is-highlighted ::content label{color:var(--paper-input-container-focus-color,--primary-color);@apply(--paper-input-container-label-focus)}.input-content.is-invalid ::content .paper-input-label,.input-content.is-invalid ::content label{color:var(--paper-input-container-invalid-color,--error-color)}.input-content.label-is-hidden ::content .paper-input-label,.input-content.label-is-hidden ::content label{visibility:hidden}.input-content ::content .paper-input-input,.input-content ::content input,.input-content ::content iron-autogrow-textarea,.input-content ::content textarea{position:relative;outline:0;box-shadow:none;padding:0;width:100%;max-width:100%;background:0 0;border:none;color:var(--paper-input-container-input-color,--primary-text-color);-webkit-appearance:none;text-align:inherit;vertical-align:bottom;@apply(--paper-font-subhead);@apply(--paper-input-container-input)}.input-content ::content input::-webkit-inner-spin-button,.input-content ::content input::-webkit-outer-spin-button{@apply(--paper-input-container-input-webkit-spinner)}::content [prefix]{@apply(--paper-font-subhead);@apply(--paper-input-prefix);@apply(--layout-flex-none)}::content [suffix]{@apply(--paper-font-subhead);@apply(--paper-input-suffix);@apply(--layout-flex-none)}.input-content ::content input{min-width:0}.input-content ::content textarea{resize:none}.add-on-content{position:relative}.add-on-content.is-invalid ::content *{color:var(--paper-input-container-invalid-color,--error-color)}.add-on-content.is-highlighted ::content *{color:var(--paper-input-container-focus-color,--primary-color)}</style><template is="dom-if" if="[[!noLabelFloat]]"><div class="floated-label-placeholder" aria-hidden="true">&nbsp;</div></template><div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]"><content select="[prefix]" id="prefix"></content><div class="label-and-input-container" id="labelAndInputContainer"><content select=":not([add-on]):not([prefix]):not([suffix])"></content></div><content select="[suffix]"></content></div><div class$="[[_computeUnderlineClass(focused,invalid)]]"><div class="unfocused-line"></div><div class="focused-line"></div></div><div class$="[[_computeAddOnContentClass(focused,invalid)]]"><content id="addOnContent" select="[add-on]"></content></div></template></dom-module><script>Polymer({is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,textarea,.paper-input-input"},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return Polymer.CaseMap.dashToCamelCase(this.attrForValue)},get _inputElement(){return Polymer.dom(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this._addons||(this._addons=[]),this.addEventListener("focus",this._boundOnFocus,!0),this.addEventListener("blur",this._boundOnBlur,!0)},attached:function(){this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput),""!=this._inputElementValue?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)},_onAddonAttached:function(t){this._addons||(this._addons=[]);var n=t.target;this._addons.indexOf(n)===-1&&(this._addons.push(n),this.isAttached&&this._handleValue(this._inputElement))},_onFocus:function(){this._setFocused(!0)},_onBlur:function(){this._setFocused(!1),this._handleValueAndAutoValidate(this._inputElement)},_onInput:function(t){this._handleValueAndAutoValidate(t.target)},_onValueChanged:function(t){this._handleValueAndAutoValidate(t.target)},_handleValue:function(t){var n=this._inputElementValue;n||0===n||"number"===t.type&&!t.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1,this.updateAddons({inputElement:t,value:n,invalid:this.invalid})},_handleValueAndAutoValidate:function(t){if(this.autoValidate){var n;n=t.validate?t.validate(this._inputElementValue):t.checkValidity(),this.invalid=!n}this._handleValue(t)},_onIronInputValidate:function(t){this.invalid=this._inputElement.invalid},_invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})},updateAddons:function(t){for(var n,e=0;n=this._addons[e];e++)n.update(t)},_computeInputContentClass:function(t,n,e,i,a){var u="input-content";if(t)a&&(u+=" label-is-hidden");else{var o=this.querySelector("label");n||a?(u+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",i?u+=" is-invalid":e&&(u+=" label-is-highlighted")):o&&(this.$.labelAndInputContainer.style.position="relative")}return u},_computeUnderlineClass:function(t,n){var e="underline";return n?e+=" is-invalid":t&&(e+=" is-highlighted"),e},_computeAddOnContentClass:function(t,n){var e="add-on-content";return n?e+=" is-invalid":t&&(e+=" is-highlighted"),e}})</script><script>Polymer.PaperInputAddonBehavior={hostAttributes:{"add-on":""},attached:function(){this.fire("addon-attached")},update:function(t){}}</script><dom-module id="paper-input-error" assetpath="../bower_components/paper-input/"><template><style>:host{display:inline-block;visibility:hidden;color:var(--paper-input-container-invalid-color,--error-color);@apply(--paper-font-caption);@apply(--paper-input-error);position:absolute;left:0;right:0}:host([invalid]){visibility:visible};</style><content></content></template></dom-module><script>Polymer({is:"paper-input-error",behaviors:[Polymer.PaperInputAddonBehavior],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(e){this._setInvalid(e.invalid)}})</script><dom-module id="iron-a11y-announcer" assetpath="../bower_components/iron-a11y-announcer/"><template><style>:host{display:inline-block;position:fixed;clip:rect(0,0,0,0)}</style><div aria-live$="[[mode]]">[[_text]]</div></template><script>!function(){"use strict";Polymer.IronA11yAnnouncer=Polymer({is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},_text:{type:String,value:""}},created:function(){Polymer.IronA11yAnnouncer.instance||(Polymer.IronA11yAnnouncer.instance=this),document.body.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(n){this._text="",this.async(function(){this._text=n},100)},_onIronAnnounce:function(n){n.detail&&n.detail.text&&this.announce(n.detail.text)}}),Polymer.IronA11yAnnouncer.instance=null,Polymer.IronA11yAnnouncer.requestAvailability=function(){Polymer.IronA11yAnnouncer.instance||(Polymer.IronA11yAnnouncer.instance=document.createElement("iron-a11y-announcer")),document.body.appendChild(Polymer.IronA11yAnnouncer.instance)}}()</script></dom-module><script>Polymer({is:"iron-input",extends:"input",behaviors:[Polymer.IronValidatableBehavior],properties:{bindValue:{observer:"_bindValueChanged",type:String},preventInvalidInput:{type:Boolean},allowedPattern:{type:String,observer:"_allowedPatternChanged"},_previousValidInput:{type:String,value:""},_patternAlreadyChecked:{type:Boolean,value:!1}},listeners:{input:"_onInput",keypress:"_onKeypress"},registered:function(){this._canDispatchEventOnDisabled()||(this._origDispatchEvent=this.dispatchEvent,this.dispatchEvent=this._dispatchEventFirefoxIE)},created:function(){Polymer.IronA11yAnnouncer.requestAvailability()},_canDispatchEventOnDisabled:function(){var e=document.createElement("input"),t=!1;e.disabled=!0,e.addEventListener("feature-check-dispatch-event",function(){t=!0});try{e.dispatchEvent(new Event("feature-check-dispatch-event"))}catch(e){}return t},_dispatchEventFirefoxIE:function(){var e=this.disabled;this.disabled=!1,this._origDispatchEvent.apply(this,arguments),this.disabled=e},get _patternRegExp(){var e;if(this.allowedPattern)e=new RegExp(this.allowedPattern);else switch(this.type){case"number":e=/[0-9.,e-]/}return e},ready:function(){this.bindValue=this.value},_bindValueChanged:function(){this.value!==this.bindValue&&(this.value=this.bindValue||0===this.bindValue||this.bindValue===!1?this.bindValue:""),this.fire("bind-value-changed",{value:this.bindValue})},_allowedPatternChanged:function(){this.preventInvalidInput=!!this.allowedPattern},_onInput:function(){if(this.preventInvalidInput&&!this._patternAlreadyChecked){var e=this._checkPatternValidity();e||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.value=this._previousValidInput)}this.bindValue=this.value,this._previousValidInput=this.value,this._patternAlreadyChecked=!1},_isPrintable:function(e){var t=8==e.keyCode||9==e.keyCode||13==e.keyCode||27==e.keyCode,i=19==e.keyCode||20==e.keyCode||45==e.keyCode||46==e.keyCode||144==e.keyCode||145==e.keyCode||e.keyCode>32&&e.keyCode<41||e.keyCode>111&&e.keyCode<124;return!(t||0==e.charCode&&i)},_onKeypress:function(e){if(this.preventInvalidInput||"number"===this.type){var t=this._patternRegExp;if(t&&!(e.metaKey||e.ctrlKey||e.altKey)){this._patternAlreadyChecked=!0;var i=String.fromCharCode(e.charCode);this._isPrintable(e)&&!t.test(i)&&(e.preventDefault(),this._announceInvalidCharacter("Invalid character "+i+" not entered."))}}},_checkPatternValidity:function(){var e=this._patternRegExp;if(!e)return!0;for(var t=0;t<this.value.length;t++)if(!e.test(this.value[t]))return!1;return!0},validate:function(){var e=this.checkValidity();return e&&(this.required&&""===this.value?e=!1:this.hasValidator()&&(e=Polymer.IronValidatableBehavior.validate.call(this,this.value))),this.invalid=!e,this.fire("iron-input-validate"),e},_announceInvalidCharacter:function(e){this.fire("iron-announce",{text:e})}})</script><dom-module id="login-form" assetpath="layouts/"><template><style is="custom-style" include="iron-flex iron-positioning"></style><style>:host{white-space:nowrap}#passwordDecorator{display:block;margin-bottom:16px}paper-checkbox{margin-right:8px}paper-button{margin-left:72px}.interact{height:125px}#validatebox{margin-top:16px;text-align:center}.validatemessage{margin-top:10px}</style><div class="layout vertical center center-center fit"><img src="/static/icons/favicon-192x192.png" height="192"> <a href="#" id="hideKeyboardOnFocus"></a><div class="interact"><div id="loginform" hidden$="[[showLoading]]"><paper-input-container id="passwordDecorator" invalid="[[isInvalid]]"><label>Password</label><input is="iron-input" type="password" id="passwordInput"><paper-input-error invalid="[[isInvalid]]">[[errorMessage]]</paper-input-error></paper-input-container><div class="layout horizontal center"><paper-checkbox for="" id="rememberLogin">Remember</paper-checkbox><paper-button id="loginButton">Log In</paper-button></div></div><div id="validatebox" hidden$="[[!showLoading]]"><paper-spinner active="true"></paper-spinner><br><div class="validatemessage">Loading data</div></div></div></div></template></dom-module><script>Polymer({is:"login-form",behaviors:[window.hassBehavior],properties:{hass:{type:Object},errorMessage:{type:String,bindNuclear:function(e){return e.authGetters.attemptErrorMessage}},isInvalid:{type:Boolean,bindNuclear:function(e){return e.authGetters.isInvalidAttempt}},isValidating:{type:Boolean,observer:"isValidatingChanged",bindNuclear:function(e){return e.authGetters.isValidating}},loadingResources:{type:Boolean,value:!1},forceShowLoading:{type:Boolean,value:!1},showLoading:{type:Boolean,computed:"computeShowSpinner(forceShowLoading, isValidating)"}},listeners:{keydown:"passwordKeyDown","loginButton.tap":"validatePassword"},observers:["validatingChanged(isValidating, isInvalid)"],attached:function(){window.removeInitMsg()},computeShowSpinner:function(e,i){return e||i},validatingChanged:function(e,i){e||i||(this.$.passwordInput.value="")},isValidatingChanged:function(e){e||this.async(function(){this.$.passwordInput.focus()}.bind(this),10)},passwordKeyDown:function(e){13===e.keyCode?(this.validatePassword(),e.preventDefault()):this.isInvalid&&(this.isInvalid=!1)},validatePassword:function(){this.$.hideKeyboardOnFocus.focus(),window.validateAuth(this.$.passwordInput.value,this.$.rememberLogin.checked)}})</script><script>Polymer({is:"iron-media-query",properties:{queryMatches:{type:Boolean,value:!1,readOnly:!0,notify:!0},query:{type:String,observer:"queryChanged"},full:{type:Boolean,value:!1},_boundMQHandler:{value:function(){return this.queryHandler.bind(this)}},_mq:{value:null}},attached:function(){this.style.display="none",this.queryChanged()},detached:function(){this._remove()},_add:function(){this._mq&&this._mq.addListener(this._boundMQHandler)},_remove:function(){this._mq&&this._mq.removeListener(this._boundMQHandler),this._mq=null},queryChanged:function(){this._remove();var e=this.query;e&&(this.full||"("===e[0]||(e="("+e+")"),this._mq=window.matchMedia(e),this._add(),this.queryHandler(this._mq))},queryHandler:function(e){this._setQueryMatches(e.matches)}})</script><script>Polymer.IronSelection=function(e){this.selection=[],this.selectCallback=e},Polymer.IronSelection.prototype={get:function(){return this.multi?this.selection.slice():this.selection[0]},clear:function(e){this.selection.slice().forEach(function(t){(!e||e.indexOf(t)<0)&&this.setItemSelected(t,!1)},this)},isSelected:function(e){return this.selection.indexOf(e)>=0},setItemSelected:function(e,t){if(null!=e&&t!==this.isSelected(e)){if(t)this.selection.push(e);else{var i=this.selection.indexOf(e);i>=0&&this.selection.splice(i,1)}this.selectCallback&&this.selectCallback(e,t)}},select:function(e){this.multi?this.toggle(e):this.get()!==e&&(this.setItemSelected(this.get(),!1),this.setItemSelected(e,!0))},toggle:function(e){this.setItemSelected(e,!this.isSelected(e))}}</script><script>Polymer.IronSelectableBehavior={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},fallbackSelection:{type:String,value:null},items:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}},_excludedLocalNames:{type:Object,value:function(){return{template:1}}}},observers:["_updateAttrForSelected(attrForSelected)","_updateSelected(selected)","_checkFallback(fallbackSelection)"],created:function(){this._bindFilterItem=this._filterItem.bind(this),this._selection=new Polymer.IronSelection(this._applySelection.bind(this))},attached:function(){this._observer=this._observeItems(this),this._updateItems(),this._shouldUpdateSelection||this._updateSelected(),this._addListener(this.activateEvent)},detached:function(){this._observer&&Polymer.dom(this).unobserveNodes(this._observer),this._removeListener(this.activateEvent)},indexOf:function(e){return this.items.indexOf(e)},select:function(e){this.selected=e},selectPrevious:function(){var e=this.items.length,t=(Number(this._valueToIndex(this.selected))-1+e)%e;this.selected=this._indexToValue(t)},selectNext:function(){var e=(Number(this._valueToIndex(this.selected))+1)%this.items.length;this.selected=this._indexToValue(e)},selectIndex:function(e){this.select(this._indexToValue(e))},forceSynchronousItemUpdate:function(){this._updateItems()},get _shouldUpdateSelection(){return null!=this.selected},_checkFallback:function(){this._shouldUpdateSelection&&this._updateSelected()},_addListener:function(e){this.listen(this,e,"_activateHandler")},_removeListener:function(e){this.unlisten(this,e,"_activateHandler")},_activateEventChanged:function(e,t){this._removeListener(t),this._addListener(e)},_updateItems:function(){var e=Polymer.dom(this).queryDistributedElements(this.selectable||"*");e=Array.prototype.filter.call(e,this._bindFilterItem),this._setItems(e)},_updateAttrForSelected:function(){this._shouldUpdateSelection&&(this.selected=this._indexToValue(this.indexOf(this.selectedItem)))},_updateSelected:function(){this._selectSelected(this.selected)},_selectSelected:function(e){this._selection.select(this._valueToItem(this.selected)),this.fallbackSelection&&this.items.length&&void 0===this._selection.get()&&(this.selected=this.fallbackSelection)},_filterItem:function(e){return!this._excludedLocalNames[e.localName]},_valueToItem:function(e){return null==e?null:this.items[this._valueToIndex(e)]},_valueToIndex:function(e){if(!this.attrForSelected)return Number(e);for(var t,i=0;t=this.items[i];i++)if(this._valueForItem(t)==e)return i},_indexToValue:function(e){if(!this.attrForSelected)return e;var t=this.items[e];return t?this._valueForItem(t):void 0},_valueForItem:function(e){var t=e[Polymer.CaseMap.dashToCamelCase(this.attrForSelected)];return void 0!=t?t:e.getAttribute(this.attrForSelected)},_applySelection:function(e,t){this.selectedClass&&this.toggleClass(this.selectedClass,t,e),this.selectedAttribute&&this.toggleAttribute(this.selectedAttribute,t,e),this._selectionChange(),this.fire("iron-"+(t?"select":"deselect"),{item:e})},_selectionChange:function(){this._setSelectedItem(this._selection.get())},_observeItems:function(e){return Polymer.dom(e).observeNodes(function(e){this._updateItems(),this._shouldUpdateSelection&&this._updateSelected(),this.fire("iron-items-changed",e,{bubbles:!1,cancelable:!1})})},_activateHandler:function(e){for(var t=e.target,i=this.items;t&&t!=this;){var s=i.indexOf(t);if(s>=0){var n=this._indexToValue(s);return void this._itemActivate(n,t)}t=t.parentNode}},_itemActivate:function(e,t){this.fire("iron-activate",{selected:e,item:t},{cancelable:!0}).defaultPrevented||this.select(e)}}</script><script>Polymer.IronMultiSelectableBehaviorImpl={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0},selectedItems:{type:Array,readOnly:!0,notify:!0}},observers:["_updateSelected(selectedValues.splices)"],select:function(e){this.multi?this.selectedValues?this._toggleSelected(e):this.selectedValues=[e]:this.selected=e},multiChanged:function(e){this._selection.multi=e},get _shouldUpdateSelection(){return null!=this.selected||null!=this.selectedValues&&this.selectedValues.length},_updateAttrForSelected:function(){this.multi?this._shouldUpdateSelection&&(this.selectedValues=this.selectedItems.map(function(e){return this._indexToValue(this.indexOf(e))},this).filter(function(e){return null!=e},this)):Polymer.IronSelectableBehavior._updateAttrForSelected.apply(this)},_updateSelected:function(){this.multi?this._selectMulti(this.selectedValues):this._selectSelected(this.selected)},_selectMulti:function(e){if(e){var t=this._valuesToItems(e);this._selection.clear(t);for(var l=0;l<t.length;l++)this._selection.setItemSelected(t[l],!0);if(this.fallbackSelection&&this.items.length&&!this._selection.get().length){var s=this._valueToItem(this.fallbackSelection);s&&(this.selectedValues=[this.fallbackSelection])}}else this._selection.clear()},_selectionChange:function(){var e=this._selection.get();this.multi?this._setSelectedItems(e):(this._setSelectedItems([e]),this._setSelectedItem(e))},_toggleSelected:function(e){var t=this.selectedValues.indexOf(e),l=t<0;l?this.push("selectedValues",e):this.splice("selectedValues",t,1)},_valuesToItems:function(e){return null==e?null:e.map(function(e){return this._valueToItem(e)},this)}},Polymer.IronMultiSelectableBehavior=[Polymer.IronSelectableBehavior,Polymer.IronMultiSelectableBehaviorImpl]</script><script>Polymer({is:"iron-selector",behaviors:[Polymer.IronMultiSelectableBehavior]})</script><script>Polymer.IronResizableBehavior={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this)},attached:function(){this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable||(window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):window.removeEventListener("resize",this._boundNotifyResize),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this),this._fireResize())},assignParentResizable:function(e){this._parentResizable=e},stopResizeNotificationsFor:function(e){var i=this._interestedResizables.indexOf(e);i>-1&&(this._interestedResizables.splice(i,1),this.unlisten(e,"iron-resize","_onDescendantIronResize"))},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){return this._notifyingDescendant?void e.stopPropagation():void(Polymer.Settings.useShadow||this._fireResize())},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var i=e.path?e.path[0]:e.target;i!==this&&(this._interestedResizables.indexOf(i)===-1&&(this._interestedResizables.push(i),this.listen(i,"iron-resize","_onDescendantIronResize")),i.assignParentResizable(this),this._notifyDescendant(i),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)}}</script><dom-module id="paper-drawer-panel" assetpath="../bower_components/paper-drawer-panel/"><template><style>:host{display:block;position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}iron-selector>#drawer{position:absolute;top:0;left:0;height:100%;background-color:#fff;-moz-box-sizing:border-box;box-sizing:border-box;@apply(--paper-drawer-panel-drawer-container)}.transition-drawer{transition:-webkit-transform ease-in-out .3s,width ease-in-out .3s,visibility .3s;transition:transform ease-in-out .3s,width ease-in-out .3s,visibility .3s}.left-drawer>#drawer{@apply(--paper-drawer-panel-left-drawer-container)}.right-drawer>#drawer{left:auto;right:0;@apply(--paper-drawer-panel-right-drawer-container)}iron-selector>#main{position:absolute;top:0;right:0;bottom:0;@apply(--paper-drawer-panel-main-container)}.transition>#main{transition:left ease-in-out .3s,padding ease-in-out .3s}.right-drawer>#main{left:0}.right-drawer.transition>#main{transition:right ease-in-out .3s,padding ease-in-out .3s}#main>::content>[main]{height:100%}#drawer>::content>[drawer]{height:100%}#scrim{position:absolute;top:0;right:0;bottom:0;left:0;visibility:hidden;opacity:0;transition:opacity ease-in-out .38s,visibility ease-in-out .38s;background-color:rgba(0,0,0,.3);@apply(--paper-drawer-panel-scrim)}.narrow-layout>#drawer{will-change:transform}.narrow-layout>#drawer.iron-selected{box-shadow:2px 2px 4px rgba(0,0,0,.15)}.right-drawer.narrow-layout>#drawer.iron-selected{box-shadow:-2px 2px 4px rgba(0,0,0,.15)}.narrow-layout>#drawer>::content>[drawer]{border:0}.left-drawer.narrow-layout>#drawer:not(.iron-selected){visibility:hidden;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.right-drawer.narrow-layout>#drawer:not(.iron-selected){left:auto;visibility:hidden;-webkit-transform:translateX(100%);transform:translateX(100%)}.left-drawer.dragging>#drawer:not(.iron-selected),.left-drawer.peeking>#drawer:not(.iron-selected),.right-drawer.dragging>#drawer:not(.iron-selected),.right-drawer.peeking>#drawer:not(.iron-selected){visibility:visible}.narrow-layout>#main{padding:0}.right-drawer.narrow-layout>#main{left:0;right:0}.dragging>#main>#scrim,.narrow-layout>#main:not(.iron-selected)>#scrim{visibility:visible;opacity:var(--paper-drawer-panel-scrim-opacity,1)}.narrow-layout>#main>*{margin:0;min-height:100%;left:0;right:0;-moz-box-sizing:border-box;box-sizing:border-box}iron-selector:not(.narrow-layout) ::content [paper-drawer-toggle]{display:none}</style><iron-media-query id="mq" on-query-matches-changed="_onQueryMatchesChanged" query="[[_computeMediaQuery(forceNarrow, responsiveWidth)]]"></iron-media-query><iron-selector attr-for-selected="id" class$="[[_computeIronSelectorClass(narrow, _transition, dragging, rightDrawer, peeking)]]" activate-event="" selected="[[selected]]"><div id="main" style$="[[_computeMainStyle(narrow, rightDrawer, drawerWidth)]]"><content select="[main]"></content><div id="scrim" on-tap="closeDrawer"></div></div><div id="drawer" style$="[[_computeDrawerStyle(drawerWidth)]]"><content id="drawerContent" select="[drawer]"></content></div></iron-selector></template><script>!function(){"use strict";function e(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&e[i]&&t.push(i);return t.join(" ")}var t=null;Polymer({is:"paper-drawer-panel",behaviors:[Polymer.IronResizableBehavior],properties:{defaultSelected:{type:String,value:"main"},disableEdgeSwipe:{type:Boolean,value:!1},disableSwipe:{type:Boolean,value:!1},dragging:{type:Boolean,value:!1,readOnly:!0,notify:!0},drawerWidth:{type:String,value:"256px"},edgeSwipeSensitivity:{type:Number,value:30},forceNarrow:{type:Boolean,value:!1},hasTransform:{type:Boolean,value:function(){return"transform"in this.style}},hasWillChange:{type:Boolean,value:function(){return"willChange"in this.style}},narrow:{reflectToAttribute:!0,type:Boolean,value:!1,readOnly:!0,notify:!0},peeking:{type:Boolean,value:!1,readOnly:!0,notify:!0},responsiveWidth:{type:String,value:"768px"},rightDrawer:{type:Boolean,value:!1},selected:{reflectToAttribute:!0,notify:!0,type:String,value:null},drawerToggleAttribute:{type:String,value:"paper-drawer-toggle"},drawerFocusSelector:{type:String,value:'a[href]:not([tabindex="-1"]),area[href]:not([tabindex="-1"]),input:not([disabled]):not([tabindex="-1"]),select:not([disabled]):not([tabindex="-1"]),textarea:not([disabled]):not([tabindex="-1"]),button:not([disabled]):not([tabindex="-1"]),iframe:not([tabindex="-1"]),[tabindex]:not([tabindex="-1"]),[contentEditable=true]:not([tabindex="-1"])'},_transition:{type:Boolean,value:!1}},listeners:{tap:"_onTap",track:"_onTrack",down:"_downHandler",up:"_upHandler",transitionend:"_onTransitionEnd"},observers:["_forceNarrowChanged(forceNarrow, defaultSelected)","_toggleFocusListener(selected)"],ready:function(){this._transition=!0,this._boundFocusListener=this._didFocus.bind(this)},togglePanel:function(){this._isMainSelected()?this.openDrawer():this.closeDrawer()},openDrawer:function(){requestAnimationFrame(function(){this.toggleClass("transition-drawer",!0,this.$.drawer),this.selected="drawer"}.bind(this))},closeDrawer:function(){requestAnimationFrame(function(){this.toggleClass("transition-drawer",!0,this.$.drawer),this.selected="main"}.bind(this))},_onTransitionEnd:function(e){var t=Polymer.dom(e).localTarget;if(t===this&&("left"!==e.propertyName&&"right"!==e.propertyName||this.notifyResize(),"transform"===e.propertyName&&(requestAnimationFrame(function(){this.toggleClass("transition-drawer",!1,this.$.drawer)}.bind(this)),"drawer"===this.selected))){var i=this._getAutoFocusedNode();i&&i.focus()}},_computeIronSelectorClass:function(t,i,r,n,a){return e({dragging:r,"narrow-layout":t,"right-drawer":n,"left-drawer":!n,transition:i,peeking:a})},_computeDrawerStyle:function(e){return"width:"+e+";"},_computeMainStyle:function(e,t,i){var r="";return r+="left:"+(e||t?"0":i)+";",t&&(r+="right:"+(e?"":i)+";"),r},_computeMediaQuery:function(e,t){return e?"":"(max-width: "+t+")"},_computeSwipeOverlayHidden:function(e,t){return!e||t},_onTrack:function(e){if(!t||this===t)switch(e.detail.state){case"start":this._trackStart(e);break;case"track":this._trackX(e);break;case"end":this._trackEnd(e)}},_responsiveChange:function(e){this._setNarrow(e),this.selected=this.narrow?this.defaultSelected:null,this.setScrollDirection(this._swipeAllowed()?"y":"all"),this.fire("paper-responsive-change",{narrow:this.narrow})},_onQueryMatchesChanged:function(e){this._responsiveChange(e.detail.value)},_forceNarrowChanged:function(){this._responsiveChange(this.forceNarrow||this.$.mq.queryMatches)},_swipeAllowed:function(){return this.narrow&&!this.disableSwipe},_isMainSelected:function(){return"main"===this.selected},_startEdgePeek:function(){this.width=this.$.drawer.offsetWidth,this._moveDrawer(this._translateXForDeltaX(this.rightDrawer?-this.edgeSwipeSensitivity:this.edgeSwipeSensitivity)),this._setPeeking(!0)},_stopEdgePeek:function(){this.peeking&&(this._setPeeking(!1),this._moveDrawer(null))},_downHandler:function(e){!this.dragging&&this._isMainSelected()&&this._isEdgeTouch(e)&&!t&&(this._startEdgePeek(),e.preventDefault(),t=this)},_upHandler:function(){this._stopEdgePeek(),t=null},_onTap:function(e){var t=Polymer.dom(e).localTarget,i=t&&this.drawerToggleAttribute&&t.hasAttribute(this.drawerToggleAttribute);i&&this.togglePanel()},_isEdgeTouch:function(e){var t=e.detail.x;return!this.disableEdgeSwipe&&this._swipeAllowed()&&(this.rightDrawer?t>=this.offsetWidth-this.edgeSwipeSensitivity:t<=this.edgeSwipeSensitivity)},_trackStart:function(e){this._swipeAllowed()&&(t=this,this._setDragging(!0),this._isMainSelected()&&this._setDragging(this.peeking||this._isEdgeTouch(e)),this.dragging&&(this.width=this.$.drawer.offsetWidth,this._transition=!1))},_translateXForDeltaX:function(e){var t=this._isMainSelected();return this.rightDrawer?Math.max(0,t?this.width+e:e):Math.min(0,t?e-this.width:e)},_trackX:function(e){if(this.dragging){var t=e.detail.dx;if(this.peeking){if(Math.abs(t)<=this.edgeSwipeSensitivity)return;this._setPeeking(!1)}this._moveDrawer(this._translateXForDeltaX(t))}},_trackEnd:function(e){if(this.dragging){var i=e.detail.dx>0;this._setDragging(!1),this._transition=!0,t=null,this._moveDrawer(null),this.rightDrawer?this[i?"closeDrawer":"openDrawer"]():this[i?"openDrawer":"closeDrawer"]()}},_transformForTranslateX:function(e){return null===e?"":this.hasWillChange?"translateX("+e+"px)":"translate3d("+e+"px, 0, 0)"},_moveDrawer:function(e){this.transform(this._transformForTranslateX(e),this.$.drawer)},_getDrawerContent:function(){return Polymer.dom(this.$.drawerContent).getDistributedNodes()[0]},_getAutoFocusedNode:function(){var e=this._getDrawerContent();return this.drawerFocusSelector?Polymer.dom(e).querySelector(this.drawerFocusSelector)||e:null},_toggleFocusListener:function(e){"drawer"===e?this.addEventListener("focus",this._boundFocusListener,!0):this.removeEventListener("focus",this._boundFocusListener,!0)},_didFocus:function(e){var t=this._getAutoFocusedNode();if(t){var i=Polymer.dom(e).path,r=(i[0],this._getDrawerContent()),n=i.indexOf(r)!==-1;n||(e.stopPropagation(),t.focus())}},_isDrawerClosed:function(e,t){return!e||"drawer"!==t}})}()</script></dom-module><dom-module id="iron-pages" assetpath="../bower_components/iron-pages/"><template><style>:host{display:block}:host>::content>:not(.iron-selected){display:none!important}</style><content></content></template><script>Polymer({is:"iron-pages",behaviors:[Polymer.IronResizableBehavior,Polymer.IronSelectableBehavior],properties:{activateEvent:{type:String,value:null}},observers:["_selectedPageChanged(selected)"],_selectedPageChanged:function(e,a){this.async(this.notifyResize)}})</script></dom-module><dom-module id="iron-icon" assetpath="../bower_components/iron-icon/"><template><style>:host{@apply(--layout-inline);@apply(--layout-center-center);position:relative;vertical-align:middle;fill:var(--iron-icon-fill-color,currentcolor);stroke:var(--iron-icon-stroke-color,none);width:var(--iron-icon-width,24px);height:var(--iron-icon-height,24px);@apply(--iron-icon)}</style></template><script>Polymer({is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:Polymer.Base.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 i=(t||"").split(":");this._iconName=i.pop(),this._iconsetName=i.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&&Polymer.dom(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,Polymer.dom(this.root).appendChild(this._img))}})</script></dom-module><dom-module id="paper-icon-button" assetpath="../bower_components/paper-icon-button/"><template strip-whitespace=""><style>:host{display:inline-block;position:relative;padding:8px;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;z-index:0;line-height:1;width:40px;height:40px;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent;box-sizing:border-box!important;@apply(--paper-icon-button)}:host #ink{color:var(--paper-icon-button-ink-color,--primary-text-color);opacity:.6}:host([disabled]){color:var(--paper-icon-button-disabled-text,--disabled-text-color);pointer-events:none;cursor:auto;@apply(--paper-icon-button-disabled)}:host(:hover){@apply(--paper-icon-button-hover)}iron-icon{--iron-icon-width:100%;--iron-icon-height:100%}</style><iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon></template><script>Polymer({is:"paper-icon-button",hostAttributes:{role:"button",tabindex:"0"},behaviors:[Polymer.PaperInkyFocusBehavior],properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(t,e){var r=this.getAttribute("aria-label");r&&e!=r||this.setAttribute("aria-label",t)}})</script></dom-module><script>Polymer.IronMenuBehaviorImpl={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:!0,type:Object},attrForItemTitle:{type:String}},_SEARCH_RESET_TIMEOUT_MS:1e3,hostAttributes:{role:"menu",tabindex:"0"},observers:["_updateMultiselectable(multi)"],listeners:{focus:"_onFocus",keydown:"_onKeydown","iron-items-changed":"_onIronItemsChanged"},keyBindings:{up:"_onUpKey",down:"_onDownKey",esc:"_onEscKey","shift+tab:keydown":"_onShiftTabDown"},attached:function(){this._resetTabindices()},select:function(e){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null);var t=this._valueToItem(e);t&&t.hasAttribute("disabled")||(this._setFocusedItem(t),Polymer.IronMultiSelectableBehaviorImpl.select.apply(this,arguments))},_resetTabindices:function(){var e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach(function(t){t.setAttribute("tabindex",t===e?"0":"-1")},this)},_updateMultiselectable:function(e){e?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable")},_focusWithKeyboardEvent:function(e){this.cancelDebouncer("_clearSearchText");var t=this._searchText||"",s=e.key&&1==e.key.length?e.key:String.fromCharCode(e.keyCode);t+=s.toLocaleLowerCase();for(var i,o=t.length,n=0;i=this.items[n];n++)if(!i.hasAttribute("disabled")){var r=this.attrForItemTitle||"textContent",a=(i[r]||i.getAttribute(r)||"").trim();if(!(a.length<o)&&a.slice(0,o).toLocaleLowerCase()==t){this._setFocusedItem(i);break}}this._searchText=t,this.debounce("_clearSearchText",this._clearSearchText,this._SEARCH_RESET_TIMEOUT_MS)},_clearSearchText:function(){this._searchText=""},_focusPrevious:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),s=1;s<e+1;s++){var i=this.items[(t-s+e)%e];if(!i.hasAttribute("disabled")){var o=Polymer.dom(i).getOwnerRoot()||document;if(this._setFocusedItem(i),Polymer.dom(o).activeElement==i)return}}},_focusNext:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),s=1;s<e+1;s++){var i=this.items[(t+s)%e];if(!i.hasAttribute("disabled")){var o=Polymer.dom(i).getOwnerRoot()||document;if(this._setFocusedItem(i),Polymer.dom(o).activeElement==i)return}}},_applySelection:function(e,t){t?e.setAttribute("aria-selected","true"):e.removeAttribute("aria-selected"),Polymer.IronSelectableBehavior._applySelection.apply(this,arguments)},_focusedItemChanged:function(e,t){t&&t.setAttribute("tabindex","-1"),e&&(e.setAttribute("tabindex","0"),e.focus())},_onIronItemsChanged:function(e){e.detail.addedNodes.length&&this._resetTabindices()},_onShiftTabDown:function(e){var t=this.getAttribute("tabindex");Polymer.IronMenuBehaviorImpl._shiftTabPressed=!0,this._setFocusedItem(null),this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),Polymer.IronMenuBehaviorImpl._shiftTabPressed=!1},1)},_onFocus:function(e){if(!Polymer.IronMenuBehaviorImpl._shiftTabPressed){var t=Polymer.dom(e).rootTarget;(t===this||"undefined"==typeof t.tabIndex||this.isLightDescendant(t))&&(this._defaultFocusAsync=this.async(function(){var e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this._setFocusedItem(null),e?this._setFocusedItem(e):this.items[0]&&this._focusNext()}))}},_onUpKey:function(e){this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onEscKey:function(e){this.focusedItem.blur()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down esc")||this._focusWithKeyboardEvent(e),e.stopPropagation()},_activateHandler:function(e){Polymer.IronSelectableBehavior._activateHandler.call(this,e),e.stopPropagation()}},Polymer.IronMenuBehaviorImpl._shiftTabPressed=!1,Polymer.IronMenuBehavior=[Polymer.IronMultiSelectableBehavior,Polymer.IronA11yKeysBehavior,Polymer.IronMenuBehaviorImpl]</script><script>Polymer.IronMenubarBehaviorImpl={hostAttributes:{role:"menubar"},keyBindings:{left:"_onLeftKey",right:"_onRightKey"},_onUpKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},get _isRTL(){return"rtl"===window.getComputedStyle(this).direction},_onLeftKey:function(e){this._isRTL?this._focusNext():this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onRightKey:function(e){this._isRTL?this._focusPrevious():this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down left right esc")||this._focusWithKeyboardEvent(e)}},Polymer.IronMenubarBehavior=[Polymer.IronMenuBehavior,Polymer.IronMenubarBehaviorImpl]</script><script>Polymer({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1}},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map(function(e){return this.name+":"+e},this)},applyIcon:function(e,t){e=e.root||e,this.removeIcon(e);var n=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(n){var r=Polymer.dom(e);return r.insertBefore(n,r.childNodes[0]),e._svgIcon=n}return null},removeIcon:function(e){e=e.root||e,e._svgIcon&&(Polymer.dom(e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){return null==this.__targetIsRTL&&(e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&"rtl"===window.getComputedStyle(e).direction),this.__targetIsRTL},_nameChanged:function(){new Polymer.IronMeta({type:"iconset",key:this.name,value:this}),this.async(function(){this.fire("iron-iconset-added",this,{node:window})})},_createIconMap:function(){var e=Object.create(null);return Polymer.dom(this).querySelectorAll("[id]").forEach(function(t){e[t.id]=t}),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,n){if(e){var r=e.cloneNode(!0),i=document.createElementNS("http://www.w3.org/2000/svg","svg"),o=r.getAttribute("viewBox")||"0 0 "+t+" "+t,s="pointer-events: none; display: block; width: 100%; height: 100%;";return n&&r.hasAttribute("mirror-in-rtl")&&(s+="-webkit-transform:scale(-1,1);transform:scale(-1,1);"),i.setAttribute("viewBox",o),i.setAttribute("preserveAspectRatio","xMidYMid meet"),i.style.cssText=s,i.appendChild(r).removeAttribute("id"),i}return null}})</script><iron-iconset-svg name="paper-tabs" size="24"><svg><defs><g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g><g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></g></defs></svg></iron-iconset-svg><dom-module id="paper-tab" assetpath="../bower_components/paper-tabs/"><template><style>:host{@apply(--layout-inline);@apply(--layout-center);@apply(--layout-center-justified);@apply(--layout-flex-auto);position:relative;padding:0 12px;overflow:hidden;cursor:pointer;vertical-align:middle;@apply(--paper-font-common-base);@apply(--paper-tab)}:host(:focus){outline:0}:host([link]){padding:0}.tab-content{height:100%;transform:translateZ(0);-webkit-transform:translateZ(0);transition:opacity .1s cubic-bezier(.4,0,1,1);@apply(--layout-horizontal);@apply(--layout-center-center);@apply(--layout-flex-auto);@apply(--paper-tab-content)}:host(:not(.iron-selected))>.tab-content{opacity:.8;@apply(--paper-tab-content-unselected)}:host(:focus) .tab-content{opacity:1;font-weight:700}paper-ripple{color:var(--paper-tab-ink,--paper-yellow-a100)}.tab-content>::content>a{@apply(--layout-flex-auto);height:100%}</style><div class="tab-content"><content></content></div></template><script>Polymer({is:"paper-tab",behaviors:[Polymer.IronControlState,Polymer.IronButtonState,Polymer.PaperRippleBehavior],properties:{link:{type:Boolean,value:!1,reflectToAttribute:!0}},hostAttributes:{role:"tab"},listeners:{down:"_updateNoink",tap:"_onTap"},attached:function(){this._updateNoink()},get _parentNoink(){var t=Polymer.dom(this).parentNode;return!!t&&!!t.noink},_updateNoink:function(){this.noink=!!this.noink||!!this._parentNoink},_onTap:function(t){if(this.link){var e=this.queryEffectiveChildren("a");if(!e)return;if(t.target===e)return;e.click()}}})</script></dom-module><dom-module id="paper-tabs" assetpath="../bower_components/paper-tabs/"><template><style>:host{@apply(--layout);@apply(--layout-center);height:48px;font-size:14px;font-weight:500;overflow:hidden;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent;@apply(--paper-tabs)}:host-context([dir=rtl]){@apply(--layout-horizontal-reverse)}#tabsContainer{position:relative;height:100%;white-space:nowrap;overflow:hidden;@apply(--layout-flex-auto);@apply(--paper-tabs-container)}#tabsContent{height:100%;-moz-flex-basis:auto;-ms-flex-basis:auto;flex-basis:auto;@apply(--paper-tabs-content)}#tabsContent.scrollable{position:absolute;white-space:nowrap}#tabsContent.scrollable.fit-container,#tabsContent:not(.scrollable){@apply(--layout-horizontal)}#tabsContent.scrollable.fit-container{min-width:100%}#tabsContent.scrollable.fit-container>::content>*{-ms-flex:1 0 auto;-webkit-flex:1 0 auto;flex:1 0 auto}.hidden{display:none}.not-visible{opacity:0;cursor:default}paper-icon-button{width:48px;height:48px;padding:12px;margin:0 4px}#selectionBar{position:absolute;height:2px;bottom:0;left:0;right:0;background-color:var(--paper-tabs-selection-bar-color,--paper-yellow-a100);-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:left center;transform-origin:left center;transition:-webkit-transform;transition:transform;@apply(--paper-tabs-selection-bar)}#selectionBar.align-bottom{top:0;bottom:auto}#selectionBar.expand{transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,1,1)}#selectionBar.contract{transition-duration:.18s;transition-timing-function:cubic-bezier(0,0,.2,1)}#tabsContent>::content>:not(#selectionBar){height:100%}</style><paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown" tabindex="-1"></paper-icon-button><div id="tabsContainer" on-track="_scroll" on-down="_down"><div id="tabsContent" class$="[[_computeTabsContentClass(scrollable, fitContainer)]]"><div id="selectionBar" class$="[[_computeSelectionBarClass(noBar, alignBottom)]]" on-transitionend="_onBarTransitionEnd"></div><content select="*"></content></div></div><paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown" tabindex="-1"></paper-icon-button></template><script>Polymer({is:"paper-tabs",behaviors:[Polymer.IronResizableBehavior,Polymer.IronMenubarBehavior],properties:{noink:{type:Boolean,value:!1,observer:"_noinkChanged"},noBar:{type:Boolean,value:!1},noSlide:{type:Boolean,value:!1},scrollable:{type:Boolean,value:!1},fitContainer:{type:Boolean,value:!1},disableDrag:{type:Boolean,value:!1},hideScrollButtons:{type:Boolean,value:!1},alignBottom:{type:Boolean,value:!1},selectable:{type:String,value:"paper-tab"},autoselect:{type:Boolean,value:!1},autoselectDelay:{type:Number,value:0},_step:{type:Number,value:10},_holdDelay:{type:Number,value:1},_leftHidden:{type:Boolean,value:!1},_rightHidden:{type:Boolean,value:!1},_previousTab:{type:Object}},hostAttributes:{role:"tablist"},listeners:{"iron-resize":"_onTabSizingChanged","iron-items-changed":"_onTabSizingChanged","iron-select":"_onIronSelect","iron-deselect":"_onIronDeselect"},keyBindings:{"left:keyup right:keyup":"_onArrowKeyup"},created:function(){this._holdJob=null,this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,this._bindDelayedActivationHandler=this._delayedActivationHandler.bind(this),this.addEventListener("blur",this._onBlurCapture.bind(this),!0)},ready:function(){this.setScrollDirection("y",this.$.tabsContainer)},detached:function(){this._cancelPendingActivation()},_noinkChanged:function(t){var e=Polymer.dom(this).querySelectorAll("paper-tab");e.forEach(t?this._setNoinkAttribute:this._removeNoinkAttribute)},_setNoinkAttribute:function(t){t.setAttribute("noink","")},_removeNoinkAttribute:function(t){t.removeAttribute("noink")},_computeScrollButtonClass:function(t,e,i){return!e||i?"hidden":t?"not-visible":""},_computeTabsContentClass:function(t,e){return t?"scrollable"+(e?" fit-container":""):" fit-container"},_computeSelectionBarClass:function(t,e){return t?"hidden":e?"align-bottom":""},_onTabSizingChanged:function(){this.debounce("_onTabSizingChanged",function(){this._scroll(),this._tabChanged(this.selectedItem)},10)},_onIronSelect:function(t){this._tabChanged(t.detail.item,this._previousTab),this._previousTab=t.detail.item,this.cancelDebouncer("tab-changed")},_onIronDeselect:function(t){this.debounce("tab-changed",function(){this._tabChanged(null,this._previousTab),this._previousTab=null},1)},_activateHandler:function(){this._cancelPendingActivation(),Polymer.IronMenuBehaviorImpl._activateHandler.apply(this,arguments)},_scheduleActivation:function(t,e){this._pendingActivationItem=t,this._pendingActivationTimeout=this.async(this._bindDelayedActivationHandler,e)},_delayedActivationHandler:function(){var t=this._pendingActivationItem;this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,t.fire(this.activateEvent,null,{bubbles:!0,cancelable:!0})},_cancelPendingActivation:function(){void 0!==this._pendingActivationTimeout&&(this.cancelAsync(this._pendingActivationTimeout),this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0)},_onArrowKeyup:function(t){this.autoselect&&this._scheduleActivation(this.focusedItem,this.autoselectDelay)},_onBlurCapture:function(t){t.target===this._pendingActivationItem&&this._cancelPendingActivation()},get _tabContainerScrollSize(){return Math.max(0,this.$.tabsContainer.scrollWidth-this.$.tabsContainer.offsetWidth)},_scroll:function(t,e){if(this.scrollable){var i=e&&-e.ddx||0;this._affectScroll(i)}},_down:function(t){this.async(function(){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null)},1)},_affectScroll:function(t){this.$.tabsContainer.scrollLeft+=t;var e=this.$.tabsContainer.scrollLeft;this._leftHidden=0===e,this._rightHidden=e===this._tabContainerScrollSize},_onLeftScrollButtonDown:function(){this._scrollToLeft(),this._holdJob=setInterval(this._scrollToLeft.bind(this),this._holdDelay)},_onRightScrollButtonDown:function(){this._scrollToRight(),this._holdJob=setInterval(this._scrollToRight.bind(this),this._holdDelay)},_onScrollButtonUp:function(){clearInterval(this._holdJob),this._holdJob=null},_scrollToLeft:function(){this._affectScroll(-this._step)},_scrollToRight:function(){this._affectScroll(this._step)},_tabChanged:function(t,e){if(!t)return this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),void this._positionBar(0,0);var i=this.$.tabsContent.getBoundingClientRect(),n=i.width,o=t.getBoundingClientRect(),s=o.left-i.left;if(this._pos={width:this._calcPercent(o.width,n),left:this._calcPercent(s,n)},this.noSlide||null==e)return this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),void this._positionBar(this._pos.width,this._pos.left);var a=e.getBoundingClientRect(),l=this.items.indexOf(e),c=this.items.indexOf(t),r=5;this.$.selectionBar.classList.add("expand");var h=l<c,d=this._isRTL;d&&(h=!h),h?this._positionBar(this._calcPercent(o.left+o.width-a.left,n)-r,this._left):this._positionBar(this._calcPercent(a.left+a.width-o.left,n)-r,this._calcPercent(s,n)+r),this.scrollable&&this._scrollToSelectedIfNeeded(o.width,s)},_scrollToSelectedIfNeeded:function(t,e){var i=e-this.$.tabsContainer.scrollLeft;i<0?this.$.tabsContainer.scrollLeft+=i:(i+=t-this.$.tabsContainer.offsetWidth,i>0&&(this.$.tabsContainer.scrollLeft+=i))},_calcPercent:function(t,e){return 100*t/e},_positionBar:function(t,e){t=t||0,e=e||0,this._width=t,this._left=e,this.transform("translateX("+e+"%) scaleX("+t/100+")",this.$.selectionBar)},_onBarTransitionEnd:function(t){var e=this.$.selectionBar.classList;e.contains("expand")?(e.remove("expand"),e.add("contract"),this._positionBar(this._pos.width,this._pos.left)):e.contains("contract")&&e.remove("contract")}})</script></dom-module><dom-module id="app-header-layout" assetpath="../bower_components/app-layout/app-header-layout/"><template><style>:host{display:block;position:relative;z-index:0}:host>::content>app-header{@apply(--layout-fixed-top);z-index:1}:host([has-scrolling-region]){height:100%}:host([has-scrolling-region])>::content>app-header{position:absolute}:host([has-scrolling-region])>#contentContainer{@apply(--layout-fit);overflow-y:auto;-webkit-overflow-scrolling:touch}:host([fullbleed]){@apply(--layout-vertical);@apply(--layout-fit)}:host([fullbleed])>#contentContainer{@apply(--layout-vertical);@apply(--layout-flex)}#contentContainer{position:relative;z-index:0}</style><content id="header" select="app-header"></content><div id="contentContainer"><content></content></div></template><script>Polymer({is:"app-header-layout",behaviors:[Polymer.IronResizableBehavior],properties:{hasScrollingRegion:{type:Boolean,value:!1,reflectToAttribute:!0}},listeners:{"iron-resize":"_resizeHandler","app-header-reset-layout":"_resetLayoutHandler"},observers:["resetLayout(isAttached, hasScrollingRegion)"],get header(){return Polymer.dom(this.$.header).getDistributedNodes()[0]},resetLayout:function(){this._updateScroller(),this.debounce("_resetLayout",this._updateContentPosition)},_updateContentPosition:function(){var e=this.header;if(this.isAttached&&e){var t=e.offsetHeight;if(this.hasScrollingRegion)e.style.left="",e.style.right="";else{var i=this.getBoundingClientRect(),o=document.documentElement.clientWidth-i.right;e.style.left=i.left+"px",e.style.right=o+"px"}var n=this.$.contentContainer.style;e.fixed&&!e.willCondense()&&this.hasScrollingRegion?(n.marginTop=t+"px",n.paddingTop=""):(n.paddingTop=t+"px",n.marginTop="")}},_updateScroller:function(){if(this.isAttached){var e=this.header;e&&(e.scrollTarget=this.hasScrollingRegion?this.$.contentContainer:this.ownerDocument.documentElement)}},_resizeHandler:function(){this.resetLayout()},_resetLayoutHandler:function(e){this.resetLayout(),e.stopPropagation()}})</script></dom-module><script>Polymer.IronScrollTargetBehavior={properties:{scrollTarget:{type:Object,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(t,l){this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),l&&("document"===t?this.scrollTarget=this._doc:"string"==typeof t?this.scrollTarget=this.domHost?this.domHost.$[t]:Polymer.dom(this.ownerDocument).querySelector("#"+t):this._isValidScrollTarget()&&(this._boundScrollHandler=this._boundScrollHandler||this._scrollHandler.bind(this),this._oldScrollTarget=t,this._toggleScrollListener(this._shouldHaveListener,t)))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(t){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=t)},set _scrollLeft(t){this.scrollTarget===this._doc?window.scrollTo(t,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=t)},scroll:function(t,l){this.scrollTarget===this._doc?window.scrollTo(t,l):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=t,this.scrollTarget.scrollTop=l)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(t,l){if(this._boundScrollHandler){var e=l===this._doc?window:l;t?e.addEventListener("scroll",this._boundScrollHandler):e.removeEventListener("scroll",this._boundScrollHandler)}},toggleScrollListener:function(t){this._shouldHaveListener=t,this._toggleScrollListener(t,this.scrollTarget)}}</script><script>Polymer.AppLayout=Polymer.AppLayout||{},Polymer.AppLayout._scrollEffects=Polymer.AppLayout._scrollEffects||{},Polymer.AppLayout.scrollTimingFunction=function(o,l,e,r){return o/=r,-e*o*(o-2)+l},Polymer.AppLayout.registerEffect=function(o,l){if(null!=Polymer.AppLayout._scrollEffects[o])throw new Error("effect `"+o+"` is already registered.");Polymer.AppLayout._scrollEffects[o]=l},Polymer.AppLayout.scroll=function(o){o=o||{};var l=document.documentElement,e=o.target||l,r="scrollBehavior"in e.style&&e.scroll,t="app-layout-silent-scroll",s=o.top||0,c=o.left||0,i=e===l?window.scrollTo:function(o,l){e.scrollLeft=o,e.scrollTop=l};if("smooth"===o.behavior)if(r)e.scroll(o);else{var n=Polymer.AppLayout.scrollTimingFunction,a=Date.now(),p=e===l?window.pageYOffset:e.scrollTop,u=e===l?window.pageXOffset:e.scrollLeft,y=s-p,f=c-u,m=300,L=function o(){var l=Date.now(),e=l-a;e<m?(i(n(e,u,f,m),n(e,p,y,m)),requestAnimationFrame(o)):i(c,s)}.bind(this);L()}else"silent"===o.behavior?(l.classList.add(t),clearInterval(Polymer.AppLayout._scrollTimer),Polymer.AppLayout._scrollTimer=setTimeout(function(){l.classList.remove(t),Polymer.AppLayout._scrollTimer=null},100),i(c,s)):i(c,s)}</script><script>Polymer.AppScrollEffectsBehavior=[Polymer.IronScrollTargetBehavior,{properties:{effects:{type:String},effectsConfig:{type:Object,value:function(){return{}}},disabled:{type:Boolean,reflectToAttribute:!0,value:!1},threshold:{type:Number,value:0},thresholdTriggered:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_effectsChanged(effects, effectsConfig, isAttached)"],_updateScrollState:function(){},isOnScreen:function(){return!1},isContentBelow:function(){return!1},_effectsRunFn:null,_effects:null,get _clampedScrollTop(){return Math.max(0,this._scrollTop)},detached:function(){this._tearDownEffects()},createEffect:function(t,e){var n=Polymer.AppLayout._scrollEffects[t];if(!n)throw new ReferenceError(this._getUndefinedMsg(t));var f=this._boundEffect(n,e||{});return f.setUp(),f},_effectsChanged:function(t,e,n){this._tearDownEffects(),""!==t&&n&&(t.split(" ").forEach(function(t){var n;""!==t&&((n=Polymer.AppLayout._scrollEffects[t])?this._effects.push(this._boundEffect(n,e[t])):console.warn(this._getUndefinedMsg(t)))},this),this._setUpEffect())},_layoutIfDirty:function(){return this.offsetWidth},_boundEffect:function(t,e){e=e||{};var n=parseFloat(e.startsAt||0),f=parseFloat(e.endsAt||1),s=f-n,r=function(){},o=0===n&&1===f?t.run:function(e,f){t.run.call(this,Math.max(0,(e-n)/s),f)};return{setUp:t.setUp?t.setUp.bind(this,e):r,run:t.run?o.bind(this):r,tearDown:t.tearDown?t.tearDown.bind(this):r}},_setUpEffect:function(){this.isAttached&&this._effects&&(this._effectsRunFn=[],this._effects.forEach(function(t){t.setUp()!==!1&&this._effectsRunFn.push(t.run)},this))},_tearDownEffects:function(){this._effects&&this._effects.forEach(function(t){t.tearDown()}),this._effectsRunFn=[],this._effects=[]},_runEffects:function(t,e){this._effectsRunFn&&this._effectsRunFn.forEach(function(n){n(t,e)})},_scrollHandler:function(){if(!this.disabled){var t=this._clampedScrollTop;this._updateScrollState(t),this.threshold>0&&this._setThresholdTriggered(t>=this.threshold)}},_getDOMRef:function(t){console.warn("_getDOMRef","`"+t+"` is undefined")},_getUndefinedMsg:function(t){return"Scroll effect `"+t+"` is undefined. Did you forget to import app-layout/app-scroll-effects/effects/"+t+".html ?"}}]</script><script>Polymer.AppLayout.registerEffect("waterfall",{run:function(){this.shadow=this.isOnScreen()&&this.isContentBelow()}})</script><dom-module id="app-header" assetpath="../bower_components/app-layout/app-header/"><template><style>:host{position:relative;display:block;transition-timing-function:linear;transition-property:-webkit-transform;transition-property:transform}:host::after{position:absolute;right:0;bottom:-5px;left:0;width:100%;height:5px;content:"";transition:opacity .4s;pointer-events:none;opacity:0;box-shadow:inset 0 5px 6px -3px rgba(0,0,0,.4);will-change:opacity;@apply(--app-header-shadow)}:host([shadow])::after{opacity:1}::content [condensed-title],::content [main-title]{-webkit-transform-origin:left top;transform-origin:left top;white-space:nowrap}::content [condensed-title]{opacity:0}#background{@apply(--layout-fit);overflow:hidden}#backgroundFrontLayer,#backgroundRearLayer{@apply(--layout-fit);height:100%;pointer-events:none;background-size:cover}#backgroundFrontLayer{@apply(--app-header-background-front-layer)}#backgroundRearLayer{opacity:0;@apply(--app-header-background-rear-layer)}#contentContainer{position:relative;width:100%;height:100%}:host([disabled]),:host([disabled]) #backgroundFrontLayer,:host([disabled]) #backgroundRearLayer,:host([disabled]) ::content>[sticky],:host([disabled]) ::content>app-toolbar:first-of-type,:host([disabled])::after,:host-context(.app-layout-silent-scroll),:host-context(.app-layout-silent-scroll) #backgroundFrontLayer,:host-context(.app-layout-silent-scroll) #backgroundRearLayer,:host-context(.app-layout-silent-scroll) ::content>[sticky],:host-context(.app-layout-silent-scroll) ::content>app-toolbar:first-of-type,:host-context(.app-layout-silent-scroll)::after{transition:none!important}</style><div id="contentContainer"><content id="content"></content></div></template><script>Polymer({is:"app-header",behaviors:[Polymer.AppScrollEffectsBehavior,Polymer.IronResizableBehavior],properties:{condenses:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},reveals:{type:Boolean,value:!1},shadow:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["resetLayout(isAttached, condenses, fixed)"],listeners:{"iron-resize":"_resizeHandler"},_height:0,_dHeight:0,_stickyElTop:0,_stickyEl:null,_top:0,_progress:0,_wasScrollingDown:!1,_initScrollTop:0,_initTimestamp:0,_lastTimestamp:0,_lastScrollTop:0,get _maxHeaderTop(){return this.fixed?this._dHeight:this._height+5},_getStickyEl:function(){for(var t,e=Polymer.dom(this.$.content).getDistributedNodes(),i=0;i<e.length;i++)if(e[i].nodeType===Node.ELEMENT_NODE){var s=e[i];if(s.hasAttribute("sticky")){t=s;break}t||(t=s)}return t},resetLayout:function(){this.debounce("_resetLayout",function(){if(0!==this.offsetWidth||0!==this.offsetHeight){var t=this._clampedScrollTop,e=0===this._height||0===t,i=this.disabled;this._height=this.offsetHeight,this._stickyEl=this._getStickyEl(),this.disabled=!0,e||this._updateScrollState(0,!0),this._mayMove()?this._dHeight=this._stickyEl?this._height-this._stickyEl.offsetHeight:0:this._dHeight=0,this._stickyElTop=this._stickyEl?this._stickyEl.offsetTop:0,this._setUpEffect(),e?this._updateScrollState(t,!0):(this._updateScrollState(this._lastScrollTop,!0),this._layoutIfDirty()),this.disabled=i,this.fire("app-header-reset-layout")}})},_updateScrollState:function(t,e){if(0!==this._height){var i=0,s=0,o=this._top,r=(this._lastScrollTop,this._maxHeaderTop),h=t-this._lastScrollTop,n=Math.abs(h),a=t>this._lastScrollTop,l=Date.now();if(this._mayMove()&&(s=this._clamp(this.reveals?o+h:t,0,r)),t>=this._dHeight&&(s=this.condenses&&!this.fixed?Math.max(this._dHeight,s):s,this.style.transitionDuration="0ms"),this.reveals&&!this.disabled&&n<100&&((l-this._initTimestamp>300||this._wasScrollingDown!==a)&&(this._initScrollTop=t,this._initTimestamp=l),t>=r))if(Math.abs(this._initScrollTop-t)>30||n>10){a&&t>=r?s=r:!a&&t>=this._dHeight&&(s=this.condenses&&!this.fixed?this._dHeight:0);var _=h/(l-this._lastTimestamp);this.style.transitionDuration=this._clamp((s-o)/_,0,300)+"ms"}else s=this._top;i=0===this._dHeight?t>0?1:0:s/this._dHeight,e||(this._lastScrollTop=t,this._top=s,this._wasScrollingDown=a,this._lastTimestamp=l),(e||i!==this._progress||o!==s||0===t)&&(this._progress=i,this._runEffects(i,s),this._transformHeader(s))}},_mayMove:function(){return this.condenses||!this.fixed},willCondense:function(){return this._dHeight>0&&this.condenses},isOnScreen:function(){return 0!==this._height&&this._top<this._height},isContentBelow:function(){return 0===this._top?this._clampedScrollTop>0:this._clampedScrollTop-this._maxHeaderTop>=0},_transformHeader:function(t){this.translate3d(0,-t+"px",0),this._stickyEl&&this.translate3d(0,this.condenses&&t>=this._stickyElTop?Math.min(t,this._dHeight)-this._stickyElTop+"px":0,0,this._stickyEl)},_resizeHandler:function(){this.resetLayout()},_clamp:function(t,e,i){return Math.min(i,Math.max(e,t))},_ensureBgContainers:function(){this._bgContainer||(this._bgContainer=document.createElement("div"),this._bgContainer.id="background",this._bgRear=document.createElement("div"),this._bgRear.id="backgroundRearLayer",this._bgContainer.appendChild(this._bgRear),this._bgFront=document.createElement("div"),this._bgFront.id="backgroundFrontLayer",this._bgContainer.appendChild(this._bgFront),Polymer.dom(this.root).insertBefore(this._bgContainer,this.$.contentContainer))},_getDOMRef:function(t){switch(t){case"backgroundFrontLayer":return this._ensureBgContainers(),this._bgFront;case"backgroundRearLayer":return this._ensureBgContainers(),this._bgRear;case"background":return this._ensureBgContainers(),this._bgContainer;case"mainTitle":return Polymer.dom(this).querySelector("[main-title]");case"condensedTitle":return Polymer.dom(this).querySelector("[condensed-title]")}return null},getScrollState:function(){return{progress:this._progress,top:this._top}}})</script></dom-module><dom-module id="app-toolbar" assetpath="../bower_components/app-layout/app-toolbar/"><template><style>:host{@apply(--layout-horizontal);@apply(--layout-center);position:relative;height:64px;padding:0 16px;pointer-events:none;font-size:var(--app-toolbar-font-size,20px)}::content>*{pointer-events:auto}::content>paper-icon-button{font-size:0}::content>[condensed-title],::content>[main-title]{pointer-events:none;@apply(--layout-flex)}::content>[bottom-item]{position:absolute;right:0;bottom:0;left:0}::content>[top-item]{position:absolute;top:0;right:0;left:0}::content>[spacer]{margin-left:64px}</style><content></content></template><script>Polymer({is:"app-toolbar"})</script></dom-module><dom-module id="ha-menu-button" assetpath="components/"><template><style>.invisible{visibility:hidden}</style><paper-icon-button icon="mdi:menu" class$="[[computeMenuButtonClass(narrow, showMenu)]]" on-tap="toggleMenu"></paper-icon-button></template></dom-module><script>Polymer({is:"ha-menu-button",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1}},computeMenuButtonClass:function(e,n){return!e&&n?"invisible":""},toggleMenu:function(){this.fire("open-menu")}})</script><dom-module id="ha-label-badge" assetpath="/"><template><style>.badge-container{display:inline-block;text-align:center;vertical-align:top;margin-bottom:16px}.label-badge{position:relative;display:block;margin:0 auto;width:2.5em;text-align:center;height:2.5em;line-height:2.5em;font-size:1.5em;border-radius:50%;border:.1em solid var(--ha-label-badge-color,--default-primary-color);color:#4c4c4c;white-space:nowrap;background-color:#fff;background-size:cover;transition:border .3s ease-in-out}.label-badge .value{font-size:90%;overflow:hidden;text-overflow:ellipsis}.label-badge .value.big{font-size:70%}.label-badge .label{position:absolute;bottom:-1em;left:0;right:0;line-height:1em;font-size:.5em}.label-badge .label span{max-width:80%;display:inline-block;background-color:var(--ha-label-badge-color,--default-primary-color);color:#fff;border-radius:1em;padding:4px 8px;font-weight:500;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;transition:background-color .3s ease-in-out}.badge-container .title{margin-top:1em;font-size:.9em;width:5em;font-weight:300;overflow:hidden;text-overflow:ellipsis;line-height:normal}iron-image{border-radius:50%}[hidden]{display:none!important}</style><div class="badge-container"><div class="label-badge" id="badge"><div class$="[[computeClasses(value)]]"><iron-icon icon="[[icon]]" hidden$="[[computeHideIcon(icon, value, image)]]"></iron-icon><span hidden$="[[computeHideValue(value, image)]]">[[value]]</span></div><div class="label" hidden$="[[!label]]"><span>[[label]]</span></div></div><div class="title">[[description]]</div></div></template></dom-module><script>Polymer({is:"ha-label-badge",properties:{value:{type:String,value:null},icon:{type:String,value:null},label:{type:String,value:null},description:{type:String},image:{type:String,value:null,observer:"imageChanged"}},computeClasses:function(e){return e&&e.length>4?"value big":"value"},computeHideIcon:function(e,n,l){return!e||n||l},computeHideValue:function(e,n){return!e||n},imageChanged:function(e){this.$.badge.style.backgroundImage=e?"url("+e+")":""}})</script><dom-module id="ha-demo-badge" assetpath="components/"><template><style>:host{--ha-label-badge-color:#dac90d}</style><ha-label-badge icon="mdi:emoticon" label="Demo" description=""></ha-label-badge></template></dom-module><script>Polymer({is:"ha-demo-badge"})</script><dom-module id="ha-state-label-badge" assetpath="components/entity/"><template><style>:host{cursor:pointer}ha-label-badge{--ha-label-badge-color:rgb(223, 76, 30)}.blue{--ha-label-badge-color:#039be5}.green{--ha-label-badge-color:#0DA035}.grey{--ha-label-badge-color:var(--paper-grey-500)}</style><ha-label-badge class$="[[computeClasses(state)]]" value="[[computeValue(state)]]" icon="[[computeIcon(state)]]" image="[[computeImage(state)]]" label="[[computeLabel(state)]]" description="[[computeDescription(state)]]"></ha-label-badge></template></dom-module><script>Polymer({is:"ha-state-label-badge",properties:{hass:{type:Object},state:{type:Object,observer:"stateChanged"}},listeners:{tap:"badgeTap"},badgeTap:function(e){e.stopPropagation(),this.async(function(){this.hass.moreInfoActions.selectEntity(this.state.entityId)},1)},computeClasses:function(e){switch(e.domain){case"binary_sensor":case"updater":return"blue";default:return""}},computeValue:function(e){switch(e.domain){case"binary_sensor":case"device_tracker":case"updater":case"sun":case"alarm_control_panel":return null;case"sensor":default:return"unknown"===e.state?"-":e.state}},computeIcon:function(e){if("unavailable"===e.state)return null;switch(e.domain){case"alarm_control_panel":return"pending"===e.state?"mdi:clock-fast":"armed_away"===e.state?"mdi:nature":"armed_home"===e.state?"mdi:home-variant":"triggered"===e.state?"mdi:alert-circle":window.hassUtil.domainIcon(e.domain,e.state);case"binary_sensor":case"device_tracker":case"updater":return window.hassUtil.stateIcon(e);case"sun":return"above_horizon"===e.state?window.hassUtil.domainIcon(e.domain):"mdi:brightness-3";default:return null}},computeImage:function(e){return e.attributes.entity_picture||null},computeLabel:function(e){if("unavailable"===e.state)return"unavai";switch(e.domain){case"device_tracker":return"not_home"===e.state?"Away":e.state;case"alarm_control_panel":return"pending"===e.state?"pend":"armed_away"===e.state||"armed_home"===e.state?"armed":"triggered"===e.state?"trig":"disarm";default:return e.attributes.unit_of_measurement||null}},computeDescription:function(e){return e.entityDisplay},stateChanged:function(){this.updateStyles()}})</script><dom-module id="ha-badges-card" assetpath="cards/"><template><template is="dom-repeat" items="[[states]]"><ha-state-label-badge hass="[[hass]]" state="[[item]]"></ha-state-label-badge></template></template></dom-module><script>Polymer({is:"ha-badges-card",properties:{hass:{type:Object},states:{type:Array}}})</script><dom-module id="paper-material" assetpath="../bower_components/paper-material/"><template><style include="paper-material-shared-styles"></style><style>:host([animated]){@apply(--shadow-transition)}</style><content></content></template></dom-module><script>Polymer({is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}})</script><dom-module id="ha-camera-card" assetpath="cards/"><template><style include="paper-material">:host{display:block;position:relative;font-size:0;border-radius:2px;cursor:pointer;min-height:48px;line-height:0}.camera-feed{width:100%;height:auto;border-radius:2px}.caption{@apply(--paper-font-common-nowrap);position:absolute;left:0;right:0;bottom:0;border-bottom-left-radius:2px;border-bottom-right-radius:2px;background-color:rgba(0,0,0,.3);padding:16px;font-size:16px;font-weight:500;line-height:16px;color:#fff}</style><img src="[[cameraFeedSrc]]" class="camera-feed" hidden$="[[!imageLoaded]]" on-load="imageLoadSuccess" on-error="imageLoadFail" alt="[[stateObj.entityDisplay]]"><div class="caption">[[stateObj.entityDisplay]]<template is="dom-if" if="[[!imageLoaded]]">(Error loading image)</template></div></template></dom-module><script>Polymer({is:"ha-camera-card",UPDATE_INTERVAL:1e4,properties:{hass:{type:Object},stateObj:{type:Object,observer:"updateCameraFeedSrc"},cameraFeedSrc:{type:String},imageLoaded:{type:Boolean,value:!0},elevation:{type:Number,value:1,reflectToAttribute:!0}},listeners:{tap:"cardTapped"},attached:function(){this.timer=setInterval(function(){this.updateCameraFeedSrc(this.stateObj)}.bind(this),this.UPDATE_INTERVAL)},detached:function(){clearInterval(this.timer)},cardTapped:function(){this.async(function(){this.hass.moreInfoActions.selectEntity(this.stateObj.entityId)}.bind(this),1)},updateCameraFeedSrc:function(e){const t=e.attributes,a=(new Date).getTime();this.cameraFeedSrc=t.entity_picture+"&time="+a},imageLoadSuccess:function(){this.imageLoaded=!0},imageLoadFail:function(){this.imageLoaded=!1}})</script><dom-module id="ha-card" assetpath="/"><template><style include="paper-material">:host{display:block;border-radius:2px;transition:all .3s ease-out;background-color:#fff}.header{@apply(--paper-font-headline);@apply(--paper-font-common-expensive-kerning);opacity:var(--dark-primary-opacity);padding:24px 16px 16px;text-transform:capitalize}</style><template is="dom-if" if="[[header]]"><div class="header">[[header]]</div></template><slot></slot></template></dom-module><script>Polymer({is:"ha-card",properties:{header:{type:String},elevation:{type:Number,value:1,reflectToAttribute:!0}}})</script><dom-module id="paper-toggle-button" assetpath="../bower_components/paper-toggle-button/"><template strip-whitespace=""><style>:host{display:inline-block;@apply(--layout-horizontal);@apply(--layout-center);@apply(--paper-font-common-base)}:host([disabled]){pointer-events:none}:host(:focus){outline:0}.toggle-bar{position:absolute;height:100%;width:100%;border-radius:8px;pointer-events:none;opacity:.4;transition:background-color linear .08s;background-color:var(--paper-toggle-button-unchecked-bar-color,#000);@apply(--paper-toggle-button-unchecked-bar)}.toggle-button{position:absolute;top:-3px;left:0;height:20px;width:20px;border-radius:50%;box-shadow:0 1px 5px 0 rgba(0,0,0,.6);transition:-webkit-transform linear .08s,background-color linear .08s;transition:transform linear .08s,background-color linear .08s;will-change:transform;background-color:var(--paper-toggle-button-unchecked-button-color,--paper-grey-50);@apply(--paper-toggle-button-unchecked-button)}.toggle-button.dragging{-webkit-transition:none;transition:none}:host([checked]:not([disabled])) .toggle-bar{opacity:.5;background-color:var(--paper-toggle-button-checked-bar-color,--primary-color);@apply(--paper-toggle-button-checked-bar)}:host([disabled]) .toggle-bar{background-color:#000;opacity:.12}:host([checked]) .toggle-button{-webkit-transform:translate(16px,0);transform:translate(16px,0)}:host([checked]:not([disabled])) .toggle-button{background-color:var(--paper-toggle-button-checked-button-color,--primary-color);@apply(--paper-toggle-button-checked-button)}:host([disabled]) .toggle-button{background-color:#bdbdbd;opacity:1}.toggle-ink{position:absolute;top:-14px;left:-14px;right:auto;bottom:auto;width:48px;height:48px;opacity:.5;pointer-events:none;color:var(--paper-toggle-button-unchecked-ink-color,--primary-text-color)}:host([checked]) .toggle-ink{color:var(--paper-toggle-button-checked-ink-color,--primary-color)}.toggle-container{display:inline-block;position:relative;width:36px;height:14px;margin:4px 1px}.toggle-label{position:relative;display:inline-block;vertical-align:middle;padding-left:var(--paper-toggle-button-label-spacing,8px);pointer-events:none;color:var(--paper-toggle-button-label-color,--primary-text-color)}:host([invalid]) .toggle-bar{background-color:var(--paper-toggle-button-invalid-bar-color,--error-color)}:host([invalid]) .toggle-button{background-color:var(--paper-toggle-button-invalid-button-color,--error-color)}:host([invalid]) .toggle-ink{color:var(--paper-toggle-button-invalid-ink-color,--error-color)}</style><div class="toggle-container"><div id="toggleBar" class="toggle-bar"></div><div id="toggleButton" class="toggle-button"></div></div><div class="toggle-label"><content></content></div></template><script>Polymer({is:"paper-toggle-button",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},attached:function(){Polymer.RenderStatus.afterNextRender(this,function(){this.setScrollDirection("y")})},_ontrack:function(t){var e=t.detail;"start"===e.state?this._trackStart(e):"track"===e.state?this._trackMove(e):"end"===e.state&&this._trackEnd(e)},_trackStart:function(t){this._width=this.$.toggleBar.offsetWidth/2,this._trackChecked=this.checked,this.$.toggleButton.classList.add("dragging")},_trackMove:function(t){var e=t.dx;this._x=Math.min(this._width,Math.max(0,this._trackChecked?this._width+e:e)),this.translate3d(this._x+"px",0,0,this.$.toggleButton),this._userActivate(this._x>this._width/2)},_trackEnd:function(t){this.$.toggleButton.classList.remove("dragging"),this.transform("",this.$.toggleButton)},_createRipple:function(){this._rippleContainer=this.$.toggleButton;var t=Polymer.PaperRippleBehavior._createRipple();return t.id="ink",t.setAttribute("recenters",""),t.classList.add("circle","toggle-ink"),t}})</script></dom-module><dom-module id="ha-entity-toggle" assetpath="components/entity/"><template><style>:host{white-space:nowrap}paper-icon-button{color:var(--primary-text-color);transition:color .5s}paper-icon-button[state-active]{color:var(--default-primary-color)}paper-toggle-button{cursor:pointer;--paper-toggle-button-label-spacing:0;padding:13px 5px;margin:-4px -5px}</style><template is="dom-if" if="[[stateObj.attributes.assumed_state]]"><paper-icon-button icon="mdi:flash-off" on-tap="turnOff" state-active$="[[!isOn]]"></paper-icon-button><paper-icon-button icon="mdi:flash" on-tap="turnOn" state-active$="[[isOn]]"></paper-icon-button></template><template is="dom-if" if="[[!stateObj.attributes.assumed_state]]"><paper-toggle-button class="self-center" checked="[[toggleChecked]]" on-change="toggleChanged"></paper-toggle-button></template></template></dom-module><script>Polymer({is:"ha-entity-toggle",properties:{hass:{type:Object},stateObj:{type:Object},toggleChecked:{type:Boolean,value:!1},isOn:{type:Boolean,computed:"computeIsOn(stateObj)",observer:"isOnChanged"}},listeners:{tap:"onTap"},onTap:function(t){t.stopPropagation()},ready:function(){this.forceStateChange()},toggleChanged:function(t){var e=t.target.checked;e&&!this.isOn?this.callService(!0):!e&&this.isOn&&this.callService(!1)},isOnChanged:function(t){this.toggleChecked=t},forceStateChange:function(){this.toggleChecked===this.isOn&&(this.toggleChecked=!this.toggleChecked),this.toggleChecked=this.isOn},turnOn:function(){this.callService(!0)},turnOff:function(){this.callService(!1)},computeIsOn:function(t){return t&&window.hassUtil.OFF_STATES.indexOf(t.state)===-1},callService:function(t){var e,i,n;"lock"===this.stateObj.domain?(e="lock",i=t?"lock":"unlock"):"garage_door"===this.stateObj.domain?(e="garage_door",i=t?"open":"close"):(e="homeassistant",i=t?"turn_on":"turn_off"),n=this.stateObj,this.hass.serviceActions.callService(e,i,{entity_id:this.stateObj.entityId}).then(function(){setTimeout(function(){this.stateObj===n&&this.forceStateChange()}.bind(this),2e3)}.bind(this))}})</script><dom-module id="ha-state-icon" assetpath="/"><template><iron-icon icon="[[computeIcon(stateObj)]]"></iron-icon></template></dom-module><script>Polymer({is:"ha-state-icon",properties:{stateObj:{type:Object}},computeIcon:function(t){return window.hassUtil.stateIcon(t)}})</script><dom-module id="state-badge" assetpath="components/entity/"><template><style>:host{position:relative;display:inline-block;width:40px;color:#44739E;border-radius:50%;height:40px;text-align:center;background-size:cover;line-height:40px}ha-state-icon{transition:color .3s ease-in-out}ha-state-icon[data-domain=binary_sensor][data-state=on],ha-state-icon[data-domain=light][data-state=on],ha-state-icon[data-domain=sun][data-state=above_horizon],ha-state-icon[data-domain=switch][data-state=on]{color:#FDD835}ha-state-icon[data-state=unavailable]{color:var(--disabled-text-color)}</style><ha-state-icon id="icon" state-obj="[[stateObj]]" data-domain$="[[stateObj.domain]]" data-state$="[[stateObj.state]]"></ha-state-icon></template></dom-module><script>Polymer({is:"state-badge",properties:{stateObj:{type:Object,observer:"updateIconColor"}},updateIconColor:function(t){return t.attributes.entity_picture?(this.style.backgroundImage="url("+t.attributes.entity_picture+")",void(this.$.icon.style.display="none")):(this.style.backgroundImage="",this.$.icon.style.display="inline",void("light"===t.domain&&"on"===t.state&&t.attributes.rgb_color&&t.attributes.rgb_color.reduce(function(t,e){return t+e},0)<730?this.$.icon.style.color="rgb("+t.attributes.rgb_color.join(",")+")":this.$.icon.style.color=null))}})</script><script>Polymer({is:"ha-relative-time",properties:{datetime:{type:String,observer:"datetimeChanged"},datetimeObj:{type:Object,observer:"datetimeObjChanged"},parsedDateTime:{type:Object}},created:function(){this.updateRelative=this.updateRelative.bind(this)},attached:function(){this.updateInterval=setInterval(this.updateRelative,6e4)},detached:function(){clearInterval(this.updateInterval)},datetimeChanged:function(e){this.parsedDateTime=e?new Date(e):null,this.updateRelative()},datetimeObjChanged:function(e){this.parsedDateTime=e,this.updateRelative()},updateRelative:function(){var e=Polymer.dom(this);e.innerHTML=this.parsedDateTime?window.hassUtil.relativeTime(this.parsedDateTime):"never"}})</script><dom-module id="state-info" assetpath="components/entity/"><template><style>:host{@apply(--paper-font-body1);min-width:150px;white-space:nowrap}state-badge{float:left}.info{margin-left:56px}.name{@apply(--paper-font-common-nowrap);color:var(--primary-text-color);line-height:40px}.name[in-dialog]{line-height:20px}.time-ago{@apply(--paper-font-common-nowrap);color:var(--secondary-text-color)}</style><div><state-badge state-obj="[[stateObj]]"></state-badge><div class="info"><div class="name" in-dialog$="[[inDialog]]">[[stateObj.entityDisplay]]</div><template is="dom-if" if="[[inDialog]]"><div class="time-ago"><ha-relative-time datetime-obj="[[stateObj.lastChangedAsDate]]"></ha-relative-time></div></template></div></div></template></dom-module><script>Polymer({is:"state-info",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object},inDialog:{type:Boolean}}})</script><dom-module id="state-card-climate" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>:host{@apply(--paper-font-body1);line-height:1.5}.state{margin-left:16px;text-align:right}.target{color:var(--primary-text-color)}.current{color:var(--secondary-text-color)}.operation-mode{font-weight:700;text-transform:capitalize}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><div class="state"><div class="target"><span class="operation-mode">[[stateObj.attributes.operation_mode]] </span><span>[[computeTargetTemperature(stateObj)]]</span></div><div class="current"><span>Currently: </span><span>[[stateObj.attributes.current_temperature]]</span> <span></span> <span>[[stateObj.attributes.unit_of_measurement]]</span></div></div></div></template></dom-module><script>Polymer({is:"state-card-climate",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},computeTargetTemperature:function(t){var e="";return t.attributes.target_temp_low&&t.attributes.target_temp_high?e=t.attributes.target_temp_low+" - "+t.attributes.target_temp_high+" "+t.attributes.unit_of_measurement:t.attributes.temperature&&(e=t.attributes.temperature+" "+t.attributes.unit_of_measurement),e}})</script><dom-module id="state-card-configurator" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-button{color:var(--default-primary-color);font-weight:500;top:3px;height:37px;margin-right:-.57em}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><paper-button hidden$="[[inDialog]]">[[stateObj.state]]</paper-button></div><template is="dom-if" if="[[stateObj.attributes.description_image]]"><img hidden="" src="[[stateObj.attributes.description_image]]"></template></template></dom-module><script>Polymer({is:"state-card-configurator",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}}})</script><dom-module id="state-card-cover" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>:host{line-height:1.5}.state{text-align:right;white-space:nowrap;width:127px}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><div class="state"><paper-icon-button icon="mdi:arrow-up" on-tap="onOpenTap" disabled="[[computeIsFullyOpen(stateObj)]]"></paper-icon-button><paper-icon-button icon="mdi:stop" on-tap="onStopTap"></paper-icon-button><paper-icon-button icon="mdi:arrow-down" on-tap="onCloseTap" disabled="[[computeIsFullyClosed(stateObj)]]"></paper-icon-button></div></div></template></dom-module><script>Polymer({is:"state-card-cover",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},computeIsFullyOpen:function(t){return void 0!==t.attributes.current_position?100===t.attributes.current_position:"open"===t.state},computeIsFullyClosed:function(t){return void 0!==t.attributes.current_position?0===t.attributes.current_position:"closed"===t.state},onOpenTap:function(){this.hass.serviceActions.callService("cover","open_cover",{entity_id:this.stateObj.entityId})},onCloseTap:function(){this.hass.serviceActions.callService("cover","close_cover",{entity_id:this.stateObj.entityId})},onStopTap:function(){this.hass.serviceActions.callService("cover","stop_cover",{entity_id:this.stateObj.entityId})}})</script><dom-module id="state-card-display" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>.state{@apply(--paper-font-body1);color:var(--primary-text-color);margin-left:16px;text-align:right;line-height:40px}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><div class="state">[[stateObj.stateDisplay]]</div></div></template></dom-module><script>Polymer({is:"state-card-display",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}}})</script><script>Polymer.PaperInputHelper={},Polymer.PaperInputHelper.NextLabelID=1,Polymer.PaperInputHelper.NextAddonID=1,Polymer.PaperInputBehaviorImpl={properties:{label:{type:String},value:{notify:!0,type:String},disabled:{type:Boolean,value:!1},invalid:{type:Boolean,value:!1,notify:!0},preventInvalidInput:{type:Boolean},allowedPattern:{type:String},type:{type:String},list:{type:String},pattern:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},charCounter:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},autoValidate:{type:Boolean,value:!1},validator:{type:String},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,observer:"_autofocusChanged"},inputmode:{type:String},minlength:{type:Number},maxlength:{type:Number},min:{type:String},max:{type:String},step:{type:String},name:{type:String},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1},size:{type:Number},autocapitalize:{type:String,value:"none"},autocorrect:{type:String,value:"off"},autosave:{type:String},results:{type:Number},accept:{type:String},multiple:{type:Boolean},_ariaDescribedBy:{type:String,value:""},_ariaLabelledBy:{type:String,value:""}},listeners:{"addon-attached":"_onAddonAttached"},keyBindings:{"shift+tab:keydown":"_onShiftTabDown"},hostAttributes:{tabindex:0},get inputElement(){return this.$.input},get _focusableElement(){return this.inputElement},registered:function(){this._typesThatHaveText=["date","datetime","datetime-local","month","time","week","file"]},attached:function(){this._updateAriaLabelledBy(),this.inputElement&&this._typesThatHaveText.indexOf(this.inputElement.type)!==-1&&(this.alwaysFloatLabel=!0)},_appendStringWithSpace:function(e,t){return e=e?e+" "+t:t},_onAddonAttached:function(e){var t=e.path?e.path[0]:e.target;if(t.id)this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,t.id);else{var a="paper-input-add-on-"+Polymer.PaperInputHelper.NextAddonID++;t.id=a,this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,a)}},validate:function(){return this.inputElement.validate()},_focusBlurHandler:function(e){Polymer.IronControlState._focusBlurHandler.call(this,e),this.focused&&!this._shiftTabPressed&&this._focusableElement.focus()},_onShiftTabDown:function(e){var t=this.getAttribute("tabindex");this._shiftTabPressed=!0,this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),this._shiftTabPressed=!1},1)},_handleAutoValidate:function(){this.autoValidate&&this.validate()},updateValueAndPreserveCaret:function(e){try{var t=this.inputElement.selectionStart;this.value=e,this.inputElement.selectionStart=t,this.inputElement.selectionEnd=t}catch(t){this.value=e}},_computeAlwaysFloatLabel:function(e,t){return t||e},_updateAriaLabelledBy:function(){var e=Polymer.dom(this.root).querySelector("label");if(!e)return void(this._ariaLabelledBy="");var t;e.id?t=e.id:(t="paper-input-label-"+Polymer.PaperInputHelper.NextLabelID++,e.id=t),this._ariaLabelledBy=t},_onChange:function(e){this.shadowRoot&&this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})},_autofocusChanged:function(){if(this.autofocus&&this._focusableElement){var e=document.activeElement,t=e instanceof HTMLElement,a=t&&e!==document.body&&e!==document.documentElement;a||this._focusableElement.focus()}}},Polymer.PaperInputBehavior=[Polymer.IronControlState,Polymer.IronA11yKeysBehavior,Polymer.PaperInputBehaviorImpl]</script><dom-module id="paper-input-char-counter" assetpath="../bower_components/paper-input/"><template><style>:host{display:inline-block;float:right;@apply(--paper-font-caption);@apply(--paper-input-char-counter)}:host([hidden]){display:none!important}:host-context([dir=rtl]){float:left}</style><span>[[_charCounterStr]]</span></template></dom-module><script>Polymer({is:"paper-input-char-counter",behaviors:[Polymer.PaperInputAddonBehavior],properties:{_charCounterStr:{type:String,value:"0"}},update:function(t){if(t.inputElement){t.value=t.value||"";var e=t.value.toString().length.toString();t.inputElement.hasAttribute("maxlength")&&(e+="/"+t.inputElement.getAttribute("maxlength")),this._charCounterStr=e}}})</script><dom-module id="paper-input" assetpath="../bower_components/paper-input/"><template><style>:host{display:block}:host([focused]){outline:0}:host([hidden]){display:none!important}input::-webkit-input-placeholder{color:var(--paper-input-container-color,--secondary-text-color)}input:-moz-placeholder{color:var(--paper-input-container-color,--secondary-text-color)}input::-moz-placeholder{color:var(--paper-input-container-color,--secondary-text-color)}input:-ms-input-placeholder{color:var(--paper-input-container-color,--secondary-text-color)}label{pointer-events:none}</style><paper-input-container no-label-float="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]"><content select="[prefix]"></content><label hidden$="[[!label]]" aria-hidden="true" for="input">[[label]]</label><input is="iron-input" id="input" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" title$="[[title]]" bind-value="{{value}}" invalid="{{invalid}}" prevent-invalid-input="[[preventInvalidInput]]" allowed-pattern="[[allowedPattern]]" validator="[[validator]]" type$="[[type]]" pattern$="[[pattern]]" required$="[[required]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" min$="[[min]]" max$="[[max]]" step$="[[step]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" list$="[[list]]" size$="[[size]]" autocapitalize$="[[autocapitalize]]" autocorrect$="[[autocorrect]]" on-change="_onChange" tabindex$="[[tabindex]]" autosave$="[[autosave]]" results$="[[results]]" accept$="[[accept]]" multiple$="[[multiple]]"><content select="[suffix]"></content><template is="dom-if" if="[[errorMessage]]"><paper-input-error aria-live="assertive">[[errorMessage]]</paper-input-error></template><template is="dom-if" if="[[charCounter]]"><paper-input-char-counter></paper-input-char-counter></template></paper-input-container></template></dom-module><script>Polymer({is:"paper-input",behaviors:[Polymer.IronFormElementBehavior,Polymer.PaperInputBehavior]})</script><script>Polymer.IronFitBehavior={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){var t;return t=this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){var t;return t=this.fitInto===window?this.fitInto.innerHeight:this.fitInto.getBoundingClientRect().height},get _fitLeft(){var t;return t=this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){var t;return t=this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var t=Polymer.dom(this).parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(t=t.host),t},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign},attached:function(){this._isRTL="rtl"==window.getComputedStyle(this).direction,this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):this.fit())},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var t=window.getComputedStyle(this),i=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==t.top?"top":"auto"!==t.bottom?"bottom":null,horizontally:"auto"!==t.left?"left":"auto"!==t.right?"right":null},sizedBy:{height:"none"!==i.maxHeight,width:"none"!==i.maxWidth,minWidth:parseInt(i.minWidth,10)||0,minHeight:parseInt(i.minHeight,10)||0},margin:{top:parseInt(t.marginTop,10)||0,right:parseInt(t.marginRight,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0}},this.verticalOffset&&(this._fitInfo.margin.top=this._fitInfo.margin.bottom=this.verticalOffset,this._fitInfo.inlineStyle.marginTop=this.style.marginTop||"",this._fitInfo.inlineStyle.marginBottom=this.style.marginBottom||"",this.style.marginTop=this.style.marginBottom=this.verticalOffset+"px"),this.horizontalOffset&&(this._fitInfo.margin.left=this._fitInfo.margin.right=this.horizontalOffset,this._fitInfo.inlineStyle.marginLeft=this.style.marginLeft||"",this._fitInfo.inlineStyle.marginRight=this.style.marginRight||"",this.style.marginLeft=this.style.marginRight=this.horizontalOffset+"px")}},resetFit:function(){var t=this._fitInfo||{};for(var i in t.sizerInlineStyle)this.sizingTarget.style[i]=t.sizerInlineStyle[i];for(var i in t.inlineStyle)this.style[i]=t.inlineStyle[i];this._fitInfo=null},refit:function(){var t=this.sizingTarget.scrollLeft,i=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=t,this.sizingTarget.scrollTop=i},position:function(){if(this.horizontalAlign||this.verticalAlign){this._discoverInfo(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var t=this.getBoundingClientRect(),i=this.__getNormalizedRect(this.positionTarget),e=this.__getNormalizedRect(this.fitInto),n=this._fitInfo.margin,o={width:t.width+n.left+n.right,height:t.height+n.top+n.bottom},h=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,o,i,e),s=h.left+n.left,l=h.top+n.top,r=Math.min(e.right-n.right,s+t.width),a=Math.min(e.bottom-n.bottom,l+t.height),g=this._fitInfo.sizedBy.minWidth,f=this._fitInfo.sizedBy.minHeight;s<n.left&&(s=n.left,r-s<g&&(s=r-g)),l<n.top&&(l=n.top,a-l<f&&(l=a-f)),this.sizingTarget.style.maxWidth=r-s+"px",this.sizingTarget.style.maxHeight=a-l+"px",this.style.left=s-t.left+"px",this.style.top=l-t.top+"px"}},constrain:function(){if(!this.horizontalAlign&&!this.verticalAlign){this._discoverInfo();var t=this._fitInfo;t.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),t.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var i=this.getBoundingClientRect();t.sizedBy.height||this.__sizeDimension(i,t.positionedBy.vertically,"top","bottom","Height"),t.sizedBy.width||this.__sizeDimension(i,t.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(t,i,e,n,o){this.__sizeDimension(t,i,e,n,o)},__sizeDimension:function(t,i,e,n,o){var h=this._fitInfo,s=this.__getNormalizedRect(this.fitInto),l="Width"===o?s.width:s.height,r=i===n,a=r?l-t[n]:t[e],g=h.margin[r?e:n],f="offset"+o,p=this[f]-this.sizingTarget[f];this.sizingTarget.style["max"+o]=l-g-a-p+"px"},center:function(){if(!this.horizontalAlign&&!this.verticalAlign){this._discoverInfo();var t=this._fitInfo.positionedBy;if(!t.vertically||!t.horizontally){this.style.position="fixed",t.vertically||(this.style.top="0px"),t.horizontally||(this.style.left="0px");var i=this.getBoundingClientRect(),e=this.__getNormalizedRect(this.fitInto);if(!t.vertically){var n=e.top-i.top+(e.height-i.height)/2;this.style.top=n+"px"}if(!t.horizontally){var o=e.left-i.left+(e.width-i.width)/2;this.style.left=o+"px"}}}},__getNormalizedRect:function(t){return t===document.documentElement||t===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:t.getBoundingClientRect()},__getCroppedArea:function(t,i,e){var n=Math.min(0,t.top)+Math.min(0,e.bottom-(t.top+i.height)),o=Math.min(0,t.left)+Math.min(0,e.right-(t.left+i.width));return Math.abs(n)*i.width+Math.abs(o)*i.height},__getPosition:function(t,i,e,n,o){var h=[{verticalAlign:"top",horizontalAlign:"left",top:n.top,left:n.left},{verticalAlign:"top",horizontalAlign:"right",top:n.top,left:n.right-e.width},{verticalAlign:"bottom",horizontalAlign:"left",top:n.bottom-e.height,left:n.left},{verticalAlign:"bottom",horizontalAlign:"right",top:n.bottom-e.height,left:n.right-e.width}];if(this.noOverlap){for(var s=0,l=h.length;s<l;s++){var r={};for(var a in h[s])r[a]=h[s][a];h.push(r)}h[0].top=h[1].top+=n.height,h[2].top=h[3].top-=n.height,h[4].left=h[6].left+=n.width,h[5].left=h[7].left-=n.width}i="auto"===i?null:i,t="auto"===t?null:t;for(var g,s=0;s<h.length;s++){var f=h[s];if(!this.dynamicAlign&&!this.noOverlap&&f.verticalAlign===i&&f.horizontalAlign===t){g=f;break}var p=!(i&&f.verticalAlign!==i||t&&f.horizontalAlign!==t);if(this.dynamicAlign||p){g=g||f,f.croppedArea=this.__getCroppedArea(f,e,o);var d=f.croppedArea-g.croppedArea;if((d<0||0===d&&p)&&(g=f),0===g.croppedArea&&p)break}}return g}}</script><dom-module id="iron-overlay-backdrop" assetpath="/"><template><style>:host{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--iron-overlay-backdrop-background-color,#000);opacity:0;transition:opacity .2s;pointer-events:none;@apply(--iron-overlay-backdrop)}:host(.opened){opacity:var(--iron-overlay-backdrop-opacity,.6);pointer-events:auto;@apply(--iron-overlay-backdrop-opened)}</style><content></content></template></dom-module><script>!function(){"use strict";Polymer({is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&Polymer.dom(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||Polymer.dom(this.parentNode).removeChild(this)},_onTransitionend:function(e){e&&e.target===this&&this.complete()},_openedChanged:function(e){if(e)this.prepare();else{var t=window.getComputedStyle(this);"0s"!==t.transitionDuration&&0!=t.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}})}()</script><script>Polymer.IronOverlayManagerClass=function(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,Polymer.Gestures.add(document,"tap",this._onCaptureClick.bind(this)),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)},Polymer.IronOverlayManagerClass.prototype={constructor:Polymer.IronOverlayManagerClass,get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement},get deepActiveElement(){for(var e=document.activeElement||document.body;e.root&&Polymer.dom(e.root).activeElement;)e=Polymer.dom(e.root).activeElement;return e},_bringOverlayAtIndexToFront:function(e){var t=this._overlays[e];if(t){var r=this._overlays.length-1,a=this._overlays[r];if(a&&this._shouldBeBehindOverlay(t,a)&&r--,!(e>=r)){var n=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(t)<=n&&this._applyOverlayZ(t,n);e<r;)this._overlays[e]=this._overlays[e+1],e++;this._overlays[r]=t}}},addOrRemoveOverlay:function(e){e.opened?this.addOverlay(e):this.removeOverlay(e)},addOverlay:function(e){var t=this._overlays.indexOf(e);if(t>=0)return this._bringOverlayAtIndexToFront(t),void this.trackBackdrop();var r=this._overlays.length,a=this._overlays[r-1],n=Math.max(this._getZ(a),this._minimumZ),o=this._getZ(e);if(a&&this._shouldBeBehindOverlay(e,a)){this._applyOverlayZ(a,n),r--;var i=this._overlays[r-1];n=Math.max(this._getZ(i),this._minimumZ)}o<=n&&this._applyOverlayZ(e,n),this._overlays.splice(r,0,e),this.trackBackdrop()},removeOverlay:function(e){var t=this._overlays.indexOf(e);t!==-1&&(this._overlays.splice(t,1),this.trackBackdrop())},currentOverlay:function(){var e=this._overlays.length-1;return this._overlays[e]},currentOverlayZ:function(){return this._getZ(this.currentOverlay())},ensureMinimumZ:function(e){this._minimumZ=Math.max(this._minimumZ,e)},focusOverlay:function(){var e=this.currentOverlay();e&&e._applyFocus()},trackBackdrop:function(){var e=this._overlayWithBackdrop();(e||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(e)-1,this.backdropElement.opened=!!e)},getBackdrops:function(){for(var e=[],t=0;t<this._overlays.length;t++)this._overlays[t].withBackdrop&&e.push(this._overlays[t]);return e},backdropZ:function(){return this._getZ(this._overlayWithBackdrop())-1},_overlayWithBackdrop:function(){for(var e=0;e<this._overlays.length;e++)if(this._overlays[e].withBackdrop)return this._overlays[e]},_getZ:function(e){var t=this._minimumZ;if(e){var r=Number(e.style.zIndex||window.getComputedStyle(e).zIndex);r===r&&(t=r)}return t},_setZ:function(e,t){e.style.zIndex=t},_applyOverlayZ:function(e,t){this._setZ(e,t+2)},_overlayInPath:function(e){e=e||[];for(var t=0;t<e.length;t++)if(e[t]._manager===this)return e[t]},_onCaptureClick:function(e){var t=this.currentOverlay();t&&this._overlayInPath(Polymer.dom(e).path)!==t&&t._onCaptureClick(e)},_onCaptureFocus:function(e){var t=this.currentOverlay();t&&t._onCaptureFocus(e)},_onCaptureKeyDown:function(e){var t=this.currentOverlay();t&&(Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,"esc")?t._onCaptureEsc(e):Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,"tab")&&t._onCaptureTab(e))},_shouldBeBehindOverlay:function(e,t){return!e.alwaysOnTop&&t.alwaysOnTop}},Polymer.IronOverlayManager=new Polymer.IronOverlayManagerClass</script><script>!function(){"use strict";var e=Element.prototype,t=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;Polymer.IronFocusablesHelper={getTabbableNodes:function(e){var t=[],r=this._collectTabbableNodes(e,t);return r?this._sortByTabIndex(t):t},isFocusable:function(e){return t.call(e,"input, select, textarea, button, object")?t.call(e,":not([disabled])"):t.call(e,"a[href], area[href], iframe, [tabindex], [contentEditable]")},isTabbable:function(e){return this.isFocusable(e)&&t.call(e,':not([tabindex="-1"])')&&this._isVisible(e)},_normalizedTabIndex:function(e){if(this.isFocusable(e)){var t=e.getAttribute("tabindex")||0;return Number(t)}return-1},_collectTabbableNodes:function(e,t){if(e.nodeType!==Node.ELEMENT_NODE||!this._isVisible(e))return!1;var r=e,a=this._normalizedTabIndex(r),i=a>0;a>=0&&t.push(r);var n;n="content"===r.localName?Polymer.dom(r).getDistributedNodes():Polymer.dom(r.root||r).children;for(var o=0;o<n.length;o++){var s=this._collectTabbableNodes(n[o],t);i=i||s}return i},_isVisible:function(e){var t=e.style;return"hidden"!==t.visibility&&"none"!==t.display&&(t=window.getComputedStyle(e),"hidden"!==t.visibility&&"none"!==t.display)},_sortByTabIndex:function(e){var t=e.length;if(t<2)return e;var r=Math.ceil(t/2),a=this._sortByTabIndex(e.slice(0,r)),i=this._sortByTabIndex(e.slice(r));return this._mergeSortByTabIndex(a,i)},_mergeSortByTabIndex:function(e,t){for(var r=[];e.length>0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?r.push(t.shift()):r.push(e.shift());return r.concat(e,t)},_hasLowerTabOrder:function(e,t){var r=Math.max(e.tabIndex,0),a=Math.max(t.tabIndex,0);return 0===r||0===a?a>r:r>a}}}()</script><script>!function(){"use strict";Polymer.IronOverlayBehaviorImpl={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},alwaysOnTop:{type:Boolean},_manager:{type:Object,value:Polymer.IronOverlayManager},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||Polymer.dom(this).querySelector("[autofocus]")||this},get _focusableNodes(){return Polymer.IronFocusablesHelper.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__raf=null,this.__restoreFocusNode=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=Polymer.dom(this).observeNodes(this._onNodesChange)},detached:function(){Polymer.dom(this).unobserveNodes(this._observer),this._observer=null,this.__raf&&(window.cancelAnimationFrame(this.__raf),this.__raf=null),this._manager.removeOverlay(this)},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(e){var t=this.fire("iron-overlay-canceled",e,{cancelable:!0});t.defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(e){e?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__onNextAnimationFrame(this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{this._focusNode.blur(),this._focusedChild=null,this.restoreFocusOnClose&&this.__restoreFocusNode&&this.__restoreFocusNode.focus(),this.__restoreFocusNode=null;var e=this._manager.currentOverlay();e&&this!==e&&e._applyFocus()}},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this.cancel(e)},_onCaptureFocus:function(e){if(this.withBackdrop){var t=Polymer.dom(e).path;t.indexOf(this)===-1?(e.stopPropagation(),this._applyFocus()):this._focusedChild=t[0]}},_onCaptureEsc:function(e){this.noCancelOnEscKey||this.cancel(e)},_onCaptureTab:function(e){if(this.withBackdrop){this.__ensureFirstLastFocusables();var t=e.shiftKey,i=t?this.__firstFocusableNode:this.__lastFocusableNode,s=t?this.__lastFocusableNode:this.__firstFocusableNode,o=!1;if(i===s)o=!0;else{var n=this._manager.deepActiveElement;o=n===i||n===this}o&&(e.preventDefault(),this._focusedChild=s,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__onNextAnimationFrame(this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){if(!this.__firstFocusableNode||!this.__lastFocusableNode){var e=this._focusableNodes;this.__firstFocusableNode=e[0],this.__lastFocusableNode=e[e.length-1]}},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__onNextAnimationFrame:function(e){this.__raf&&window.cancelAnimationFrame(this.__raf);var t=this;this.__raf=window.requestAnimationFrame(function(){t.__raf=null,e.call(t)})}},Polymer.IronOverlayBehavior=[Polymer.IronFitBehavior,Polymer.IronResizableBehavior,Polymer.IronOverlayBehaviorImpl]}()</script><script>Polymer.NeonAnimatableBehavior={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(i,n){for(var t in n)i[t]=n[t]},_cloneConfig:function(i){var n={isClone:!0};return this._copyProperties(n,i),n},_getAnimationConfigRecursive:function(i,n,t){if(this.animationConfig){if(this.animationConfig.value&&"function"==typeof this.animationConfig.value)return void this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));var o;if(o=i?this.animationConfig[i]:this.animationConfig,Array.isArray(o)||(o=[o]),o)for(var e,a=0;e=o[a];a++)if(e.animatable)e.animatable._getAnimationConfigRecursive(e.type||i,n,t);else if(e.id){var r=n[e.id];r?(r.isClone||(n[e.id]=this._cloneConfig(r),r=n[e.id]),this._copyProperties(r,e)):n[e.id]=e}else t.push(e)}},getAnimationConfig:function(i){var n={},t=[];this._getAnimationConfigRecursive(i,n,t);for(var o in n)t.push(n[o]);return t}}</script><script>Polymer.NeonAnimationRunnerBehaviorImpl={_configureAnimations:function(n){var i=[];if(n.length>0)for(var e,t=0;e=n[t];t++){var o=document.createElement(e.name);if(o.isNeonAnimation){var a=null;try{a=o.configure(e),"function"!=typeof a.cancel&&(a=document.timeline.play(a))}catch(n){a=null,console.warn("Couldnt play","(",e.name,").",n)}a&&i.push({neonAnimation:o,config:e,animation:a})}else console.warn(this.is+":",e.name,"not found!")}return i},_shouldComplete:function(n){for(var i=!0,e=0;e<n.length;e++)if("finished"!=n[e].animation.playState){i=!1;break}return i},_complete:function(n){for(var i=0;i<n.length;i++)n[i].neonAnimation.complete(n[i].config);for(var i=0;i<n.length;i++)n[i].animation.cancel()},playAnimation:function(n,i){var e=this.getAnimationConfig(n);if(e){this._active=this._active||{},this._active[n]&&(this._complete(this._active[n]),delete this._active[n]);var t=this._configureAnimations(e);if(0==t.length)return void this.fire("neon-animation-finish",i,{bubbles:!1});this._active[n]=t;for(var o=0;o<t.length;o++)t[o].animation.onfinish=function(){this._shouldComplete(t)&&(this._complete(t),delete this._active[n],this.fire("neon-animation-finish",i,{bubbles:!1}))}.bind(this)}},cancelAnimation:function(){for(var n in this._animations)this._animations[n].cancel();this._animations={}}},Polymer.NeonAnimationRunnerBehavior=[Polymer.NeonAnimatableBehavior,Polymer.NeonAnimationRunnerBehaviorImpl]</script><script>Polymer.NeonAnimationBehavior={properties:{animationTiming:{type:Object,value:function(){return{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"both"}}}},isNeonAnimation:!0,timingFromConfig:function(i){if(i.timing)for(var n in i.timing)this.animationTiming[n]=i.timing[n];return this.animationTiming},setPrefixedProperty:function(i,n,r){for(var t,o={transform:["webkitTransform"],transformOrigin:["mozTransformOrigin","webkitTransformOrigin"]},e=o[n],m=0;t=e[m];m++)i.style[t]=r;i.style[n]=r},complete:function(){}}</script><script>!function(a,b){var c={},d={},e={},f=null;!function(t,e){function i(t){if("number"==typeof t)return t;var e={};for(var i in t)e[i]=t[i];return e}function n(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=E}function r(){return t.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function o(e,i,r){var o=new n;return i&&(o.fill="both",o.duration="auto"),"number"!=typeof e||isNaN(e)?void 0!==e&&Object.getOwnPropertyNames(e).forEach(function(i){if("auto"!=e[i]){if(("number"==typeof o[i]||"duration"==i)&&("number"!=typeof e[i]||isNaN(e[i])))return;if("fill"==i&&w.indexOf(e[i])==-1)return;if("direction"==i&&T.indexOf(e[i])==-1)return;if("playbackRate"==i&&1!==e[i]&&t.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;o[i]=e[i]}}):o.duration=e,o}function a(t){return"number"==typeof t&&(t=isNaN(t)?{duration:0}:{duration:t}),t}function s(e,i){return e=t.numericTimingToObject(e),o(e,i)}function u(t,e,i,n){return t<0||t>1||i<0||i>1?E:function(r){function o(t,e,i){return 3*t*(1-i)*(1-i)*i+3*e*(1-i)*i*i+i*i*i}if(r<=0){var a=0;return t>0?a=e/t:!e&&i>0&&(a=n/i),a*r}if(r>=1){var s=0;return i<1?s=(n-1)/(i-1):1==i&&t<1&&(s=(e-1)/(t-1)),1+s*(r-1)}for(var u=0,c=1;u<c;){var f=(u+c)/2,l=o(t,i,f);if(Math.abs(r-l)<1e-5)return o(e,n,f);l<r?u=f:c=f}return o(e,n,f)}}function c(t,e){return function(i){if(i>=1)return 1;var n=1/t;return i+=e*n,i-i%n}}function f(t){R||(R=document.createElement("div").style),R.animationTimingFunction="",R.animationTimingFunction=t;var e=R.animationTimingFunction;if(""==e&&r())throw new TypeError(t+" is not a valid value for easing");return e}function l(t){if("linear"==t)return E;var e=O.exec(t);if(e)return u.apply(this,e.slice(1).map(Number));var i=k.exec(t);if(i)return c(Number(i[1]),{start:x,middle:A,end:P}[i[2]]);var n=j[t];return n?n:E}function h(t){return Math.abs(m(t)/t.playbackRate)}function m(t){return 0===t.duration||0===t.iterations?0:t.duration*t.iterations}function d(t,e,i){if(null==e)return S;var n=i.delay+t+i.endDelay;return e<Math.min(i.delay,n)?C:e>=Math.min(i.delay+t,n)?D:F}function p(t,e,i,n,r){switch(n){case C:return"backwards"==e||"both"==e?0:null;case F:return i-r;case D:return"forwards"==e||"both"==e?t:null;case S:return null}}function _(t,e,i,n,r){var o=r;return 0===t?e!==C&&(o+=i):o+=n/t,o}function g(t,e,i,n,r,o){var a=t===1/0?e%1:t%1;return 0!==a||i!==D||0===n||0===r&&0!==o||(a=1),a}function b(t,e,i,n){return t===D&&e===1/0?1/0:1===i?Math.floor(n)-1:Math.floor(n)}function v(t,e,i){var n=t;if("normal"!==t&&"reverse"!==t){var r=e;"alternate-reverse"===t&&(r+=1),n="normal",r!==1/0&&r%2!==0&&(n="reverse")}return"normal"===n?i:1-i}function y(t,e,i){var n=d(t,e,i),r=p(t,i.fill,e,n,i.delay);if(null===r)return null;var o=_(i.duration,n,i.iterations,r,i.iterationStart),a=g(o,i.iterationStart,n,i.iterations,r,i.duration),s=b(n,i.iterations,a,o),u=v(i.direction,s,a);return i._easingFunction(u)}var w="backwards|forwards|both|none".split("|"),T="reverse|alternate|alternate-reverse".split("|"),E=function(t){return t};n.prototype={_setMember:function(e,i){this["_"+e]=i,this._effect&&(this._effect._timingInput[e]=i,this._effect._timing=t.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=t.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(t){this._setMember("delay",t)},get delay(){return this._delay},set endDelay(t){this._setMember("endDelay",t)},get endDelay(){return this._endDelay},set fill(t){this._setMember("fill",t)},get fill(){return this._fill},set iterationStart(t){if((isNaN(t)||t<0)&&r())throw new TypeError("iterationStart must be a non-negative number, received: "+timing.iterationStart);this._setMember("iterationStart",t)},get iterationStart(){return this._iterationStart},set duration(t){if("auto"!=t&&(isNaN(t)||t<0)&&r())throw new TypeError("duration must be non-negative or auto, received: "+t);this._setMember("duration",t)},get duration(){return this._duration},set direction(t){this._setMember("direction",t)},get direction(){return this._direction},set easing(t){this._easingFunction=l(f(t)),this._setMember("easing",t)},get easing(){return this._easing},set iterations(t){if((isNaN(t)||t<0)&&r())throw new TypeError("iterations must be non-negative, received: "+t);this._setMember("iterations",t)},get iterations(){return this._iterations}};var x=1,A=.5,P=0,j={ease:u(.25,.1,.25,1),"ease-in":u(.42,0,1,1),"ease-out":u(0,0,.58,1),"ease-in-out":u(.42,0,.58,1),"step-start":c(1,x),"step-middle":c(1,A),"step-end":c(1,P)},R=null,N="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",O=new RegExp("cubic-bezier\\("+N+","+N+","+N+","+N+"\\)"),k=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,S=0,C=1,D=2,F=3;t.cloneTimingInput=i,t.makeTiming=o,t.numericTimingToObject=a,t.normalizeTimingInput=s,t.calculateActiveDuration=h,t.calculateIterationProgress=y,t.calculatePhase=d,t.normalizeEasing=f,t.parseEasingFunction=l}(c,f),function(t,e){function i(t,e){return t in f?f[t][e]||e:e}function n(t){return"display"===t||0===t.lastIndexOf("animation",0)||0===t.lastIndexOf("transition",0)}function r(t,e,r){if(!n(t)){var o=s[t];if(o){u.style[t]=e;for(var a in o){var c=o[a],f=u.style[c];r[c]=i(c,f)}}else r[t]=i(t,e)}}function o(t){var e=[];for(var i in t)if(!(i in["easing","offset","composite"])){var n=t[i];Array.isArray(n)||(n=[n]);for(var r,o=n.length,a=0;a<o;a++)r={},"offset"in t?r.offset=t.offset:1==o?r.offset=1:r.offset=a/(o-1),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),r[i]=n[a],e.push(r)}return e.sort(function(t,e){return t.offset-e.offset}),e}function a(e){function i(){var t=n.length;null==n[t-1].offset&&(n[t-1].offset=1),t>1&&null==n[0].offset&&(n[0].offset=0);for(var e=0,i=n[0].offset,r=1;r<t;r++){var o=n[r].offset;if(null!=o){for(var a=1;a<r-e;a++)n[e+a].offset=i+(o-i)*a/(r-e);e=r,i=o}}}if(null==e)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&e[Symbol.iterator]&&(e=Array.from(e)),Array.isArray(e)||(e=o(e));for(var n=e.map(function(e){var i={};for(var n in e){var o=e[n];if("offset"==n){if(null!=o){if(o=Number(o),!isFinite(o))throw new TypeError("Keyframe offsets must be numbers.");if(o<0||o>1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==n){if("add"==o||"accumulate"==o)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=o)throw new TypeError("Invalid composite mode "+o+".")}else o="easing"==n?t.normalizeEasing(o):""+o;r(n,o,i)}return void 0==i.offset&&(i.offset=null),void 0==i.easing&&(i.easing="linear"),i}),a=!0,s=-(1/0),u=0;u<n.length;u++){var c=n[u].offset;if(null!=c){if(c<s)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");s=c}else a=!1}return n=n.filter(function(t){return t.offset>=0&&t.offset<=1}),a||i(),n}var s={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},u=document.createElementNS("http://www.w3.org/1999/xhtml","div"),c={thin:"1px",medium:"3px",thick:"5px"},f={borderBottomWidth:c,borderLeftWidth:c,borderRightWidth:c,borderTopWidth:c,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:c,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};t.convertToArrayForm=o,t.normalizeKeyframes=a}(c,f),function(t){var e={};t.isDeprecated=function(t,i,n,r){var o=r?"are":"is",a=new Date,s=new Date(i);return s.setMonth(s.getMonth()+3),!(a<s&&(t in e||console.warn("Web Animations: "+t+" "+o+" deprecated and will stop working on "+s.toDateString()+". "+n),e[t]=!0,1))},t.deprecated=function(e,i,n,r){var o=r?"are":"is";if(t.isDeprecated(e,i,n,r))throw new Error(e+" "+o+" no longer supported. "+n)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(t){void 0===a[t]&&(b=!0)})),!b)return}!function(t,e,i){function n(t){for(var e={},i=0;i<t.length;i++)for(var n in t[i])if("offset"!=n&&"easing"!=n&&"composite"!=n){var r={offset:t[i].offset,easing:t[i].easing,value:t[i][n]};e[n]=e[n]||[],e[n].push(r)}for(var o in e){var a=e[o];if(0!=a[0].offset||1!=a[a.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return e}function r(i){var n=[];for(var r in i)for(var o=i[r],a=0;a<o.length-1;a++){var s=a,u=a+1,c=o[s].offset,f=o[u].offset,l=c,h=f;0==a&&(l=-(1/0),0==f&&(u=s)),a==o.length-2&&(h=1/0,1==c&&(s=u)),n.push({applyFrom:l,applyTo:h,startOffset:o[s].offset,endOffset:o[u].offset,easingFunction:t.parseEasingFunction(o[s].easing),property:r,interpolation:e.propertyInterpolation(r,o[s].value,o[u].value)})}return n.sort(function(t,e){return t.startOffset-e.startOffset}),n}e.convertEffectInput=function(i){var o=t.normalizeKeyframes(i),a=n(o),s=r(a);return function(t,i){if(null!=i)s.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(n){var r=i-n.startOffset,o=n.endOffset-n.startOffset,a=0==o?0:n.easingFunction(r/o);e.apply(t,n.property,n.interpolation(a))});else for(var n in a)"offset"!=n&&"easing"!=n&&"composite"!=n&&e.clear(t,n)}}}(c,d,f),function(t,e,i){function n(t){return t.replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function r(t,e,i){s[i]=s[i]||[],s[i].push([t,e])}function o(t,e,i){for(var o=0;o<i.length;o++){var a=i[o];r(t,e,n(a))}}function a(i,r,o){var a=i;/-/.test(i)&&!t.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(a=n(i)),"initial"!=r&&"initial"!=o||("initial"==r&&(r=u[a]),"initial"==o&&(o=u[a]));for(var c=r==o?[]:s[a],f=0;c&&f<c.length;f++){var l=c[f][0](r),h=c[f][0](o);if(void 0!==l&&void 0!==h){var m=c[f][1](l,h);if(m){var d=e.Interpolation.apply(null,m);return function(t){return 0==t?r:1==t?o:d(t)}}}}return e.Interpolation(!1,!0,function(t){return t?o:r})}var s={};e.addPropertiesHandler=o;var u={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};e.propertyInterpolation=a}(c,d,f),function(t,e,i){function n(e){var i=t.calculateActiveDuration(e),n=function(n){return t.calculateIterationProgress(i,n,e)};return n._totalDuration=e.delay+i+e.endDelay,n}e.KeyframeEffect=function(i,r,o,a){var s,u=n(t.normalizeTimingInput(o)),c=e.convertEffectInput(r),f=function(){c(i,s)};return f._update=function(t){return s=u(t),null!==s},f._clear=function(){c(i,null)},f._hasSameTarget=function(t){return i===t},f._target=i,f._totalDuration=u._totalDuration,f._id=a,f},e.NullEffect=function(t){var e=function(){t&&(t(),t=null)};return e._update=function(){return null},e._totalDuration=0,e._hasSameTarget=function(){return!1},e}}(c,d,f),function(t,e){t.apply=function(e,i,n){e.style[t.propertyName(i)]=n},t.clear=function(e,i){e.style[t.propertyName(i)]=""}}(d,f),function(t){window.Element.prototype.animate=function(e,i){var n="";return i&&i.id&&(n=i.id),t.timeline._play(t.KeyframeEffect(this,e,i,n))}}(d),function(t,e){function i(t,e,n){if("number"==typeof t&&"number"==typeof e)return t*(1-n)+e*n;if("boolean"==typeof t&&"boolean"==typeof e)return n<.5?t:e;if(t.length==e.length){for(var r=[],o=0;o<t.length;o++)r.push(i(t[o],e[o],n));return r}throw"Mismatched interpolation arguments "+t+":"+e}t.Interpolation=function(t,e,n){return function(r){return n(i(t,e,r))}}}(d,f),function(t,e,i){t.sequenceNumber=0;var n=function(t,e,i){this.target=t,this.currentTime=e,this.timelineTime=i,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=t,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};e.Animation=function(e){this.id="",e&&e._id&&(this.id=e._id),this._sequenceNumber=t.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=e,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},e.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,e.timeline._animations.push(this))},_tickCurrentTime:function(t,e){t!=this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(t){t=+t,isNaN(t)||(e.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-t/this._playbackRate),this._currentTimePending=!1,this._currentTime!=t&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(t,!0),e.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(t){t=+t,isNaN(t)||this._paused||this._idle||(this._startTime=t,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),e.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(t){if(t!=this._playbackRate){var i=this.currentTime;this._playbackRate=t,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),e.applyDirtiedAnimation(this)),null!=i&&(this.currentTime=i)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),e.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,e.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._isFinished=!0,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),e.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(t,e){"function"==typeof e&&"finish"==t&&this._finishHandlers.push(e)},removeEventListener:function(t,e){if("finish"==t){var i=this._finishHandlers.indexOf(e);i>=0&&this._finishHandlers.splice(i,1)}},_fireEvents:function(t){if(this._isFinished){if(!this._finishedFlag){var e=new n(this,this._currentTime,t),i=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){i.forEach(function(t){t.call(e.target,e)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(t,e){this._idle||this._paused||(null==this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this._currentTimePending=!1,this._fireEvents(t))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var t=this._effect._target;return t._activeAnimations||(t._activeAnimations=[]),t._activeAnimations},_markTarget:function(){var t=this._targetAnimations();t.indexOf(this)===-1&&t.push(this)},_unmarkTarget:function(){var t=this._targetAnimations(),e=t.indexOf(this);e!==-1&&t.splice(e,1)}}}(c,d,f),function(t,e,i){function n(t){var e=c;c=[],t<_.currentTime&&(t=_.currentTime),_._animations.sort(r),_._animations=s(t,!0,_._animations)[0],e.forEach(function(e){e[1](t)}),a(),l=void 0}function r(t,e){return t._sequenceNumber-e._sequenceNumber}function o(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function a(){d.forEach(function(t){t()}),d.length=0}function s(t,i,n){p=!0,m=!1;var r=e.timeline;r.currentTime=t,h=!1;var o=[],a=[],s=[],u=[];return n.forEach(function(e){e._tick(t,i),e._inEffect?(a.push(e._effect),e._markTarget()):(o.push(e._effect),e._unmarkTarget()),e._needsTick&&(h=!0);var n=e._inEffect||e._needsTick;e._inTimeline=n,n?s.push(e):u.push(e)}),d.push.apply(d,o),d.push.apply(d,a),h&&requestAnimationFrame(function(){}),p=!1,[s,u]}var u=window.requestAnimationFrame,c=[],f=0;window.requestAnimationFrame=function(t){var e=f++;return 0==c.length&&u(n),c.push([e,t]),e},window.cancelAnimationFrame=function(t){c.forEach(function(e){e[0]==t&&(e[1]=function(){})})},o.prototype={_play:function(i){i._timing=t.normalizeTimingInput(i.timing);var n=new e.Animation(i);return n._idle=!1,n._timeline=this,this._animations.push(n),e.restart(),e.applyDirtiedAnimation(n),n}};var l=void 0,h=!1,m=!1;e.restart=function(){return h||(h=!0,requestAnimationFrame(function(){}),m=!0),m},e.applyDirtiedAnimation=function(t){if(!p){t._markTarget();var i=t._targetAnimations();i.sort(r);var n=s(e.timeline.currentTime,!1,i.slice())[1];n.forEach(function(t){var e=_._animations.indexOf(t);e!==-1&&_._animations.splice(e,1)}),a()}};var d=[],p=!1,_=new o;e.timeline=_}(c,d,f),function(t){function e(t,e){var i=t.exec(e);if(i)return i=t.ignoreCase?i[0].toLowerCase():i[0],[i,e.substr(i.length)]}function i(t,e){e=e.replace(/^\s*/,"");var i=t(e);if(i)return[i[0],i[1].replace(/^\s*/,"")]}function n(t,n,r){t=i.bind(null,t);for(var o=[];;){var a=t(r);if(!a)return[o,r];if(o.push(a[0]),r=a[1],a=e(n,r),!a||""==a[1])return[o,r];r=a[1]}}function r(t,e){for(var i=0,n=0;n<e.length&&(!/\s|,/.test(e[n])||0!=i);n++)if("("==e[n])i++;else if(")"==e[n]&&(i--,0==i&&n++,i<=0))break;var r=t(e.substr(0,n));return void 0==r?void 0:[r,e.substr(n)]}function o(t,e){for(var i=t,n=e;i&&n;)i>n?i%=n:n%=i;return i=t*e/(i+n)}function a(t){return function(e){var i=t(e);return i&&(i[0]=void 0),i}}function s(t,e){return function(i){var n=t(i);return n?n:[e,i]}}function u(e,i){for(var n=[],r=0;r<e.length;r++){var o=t.consumeTrimmed(e[r],i);if(!o||""==o[0])return;void 0!==o[0]&&n.push(o[0]),i=o[1]}if(""==i)return n}function c(t,e,i,n,r){for(var a=[],s=[],u=[],c=o(n.length,r.length),f=0;f<c;f++){var l=e(n[f%n.length],r[f%r.length]);if(!l)return;a.push(l[0]),s.push(l[1]),u.push(l[2])}return[a,s,function(e){var n=e.map(function(t,e){return u[e](t)}).join(i);return t?t(n):n}]}function f(t,e,i){for(var n=[],r=[],o=[],a=0,s=0;s<i.length;s++)if("function"==typeof i[s]){var u=i[s](t[a],e[a++]);n.push(u[0]),r.push(u[1]),o.push(u[2])}else!function(t){n.push(!1),r.push(!1),o.push(function(){return i[t]})}(s);return[n,r,function(t){for(var e="",i=0;i<t.length;i++)e+=o[i](t[i]);return e}]}t.consumeToken=e,t.consumeTrimmed=i,t.consumeRepeated=n,t.consumeParenthesised=r,t.ignore=a,t.optional=s,t.consumeList=u,t.mergeNestedRepeated=c.bind(null,null),t.mergeWrappedNestedRepeated=c,t.mergeList=f}(d),function(t){function e(e){function i(e){var i=t.consumeToken(/^inset/i,e);if(i)return n.inset=!0,i;var i=t.consumeLengthOrPercent(e);if(i)return n.lengths.push(i[0]),i;var i=t.consumeColor(e);return i?(n.color=i[0],i):void 0}var n={inset:!1,lengths:[],color:null},r=t.consumeRepeated(i,/^/,e);if(r&&r[0].length)return[n,r[1]]}function i(i){var n=t.consumeRepeated(e,/^,/,i);if(n&&""==n[1])return n[0]}function n(e,i){for(;e.lengths.length<Math.max(e.lengths.length,i.lengths.length);)e.lengths.push({px:0});for(;i.lengths.length<Math.max(e.lengths.length,i.lengths.length);)i.lengths.push({px:0});if(e.inset==i.inset&&!!e.color==!!i.color){for(var n,r=[],o=[[],0],a=[[],0],s=0;s<e.lengths.length;s++){var u=t.mergeDimensions(e.lengths[s],i.lengths[s],2==s);o[0].push(u[0]),a[0].push(u[1]),r.push(u[2])}if(e.color&&i.color){var c=t.mergeColors(e.color,i.color);o[1]=c[0],a[1]=c[1],n=c[2]}return[o,a,function(t){for(var i=e.inset?"inset ":" ",o=0;o<r.length;o++)i+=r[o](t[0][o])+" ";return n&&(i+=n(t[1])),i}]}}function r(e,i,n,r){function o(t){return{inset:t,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var a=[],s=[],u=0;u<n.length||u<r.length;u++){var c=n[u]||o(r[u].inset),f=r[u]||o(n[u].inset);a.push(c),s.push(f)}return t.mergeNestedRepeated(e,i,a,s)}var o=r.bind(null,n,", ");t.addPropertiesHandler(i,o,["box-shadow","text-shadow"])}(d),function(t,e){function i(t){return t.toFixed(3).replace(".000","")}function n(t,e,i){return Math.min(e,Math.max(t,i))}function r(t){if(/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t))return Number(t)}function o(t,e){return[t,e,i]}function a(t,e){if(0!=t)return u(0,1/0)(t,e)}function s(t,e){return[t,e,function(t){return Math.round(n(1,1/0,t))}]}function u(t,e){return function(r,o){return[r,o,function(r){return i(n(t,e,r))}]}}function c(t,e){return[t,e,Math.round]}t.clamp=n,t.addPropertiesHandler(r,u(0,1/0),["border-image-width","line-height"]),t.addPropertiesHandler(r,u(0,1),["opacity","shape-image-threshold"]),t.addPropertiesHandler(r,a,["flex-grow","flex-shrink"]),t.addPropertiesHandler(r,s,["orphans","widows"]),t.addPropertiesHandler(r,c,["z-index"]),t.parseNumber=r,t.mergeNumbers=o,t.numberToString=i}(d,f),function(t,e){function i(t,e){if("visible"==t||"visible"==e)return[0,1,function(i){return i<=0?t:i>=1?e:"visible"}]}t.addPropertiesHandler(String,i,["visibility"])}(d),function(t,e){function i(t){t=t.trim(),o.fillStyle="#000",o.fillStyle=t;var e=o.fillStyle;if(o.fillStyle="#fff",o.fillStyle=t,e==o.fillStyle){o.fillRect(0,0,1,1);var i=o.getImageData(0,0,1,1).data;o.clearRect(0,0,1,1);var n=i[3]/255;return[i[0]*n,i[1]*n,i[2]*n,n]}}function n(e,i){return[e,i,function(e){function i(t){return Math.max(0,Math.min(255,t))}if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(i(e[n]/e[3]));return e[3]=t.numberToString(t.clamp(0,1,e[3])),"rgba("+e.join(",")+")"}]}var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=r.height=1;var o=r.getContext("2d");t.addPropertiesHandler(i,n,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),t.consumeColor=t.consumeParenthesised.bind(null,i),t.mergeColors=n}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(t){return c[t]=null,"U"+t});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g<f.length;)f[g].test(e)?(e=e.replace(f[g],"$1"),g=0):g++;if("D"==e){for(var h in c){var i=eval(b.replace(new RegExp("U"+h,"g"),"").replace(new RegExp(d,"g"),"*0"));if(!isFinite(i))return;c[h]=i}return c}}}function d(t,i){return e(t,i,!0)}function e(t,e,i){var n,r=[];for(n in t)r.push(n);for(n in e)r.indexOf(n)<0&&r.push(n);return t=r.map(function(e){return t[e]||0}),e=r.map(function(t){return e[t]||0}),[t,e,function(t){var e=t.map(function(e,n){return 1==t.length&&i&&(e=Math.max(e,0)),a.numberToString(e)+r[n]}).join(" + ");return t.length>1?"calc("+e+")":e}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(t){var e=l(t);if(e&&""==e[1])return e[0]},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(t,e){function i(e){return t.consumeLengthOrPercent(e)||t.consumeToken(/^auto/,e)}function n(e){var n=t.consumeList([t.ignore(t.consumeToken.bind(null,/^rect/)),t.ignore(t.consumeToken.bind(null,/^\(/)),t.consumeRepeated.bind(null,i,/^,/),t.ignore(t.consumeToken.bind(null,/^\)/))],e);if(n&&4==n[0].length)return n[0]}function r(e,i){return"auto"==e||"auto"==i?[!0,!1,function(n){var r=n?e:i;if("auto"==r)return"auto";var o=t.mergeDimensions(r,r);return o[2](o[0])}]:t.mergeDimensions(e,i)}function o(t){return"rect("+t+")"}var a=t.mergeWrappedNestedRepeated.bind(null,o,r,", ");t.parseBox=n,t.mergeBoxes=a,t.addPropertiesHandler(n,a,["clip"])}(d,f),function(t,e){function i(t){return function(e){var i=0;return t.map(function(t){return t===f?e[i++]:t})}}function n(t){return t}function r(e){if(e=e.toLowerCase().trim(),"none"==e)return[];for(var i,n=/\s*(\w+)\(([^)]*)\)/g,r=[],o=0;i=n.exec(e);){if(i.index!=o)return;o=i.index+i[0].length;var a=i[1],s=m[a];if(!s)return;var u=i[2].split(","),c=s[0];if(c.length<u.length)return;for(var f=[],d=0;d<c.length;d++){var p,_=u[d],g=c[d];if(p=_?{A:function(e){return"0"==e.trim()?h:t.parseAngle(e)},N:t.parseNumber,T:t.parseLengthOrPercent,L:t.parseLength}[g.toUpperCase()](_):{a:h,n:f[0],t:l}[g],void 0===p)return;f.push(p)}if(r.push({t:a,d:f}),n.lastIndex==e.length)return r}}function o(t){return t.toFixed(6).replace(".000000","")}function a(e,i){if(e.decompositionPair!==i){e.decompositionPair=i;var n=t.makeMatrixDecomposition(e)}if(i.decompositionPair!==e){i.decompositionPair=e;var r=t.makeMatrixDecomposition(i)}return null==n[0]||null==r[0]?[[!1],[!0],function(t){return t?i[0].d:e[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(e){var i=t.quat(n[0][3],r[0][3],e[5]),a=t.composeMatrix(e[0],e[1],e[2],i,e[4]),s=a.map(o).join(",");return s}])}function s(t){return t.replace(/[xy]/,"")}function u(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function c(e,i){var n=t.makeMatrixDecomposition&&!0,r=!1;if(!e.length||!i.length){e.length||(r=!0,e=i,i=[]);for(var o=0;o<e.length;o++){var c=e[o].t,f=e[o].d,l="scale"==c.substr(0,5)?1:0;i.push({t:c,d:f.map(function(t){if("number"==typeof t)return l;var e={};for(var i in t)e[i]=l;return e})})}}var h=function(t,e){return"perspective"==t&&"perspective"==e||("matrix"==t||"matrix3d"==t)&&("matrix"==e||"matrix3d"==e)},d=[],p=[],_=[];if(e.length!=i.length){if(!n)return;var g=a(e,i);d=[g[0]],p=[g[1]],_=[["matrix",[g[2]]]]}else for(var o=0;o<e.length;o++){var c,b=e[o].t,v=i[o].t,y=e[o].d,w=i[o].d,T=m[b],E=m[v];if(h(b,v)){if(!n)return;var g=a([e[o]],[i[o]]);d.push(g[0]),p.push(g[1]),_.push(["matrix",[g[2]]])}else{if(b==v)c=b;else if(T[2]&&E[2]&&s(b)==s(v))c=s(b),y=T[2](y),w=E[2](w);else{if(!T[1]||!E[1]||u(b)!=u(v)){if(!n)return;var g=a(e,i);d=[g[0]],p=[g[1]],_=[["matrix",[g[2]]]];break}c=u(b),y=T[1](y),w=E[1](w)}for(var x=[],A=[],P=[],j=0;j<y.length;j++){var R="number"==typeof y[j]?t.mergeNumbers:t.mergeDimensions,g=R(y[j],w[j]);x[j]=g[0],A[j]=g[1],P.push(g[2])}d.push(x),p.push(A),_.push([c,P])}}if(r){var N=d;d=p,p=N}return[d,p,function(t){return t.map(function(t,e){var i=t.map(function(t,i){return _[e][1][i](t)}).join(",");return"matrix"==_[e][0]&&16==i.split(",").length&&(_[e][0]="matrix3d"),_[e][0]+"("+i+")"}).join(" ")}]}var f=null,l={px:0},h={deg:0},m={matrix:["NNNNNN",[f,f,0,0,f,f,0,0,0,0,1,0,f,f,0,1],n],matrix3d:["NNNNNNNNNNNNNNNN",n],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",i([f,f,1]),n],scalex:["N",i([f,1,1]),i([f,1])],scaley:["N",i([1,f,1]),i([1,f])],scalez:["N",i([1,1,f])],scale3d:["NNN",n],skew:["Aa",null,n],skewx:["A",null,i([f,h])],skewy:["A",null,i([h,f])],translate:["Tt",i([f,f,l]),n],translatex:["T",i([f,l,l]),i([f,l])],translatey:["T",i([l,f,l]),i([l,f])],translatez:["L",i([l,l,f])],translate3d:["TTL",n]};t.addPropertiesHandler(r,c,["transform"])}(d,f),function(t,e){function i(t,e){e.concat([t]).forEach(function(e){e in document.documentElement.style&&(n[t]=e)})}var n={};i("transform",["webkitTransform","msTransform"]),i("transformOrigin",["webkitTransformOrigin"]),i("perspective",["webkitPerspective"]),i("perspectiveOrigin",["webkitPerspectiveOrigin"]),t.propertyName=function(t){return n[t]||t}}(d,f)}(),!function(){if(void 0===document.createElement("div").animate([]).oncancel){var t;if(window.performance&&performance.now)var t=function(){return performance.now()};else var t=function(){return Date.now()};var e=function(t,e,i){this.target=t,this.currentTime=e,this.timelineTime=i,this.type="cancel",this.bubbles=!1,this.cancelable=!1,
this.currentTarget=t,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},i=window.Element.prototype.animate;window.Element.prototype.animate=function(n,r){var o=i.call(this,n,r);o._cancelHandlers=[],o.oncancel=null;var a=o.cancel;o.cancel=function(){a.call(this);var i=new e(this,null,t()),n=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){n.forEach(function(t){t.call(i.target,i)})},0)};var s=o.addEventListener;o.addEventListener=function(t,e){"function"==typeof e&&"cancel"==t?this._cancelHandlers.push(e):s.call(this,t,e)};var u=o.removeEventListener;return o.removeEventListener=function(t,e){if("cancel"==t){var i=this._cancelHandlers.indexOf(e);i>=0&&this._cancelHandlers.splice(i,1)}else u.call(this,t,e)},o}}}(),function(t){var e=document.documentElement,i=null,n=!1;try{var r=getComputedStyle(e).getPropertyValue("opacity"),o="0"==r?"1":"0";i=e.animate({opacity:[o,o]},{duration:1}),i.currentTime=0,n=getComputedStyle(e).getPropertyValue("opacity")==o}catch(t){}finally{i&&i.cancel()}if(!n){var a=window.Element.prototype.animate;window.Element.prototype.animate=function(e,i){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&e[Symbol.iterator]&&(e=Array.from(e)),Array.isArray(e)||null===e||(e=t.convertToArrayForm(e)),a.call(this,e,i)}}}(c),!function(t,e,i){function n(t){var i=e.timeline;i.currentTime=t,i._discardAnimations(),0==i._animations.length?o=!1:requestAnimationFrame(n)}var r=window.requestAnimationFrame;window.requestAnimationFrame=function(t){return r(function(i){e.timeline._updateAnimationsPromises(),t(i),e.timeline._updateAnimationsPromises()})},e.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},e.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){e.animationsWithPromises=e.animationsWithPromises.filter(function(t){return t._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(t){return"finished"!=t.playState&&"idle"!=t.playState})},_play:function(t){var i=new e.Animation(t,this);return this._animations.push(i),e.restartWebAnimationsNextTick(),i._updatePromises(),i._animation.play(),i._updatePromises(),i},play:function(t){return t&&t.remove(),this._play(t)}};var o=!1;e.restartWebAnimationsNextTick=function(){o||(o=!0,requestAnimationFrame(n))};var a=new e.AnimationTimeline;e.timeline=a;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return a}})}catch(t){}try{window.document.timeline=a}catch(t){}}(c,e,f),function(t,e,i){e.animationsWithPromises=[],e.Animation=function(e,i){if(this.id="",e&&e._id&&(this.id=e._id),this.effect=e,e&&(e._animation=this),!i)throw new Error("Animation with null timeline is not supported");this._timeline=i,this._sequenceNumber=t.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},e.Animation.prototype={_updatePromises:function(){var t=this._oldPlayState,e=this.playState;return this._readyPromise&&e!==t&&("idle"==e?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==t?this._resolveReadyPromise():"pending"==e&&(this._readyPromise=void 0)),this._finishedPromise&&e!==t&&("idle"==e?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==e?this._resolveFinishedPromise():"finished"==t&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var t,i,n,r,o=!!this._animation;o&&(t=this.playbackRate,i=this._paused,n=this.startTime,r=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=e.newUnderlyingAnimationForKeyframeEffect(this.effect),e.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=e.newUnderlyingAnimationForGroup(this.effect),e.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&e.bindAnimationForCustomEffect(this),o&&(1!=t&&(this.playbackRate=t),null!==n?this.startTime=n:null!==r?this.currentTime=r:null!==this._holdTime&&(this.currentTime=this._holdTime),i&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var t=this.effect._timing.delay;this._childAnimations.forEach(function(i){this._arrangeChildren(i,t),this.effect instanceof window.SequenceEffect&&(t+=e.groupChildDuration(i.effect))}.bind(this))}},_setExternalAnimation:function(t){if(this.effect&&this._isGroup)for(var e=0;e<this.effect.children.length;e++)this.effect.children[e]._animation=t,this._childAnimations[e]._setExternalAnimation(t)},_constructChildAnimations:function(){if(this.effect&&this._isGroup){var t=this.effect._timing.delay;this._removeChildAnimations(),this.effect.children.forEach(function(i){var n=e.timeline._play(i);this._childAnimations.push(n),n.playbackRate=this.playbackRate,this._paused&&n.pause(),i._animation=this.effect._animation,this._arrangeChildren(n,t),this.effect instanceof window.SequenceEffect&&(t+=e.groupChildDuration(i))}.bind(this))}},_arrangeChildren:function(t,e){null===this.startTime?t.currentTime=this.currentTime-e/this.playbackRate:t.startTime!==this.startTime+e/this.playbackRate&&(t.startTime=this.startTime+e/this.playbackRate)},get timeline(){return this._timeline},get playState(){return this._animation?this._animation.playState:"idle"},get finished(){return window.Promise?(this._finishedPromise||(e.animationsWithPromises.indexOf(this)==-1&&e.animationsWithPromises.push(this),this._finishedPromise=new Promise(function(t,e){this._resolveFinishedPromise=function(){t(this)},this._rejectFinishedPromise=function(){e({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"finished"==this.playState&&this._resolveFinishedPromise()),this._finishedPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get ready(){return window.Promise?(this._readyPromise||(e.animationsWithPromises.indexOf(this)==-1&&e.animationsWithPromises.push(this),this._readyPromise=new Promise(function(t,e){this._resolveReadyPromise=function(){t(this)},this._rejectReadyPromise=function(){e({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"pending"!==this.playState&&this._resolveReadyPromise()),this._readyPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get onfinish(){return this._animation.onfinish},set onfinish(t){"function"==typeof t?this._animation.onfinish=function(e){e.target=this,t.call(this,e)}.bind(this):this._animation.onfinish=t},get oncancel(){return this._animation.oncancel},set oncancel(t){"function"==typeof t?this._animation.oncancel=function(e){e.target=this,t.call(this,e)}.bind(this):this._animation.oncancel=t},get currentTime(){this._updatePromises();var t=this._animation.currentTime;return this._updatePromises(),t},set currentTime(t){this._updatePromises(),this._animation.currentTime=isFinite(t)?t:Math.sign(t)*Number.MAX_VALUE,this._register(),this._forEachChild(function(e,i){e.currentTime=t-i}),this._updatePromises()},get startTime(){return this._animation.startTime},set startTime(t){this._updatePromises(),this._animation.startTime=isFinite(t)?t:Math.sign(t)*Number.MAX_VALUE,this._register(),this._forEachChild(function(e,i){e.startTime=t+i}),this._updatePromises()},get playbackRate(){return this._animation.playbackRate},set playbackRate(t){this._updatePromises();var e=this.currentTime;this._animation.playbackRate=t,this._forEachChild(function(e){e.playbackRate=t}),null!==e&&(this.currentTime=e),this._updatePromises()},play:function(){this._updatePromises(),this._paused=!1,this._animation.play(),this._timeline._animations.indexOf(this)==-1&&this._timeline._animations.push(this),this._register(),e.awaitStartTime(this),this._forEachChild(function(t){var e=t.currentTime;t.play(),t.currentTime=e}),this._updatePromises()},pause:function(){this._updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._animation.pause(),this._register(),this._forEachChild(function(t){t.pause()}),this._paused=!0,this._updatePromises()},finish:function(){this._updatePromises(),this._animation.finish(),this._register(),this._updatePromises()},cancel:function(){this._updatePromises(),this._animation.cancel(),this._register(),this._removeChildAnimations(),this._updatePromises()},reverse:function(){this._updatePromises();var t=this.currentTime;this._animation.reverse(),this._forEachChild(function(t){t.reverse()}),null!==t&&(this.currentTime=t),this._updatePromises()},addEventListener:function(t,e){var i=e;"function"==typeof e&&(i=function(t){t.target=this,e.call(this,t)}.bind(this),e._wrapper=i),this._animation.addEventListener(t,i)},removeEventListener:function(t,e){this._animation.removeEventListener(t,e&&e._wrapper||e)},_removeChildAnimations:function(){for(;this._childAnimations.length;)this._childAnimations.pop().cancel()},_forEachChild:function(e){var i=0;if(this.effect.children&&this._childAnimations.length<this.effect.children.length&&this._constructChildAnimations(),this._childAnimations.forEach(function(t){e.call(this,t,i),this.effect instanceof window.SequenceEffect&&(i+=t.effect.activeDuration)}.bind(this)),"pending"!=this.playState){var n=this.effect._timing,r=this.currentTime;null!==r&&(r=t.calculateIterationProgress(t.calculateActiveDuration(n),r,n)),(null==r||isNaN(r))&&this._removeChildAnimations()}}},window.Animation=e.Animation}(c,e,f),function(t,e,i){function n(e){this._frames=t.normalizeKeyframes(e)}function r(){for(var t=!1;u.length;){var e=u.shift();e._updateChildren(),t=!0}return t}var o=function(t){if(t._animation=void 0,t instanceof window.SequenceEffect||t instanceof window.GroupEffect)for(var e=0;e<t.children.length;e++)o(t.children[e])};e.removeMulti=function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];n._parent?(e.indexOf(n._parent)==-1&&e.push(n._parent),n._parent.children.splice(n._parent.children.indexOf(n),1),n._parent=null,o(n)):n._animation&&n._animation.effect==n&&(n._animation.cancel(),n._animation.effect=new KeyframeEffect(null,[]),n._animation._callback&&(n._animation._callback._animation=null),n._animation._rebuildUnderlyingAnimation(),o(n))}for(i=0;i<e.length;i++)e[i]._rebuild()},e.KeyframeEffect=function(e,i,r,o){return this.target=e,this._parent=null,r=t.numericTimingToObject(r),this._timingInput=t.cloneTimingInput(r),this._timing=t.normalizeTimingInput(r),this.timing=t.makeTiming(r,!1,this),this.timing._effect=this,"function"==typeof i?(t.deprecated("Custom KeyframeEffect","2015-06-22","Use KeyframeEffect.onsample instead."),this._normalizedKeyframes=i):this._normalizedKeyframes=new n(i),this._keyframes=i,this.activeDuration=t.calculateActiveDuration(this._timing),this._id=o,this},e.KeyframeEffect.prototype={getFrames:function(){return"function"==typeof this._normalizedKeyframes?this._normalizedKeyframes:this._normalizedKeyframes._frames},set onsample(t){if("function"==typeof this.getFrames())throw new Error("Setting onsample on custom effect KeyframeEffect is not supported.");this._onsample=t,this._animation&&this._animation._rebuildUnderlyingAnimation()},get parent(){return this._parent},clone:function(){if("function"==typeof this.getFrames())throw new Error("Cloning custom effects is not supported.");var e=new KeyframeEffect(this.target,[],t.cloneTimingInput(this._timingInput),this._id);return e._normalizedKeyframes=this._normalizedKeyframes,e._keyframes=this._keyframes,e},remove:function(){e.removeMulti([this])}};var a=Element.prototype.animate;Element.prototype.animate=function(t,i){var n="";return i&&i.id&&(n=i.id),e.timeline._play(new e.KeyframeEffect(this,t,i,n))};var s=document.createElementNS("http://www.w3.org/1999/xhtml","div");e.newUnderlyingAnimationForKeyframeEffect=function(t){if(t){var e=t.target||s,i=t._keyframes;"function"==typeof i&&(i=[]);var n=t._timingInput;n.id=t._id}else var e=s,i=[],n=0;return a.apply(e,[i,n])},e.bindAnimationForKeyframeEffect=function(t){t.effect&&"function"==typeof t.effect._normalizedKeyframes&&e.bindAnimationForCustomEffect(t)};var u=[];e.awaitStartTime=function(t){null===t.startTime&&t._isGroup&&(0==u.length&&requestAnimationFrame(r),u.push(t))};var c=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){e.timeline._updateAnimationsPromises();var t=c.apply(this,arguments);return r()&&(t=c.apply(this,arguments)),e.timeline._updateAnimationsPromises(),t}}),window.KeyframeEffect=e.KeyframeEffect,window.Element.prototype.getAnimations=function(){return document.timeline.getAnimations().filter(function(t){return null!==t.effect&&t.effect.target==this}.bind(this))}}(c,e,f),function(t,e,i){function n(t){t._registered||(t._registered=!0,a.push(t),s||(s=!0,requestAnimationFrame(r)))}function r(t){var e=a;a=[],e.sort(function(t,e){return t._sequenceNumber-e._sequenceNumber}),e=e.filter(function(t){t();var e=t._animation?t._animation.playState:"idle";return"running"!=e&&"pending"!=e&&(t._registered=!1),t._registered}),a.push.apply(a,e),a.length?(s=!0,requestAnimationFrame(r)):s=!1}var o=(document.createElementNS("http://www.w3.org/1999/xhtml","div"),0);e.bindAnimationForCustomEffect=function(e){var i,r=e.effect.target,a="function"==typeof e.effect.getFrames();i=a?e.effect.getFrames():e.effect._onsample;var s=e.effect.timing,u=null;s=t.normalizeTimingInput(s);var c=function(){var n=c._animation?c._animation.currentTime:null;null!==n&&(n=t.calculateIterationProgress(t.calculateActiveDuration(s),n,s),isNaN(n)&&(n=null)),n!==u&&(a?i(n,r,e.effect):i(n,e.effect,e.effect._animation)),u=n};c._animation=e,c._registered=!1,c._sequenceNumber=o++,e._callback=c,n(c)};var a=[],s=!1;e.Animation.prototype._register=function(){this._callback&&n(this._callback)}}(c,e,f),function(t,e,i){function n(t){return t._timing.delay+t.activeDuration+t._timing.endDelay}function r(e,i,n){this._id=n,this._parent=null,this.children=e||[],this._reparent(this.children),i=t.numericTimingToObject(i),this._timingInput=t.cloneTimingInput(i),this._timing=t.normalizeTimingInput(i,!0),this.timing=t.makeTiming(i,!0,this),this.timing._effect=this,"auto"===this._timing.duration&&(this._timing.duration=this.activeDuration)}window.SequenceEffect=function(){r.apply(this,arguments)},window.GroupEffect=function(){r.apply(this,arguments)},r.prototype={_isAncestor:function(t){for(var e=this;null!==e;){if(e==t)return!0;e=e._parent}return!1},_rebuild:function(){for(var t=this;t;)"auto"===t.timing.duration&&(t._timing.duration=t.activeDuration),t=t._parent;this._animation&&this._animation._rebuildUnderlyingAnimation()},_reparent:function(t){e.removeMulti(t);for(var i=0;i<t.length;i++)t[i]._parent=this},_putChild:function(t,e){for(var i=e?"Cannot append an ancestor or self":"Cannot prepend an ancestor or self",n=0;n<t.length;n++)if(this._isAncestor(t[n]))throw{type:DOMException.HIERARCHY_REQUEST_ERR,name:"HierarchyRequestError",message:i};for(var n=0;n<t.length;n++)e?this.children.push(t[n]):this.children.unshift(t[n]);this._reparent(t),this._rebuild()},append:function(){this._putChild(arguments,!0)},prepend:function(){this._putChild(arguments,!1)},get parent(){return this._parent},get firstChild(){return this.children.length?this.children[0]:null},get lastChild(){return this.children.length?this.children[this.children.length-1]:null},clone:function(){for(var e=t.cloneTimingInput(this._timingInput),i=[],n=0;n<this.children.length;n++)i.push(this.children[n].clone());return this instanceof GroupEffect?new GroupEffect(i,e):new SequenceEffect(i,e)},remove:function(){e.removeMulti([this])}},window.SequenceEffect.prototype=Object.create(r.prototype),Object.defineProperty(window.SequenceEffect.prototype,"activeDuration",{get:function(){var t=0;return this.children.forEach(function(e){t+=n(e)}),Math.max(t,0)}}),window.GroupEffect.prototype=Object.create(r.prototype),Object.defineProperty(window.GroupEffect.prototype,"activeDuration",{get:function(){var t=0;return this.children.forEach(function(e){t=Math.max(t,n(e))}),t}}),e.newUnderlyingAnimationForGroup=function(i){var n,r=null,o=function(e){var i=n._wrapper;if(i&&"pending"!=i.playState&&i.effect)return null==e?void i._removeChildAnimations():0==e&&i.playbackRate<0&&(r||(r=t.normalizeTimingInput(i.effect.timing)),e=t.calculateIterationProgress(t.calculateActiveDuration(r),-1,r),isNaN(e)||null==e)?(i._forEachChild(function(t){t.currentTime=-1}),void i._removeChildAnimations()):void 0},a=new KeyframeEffect(null,[],i._timing,i._id);return a.onsample=o,n=e.timeline._play(a)},e.bindAnimationForGroup=function(t){t._animation._wrapper=t,t._isGroup=!0,e.awaitStartTime(t),t._constructChildAnimations(),t._setExternalAnimation(t)},e.groupChildDuration=n}(c,e,f),b.true=a}({},function(){return this}())</script><script>Polymer({is:"opaque-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node;return this._effect=new KeyframeEffect(i,[{opacity:"1"},{opacity:"1"}],this.timingFromConfig(e)),i.style.opacity="0",this._effect},complete:function(e){e.node.style.opacity=""}})</script><script>!function(){"use strict";var e={pageX:0,pageY:0},t=null,l=[];Polymer.IronDropdownScrollManager={get currentLockingElement(){return this._lockingElements[this._lockingElements.length-1]},elementIsScrollLocked:function(e){var t=this.currentLockingElement;if(void 0===t)return!1;var l;return!!this._hasCachedLockedElement(e)||!this._hasCachedUnlockedElement(e)&&(l=!!t&&t!==e&&!this._composedTreeContains(t,e),l?this._lockedElementCache.push(e):this._unlockedElementCache.push(e),l)},pushScrollLock:function(e){this._lockingElements.indexOf(e)>=0||(0===this._lockingElements.length&&this._lockScrollInteractions(),this._lockingElements.push(e),this._lockedElementCache=[],this._unlockedElementCache=[])},removeScrollLock:function(e){var t=this._lockingElements.indexOf(e);t!==-1&&(this._lockingElements.splice(t,1),this._lockedElementCache=[],this._unlockedElementCache=[],0===this._lockingElements.length&&this._unlockScrollInteractions())},_lockingElements:[],_lockedElementCache:null,_unlockedElementCache:null,_hasCachedLockedElement:function(e){return this._lockedElementCache.indexOf(e)>-1},_hasCachedUnlockedElement:function(e){return this._unlockedElementCache.indexOf(e)>-1},_composedTreeContains:function(e,t){var l,n,o,r;if(e.contains(t))return!0;for(l=Polymer.dom(e).querySelectorAll("content"),o=0;o<l.length;++o)for(n=Polymer.dom(l[o]).getDistributedNodes(),r=0;r<n.length;++r)if(this._composedTreeContains(n[r],t))return!0;return!1},_scrollInteractionHandler:function(t){if(t.cancelable&&this._shouldPreventScrolling(t)&&t.preventDefault(),t.targetTouches){var l=t.targetTouches[0];e.pageX=l.pageX,e.pageY=l.pageY}},_lockScrollInteractions:function(){this._boundScrollHandler=this._boundScrollHandler||this._scrollInteractionHandler.bind(this),document.addEventListener("wheel",this._boundScrollHandler,!0),document.addEventListener("mousewheel",this._boundScrollHandler,!0),document.addEventListener("DOMMouseScroll",this._boundScrollHandler,!0),document.addEventListener("touchstart",this._boundScrollHandler,!0),document.addEventListener("touchmove",this._boundScrollHandler,!0)},_unlockScrollInteractions:function(){document.removeEventListener("wheel",this._boundScrollHandler,!0),document.removeEventListener("mousewheel",this._boundScrollHandler,!0),document.removeEventListener("DOMMouseScroll",this._boundScrollHandler,!0),document.removeEventListener("touchstart",this._boundScrollHandler,!0),document.removeEventListener("touchmove",this._boundScrollHandler,!0)},_shouldPreventScrolling:function(e){var n=Polymer.dom(e).rootTarget;if("touchmove"!==e.type&&t!==n&&(t=n,l=this._getScrollableNodes(Polymer.dom(e).path)),!l.length)return!0;if("touchstart"===e.type)return!1;var o=this._getScrollInfo(e);return!this._getScrollingNode(l,o.deltaX,o.deltaY)},_getScrollableNodes:function(e){for(var t=[],l=e.indexOf(this.currentLockingElement),n=0;n<=l;n++)if(e[n].nodeType===Node.ELEMENT_NODE){var o=e[n],r=o.style;"scroll"!==r.overflow&&"auto"!==r.overflow&&(r=window.getComputedStyle(o)),"scroll"!==r.overflow&&"auto"!==r.overflow||t.push(o)}return t},_getScrollingNode:function(e,t,l){if(t||l)for(var n=Math.abs(l)>=Math.abs(t),o=0;o<e.length;o++){var r=e[o],c=!1;if(c=n?l<0?r.scrollTop>0:r.scrollTop<r.scrollHeight-r.clientHeight:t<0?r.scrollLeft>0:r.scrollLeft<r.scrollWidth-r.clientWidth)return r}},_getScrollInfo:function(t){var l={deltaX:t.deltaX,deltaY:t.deltaY};if("deltaX"in t);else if("wheelDeltaX"in t)l.deltaX=-t.wheelDeltaX,l.deltaY=-t.wheelDeltaY;else if("axis"in t)l.deltaX=1===t.axis?t.detail:0,l.deltaY=2===t.axis?t.detail:0;else if(t.targetTouches){var n=t.targetTouches[0];l.deltaX=e.pageX-n.pageX,l.deltaY=e.pageY-n.pageY}return l}}}()</script><dom-module id="iron-dropdown" assetpath="../bower_components/iron-dropdown/"><template><style>:host{position:fixed}#contentWrapper ::content>*{overflow:auto}#contentWrapper.animating ::content>*{overflow:hidden}</style><div id="contentWrapper"><content id="content" select=".dropdown-content"></content></div></template><script>!function(){"use strict";Polymer({is:"iron-dropdown",behaviors:[Polymer.IronControlState,Polymer.IronA11yKeysBehavior,Polymer.IronOverlayBehavior,Polymer.NeonAnimationRunnerBehavior],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1},_boundOnCaptureScroll:{type:Function,value:function(){return this._onCaptureScroll.bind(this)}}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"],get containedElement(){return Polymer.dom(this.$.content).getDistributedNodes()[0]},get _focusTarget(){return this.focusTarget||this.containedElement},ready:function(){this._scrollTop=0,this._scrollLeft=0,this._refitOnScrollRAF=null},attached:function(){this.sizingTarget&&this.sizingTarget!==this||(this.sizingTarget=this.containedElement||this)},detached:function(){this.cancelAnimation(),document.removeEventListener("scroll",this._boundOnCaptureScroll),Polymer.IronDropdownScrollManager.removeScrollLock(this)},_openedChanged:function(){this.opened&&this.disabled?this.cancel():(this.cancelAnimation(),this._updateAnimationConfig(),this._saveScrollPosition(),this.opened?(document.addEventListener("scroll",this._boundOnCaptureScroll),!this.allowOutsideScroll&&Polymer.IronDropdownScrollManager.pushScrollLock(this)):(document.removeEventListener("scroll",this._boundOnCaptureScroll),Polymer.IronDropdownScrollManager.removeScrollLock(this)),Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this,arguments))},_renderOpened:function(){!this.noAnimations&&this.animationConfig.open?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("open")):Polymer.IronOverlayBehaviorImpl._renderOpened.apply(this,arguments)},_renderClosed:function(){!this.noAnimations&&this.animationConfig.close?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("close")):Polymer.IronOverlayBehaviorImpl._renderClosed.apply(this,arguments)},_onNeonAnimationFinish:function(){this.$.contentWrapper.classList.remove("animating"),this.opened?this._finishRenderOpened():this._finishRenderClosed()},_onCaptureScroll:function(){this.allowOutsideScroll?(this._refitOnScrollRAF&&window.cancelAnimationFrame(this._refitOnScrollRAF),this._refitOnScrollRAF=window.requestAnimationFrame(this.refit.bind(this))):this._restoreScrollPosition()},_saveScrollPosition:function(){document.scrollingElement?(this._scrollTop=document.scrollingElement.scrollTop,this._scrollLeft=document.scrollingElement.scrollLeft):(this._scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this._scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},_restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this._scrollTop,document.scrollingElement.scrollLeft=this._scrollLeft):(document.documentElement.scrollTop=this._scrollTop,document.documentElement.scrollLeft=this._scrollLeft,document.body.scrollTop=this._scrollTop,document.body.scrollLeft=this._scrollLeft)},_updateAnimationConfig:function(){for(var o=this.containedElement,t=[].concat(this.openAnimationConfig||[]).concat(this.closeAnimationConfig||[]),n=0;n<t.length;n++)t[n].node=o;this.animationConfig={open:this.openAnimationConfig,close:this.closeAnimationConfig}},_updateOverlayPosition:function(){this.isAttached&&this.notifyResize()},_applyFocus:function(){var o=this.focusTarget||this.containedElement;o&&this.opened&&!this.noAutoFocus?o.focus():Polymer.IronOverlayBehaviorImpl._applyFocus.apply(this,arguments)}})}()</script></dom-module><script>Polymer({is:"fade-in-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(i){var e=i.node;return this._effect=new KeyframeEffect(e,[{opacity:"0"},{opacity:"1"}],this.timingFromConfig(i)),this._effect}})</script><script>Polymer({is:"fade-out-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node;return this._effect=new KeyframeEffect(i,[{opacity:"1"},{opacity:"0"}],this.timingFromConfig(e)),this._effect}})</script><script>Polymer({is:"paper-menu-grow-height-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node,t=i.getBoundingClientRect(),n=t.height;return this._effect=new KeyframeEffect(i,[{height:n/2+"px"},{height:n+"px"}],this.timingFromConfig(e)),this._effect}}),Polymer({is:"paper-menu-grow-width-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node,t=i.getBoundingClientRect(),n=t.width;return this._effect=new KeyframeEffect(i,[{width:n/2+"px"},{width:n+"px"}],this.timingFromConfig(e)),this._effect}}),Polymer({is:"paper-menu-shrink-width-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node,t=i.getBoundingClientRect(),n=t.width;return this._effect=new KeyframeEffect(i,[{width:n+"px"},{width:n-n/20+"px"}],this.timingFromConfig(e)),this._effect}}),Polymer({is:"paper-menu-shrink-height-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node,t=i.getBoundingClientRect(),n=t.height;t.top;return this.setPrefixedProperty(i,"transformOrigin","0 0"),this._effect=new KeyframeEffect(i,[{height:n+"px",transform:"translateY(0)"},{height:n/2+"px",transform:"translateY(-20px)"}],this.timingFromConfig(e)),this._effect}})</script><dom-module id="paper-menu-button" assetpath="../bower_components/paper-menu-button/"><template><style>:host{display:inline-block;position:relative;padding:8px;outline:0;@apply(--paper-menu-button)}:host([disabled]){cursor:auto;color:var(--disabled-text-color);@apply(--paper-menu-button-disabled)}iron-dropdown{@apply(--paper-menu-button-dropdown)}.dropdown-content{@apply(--shadow-elevation-2dp);position:relative;border-radius:2px;background-color:var(--paper-menu-button-dropdown-background,--primary-background-color);@apply(--paper-menu-button-content)}:host([vertical-align=top]) .dropdown-content{margin-bottom:20px;margin-top:-10px;top:10px}:host([vertical-align=bottom]) .dropdown-content{bottom:10px;margin-bottom:-10px;margin-top:20px}#trigger{cursor:pointer}</style><div id="trigger" on-tap="toggle"><content select=".dropdown-trigger"></content></div><iron-dropdown id="dropdown" opened="{{opened}}" horizontal-align="[[horizontalAlign]]" vertical-align="[[verticalAlign]]" dynamic-align="[[dynamicAlign]]" horizontal-offset="[[horizontalOffset]]" vertical-offset="[[verticalOffset]]" no-overlap="[[noOverlap]]" open-animation-config="[[openAnimationConfig]]" close-animation-config="[[closeAnimationConfig]]" no-animations="[[noAnimations]]" focus-target="[[_dropdownContent]]" allow-outside-scroll="[[allowOutsideScroll]]" restore-focus-on-close="[[restoreFocusOnClose]]" on-iron-overlay-canceled="__onIronOverlayCanceled"><div class="dropdown-content"><content id="content" select=".dropdown-content"></content></div></iron-dropdown></template><script>!function(){"use strict";var e={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400},n=Polymer({is:"paper-menu-button",behaviors:[Polymer.IronA11yKeysBehavior,Polymer.IronControlState],properties:{opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},noOverlap:{type:Boolean},noAnimations:{type:Boolean,value:!1},ignoreSelect:{type:Boolean,value:!1},closeOnActivate:{type:Boolean,value:!1},openAnimationConfig:{type:Object,value:function(){return[{name:"fade-in-animation",timing:{delay:100,duration:200}},{name:"paper-menu-grow-width-animation",timing:{delay:100,duration:150,easing:e.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-grow-height-animation",timing:{delay:100,duration:275,easing:e.ANIMATION_CUBIC_BEZIER}}]}},closeAnimationConfig:{type:Object,value:function(){return[{name:"fade-out-animation",timing:{duration:150}},{name:"paper-menu-shrink-width-animation",timing:{delay:100,duration:50,easing:e.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-shrink-height-animation",timing:{duration:200,easing:"ease-in"}}]}},allowOutsideScroll:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!0},_dropdownContent:{type:Object}},hostAttributes:{role:"group","aria-haspopup":"true"},listeners:{"iron-activate":"_onIronActivate","iron-select":"_onIronSelect"},get contentElement(){return Polymer.dom(this.$.content).getDistributedNodes()[0]},toggle:function(){this.opened?this.close():this.open()},open:function(){this.disabled||this.$.dropdown.open()},close:function(){this.$.dropdown.close()},_onIronSelect:function(e){this.ignoreSelect||this.close()},_onIronActivate:function(e){this.closeOnActivate&&this.close()},_openedChanged:function(e,n){e?(this._dropdownContent=this.contentElement,this.fire("paper-dropdown-open")):null!=n&&this.fire("paper-dropdown-close")},_disabledChanged:function(e){Polymer.IronControlState._disabledChanged.apply(this,arguments),e&&this.opened&&this.close()},__onIronOverlayCanceled:function(e){var n=e.detail,t=(Polymer.dom(n).rootTarget,this.$.trigger),o=Polymer.dom(n).path;o.indexOf(t)>-1&&e.preventDefault()}});Object.keys(e).forEach(function(t){n[t]=e[t]}),Polymer.PaperMenuButton=n}()</script></dom-module><iron-iconset-svg name="paper-dropdown-menu" size="24"><svg><defs><g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"></path></g></defs></svg></iron-iconset-svg><dom-module id="paper-dropdown-menu-shared-styles" assetpath="../bower_components/paper-dropdown-menu/"><template><style>:host{display:inline-block;position:relative;text-align:left;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:transparent;--paper-input-container-input:{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%;box-sizing:border-box;cursor:pointer};@apply(--paper-dropdown-menu)}:host([disabled]){@apply(--paper-dropdown-menu-disabled)}:host([noink]) paper-ripple{display:none}:host([no-label-float]) paper-ripple{top:8px}paper-ripple{top:12px;left:0;bottom:8px;right:0;@apply(--paper-dropdown-menu-ripple)}paper-menu-button{display:block;padding:0;@apply(--paper-dropdown-menu-button)}paper-input{@apply(--paper-dropdown-menu-input)}iron-icon{color:var(--disabled-text-color);@apply(--paper-dropdown-menu-icon)}</style></template></dom-module><dom-module id="paper-dropdown-menu" assetpath="../bower_components/paper-dropdown-menu/"><template><style include="paper-dropdown-menu-shared-styles"></style><span role="button"></span><paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" dynamic-align="[[dynamicAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate="" allow-outside-scroll="[[allowOutsideScroll]]"><div class="dropdown-trigger"><paper-ripple></paper-ripple><paper-input type="text" invalid="[[invalid]]" readonly="" disabled="[[disabled]]" value="[[selectedItemLabel]]" placeholder="[[placeholder]]" error-message="[[errorMessage]]" always-float-label="[[alwaysFloatLabel]]" no-label-float="[[noLabelFloat]]" label="[[label]]"><iron-icon icon="paper-dropdown-menu:arrow-drop-down" suffix=""></iron-icon></paper-input></div><content id="content" select=".dropdown-content"></content></paper-menu-button></template><script>!function(){"use strict";Polymer({is:"paper-dropdown-menu",behaviors:[Polymer.IronButtonState,Polymer.IronControlState,Polymer.IronFormElementBehavior,Polymer.IronValidatableBehavior],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0,readOnly:!0},label:{type:String},placeholder:{type:String},errorMessage:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},dynamicAlign:{type:Boolean}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},hostAttributes:{role:"combobox","aria-autocomplete":"none","aria-haspopup":"true"},observers:["_selectedItemChanged(selectedItem)"],attached:function(){var e=this.contentElement;e&&e.selectedItem&&this._setSelectedItem(e.selectedItem)},get contentElement(){return Polymer.dom(this.$.content).getDistributedNodes()[0]},open:function(){this.$.menuButton.open()},close:function(){this.$.menuButton.close()},_onIronSelect:function(e){this._setSelectedItem(e.detail.item)},_onIronDeselect:function(e){this._setSelectedItem(null)},_onTap:function(e){Polymer.Gestures.findOriginalTarget(e)===this&&this.open()},_selectedItemChanged:function(e){var t="";t=e?e.label||e.getAttribute("label")||e.textContent.trim():"",this._setValue(t),this._setSelectedItemLabel(t)},_computeMenuVerticalOffset:function(e){return e?-4:8},_getValidity:function(e){return this.disabled||!this.required||this.required&&!!this.value},_openedChanged:function(){var e=this.opened?"true":"false",t=this.contentElement;t&&t.setAttribute("aria-expanded",e)}})}()</script></dom-module><dom-module id="paper-menu-shared-styles" assetpath="../bower_components/paper-menu/"><template><style>.selectable-content>::content>.iron-selected{font-weight:700;@apply(--paper-menu-selected-item)}.selectable-content>::content>[disabled]{color:var(--paper-menu-disabled-color,--disabled-text-color)}.selectable-content>::content>:focus{position:relative;outline:0;@apply(--paper-menu-focused-item)}.selectable-content>::content>:focus:after{@apply(--layout-fit);background:currentColor;opacity:var(--dark-divider-opacity);content:'';pointer-events:none;@apply(--paper-menu-focused-item-after)}.selectable-content>::content>[colored]:focus:after{opacity:.26}</style></template></dom-module><dom-module id="paper-menu" assetpath="../bower_components/paper-menu/"><template><style include="paper-menu-shared-styles"></style><style>:host{display:block;padding:8px 0;background:var(--paper-menu-background-color,--primary-background-color);color:var(--paper-menu-color,--primary-text-color);@apply(--paper-menu)}</style><div class="selectable-content"><content></content></div></template><script>!function(){Polymer({is:"paper-menu",behaviors:[Polymer.IronMenuBehavior]})}()</script></dom-module><script>Polymer.PaperItemBehaviorImpl={hostAttributes:{role:"option",tabindex:"0"}},Polymer.PaperItemBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperItemBehaviorImpl]</script><dom-module id="paper-item-shared-styles" assetpath="../bower_components/paper-item/"><template><style>.paper-item,:host{display:block;position:relative;min-height:var(--paper-item-min-height,48px);padding:0 16px}.paper-item{@apply(--paper-font-subhead);border:none;outline:0;background:#fff;width:100%;text-align:left}.paper-item[hidden],:host([hidden]){display:none!important}.paper-item.iron-selected,:host(.iron-selected){font-weight:var(--paper-item-selected-weight,bold);@apply(--paper-item-selected)}.paper-item[disabled],:host([disabled]){color:var(--paper-item-disabled-color,--disabled-text-color);@apply(--paper-item-disabled)}.paper-item:focus,:host(:focus){position:relative;outline:0;@apply(--paper-item-focused)}.paper-item:focus:before,:host(:focus):before{@apply(--layout-fit);background:currentColor;content:'';opacity:var(--dark-divider-opacity);pointer-events:none;@apply(--paper-item-focused-before)}</style></template></dom-module><dom-module id="paper-item" assetpath="../bower_components/paper-item/"><template><style include="paper-item-shared-styles"></style><style>:host{@apply(--layout-horizontal);@apply(--layout-center);@apply(--paper-font-subhead);@apply(--paper-item)}</style><content></content></template><script>Polymer({is:"paper-item",behaviors:[Polymer.PaperItemBehavior]})</script></dom-module><dom-module id="state-card-input_select" assetpath="state-summary/"><template><style>:host{display:block}state-badge{float:left;margin-top:10px}paper-dropdown-menu{display:block;margin-left:53px}</style><state-badge state-obj="[[stateObj]]"></state-badge><paper-dropdown-menu on-tap="stopPropagation" selected-item-label="{{selectedOption}}" label="[[stateObj.entityDisplay]]"><paper-menu class="dropdown-content" selected="[[computeSelected(stateObj)]]"><template is="dom-repeat" items="[[stateObj.attributes.options]]"><paper-item>[[item]]</paper-item></template></paper-menu></paper-dropdown-menu></template></dom-module><script>Polymer({is:"state-card-input_select",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object},selectedOption:{type:String,observer:"selectedOptionChanged"}},computeSelected:function(t){return t.attributes.options.indexOf(t.state)},selectedOptionChanged:function(t){""!==t&&t!==this.stateObj.state&&this.hass.serviceActions.callService("input_select","select_option",{option:t,entity_id:this.stateObj.entityId})},stopPropagation:function(t){t.stopPropagation()}})</script><script>Polymer.IronRangeBehavior={properties:{value:{type:Number,value:0,notify:!0,reflectToAttribute:!0},min:{type:Number,value:0,notify:!0},max:{type:Number,value:100,notify:!0},step:{type:Number,value:1,notify:!0},ratio:{type:Number,value:0,readOnly:!0,notify:!0}},observers:["_update(value, min, max, step)"],_calcRatio:function(t){return(this._clampValue(t)-this.min)/(this.max-this.min)},_clampValue:function(t){return Math.min(this.max,Math.max(this.min,this._calcStep(t)))},_calcStep:function(t){if(t=parseFloat(t),!this.step)return t;var e=Math.round((t-this.min)/this.step);return this.step<1?e/(1/this.step)+this.min:e*this.step+this.min},_validateValue:function(){var t=this._clampValue(this.value);return this.value=this.oldValue=isNaN(t)?this.oldValue:t,this.value!==t},_update:function(){this._validateValue(),this._setRatio(100*this._calcRatio(this.value))}}</script><dom-module id="paper-progress" assetpath="../bower_components/paper-progress/"><template><style>:host{display:block;width:200px;position:relative;overflow:hidden}:host([hidden]){display:none!important}#progressContainer{@apply(--paper-progress-container);position:relative}#progressContainer,.indeterminate::after{height:var(--paper-progress-height,4px)}#primaryProgress,#secondaryProgress,.indeterminate::after{@apply(--layout-fit)}#progressContainer,.indeterminate::after{background:var(--paper-progress-container-color,--google-grey-300)}:host(.transiting) #primaryProgress,:host(.transiting) #secondaryProgress{-webkit-transition-property:-webkit-transform;transition-property:transform;-webkit-transition-duration:var(--paper-progress-transition-duration,.08s);transition-duration:var(--paper-progress-transition-duration,.08s);-webkit-transition-timing-function:var(--paper-progress-transition-timing-function,ease);transition-timing-function:var(--paper-progress-transition-timing-function,ease);-webkit-transition-delay:var(--paper-progress-transition-delay,0s);transition-delay:var(--paper-progress-transition-delay,0s)}#primaryProgress,#secondaryProgress{@apply(--layout-fit);-webkit-transform-origin:left center;transform-origin:left center;-webkit-transform:scaleX(0);transform:scaleX(0);will-change:transform}#primaryProgress{background:var(--paper-progress-active-color,--google-green-500)}#secondaryProgress{background:var(--paper-progress-secondary-color,--google-green-100)}:host([disabled]) #primaryProgress{background:var(--paper-progress-disabled-active-color,--google-grey-500)}:host([disabled]) #secondaryProgress{background:var(--paper-progress-disabled-secondary-color,--google-grey-300)}:host(:not([disabled])) #primaryProgress.indeterminate{-webkit-transform-origin:right center;transform-origin:right center;-webkit-animation:indeterminate-bar var(--paper-progress-indeterminate-cycle-duration,2s) linear infinite;animation:indeterminate-bar var(--paper-progress-indeterminate-cycle-duration,2s) linear infinite}:host(:not([disabled])) #primaryProgress.indeterminate::after{content:"";-webkit-transform-origin:center center;transform-origin:center center;-webkit-animation:indeterminate-splitter var(--paper-progress-indeterminate-cycle-duration,2s) linear infinite;animation:indeterminate-splitter var(--paper-progress-indeterminate-cycle-duration,2s) linear infinite}@-webkit-keyframes indeterminate-bar{0%{-webkit-transform:scaleX(1) translateX(-100%)}50%{-webkit-transform:scaleX(1) translateX(0)}75%{-webkit-transform:scaleX(1) translateX(0);-webkit-animation-timing-function:cubic-bezier(.28,.62,.37,.91)}100%{-webkit-transform:scaleX(0) translateX(0)}}@-webkit-keyframes indeterminate-splitter{0%{-webkit-transform:scaleX(.75) translateX(-125%)}30%{-webkit-transform:scaleX(.75) translateX(-125%);-webkit-animation-timing-function:cubic-bezier(.42,0,.6,.8)}90%{-webkit-transform:scaleX(.75) translateX(125%)}100%{-webkit-transform:scaleX(.75) translateX(125%)}}@keyframes indeterminate-bar{0%{transform:scaleX(1) translateX(-100%)}50%{transform:scaleX(1) translateX(0)}75%{transform:scaleX(1) translateX(0);animation-timing-function:cubic-bezier(.28,.62,.37,.91)}100%{transform:scaleX(0) translateX(0)}}@keyframes indeterminate-splitter{0%{transform:scaleX(.75) translateX(-125%)}30%{transform:scaleX(.75) translateX(-125%);animation-timing-function:cubic-bezier(.42,0,.6,.8)}90%{transform:scaleX(.75) translateX(125%)}100%{transform:scaleX(.75) translateX(125%)}}</style><div id="progressContainer"><div id="secondaryProgress" hidden$="[[_hideSecondaryProgress(secondaryRatio)]]"></div><div id="primaryProgress"></div></div></template></dom-module><script>Polymer({is:"paper-progress",behaviors:[Polymer.IronRangeBehavior],properties:{secondaryProgress:{type:Number,value:0},secondaryRatio:{type:Number,value:0,readOnly:!0},indeterminate:{type:Boolean,value:!1,observer:"_toggleIndeterminate"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_disabledChanged"}},observers:["_progressChanged(secondaryProgress, value, min, max)"],hostAttributes:{role:"progressbar"},_toggleIndeterminate:function(e){this.toggleClass("indeterminate",e,this.$.primaryProgress)},_transformProgress:function(e,r){var s="scaleX("+r/100+")";e.style.transform=e.style.webkitTransform=s},_mainRatioChanged:function(e){this._transformProgress(this.$.primaryProgress,e)},_progressChanged:function(e,r,s,t){e=this._clampValue(e),r=this._clampValue(r);var a=100*this._calcRatio(e),i=100*this._calcRatio(r);this._setSecondaryRatio(a),this._transformProgress(this.$.secondaryProgress,a),this._transformProgress(this.$.primaryProgress,i),this.secondaryProgress=e,this.setAttribute("aria-valuenow",r),this.setAttribute("aria-valuemin",s),this.setAttribute("aria-valuemax",t)},_disabledChanged:function(e){this.setAttribute("aria-disabled",e?"true":"false")},_hideSecondaryProgress:function(e){return 0===e}})</script><dom-module id="paper-slider" assetpath="../bower_components/paper-slider/"><template strip-whitespace=""><style>:host{@apply(--layout);@apply(--layout-justified);@apply(--layout-center);width:200px;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;--paper-progress-active-color:var(--paper-slider-active-color, --google-blue-700);--paper-progress-secondary-color:var(--paper-slider-secondary-color, --google-blue-300);--paper-progress-disabled-active-color:var(--paper-slider-disabled-active-color, --paper-grey-400);--paper-progress-disabled-secondary-color:var(--paper-slider-disabled-secondary-color, --paper-grey-400)}:host(:focus){outline:0}#sliderContainer{position:relative;width:100%;height:calc(30px + var(--paper-slider-height,2px));margin-left:calc(15px + var(--paper-slider-height,2px)/ 2);margin-right:calc(15px + var(--paper-slider-height,2px)/ 2)}#sliderContainer:focus{outline:0}#sliderContainer.editable{margin-top:12px;margin-bottom:12px}.bar-container{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.ring>.bar-container{left:calc(5px + var(--paper-slider-height,2px)/ 2);transition:left .18s ease}.ring.expand.dragging>.bar-container{transition:none}.ring.expand:not(.pin)>.bar-container{left:calc(8px + var(--paper-slider-height,2px)/ 2)}#sliderBar{padding:15px 0;width:100%;background-color:var(--paper-slider-bar-color,transparent);--paper-progress-container-color:var(--paper-slider-container-color, --paper-grey-400);--paper-progress-height:var(--paper-slider-height, 2px)}.slider-markers{position:absolute;top:calc(14px + var(--paper-slider-height,2px)/ 2);height:var(--paper-slider-height,2px);left:0;right:-1px;box-sizing:border-box;pointer-events:none;@apply(--layout-horizontal)}.slider-marker{@apply(--layout-flex)}.slider-marker::after,.slider-markers::after{content:"";display:block;margin-left:-1px;width:2px;height:2px;border-radius:50%;background-color:#000}#sliderKnob{position:absolute;left:0;top:0;margin-left:calc(-15px - var(--paper-slider-height,2px)/ 2);width:calc(30px + var(--paper-slider-height,2px));height:calc(30px + var(--paper-slider-height,2px))}.transiting>#sliderKnob{transition:left 80ms ease}#sliderKnob:focus{outline:0}#sliderKnob.dragging{transition:none}.snaps>#sliderKnob.dragging{transition:-webkit-transform 80ms ease;transition:transform 80ms ease}#sliderKnobInner{margin:10px;width:calc(100% - 20px);height:calc(100% - 20px);background-color:var(--paper-slider-knob-color,--google-blue-700);border:2px solid var(--paper-slider-knob-color,--google-blue-700);border-radius:50%;-moz-box-sizing:border-box;box-sizing:border-box;transition-property:-webkit-transform,background-color,border;transition-property:transform,background-color,border;transition-duration:.18s;transition-timing-function:ease}.expand:not(.pin)>#sliderKnob>#sliderKnobInner{-webkit-transform:scale(1.5);transform:scale(1.5)}.ring>#sliderKnob>#sliderKnobInner{background-color:var(--paper-slider-knob-start-color,transparent);border:2px solid var(--paper-slider-knob-start-border-color,--paper-grey-400)}#sliderKnobInner::before{background-color:var(--paper-slider-pin-color,--google-blue-700)}.pin>#sliderKnob>#sliderKnobInner::before{content:"";position:absolute;top:0;left:50%;margin-left:-13px;width:26px;height:26px;border-radius:50% 50% 50% 0;-webkit-transform:rotate(-45deg) scale(0) translate(0);transform:rotate(-45deg) scale(0) translate(0)}#sliderKnobInner::after,#sliderKnobInner::before{transition:-webkit-transform .18s ease,background-color .18s ease;transition:transform .18s ease,background-color .18s ease}.pin.ring>#sliderKnob>#sliderKnobInner::before{background-color:var(--paper-slider-pin-start-color,--paper-grey-400)}.pin.expand>#sliderKnob>#sliderKnobInner::before{-webkit-transform:rotate(-45deg) scale(1) translate(17px,-17px);transform:rotate(-45deg) scale(1) translate(17px,-17px)}.pin>#sliderKnob>#sliderKnobInner::after{content:attr(value);position:absolute;top:0;left:50%;margin-left:-16px;width:32px;height:26px;text-align:center;color:var(--paper-slider-font-color,#fff);font-size:10px;-webkit-transform:scale(0) translate(0);transform:scale(0) translate(0)}.pin.expand>#sliderKnob>#sliderKnobInner::after{-webkit-transform:scale(1) translate(0,-17px);transform:scale(1) translate(0,-17px)}.slider-input{width:50px;overflow:hidden;--paper-input-container-input:{text-align:center};@apply(--paper-slider-input)}#sliderContainer.disabled{pointer-events:none}.disabled>#sliderKnob>#sliderKnobInner{background-color:var(--paper-slider-disabled-knob-color,--paper-grey-400);border:2px solid var(--paper-slider-disabled-knob-color,--paper-grey-400);-webkit-transform:scale3d(.75,.75,1);transform:scale3d(.75,.75,1)}.disabled.ring>#sliderKnob>#sliderKnobInner{background-color:var(--paper-slider-knob-start-color,transparent);border:2px solid var(--paper-slider-knob-start-border-color,--paper-grey-400)}paper-ripple{color:var(--paper-slider-knob-color,--google-blue-700)}</style><div id="sliderContainer" class$="[[_getClassNames(disabled, pin, snaps, immediateValue, min, expand, dragging, transiting, editable)]]"><div class="bar-container"><paper-progress disabled$="[[disabled]]" id="sliderBar" aria-hidden="true" min="[[min]]" max="[[max]]" step="[[step]]" value="[[immediateValue]]" secondary-progress="[[secondaryProgress]]" on-down="_bardown" on-up="_resetKnob" on-track="_onTrack"></paper-progress></div><template is="dom-if" if="[[snaps]]"><div class="slider-markers"><template is="dom-repeat" items="[[markers]]"><div class="slider-marker"></div></template></div></template><div id="sliderKnob" on-down="_knobdown" on-up="_resetKnob" on-track="_onTrack" on-transitionend="_knobTransitionEnd"><div id="sliderKnobInner" value$="[[immediateValue]]"></div></div></div><template is="dom-if" if="[[editable]]"><paper-input id="input" type="number" step="[[step]]" min="[[min]]" max="[[max]]" class="slider-input" disabled$="[[disabled]]" value="[[immediateValue]]" on-change="_changeValue" on-keydown="_inputKeyDown" no-label-float=""></paper-input></template></template><script>Polymer({is:"paper-slider",behaviors:[Polymer.IronA11yKeysBehavior,Polymer.IronFormElementBehavior,Polymer.PaperInkyFocusBehavior,Polymer.IronRangeBehavior],properties:{snaps:{type:Boolean,value:!1,notify:!0},pin:{type:Boolean,value:!1,notify:!0},secondaryProgress:{type:Number,value:0,notify:!0,observer:"_secondaryProgressChanged"},editable:{type:Boolean,value:!1},immediateValue:{type:Number,value:0,readOnly:!0,notify:!0},maxMarkers:{type:Number,value:0,notify:!0},expand:{type:Boolean,value:!1,readOnly:!0},dragging:{type:Boolean,value:!1,readOnly:!0},transiting:{type:Boolean,value:!1,readOnly:!0},markers:{type:Array,readOnly:!0,value:[]}},observers:["_updateKnob(value, min, max, snaps, step)","_valueChanged(value)","_immediateValueChanged(immediateValue)","_updateMarkers(maxMarkers, min, max, snaps)"],hostAttributes:{role:"slider",tabindex:0},keyBindings:{"left down pagedown home":"_decrementKey","right up pageup end":"_incrementKey"},increment:function(){this.value=this._clampValue(this.value+this.step)},decrement:function(){this.value=this._clampValue(this.value-this.step)},_updateKnob:function(t,e,i,s,a){this.setAttribute("aria-valuemin",e),this.setAttribute("aria-valuemax",i),this.setAttribute("aria-valuenow",t),this._positionKnob(this._calcRatio(t))},_valueChanged:function(){this.fire("value-change")},_immediateValueChanged:function(){this.dragging?this.fire("immediate-value-change"):this.value=this.immediateValue},_secondaryProgressChanged:function(){this.secondaryProgress=this._clampValue(this.secondaryProgress)},_expandKnob:function(){this._setExpand(!0)},_resetKnob:function(){this.cancelDebouncer("expandKnob"),this._setExpand(!1)},_positionKnob:function(t){this._setImmediateValue(this._calcStep(this._calcKnobPosition(t))),this._setRatio(this._calcRatio(this.immediateValue)),this.$.sliderKnob.style.left=100*this.ratio+"%",this.dragging&&(this._knobstartx=this.ratio*this._w,this.translate3d(0,0,0,this.$.sliderKnob))},_calcKnobPosition:function(t){return(this.max-this.min)*t+this.min},_onTrack:function(t){switch(t.stopPropagation(),t.detail.state){case"start":this._trackStart(t);break;case"track":this._trackX(t);break;case"end":this._trackEnd()}},_trackStart:function(t){this._w=this.$.sliderBar.offsetWidth,this._x=this.ratio*this._w,this._startx=this._x,this._knobstartx=this._startx,this._minx=-this._startx,this._maxx=this._w-this._startx,this.$.sliderKnob.classList.add("dragging"),this._setDragging(!0)},_trackX:function(t){this.dragging||this._trackStart(t);var e=Math.min(this._maxx,Math.max(this._minx,t.detail.dx));this._x=this._startx+e;var i=this._calcStep(this._calcKnobPosition(this._x/this._w));this._setImmediateValue(i);var s=this._calcRatio(this.immediateValue)*this._w-this._knobstartx;this.translate3d(s+"px",0,0,this.$.sliderKnob)},_trackEnd:function(){var t=this.$.sliderKnob.style;this.$.sliderKnob.classList.remove("dragging"),this._setDragging(!1),this._resetKnob(),this.value=this.immediateValue,t.transform=t.webkitTransform="",this.fire("change")},_knobdown:function(t){this._expandKnob(),t.preventDefault(),this.focus()},_bardown:function(t){this._w=this.$.sliderBar.offsetWidth;var e=this.$.sliderBar.getBoundingClientRect(),i=(t.detail.x-e.left)/this._w,s=this.ratio;this._setTransiting(!0),this._positionKnob(i),this.debounce("expandKnob",this._expandKnob,60),s===this.ratio&&this._setTransiting(!1),this.async(function(){this.fire("change")}),t.preventDefault(),this.focus()},_knobTransitionEnd:function(t){t.target===this.$.sliderKnob&&this._setTransiting(!1)},_updateMarkers:function(t,e,i,s){s||this._setMarkers([]);var a=Math.round((i-e)/this.step);a>t&&(a=t),this._setMarkers(new Array(a))},_mergeClasses:function(t){return Object.keys(t).filter(function(e){return t[e]}).join(" ")},_getClassNames:function(){return this._mergeClasses({disabled:this.disabled,pin:this.pin,snaps:this.snaps,ring:this.immediateValue<=this.min,expand:this.expand,dragging:this.dragging,transiting:this.transiting,editable:this.editable})},_incrementKey:function(t){this.disabled||("end"===t.detail.key?this.value=this.max:this.increment(),this.fire("change"))},_decrementKey:function(t){this.disabled||("home"===t.detail.key?this.value=this.min:this.decrement(),this.fire("change"))},_changeValue:function(t){this.value=t.target.value,this.fire("change")},_inputKeyDown:function(t){t.stopPropagation()},_createRipple:function(){return this._rippleContainer=this.$.sliderKnob,Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this)},_focusedChanged:function(t){t&&this.ensureRipple(),this.hasRipple()&&(t?this._ripple.style.display="":this._ripple.style.display="none",this._ripple.holdDown=t)}})</script></dom-module><dom-module id="state-card-input_slider" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-slider{margin-left:16px}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><paper-slider min="[[min]]" max="[[max]]" value="{{value}}" step="[[step]]" pin="" on-change="selectedValueChanged" on-tap="stopPropagation"></paper-slider></div></template></dom-module><script>Polymer({is:"state-card-input_slider",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object,observer:"stateObjectChanged"},min:{type:Number},max:{type:Number},step:{type:Number},value:{type:Number}},stateObjectChanged:function(t){this.value=Number(t.state),this.min=Number(t.attributes.min),this.max=Number(t.attributes.max),this.step=Number(t.attributes.step)},selectedValueChanged:function(){this.value!==Number(this.stateObj.state)&&this.hass.serviceActions.callService("input_slider","select_value",{value:this.value,entity_id:this.stateObj.entityId})},stopPropagation:function(t){t.stopPropagation()}})</script><dom-module id="state-card-media_player" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>:host{line-height:1.5}.state{@apply(--paper-font-common-nowrap);@apply(--paper-font-body1);margin-left:16px;text-align:right}.main-text{@apply(--paper-font-common-nowrap);color:var(--primary-text-color);text-transform:capitalize}.main-text[take-height]{line-height:40px}.secondary-text{@apply(--paper-font-common-nowrap);color:var(--secondary-text-color)}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><div class="state"><div class="main-text" take-height$="[[!secondaryText]]">[[computePrimaryText(stateObj, isPlaying)]]</div><div class="secondary-text">[[secondaryText]]</div></div></div></template></dom-module><script>Polymer({PLAYING_STATES:["playing","paused"],is:"state-card-media_player",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object},isPlaying:{type:Boolean,computed:"computeIsPlaying(stateObj)"},secondaryText:{type:String,computed:"computeSecondaryText(stateObj)"}},computeIsPlaying:function(t){return this.PLAYING_STATES.indexOf(t.state)!==-1},computePrimaryText:function(t,e){return e?t.attributes.media_title:t.stateDisplay},computeSecondaryText:function(t){var e;return"music"===t.attributes.media_content_type?t.attributes.media_artist:"tvshow"===t.attributes.media_content_type?(e=t.attributes.media_series_title,t.attributes.media_season&&t.attributes.media_episode&&(e+=" S"+t.attributes.media_season+"E"+t.attributes.media_episode),e):t.attributes.app_name?t.attributes.app_name:""}})</script><dom-module id="state-card-scene" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-button{color:var(--default-primary-color);font-weight:500;top:3px;height:37px;margin-right:-.57em}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><paper-button on-tap="activateScene">ACTIVATE</paper-button></div></template></dom-module><script>Polymer({is:"state-card-scene",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},activateScene:function(t){t.stopPropagation(),this.hass.serviceActions.callTurnOn(this.stateObj.entityId)}})</script><dom-module id="state-card-script" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-button{color:var(--default-primary-color);font-weight:500;top:3px;height:37px;margin-right:-.57em}ha-entity-toggle{margin-left:16px}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><template is="dom-if" if="[[stateObj.attributes.can_cancel]]"><ha-entity-toggle state-obj="[[stateObj]]" hass="[[hass]]"></ha-entity-toggle></template><template is="dom-if" if="[[!stateObj.attributes.can_cancel]]"><paper-button on-tap="fireScript">ACTIVATE</paper-button></template></div></template></dom-module><script>Polymer({is:"state-card-script",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},fireScript:function(t){t.stopPropagation(),this.hass.serviceActions.callTurnOn(this.stateObj.entityId)}})</script><dom-module id="state-card-toggle" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>ha-entity-toggle{margin-left:16px}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><ha-entity-toggle state-obj="[[stateObj]]" hass="[[hass]]"></ha-entity-toggle></div></template></dom-module><script>Polymer({is:"state-card-toggle",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object}}})</script><dom-module id="state-card-weblink" assetpath="state-summary/"><template><style>:host{display:block}.name{@apply(--paper-font-common-nowrap);@apply(--paper-font-body1);color:var(--primary-color);text-transform:capitalize;line-height:40px;margin-left:16px}</style><state-badge state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-badge><a href$="[[stateObj.state]]" target="_blank" class="name" id="link">[[stateObj.entityDisplay]]</a></template></dom-module><script>Polymer({is:"state-card-weblink",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},listeners:{tap:"onTap"},onTap:function(t){t.stopPropagation(),t.target!==this.$.link&&window.open(this.stateObj.state,"_blank")}})</script><script>Polymer({is:"state-card-content",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},observers:["inputChanged(hass, inDialog, stateObj)"],inputChanged:function(t,e,s){s&&window.hassUtil.dynamicContentUpdater(this,"STATE-CARD-"+window.hassUtil.stateCardType(this.hass,s).toUpperCase(),{hass:t,stateObj:s,inDialog:e})}})</script><dom-module id="ha-entities-card" assetpath="cards/"><template><style is="custom-style" include="iron-flex"></style><style>.states{padding-bottom:16px}.state{padding:4px 16px;cursor:pointer}.header{@apply(--paper-font-headline);line-height:40px;color:var(--primary-text-color);padding:20px 16px 12px}.header .name{@apply(--paper-font-common-nowrap)}.header.domain .name{text-transform:capitalize}ha-entity-toggle{margin-left:16px}.header-more-info{cursor:pointer}</style><ha-card><div class$="[[computeTitleClass(groupEntity)]]" on-tap="entityTapped"><div class="flex name">[[computeTitle(states, groupEntity)]]</div><template is="dom-if" if="[[showGroupToggle(groupEntity, states)]]"><ha-entity-toggle hass="[[hass]]" state-obj="[[groupEntity]]"></ha-entity-toggle></template></div><div class="states"><template is="dom-repeat" items="[[states]]"><div class="state" on-tap="entityTapped"><state-card-content hass="[[hass]]" class="state-card" state-obj="[[item]]"></state-card-content></div></template></div></ha-card></template></dom-module><script>Polymer({is:"ha-entities-card",properties:{hass:{type:Object},states:{type:Array},groupEntity:{type:Object}},computeTitle:function(t,e){return e?e.entityDisplay:t[0].domain.replace(/_/g," ")},computeTitleClass:function(t){var e="header horizontal layout center ";return e+=t?"header-more-info":"domain"},entityTapped:function(t){var e;t.target.classList.contains("paper-toggle-button")||t.target.classList.contains("paper-icon-button")||!t.model&&!this.groupEntity||(t.stopPropagation(),e=t.model?t.model.item.entityId:this.groupEntity.entityId,this.async(function(){this.hass.moreInfoActions.selectEntity(e)}.bind(this),1))},showGroupToggle:function(t,e){var n;return!(!t||!e||"hidden"===t.attributes.control||"on"!==t.state&&"off"!==t.state)&&(n=e.reduce(function(t,e){return t+window.hassUtil.canToggle(this.hass,e.entityId)},0),n>1)}})</script><dom-module id="ha-introduction-card" assetpath="cards/"><template><style>:host{@apply(--paper-font-body1)}a{color:var(--dark-primary-color)}ul{margin:8px;padding-left:16px}li{margin-bottom:8px}.content{padding:0 16px 16px}.install{display:block;line-height:1.5em;margin-top:8px;margin-bottom:16px}</style><ha-card header="Welcome Home!"><div class="content"><template is="dom-if" if="[[hass.demo]]">To install Home Assistant, run:<br><code class="install">pip3 install homeassistant<br>hass --open-ui</code></template>Here are some resources to get started.<ul><template is="dom-if" if="[[hass.demo]]"><li><a href="https://home-assistant.io/getting-started/">Home Assistant website</a></li><li><a href="https://home-assistant.io/getting-started/">Installation instructions</a></li><li><a href="https://home-assistant.io/getting-started/troubleshooting/">Troubleshooting your installation</a></li></template><li><a href="https://home-assistant.io/getting-started/configuration/" target="_blank">Configuring Home Assistant</a></li><li><a href="https://home-assistant.io/components/" target="_blank">Available components</a></li><li><a href="https://home-assistant.io/getting-started/troubleshooting-configuration/" target="_blank">Troubleshooting your configuration</a></li><li><a href="https://home-assistant.io/help/" target="_blank">Ask community for help</a></li></ul><template is="dom-if" if="[[showHideInstruction]]">To remove this card, edit your config in <code>configuration.yaml</code> and disable the <code>introduction</code> component.</template></div></ha-card></template></dom-module><script>Polymer({is:"ha-introduction-card",properties:{hass:{type:Object},showHideInstruction:{type:Boolean,value:!0}}})</script><dom-module id="ha-media_player-card" assetpath="cards/"><template><style include="paper-material iron-flex iron-flex-alignment iron-positioning">:host{display:block;position:relative;font-size:0;border-radius:2px;overflow:hidden}.banner{position:relative;background-color:#fff;border-top-left-radius:2px;border-top-right-radius:2px}.banner:before{display:block;content:"";width:100%;padding-top:56%;transition:padding-top .8s}.banner.no-cover{background-position:center center;background-image:url(/static/images/card_media_player_bg.png);background-repeat:no-repeat;background-color:var(--primary-color)}.banner.content-type-music:before{padding-top:100%}.banner.no-cover:before{padding-top:88px}.banner>.cover{position:absolute;top:0;left:0;right:0;bottom:0;border-top-left-radius:2px;border-top-right-radius:2px;background-position:center center;background-size:cover;transition:opacity .8s;opacity:1}.banner.is-off>.cover{opacity:0}.banner>.caption{@apply(--paper-font-caption);position:absolute;left:0;right:0;bottom:0;background-color:rgba(0,0,0,var(--dark-secondary-opacity));padding:8px 16px;font-size:14px;font-weight:500;color:#fff;transition:background-color .5s}.banner.is-off>.caption{background-color:initial}.banner>.caption .title{@apply(--paper-font-common-nowrap);font-size:1.2em;margin:8px 0 4px}.progress{width:100%;--paper-progress-active-color:var(--accent-color);--paper-progress-container-color:#FFF}.controls{position:relative;@apply(--paper-font-body1);padding:8px;border-bottom-left-radius:2px;border-bottom-right-radius:2px;background-color:#fff}.controls paper-icon-button{width:44px;height:44px}paper-icon-button{opacity:var(--dark-primary-opacity)}paper-icon-button[disabled]{opacity:var(--dark-disabled-opacity)}paper-icon-button.primary{width:56px!important;height:56px!important;background-color:var(--primary-color);color:#fff;border-radius:50%;padding:8px;transition:background-color .5s}paper-icon-button.primary[disabled]{background-color:rgba(0,0,0,var(--dark-disabled-opacity))}[invisible]{visibility:hidden!important}</style><div class$="[[computeBannerClasses(playerObj)]]"><div class="cover" id="cover"></div><div class="caption">[[stateObj.entityDisplay]]<div class="title">[[playerObj.primaryText]]</div>[[playerObj.secondaryText]]<br></div></div><paper-progress max="[[stateObj.attributes.media_duration]]" value="[[playbackPosition]]" hidden$="[[computeHideProgress(playerObj)]]" class="progress"></paper-progress><div class="controls layout horizontal justified"><paper-icon-button icon="mdi:power" on-tap="handleTogglePower" invisible$="[[computeHidePowerButton(playerObj)]]" class="self-center secondary"></paper-icon-button><div><paper-icon-button icon="mdi:skip-previous" invisible$="[[!playerObj.supportsPreviousTrack]]" disabled="[[playerObj.isOff]]" on-tap="handlePrevious"></paper-icon-button><paper-icon-button class="primary" icon="[[computePlaybackControlIcon(playerObj)]]" invisible$="[[!computePlaybackControlIcon(playerObj)]]" disabled="[[playerObj.isOff]]" on-tap="handlePlaybackControl"></paper-icon-button><paper-icon-button icon="mdi:skip-next" invisible$="[[!playerObj.supportsNextTrack]]" disabled="[[playerObj.isOff]]" on-tap="handleNext"></paper-icon-button></div><paper-icon-button icon="mdi:dots-vertical" on-tap="handleOpenMoreInfo" class="self-center secondary"></paper-icon-button></div></template></dom-module><script>Polymer({is:"ha-media_player-card",properties:{hass:{type:Object},stateObj:{type:Object},playerObj:{type:Object,computed:"computePlayerObj(stateObj)",observer:"playerObjChanged"},playbackControlIcon:{type:String,computed:"computePlaybackControlIcon(playerObj)"},playbackPosition:{type:Number},elevation:{type:Number,value:1,reflectToAttribute:!0}},created:function(){this.updatePlaybackPosition=this.updatePlaybackPosition.bind(this)},playerObjChanged:function(t){var e=t.stateObj.attributes.entity_picture;e?this.$.cover.style.backgroundImage="url("+e+")":this.$.cover.style.backgroundImage="",t.isPlaying?(this._positionTracking||(this._positionTracking=setInterval(this.updatePlaybackPosition,1e3)),this.updatePlaybackPosition()):this._positionTracking&&(clearInterval(this._positionTracking),this._positionTracking=null,this.playbackPosition=0)},updatePlaybackPosition:function(){this.playbackPosition=this.playerObj.currentProgress},computeBannerClasses:function(t){var e="banner";return t.isOff||t.isIdle?e+=" is-off no-cover":t.stateObj.attributes.entity_picture?"music"===t.stateObj.attributes.media_content_type&&(e+=" content-type-music"):e+=" no-cover",e},computeHideProgress:function(t){return!t.showProgress},computeHidePowerButton:function(t){return t.isOff?!t.supportsTurnOn:!t.supportsTurnOff},computePlayerObj:function(t){return t.domainModel(this.hass)},computePlaybackControlIcon:function(t){return t.isPlaying?t.supportsPause?"mdi:pause":"mdi:stop":t.isPaused||t.isOff||t.isIdle?t.supportsPlay?"mdi:play":null:""},handleNext:function(t){t.stopPropagation(),this.playerObj.nextTrack()},handleOpenMoreInfo:function(t){t.stopPropagation(),this.async(function(){this.hass.moreInfoActions.selectEntity(this.stateObj.entityId)},1)},handlePlaybackControl:function(t){t.stopPropagation(),this.playerObj.mediaPlayPause()},handlePrevious:function(t){t.stopPropagation(),this.playerObj.previousTrack()},handleTogglePower:function(t){t.stopPropagation(),this.playerObj.togglePower()}})</script><script>!function(){"use strict";Polymer.IronJsonpLibraryBehavior={properties:{libraryLoaded:{type:Boolean,value:!1,notify:!0,readOnly:!0},libraryErrorMessage:{type:String,value:null,notify:!0,readOnly:!0}},observers:["_libraryUrlChanged(libraryUrl)"],_libraryUrlChanged:function(r){this._isReady&&this.libraryUrl&&this._loadLibrary()},_libraryLoadCallback:function(r,i){r?(console.warn("Library load failed:",r.message),this._setLibraryErrorMessage(r.message)):(this._setLibraryErrorMessage(null),this._setLibraryLoaded(!0),this.notifyEvent&&this.fire(this.notifyEvent,i))},_loadLibrary:function(){r.require(this.libraryUrl,this._libraryLoadCallback.bind(this),this.callbackName)},ready:function(){this._isReady=!0,this.libraryUrl&&this._loadLibrary()}};var r={apiMap:{},require:function(r,t,e){var a=this.nameFromUrl(r);this.apiMap[a]||(this.apiMap[a]=new i(a,r,e)),this.apiMap[a].requestNotify(t)},nameFromUrl:function(r){return r.replace(/[\:\/\%\?\&\.\=\-\,]/g,"_")+"_api"}},i=function(r,i,t){if(this.notifiers=[],!t){if(!(i.indexOf(this.callbackMacro)>=0))return void(this.error=new Error("IronJsonpLibraryBehavior a %%callback%% parameter is required in libraryUrl"));t=r+"_loaded",i=i.replace(this.callbackMacro,t)}this.callbackName=t,window[this.callbackName]=this.success.bind(this),this.addScript(i)};i.prototype={callbackMacro:"%%callback%%",loaded:!1,addScript:function(r){var i=document.createElement("script");i.src=r,i.onerror=this.handleError.bind(this);var t=document.querySelector("script")||document.body;t.parentNode.insertBefore(i,t),this.script=i},removeScript:function(){this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.script=null},handleError:function(r){this.error=new Error("Library failed to load"),this.notifyAll(),this.cleanup()},success:function(){this.loaded=!0,this.result=Array.prototype.slice.call(arguments),this.notifyAll(),this.cleanup()},cleanup:function(){delete window[this.callbackName]},notifyAll:function(){this.notifiers.forEach(function(r){r(this.error,this.result)}.bind(this)),this.notifiers=[]},requestNotify:function(r){this.loaded||this.error?r(this.error,this.result):this.notifiers.push(r)}}}()</script><script>Polymer({is:"iron-jsonp-library",behaviors:[Polymer.IronJsonpLibraryBehavior],properties:{libraryUrl:String,callbackName:String,notifyEvent:String}})</script><script>Polymer({is:"google-legacy-loader",behaviors:[Polymer.IronJsonpLibraryBehavior],properties:{libraryUrl:{type:String,value:"https://www.google.com/jsapi?callback=%%callback%%"},notifyEvent:{type:String,value:"api-load"}},get api(){return google}})</script><dom-module id="ha-weather-card" assetpath="cards/"><template><style>.content{padding:0 16px 16px}.attribution{color:var(--secondary-text-color);text-align:right}</style><google-legacy-loader on-api-load="googleApiLoaded"></google-legacy-loader><ha-card header="[[computeTitle(stateObj)]]"><div class="content"><template is="dom-repeat" items="[[computeDisplayAttributes(stateObj)]]" as="attribute"><div>[[formatAttribute(attribute)]]: [[formatAttributeValue(stateObj, attribute)]]</div></template><div id="chart_area"></div><div class="attribution" hidden$="[[!computeAttribution(stateObj)]]">[[computeAttribution(stateObj)]]</div></div></ha-card></template></dom-module><script>!function(){"use strict";var t=["attribution","forecast","friendly_name"];Polymer({is:"ha-weather-card",properties:{hass:{type:Object},stateObj:{type:Object,observer:"checkRequirements"}},computeTitle:function(t){return t.attributes.friendly_name},computeDisplayAttributes:function(e){return window.hassUtil.computeDisplayAttributes(e,t)},formatAttribute:function(t){return window.hassUtil.formatAttribute(t)},formatAttributeValue:function(t,e){return window.hassUtil.formatAttributeValue(t,e)},computeAttribution:function(t){return window.hassUtil.computeAttribution(t)},getDataArray:function(){var t,e=[],i=this.stateObj.attributes.forecast;if(!this.stateObj.attributes.forecast)return[];for(e.push([new Date,this.stateObj.attributes.temperature]),t=0;t<i.length;t++)e.push([new Date(i[t].datetime),i[t].temperature]);return e},checkRequirements:function(){this.stateObj&&window.google&&(this.chartEngine||(this.chartEngine=new window.google.visualization.LineChart(document.getElementById("chart_area"))),this.drawChart())},drawChart:function(){var t=new window.google.visualization.DataTable,e={legend:{position:"top"},interpolateNulls:!0,titlePosition:"none",chartArea:{left:25,top:5,height:"100%",width:"90%",bottom:25},curveType:"function"};t.addColumn("datetime","Time"),t.addColumn("number","Temperature"),t.addRows(this.getDataArray()),this.chartEngine.draw(t,e)},googleApiLoaded:function(){window.google.load("visualization","1",{packages:["corechart"],callback:function(){this.checkRequirements()}.bind(this)})}})}()</script><dom-module id="ha-persistent_notification-card" assetpath="cards/"><template><style>:host{@apply(--paper-font-body1)}.content{padding:0 16px 16px}paper-button{margin:8px;font-weight:500}</style><ha-card header="[[computeTitle(stateObj)]]"><div id="pnContent" class="content"></div><paper-button on-tap="dismissTap">DISMISS</paper-button></ha-card></template></dom-module><script>Polymer({is:"ha-persistent_notification-card",properties:{hass:{type:Object},stateObj:{type:Object},scriptLoaded:{type:Boolean,value:!1}},observers:["computeContent(stateObj, scriptLoaded)"],computeTitle:function(t){return t.attributes.title||t.entityDisplay},loadScript:function(){var t=function(){this.scriptLoaded=!0}.bind(this),e=function(){console.error("Micromarkdown was not loaded.")};this.importHref("/static/micromarkdown-js.html",t,e)},computeContent:function(t,e){var i="",n="";e&&(i=this.$.pnContent,n=window.micromarkdown.parse(t.state),i.innerHTML=n)},ready:function(){this.loadScript()},dismissTap:function(t){t.preventDefault(),this.hass.entityActions.delete(this.stateObj)}})</script><script>Polymer({is:"ha-card-chooser",properties:{cardData:{type:Object,observer:"cardDataChanged"}},cardDataChanged:function(a){a&&window.hassUtil.dynamicContentUpdater(this,"HA-"+a.cardType.toUpperCase()+"-CARD",a)}})</script><dom-module id="ha-cards" assetpath="components/"><template><style is="custom-style" include="iron-flex iron-flex-factors"></style><style>:host{display:block;padding-top:8px;padding-right:8px}.badges{font-size:85%;text-align:center}.column{max-width:500px;overflow-x:hidden}.zone-card{margin-left:8px;margin-bottom:8px}@media (max-width:500px){:host{padding-right:0}.zone-card{margin-left:0}}@media (max-width:599px){.column{max-width:600px}}</style><div class="main"><template is="dom-if" if="[[cards.badges]]"><div class="badges"><template is="dom-if" if="[[cards.demo]]"><ha-demo-badge></ha-demo-badge></template><ha-badges-card states="[[cards.badges]]" hass="[[hass]]"></ha-badges-card></div></template><div class="horizontal layout center-justified"><template is="dom-repeat" items="[[cards.columns]]" as="column"><div class="column flex-1"><template is="dom-repeat" items="[[column]]" as="card"><div class="zone-card"><ha-card-chooser card-data="[[card]]" hass="[[hass]]"></ha-card-chooser></div></template></div></template></div></div></template></dom-module><script>!function(){"use strict";function t(t){return t in r?r[t]:30}function e(t){return"group"===t.domain?t.attributes.order:t.entityDisplay.toLowerCase()}var n={camera:4,media_player:3,persistent_notification:0,weather:4},r={configurator:-20,persistent_notification:-15,group:-10,a:-1,updater:0,sun:1,device_tracker:2,alarm_control_panel:3,sensor:5,binary_sensor:6};Polymer({is:"ha-cards",properties:{hass:{type:Object},showIntroduction:{type:Boolean,value:!1},columns:{type:Number,value:2},states:{type:Object},panelVisible:{type:Boolean},viewVisible:{type:Boolean},cards:{type:Object}},observers:["updateCards(columns, states, showIntroduction, panelVisible, viewVisible)"],updateCards:function(t,e,n,r,o){r&&o&&this.debounce("updateCards",function(){this.panelVisible&&this.viewVisible&&(this.cards=this.computeCards(t,e,n))}.bind(this))},computeCards:function(r,o,s){function i(t){return t.filter(function(t){return!(t.entityId in h)})}function a(t){var e=0;for(p=e;p<y.length;p++){if(y[p]<5){e=p;break}y[p]<y[e]&&(e=p)}return y[e]+=t,e}function u(t,e,r){var o,s,i,u;0!==e.length&&(o=[],s=[],i=0,e.forEach(function(t){t.domain in n?(o.push(t),i+=n[t.domain]):(s.push(t),i++)}),i+=s.length>1,u=a(i),s.length>0&&f.columns[u].push({hass:d,cardType:"entities",states:s,groupEntity:r||!1}),o.forEach(function(t){f.columns[u].push({hass:d,cardType:t.domain,stateObj:t})}))}var c,p,d=this.hass,l=o.groupBy(function(t){return t.domain}),h={},f={demo:!1,badges:[],columns:[]},y=[];for(p=0;p<r;p++)f.columns.push([]),y.push(0);return s&&f.columns[a(5)].push({hass:d,cardType:"introduction",showHideInstruction:o.size>0&&!d.demo}),c=this.hass.util.expandGroup,l.keySeq().sortBy(function(e){return t(e)}).forEach(function(n){var r;return"a"===n?void(f.demo=!0):(r=t(n),void(r>=0&&r<10?f.badges.push.apply(f.badges,i(l.get(n)).sortBy(e).toArray()):"group"===n?l.get(n).sortBy(e).forEach(function(t){var e=c(t,o);e.forEach(function(t){h[t.entityId]=!0}),u(t.entityId,e.toArray(),t)}):u(n,i(l.get(n)).sortBy(e).toArray())))}),f.columns=f.columns.filter(function(t){return t.length>0}),f}})}()</script><dom-module id="partial-cards" assetpath="layouts/"><template><style include="iron-flex iron-positioning ha-style">:host{-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none}app-header-layout{background-color:#E5E5E5}paper-tabs{margin-left:12px;--paper-tabs-selection-bar-color:#FFF;text-transform:uppercase}</style><app-header-layout has-scrolling-region="" id="layout"><app-header effects="waterfall" condenses="" fixed=""><app-toolbar><ha-menu-button narrow="[[narrow]]" show-menu="[[showMenu]]"></ha-menu-button><div main-title="">[[computeTitle(views, locationName)]]</div><paper-icon-button icon="mdi:microphone" hidden$="[[!canListen]]" on-tap="handleListenClick"></paper-icon-button></app-toolbar><div sticky="" hidden$="[[!views.length]]"><paper-tabs scrollable="" selected="[[currentView]]" attr-for-selected="data-entity" on-iron-select="handleViewSelected"><paper-tab data-entity="" on-tap="scrollToTop">[[locationName]]</paper-tab><template is="dom-repeat" items="[[views]]"><paper-tab data-entity$="[[item.entityId]]" on-tap="scrollToTop"><template is="dom-if" if="[[item.attributes.icon]]"><iron-icon icon="[[item.attributes.icon]]"></iron-icon></template><template is="dom-if" if="[[!item.attributes.icon]]">[[item.entityDisplay]]</template></paper-tab></template></paper-tabs></div></app-header><iron-pages attr-for-selected="data-view" selected="[[currentView]]" selected-attribute="view-visible"><ha-cards data-view="" show-introduction="[[computeShowIntroduction(currentView, introductionLoaded, states)]]" states="[[states]]" columns="[[_columns]]" hass="[[hass]]" panel-visible="[[panelVisible]]"></ha-cards><template is="dom-repeat" items="[[views]]"><ha-cards data-view$="[[item.entityId]]" show-introduction="[[computeShowIntroduction(currentView, introductionLoaded, states)]]" states="[[states]]" columns="[[_columns]]" hass="[[hass]]" panel-visible="[[panelVisible]]"></ha-cards></template></iron-pages></app-header-layout></template></dom-module><script>Polymer({is:"partial-cards",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1,observer:"handleWindowChange"},panelVisible:{type:Boolean,value:!1},_columns:{type:Number,value:1},canListen:{type:Boolean,bindNuclear:function(e){return[e.voiceGetters.isVoiceSupported,e.configGetters.isComponentLoaded("conversation"),function(e,t){return e&&t}]}},introductionLoaded:{type:Boolean,bindNuclear:function(e){return e.configGetters.isComponentLoaded("introduction")}},locationName:{type:String,bindNuclear:function(e){return e.configGetters.locationName}},currentView:{type:String,bindNuclear:function(e){return[e.viewGetters.currentView,function(e){return e||""}]}},views:{type:Array,bindNuclear:function(e){return[e.viewGetters.views,function(e){return e.valueSeq().sortBy(function(e){return e.attributes.order}).toArray()}]}},states:{type:Object,bindNuclear:function(e){return e.viewGetters.currentViewEntities}}},created:function(){this.handleWindowChange=this.handleWindowChange.bind(this),this.mqls=[300,600,900,1200].map(function(e){var t=window.matchMedia("(min-width: "+e+"px)");return t.addListener(this.handleWindowChange),t}.bind(this))},detached:function(){this.mqls.forEach(function(e){e.removeListener(this.handleWindowChange)})},handleWindowChange:function(){var e=this.mqls.reduce(function(e,t){return e+t.matches},0);this._columns=Math.max(1,e-(!this.narrow&&this.showMenu))},scrollToTop:function(){var e=0,t=this.$.layout.header.scrollTarget,n=function(e,t,n,i){return e/=i,-n*e*(e-2)+t},i=Math.random(),o=200,r=Date.now(),a=t.scrollTop,s=e-a;this._currentAnimationId=i,function c(){var u=Date.now(),l=u-r;l>o?t.scrollTop=e:this._currentAnimationId===i&&(t.scrollTop=n(l,a,s,o),requestAnimationFrame(c.bind(this)))}.call(this)},handleListenClick:function(){this.hass.voiceActions.listen()},handleViewSelected:function(e){var t=e.detail.item.getAttribute("data-entity")||null,n=this.currentView||null;t!==n&&this.async(function(){this.hass.viewActions.selectView(t)}.bind(this),0)},computeTitle:function(e,t){return e.length>0?"Home Assistant":t},computeShowIntroduction:function(e,t,n){return""===e&&(t||0===n.size)}})</script><style is="custom-style">html{font-size:14px;--dark-primary-color:#0288D1;--default-primary-color:#03A9F4;--primary-color:#03A9F4;--light-primary-color:#B3E5FC;--text-primary-color:#ffffff;--accent-color:#FF9800;--primary-background-color:#ffffff;--primary-text-color:#212121;--secondary-text-color:#727272;--disabled-text-color:#bdbdbd;--divider-color:#B6B6B6;--paper-toggle-button-checked-ink-color:#039be5;--paper-toggle-button-checked-button-color:#039be5;--paper-toggle-button-checked-bar-color:#039be5;--paper-slider-knob-color:var(--primary-color);--paper-slider-knob-start-color:var(--primary-color);--paper-slider-pin-color:var(--primary-color);--paper-slider-active-color:var(--primary-color);--paper-slider-secondary-color:var(--light-primary-color);--paper-slider-container-color:var(--divider-color);--google-red-500:#db4437;--google-blue-500:#4285f4;--google-green-500:#0f9d58;--google-yellow-500:#f4b400;--paper-grey-50:#fafafa;--paper-green-400:#66bb6a;--paper-blue-400:#42a5f5;--paper-orange-400:#ffa726;--dark-divider-opacity:0.12;--dark-disabled-opacity:0.38;--dark-secondary-opacity:0.54;--dark-primary-opacity:0.87;--light-divider-opacity:0.12;--light-disabled-opacity:0.3;--light-secondary-opacity:0.7;--light-primary-opacity:1.0}</style><dom-module id="ha-style" assetpath="resources/"><template><style>:host{@apply(--paper-font-body1)}app-header,app-toolbar{background-color:var(--primary-color);font-weight:400;color:#fff}app-toolbar ha-menu-button+[main-title]{margin-left:24px}h1{@apply(--paper-font-title)}</style></template></dom-module><dom-module id="partial-panel-resolver" assetpath="layouts/"><template><style include="iron-flex ha-style">[hidden]{display:none!important}.placeholder{height:100%}.layout{height:calc(100% - 64px)}</style><div hidden$="[[resolved]]" class="placeholder"><app-toolbar><ha-menu-button narrow="[[narrow]]" show-menu="[[showMenu]]"></ha-menu-button></app-toolbar><div class="layout horizontal center-center"><template is="dom-if" if="[[!errorLoading]]"><paper-spinner active=""></paper-spinner></template><template is="dom-if" if="[[errorLoading]]">Error loading panel :(</template></div></div><span id="panel" hidden$="[[!resolved]]"></span></template></dom-module><script>Polymer({is:"partial-panel-resolver",behaviors:[window.hassBehavior],properties:{hass:{type:Object,observer:"updateAttributes"},narrow:{type:Boolean,value:!1,observer:"updateAttributes"},showMenu:{type:Boolean,value:!1,observer:"updateAttributes"},resolved:{type:Boolean,value:!1},errorLoading:{type:Boolean,value:!1},panel:{type:Object,bindNuclear:function(e){return e.navigationGetters.activePanel},observer:"panelChanged"}},panelChanged:function(e){return e?(this.resolved=!1,this.errorLoading=!1,void this.importHref(e.get("url"),function(){window.hassUtil.dynamicContentUpdater(this.$.panel,"ha-panel-"+e.get("component_name"),{hass:this.hass,narrow:this.narrow,showMenu:this.showMenu,panel:e.toJS()}),this.resolved=!0}.bind(this),function(){this.errorLoading=!0}.bind(this),!0)):void(this.$.panel.lastChild&&this.$.panel.removeChild(this.$.panel.lastChild))},updateAttributes:function(){var e=Polymer.dom(this.$.panel).lastChild;e&&(e.hass=this.hass,e.narrow=this.narrow,e.showMenu=this.showMenu)}})</script><dom-module id="paper-toast" assetpath="../bower_components/paper-toast/"><template><style>:host{display:block;position:fixed;background-color:var(--paper-toast-background-color,#323232);color:var(--paper-toast-color,#f1f1f1);min-height:48px;min-width:288px;padding:16px 24px;box-sizing:border-box;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-radius:2px;margin:12px;font-size:14px;cursor:default;-webkit-transition:-webkit-transform .3s,opacity .3s;transition:transform .3s,opacity .3s;opacity:0;-webkit-transform:translateY(100px);transform:translateY(100px);@apply(--paper-font-common-base)}:host(.capsule){border-radius:24px}:host(.fit-bottom){width:100%;min-width:0;border-radius:0;margin:0}:host(.paper-toast-open){opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}</style><span id="label">{{text}}</span><content></content></template><script>!function(){var e=null;Polymer({is:"paper-toast",behaviors:[Polymer.IronOverlayBehavior],properties:{fitInto:{type:Object,value:window,observer:"_onFitIntoChanged"},horizontalAlign:{type:String,value:"left"},verticalAlign:{type:String,value:"bottom"},duration:{type:Number,value:3e3},text:{type:String,value:""},noCancelOnOutsideClick:{type:Boolean,value:!0},noAutoFocus:{type:Boolean,value:!0}},listeners:{transitionend:"__onTransitionEnd"},get visible(){return Polymer.Base._warn("`visible` is deprecated, use `opened` instead"),this.opened},get _canAutoClose(){return this.duration>0&&this.duration!==1/0},created:function(){this._autoClose=null,Polymer.IronA11yAnnouncer.requestAvailability()},show:function(e){"string"==typeof e&&(e={text:e});for(var t in e)0===t.indexOf("_")?Polymer.Base._warn('The property "'+t+'" is private and was not set.'):t in this?this[t]=e[t]:Polymer.Base._warn('The property "'+t+'" is not valid.');this.open()},hide:function(){this.close()},__onTransitionEnd:function(e){e&&e.target===this&&"opacity"===e.propertyName&&(this.opened?this._finishRenderOpened():this._finishRenderClosed())},_openedChanged:function(){null!==this._autoClose&&(this.cancelAsync(this._autoClose),this._autoClose=null),this.opened?(e&&e!==this&&e.close(),e=this,this.fire("iron-announce",{text:this.text}),this._canAutoClose&&(this._autoClose=this.async(this.close,this.duration))):e===this&&(e=null),Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this,arguments)},_renderOpened:function(){this.classList.add("paper-toast-open")},_renderClosed:function(){this.classList.remove("paper-toast-open")},_onFitIntoChanged:function(e){this.positionTarget=e}})}()</script></dom-module><dom-module id="notification-manager" assetpath="managers/"><template><style>paper-toast{z-index:1}</style><paper-toast id="toast" text="{{text}}" no-cancel-on-outside-click="[[neg]]"></paper-toast><paper-toast id="connToast" duration="0" text="Connection lost. Reconnecting…" opened="[[!isStreaming]]"></paper-toast></template></dom-module><script>Polymer({is:"notification-manager",behaviors:[window.hassBehavior],properties:{hass:{type:Object},isStreaming:{type:Boolean,bindNuclear:function(t){return t.streamGetters.isStreamingEvents}},neg:{type:Boolean,value:!1},text:{type:String,bindNuclear:function(t){return t.notificationGetters.lastNotificationMessage},observer:"showNotification"},toastClass:{type:String,value:""}},created:function(){this.handleWindowChange=this.handleWindowChange.bind(this),this._mediaq=window.matchMedia("(max-width: 599px)"),this._mediaq.addListener(this.handleWindowChange)},attached:function(){this.handleWindowChange(this._mediaq)},detached:function(){this._mediaq.removeListener(this.handleWindowChange)},handleWindowChange:function(t){this.$.toast.classList.toggle("fit-bottom",t.matches),this.$.connToast.classList.toggle("fit-bottom",t.matches)},showNotification:function(t){t&&this.$.toast.show()}})</script><script>Polymer.PaperDialogBehaviorImpl={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1}},observers:["_modalChanged(modal, _readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop},_modalChanged:function(i,e){e&&(i?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(i){this.closingReason=this.closingReason||{},this.closingReason.confirmed=i},_onDialogClick:function(i){for(var e=Polymer.dom(i).path,o=0;o<e.indexOf(this);o++){var t=e[o];if(t.hasAttribute&&(t.hasAttribute("dialog-dismiss")||t.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(t.hasAttribute("dialog-confirm")),this.close(),i.stopPropagation();break}}}},Polymer.PaperDialogBehavior=[Polymer.IronOverlayBehavior,Polymer.PaperDialogBehaviorImpl]</script><dom-module id="paper-dialog-shared-styles" assetpath="../bower_components/paper-dialog-behavior/"><template><style>:host{display:block;margin:24px 40px;background:var(--paper-dialog-background-color,--primary-background-color);color:var(--paper-dialog-color,--primary-text-color);@apply(--paper-font-body1);@apply(--shadow-elevation-16dp);@apply(--paper-dialog)}:host>::content>*{margin-top:20px;padding:0 24px}:host>::content>.no-padding{padding:0}:host>::content>:first-child{margin-top:24px}:host>::content>:last-child{margin-bottom:24px}:host>::content h2{position:relative;margin:0;@apply(--paper-font-title);@apply(--paper-dialog-title)}:host>::content .buttons{position:relative;padding:8px 8px 8px 24px;margin:0;color:var(--paper-dialog-button-color,--primary-color);@apply(--layout-horizontal);@apply(--layout-end-justified)}</style></template></dom-module><dom-module id="paper-dialog" assetpath="../bower_components/paper-dialog/"><template><style include="paper-dialog-shared-styles"></style><content></content></template></dom-module><script>!function(){Polymer({is:"paper-dialog",behaviors:[Polymer.PaperDialogBehavior,Polymer.NeonAnimationRunnerBehavior],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}})}()</script><dom-module id="paper-dialog-scrollable" assetpath="../bower_components/paper-dialog-scrollable/"><template><style>:host{display:block;@apply(--layout-relative)}:host(.is-scrolled:not(:first-child))::before{content:'';position:absolute;top:0;left:0;right:0;height:1px;background:var(--divider-color)}:host(.can-scroll:not(.scrolled-to-bottom):not(:last-child))::after{content:'';position:absolute;bottom:0;left:0;right:0;height:1px;background:var(--divider-color)}.scrollable{padding:0 24px;@apply(--layout-scroll);@apply(--paper-dialog-scrollable)}.fit{@apply(--layout-fit)}</style><div id="scrollable" class="scrollable"><content></content></div></template></dom-module><script>Polymer({is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},listeners:{"scrollable.scroll":"_scroll"},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget()},attached:function(){this.classList.add("no-padding"),this._ensureTarget(),requestAnimationFrame(this._scroll.bind(this))},_scroll:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||Polymer.dom(this).parentNode,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(Polymer.PaperDialogBehaviorImpl)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}})</script><style>div.charts-tooltip{z-index:200!important}</style><script>Polymer({is:"state-history-chart-timeline",properties:{data:{type:Object,observer:"dataChanged"},isAttached:{type:Boolean,value:!1,observer:"dataChanged"}},created:function(){this.style.display="block"},attached:function(){this.isAttached=!0},dataChanged:function(){this.drawChart()},drawChart:function(){function t(t,e,n,i){var d=e.replace(/_/g," ");a.addRow([t,d,n,i])}var e,a,n,i,d,l=Polymer.dom(this),o=this.data;if(this.isAttached){for(;l.node.lastChild;)l.node.removeChild(l.node.lastChild);o&&0!==o.length&&(e=new window.google.visualization.Timeline(this),a=new window.google.visualization.DataTable,a.addColumn({type:"string",id:"Entity"}),a.addColumn({type:"string",id:"State"}),a.addColumn({type:"date",id:"Start"}),a.addColumn({type:"date",id:"End"}),n=new Date(o.reduce(function(t,e){return Math.min(t,e[0].lastChangedAsDate)},new Date)),i=new Date(n),i.setDate(i.getDate()+1),i>new Date&&(i=new Date),d=0,o.forEach(function(e){var a,n,l=null,o=null;0!==e.length&&(a=e[0].entityDisplay,e.forEach(function(e){null!==l&&e.state!==l?(n=e.lastChangedAsDate,t(a,l,o,n),l=e.state,o=n):null===l&&(l=e.state,o=e.lastChangedAsDate)}),t(a,l,o,i),d++)}),e.draw(a,{height:55+42*d,timeline:{showRowLabels:o.length>1},hAxis:{format:"H:mm"}}))}}})</script><script>!function(){"use strict";function t(t,e){var a,r=[];for(a=t;a<e;a++)r.push(a);return r}function e(t){var e=parseFloat(t);return!isNaN(e)&&isFinite(e)?e:null}Polymer({is:"state-history-chart-line",properties:{data:{type:Object,observer:"dataChanged"},unit:{type:String},isSingleDevice:{type:Boolean,value:!1},isAttached:{type:Boolean,value:!1,observer:"dataChanged"},chartEngine:{type:Object}},created:function(){this.style.display="block"},attached:function(){this.isAttached=!0},dataChanged:function(){this.drawChart()},drawChart:function(){var a,r,n,i,u,o=this.unit,s=this.data;this.isAttached&&(this.chartEngine||(this.chartEngine=new window.google.visualization.LineChart(this)),0!==s.length&&(a={legend:{position:"top"},interpolateNulls:!0,titlePosition:"none",vAxes:{0:{title:o}},hAxis:{format:"H:mm"},chartArea:{left:"60",width:"95%"},explorer:{actions:["dragToZoom","rightClickToReset","dragToPan"],keepInBounds:!0,axis:"horizontal",maxZoomIn:.1}},this.isSingleDevice&&(a.legend.position="none",a.vAxes[0].title=null,a.chartArea.left=40,a.chartArea.height="80%",a.chartArea.top=5,a.enableInteractivity=!1),r=new Date(Math.min.apply(null,s.map(function(t){return t[0].lastChangedAsDate}))),n=new Date(r),n.setDate(n.getDate()+1),n>new Date&&(n=new Date),i=s.map(function(t){function a(t,e){r&&e&&c.push([t[0]].concat(r.slice(1).map(function(t,a){return e[a]?t:null}))),c.push(t),r=t}var r,i,u,o,s=t[t.length-1],l=s.domain,d=s.entityDisplay,c=[],h=new window.google.visualization.DataTable;return h.addColumn({type:"datetime",id:"Time"}),"thermostat"===l?(i=t.reduce(function(t,e){return t||e.attributes.target_temp_high!==e.attributes.target_temp_low},!1),h.addColumn("number",d+" current temperature"),i?(h.addColumn("number",d+" target temperature high"),h.addColumn("number",d+" target temperature low"),o=[!1,!0,!0],u=function(t){var r=e(t.attributes.current_temperature),n=e(t.attributes.target_temp_high),i=e(t.attributes.target_temp_low);a([t.lastUpdatedAsDate,r,n,i],o)}):(h.addColumn("number",d+" target temperature"),o=[!1,!0],u=function(t){var r=e(t.attributes.current_temperature),n=e(t.attributes.temperature);a([t.lastUpdatedAsDate,r,n],o)}),t.forEach(u)):"climate"===l?(i=t.reduce(function(t,e){return t||e.attributes.target_temp_high!==e.attributes.target_temp_low},!1),h.addColumn("number",d+" current temperature"),i?(h.addColumn("number",d+" target temperature high"),h.addColumn("number",d+" target temperature low"),o=[!1,!0,!0],u=function(t){var r=e(t.attributes.current_temperature),n=e(t.attributes.target_temp_high),i=e(t.attributes.target_temp_low);a([t.lastUpdatedAsDate,r,n,i],o)}):(h.addColumn("number",d+" target temperature"),o=[!1,!0],u=function(t){var r=e(t.attributes.current_temperature),n=e(t.attributes.temperature);a([t.lastUpdatedAsDate,r,n],o)}),t.forEach(u)):(h.addColumn("number",d),o="sensor"!==l&&[!0],t.forEach(function(t){var r=e(t.state);a([t.lastChangedAsDate,r],o)})),a([n].concat(r.slice(1)),!1),h.addRows(c),h}),u=1===i.length?i[0]:i.slice(1).reduce(function(e,a){return window.google.visualization.data.join(e,a,"full",[[0,0]],t(1,e.getNumberOfColumns()),t(1,a.getNumberOfColumns()))},i[0]),this.chartEngine.draw(u,a)))}})}()</script><dom-module id="state-history-charts" assetpath="components/"><template><style>:host{display:block}.loading-container{text-align:center;padding:8px}.loading{height:0;overflow:hidden}</style><google-legacy-loader on-api-load="googleApiLoaded"></google-legacy-loader><div hidden$="[[!isLoading]]" class="loading-container"><paper-spinner active="" alt="Updating history data"></paper-spinner></div><div class$="[[computeContentClasses(isLoading)]]"><template is="dom-if" if="[[computeIsEmpty(stateHistory)]]">No state history found.</template><state-history-chart-timeline data="[[groupedStateHistory.timeline]]" is-single-device="[[isSingleDevice]]"></state-history-chart-timeline><template is="dom-repeat" items="[[groupedStateHistory.line]]"><state-history-chart-line unit="[[item.unit]]" data="[[item.data]]" is-single-device="[[isSingleDevice]]"></state-history-chart-line></template></div></template></dom-module><script>Polymer({is:"state-history-charts",properties:{stateHistory:{type:Object},isLoadingData:{type:Boolean,value:!1},apiLoaded:{type:Boolean,value:!1},isLoading:{type:Boolean,computed:"computeIsLoading(isLoadingData, apiLoaded)"},groupedStateHistory:{type:Object,computed:"computeGroupedStateHistory(isLoading, stateHistory)"},isSingleDevice:{type:Boolean,computed:"computeIsSingleDevice(stateHistory)"}},computeIsSingleDevice:function(t){return t&&1===t.size},computeGroupedStateHistory:function(t,e){var i,o={},n=[];return t||!e?{line:[],timeline:[]}:(e.forEach(function(t){var e,i;t&&0!==t.size&&(e=t.find(function(t){return"unit_of_measurement"in t.attributes}),i=!!e&&e.attributes.unit_of_measurement,i?i in o?o[i].push(t.toArray()):o[i]=[t.toArray()]:n.push(t.toArray()))}),n=n.length>0&&n,i=Object.keys(o).map(function(t){return{unit:t,data:o[t]}}),{line:i,timeline:n})},googleApiLoaded:function(){window.google.load("visualization","1",{packages:["timeline","corechart"],callback:function(){this.apiLoaded=!0}.bind(this)})},computeContentClasses:function(t){return t?"loading":""},computeIsLoading:function(t,e){return t||!e},computeIsEmpty:function(t){return t&&0===t.size}})</script><dom-module id="more-info-alarm_control_panel" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><div class="layout horizontal"><paper-input label="code" value="{{enteredCode}}" pattern="[[codeFormat]]" type="password" hidden$="[[!codeInputVisible]]" disabled="[[!codeInputEnabled]]"></paper-input></div><div class="layout horizontal"><paper-button on-tap="handleDisarmTap" hidden$="[[!disarmButtonVisible]]" disabled="[[!codeValid]]">Disarm</paper-button><paper-button on-tap="handleHomeTap" hidden$="[[!armHomeButtonVisible]]" disabled="[[!codeValid]]">Arm Home</paper-button><paper-button on-tap="handleAwayTap" hidden$="[[!armAwayButtonVisible]]" disabled="[[!codeValid]]">Arm Away</paper-button></div></template></dom-module><script>Polymer({is:"more-info-alarm_control_panel",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},enteredCode:{type:String,value:""},disarmButtonVisible:{type:Boolean,value:!1},armHomeButtonVisible:{type:Boolean,value:!1},armAwayButtonVisible:{type:Boolean,value:!1},codeInputVisible:{type:Boolean,value:!1},codeInputEnabled:{type:Boolean,value:!1},codeFormat:{type:String,value:""},codeValid:{type:Boolean,computed:"validateCode(enteredCode, codeFormat)"}},validateCode:function(e,t){var a=new RegExp(t);return null===t||a.test(e)},stateObjChanged:function(e){e&&(this.codeFormat=e.attributes.code_format,this.codeInputVisible=null!==this.codeFormat,this.codeInputEnabled="armed_home"===e.state||"armed_away"===e.state||"disarmed"===e.state||"pending"===e.state||"triggered"===e.state,this.disarmButtonVisible="armed_home"===e.state||"armed_away"===e.state||"pending"===e.state||"triggered"===e.state,this.armHomeButtonVisible="disarmed"===e.state,this.armAwayButtonVisible="disarmed"===e.state),this.async(function(){this.fire("iron-resize")}.bind(this),500)},handleDisarmTap:function(){this.callService("alarm_disarm",{code:this.enteredCode})},handleHomeTap:function(){this.callService("alarm_arm_home",{code:this.enteredCode})},handleAwayTap:function(){this.callService("alarm_arm_away",{code:this.enteredCode})},callService:function(e,t){var a=t||{};a.entity_id=this.stateObj.entityId,this.hass.serviceActions.callService("alarm_control_panel",e,a).then(function(){this.enteredCode=""}.bind(this))}})</script><dom-module id="more-info-automation" assetpath="more-infos/"><template><style>paper-button{color:var(--default-primary-color);font-weight:500;top:3px;height:37px}</style><p>Last triggered:<ha-relative-time datetime="[[stateObj.attributes.last_triggered]]"></ha-relative-time></p><paper-button on-tap="handleTriggerTapped">TRIGGER</paper-button></template></dom-module><script>Polymer({is:"more-info-automation",properties:{hass:{type:Object},stateObj:{type:Object}},handleTriggerTapped:function(){this.hass.serviceActions.callService("automation","trigger",{entity_id:this.stateObj.entityId})}})</script><dom-module id="more-info-camera" assetpath="more-infos/"><template><style>:host{max-width:640px}.camera-image{width:100%}</style><img class="camera-image" src="[[computeCameraImageUrl(hass, stateObj, isVisible)]]" on-load="imageLoaded" alt="[[stateObj.entityDisplay]]"></template></dom-module><script>Polymer({is:"more-info-camera",properties:{hass:{type:Object},stateObj:{type:Object},isVisible:{type:Boolean,value:!0}},imageLoaded:function(){this.fire("iron-resize")},computeCameraImageUrl:function(e,a,t){return e.demo?"/demo/webcam.jpg":a&&t?"/api/camera_proxy_stream/"+a.entityId+"?token="+a.attributes.access_token:"data:image/gif;base64,R0lGODlhAQABAAAAACw="}})</script><dom-module id="paper-range-slider" assetpath="../bower_components/paper-range-slider/"><template><style>:host{--paper-range-slider-width:200px;@apply(--layout);@apply(--layout-justified);@apply(--layout-center);--paper-range-slider-lower-color:var(--paper-grey-400);--paper-range-slider-active-color:var(--primary-color);--paper-range-slider-higher-color:var(--paper-grey-400);--paper-range-slider-knob-color:var(--primary-color);--paper-range-slider-pin-color:var(--primary-color);--paper-range-slider-pin-start-color:var(--paper-grey-400);--paper-range-slider-knob-start-color:transparent;--paper-range-slider-knob-start-border-color:var(--paper-grey-400)}#sliderOuterDiv_0{display:inline-block;width:var(--paper-range-slider-width)}#sliderOuterDiv_1{position:relative;height:calc(30px + var(--paper-single-range-slider-height,2px));margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sliderKnobMinMax{position:absolute;left:0;top:0;margin-left:calc(-15px - var(--paper-single-range-slider-height,2px)/ 2);width:calc(30px + var(--paper-single-range-slider-height,2px));height:calc(30px + var(--paper-single-range-slider-height,2px))}.divSpanWidth{position:absolute;width:100%;display:block;top:0}#sliderMax{--paper-single-range-slider-bar-color:transparent;--paper-single-range-slider-knob-color:var(--paper-range-slider-knob-color);--paper-single-range-slider-pin-color:var(--paper-range-slider-pin-color);--paper-single-range-slider-active-color:var(--paper-range-slider-active-color);--paper-single-range-slider-secondary-color:var(--paper-range-slider-higher-color);--paper-single-range-slider-pin-start-color:var(--paper-range-slider-pin-start-color);--paper-single-range-slider-knob-start-color:var(--paper-range-slider-knob-start-color);--paper-single-range-slider-knob-start-border-color:var(--paper-range-slider-knob-start-border-color)}#sliderMin{--paper-single-range-slider-active-color:var(--paper-range-slider-lower-color);--paper-single-range-slider-secondary-color:transparent;--paper-single-range-slider-knob-color:var(--paper-range-slider-knob-color);--paper-single-range-slider-pin-color:var(--paper-range-slider-pin-color);--paper-single-range-slider-pin-start-color:var(--paper-range-slider-pin-start-color);--paper-single-range-slider-knob-start-color:var(--paper-range-slider-knob-start-color);--paper-single-range-slider-knob-start-border-color:var(--paper-range-slider-knob-start-border-color)}</style><div id="sliderOuterDiv_0" style=""><div id="sliderOuterDiv_1"><div id="backDiv" class="divSpanWidth" on-down="_backDivDown" on-tap="_backDivTap" on-up="_backDivUp" on-track="_backDivOnTrack" on-transitionend="_backDivTransEnd"><div id="backDivInner_0" style="line-height:200%"><br></div></div><div id="sliderKnobMin" class="sliderKnobMinMax" on-down="_backDivDown" on-up="_backDivUp" on-track="_sliderKnobMinOnTrack"></div><div id="sliderKnobMax" class="sliderKnobMinMax" on-down="_backDivDown" on-up="_backDivUp" on-track="_sliderKnobMaxOnTrack"></div><div class="divSpanWidth" style="pointer-events:none"><paper-single-range-slider id="sliderMax" disabled$="[[disabled]]" on-down="_sliderMaxDown" on-up="_sliderMaxUp" step="[[step]]" min="[[min]]" max="[[max]]" value="[[valueMax]]" secondary-progress="[[max]]" style="width:100%"></paper-single-range-slider></div><div class="divSpanWidth" style="pointer-events:none"><paper-single-range-slider id="sliderMin" disabled$="[[disabled]]" on-down="_sliderMinDown" on-up="_sliderMinUp" noink="" step="[[step]]" min="[[min]]" max="[[max]]" value="[[valueMin]]" style="width:100%"></paper-single-range-slider></div><div id="backDivInner_1" style="line-height:100%"><br></div></div></div></template><script>Polymer({is:"paper-range-slider",behaviors:[Polymer.IronRangeBehavior],properties:{sliderWidth:{type:String,value:"",notify:!0,reflectToAttribute:!0},style:{type:String,value:"",notify:!0,reflectToAttribute:!0},min:{type:Number,value:0,notify:!0,reflectToAttribute:!0},max:{type:Number,value:100,notify:!0,reflectToAttribute:!0},valueMin:{type:Number,value:0,notify:!0,reflectToAttribute:!0},valueMax:{type:Number,value:100,notify:!0,reflectToAttribute:!0},step:{type:Number,value:1,notify:!0,reflectToAttribute:!0},valueDiffMin:{type:Number,value:0,notify:!0,reflectToAttribute:!0},valueDiffMax:{type:Number,value:0,notify:!0,reflectToAttribute:!0},alwaysShowPin:{type:Boolean,value:!1,notify:!0},pin:{type:Boolean,value:!1,notify:!0},snaps:{type:Boolean,value:!1,notify:!0},disabled:{type:Boolean,value:!1,notify:!0},singleSlider:{type:Boolean,value:!1,notify:!0},transDuration:{type:Number,value:250},tapValueExtend:{type:Boolean,value:!0,notify:!0},tapValueReduce:{type:Boolean,value:!1,notify:!0},tapValueMove:{type:Boolean,value:!1,notify:!0}},ready:function(){function i(i){return void 0!=i&&null!=i}i(this._nInitTries)||(this._nInitTries=0);var t=this.$$("#sliderMax").$$("#sliderContainer");if(i(t)&&(t=t.offsetWidth>0),i(t)&&(t=this.$$("#sliderMin").$$("#sliderContainer")),i(t)&&(t=t.offsetWidth>0),i(t))this._renderedReady();else{if(this._nInitTries<1e3){var e=this;setTimeout(function(){e.ready()},10)}else console.error("could not properly initialize the underlying paper-single-range-slider elements ...");this._nInitTries++}},_renderedReady:function(){this.init(),this._setPadding();var i=this;this.$$("#sliderMin").addEventListener("immediate-value-change",function(t){i._setValueMinMax(i._getValuesMinMax(this.immediateValue,null)),i.$.sliderMin._expandKnob(),i.$.sliderMax._expandKnob()}),this.$$("#sliderMax").addEventListener("immediate-value-change",function(t){i._setValueMinMax(i._getValuesMinMax(null,this.immediateValue))}),this.$$("#sliderMin").addEventListener("change",function(t){i._setValueMinMax(i._getValuesMinMax(this.immediateValue,null)),i.alwaysShowPin&&i.$.sliderMin._expandKnob()}),this.$$("#sliderMax").addEventListener("change",function(t){i._setValueMinMax(i._getValuesMinMax(null,this.immediateValue)),i.alwaysShowPin&&i.$.sliderMax._expandKnob()})},_setPadding:function(){var i=document.createElement("div");i.setAttribute("style","position:absolute; top:0px; opacity:0;"),i.innerHTML="invisibleText",document.body.insertBefore(i,document.body.children[0]);var t=i.offsetHeight/2;this.style.paddingTop=t+"px",this.style.paddingBottom=t+"px",i.parentNode.removeChild(i)},_setValueDiff:function(){this._valueDiffMax=Math.max(this.valueDiffMax,0),this._valueDiffMin=Math.max(this.valueDiffMin,0)},_getValuesMinMax:function(i,t){var e=null!=i&&i>=this.min&&i<=this.max,s=null!=t&&t>=this.min&&t<=this.max;if(!e&&!s)return[this.valueMin,this.valueMax];var n=e?i:this.valueMin,a=s?t:this.valueMax;n=Math.min(Math.max(n,this.min),this.max),a=Math.min(Math.max(a,this.min),this.max);var l=a-n;return e?l<this._valueDiffMin?(a=Math.min(this.max,n+this._valueDiffMin),l=a-n,l<this._valueDiffMin&&(n=a-this._valueDiffMin)):l>this._valueDiffMax&&this._valueDiffMax>0&&(a=n+this._valueDiffMax):l<this._valueDiffMin?(n=Math.max(this.min,a-this._valueDiffMin),l=a-n,l<this._valueDiffMin&&(a=n+this._valueDiffMin)):l>this._valueDiffMax&&this._valueDiffMax>0&&(n=a-this._valueDiffMax),[n,a]},_setValueMin:function(i){i=Math.max(i,this.min),this.$$("#sliderMin").value=i,this.valueMin=i},_setValueMax:function(i){i=Math.min(i,this.max),this.$$("#sliderMax").value=i,this.valueMax=i},_setValueMinMax:function(i){this._setValueMin(i[0]),this._setValueMax(i[1]),this._updateSliderKnobMinMax(),this.updateValues()},_setValues:function(i,t){null!=i&&(i<this.min||i>this.max)&&(i=null),null!=t&&(t<this.min||t>this.max)&&(t=null),null!=i&&null!=t&&(i=Math.min(i,t)),this._setValueMinMax(this._getValuesMinMax(i,t))},_updateSliderKnobMinMax:function(){var i=this.$$("#sliderMax").$$("#sliderContainer").offsetWidth,t=i*(this.valueMin-this.min)/(this.max-this.min)+.5*this.$$("#sliderKnobMin").offsetWidth,e=i*(this.valueMax-this.min)/(this.max-this.min)+.5*this.$$("#sliderKnobMax").offsetWidth;this.$$("#sliderKnobMin").style.left=t+"px",this.$$("#sliderKnobMax").style.left=e+"px"},_backDivOnTrack:function(i){switch(i.stopPropagation(),i.detail.state){case"start":this._backDivTrackStart(i);break;case"track":this._backDivTrackDuring(i);break;case"end":this._backDivTrackEnd()}},_backDivTrackStart:function(i){},_backDivTrackDuring:function(i){this._x1_Min=this._x0_Min+i.detail.dx;var t=this._calcStep(this._getRatioPos(this.$$("#sliderMin"),this._x1_Min/this._xWidth));this._x1_Max=this._x0_Max+i.detail.dx;var e=this._calcStep(this._getRatioPos(this.$$("#sliderMax"),this._x1_Max/this._xWidth));t>=this.min&&e<=this.max&&this._setValuesWithCurrentDiff(t,e,!1)},_setValuesWithCurrentDiff:function(i,t,e){var s=this._valueDiffMin,n=this._valueDiffMax;this._valueDiffMin=this.valueMax-this.valueMin,this._valueDiffMax=this.valueMax-this.valueMin,e?this.setValues(i,t):this._setValues(i,t),this._valueDiffMin=s,this._valueDiffMax=n},_backDivTrackEnd:function(){},_sliderKnobMinOnTrack:function(i){this._x1_Min=this._x0_Min+i.detail.dx;var t=this._calcStep(this._getRatioPos(this.$$("#sliderMin"),this._x1_Min/this._xWidth));this._setValues(t,null)},_sliderKnobMaxOnTrack:function(i){this._x1_Max=this._x0_Max+i.detail.dx;var t=this._calcStep(this._getRatioPos(this.$$("#sliderMax"),this._x1_Max/this._xWidth));this._setValues(null,t)},_sliderMinDown:function(){this.$$("#sliderMax")._expandKnob()},_sliderMaxDown:function(i){this.singleSlider?this._setValues(null,this._getEventValue(i)):this.$$("#sliderMin")._expandKnob()},_sliderMinUp:function(){this.alwaysShowPin?this.$$("#sliderMin")._expandKnob():this.$$("#sliderMax")._resetKnob()},_sliderMaxUp:function(){this.alwaysShowPin?this.$$("#sliderMax")._expandKnob():(this.$$("#sliderMin")._resetKnob(),this.singleSlider&&this.$$("#sliderMax")._resetKnob())},_getEventValue:function(i){var t=this.$$("#sliderMax").$$("#sliderContainer").offsetWidth,e=this.$$("#sliderMax").$$("#sliderContainer").getBoundingClientRect(),s=(i.detail.x-e.left)/t,n=this.min+s*(this.max-this.min);return n},_backDivTap:function(i){this._setValueNow=function(i,t){this.tapValueMove?this._setValuesWithCurrentDiff(i,t,!0):this.setValues(i,t)};var t=this._getEventValue(i);if(t>this.valueMin&&t<this.valueMax){if(this.tapValueReduce){var e=t<this.valueMin+(this.valueMax-this.valueMin)/2;e?this._setValueNow(t,null):this._setValueNow(null,t)}}else(this.tapValueExtend||this.tapValueMove)&&(t<this.valueMin&&this._setValueNow(t,null),t>this.valueMax&&this._setValueNow(null,t))},_backDivDown:function(i){this._sliderMinDown(),this._sliderMaxDown(),this._xWidth=this.$$("#sliderMin").$$("#sliderBar").offsetWidth,this._x0_Min=this.$$("#sliderMin").ratio*this._xWidth,this._x0_Max=this.$$("#sliderMax").ratio*this._xWidth},_backDivUp:function(){this._sliderMinUp(),this._sliderMaxUp()},_backDivTransEnd:function(i){},_getRatioPos:function(i,t){return Math.max(i.min,Math.min(i.max,(i.max-i.min)*t+i.min))},init:function(){this.setSingleSlider(this.singleSlider),this.setDisabled(this.disabled),this.alwaysShowPin&&(this.pin=!0),this.$$("#sliderMin").pin=this.pin,this.$$("#sliderMax").pin=this.pin,this.$$("#sliderMin").snaps=this.snaps,this.$$("#sliderMax").snaps=this.snaps,""!=this.sliderWidth&&(this.customStyle["--paper-range-slider-width"]=this.sliderWidth,this.updateStyles()),this.$$("#sliderMin").$$("#sliderBar").$$("#progressContainer").style.background="transparent",this._prevUpdateValues=[this.min,this.max],this._setValueDiff(),this._setValueMinMax(this._getValuesMinMax(this.valueMin,this.valueMax)),this.alwaysShowPin&&(this.$$("#sliderMin")._expandKnob(),this.$$("#sliderMax")._expandKnob())},setValues:function(i,t){this.$$("#sliderMin")._setTransiting(!0),this.$$("#sliderMax")._setTransiting(!0),this._setValues(i,t);var e=this;setTimeout(function(){e.$.sliderMin._setTransiting(!1),e.$.sliderMax._setTransiting(!1)},e.transDuration)},updateValues:function(){this._prevUpdateValues[0]==this.valueMin&&this._prevUpdateValues[1]==this.valueMax||(this._prevUpdateValues=[this.valueMin,this.valueMax],this.async(function(){this.fire("updateValues")}))},setMin:function(i){this.max<i&&(this.max=i),this.min=i,this._prevUpdateValues=[this.min,this.max],this.valueMin<this.min?this._setValues(this.min,null):this._updateSliderKnobMinMax()},setMax:function(i){this.min>i&&(this.min=i),this.max=i,this._prevUpdateValues=[this.min,this.max],this.valueMax>this.max?this._setValues(null,this.max):this._updateSliderKnobMinMax()},setStep:function(i){this.step=i},setValueDiffMin:function(i){this._valueDiffMin=i},setValueDiffMax:function(i){this._valueDiffMax=i},setTapValueExtend:function(i){this.tapValueExtend=i},setTapValueReduce:function(i){this.tapValueReduce=i},setTapValueMove:function(i){this.tapValueMove=i},setDisabled:function(i){this.disabled=i;var t=i?"none":"auto";this.$$("#sliderMax").$$("#sliderKnobInner").style.pointerEvents=t,this.$$("#sliderMin").$$("#sliderKnobInner").style.pointerEvents=t,this.$$("#sliderOuterDiv_1").style.pointerEvents=t,this.$$("#sliderKnobMin").style.pointerEvents=t,this.$$("#sliderKnobMax").style.pointerEvents=t},setSingleSlider:function(i){this.singleSlider=i,i?(this.$$("#backDiv").style.display="none",this.$$("#sliderMax").style.pointerEvents="auto",this.$$("#sliderMax").style.display="",this.$$("#sliderMin").style.display="none",this.$$("#sliderKnobMin").style.pointerEvents="none",this.$$("#sliderKnobMax").style.pointerEvents="none"):(this.$$("#backDiv").style.display="block",this.$$("#sliderMax").style.pointerEvents="none",this.$$("#sliderMax").style.display="",this.$$("#sliderMin").style.display="",this.$$("#sliderKnobMin").style.pointerEvents="auto",this.$$("#sliderKnobMax").style.pointerEvents="auto"),this.$$("#sliderMax").$$("#sliderContainer").style.pointerEvents=this.singleSlider?"auto":"none",this.$$("#sliderMin").$$("#sliderContainer").style.pointerEvents="none"}})</script></dom-module><dom-module id="paper-single-range-slider" assetpath="../bower_components/paper-range-slider/"><template strip-whitespace=""><style>:host{@apply(--layout);@apply(--layout-justified);@apply(--layout-center);width:200px;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;--paper-progress-active-color:var(--paper-single-range-slider-active-color, --google-blue-700);--paper-progress-secondary-color:var(--paper-single-range-slider-secondary-color, --google-blue-300);--paper-progress-disabled-active-color:var(--paper-single-range-slider-disabled-active-color, --paper-grey-400);--paper-progress-disabled-secondary-color:var(--paper-single-range-slider-disabled-secondary-color, --paper-grey-400)}:host(:focus){outline:0}#sliderContainer{position:relative;width:100%;height:calc(30px + var(--paper-single-range-slider-height,2px));margin-left:calc(15px + var(--paper-single-range-slider-height,2px)/ 2);margin-right:calc(15px + var(--paper-single-range-slider-height,2px)/ 2)}#sliderContainer:focus{outline:0}#sliderContainer.editable{margin-top:12px;margin-bottom:12px}.bar-container{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.ring>.bar-container{left:calc(5px + var(--paper-single-range-slider-height,2px)/ 2);transition:left .18s ease}.ring.expand.dragging>.bar-container{transition:none}.ring.expand:not(.pin)>.bar-container{left:calc(8px + var(--paper-single-range-slider-height,2px)/ 2)}#sliderBar{padding:15px 0;width:100%;background-color:var(--paper-single-range-slider-bar-color,transparent);--paper-progress-container-color:var(--paper-single-range-slider-container-color, --paper-grey-400);--paper-progress-height:var(--paper-single-range-slider-height, 2px)}.slider-markers{position:absolute;top:calc(14px + var(--paper-single-range-slider-height,2px)/ 2);height:var(--paper-single-range-slider-height,2px);left:0;right:-1px;box-sizing:border-box;pointer-events:none;@apply(--layout-horizontal)}.slider-marker{@apply(--layout-flex)}.slider-marker::after,.slider-markers::after{content:"";display:block;margin-left:-1px;width:2px;height:2px;border-radius:50%;background-color:#000}#sliderKnob{position:absolute;left:0;top:0;margin-left:calc(-15px - var(--paper-single-range-slider-height,2px)/ 2);width:calc(30px + var(--paper-single-range-slider-height,2px));height:calc(30px + var(--paper-single-range-slider-height,2px))}.transiting>#sliderKnob{transition:left 80ms ease}#sliderKnob:focus{outline:0}#sliderKnob.dragging{transition:none}.snaps>#sliderKnob.dragging{transition:-webkit-transform 80ms ease;transition:transform 80ms ease}#sliderKnobInner{margin:10px;width:calc(100% - 20px);height:calc(100% - 20px);background-color:var(--paper-single-range-slider-knob-color,--google-blue-700);border:2px solid var(--paper-single-range-slider-knob-color,--google-blue-700);border-radius:50%;-moz-box-sizing:border-box;box-sizing:border-box;transition-property:-webkit-transform,background-color,border;transition-property:transform,background-color,border;transition-duration:.18s;transition-timing-function:ease}.expand:not(.pin)>#sliderKnob>#sliderKnobInner{-webkit-transform:scale(1.5);transform:scale(1.5)}.ring>#sliderKnob>#sliderKnobInner{background-color:var(--paper-single-range-slider-knob-start-color,transparent);border:2px solid var(--paper-single-range-slider-knob-start-border-color,--paper-grey-400)}#sliderKnobInner::before{background-color:var(--paper-single-range-slider-pin-color,--google-blue-700)}.pin>#sliderKnob>#sliderKnobInner::before{content:"";position:absolute;top:0;left:50%;margin-left:-13px;width:26px;height:26px;border-radius:50% 50% 50% 0;-webkit-transform:rotate(-45deg) scale(0) translate(0);transform:rotate(-45deg) scale(0) translate(0)}#sliderKnobInner::after,#sliderKnobInner::before{transition:-webkit-transform .18s ease,background-color .18s ease;transition:transform .18s ease,background-color .18s ease}.pin.ring>#sliderKnob>#sliderKnobInner::before{background-color:var(--paper-single-range-slider-pin-start-color,--paper-grey-400)}.pin.expand>#sliderKnob>#sliderKnobInner::before{-webkit-transform:rotate(-45deg) scale(1) translate(17px,-17px);transform:rotate(-45deg) scale(1) translate(17px,-17px)}.pin>#sliderKnob>#sliderKnobInner::after{content:attr(value);position:absolute;top:0;left:50%;margin-left:-16px;width:32px;height:26px;text-align:center;color:var(--paper-single-range-slider-font-color,#fff);font-size:10px;-webkit-transform:scale(0) translate(0);transform:scale(0) translate(0)}.pin.expand>#sliderKnob>#sliderKnobInner::after{-webkit-transform:scale(1) translate(0,-17px);transform:scale(1) translate(0,-17px)}.slider-input{width:50px;overflow:hidden;--paper-input-container-input:{text-align:center};@apply(--paper-single-range-slider-input)}#sliderContainer.disabled{pointer-events:none}.disabled>#sliderKnob>#sliderKnobInner{background-color:var(--paper-single-range-slider-disabled-knob-color,--paper-grey-400);border:2px solid var(--paper-single-range-slider-disabled-knob-color,--paper-grey-400);-webkit-transform:scale3d(.75,.75,1);transform:scale3d(.75,.75,1)}.disabled.ring>#sliderKnob>#sliderKnobInner{background-color:var(--paper-single-range-slider-knob-start-color,transparent);border:2px solid var(--paper-single-range-slider-knob-start-border-color,--paper-grey-400)}paper-ripple{color:var(--paper-single-range-slider-knob-color,--google-blue-700)}</style><div id="sliderContainer" class$="[[_getClassNames(disabled, pin, snaps, immediateValue, min, expand, dragging, transiting, editable)]]"><div class="bar-container"><paper-progress disabled$="[[disabled]]" id="sliderBar" aria-hidden="true" min="[[min]]" max="[[max]]" step="[[step]]" value="[[immediateValue]]" secondary-progress="[[secondaryProgress]]" on-down="_bardown" on-up="_resetKnob" on-track="_onTrack"></paper-progress></div><template is="dom-if" if="[[snaps]]"><div class="slider-markers"><template is="dom-repeat" items="[[markers]]"><div class="slider-marker"></div></template></div></template><div id="sliderKnob" on-down="_knobdown" on-up="_resetKnob" on-track="_onTrack" on-transitionend="_knobTransitionEnd"><div id="sliderKnobInner" value$="[[immediateValue]]"></div></div></div><template is="dom-if" if="[[editable]]"><paper-input id="input" type="number" step="[[step]]" min="[[min]]" max="[[max]]" class="slider-input" disabled$="[[disabled]]" value="[[immediateValue]]" on-change="_changeValue" on-keydown="_inputKeyDown" no-label-float=""></paper-input></template></template><script>Polymer({is:"paper-single-range-slider",behaviors:[Polymer.IronA11yKeysBehavior,Polymer.IronFormElementBehavior,Polymer.PaperInkyFocusBehavior,Polymer.IronRangeBehavior],properties:{snaps:{type:Boolean,value:!1,notify:!0},pin:{type:Boolean,value:!1,notify:!0},secondaryProgress:{type:Number,value:0,notify:!0,observer:"_secondaryProgressChanged"},editable:{type:Boolean,value:!1},immediateValue:{type:Number,value:0,readOnly:!0,notify:!0},maxMarkers:{type:Number,value:0,notify:!0},expand:{type:Boolean,value:!1,readOnly:!0},dragging:{type:Boolean,value:!1,readOnly:!0},transiting:{type:Boolean,value:!1,readOnly:!0},markers:{type:Array,readOnly:!0,value:[]}},observers:["_updateKnob(value, min, max, snaps, step)","_valueChanged(value)","_immediateValueChanged(immediateValue)","_updateMarkers(maxMarkers, min, max, snaps)"],hostAttributes:{role:"slider",tabindex:0},keyBindings:{"left down pagedown home":"_decrementKey","right up pageup end":"_incrementKey"},increment:function(){this.value=this._clampValue(this.value+this.step)},decrement:function(){this.value=this._clampValue(this.value-this.step)},_updateKnob:function(t,e,i,s,a){this.setAttribute("aria-valuemin",e),this.setAttribute("aria-valuemax",i),this.setAttribute("aria-valuenow",t),this._positionKnob(this._calcRatio(t))},_valueChanged:function(){this.fire("value-change")},_immediateValueChanged:function(){this.dragging?this.fire("immediate-value-change"):this.value=this.immediateValue},_secondaryProgressChanged:function(){this.secondaryProgress=this._clampValue(this.secondaryProgress)},_expandKnob:function(){this._setExpand(!0)},_resetKnob:function(){this.cancelDebouncer("expandKnob"),this._setExpand(!1)},_positionKnob:function(t){this._setImmediateValue(this._calcStep(this._calcKnobPosition(t))),this._setRatio(this._calcRatio(this.immediateValue)),this.$.sliderKnob.style.left=100*this.ratio+"%",this.dragging&&(this._knobstartx=this.ratio*this._w,this.translate3d(0,0,0,this.$.sliderKnob))},_calcKnobPosition:function(t){return(this.max-this.min)*t+this.min},_onTrack:function(t){switch(t.stopPropagation(),t.detail.state){case"start":this._trackStart(t);break;case"track":this._trackX(t);break;case"end":this._trackEnd()}},_trackStart:function(t){this._w=this.$.sliderBar.offsetWidth,this._x=this.ratio*this._w,this._startx=this._x,this._knobstartx=this._startx,this._minx=-this._startx,this._maxx=this._w-this._startx,this.$.sliderKnob.classList.add("dragging"),this._setDragging(!0)},_trackX:function(t){this.dragging||this._trackStart(t);var e=Math.min(this._maxx,Math.max(this._minx,t.detail.dx));this._x=this._startx+e;var i=this._calcStep(this._calcKnobPosition(this._x/this._w));this._setImmediateValue(i);var s=this._calcRatio(this.immediateValue)*this._w-this._knobstartx;this.translate3d(s+"px",0,0,this.$.sliderKnob)},_trackEnd:function(){var t=this.$.sliderKnob.style;this.$.sliderKnob.classList.remove("dragging"),this._setDragging(!1),this._resetKnob(),this.value=this.immediateValue,t.transform=t.webkitTransform="",this.fire("change")},_knobdown:function(t){this._expandKnob(),t.preventDefault(),this.focus()},_bardown:function(t){this._w=this.$.sliderBar.offsetWidth;var e=this.$.sliderBar.getBoundingClientRect(),i=(t.detail.x-e.left)/this._w,s=this.ratio;this._setTransiting(!0),this._positionKnob(i),this.debounce("expandKnob",this._expandKnob,60),s===this.ratio&&this._setTransiting(!1),this.async(function(){this.fire("change")}),t.preventDefault(),this.focus()},_knobTransitionEnd:function(t){t.target===this.$.sliderKnob&&this._setTransiting(!1)},_updateMarkers:function(t,e,i,s){s||this._setMarkers([]);var a=Math.round((i-e)/this.step);a>t&&(a=t),this._setMarkers(new Array(a))},_mergeClasses:function(t){return Object.keys(t).filter(function(e){return t[e]}).join(" ")},_getClassNames:function(){return this._mergeClasses({disabled:this.disabled,pin:this.pin,snaps:this.snaps,ring:this.immediateValue<=this.min,expand:this.expand,dragging:this.dragging,transiting:this.transiting,editable:this.editable})},_incrementKey:function(t){this.disabled||("end"===t.detail.key?this.value=this.max:this.increment(),this.fire("change"))},_decrementKey:function(t){this.disabled||("home"===t.detail.key?this.value=this.min:this.decrement(),this.fire("change"))},_changeValue:function(t){this.value=t.target.value,this.fire("change")},_inputKeyDown:function(t){t.stopPropagation()},_createRipple:function(){return this._rippleContainer=this.$.sliderKnob,Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this)},_focusedChanged:function(t){t&&this.ensureRipple(),this.hasRipple()&&(t?this._ripple.style.display="":this._ripple.style.display="none",this._ripple.holdDown=t)}})</script></dom-module><dom-module id="more-info-climate" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><style>:host{color:var(--primary-text-color);--paper-input-container-input:{text-transform:capitalize};}.container-aux_heat,.container-away_mode,.container-fan_list,.container-humidity,.container-operation_list,.container-swing_list,.container-temperature{display:none}.has-aux_heat .container-aux_heat,.has-away_mode .container-away_mode,.has-fan_list .container-fan_list,.has-humidity .container-humidity,.has-operation_list .container-operation_list,.has-swing_list .container-swing_list,.has-temperature .container-temperature{display:block}.container-fan_list iron-icon,.container-operation_list iron-icon,.container-swing_list iron-icon{margin:22px 16px 0 0}paper-dropdown-menu{width:100%}paper-slider{width:100%}.auto paper-slider{--paper-slider-active-color:var(--paper-orange-400);--paper-slider-secondary-color:var(--paper-blue-400)}.heat paper-slider{--paper-slider-active-color:var(--paper-orange-400);--paper-slider-secondary-color:var(--paper-green-400)}.cool paper-slider{--paper-slider-active-color:var(--paper-green-400);--paper-slider-secondary-color:var(--paper-blue-400)}.humidity{--paper-slider-active-color:var(--paper-blue-400);--paper-slider-secondary-color:var(--paper-blue-400)}paper-range-slider{--paper-range-slider-lower-color:var(--paper-orange-400);--paper-range-slider-active-color:var(--paper-green-400);--paper-range-slider-higher-color:var(--paper-blue-400);--paper-range-slider-knob-color:var(--primary-color);--paper-range-slider-pin-color:var(--primary-color);--paper-range-slider-width:100%}.single-row{padding:8px 0}.capitalize{text-transform:capitalize}</style><div class$="[[computeClassNames(stateObj)]]"><div class="container-temperature"><div class$="single-row, [[stateObj.attributes.operation_mode]]"><div hidden$="[[computeTargetTempHidden(stateObj)]]">Target Temperature</div><paper-slider min="[[stateObj.attributes.min_temp]]" max="[[stateObj.attributes.max_temp]]" secondary-progress="[[stateObj.attributes.max_temp]]" pin="" step="0.5" value="[[stateObj.attributes.temperature]]" hidden$="[[computeHideTempSlider(stateObj)]]" on-change="targetTemperatureSliderChanged"></paper-slider><paper-range-slider min="[[stateObj.attributes.min_temp]]" max="[[stateObj.attributes.max_temp]]" pin="" step="0.5" value-min="[[stateObj.attributes.target_temp_low]]" value-max="[[stateObj.attributes.target_temp_high]]" value-diff-min="2" hidden$="[[computeHideTempRangeSlider(stateObj)]]" on-change="targetTemperatureRangeSliderChanged"></paper-range-slider></div></div><div class="container-humidity"><div class="single-row"><div>Target Humidity</div><paper-slider class="humidity" min="[[stateObj.attributes.min_humidity]]" max="[[stateObj.attributes.max_humidity]]" secondary-progress="[[stateObj.attributes.max_humidity]]" step="1" pin="" value="[[stateObj.attributes.humidity]]" on-change="targetHumiditySliderChanged"></paper-slider></div></div><div class="container-operation_list"><div class="controls"><paper-dropdown-menu label-float="" label="Operation"><paper-menu class="dropdown-content" selected="{{operationIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.operation_list]]"><paper-item class="capitalize">[[item]]</paper-item></template></paper-menu></paper-dropdown-menu></div></div><div class="container-fan_list"><paper-dropdown-menu label-float="" label="Fan Mode"><paper-menu class="dropdown-content" selected="{{fanIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.fan_list]]"><paper-item>[[item]]</paper-item></template></paper-menu></paper-dropdown-menu></div><div class="container-swing_list"><paper-dropdown-menu label-float="" label="Swing Mode"><paper-menu class="dropdown-content" selected="{{swingIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.swing_list]]"><paper-item>[[item]]</paper-item></template></paper-menu></paper-dropdown-menu></div><div class="container-away_mode"><div class="center horizontal layout single-row"><div class="flex">Away Mode</div><paper-toggle-button checked="[[awayToggleChecked]]" on-change="awayToggleChanged"></paper-toggle-button></div></div><div class="container-aux_heat"><div class="center horizontal layout single-row"><div class="flex">Aux Heat</div><paper-toggle-button checked="[[auxToggleChecked]]" on-change="auxToggleChanged"></paper-toggle-button></div></div></div></template></dom-module><script>Polymer({is:"more-info-climate",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},operationIndex:{type:Number,value:-1,observer:"handleOperationmodeChanged"},fanIndex:{type:Number,value:-1,observer:"handleFanmodeChanged"},swingIndex:{type:Number,value:-1,observer:"handleSwingmodeChanged"},awayToggleChecked:{type:Boolean},auxToggleChecked:{type:Boolean}},stateObjChanged:function(e){this.targetTemperatureSliderValue=e.attributes.temperature,this.awayToggleChecked="on"===e.attributes.away_mode,this.auxheatToggleChecked="on"===e.attributes.aux_heat,e.attributes.fan_list?this.fanIndex=e.attributes.fan_list.indexOf(e.attributes.fan_mode):this.fanIndex=-1,e.attributes.operation_list?this.operationIndex=e.attributes.operation_list.indexOf(e.attributes.operation_mode):this.operationIndex=-1,e.attributes.swing_list?this.swingIndex=e.attributes.swing_list.indexOf(e.attributes.swing_mode):this.swingIndex=-1,this.async(function(){this.fire("iron-resize")}.bind(this),500)},computeTargetTempHidden:function(e){return!e.attributes.temperature&&!e.attributes.target_temp_low&&!e.attributes.target_temp_high},computeHideTempRangeSlider:function(e){return!e.attributes.target_temp_low&&!e.attributes.target_temp_high},computeHideTempSlider:function(e){return!e.attributes.temperature},computeClassNames:function(e){return"more-info-climate "+window.hassUtil.attributeClassNames(e,["away_mode","aux_heat","temperature","humidity","operation_list","fan_list","swing_list"])},targetTemperatureSliderChanged:function(e){var t=e.target.value;t!==this.stateObj.attributes.temperature&&this.callServiceHelper("set_temperature",{temperature:t})},targetTemperatureRangeSliderChanged:function(e){var t=e.currentTarget.valueMin,a=e.currentTarget.valueMax;t===this.stateObj.attributes.target_temp_low&&a===this.stateObj.attributes.target_temp_high||this.callServiceHelper("set_temperature",{target_temp_low:t,target_temp_high:a})},targetHumiditySliderChanged:function(e){var t=e.target.value;t!==this.stateObj.attributes.humidity&&this.callServiceHelper("set_humidity",{humidity:t})},awayToggleChanged:function(e){var t="on"===this.stateObj.attributes.away_mode,a=e.target.checked;t!==a&&this.callServiceHelper("set_away_mode",{away_mode:a})},auxToggleChanged:function(e){var t="on"===this.stateObj.attributes.aux_heat,a=e.target.checked;t!==a&&this.callServiceHelper("set_aux_heat",{aux_heat:a})},handleFanmodeChanged:function(e){var t;""!==e&&e!==-1&&(t=this.stateObj.attributes.fan_list[e],t!==this.stateObj.attributes.fan_mode&&this.callServiceHelper("set_fan_mode",{fan_mode:t}))},handleOperationmodeChanged:function(e){var t;""!==e&&e!==-1&&(t=this.stateObj.attributes.operation_list[e],t!==this.stateObj.attributes.operation_mode&&this.callServiceHelper("set_operation_mode",{operation_mode:t}))},handleSwingmodeChanged:function(e){var t;""!==e&&e!==-1&&(t=this.stateObj.attributes.swing_list[e],t!==this.stateObj.attributes.swing_mode&&this.callServiceHelper("set_swing_mode",{swing_mode:t}))},callServiceHelper:function(e,t){t.entity_id=this.stateObj.entityId,this.hass.serviceActions.callService("climate",e,t).then(function(){this.stateObjChanged(this.stateObj)}.bind(this))}})</script><dom-module id="more-info-configurator" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><style>p{margin:8px 0}p>img{max-width:100%}p.center{text-align:center}p.error{color:#C62828}p.submit{text-align:center;height:41px}paper-spinner{width:14px;height:14px;margin-right:20px}</style><div class="layout vertical"><template is="dom-if" if="[[isConfigurable]]"><p hidden$="[[!stateObj.attributes.description]]">[[stateObj.attributes.description]] <a hidden$="[[!stateObj.attributes.link_url]]" href="[[stateObj.attributes.link_url]]" target="_blank">[[stateObj.attributes.link_name]]</a></p><p class="error" hidden$="[[!stateObj.attributes.errors]]">[[stateObj.attributes.errors]]</p><p class="center" hidden$="[[!stateObj.attributes.description_image]]"><img src="[[stateObj.attributes.description_image]]"></p><template is="dom-repeat" items="[[stateObj.attributes.fields]]"><paper-input-container id="paper-input-fields-{{item.id}}"><label>[[item.name]]</label><input is="iron-input" type="[[item.type]]" id="[[item.id]]" on-change="fieldChanged"></paper-input-container></template><p class="submit"><paper-button raised="" disabled="[[isConfiguring]]" on-tap="submitClicked"><paper-spinner active="[[isConfiguring]]" hidden="[[!isConfiguring]]" alt="Configuring"></paper-spinner>[[submitCaption]]</paper-button></p></template></div></template></dom-module><script>Polymer({is:"more-info-configurator",behaviors:[window.hassBehavior],properties:{stateObj:{type:Object},action:{type:String,value:"display"},isStreaming:{type:Boolean,bindNuclear:function(i){return i.streamGetters.isStreamingEvents}},isConfigurable:{type:Boolean,computed:"computeIsConfigurable(stateObj)"},isConfiguring:{type:Boolean,value:!1},submitCaption:{type:String,computed:"computeSubmitCaption(stateObj)"},fieldInput:{type:Object,value:{}}},computeIsConfigurable:function(i){return"configure"===i.state},computeSubmitCaption:function(i){return i.attributes.submit_caption||"Set configuration"},fieldChanged:function(i){var t=i.target;this.fieldInput[t.id]=t.value},submitClicked:function(){var i={configure_id:this.stateObj.attributes.configure_id,fields:this.fieldInput};this.isConfiguring=!0,this.hass.serviceActions.callService("configurator","configure",i).then(function(){this.isConfiguring=!1,this.isStreaming||this.hass.syncActions.fetchAll()}.bind(this),function(){this.isConfiguring=!1}.bind(this))}})</script><dom-module id="more-info-cover" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><style>.current_position,.current_tilt_position{max-height:0;overflow:hidden}.has-current_position .current_position,.has-current_tilt_position .current_tilt_position{max-height:90px}</style><div class$="[[computeClassNames(stateObj)]]"><div class="current_position"><div>Position</div><paper-slider min="0" max="100" value="{{coverPositionSliderValue}}" step="1" pin="" on-change="coverPositionSliderChanged"></paper-slider></div><div class="current_tilt_position"><div>Tilt position</div><paper-icon-button icon="mdi:arrow-top-right" on-tap="onOpenTiltTap" title="Open tilt" disabled="[[computeIsFullyOpenTilt(stateObj)]]"></paper-icon-button><paper-icon-button icon="mdi:stop" on-tap="onStopTiltTap" title="Stop tilt"></paper-icon-button><paper-icon-button icon="mdi:arrow-bottom-left" on-tap="onCloseTiltTap" title="Close tilt" disabled="[[computeIsFullyClosedTilt(stateObj)]]"></paper-icon-button><paper-slider min="0" max="100" value="{{coverTiltPositionSliderValue}}" step="1" pin="" on-change="coverTiltPositionSliderChanged"></paper-slider></div></div></template></dom-module><script>Polymer({is:"more-info-cover",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},coverPositionSliderValue:{type:Number},coverTiltPositionSliderValue:{type:Number}},stateObjChanged:function(t){this.coverPositionSliderValue=t.attributes.current_position,this.coverTiltPositionSliderValue=t.attributes.current_tilt_position},computeClassNames:function(t){return window.hassUtil.attributeClassNames(t,["current_position","current_tilt_position"])},coverPositionSliderChanged:function(t){this.hass.serviceActions.callService("cover","set_cover_position",{entity_id:this.stateObj.entityId,position:t.target.value})},coverTiltPositionSliderChanged:function(t){this.hass.serviceActions.callService("cover","set_cover_tilt_position",{entity_id:this.stateObj.entityId,tilt_position:t.target.value})},computeIsFullyOpenTilt:function(t){return 100===t.attributes.current_tilt_position},computeIsFullyClosedTilt:function(t){return 0===t.attributes.current_tilt_position},onOpenTiltTap:function(){this.hass.serviceActions.callService("cover","open_cover_tilt",{entity_id:this.stateObj.entityId})},onCloseTiltTap:function(){this.hass.serviceActions.callService("cover","close_cover_tilt",{entity_id:this.stateObj.entityId})},onStopTiltTap:function(){this.hass.serviceActions.callService("cover","stop_cover_tilt",{entity_id:this.stateObj.entityId})}})</script><dom-module id="more-info-default" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>.data-entry .value{max-width:200px}.attribution{color:var(--secondary-text-color);text-align:right}</style><div class="layout vertical"><template is="dom-repeat" items="[[computeDisplayAttributes(stateObj)]]" as="attribute"><div class="data-entry layout justified horizontal"><div class="key">[[formatAttribute(attribute)]]</div><div class="value">[[formatAttributeValue(stateObj, attribute)]]</div></div></template><div class="attribution" hidden$="[[!computeAttribution(stateObj)]]">[[computeAttribution(stateObj)]]</div></div></template></dom-module><script>!function(){"use strict";var t=["entity_picture","friendly_name","icon","unit_of_measurement","emulated_hue","emulated_hue_name","haaska_hidden","haaska_name","homebridge_hidden","homebridge_name","attribution"];Polymer({is:"more-info-default",properties:{stateObj:{type:Object}},computeDisplayAttributes:function(e){return window.hassUtil.computeDisplayAttributes(e,t)},formatAttribute:function(t){return window.hassUtil.formatAttribute(t)},formatAttributeValue:function(t,e){return window.hassUtil.formatAttributeValue(t,e)},computeAttribution:function(t){return window.hassUtil.computeAttribution(t)}})}()</script><dom-module id="more-info-fan" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><style>.container-direction,.container-speed_list{display:none}.has-direction .container-direction,.has-speed_list .container-speed_list{display:block}</style><div class$="[[computeClassNames(stateObj)]]"><div class="container-speed_list"><paper-dropdown-menu label-float="" label="Speed"><paper-menu class="dropdown-content" selected="{{speedIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.speed_list]]"><paper-item>[[item]]</paper-item></template></paper-menu></paper-dropdown-menu></div><div class="container-oscillating" hidden$="[[computeHideOscillation(stateObj)]]"><div class="center horizontal layout single-row"><div class="flex">Oscillate</div><paper-toggle-button checked="[[oscillationToggleChecked]]" on-change="oscillationToggleChanged"></paper-toggle-button></div></div><div class="container-direction"><div class="direction"><div>Direction</div><paper-icon-button icon="mdi:rotate-left" on-tap="onDirectionLeft" title="Left" disabled="[[computeIsRotatingLeft(stateObj)]]"></paper-icon-button><paper-icon-button icon="mdi:rotate-right" on-tap="onDirectionRight" title="Right" disabled="[[computeIsRotatingRight(stateObj)]]"></paper-icon-button></div></div></div></template></dom-module><script>Polymer({is:"more-info-fan",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},speedIndex:{type:Number,value:-1,observer:"speedChanged"},oscillationToggleChecked:{type:Boolean}},stateObjChanged:function(t){this.oscillationToggleChecked=t.attributes.oscillating,t.attributes.speed_list?this.speedIndex=t.attributes.speed_list.indexOf(t.attributes.speed):this.speedIndex=-1,this.async(function(){this.fire("iron-resize")}.bind(this),500)},computeClassNames:function(t){return"more-info-fan "+window.hassUtil.attributeClassNames(t,["oscillating","speed_list","direction"])},speedChanged:function(t){var e;""!==t&&t!==-1&&(e=this.stateObj.attributes.speed_list[t],e!==this.stateObj.attributes.speed&&this.hass.serviceActions.callService("fan","turn_on",{entity_id:this.stateObj.entityId,speed:e}))},oscillationToggleChanged:function(t){var e=this.stateObj.attributes.oscillating,i=t.target.checked;e!==i&&this.hass.serviceActions.callService("fan","oscillate",{entity_id:this.stateObj.entityId,oscillating:i})},onDirectionLeft:function(){this.hass.serviceActions.callService("fan","set_direction",{entity_id:this.stateObj.entityId,direction:"left"})},onDirectionRight:function(){this.hass.serviceActions.callService("fan","set_direction",{entity_id:this.stateObj.entityId,direction:"right"})},computeIsRotatingLeft:function(t){return"left"===t.attributes.direction},computeIsRotatingRight:function(t){return"right"===t.attributes.direction},computeHideOscillation:function(t){return t.attributes.direction}})</script><dom-module id="more-info-group" assetpath="more-infos/"><template><style>.child-card{margin-bottom:8px}.child-card:last-child{margin-bottom:0}</style><div id="groupedControlDetails"></div><template is="dom-repeat" items="[[states]]" as="state"><div class="child-card"><state-card-content state-obj="[[state]]" hass="[[hass]]"></state-card-content></div></template></template></dom-module><script>Polymer({is:"more-info-group",behaviors:[window.hassBehavior],properties:{hass:{type:Object},stateObj:{type:Object},states:{type:Array,bindNuclear:function(t){return[t.moreInfoGetters.currentEntity,t.entityGetters.entityMap,function(t,e){return t?t.attributes.entity_id.map(e.get.bind(e)):[]}]}}},observers:["statesChanged(stateObj, states)"],statesChanged:function(t,e){var s,i,a,n,r=!1;if(e&&e.length>0)for(s=e[0],r=s.set("entityId",t.entityId).set("attributes",Object.assign({},s.attributes)),i=0;i<e.length;i++)a=e[i],a&&a.domain&&r.domain!==a.domain&&(r=!1);r?window.hassUtil.dynamicContentUpdater(this.$.groupedControlDetails,"MORE-INFO-"+window.hassUtil.stateMoreInfoType(r).toUpperCase(),{stateObj:r,hass:this.hass}):(n=Polymer.dom(this.$.groupedControlDetails),n.lastChild&&n.removeChild(n.lastChild))}})</script><dom-module id="ha-labeled-slider" assetpath="components/"><template><style>:host{display:block;padding-bottom:16px}.title{margin-bottom:16px;opacity:var(--dark-primary-opacity)}iron-icon{float:left;margin-top:4px;opacity:var(--dark-secondary-opacity)}.slider-container{margin-left:24px}</style><div class="title">[[caption]]</div><iron-icon icon="[[icon]]"></iron-icon><div class="slider-container"><paper-slider min="[[min]]" max="[[max]]" value="{{value}}"></paper-slider></div></template></dom-module><script>Polymer({is:"ha-labeled-slider",properties:{caption:{type:String},icon:{type:String},min:{type:Number},max:{type:Number},value:{type:Number,notify:!0}}})</script><dom-module id="ha-color-picker" assetpath="components/"><template><style>canvas{cursor:crosshair}</style><canvas width="[[width]]" height="[[height]]"></canvas></template></dom-module><script>Polymer({is:"ha-color-picker",properties:{color:{type:Object},width:{type:Number},height:{type:Number}},listeners:{mousedown:"onMouseDown",mouseup:"onMouseUp",touchstart:"onTouchStart",touchend:"onTouchEnd"},onMouseDown:function(t){this.onMouseMove(t),this.addEventListener("mousemove",this.onMouseMove)},onMouseUp:function(){this.removeEventListener("mousemove",this.onMouseMove)},onTouchStart:function(t){this.onTouchMove(t),this.addEventListener("touchmove",this.onTouchMove)},onTouchEnd:function(){this.removeEventListener("touchmove",this.onTouchMove)},onTouchMove:function(t){this.mouseMoveIsThrottled&&(this.mouseMoveIsThrottled=!1,this.processColorSelect(t.touches[0]),this.async(function(){this.mouseMoveIsThrottled=!0}.bind(this),100))},onMouseMove:function(t){this.mouseMoveIsThrottled&&(this.mouseMoveIsThrottled=!1,this.processColorSelect(t),this.async(function(){this.mouseMoveIsThrottled=!0}.bind(this),100))},processColorSelect:function(t){var o=this.canvas.getBoundingClientRect();t.clientX<o.left||t.clientX>=o.left+o.width||t.clientY<o.top||t.clientY>=o.top+o.height||this.onColorSelect(t.clientX-o.left,t.clientY-o.top)},onColorSelect:function(t,o){var e=this.context.getImageData(t,o,1,1).data;this.setColor({r:e[0],g:e[1],b:e[2]})},setColor:function(t){this.color=t,this.fire("colorselected",{rgb:this.color})},ready:function(){this.setColor=this.setColor.bind(this),this.mouseMoveIsThrottled=!0,this.canvas=this.children[0],this.context=this.canvas.getContext("2d"),this.drawGradient()},drawGradient:function(){var t,o,e,i,s;this.width&&this.height||(t=getComputedStyle(this)),o=this.width||parseInt(t.width,10),e=this.height||parseInt(t.height,10),i=this.context.createLinearGradient(0,0,o,0),i.addColorStop(0,"rgb(255,0,0)"),i.addColorStop(.16,"rgb(255,0,255)"),i.addColorStop(.32,"rgb(0,0,255)"),i.addColorStop(.48,"rgb(0,255,255)"),i.addColorStop(.64,"rgb(0,255,0)"),i.addColorStop(.8,"rgb(255,255,0)"),i.addColorStop(1,"rgb(255,0,0)"),this.context.fillStyle=i,this.context.fillRect(0,0,o,e),s=this.context.createLinearGradient(0,0,0,e),s.addColorStop(0,"rgba(255,255,255,1)"),s.addColorStop(.5,"rgba(255,255,255,0)"),s.addColorStop(.5,"rgba(0,0,0,0)"),s.addColorStop(1,"rgba(0,0,0,1)"),this.context.fillStyle=s,this.context.fillRect(0,0,o,e)}})</script><dom-module id="more-info-light" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><style>.effect_list{padding-bottom:16px}.brightness,.color_temp,.effect_list,.white_value{max-height:0;overflow:hidden;transition:max-height .5s ease-in}ha-color-picker{display:block;width:250px;max-height:0;overflow:hidden;transition:max-height .2s ease-in}.has-brightness .brightness,.has-color_temp .color_temp,.has-effect_list .effect_list,.has-white_value .white_value{max-height:84px}.has-rgb_color ha-color-picker{max-height:200px}</style><div class$="[[computeClassNames(stateObj)]]"><div class="effect_list"><paper-dropdown-menu label-float="" label="Effect"><paper-menu class="dropdown-content" selected="{{effectIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.effect_list]]"><paper-item>[[item]]</paper-item></template></paper-menu></paper-dropdown-menu></div><div class="brightness"><ha-labeled-slider caption="Brightness" icon="mdi:brightness-5" max="255" value="{{brightnessSliderValue}}" on-change="brightnessSliderChanged"></ha-labeled-slider></div><div class="color_temp"><ha-labeled-slider caption="Color Temperature" icon="mdi:thermometer" min="154" max="500" value="{{ctSliderValue}}" on-change="ctSliderChanged"></ha-labeled-slider></div><div class="white_value"><ha-labeled-slider caption="White Value" icon="mdi:file-word-box" max="255" value="{{wvSliderValue}}" on-change="wvSliderChanged"></ha-labeled-slider></div><ha-color-picker on-colorselected="colorPicked" height="200" width="250"></ha-color-picker></div></template></dom-module><script>Polymer({is:"more-info-light",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},effectIndex:{type:Number,value:-1,observer:"effectChanged"},brightnessSliderValue:{type:Number,value:0},ctSliderValue:{type:Number,value:0},wvSliderValue:{type:Number,value:0}},stateObjChanged:function(t){t&&"on"===t.state?(this.brightnessSliderValue=t.attributes.brightness,this.ctSliderValue=t.attributes.color_temp,this.wvSliderValue=t.attributes.white_value,t.attributes.effect_list?this.effectIndex=t.attributes.effect_list.indexOf(t.attributes.effect):this.effectIndex=-1):this.brightnessSliderValue=0,this.async(function(){this.fire("iron-resize")}.bind(this),500)},computeClassNames:function(t){var e=window.hassUtil.attributeClassNames(t,["rgb_color","color_temp","white_value","effect_list"]),i=1;return t&&t.attributes.supported_features&i&&(e+=" has-brightness"),e},effectChanged:function(t){var e;""!==t&&t!==-1&&(e=this.stateObj.attributes.effect_list[t],e!==this.stateObj.attributes.effect&&this.hass.serviceActions.callService("light","turn_on",{entity_id:this.stateObj.entityId,effect:e}))},brightnessSliderChanged:function(t){var e=parseInt(t.target.value,10);isNaN(e)||(0===e?this.hass.serviceActions.callTurnOff(this.stateObj.entityId):this.hass.serviceActions.callService("light","turn_on",{entity_id:this.stateObj.entityId,brightness:e}))},ctSliderChanged:function(t){var e=parseInt(t.target.value,10);isNaN(e)||this.hass.serviceActions.callService("light","turn_on",{entity_id:this.stateObj.entityId,color_temp:e})},wvSliderChanged:function(t){var e=parseInt(t.target.value,10);isNaN(e)||this.hass.serviceActions.callService("light","turn_on",{entity_id:this.stateObj.entityId,white_value:e})},serviceChangeColor:function(t,e,i){t.serviceActions.callService("light","turn_on",{entity_id:e,rgb_color:[i.r,i.g,i.b]})},colorPicked:function(t){return this.skipColorPicked?void(this.colorChanged=!0):(this.color=t.detail.rgb,this.serviceChangeColor(this.hass,this.stateObj.entityId,this.color),this.colorChanged=!1,this.skipColorPicked=!0,void(this.colorDebounce=setTimeout(function(){this.colorChanged&&this.serviceChangeColor(this.hass,this.stateObj.entityId,this.color),this.skipColorPicked=!1}.bind(this),500)))}})</script><dom-module id="more-info-lock" assetpath="more-infos/"><template><style>paper-input{display:inline-block}</style><div hidden$="[[!stateObj.attributes.code_format]]"><paper-input label="code" value="{{enteredCode}}" pattern="[[stateObj.attributes.code_format]]" type="password"></paper-input><paper-button on-tap="handleUnlockTap" hidden$="[[!isLocked]]">Unlock</paper-button><paper-button on-tap="handleLockTap" hidden$="[[isLocked]]">Lock</paper-button></div></template></dom-module><script>Polymer({is:"more-info-lock",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},enteredCode:{type:String,value:""}},handleUnlockTap:function(){this.callService("unlock",{code:this.enteredCode})},handleLockTap:function(){this.callService("lock",{code:this.enteredCode})},stateObjChanged:function(e){e&&(this.isLocked="locked"===e.state),this.async(function(){this.fire("iron-resize")}.bind(this),500)},callService:function(e,t){var i=t||{};i.entity_id=this.stateObj.entityId,this.hass.serviceActions.callService("lock",e,i)}})</script><dom-module id="more-info-media_player" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>.media-state{text-transform:capitalize}paper-icon-button[highlight]{color:var(--accent-color)}.volume{margin-bottom:8px;max-height:0;overflow:hidden;transition:max-height .5s ease-in}.has-volume_level .volume{max-height:40px}iron-icon.source-input{padding:7px;margin-top:15px}paper-dropdown-menu.source-input{margin-left:10px}[hidden]{display:none!important}</style><div class$="[[computeClassNames(stateObj)]]"><div class="layout horizontal"><div class="flex"><paper-icon-button icon="mdi:power" highlight$="[[isOff]]" on-tap="handleTogglePower" hidden$="[[computeHidePowerButton(isOff, supportsTurnOn, supportsTurnOff)]]"></paper-icon-button></div><div><template is="dom-if" if="[[computeShowPlaybackControls(isOff, hasMediaControl)]]"><paper-icon-button icon="mdi:skip-previous" on-tap="handlePrevious" hidden$="[[!supportsPreviousTrack]]"></paper-icon-button><paper-icon-button icon="[[computePlaybackControlIcon(stateObj)]]" on-tap="handlePlaybackControl" hidden$="[[!computePlaybackControlIcon(stateObj)]]" highlight=""></paper-icon-button><paper-icon-button icon="mdi:skip-next" on-tap="handleNext" hidden$="[[!supportsNextTrack]]"></paper-icon-button></template></div></div><div class="volume_buttons center horizontal layout" hidden$="[[computeHideVolumeButtons(isOff, supportsVolumeButtons)]]"><paper-icon-button on-tap="handleVolumeTap" icon="mdi:volume-off"></paper-icon-button><paper-icon-button id="volumeDown" disabled$="[[isMuted]]" on-mousedown="handleVolumeDown" on-touchstart="handleVolumeDown" icon="mdi:volume-medium"></paper-icon-button><paper-icon-button id="volumeUp" disabled$="[[isMuted]]" on-mousedown="handleVolumeUp" on-touchstart="handleVolumeUp" icon="mdi:volume-high"></paper-icon-button></div><div class="volume center horizontal layout" hidden$="[[!supportsVolumeSet]]"><paper-icon-button on-tap="handleVolumeTap" hidden$="[[supportsVolumeButtons]]" icon="[[computeMuteVolumeIcon(isMuted)]]"></paper-icon-button><paper-slider disabled$="[[isMuted]]" min="0" max="100" value="[[volumeSliderValue]]" on-change="volumeSliderChanged" class="flex"></paper-slider></div><div class="controls layout horizontal justified" hidden$="[[computeHideSelectSource(isOff, supportsSelectSource)]]"><iron-icon class="source-input" icon="mdi:login-variant"></iron-icon><paper-dropdown-menu class="source-input" label-float="" label="Source"><paper-menu class="dropdown-content" selected="{{sourceIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.source_list]]"><paper-item>[[item]]</paper-item></template></paper-menu></paper-dropdown-menu></div><div hidden$="[[computeHideTTS(ttsLoaded, supportsPlayMedia)]]" class="layout horizontal end"><paper-input label="Text to speak" class="flex" value="{{ttsMessage}}"></paper-input><paper-icon-button icon="mdi:send" on-tap="sendTTS"></paper-icon-button></div></div></template></dom-module><script>Polymer({is:"more-info-media_player",behaviors:[window.hassBehavior],properties:{ttsLoaded:{type:Boolean,bindNuclear:function(e){return e.configGetters.isComponentLoaded("tts")}},hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},isOff:{type:Boolean,value:!1},isPlaying:{type:Boolean,value:!1},isMuted:{type:Boolean,value:!1},source:{type:String,value:""},sourceIndex:{type:Number,value:0,observer:"handleSourceChanged"},volumeSliderValue:{type:Number,value:0},ttsMessage:{type:String,value:""},supportsPause:{type:Boolean,value:!1},supportsVolumeSet:{type:Boolean,value:!1},supportsVolumeMute:{type:Boolean,value:!1},supportsPreviousTrack:{type:Boolean,value:!1},supportsNextTrack:{type:Boolean,value:!1},supportsTurnOn:{type:Boolean,value:!1},supportsTurnOff:{type:Boolean,value:!1},supportsPlayMedia:{type:Boolean,value:!1},supportsVolumeButtons:{type:Boolean,value:!1},supportsSelectSource:{type:Boolean,value:!1},supportsPlay:{type:Boolean,value:!1},hasMediaControl:{type:Boolean,value:!1}},HAS_MEDIA_STATES:["playing","paused","unknown"],stateObjChanged:function(e){e&&(this.isOff="off"===e.state,this.isPlaying="playing"===e.state,this.hasMediaControl=this.HAS_MEDIA_STATES.indexOf(e.state)!==-1,this.volumeSliderValue=100*e.attributes.volume_level,this.isMuted=e.attributes.is_volume_muted,this.source=e.attributes.source,this.supportsPause=0!==(1&e.attributes.supported_media_commands),this.supportsVolumeSet=0!==(4&e.attributes.supported_media_commands),this.supportsVolumeMute=0!==(8&e.attributes.supported_media_commands),this.supportsPreviousTrack=0!==(16&e.attributes.supported_media_commands),this.supportsNextTrack=0!==(32&e.attributes.supported_media_commands),this.supportsTurnOn=0!==(128&e.attributes.supported_media_commands),this.supportsTurnOff=0!==(256&e.attributes.supported_media_commands),this.supportsPlayMedia=0!==(512&e.attributes.supported_media_commands),this.supportsVolumeButtons=0!==(1024&e.attributes.supported_media_commands),this.supportsSelectSource=0!==(2048&e.attributes.supported_media_commands),this.supportsPlay=0!==(16384&e.attributes.supported_media_commands),void 0!==e.attributes.source_list&&(this.sourceIndex=e.attributes.source_list.indexOf(this.source))),this.async(function(){this.fire("iron-resize")}.bind(this),500)},computeClassNames:function(e){return window.hassUtil.attributeClassNames(e,["volume_level"])},computeIsOff:function(e){return"off"===e.state},computeMuteVolumeIcon:function(e){return e?"mdi:volume-off":"mdi:volume-high"},computeHideVolumeButtons:function(e,t){return!t||e},computeShowPlaybackControls:function(e,t){return!e&&t},computePlaybackControlIcon:function(){return this.isPlaying?this.supportsPause?"mdi:pause":"mdi:stop":this.supportsPlay?"mdi:play":null},computeHidePowerButton:function(e,t,s){return e?!t:!s},computeHideSelectSource:function(e,t){return e||!t},computeSelectedSource:function(e){return e.attributes.source_list.indexOf(e.attributes.source)},computeHideTTS:function(e,t){return!e||!t},handleTogglePower:function(){this.callService(this.isOff?"turn_on":"turn_off")},handlePrevious:function(){this.callService("media_previous_track")},handlePlaybackControl:function(){this.callService("media_play_pause")},handleNext:function(){this.callService("media_next_track")},handleSourceChanged:function(e){var t;!this.stateObj||void 0===this.stateObj.attributes.source_list||e<0||e>=this.stateObj.attributes.source_list.length||(t=this.stateObj.attributes.source_list[e],t!==this.stateObj.attributes.source&&this.callService("select_source",{source:t}))},handleVolumeTap:function(){this.supportsVolumeMute&&this.callService("volume_mute",{is_volume_muted:!this.isMuted})},handleVolumeUp:function(){var e=this.$.volumeUp;this.handleVolumeWorker("volume_up",e,!0)},handleVolumeDown:function(){var e=this.$.volumeDown;this.handleVolumeWorker("volume_down",e,!0)},handleVolumeWorker:function(e,t,s){(s||void 0!==t&&t.pointerDown)&&(this.callService(e),this.async(function(){this.handleVolumeWorker(e,t,!1)}.bind(this),500))},volumeSliderChanged:function(e){var t=parseFloat(e.target.value),s=t>0?t/100:0;this.callService("volume_set",{volume_level:s})},sendTTS:function(){var e,t,s=this.hass.reactor.evaluate(this.hass.serviceGetters.entityMap).get("tts").get("services").keySeq().toArray();for(t=0;t<s.length;t++)if(s[t].indexOf("_say")!==-1){e=s[t];break}e&&(this.hass.serviceActions.callService("tts",e,{entity_id:this.stateObj.entityId,message:this.ttsMessage}),this.ttsMessage="",document.activeElement.blur())},callService:function(e,t){var s=t||{};s.entity_id=this.stateObj.entityId,this.hass.serviceActions.callService("media_player",e,s)}})</script><dom-module id="more-info-script" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><div class="layout vertical"><div class="data-entry layout justified horizontal"><div class="key">Last Action</div><div class="value">[[stateObj.attributes.last_action]]</div></div></div></template></dom-module><script>Polymer({is:"more-info-script",properties:{stateObj:{type:Object}}})</script><dom-module id="more-info-sun" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><template is="dom-repeat" items="[[computeOrder(risingDate, settingDate)]]"><div class="data-entry layout justified horizontal"><div class="key"><span>[[itemCaption(item)]]</span><ha-relative-time datetime-obj="[[itemDate(item)]]"></ha-relative-time></div><div class="value">[[itemValue(item)]]</div></div></template><div class="data-entry layout justified horizontal"><div class="key">Elevation</div><div class="value">[[stateObj.attributes.elevation]]</div></div></template></dom-module><script>Polymer({is:"more-info-sun",properties:{stateObj:{type:Object},risingDate:{type:Object,computed:"computeRising(stateObj)"},settingDate:{type:Object,computed:"computeSetting(stateObj)"}},computeRising:function(t){return new Date(t.attributes.next_rising)},computeSetting:function(t){return new Date(t.attributes.next_setting)},computeOrder:function(t,e){return t>e?["set","ris"]:["ris","set"]},itemCaption:function(t){return"ris"===t?"Rising ":"Setting "},itemDate:function(t){return"ris"===t?this.risingDate:this.settingDate},itemValue:function(t){return window.hassUtil.formatTime(this.itemDate(t))}})</script><dom-module id="more-info-updater" assetpath="more-infos/"><template><style>.link{color:#03A9F4}</style><div><a class="link" href="https://home-assistant.io/getting-started/updating/" target="_blank">Update Instructions</a></div></template></dom-module><script>Polymer({is:"more-info-updater",properties:{stateObj:{type:Object}},computeReleaseNotes:function(t){return t.attributes.release_notes||"https://home-assistant.io/getting-started/updating/"}})</script><script>Polymer({is:"more-info-content",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"}},created:function(){this.style.display="block"},stateObjChanged:function(t){var s;t?window.hassUtil.dynamicContentUpdater(this,"MORE-INFO-"+window.hassUtil.stateMoreInfoType(t).toUpperCase(),{hass:this.hass,stateObj:t,isVisible:!0}):(s=Polymer.dom(this),s.lastChild&&(s.lastChild.isVisible=!1))}})</script><dom-module id="more-info-dialog" assetpath="dialogs/"><template><style>paper-dialog{font-size:14px;width:365px}paper-dialog[data-domain=camera]{width:auto}state-history-charts{position:relative;z-index:1;max-width:365px}state-card-content{margin-bottom:24px;font-size:14px}@media all and (max-width:450px),all and (max-height:500px){paper-dialog{margin:0;width:100%;max-height:calc(100% - 64px);position:fixed!important;bottom:0;left:0;right:0;overflow:scroll}}</style><paper-dialog id="dialog" with-backdrop="" opened="{{dialogOpen}}" data-domain$="[[stateObj.domain]]"><h2><state-card-content state-obj="[[stateObj]]" hass="[[hass]]" in-dialog=""></state-card-content></h2><template is="dom-if" if="[[showHistoryComponent]]"><state-history-charts state-history="[[stateHistory]]" is-loading-data="[[isLoadingHistoryData]]"></state-history-charts></template><paper-dialog-scrollable id="scrollable"><more-info-content state-obj="[[stateObj]]" hass="[[hass]]"></more-info-content></paper-dialog-scrollable></paper-dialog></template></dom-module><script>Polymer({is:"more-info-dialog",behaviors:[window.hassBehavior],properties:{hass:{type:Object},stateObj:{type:Object,bindNuclear:function(t){return t.moreInfoGetters.currentEntity},observer:"stateObjChanged"},stateHistory:{type:Object,bindNuclear:function(t){return[t.moreInfoGetters.currentEntityHistory,function(t){return!!t&&[t]}]}},isLoadingHistoryData:{type:Boolean,computed:"computeIsLoadingHistoryData(delayedDialogOpen, isLoadingEntityHistoryData)"},isLoadingEntityHistoryData:{type:Boolean,bindNuclear:function(t){return t.entityHistoryGetters.isLoadingEntityHistory}},hasHistoryComponent:{type:Boolean,bindNuclear:function(t){return t.configGetters.isComponentLoaded("history")},observer:"fetchHistoryData"},shouldFetchHistory:{type:Boolean,bindNuclear:function(t){return t.moreInfoGetters.isCurrentEntityHistoryStale},observer:"fetchHistoryData"},showHistoryComponent:{type:Boolean,value:!1,computed:"computeShowHistoryComponent(hasHistoryComponent, stateObj)"},dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},delayedDialogOpen:{type:Boolean,value:!1}},ready:function(){this.$.scrollable.dialogElement=this.$.dialog},computeIsLoadingHistoryData:function(t,e){return!t||e},computeShowHistoryComponent:function(t,e){return this.hasHistoryComponent&&e&&window.hassUtil.DOMAINS_WITH_NO_HISTORY.indexOf(e.domain)===-1},fetchHistoryData:function(){this.stateObj&&this.hasHistoryComponent&&this.shouldFetchHistory&&this.hass.entityHistoryActions.fetchRecent(this.stateObj.entityId)},stateObjChanged:function(t){return t?void this.async(function(){this.fetchHistoryData(),this.dialogOpen=!0}.bind(this),10):void(this.dialogOpen=!1)},dialogOpenChanged:function(t){t?this.async(function(){this.delayedDialogOpen=!0}.bind(this),10):!t&&this.stateObj&&(this.async(function(){this.hass.moreInfoActions.deselectEntity()}.bind(this),10),this.delayedDialogOpen=!1)}})</script><dom-module id="ha-voice-command-dialog" assetpath="dialogs/"><template><style>iron-icon{margin-right:8px}.content{width:300px;min-height:80px;font-size:18px}.icon{float:left}.text{margin-left:48px;margin-right:24px}.interimTranscript{color:#a9a9a9}@media all and (max-width:450px){paper-dialog{margin:0;width:100%;max-height:calc(100% - 64px);position:fixed!important;bottom:0;left:0;right:0;overflow:scroll}}</style><paper-dialog id="dialog" with-backdrop="" opened="{{dialogOpen}}"><div class="content"><div class="icon"><iron-icon icon="mdi:text-to-speech" hidden$="[[isTransmitting]]"></iron-icon><paper-spinner active$="[[isTransmitting]]" hidden$="[[!isTransmitting]]"></paper-spinner></div><div class="text"><span>{{finalTranscript}}</span> <span class="interimTranscript">[[interimTranscript]]</span></div></div></paper-dialog></template></dom-module><script>Polymer({is:"ha-voice-command-dialog",behaviors:[window.hassBehavior],properties:{hass:{type:Object},dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},finalTranscript:{type:String,bindNuclear:function(e){return e.voiceGetters.finalTranscript}},interimTranscript:{type:String,bindNuclear:function(e){return e.voiceGetters.extraInterimTranscript}},isTransmitting:{type:Boolean,bindNuclear:function(e){return e.voiceGetters.isTransmitting}},isListening:{type:Boolean,bindNuclear:function(e){return e.voiceGetters.isListening}},showListenInterface:{type:Boolean,computed:"computeShowListenInterface(isListening, isTransmitting)",observer:"showListenInterfaceChanged"}},computeShowListenInterface:function(e,n){return e||n},dialogOpenChanged:function(e){!e&&this.isListening&&this.hass.voiceActions.stop()},showListenInterfaceChanged:function(e){!e&&this.dialogOpen?this.dialogOpen=!1:e&&(this.dialogOpen=!0)}})</script><dom-module id="paper-icon-item" assetpath="../bower_components/paper-item/"><template><style include="paper-item-shared-styles"></style><style>:host{@apply(--layout-horizontal);@apply(--layout-center);@apply(--paper-font-subhead);@apply(--paper-item);@apply(--paper-icon-item)}.content-icon{@apply(--layout-horizontal);@apply(--layout-center);width:var(--paper-item-icon-width,56px);@apply(--paper-item-icon)}</style><div id="contentIcon" class="content-icon"><content select="[item-icon]"></content></div><content></content></template><script>Polymer({is:"paper-icon-item",behaviors:[Polymer.PaperItemBehavior]})</script></dom-module><dom-module id="ha-sidebar" assetpath="components/"><template><style include="iron-flex iron-flex-alignment iron-positioning">:host{--sidebar-text:{opacity:var(--dark-primary-opacity);font-weight:500;font-size:14px};display:block;overflow:auto;-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none}app-toolbar{font-weight:400;opacity:var(--dark-primary-opacity);border-bottom:1px solid #e0e0e0}paper-menu{padding-bottom:0}paper-icon-item{--paper-icon-item:{cursor:pointer};--paper-item-icon:{color:#000;opacity:var(--dark-secondary-opacity)};--paper-item-selected:{color:var(--default-primary-color);background-color:#e8e8e8;opacity:1};}paper-icon-item.iron-selected{--paper-item-icon:{color:var(--default-primary-color);opacity:1};}paper-icon-item .item-text{@apply(--sidebar-text)}paper-icon-item.iron-selected .item-text{opacity:1}paper-icon-item.logout{margin-top:16px}.divider{height:1px;background-color:#000;margin:4px 0;opacity:var(--dark-divider-opacity)}.setting{@apply(--sidebar-text)}.subheader{@apply(--sidebar-text);padding:16px}.dev-tools{padding:0 8px;opacity:var(--dark-secondary-opacity)}</style><app-toolbar><div main-title="">Home Assistant</div><paper-icon-button icon="mdi:chevron-left" hidden$="[[narrow]]" on-tap="toggleMenu"></paper-icon-button></app-toolbar><paper-menu attr-for-selected="data-panel" selected="[[selected]]" on-iron-select="menuSelect"><paper-icon-item on-tap="menuClicked" data-panel="states"><iron-icon item-icon="" icon="mdi:apps"></iron-icon><span class="item-text">States</span></paper-icon-item><template is="dom-repeat" items="[[computePanels(panels)]]"><paper-icon-item on-tap="menuClicked" data-panel$="[[item.url_path]]"><iron-icon item-icon="" icon="[[item.icon]]"></iron-icon><span class="item-text">[[item.title]]</span></paper-icon-item></template><paper-icon-item on-tap="menuClicked" data-panel="logout" class="logout"><iron-icon item-icon="" icon="mdi:exit-to-app"></iron-icon><span class="item-text">Log Out</span></paper-icon-item></paper-menu><div><template is="dom-if" if="[[supportPush]]"><div class="divider"></div><paper-item class="horizontal layout justified"><div class="setting">Push Notifications</div><paper-toggle-button on-change="handlePushChange" checked="{{pushToggleChecked}}"></paper-toggle-button></paper-item></template><div class="divider"></div><div class="subheader">Developer Tools</div><div class="dev-tools layout horizontal justified"><paper-icon-button icon="mdi:remote" data-panel="dev-service" alt="Services" title="Services" on-tap="menuClicked"></paper-icon-button><paper-icon-button icon="mdi:code-tags" data-panel="dev-state" alt="States" title="States" on-tap="menuClicked"></paper-icon-button><paper-icon-button icon="mdi:radio-tower" data-panel="dev-event" alt="Events" title="Events" on-tap="menuClicked"></paper-icon-button><paper-icon-button icon="mdi:file-xml" data-panel="dev-template" alt="Templates" title="Templates" on-tap="menuClicked"></paper-icon-button><paper-icon-button icon="mdi:information-outline" data-panel="dev-info" alt="Info" title="Info" on-tap="menuClicked"></paper-icon-button></div></div></template></dom-module><script>Polymer({is:"ha-sidebar",behaviors:[window.hassBehavior],properties:{hass:{type:Object},menuShown:{type:Boolean},menuSelected:{type:String},narrow:{type:Boolean},selected:{type:String,bindNuclear:function(t){return t.navigationGetters.activePanelName}},panels:{type:Array,bindNuclear:function(t){return[t.navigationGetters.panels,function(t){return t.toJS()}]}},supportPush:{type:Boolean,value:!1,bindNuclear:function(t){return t.pushNotificationGetters.isSupported}},pushToggleChecked:{type:Boolean,bindNuclear:function(t){return t.pushNotificationGetters.isActive}}},created:function(){this._boundUpdateStyles=this.updateStyles.bind(this)},computePanels:function(t){var e={map:1,logbook:2,history:3},n=[];return Object.keys(t).forEach(function(e){t[e].title&&n.push(t[e])}),n.sort(function(t,n){var i=t.component_name in e,o=n.component_name in e;return i&&o?e[t.component_name]-e[n.component_name]:i?-1:o?1:t.title>n.title?1:t.title<n.title?-1:0}),n},menuSelect:function(){this.debounce("updateStyles",this._boundUpdateStyles,1)},menuClicked:function(t){for(var e=t.target,n=5,i=e.getAttribute("data-panel");n&&!i;)e=e.parentElement,i=e.getAttribute("data-panel"),n--;n&&this.selectPanel(i)},toggleMenu:function(){this.fire("close-menu")},selectPanel:function(t){if(t!==this.selected){if("logout"===t)return void this.handleLogOut();this.hass.navigationActions.navigate.apply(null,t.split("/")),this.debounce("updateStyles",this._boundUpdateStyles,1)}},handlePushChange:function(t){t.target.checked?this.hass.pushNotificationActions.subscribePushNotifications().then(function(t){this.pushToggleChecked=t}.bind(this)):this.hass.pushNotificationActions.unsubscribePushNotifications().then(function(t){this.pushToggleChecked=!t}.bind(this))},handleLogOut:function(){this.hass.authActions.logOut()}})</script><dom-module id="home-assistant-main" assetpath="layouts/"><template><notification-manager hass="[[hass]]"></notification-manager><more-info-dialog hass="[[hass]]"></more-info-dialog><ha-voice-command-dialog hass="[[hass]]"></ha-voice-command-dialog><iron-media-query query="(max-width: 870px)" query-matches="{{narrow}}"></iron-media-query><paper-drawer-panel id="drawer" force-narrow="[[computeForceNarrow(narrow, showSidebar)]]" responsive-width="0" disable-swipe="[[isSelectedMap]]" disable-edge-swipe="[[isSelectedMap]]"><ha-sidebar drawer="" narrow="[[narrow]]" hass="[[hass]]"></ha-sidebar><iron-pages main="" attr-for-selected="id" fallback-selection="panel-resolver" selected="[[activePanel]]" selected-attribute="panel-visible"><partial-cards id="states" narrow="[[narrow]]" hass="[[hass]]" show-menu="[[showSidebar]]"></partial-cards><partial-panel-resolver id="panel-resolver" narrow="[[narrow]]" hass="[[hass]]" show-menu="[[showSidebar]]"></partial-panel-resolver></iron-pages></paper-drawer-panel></template></dom-module><script>Polymer({is:"home-assistant-main",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean,value:!0},activePanel:{type:String,bindNuclear:function(e){return e.navigationGetters.activePanelName},observer:"activePanelChanged"},showSidebar:{type:Boolean,value:!1,bindNuclear:function(e){return e.navigationGetters.showSidebar}}},listeners:{"open-menu":"openMenu","close-menu":"closeMenu"},openMenu:function(){this.narrow?this.$.drawer.openDrawer():this.hass.navigationActions.showSidebar(!0)},closeMenu:function(){this.$.drawer.closeDrawer(),this.showSidebar&&this.hass.navigationActions.showSidebar(!1)},activePanelChanged:function(){this.narrow&&this.$.drawer.closeDrawer()},attached:function(){window.removeInitMsg(),this.hass.startUrlSync()},computeForceNarrow:function(e,n){return e||!n},detached:function(){this.hass.stopUrlSync()}})</script></div><dom-module id="home-assistant"><template><template is="dom-if" if="[[loaded]]"><home-assistant-main hass="[[hass]]"></home-assistant-main></template><template is="dom-if" if="[[!loaded]]"><login-form hass="[[hass]]" force-show-loading="[[computeForceShowLoading(dataLoaded, iconsLoaded)]]"></login-form></template></template></dom-module><script>Polymer({is:"home-assistant",hostAttributes:{icons:null},behaviors:[window.hassBehavior],properties:{hass:{type:Object,value:window.hass},icons:{type:String},dataLoaded:{type:Boolean,bindNuclear:function(o){return o.syncGetters.isDataLoaded}},iconsLoaded:{type:Boolean,value:!1},loaded:{type:Boolean,computed:"computeLoaded(dataLoaded, iconsLoaded)"}},computeLoaded:function(o,t){return o&&t},computeForceShowLoading:function(o,t){return o&&!t},loadIcons:function(){var o=function(){this.iconsLoaded=!0}.bind(this);this.importHref("/static/mdi-"+this.icons+".html",o,function(){this.importHref("/static/mdi.html",o,o)})},ready:function(){this.loadIcons()}})</script></body></html>