home-assistant.io/source/demo/frontend.html
Paulus Schoutsen eef3f12d0d Update demo
2016-05-07 08:06:03 -07:00

21 lines
895 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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(){for(var e,t=window.Polymer||{},r=location.search.slice(1).split("&"),i=0;i<r.length&&(e=r[i]);i++)e=e.split("="),e[0]&&(t[e[0]]=e[1]||!0);return t.wantShadow="shadow"===t.dom,t.hasShadow=Boolean(Element.prototype.createShadowRoot),t.nativeShadow=t.hasShadow&&!window.ShadowDOMPolyfill,t.useShadow=t.wantShadow&&t.hasShadow,t.hasNativeImports=Boolean("import"in document.createElement("link")),t.useNativeImports=t.hasNativeImports,t.useNativeCustomElements=!window.CustomElements||window.CustomElements.useNative,t.useNativeShadow=t.useShadow&&t.nativeShadow,t.usePolyfillProto=!t.useNativeCustomElements&&!Object.__proto__,t}()},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])},_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(){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(e){e.__hasRegisterFinished!==e.is&&(e.__hasRegisterFinished=e.is,e._finishRegisterFeatures&&e._finishRegisterFeatures(),e._doBehavior("registered"))},attachedCallback:function(){var e=this;Polymer.RenderStatus.whenReady(function(){e.isAttached=!0,e._doBehavior("attached")})},detachedCallback:function(){this.isAttached=!1,this._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)},_log:console.log.apply.bind(console.log,console),_warn:console.warn.apply.bind(console.warn,console),_error:console.error.apply.bind(console.error,console),_logf:function(){return this._logPrefix.concat([this.is]).concat(Array.prototype.slice.call(arguments,0))}},Polymer.Base._logPrefix=function(){var e=window.chrome||/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];-1===t.indexOf(i)&&(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;r>t;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)},_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(r){}break;case Array:try{e=JSON.parse(e)}catch(r){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(t){return""}default:return null!=e?e:void 0}}}),Polymer.version="1.4.0",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;i>o&&(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;r>l;l++)a[l]=new Array(d),a[l][0]=l;for(var h=0;d>h;h++)a[0][h]=h;for(l=1;r>l;l++)for(h=1;d>h;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]=c>u?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=c>u?h>u?u:h:h>c?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);h>l;)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;o>i;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;o>s&&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;d>r&&(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;t>i;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,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;r>s&&(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;r>i&&(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){return e?(this.observer||(this.observer=this.node.localName===n?new o.DistributedNodesObserver(this):new o.EffectiveNodesObserver(this)),this.observer.addListener(e)):void 0},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;r>s&&(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;s>n&&(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;r>s&&(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(){return this._nodeNeedsDistribution(this.parentNode)?(this._lazyDistribute(this.parentNode),!0):void 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;i>o&&(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;r>s&&(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;r>s;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;n>i&&(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):!1},_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(0>e)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;e>t;t++){var o=this._callbacks[t];if(o)try{o()}catch(i){throw t++,this._callbacks.splice(0,t),this._lastVal+=t,this._twiddle.textContent=this._twiddleContent++,i}}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)},complete:function(){this.finish&&(this.stop(),this.callback.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+"?)",h="(\\[\\[|{{)\\s*",c="(?:]]|}})",u="(?:(!)\\s*)?",f=h+u+l+c;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],h=Boolean(t[2]),c=t[3].trim();"{"==l&&(a=c.indexOf("::"))>0&&(o=c.substring(a+2),c=c.substring(0,a),i=!0),r.push({compoundIndex:r.length,value:c,mode:l,negate:h,event:o,customEvent:i}),s=n.lastIndex}if(s&&s<e.length){var u=e.substring(s);u&&r.push({literal:u})}return r.length?r:void 0},_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),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++}},_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;f>u&&(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&&"#"===e[0])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.__urlResolver||(e.__urlResolver=e.createElement("a"))}var i,o,a=/(url\()([^)]*)(\))/g,l={"*":["href","src","style","url"],form:["action"]},h=/\{\{|\[\[/;Polymer.ResolveUrl={resolveCss:e,resolveAttrs:t,resolveUrl:r}}(),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=this._modelForPath(o.value)}}if(n.templateContent){this._processAnnotations(n.templateContent._notes);var l=n.templateContent._parentProps=this._discoverTemplateParentProps(n.templateContent._notes),h=[];for(var c in l)h.push({index:n.index,kind:"property",name:"_parent_"+c,parts:[{mode:"{",model:c,value:c}]});n.bindings=n.bindings.concat(h)}}},_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,h=s.parts;l<h.length&&(a=h[l]);l++)if(a.signature)for(var c=a.signature.args,u=0;u<c.length;u++){var f=c[u].model;f&&(n[f]=!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 h=s.name;i[h]=a,s.literal&&"property"==s.kind&&(t._configValue?t._configValue(h,s.literal):t[h]=s.literal)}}},_marshalIdNodes:function(){this.$={};for(var e,t=0,n=this._notes.length;n>t&&(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;n>t&&(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={},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=0;n<m.length;n++)t=m[n],e?document.addEventListener(t,P,!0):document.removeEventListener(t,P,!0)}function t(){if(!g){E.mouse.mouseIgnoreJob||e(!0);var t=function(){e(),E.mouse.target=null,E.mouse.mouseIgnoreJob=null};E.mouse.mouseIgnoreJob=Polymer.Debounce(E.mouse.mouseIgnoreJob,t,d)}}function n(e){var t=e.type;if(-1===m.indexOf(t))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,h="__polymerGestures",c="__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=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),P=function(e){if(e[c]={skip:!0},"click"===e.type){for(var t=Polymer.dom(e).path,n=0;n<t.length;n++)if(t[n]===E.mouse.target)return;e.preventDefault(),e.stopPropagation()}},E={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}},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 n,r=e.type,s=a(e.currentTarget),i=s[h];if(i){var o=i[r];if(o){if(!e[c]&&(e[c]={},"touch"===r.slice(0,5))){var u=e.changedTouches[0];if("touchstart"===r&&1===e.touches.length&&(E.touch.id=u.identifier),E.touch.id!==u.identifier)return;l||"touchstart"!==r&&"touchmove"!==r||C.handleTouchAction(e),"touchend"!==r||e.__polymerSimulatedTouch||(E.mouse.target=Polymer.dom(e).rootTarget,t(!0))}if(n=e[c],!n.skip){for(var f,p=C.recognizers,_=0;_<p.length;_++)f=p[_],o[f.name]&&!n[f.name]&&f.flow&&f.flow.start.indexOf(e.type)>-1&&f.reset&&f.reset();for(_=0,f;_<p.length;_++)f=p[_],o[f.name]&&!n[f.name]&&(n[f.name]=!0,f[r](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[h];o||(e[h]=o={});for(var l,c,u=0;u<s.length;u++)l=s[u],g&&m.indexOf(l)>-1||(c=o[l],c||(o[l]=c={_count:0}),0===c._count&&e.addEventListener(l,this.handleNative),c[i]=(c[i]||0)+1,c._count=(c._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[h];if(o)for(var l,c,u=0;u<s.length;u++)l=s[u],c=o[l],c&&c[i]&&(c[i]=(c[i]||1)-1,c._count=(c._count||1)-1,0===c._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.sourceEvent;s&&s.preventDefault&&s.preventDefault()}},prevent:function(e){var t=this.findRecognizerByEvent(e);t.info&&(t.info.prevent=!0)}};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])},touchend:function(e){this.fire("up",C.findOriginalTarget(e),e.changedTouches[0])},fire:function(e,t,n){C.fire(t,e,{x:n.clientX,y:n.clientY,sourceEvent:n,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))},fire:function(e,t){var n,r=this.info.moves[this.info.moves.length-2],s=this.info.moves[this.info.moves.length-1],i=s.x-this.info.x,o=s.y-this.info.y,a=0;return r&&(n=s.x-r.x,a=s.y-r.y),C.fire(e,"track",{state:this.info.state,x:t.clientX,y:t.clientY,dx:i,dy:o,ddx:n,ddy:a,sourceEvent:t,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])},touchend:function(e){this.forward(e.changedTouches[0])},forward:function(e){var t=Math.abs(e.clientX-this.info.x),n=Math.abs(e.clientY-this.info.y),s=C.findOriginalTarget(e);(isNaN(t)||isNaN(n)||f>=t&&f>=n||r(e))&&(this.info.prevent||C.fire(s,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e}))}});var S={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,S[e]||"auto")}}),Polymer.Gestures=C}(),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?!0: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,r=Boolean(r),r&&s.setAttribute("async","");var i=this;return t&&(s.onload=function(e){return t.call(i,e)}),n&&(s.onerror=function(e){return n.call(i,e)}),document.head.appendChild(s),s},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.Bind={_dataEventCache:{},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:!0})},_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},_effectEffects:function(e,t,n,r,s){for(var i,o=0,a=n.length;a>o&&(i=n[o]);o++)i.fn.call(this,e,t,i.effect,r,s)},_clearPath:function(e){for(var t in this.__data__)0===t.indexOf(e+".")&&(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,this._isStructured(r),i),a=s||Polymer.CaseMap.camelToDashCase(n)+"-changed";e._bindListeners.push({index:t,property:n,path:r,changedFn:o,event:a})},_isStructured:function(e){return e.indexOf(".")>0},_isEventBogus:function(e,t){return e.path&&e.path[0]!==t},_notedListenerFactory:function(e,t,n,r){return function(s,i,o){o?this._notifyPath(this._fixPath(t,e,o),i):(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;s>r&&(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);var r=n.negate?!t:t;return n.customEvent&&this._nodes[n.index][n.name]===r?void 0:this._applyEffectValue(n,r)},_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);n.negate&&(o=!o),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;l>a;a++){var h,c=i[a],u=c.name;if(h=c.literal?c.value:c.structured?Polymer.Base._get(u,e):e[u],o&&void 0===h)return;if(c.wildcard){var f=0===u.indexOf(n+"."),p=0===t.trigger.name.indexOf(u)&&!f;s[a]={path:p?n:u,value:p?r:h,base:h}}else s[a]=h}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"&&"9">=r&&(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=this._modelForPath(t),n.structured=t.indexOf(".")>0,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(e.isCompound){var s=n.__compoundStorage__[r];s[e.compoundIndex]=t,t=s.join("")}if("attribute"==e.kind)this.serializeValueToAttribute(t,r,n);else{"className"===r&&(t=this._scopeElementClass(n,t)),("textContent"===r||"input"==n.localName&&"value"==r)&&(t=void 0==t?"":t);var i;n._propertyInfo&&(i=n._propertyInfo[r])&&i.readOnly||this.__setProperty(r,t,!1,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._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)},_configureProperties:function(t,n){for(var r in t){var s=t[r];if(!e&&this.hasOwnProperty(r)&&this._propertyEffects&&this._propertyEffects[r])n[r]=this[r],delete this[r];else if(void 0!==s.value){var i=s.value;"function"==typeof i&&(i=i.call(this,this._config)),n[r]=i}}},_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;o>i&&(s=r[i]);i++)if("annotation"===s.kind&&!s.isCompound){var a=this._nodes[s.effect.index],l=s.effect.propertyName,h="attribute"==s.effect.kind,c=a._propertyEffects&&a._propertyEffects[l];if(a._configValue&&(c||!h)){var u=n===s.effect.value?e[n]:this._get(s.effect.value,e);h&&(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;r>n&&(e=t[n]);n++)e[0].call(this,e[1],e[2],e[3]);this._handlers=[]}})}(),function(){"use strict";Polymer.Base._addFeature({notifyPath:function(e,t,n){var r={};this._get(e,this,r),r.path&&this._notifyPath(r.path,t,n)},_notifyPath:function(e,t,n){var r=this._propertySetter(e,t);return r===t||r!==r&&t!==t?void 0:(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 h,c,u=Polymer.Collection.get(r);"#"==o[0]?(c=o,h=u.getItem(c),o=r.indexOf(h),u.setItem(c,t)):parseInt(o,10)==o&&(h=s[o],c=u.getKey(h),i[a]=c,u.setItem(c,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(e,t){var n=this._modelForPath(e),r=this._propertyEffects&&this._propertyEffects[n];if(r)for(var s,i=0;i<r.length&&(s=r[i]);i++){var o=s.pathFn;o&&o.call(this,e,t,s.effect)}this._boundPaths&&this._notifyBoundPaths(e,t)},_annotationPathEffect:function(e,t,n){if(n.value===e||0===n.value.indexOf(e+"."))Polymer.Bind._annotationEffect.call(this,e,t,n);else if(0===e.indexOf(n.value+".")&&!n.negate){var r=this._nodes[n.index];if(r&&r._notifyPath){var s=this._fixPath(n.name,n.value,e);r._notifyPath(s,t,!0)}}},_complexObserverPathEffect:function(e,t,n){this._pathMatchesEffect(e,n)&&Polymer.Bind._complexObserverEffect.call(this,e,t,n)},_computePathEffect:function(e,t,n){this._pathMatchesEffect(e,n)&&Polymer.Bind._computeEffect.call(this,e,t,n)},_annotatedComputationPathEffect:function(e,t,n){this._pathMatchesEffect(e,n)&&Polymer.Bind._annotatedComputationEffect.call(this,e,t,n)},_pathMatchesEffect:function(e,t){var n=t.trigger.name;return n==e||0===n.indexOf(e+".")||t.trigger.wildcard&&0===e.indexOf(n)},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(e,t){for(var n in this._boundPaths){var r=this._boundPaths[n];0==e.indexOf(n+".")?this._notifyPath(this._fixPath(r,n,e),t):0==e.indexOf(r+".")&&this._notifyPath(this._fixPath(n,r,e),t)}},_fixPath:function(e,t,n){return e+n.slice(t.length)},_notifyPathUp:function(e,t){var n=this._modelForPath(e),r=Polymer.CaseMap.camelToDashCase(n),s=r+this._EVENT_CHANGED;this.fire(s,{path:e,value:t},{bubbles:!1,_useCache:!0})},_modelForPath:function(e){var t=e.indexOf(".");return 0>t?e:e.slice(0,t)},_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};e.hasOwnProperty("splices")||Object.defineProperty(e,"splices",{configurable:!0,writable:!0}),e.splices=r,this._notifyPath(t+".splices",r),this._notifyPath(t+".length",e.length),r.keySplices=null,r.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=0>t?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,_modelForPath:Polymer.Base._modelForPath,_pathMatchesEffect:Polymer.Base._pathMatchesEffect,_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;s>r;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;l>a&&(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||!t&&this._hasMixinRules(s))r=t?e.cssText:this.removeCustomProps(e.cssText),r=r.trim(),r&&(r=" "+r+"\n");else for(var i,o=0,a=s.length;a>o&&(i=s[o]);o++)r=this.stringify(i,t,r)}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(){return{MODULE_STYLES_SELECTOR:"style, link[rel=import][type~=css], template",INCLUDE_ATTR:"include",toCssText:function(e,t,n){return"string"==typeof e&&(e=this.parser.parse(e)),t&&this.forEachRule(e,t),this.parser.stringify(e,n)},forRulesInStyles:function(e,t,n){if(e)for(var r,s=0,i=e.length;i>s&&(r=e[s]);s++)this.forEachRule(this.rulesForStyle(r),t,n)},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},forEachRule:function(e,t,n){if(e){var r=!1;e.type===this.ruleTypes.STYLE_RULE?t(e):n&&e.type===this.ruleTypes.KEYFRAMES_RULE?n(e):e.type===this.ruleTypes.MIXIN_RULE&&(r=!0);var s=e.rules;if(s&&!r)for(var i,o=0,a=s.length;a>o&&(i=s[o]);o++)this.forEachRule(i,t,n)}},applyCss:function(e,t,n,r){var s=this.createScopeStyle(e,t);n=n||document.head;var i=r&&r.nextSibling||n.firstChild;return this.__lastHeadApplyNode=s,n.insertBefore(s,i)},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)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},resolveCss:Polymer.ResolveUrl.resolveCss,parser:Polymer.CssParse,ruleTypes:Polymer.CssParse.types}}(),Polymer.StyleTransformer=function(){var e=Polymer.Settings.useNativeShadow,t=Polymer.StyleUtil,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(v);s?i&&e.setAttribute(v,i.replace(r,"").replace(t,"")):e.setAttribute(v,(i?i+" ":"")+r+" "+t)}},elementStyles:function(n,r){for(var s,i=n._styles,o="",a=0,l=i.length;l>a&&(s=i[a]);a++){var h=t.rulesForStyle(s);o+=e?t.toCssText(h,r):this.css(h,n.is,n["extends"],r,n._scopeCssViaAttr)+"\n\n"}return o.trim()},css:function(e,n,r,s,i){var o=this._calcHostScope(n,r);n=this._calcElementScope(n,i);var a=this;return t.toCssText(e,function(e){e.isScoped||(a.rule(e,n,o),e.isScoped=!0),s&&s(e,n,o)})},_calcElementScope:function(e,t){return e?t?d+e+m:_+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,n,r,s){var o=e.selector.split(i);if(!t.isKeyframesSelector(e))for(var a,l=0,h=o.length;h>l&&(a=o[l]);l++)o[l]=n.call(this,a,r,s);e.selector=e.transformedSelector=o.join(i)},_transformComplexSelector:function(e,t,n){var r=!1,s=!1,l=this;return e=e.replace(g,a+" $1"),e=e.replace(o,function(e,i,o){if(r)o=o.replace(p," ");else{var a=l._transformCompoundSelector(o,i,t,n);r=r||a.stop,s=s||a.hostContext,i=a.combinator,o=a.value}return i+o}),s&&(e=e.replace(u,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(p),i=!1;e.indexOf(c)>=0?i=!0:e.indexOf(a)>=0?(e=e.replace(h,function(e,t,n){return r+n}),e=e.replace(a,r)):0!==s&&(e=n?this._transformSimpleSelector(e,n):e),e.indexOf(f)>=0&&(t="");var o;return s>=0&&(e=e.replace(p," "),o=!0),{value:e,combinator:t,stop:o,hostContext:i}},_transformSimpleSelector:function(e,t){var n=e.split(y);return n[0]+=t,n.join(y)},documentRule:function(t){t.selector=t.parsedSelector,this.normalizeRootSelector(t),e||this._transformRule(t,this._transformDocumentSelector)},normalizeRootSelector:function(e){e.selector===l&&(e.selector="body")},_transformDocumentSelector:function(e){return e.match(p)?this._transformComplexSelector(e,s):this._transformSimpleSelector(e.trim(),s)},SCOPE_NAME:"style-scope"},r=n.SCOPE_NAME,s=":not(["+r+"]):not(."+r+")",i=",",o=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,a=":host",l=":root",h=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g,c=":host-context",u=/(.*)(?::host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/,f="::content",p=/::content|::shadow|\/deep\//,_=".",d="["+r+"~=",m="]",y=":",v="class",g=new RegExp("^("+f+")");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:/%[^,]*$/}}}(),function(){var e=Polymer.Base._prepElement,t=Polymer.Settings.useNativeShadow,n=Polymer.StyleUtil,r=Polymer.StyleTransformer,s=Polymer.StyleExtends;Polymer.Base._addFeature({_prepElement:function(t){this._encapsulateStyle&&r.element(t,this.is,this._scopeCssViaAttr),e.call(this,t)},_prepStyles:function(){t||(this._scopeStyle=n.applyStylePlaceHolder(this.is))},_prepShimStyles:function(){if(this._template){void 0===this._encapsulateStyle&&(this._encapsulateStyle=!t),this._styles=this._collectStyles();var e=r.elementStyles(this);this._prepStyleProperties(),!this._needsStyleProperties()&&this._styles.length&&n.applyCss(e,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;a>o&&(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 h=document.createElement("style");h.textContent=t,s.hasExtends(h.textContent)&&(t=s.transform(h)),e.push(h)}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.Settings.useNativeShadow,n=Polymer.DomApi.matchesSelector,r=Polymer.StyleUtil,s=Polymer.StyleTransformer;return{decorateStyles:function(e){var t=this,n={},s=[];r.forRulesInStyles(e,function(e){t.decorateRule(e),t.collectPropertiesInCssText(e.propertyInfo.cssText,n)},function(e){s.push(e)}),e._keyframes=s;var i=[];for(var o in n)i.push(o);return i},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=this.rx.VAR_ASSIGN,o=e.parsedCssText;r=i.exec(o);)t[r[1]]=(r[2]||r[3]).trim(),s=!0;return s}return n.properties?(Polymer.Base.mixin(t,n.properties),!0):void 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_CAPTURE.exec(e);){t[n[1]]=!0;var r=n[2];r&&r.match(this.rx.IS_VAR)&&(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 n=this,r=function(e,r,s,i){var o=n.valueForProperty(t[s],t)||(t[i]?n.valueForProperty(t[i],t):i);return r+(o||"")};e=e.replace(this.rx.VAR_MATCH,r)}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(r=n.match(this.rx.MIXIN_MATCH))n=this.valueForProperty(t[r[1]],t);else{var o=n.indexOf(":");if(-1!==o){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(t,s){var i={},o=this,a=[],l=0;return r.forRulesInStyles(t,function(t){t.propertyInfo||o.decorateRule(t),s&&t.propertyInfo.properties&&n.call(s,t.transformedSelector||t.parsedSelector)&&(o.collectProperties(t,i),e(l,a)),l++}),{properties:i,key:a}},scopePropertiesFromStyles:function(e){return e._scopeStyleProperties||(e._scopeStyleProperties=this.selectedPropertiesFromStyles(e,this.SCOPE_SELECTORS)),e._scopeStyleProperties},hostPropertiesFromStyles:function(e){return e._hostStyleProperties||(e._hostStyleProperties=this.selectedPropertiesFromStyles(e,this.HOST_SELECTORS)),e._hostStyleProperties},selectedPropertiesFromStyles:function(e,t){var n={},s=this;return r.forRulesInStyles(e,function(e){e.propertyInfo||s.decorateRule(e);for(var r=0;r<t.length;r++)if(e.parsedSelector===t[r])return void s.collectProperties(e,n)}),n},transformStyles:function(e,n,r){var i=this,o=s._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),h=this._elementKeyframeTransforms(e,r);return s.elementStyles(e,function(s){i.applyProperties(s,n),t||Polymer.StyleUtil.isKeyframesSelector(s)||!s.cssText||(i.applyKeyframeTransforms(s,h),i._scopeSelector(s,l,o,e._scopeCssViaAttr,r))})},_elementKeyframeTransforms:function(e,n){var r=e._styles._keyframes,s={};if(!t&&r)for(var i=0,o=r[i];i<r.length;o=r[++i])this._scopeKeyframes(o,n),s[o.keyframesName]=this._keyframesRuleTransformer(o);return s},_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,r,i){e.transformedSelector=e.transformedSelector||e.selector;for(var o,a=e.transformedSelector,l=r?"["+s.SCOPE_NAME+"~="+i+"]":"."+i,h=a.split(","),c=0,u=h.length;u>c&&(o=h[c]);c++)h[c]=o.match(t)?o.replace(n,l):l+" "+o;e.selector=h.join(",")},applyElementScopeSelector:function(e,t,n,r){var i=r?e.getAttribute(s.SCOPE_NAME):e.getAttribute("class")||"",o=n?i.replace(n,t):(i?i+" ":"")+this.XSCOPE_NAME+" "+t;i!==o&&(r?e.setAttribute(s.SCOPE_NAME,o):e.setAttribute("class",o))},applyElementStyle:function(e,n,s,i){var o=i?i.textContent||"":this.transformStyles(e,n,s),a=e._customStyle;return a&&!t&&a!==i&&(a._useCount--,a._useCount<=0&&a.parentNode&&a.parentNode.removeChild(a)),!t&&i&&i.parentNode||(t&&e._customStyle?(e._customStyle.textContent=o,i=e._customStyle):o&&(i=r.applyCss(o,s,t?e.root:null,e._scopeStyle))),i&&(i._useCount=i._useCount||0,e._customStyle!=i&&i._useCount++,e._customStyle=i),i},mixinCustomStyle:function(e,t){var n;for(var r in t)n=t[r],(n||0===n)&&(e[r]=n)},rx:{VAR_ASSIGN:/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,MIXIN_MATCH:/(?:^|\W+)@apply[\s]*\(([^)]*)\)/i,VAR_MATCH:/(^|\W+)var\([\s]*([^,)]*)[\s]*,?[\s]*((?:[^,()]*)|(?:[^;()]*\([^;)]*\)))[\s]*?\)/gi,VAR_CAPTURE:/\([\s]*(--[^,\s)]*)(?:,[\s]*(--[^,\s)]*))?(?:\)|,)/gi,ANIMATION_MATCH:/(animation\s*:)|(animation-name\s*:)/,IS_VAR:/^--/,BRACKETED:/\{[^}]*\}/g,HOST_PREFIX:"(?:^|[^.#[:])",HOST_SUFFIX:"($|[.:[\\s>+~])"},HOST_SELECTORS:[":host"],SCOPE_SELECTORS:[":root"],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:!0},_objectsStrictlyEqual:function(e,t){return this._objectsEqual(e,t)&&this._objectsEqual(t,e)}}}(),Polymer.StyleDefaults=function(){var e=Polymer.StyleProperties,t=Polymer.StyleCache,n={_styles:[],_properties:null,customStyle:{},_styleCache:new t,addStyle:function(e){this._styles.push(e),this._properties=null},get _styleProperties(){return this._properties||(e.decorateStyles(this._styles),this._styles._scopeStyleProperties=null,this._properties=e.scopePropertiesFromStyles(this._styles),e.mixinCustomStyle(this._properties,this.customStyle),e.reify(this._properties)),this._properties},_needsStyleProperties:function(){},_computeStyleProperties:function(){return this._styleProperties},updateStyles:function(e){this._properties=null,e&&Polymer.Base.mixin(this.customStyle,e),this._styleCache.clear();for(var t,n=0;n<this._styles.length;n++)t=this._styles[n],t=t.__importElement||t,t._apply()}};return n}(),function(){"use strict";var e=Polymer.Base.serializeValueToAttribute,t=Polymer.StyleProperties,n=Polymer.StyleTransformer,r=Polymer.StyleDefaults,s=Polymer.Settings.useNativeShadow;Polymer.Base._addFeature({_prepStyleProperties:function(){this._ownStylePropertyNames=this._styles&&this._styles.length?t.decorateStyles(this._styles):null},customStyle:null,getComputedStyleValue:function(e){return 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(this._ownStylePropertyNames&&this._ownStylePropertyNames.length)},_beforeAttached:function(){!this._scopeSelector&&this._needsStyleProperties()&&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._styleCache||(n._styleCache=new Polymer.StyleCache);var r=t.propertyDataFromStyles(n._styles,this);r.key.customStyle=this.customStyle,e=n._styleCache.retrieve(this.is,r.key,this._styles);var o=Boolean(e);o?this._styleProperties=e._styleProperties:this._computeStyleProperties(r.properties),this._computeOwnStyleProperties(),o||(e=i.retrieve(this.is,this._ownStyleProperties,this._styles));var a=Boolean(e)&&!o,l=this._applyStyleProperties(e);o||(l=l&&s?l.cloneNode(!0):l,e={style:l,_scopeSelector:this._scopeSelector,_styleProperties:this._styleProperties},r.key.customStyle={},this.mixin(r.key.customStyle,this.customStyle),n._styleCache.store(this.is,e,r.key,this._styles),a||i.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);this.mixin(r,t.hostPropertiesFromStyles(this._styles)),e=e||t.propertyDataFromStyles(n._styles,this).properties,this.mixin(r,e),this.mixin(r,t.scopePropertiesFromStyles(this._styles)),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+" ":"")+o+" "+this.is+(e._scopeSelector?" "+a+" "+e._scopeSelector:"")),t},updateStyles:function(e){this.isAttached&&(e&&this.mixin(this.customStyle,e),this._needsStyleProperties()?this._updateStyleProperties():this._styleProperties=null,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;s>r&&(t=n[r]);r++)t.updateStyles&&t.updateStyles()}}),Polymer.updateStyles=function(e){r.updateStyles(e),Polymer.Base._updateRootStyles(document)};var i=new Polymer.StyleCache;Polymer.customStyleCache=i;var o=n.SCOPE_NAME,a=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._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=Polymer.StyleProperties,t=Polymer.StyleUtil,n=Polymer.CssParse,r=Polymer.StyleDefaults,s=Polymer.StyleTransformer;Polymer({is:"custom-style","extends":"style",_template:null,properties:{include:String},ready:function(){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||this;if(r.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})}}},_apply:function(e){var n=this.__appliedElement||this;if(this.include&&(n.textContent=t.cssFromModules(this.include,!0)+n.textContent),n.textContent){t.forEachRule(t.rulesForStyle(n),function(e){s.documentRule(e)});var r=this,i=function(){r._applyCustomProperties(n)};this._pendingApplyProperties&&(cancelAnimationFrame(this._pendingApplyProperties),this._pendingApplyProperties=null),e?this._pendingApplyProperties=requestAnimationFrame(i):i()}},_applyCustomProperties:function(r){this._computeStyleProperties();var s=this._styleProperties,i=t.rulesForStyle(r);r.textContent=t.toCssText(i,function(t){var r=t.cssText=t.parsedCssText;t.propertyInfo&&t.propertyInfo.cssText&&(r=n.removeCustomPropAssignment(r),t.cssText=e.valueForProperties(r,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=e.indexOf("."),s=0>r?e:e.slice(0,r);n._forwardInstancePath.call(n,this,e,t),s 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=this._modelForPath(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):void 0},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;return t=e&&"object"==typeof e?this.omap.get(e):this.pmap[e],void 0!=t?"#"+t:void 0},getKeys:function(){return Object.keys(this.store).map(function(e){return"#"+e})},_parseKey:function(e){return e&&"#"==e[0]?e.slice(1):void 0},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){return(e=this._parseKey(e))?this.store[e]:void 0},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)-1===s[t]&&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 h=a[i];void 0!==h&&this._detachAndRemoveInstance(h)}var c=this;if(l.length){this._filterFn&&(l=l.filter(function(e){return c._filterFn(r.getItem(e))})),l.sort(function(e,t){return c._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;s>=e;){var o=e+s>>1,a=this._instances[o].__key__,l=this._sortFn(n.getItem(a),r);if(0>l)e=o+1;else{if(!(l>0)){i=o;break}s=o-1}}return 0>i&&(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]._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,0>n?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[e]=t)},_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},_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><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><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><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({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24}},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);if(n){var o=Polymer.dom(e);return o.insertBefore(n,o.childNodes[0]),e._svgIcon=n}return null},removeIcon:function(e){e._svgIcon&&(Polymer.dom(e).removeChild(e._svgIcon),e._svgIcon=null)},_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){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size)},_prepareSvgClone:function(e,t){if(e){var n=e.cloneNode(!0),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),i=n.getAttribute("viewBox")||"0 0 "+t+" "+t;return o.setAttribute("viewBox",i),o.setAttribute("preserveAspectRatio","xMidYMid meet"),o.style.cssText="pointer-events: none; display: block; width: 100%; height: 100%;",o.appendChild(n).removeAttribute("id"),o}return null}})</script><style is="custom-style">:root{--google-red-100:#f4c7c3;--google-red-300:#e67c73;--google-red-500:#db4437;--google-red-700:#c53929;--google-blue-100:#c6dafc;--google-blue-300:#7baaf7;--google-blue-500:#4285f4;--google-blue-700:#3367d6;--google-green-100:#b7e1cd;--google-green-300:#57bb8a;--google-green-500:#0f9d58;--google-green-700:#0b8043;--google-yellow-100:#fce8b2;--google-yellow-300:#f7cb4d;--google-yellow-500:#f4b400;--google-yellow-700:#f09300;--google-grey-100:#f5f5f5;--google-grey-300:#e0e0e0;--google-grey-500:#9e9e9e;--google-grey-700:#616161;--paper-red-50:#ffebee;--paper-red-100:#ffcdd2;--paper-red-200:#ef9a9a;--paper-red-300:#e57373;--paper-red-400:#ef5350;--paper-red-500:#f44336;--paper-red-600:#e53935;--paper-red-700:#d32f2f;--paper-red-800:#c62828;--paper-red-900:#b71c1c;--paper-red-a100:#ff8a80;--paper-red-a200:#ff5252;--paper-red-a400:#ff1744;--paper-red-a700:#d50000;--paper-pink-50:#fce4ec;--paper-pink-100:#f8bbd0;--paper-pink-200:#f48fb1;--paper-pink-300:#f06292;--paper-pink-400:#ec407a;--paper-pink-500:#e91e63;--paper-pink-600:#d81b60;--paper-pink-700:#c2185b;--paper-pink-800:#ad1457;--paper-pink-900:#880e4f;--paper-pink-a100:#ff80ab;--paper-pink-a200:#ff4081;--paper-pink-a400:#f50057;--paper-pink-a700:#c51162;--paper-purple-50:#f3e5f5;--paper-purple-100:#e1bee7;--paper-purple-200:#ce93d8;--paper-purple-300:#ba68c8;--paper-purple-400:#ab47bc;--paper-purple-500:#9c27b0;--paper-purple-600:#8e24aa;--paper-purple-700:#7b1fa2;--paper-purple-800:#6a1b9a;--paper-purple-900:#4a148c;--paper-purple-a100:#ea80fc;--paper-purple-a200:#e040fb;--paper-purple-a400:#d500f9;--paper-purple-a700:#aa00ff;--paper-deep-purple-50:#ede7f6;--paper-deep-purple-100:#d1c4e9;--paper-deep-purple-200:#b39ddb;--paper-deep-purple-300:#9575cd;--paper-deep-purple-400:#7e57c2;--paper-deep-purple-500:#673ab7;--paper-deep-purple-600:#5e35b1;--paper-deep-purple-700:#512da8;--paper-deep-purple-800:#4527a0;--paper-deep-purple-900:#311b92;--paper-deep-purple-a100:#b388ff;--paper-deep-purple-a200:#7c4dff;--paper-deep-purple-a400:#651fff;--paper-deep-purple-a700:#6200ea;--paper-indigo-50:#e8eaf6;--paper-indigo-100:#c5cae9;--paper-indigo-200:#9fa8da;--paper-indigo-300:#7986cb;--paper-indigo-400:#5c6bc0;--paper-indigo-500:#3f51b5;--paper-indigo-600:#3949ab;--paper-indigo-700:#303f9f;--paper-indigo-800:#283593;--paper-indigo-900:#1a237e;--paper-indigo-a100:#8c9eff;--paper-indigo-a200:#536dfe;--paper-indigo-a400:#3d5afe;--paper-indigo-a700:#304ffe;--paper-blue-50:#e3f2fd;--paper-blue-100:#bbdefb;--paper-blue-200:#90caf9;--paper-blue-300:#64b5f6;--paper-blue-400:#42a5f5;--paper-blue-500:#2196f3;--paper-blue-600:#1e88e5;--paper-blue-700:#1976d2;--paper-blue-800:#1565c0;--paper-blue-900:#0d47a1;--paper-blue-a100:#82b1ff;--paper-blue-a200:#448aff;--paper-blue-a400:#2979ff;--paper-blue-a700:#2962ff;--paper-light-blue-50:#e1f5fe;--paper-light-blue-100:#b3e5fc;--paper-light-blue-200:#81d4fa;--paper-light-blue-300:#4fc3f7;--paper-light-blue-400:#29b6f6;--paper-light-blue-500:#03a9f4;--paper-light-blue-600:#039be5;--paper-light-blue-700:#0288d1;--paper-light-blue-800:#0277bd;--paper-light-blue-900:#01579b;--paper-light-blue-a100:#80d8ff;--paper-light-blue-a200:#40c4ff;--paper-light-blue-a400:#00b0ff;--paper-light-blue-a700:#0091ea;--paper-cyan-50:#e0f7fa;--paper-cyan-100:#b2ebf2;--paper-cyan-200:#80deea;--paper-cyan-300:#4dd0e1;--paper-cyan-400:#26c6da;--paper-cyan-500:#00bcd4;--paper-cyan-600:#00acc1;--paper-cyan-700:#0097a7;--paper-cyan-800:#00838f;--paper-cyan-900:#006064;--paper-cyan-a100:#84ffff;--paper-cyan-a200:#18ffff;--paper-cyan-a400:#00e5ff;--paper-cyan-a700:#00b8d4;--paper-teal-50:#e0f2f1;--paper-teal-100:#b2dfdb;--paper-teal-200:#80cbc4;--paper-teal-300:#4db6ac;--paper-teal-400:#26a69a;--paper-teal-500:#009688;--paper-teal-600:#00897b;--paper-teal-700:#00796b;--paper-teal-800:#00695c;--paper-teal-900:#004d40;--paper-teal-a100:#a7ffeb;--paper-teal-a200:#64ffda;--paper-teal-a400:#1de9b6;--paper-teal-a700:#00bfa5;--paper-green-50:#e8f5e9;--paper-green-100:#c8e6c9;--paper-green-200:#a5d6a7;--paper-green-300:#81c784;--paper-green-400:#66bb6a;--paper-green-500:#4caf50;--paper-green-600:#43a047;--paper-green-700:#388e3c;--paper-green-800:#2e7d32;--paper-green-900:#1b5e20;--paper-green-a100:#b9f6ca;--paper-green-a200:#69f0ae;--paper-green-a400:#00e676;--paper-green-a700:#00c853;--paper-light-green-50:#f1f8e9;--paper-light-green-100:#dcedc8;--paper-light-green-200:#c5e1a5;--paper-light-green-300:#aed581;--paper-light-green-400:#9ccc65;--paper-light-green-500:#8bc34a;--paper-light-green-600:#7cb342;--paper-light-green-700:#689f38;--paper-light-green-800:#558b2f;--paper-light-green-900:#33691e;--paper-light-green-a100:#ccff90;--paper-light-green-a200:#b2ff59;--paper-light-green-a400:#76ff03;--paper-light-green-a700:#64dd17;--paper-lime-50:#f9fbe7;--paper-lime-100:#f0f4c3;--paper-lime-200:#e6ee9c;--paper-lime-300:#dce775;--paper-lime-400:#d4e157;--paper-lime-500:#cddc39;--paper-lime-600:#c0ca33;--paper-lime-700:#afb42b;--paper-lime-800:#9e9d24;--paper-lime-900:#827717;--paper-lime-a100:#f4ff81;--paper-lime-a200:#eeff41;--paper-lime-a400:#c6ff00;--paper-lime-a700:#aeea00;--paper-yellow-50:#fffde7;--paper-yellow-100:#fff9c4;--paper-yellow-200:#fff59d;--paper-yellow-300:#fff176;--paper-yellow-400:#ffee58;--paper-yellow-500:#ffeb3b;--paper-yellow-600:#fdd835;--paper-yellow-700:#fbc02d;--paper-yellow-800:#f9a825;--paper-yellow-900:#f57f17;--paper-yellow-a100:#ffff8d;--paper-yellow-a200:#ffff00;--paper-yellow-a400:#ffea00;--paper-yellow-a700:#ffd600;--paper-amber-50:#fff8e1;--paper-amber-100:#ffecb3;--paper-amber-200:#ffe082;--paper-amber-300:#ffd54f;--paper-amber-400:#ffca28;--paper-amber-500:#ffc107;--paper-amber-600:#ffb300;--paper-amber-700:#ffa000;--paper-amber-800:#ff8f00;--paper-amber-900:#ff6f00;--paper-amber-a100:#ffe57f;--paper-amber-a200:#ffd740;--paper-amber-a400:#ffc400;--paper-amber-a700:#ffab00;--paper-orange-50:#fff3e0;--paper-orange-100:#ffe0b2;--paper-orange-200:#ffcc80;--paper-orange-300:#ffb74d;--paper-orange-400:#ffa726;--paper-orange-500:#ff9800;--paper-orange-600:#fb8c00;--paper-orange-700:#f57c00;--paper-orange-800:#ef6c00;--paper-orange-900:#e65100;--paper-orange-a100:#ffd180;--paper-orange-a200:#ffab40;--paper-orange-a400:#ff9100;--paper-orange-a700:#ff6500;--paper-deep-orange-50:#fbe9e7;--paper-deep-orange-100:#ffccbc;--paper-deep-orange-200:#ffab91;--paper-deep-orange-300:#ff8a65;--paper-deep-orange-400:#ff7043;--paper-deep-orange-500:#ff5722;--paper-deep-orange-600:#f4511e;--paper-deep-orange-700:#e64a19;--paper-deep-orange-800:#d84315;--paper-deep-orange-900:#bf360c;--paper-deep-orange-a100:#ff9e80;--paper-deep-orange-a200:#ff6e40;--paper-deep-orange-a400:#ff3d00;--paper-deep-orange-a700:#dd2c00;--paper-brown-50:#efebe9;--paper-brown-100:#d7ccc8;--paper-brown-200:#bcaaa4;--paper-brown-300:#a1887f;--paper-brown-400:#8d6e63;--paper-brown-500:#795548;--paper-brown-600:#6d4c41;--paper-brown-700:#5d4037;--paper-brown-800:#4e342e;--paper-brown-900:#3e2723;--paper-grey-50:#fafafa;--paper-grey-100:#f5f5f5;--paper-grey-200:#eeeeee;--paper-grey-300:#e0e0e0;--paper-grey-400:#bdbdbd;--paper-grey-500:#9e9e9e;--paper-grey-600:#757575;--paper-grey-700:#616161;--paper-grey-800:#424242;--paper-grey-900:#212121;--paper-blue-grey-50:#eceff1;--paper-blue-grey-100:#cfd8dc;--paper-blue-grey-200:#b0bec5;--paper-blue-grey-300:#90a4ae;--paper-blue-grey-400:#78909c;--paper-blue-grey-500:#607d8b;--paper-blue-grey-600:#546e7a;--paper-blue-grey-700:#455a64;--paper-blue-grey-800:#37474f;--paper-blue-grey-900:#263238;--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><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>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):!0},__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.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&&90>=e?String.fromCharCode(32+e):e>=112&&123>=e?"f"+(e-112):e>=48&&57>=e?String(e-48):e>=96&&105>=e?String(e-96):d[e]),t}function i(i,r){return e(i.key,r)||t(i.keyIdentifier)||n(i.keyCode)||e(i.detail.key,r)||""}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-1===e.indexOf(this.keyBindings)&&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(){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){e.target===this?this._setFocused("focus"===e.type):this.shadowRoot||this.isLightDescendant(Polymer.dom(e).localTarget)||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(){var t,i=Polymer.dom(this).getOwnerRoot();return t=11==this.parentNode.nodeType?i.host:this.parentNode},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){this.keyEventTarget=this.target,this.listen(this.target,"up","uiUpAction"),this.listen(this.target,"down","uiDownAction")},detached:function(){this.unlisten(this.target,"up","uiUpAction"),this.unlisten(this.target,"down","uiDownAction")},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.animate()}},uiUpAction:function(t){this.noink||this.upAction(t)},upAction:function(t){this.holdDown||(this.ripples.forEach(function(i){i.upAction(t)}),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);0>i||(this.ripples.splice(i,1),t.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){var t,i;for(this._animating=!0,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);@apply(--paper-font-common-base);line-height:0}: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);vertical-align:middle;background-color:var(--paper-checkbox-unchecked-background-color,transparent)}#ink{position:absolute;top:calc(0px - (2.66 * var(--calculated-paper-checkbox-size) - var(--calculated-paper-checkbox-size))/ 2);left:calc(0px - (2.66 * var(--calculated-paper-checkbox-size) - var(--calculated-paper-checkbox-size))/ 2);width:calc(2.66 * var(--calculated-paper-checkbox-size));height:calc(2.66 * var(--calculated-paper-checkbox-size));color:var(--paper-checkbox-unchecked-ink-color,--primary-text-color);opacity:.6;pointer-events:none}:host-context([dir=rtl]) #ink{right:calc(0px - (2.66 * var(--calculated-paper-checkbox-size) - var(--calculated-paper-checkbox-size))/ 2);left:auto}#ink[checked]{color:var(--paper-checkbox-checked-ink-color,--primary-color)}#checkbox{position:relative;box-sizing:border-box;height:100%;border:solid 2px;border-color:var(--paper-checkbox-unchecked-color,--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,--primary-color);border-color:var(--paper-checkbox-checked-color,--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,--primary-text-color)}: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,--primary-text-color)}:host([disabled][checked]) #checkbox{background-color:var(--paper-checkbox-unchecked-color,--primary-text-color);opacity:.5}:host([disabled]) #checkboxLabel{opacity:.65}#checkbox.invalid:not(.checked){border-color:var(--paper-checkbox-error-color,--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"}},_computeCheckboxClass:function(e,r){var t="";return e&&(t+="checked "),r&&(t+="invalid"),t},_computeCheckmarkClass:function(e){return e?"":"hidden"},_createRipple:function(){return this._rippleContainer=this.$.checkboxContainer,Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this)}})</script></dom-module><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)};}</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-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><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>[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><dom-module id="paper-button" assetpath="../bower_components/paper-button/"><template strip-whitespace=""><style include="paper-material">:host{display:inline-block;position:relative;box-sizing:border-box;min-width:5.14em;margin:0 .29em;background:0 0;text-align:center;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-button)}: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)}paper-ripple{color:var(--paper-button-ink-color)}:host>::content *{text-transform:inherit}</style><content></content></template></dom-module><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 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)}.floated-label-placeholder{@apply(--paper-font-caption)}.underline{position:relative}.focused-line{@apply(--layout-fit);background:var(--paper-input-container-focus-color,--primary-color);height:2px;-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{background: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);background:var(--paper-input-container-color,--secondary-text-color);height:1px;@apply(--paper-input-container-underline)}:host([disabled]) .unfocused-line{border-bottom:1px dashed;border-color:var(--paper-input-container-color,--secondary-text-color);background:0 0;@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;@apply(--paper-font-subhead);@apply(--paper-input-container-input)}::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">&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;-1===this._addons.indexOf(n)&&(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/"><style>:host{display:inline-block;position:fixed;clip:rect(0,0,0,0)}</style><template><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(i){}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><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}#spinnerContainer{width:100%;height:100%;direction:ltr}#spinnerContainer.active{-webkit-animation:container-rotate 1568ms linear infinite;animation:container-rotate 1568ms 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:fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both;opacity:1}.active .spinner-layer.layer-1{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,layer-1-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,layer-1-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both}.active .spinner-layer.layer-2{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,layer-2-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,layer-2-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both}.active .spinner-layer.layer-3{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,layer-3-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,layer-3-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both}.active .spinner-layer.layer-4{-webkit-animation:fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,layer-4-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both;animation:fill-unfill-rotate 5332ms cubic-bezier(.4,0,.2,1) infinite both,layer-4-fade-in-out 5332ms cubic-bezier(.4,0,.2,1) infinite both}@-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{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}100%{opacity:.99}}@keyframes layer-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}100%{opacity:.99}}@-webkit-keyframes layer-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}}@keyframes layer-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}}@-webkit-keyframes layer-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}}@keyframes layer-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}}@-webkit-keyframes layer-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}100%{opacity:0}}@keyframes layer-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}100%{opacity:0}}.gap-patch{position:absolute;box-sizing:border-box;top:0;left:45%;width:10%;height:100%;overflow:hidden;border-color:inherit}.gap-patch .circle{width:1000%;left:-450%}.circle-clipper{display:inline-block;position:relative;width:50%;height:100%;overflow:hidden;border-color:inherit}.circle-clipper .circle{width:200%}.circle{box-sizing:border-box;height:100%;border-width:var(--paper-spinner-stroke-width,3px);border-style:solid;border-color:inherit;border-bottom-color:transparent!important;border-radius:50%;-webkit-animation:none;animation:none;@apply(--layout-fit)}.circle-clipper.left .circle{border-right-color:transparent!important;-webkit-transform:rotate(129deg);transform:rotate(129deg)}.circle-clipper.right .circle{left:-100%;border-left-color:transparent!important;-webkit-transform:rotate(-129deg);transform:rotate(-129deg)}.active .circle-clipper.left .circle{-webkit-animation:left-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both;animation:left-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}.active .circle-clipper.right .circle{-webkit-animation:right-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both;animation:right-spin 1333ms cubic-bezier(.4,0,.2,1) infinite both}@-webkit-keyframes left-spin{from{-webkit-transform:rotate(130deg)}50%{-webkit-transform:rotate(-5deg)}to{-webkit-transform:rotate(130deg)}}@keyframes left-spin{from{transform:rotate(130deg)}50%{transform:rotate(-5deg)}to{transform:rotate(130deg)}}@-webkit-keyframes right-spin{from{-webkit-transform:rotate(-130deg)}50%{-webkit-transform:rotate(5deg)}to{-webkit-transform:rotate(-130deg)}}@keyframes right-spin{from{transform:rotate(-130deg)}50%{transform:rotate(5deg)}to{transform:rotate(-130deg)}}#spinnerContainer.cooldown{-webkit-animation:container-rotate 1568ms linear infinite,fade-out .4s cubic-bezier(.4,0,.2,1);animation:container-rotate 1568ms linear infinite,fade-out .4s cubic-bezier(.4,0,.2,1)}@-webkit-keyframes fade-out{from{opacity:.99}to{opacity:0}}@keyframes fade-out{from{opacity:.99}to{opacity:0}}</style></template></dom-module><dom-module id="paper-spinner" assetpath="../bower_components/paper-spinner/"><template><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 class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer layer-2"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer layer-3"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer layer-4"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div></div></template><script>Polymer({is:"paper-spinner",behaviors:[Polymer.PaperSpinnerBehavior]})</script></dom-module><dom-module id="login-form" assetpath="layouts/"><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><template><div class="layout vertical center center-center fit"><img src="/static/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:"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=0>t;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&&(-1===this._interestedResizables.indexOf(i)&&(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:"600px"},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(){this.selected="drawer"},closeDrawer:function(){this.selected="main"},_onTransitionEnd:function(e){var t=Polymer.dom(e).localTarget;if(t===this&&("left"!==e.propertyName&&"right"!==e.propertyName||this.notifyResize(),"transform"===e.propertyName&&"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=-1!==i.indexOf(r);n||(e.stopPropagation(),t.focus())}},_isDrawerClosed:function(e,t){return!e||"drawer"!==t}})}()</script></dom-module><dom-module id="iron-icon" assetpath="../bower_components/iron-icon/"><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)}</style><template></template><script>Polymer({is:"iron-icon",properties:{icon:{type:String,observer:"_iconChanged"},theme:{type:String,observer:"_updateIcon"},src:{type:String,observer:"_srcChanged"},_meta:{value:Polymer.Base.create("iron-meta",{type:"iconset"}),observer:"_updateIcon"}},_DEFAULT_ICONSET:"icons",_iconChanged:function(i){var t=(i||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(i){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-header-panel" assetpath="../bower_components/paper-header-panel/"><template><style>:host{@apply(--layout-vertical);position:relative;height:100%;@apply(--paper-header-panel)}#mainContainer{@apply(--layout-flex);position:relative;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}#mainPanel{@apply(--layout-vertical);@apply(--layout-flex);position:relative;min-height:0;@apply(--paper-header-panel-body)}:host([mode=scroll]) #mainContainer{@apply(--paper-header-panel-scroll-container);overflow:visible}:host([mode=scroll]){overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}:host([mode=cover]) #mainContainer{@apply(--paper-header-panel-cover-container);position:absolute;top:0;right:0;bottom:0;left:0}:host([mode=cover]) #mainPanel{position:static}:host([mode=standard]) #mainContainer{@apply(--paper-header-panel-standard-container)}:host([mode=seamed]) #mainContainer{@apply(--paper-header-panel-seamed-container)}:host([mode=waterfall]) #mainContainer{@apply(--paper-header-panel-waterfall-container)}:host([mode=waterfall-tall]) #mainContainer{@apply(--paper-header-panel-waterfall-tall-container)}#dropShadow{transition:opacity .5s;height:6px;box-shadow:inset 0 5px 6px -3px rgba(0,0,0,.4);@apply(--paper-header-panel-shadow);position:absolute;top:0;left:0;right:0;opacity:0;pointer-events:none}#dropShadow.has-shadow{opacity:1}</style><content id="headerContent" select="paper-toolbar, .paper-header"></content><div id="mainPanel"><div id="mainContainer" class$="[[_computeMainContainerClass(mode)]]"><content id="mainContent" select="*"></content></div><div id="dropShadow"></div></div></template><script>!function(){"use strict";var t=1,e=2,s={outerScroll:{scroll:!0},shadowMode:{standard:e,waterfall:t,"waterfall-tall":t},tallMode:{"waterfall-tall":!0}};Polymer({is:"paper-header-panel",properties:{mode:{type:String,value:"standard",observer:"_modeChanged",reflectToAttribute:!0},shadow:{type:Boolean,value:!1},tallClass:{type:String,value:"tall"},atTop:{type:Boolean,value:!0,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_computeDropShadowHidden(atTop, mode, shadow)"],ready:function(){this.scrollHandler=this._scroll.bind(this)},attached:function(){this._addListener(),this._keepScrollingState()},detached:function(){this._removeListener()},get header(){return Polymer.dom(this.$.headerContent).getDistributedNodes()[0]},get scroller(){return this._getScrollerForMode(this.mode)},get visibleShadow(){return this.$.dropShadow.classList.contains("has-shadow")},_computeDropShadowHidden:function(o,l,a){var r=s.shadowMode[l];this.shadow?this.toggleClass("has-shadow",!0,this.$.dropShadow):r===e?this.toggleClass("has-shadow",!0,this.$.dropShadow):r!==t||o?this.toggleClass("has-shadow",!1,this.$.dropShadow):this.toggleClass("has-shadow",!0,this.$.dropShadow)},_computeMainContainerClass:function(t){var e={};return e.flex="cover"!==t,Object.keys(e).filter(function(t){return e[t]}).join(" ")},_addListener:function(){this.scroller.addEventListener("scroll",this.scrollHandler,!1)},_removeListener:function(){this.scroller.removeEventListener("scroll",this.scrollHandler)},_modeChanged:function(t,e){var o=s,l=this.header,a=200;l&&(o.tallMode[e]&&!o.tallMode[t]?(l.classList.remove(this.tallClass),this.async(function(){l.classList.remove("animate")},a)):l.classList.toggle("animate",o.tallMode[t])),this._keepScrollingState()},_keepScrollingState:function(){var t=this.scroller,e=this.header;this._setAtTop(0===t.scrollTop),e&&this.tallClass&&s.tallMode[this.mode]&&this.toggleClass(this.tallClass,this.atTop||e.classList.contains(this.tallClass)&&t.scrollHeight<this.offsetHeight,e)},_scroll:function(){this._keepScrollingState(),this.fire("content-scroll",{target:this.scroller},{bubbles:!1})},_getScrollerForMode:function(t){return s.outerScroll[t]?this:this.$.mainContainer}})}()</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-tap-highlight-color:transparent;-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;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}},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){for(var t,s=0;t=this.items[s];s++){var i=this.attrForItemTitle||"textContent",o=t[i]||t.getAttribute(i);if(!t.hasAttribute("disabled")&&o&&o.trim().charAt(0).toLowerCase()===String.fromCharCode(e.keyCode).toLowerCase()){this._setFocusedItem(t);break}}},_focusPrevious:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),s=1;e>s;s++){var i=this.items[(t-s+e)%e];if(!i.hasAttribute("disabled"))return void this._setFocusedItem(i)}},_focusNext:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),s=1;e>s;s++){var i=this.items[(t+s)%e];if(!i.hasAttribute("disabled"))return void this._setFocusedItem(i)}},_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){var t,s,i=e.detail;for(s=0;s<i.length;++s)if(t=i[s],t.addedNodes.length){this._resetTabindices();break}},_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><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)}#tabsContent{height:100%;-moz-flex-basis:auto;-ms-flex-basis:auto;flex-basis:auto}#tabsContent.scrollable{position:absolute;white-space:nowrap}#tabsContent.horizontal{@apply(--layout-horizontal)}.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)]]"><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},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){return t?"scrollable":"horizontal"},_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)},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 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 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=c>l,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;0>i?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("translate3d("+e+"%, 0, 0) 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="ha-label-badge" assetpath="components/"><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}iron-image{border-radius:50%}</style><template><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><dom-module id="ha-demo-badge" assetpath="components/"><style>:host{--ha-label-badge-color:#dac90d}</style><template><ha-label-badge icon="mdi:emoticon" label="Demo" description=""></ha-label-badge></template></dom-module><dom-module id="ha-state-label-badge" assetpath="components/entity/"><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><template><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><dom-module id="ha-badges-card" assetpath="cards/"><style></style><template><template is="dom-repeat" items="[[states]]"><ha-state-label-badge state="[[item]]"></ha-state-label-badge></template></template></dom-module><dom-module id="ha-camera-card" assetpath="cards/"><style include="paper-material">:host{display:block;position:relative;font-size:0;border-radius:2px;cursor:pointer;min-height:48px}.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;text-transform:capitalize;font-size:16px;font-weight:500;line-height:16px;color:#fff}</style><template><img src="[[cameraFeedSrc]]" class="camera-feed" hidden$="[[!imageLoaded]]" on-load="imageLoadSuccess" on-error="imageLoadFail"><div class="caption">[[stateObj.entityDisplay]]<template is="dom-if" if="[[!imageLoaded]]">(Error loading image)</template></div></template></dom-module><dom-module id="ha-card" assetpath="components/"><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><template is="dom-if" if="[[header]]"><div class="header">[[header]]</div></template><content></content></template></dom-module><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)}</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"},_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/"><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:9px 0}</style><template><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><dom-module id="ha-state-icon" assetpath="components/entity/"><template><iron-icon icon="[[computeIcon(stateObj)]]"></iron-icon></template></dom-module><dom-module id="state-badge" assetpath="components/entity/"><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:#DCC91F}ha-state-icon[data-state=unavailable]{color:var(--disabled-text-color)}</style><template><ha-state-icon id="icon" state-obj="[[stateObj]]" data-domain$="[[stateObj.domain]]" data-state$="[[stateObj.state]]"></ha-state-icon></template></dom-module><dom-module id="relative-ha-datetime" assetpath="components/"><template><span>[[relativeTime]]</span></template></dom-module><dom-module id="state-info" assetpath="components/"><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);text-transform:capitalize;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><template><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"><relative-ha-datetime datetime-obj="[[stateObj.lastChangedAsDate]]"></relative-ha-datetime></div></template></div></div></template></dom-module><dom-module id="state-card-configurator" assetpath="state-summary/"><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}</style><template><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><dom-module id="state-card-display" assetpath="state-summary/"><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-transform:capitalize;text-align:right;line-height:40px}</style><template><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.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},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&&-1!==this._typesThatHaveText.indexOf(this.inputElement.type)&&(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){this._shiftTabPressed||(Polymer.IronControlState._focusBlurHandler.call(this,e),this.focused&&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(a){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})}},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-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.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}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)}</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]]">[[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>[[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},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._discoverInfo(),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(){this.resetFit(),this.fit()},position:function(){if(this.horizontalAlign||this.verticalAlign){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=t.width+this._fitInfo.margin.left+this._fitInfo.margin.right,o=t.height+this._fitInfo.margin.top+this._fitInfo.margin.bottom,h=this.__isAlignRight(this._localeHorizontalAlign,n,i,e),s=this.__isAlignBottom(this.verticalAlign,o,i,e),r=s?i.bottom-o:i.top,l=h?i.right-n:i.left;if(this.noOverlap){var a=l+i.width*(h?-1:1),f=r+i.height*(s?-1:1),g=this.__getCroppedArea({top:f,left:l,width:n,height:o},e),m=this.__getCroppedArea({top:r,left:a,width:n,height:o},e);g>=m?l=a:r=f}l+=this._fitInfo.margin.left,r+=this._fitInfo.margin.top;var p=l+t.width,d=r+t.height;l=Math.max(l,this._fitInfo.margin.left),r=Math.max(r,this._fitInfo.margin.top);var y=Math.min(e.right-this._fitInfo.margin.right,p)-l,c=Math.min(e.bottom-this._fitInfo.margin.bottom,d)-r,u=this._fitInfo.sizedBy.minWidth,_=this._fitInfo.sizedBy.minHeight;(u>y||u>p)&&(l=-9999,y=0),(_>c||_>d)&&(r=-9999,c=0),this.sizingTarget.style.maxWidth=y+"px",this.sizingTarget.style.maxHeight=c+"px",this.style.left=l-t.left+"px",this.style.top=r-t.top+"px"}},constrain:function(){if(!this.horizontalAlign&&!this.verticalAlign){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),r="Width"===o?s.width:s.height,l=i===n,a=l?r-t[n]:t[e],f=h.margin[l?e:n],g="offset"+o,m=this[g]-this.sizingTarget[g];this.sizingTarget.style["max"+o]=r-f-a-m+"px"},center:function(){if(!this.horizontalAlign&&!this.verticalAlign){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()},__isAlignRight:function(t,i,e,n){if("right"===t)return!0;if("auto"===t){var o=e.left+e.width/2,h=n.left+n.width/2,s=Math.abs(Math.min(0,e.left)),r=Math.abs(Math.min(0,e.right-i));return o>h||!this.noOverlap&&s>r}return!1},__isAlignBottom:function(t,i,e,n){if("bottom"===t)return!0;if("auto"===t){var o=e.top+e.height/2,h=n.top+n.height/2,s=Math.abs(Math.min(0,e.top)),r=Math.abs(Math.min(0,e.bottom-i));return o>h||!this.noOverlap&&s>r}return!1},__getCroppedArea:function(t,i){var e=Math.min(0,t.top)+Math.min(0,i.bottom-(t.top+t.height)),n=Math.min(0,t.left)+Math.min(0,i.right-(t.left+t.width));return Math.abs(e)*t.width+Math.abs(n)*t.height}}</script><dom-module id="iron-overlay-backdrop" assetpath="../bower_components/iron-overlay-behavior/"><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><template><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;var e="ontouchstart"in window?"touchstart":"mousedown";document.addEventListener(e,this._onCaptureClick.bind(this),!0),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,o=this._overlays[r];if(o&&this._shouldBeBehindOverlay(t,o)&&r--,!(e>=r)){var n=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(t)<=n&&this._applyOverlayZ(t,n);r>e;)this._overlays[e]=this._overlays[e+1],e++;this._overlays[r]=t}}},addOrRemoveOverlay:function(e){e.opened?this.addOverlay(e):this.removeOverlay(e),this.trackBackdrop()},addOverlay:function(e){var t=this._overlays.indexOf(e);if(t>=0)return void this._bringOverlayAtIndexToFront(t);var r=this._overlays.length,o=this._overlays[r-1],n=Math.max(this._getZ(o),this._minimumZ),a=this._getZ(e);if(o&&this._shouldBeBehindOverlay(e,o)){this._applyOverlayZ(o,n),r--;var i=this._overlays[r-1];n=Math.max(this._getZ(i),this._minimumZ)}n>=a&&this._applyOverlayZ(e,n),this._overlays.splice(r,0,e);var s=this.deepActiveElement;e.restoreFocusNode=this._overlayParent(s)?null:s},removeOverlay:function(e){var t=this._overlays.indexOf(e);if(-1!==t){this._overlays.splice(t,1);var r=e.restoreFocusOnClose?e.restoreFocusNode:null;e.restoreFocusNode=null,r&&Polymer.dom(document.body).deepContains(r)&&r.focus()}},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.transitioning&&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)},_overlayParent:function(e){for(;e&&e!==document.body;){if(e._manager===this)return e;e=Polymer.dom(e).parentNode||e.host}},_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.withBackdrop&&e.preventDefault(),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){var r=e,o=t;return!r.alwaysOnTop&&o.alwaysOnTop}},Polymer.IronOverlayManager=new Polymer.IronOverlayManagerClass</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(){var e=["a[href]","area[href]","iframe","[tabindex]","[contentEditable=true]"],t=["input","select","textarea","button"],n=e.join(':not([tabindex="-1"]),')+':not([tabindex="-1"]),'+t.join(':not([disabled]):not([tabindex="-1"]),')+':not([disabled]):not([tabindex="-1"])',i=Polymer.dom(this).querySelectorAll(n);return this.tabIndex>=0&&i.splice(0,0,this),i.sort(function(e,t){return e.tabIndex===t.tabIndex?0:0===e.tabIndex||e.tabIndex>t.tabIndex?1:-1})},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__openChangedAsync=null,this.__onIronResizeAsync=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(),this._observer=Polymer.dom(this).observeNodes(this._onNodesChange)},detached:function(){Polymer.dom(this).unobserveNodes(this._observer),this._observer=null,this.opened=!1},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)},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(){this.opened?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this._overlaySetup&&(this._manager.addOrRemoveOverlay(this),this.__openChangedAsync&&window.cancelAnimationFrame(this.__openChangedAsync),this.isAttached&&(this.__isAnimating=!0,this.opened?this.__openChangedAsync=window.requestAnimationFrame(function(){this.__openChangedAsync=null,this._prepareRenderOpened(),this._renderOpened()}.bind(this)):this._renderClosed()))},_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._manager.trackBackdrop()},_prepareRenderOpened:function(){this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&this._focusNode.blur()},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this._applyFocus(),this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this._applyFocus(),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(){this.opened?this.noAutoFocus||this._focusNode.focus():(this._focusNode.blur(),this._focusedChild=null,this._manager.focusOverlay())},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this.cancel(e)},_onCaptureFocus:function(e){if(this.withBackdrop){var t=Polymer.dom(e).path;-1===t.indexOf(this)?(e.stopPropagation(),this._applyFocus()):this._focusedChild=t[0]}},_onCaptureEsc:function(e){this.noCancelOnEscKey||this.cancel(e)},_onCaptureTab:function(e){var t=e.shiftKey,n=t?this.__firstFocusableNode:this.__lastFocusableNode,i=t?this.__lastFocusableNode:this.__firstFocusableNode;this.withBackdrop&&this._focusedChild===n&&(this._focusedChild=i)},_onIronResize:function(){this.__onIronResizeAsync&&(window.cancelAnimationFrame(this.__onIronResizeAsync),this.__onIronResizeAsync=null),this.opened&&!this.__isAnimating&&(this.__onIronResizeAsync=window.requestAnimationFrame(function(){this.__onIronResizeAsync=null,this.refit()}.bind(this)))},_onNodesChange:function(){this.opened&&!this.__isAnimating&&this.notifyResize();var e=this._focusableNodes;this.__firstFocusableNode=e[0],this.__lastFocusableNode=e[e.length-1]}},Polymer.IronOverlayBehavior=[Polymer.IronFitBehavior,Polymer.IronResizableBehavior,Polymer.IronOverlayBehaviorImpl]}()</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=w}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&&-1==y.indexOf(e[i]))return;if("direction"==i&&-1==T.indexOf(e[i]))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 0>t||t>1||0>i||i>1?w: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(0==r||1==r)return r;for(var a=0,s=1;;){var u=(a+s)/2,c=o(t,i,u);if(Math.abs(r-c)<1e-4)return o(e,n,u);r>c?a=u:s=u}}}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){j||(j=document.createElement("div").style),j.animationTimingFunction="",j.animationTimingFunction=t;var e=j.animationTimingFunction;if(""==e&&r())throw new TypeError(t+" is not a valid value for easing");var i=N.exec(e);if(i)return u.apply(this,i.slice(1).map(Number));var n=k.exec(e);if(n)return c(Number(n[1]),{start:E,middle:x,end:A}[n[2]]);var o=P[e];return o?o:w}function l(t){return Math.abs(h(t)/t.playbackRate)}function h(t){return t.duration*t.iterations}function m(t,e,i){return null==e?S:e<i.delay?O:e>=i.delay+t?C:F}function d(t,e,i,n,r){switch(n){case O:return"backwards"==e||"both"==e?0:null;case F:return i-r;case C:return"forwards"==e||"both"==e?t:null;case S:return null}}function p(t,e,i,n){return(n.playbackRate<0?e-t:e)*n.playbackRate+i}function _(t,e,i,n,r){return i===1/0||i===-(1/0)||i-n==e&&r.iterations&&(r.iterations+r.iterationStart)%1==0?t:i%t}function g(t,e,i,n){return 0===i?0:e==t?n.iterationStart+n.iterations-1:Math.floor(i/t)}function b(t,e,i,n){var r=t%2>=1,o="normal"==n.direction||n.direction==(r?"alternate-reverse":"alternate"),a=o?i:e-i,s=a/e;return e*n._easingFunction(s)}function v(t,e,i){var n=m(t,e,i),r=d(t,i.fill,e,n,i.delay);if(null===r)return null;if(0===t)return n===O?0:1;var o=i.iterationStart*i.duration,a=p(t,r,o,i),s=_(i.duration,h(i),a,o,i),u=g(i.duration,s,a,i);return b(u,i.duration,s,i)/i.duration}var y="backwards|forwards|both|none".split("|"),T="reverse|alternate|alternate-reverse".split("|"),w=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)||0>t)&&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)||0>t)&&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=f(t),this._setMember("easing",t)},get easing(){return this._easing},set iterations(t){if((isNaN(t)||0>t)&&r())throw new TypeError("iterations must be non-negative, received: "+t);this._setMember("iterations",t)},get iterations(){return this._iterations}};var E=1,x=.5,A=0,P={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,E),"step-middle":c(1,x),"step-end":c(1,A)},j=null,R="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",N=new RegExp("cubic-bezier\\("+R+","+R+","+R+","+R+"\\)"),k=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,S=0,O=1,C=2,F=3;t.cloneTimingInput=i,t.makeTiming=o,t.numericTimingToObject=a,t.normalizeTimingInput=s,t.calculateActiveDuration=l,t.calculateTimeFraction=v,t.calculatePhase=m,t.toTimingFunction=f}(c,f),function(t,e){function i(t,e){return t in c?c[t][e]||e:e}function n(t,e,n){var r=a[t];if(r){s.style[t]=e;for(var o in r){var u=r[o],c=s.style[u];n[u]=i(u,c)}}else n[t]=i(t,e)}function r(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;o>a;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 o(t){function e(){var t=i.length;null==i[t-1].offset&&(i[t-1].offset=1),t>1&&null==i[0].offset&&(i[0].offset=0);for(var e=0,n=i[0].offset,r=1;t>r;r++){var o=i[r].offset;if(null!=o){for(var a=1;r-e>a;a++)i[e+a].offset=n+(o-n)*a/(r-e);e=r,n=o}}}if(null==t)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&t[Symbol.iterator]&&(t=Array.from(t)),Array.isArray(t)||(t=r(t));for(var i=t.map(function(t){var e={};for(var i in t){var r=t[i];if("offset"==i){if(null!=r&&(r=Number(r),!isFinite(r)))throw new TypeError("keyframe offsets must be numbers.")}else{if("composite"==i)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};r=""+r}n(i,r,e)}return void 0==e.offset&&(e.offset=null),e}),o=!0,a=-(1/0),s=0;s<i.length;s++){var u=i[s].offset;if(null!=u){if(a>u)throw{code:DOMException.INVALID_MODIFICATION_ERR,name:"InvalidModificationError",message:"Keyframes are not loosely sorted by offset. Sort or specify offsets."};a=u}else o=!1}return i=i.filter(function(t){return t.offset>=0&&t.offset<=1}),o||e(),i}var a={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"]},s=document.createElementNS("http://www.w3.org/1999/xhtml","div"),u={thin:"1px",medium:"3px",thick:"5px"},c={borderBottomWidth:u,borderLeftWidth:u,borderRightWidth:u,borderTopWidth:u,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:u,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};t.convertToArrayForm=r,t.normalizeKeyframes=o}(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),s>a?(t in e||console.warn("Web Animations: "+t+" "+o+" deprecated and will stop working on "+s.toDateString()+". "+n),e[t]=!0,!1):!0},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=o[a].offset,u=o[a+1].offset,c=o[a].value,f=o[a+1].value,l=o[a].easing;s==u&&(1==u?c=f:f=c),n.push({startTime:s,endTime:u,easing:t.toTimingFunction(l?l:"linear"),property:r,interpolation:e.propertyInterpolation(r,c,f)})}return n.sort(function(t,e){return t.startTime-e.startTime}),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 0>=i&&0==t.startTime||i>=1&&1==t.endTime||i>=t.startTime&&i<=t.endTime}).forEach(function(n){var r=i-n.startTime,o=n.endTime-n.startTime,a=0==o?0:n.easing(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.calculateTimeFraction(i,n,e)};return n._totalDuration=e.delay+i+e.endDelay,n._isCurrent=function(n){var r=t.calculatePhase(i,n,e);return r===PhaseActive||r===PhaseBefore},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._isCurrent=u._isCurrent,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._isCurrent=function(){return!1},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.5>n?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._tickCurrentTime(t,!0),e.invalidateEffects()))},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.invalidateEffects())},get playbackRate(){return this._playbackRate},set playbackRate(t){if(t!=this._playbackRate){var e=this.currentTime;this._playbackRate=t,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!=e&&(this.currentTime=e)}},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"},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._currentTime=this._playbackRate>0?0:this._totalDuration,this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),e.invalidateEffects()},pause:function(){this._isFinished||this._paused||this._idle||(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.invalidateEffects())},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._finishedFlag=!0,this.currentTime=0,this._startTime=null,this._effect._update(null),e.invalidateEffects())},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}}}(c,d,f),function(t,e,i){function n(t){var e=c;c=[],t<p.currentTime&&(t=p.currentTime),s(t,!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){m=!1;var n=e.timeline;n.currentTime=t,n._animations.sort(r),h=!1;var o=n._animations;n._animations=[];var a=[],s=[];o=o.filter(function(e){e._tick(t,i),e._inEffect?s.push(e._effect):a.push(e._effect),e._needsTick&&(h=!0);var n=e._inEffect||e._needsTick;return e._inTimeline=n,n}),d.push.apply(d,a),d.push.apply(d,s),n._animations.push.apply(n._animations,o),h&&requestAnimationFrame(function(){})}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.invalidateEffects(),n}};var l=void 0,h=!1,m=!1;e.restart=function(){return h||(h=!0,requestAnimationFrame(function(){}),m=!0),m},e.invalidateEffects=function(){s(e.timeline.currentTime,!1),a()};var d=[],p=new o;e.timeline=p}(c,d,f),function(t){function e(t,e){var i=t.exec(e);return i?(i=t.ignoreCase?i[0].toLowerCase():i[0],[i,e.substr(i.length)]):void 0}function i(t,e){e=e.replace(/^\s*/,"");var i=t(e);return i?[i[0],i[1].replace(/^\s*/,"")]:void 0}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++,0>=i))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]}return""==i?n:void 0}function c(t,e,i,n,r){for(var a=[],s=[],u=[],c=o(n.length,r.length),f=0;c>f;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);return r&&r[0].length?[n,r[1]]:void 0}function i(i){var n=t.consumeRepeated(e,/^,/,i);return n&&""==n[1]?n[0]:void 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){return/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?Number(t):void 0}function o(t,e){return[t,e,i]}function a(t,e){return 0!=t?u(0,1/0)(t,e):void 0}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){return"visible"==t||"visible"==e?[0,1,function(i){return 0>=i?t:i>=1?e:"visible"}]:void 0}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;3>n;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);return e&&""==e[1]?e[0]:void 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);return n&&4==n[0].length?n[0]:void 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,T=i[o].d,w=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(w[2]&&E[2]&&s(b)==s(v))c=s(b),y=w[2](y),T=E[2](T);else{if(!w[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=w[1](y),T=E[1](T)}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],T[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(a){}finally{i&&i.cancel()}if(!n){var s=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)),s.call(this,e,i)}}}(c),!function(t,e,i){function n(t){var e=window.document.timeline;e.currentTime=t,e._discardAnimations(),0==e._animations.length?o=!1:requestAnimationFrame(n);
}var r=window.requestAnimationFrame;window.requestAnimationFrame=function(t){return r(function(e){window.document.timeline._updateAnimationsPromises(),t(e),window.document.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(s){}try{window.document.timeline=a}catch(s){}}(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=window.document.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||(-1==e.animationsWithPromises.indexOf(this)&&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||(-1==e.animationsWithPromises.indexOf(this)&&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}),"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!==e&&(this.currentTime=e),this._updatePromises()},play:function(){this._updatePromises(),this._paused=!1,this._animation.play(),-1==this._timeline._animations.indexOf(this)&&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.calculateTimeFraction(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?(-1==e.indexOf(n._parent)&&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(){window.document.timeline._updateAnimationsPromises();var t=c.apply(this,arguments);return r()&&(t=c.apply(this,arguments)),window.document.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.calculateTimeFraction(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;return i&&"pending"!=i.playState&&i.effect?null==e?void i._removeChildAnimations():0==e&&i.playbackRate<0&&(r||(r=t.normalizeTimingInput(i.effect.timing)),e=t.calculateTimeFraction(t.calculateActiveDuration(r),-1,r),isNaN(e)||null==e)?(i._forEachChild(function(t){t.currentTime=-1}),void i._removeChildAnimations()):void 0: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 i.style.opacity="0",this._effect=new KeyframeEffect(i,[{opacity:"1"},{opacity:"1"}],this.timingFromConfig(e)),this._effect},complete:function(e){e.node.style.opacity=""}})</script><script>Polymer.NeonAnimatableBehavior={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},"fade-in-animation"!==this.entryAnimation?this.animationConfig.entry=[{name:"opaque-animation",node:this},{name:this.entryAnimation,node:this}]: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={properties:{_player:{type:Object}},_configureAnimationEffects: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=o.configure(e);a&&i.push({animation:o,config:e,effect:a})}else Polymer.Base._warn(this.is+":",e.name,"not found!")}return i},_runAnimationEffects:function(n){return document.timeline.play(new GroupEffect(n))},_completeAnimations:function(n){for(var i,e=0;i=n[e];e++)i.animation.complete(i.config)},playAnimation:function(n,i){var e=this.getAnimationConfig(n);if(e){var t=this._configureAnimationEffects(e),o=t.map(function(n){return n.effect});o.length>0?(this._player=this._runAnimationEffects(o),this._player.onfinish=function(){this._completeAnimations(t),this._player&&(this._player.cancel(),this._player=null),this.fire("neon-animation-finish",i,{bubbles:!1})}.bind(this)):this.fire("neon-animation-finish",i,{bubbles:!1})}},cancelAnimation:function(){this._player&&this._player.cancel()}},Polymer.NeonAnimationRunnerBehavior=[Polymer.NeonAnimatableBehavior,Polymer.NeonAnimationRunnerBehaviorImpl]</script><script>!function(){"use strict";Polymer.IronDropdownScrollManager={get currentLockingElement(){return this._lockingElements[this._lockingElements.length-1]},elementIsScrollLocked:function(e){var o=this.currentLockingElement;if(void 0===o)return!1;var n;return this._hasCachedLockedElement(e)?!0:this._hasCachedUnlockedElement(e)?!1:(n=!!o&&o!==e&&!this._composedTreeContains(o,e),n?this._lockedElementCache.push(e):this._unlockedElementCache.push(e),n)},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 o=this._lockingElements.indexOf(e);-1!==o&&(this._lockingElements.splice(o,1),this._lockedElementCache=[],this._unlockedElementCache=[],0===this._lockingElements.length&&this._unlockScrollInteractions())},_lockingElements:[],_lockedElementCache:null,_unlockedElementCache:null,_originalBodyStyles:{},_isScrollingKeypress:function(e){return Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,"pageup pagedown home end up left down right")},_hasCachedLockedElement:function(e){return this._lockedElementCache.indexOf(e)>-1},_hasCachedUnlockedElement:function(e){return this._unlockedElementCache.indexOf(e)>-1},_composedTreeContains:function(e,o){var n,t,l,r;if(e.contains(o))return!0;for(n=Polymer.dom(e).querySelectorAll("content"),l=0;l<n.length;++l)for(t=Polymer.dom(n[l]).getDistributedNodes(),r=0;r<t.length;++r)if(this._composedTreeContains(t[r],o))return!0;return!1},_scrollInteractionHandler:function(e){var o=Polymer.dom(e).rootTarget;if(Polymer.IronDropdownScrollManager.elementIsScrollLocked(o)){if("keydown"===e.type&&!Polymer.IronDropdownScrollManager._isScrollingKeypress(e))return;e.preventDefault()}},_lockScrollInteractions:function(){this._originalBodyStyles.overflow=document.body.style.overflow,this._originalBodyStyles.overflowX=document.body.style.overflowX,this._originalBodyStyles.overflowY=document.body.style.overflowY,document.body.style.overflow="hidden",document.body.style.overflowX="hidden",document.body.style.overflowY="hidden",document.addEventListener("wheel",this._scrollInteractionHandler,!0),document.addEventListener("mousewheel",this._scrollInteractionHandler,!0),document.addEventListener("DOMMouseScroll",this._scrollInteractionHandler,!0),document.addEventListener("touchmove",this._scrollInteractionHandler,!0),document.addEventListener("keydown",this._scrollInteractionHandler,!0)},_unlockScrollInteractions:function(){document.body.style.overflow=this._originalBodyStyles.overflow,document.body.style.overflowX=this._originalBodyStyles.overflowX,document.body.style.overflowY=this._originalBodyStyles.overflowY,document.removeEventListener("wheel",this._scrollInteractionHandler,!0),document.removeEventListener("mousewheel",this._scrollInteractionHandler,!0),document.removeEventListener("DOMMouseScroll",this._scrollInteractionHandler,!0),document.removeEventListener("touchmove",this._scrollInteractionHandler,!0),document.removeEventListener("keydown",this._scrollInteractionHandler,!0)}}}()</script><dom-module id="iron-dropdown" assetpath="../bower_components/iron-dropdown/"><style>:host{position:fixed}#contentWrapper ::content>*{overflow:auto}#contentWrapper.animating ::content>*{overflow:hidden}</style><template><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}},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},_openedChanged:function(){this.opened&&this.disabled?this.cancel():(this.cancelAnimation(),this.sizingTarget=this.containedElement||this.sizingTarget,this._updateAnimationConfig(),this.opened&&!this.allowOutsideScroll?Polymer.IronDropdownScrollManager.pushScrollLock(this):Polymer.IronDropdownScrollManager.removeScrollLock(this),Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this,arguments))},_renderOpened:function(){!this.noAnimations&&this.animationConfig&&this.animationConfig.open?(this.withBackdrop&&this.backdropElement.open(),this.$.contentWrapper.classList.add("animating"),this.playAnimation("open")):Polymer.IronOverlayBehaviorImpl._renderOpened.apply(this,arguments)},_renderClosed:function(){!this.noAnimations&&this.animationConfig&&this.animationConfig.close?(this.withBackdrop&&this.backdropElement.close(),this.$.contentWrapper.classList.add("animating"),this.playAnimation("close")):Polymer.IronOverlayBehaviorImpl._renderClosed.apply(this,arguments)},_onNeonAnimationFinish:function(){this.$.contentWrapper.classList.remove("animating"),this.opened?Polymer.IronOverlayBehaviorImpl._finishRenderOpened.apply(this):Polymer.IronOverlayBehaviorImpl._finishRenderClosed.apply(this)},_updateAnimationConfig:function(){var n={},i=[];this.openAnimationConfig&&(n.open=[{name:"opaque-animation"}].concat(this.openAnimationConfig),i=i.concat(n.open)),this.closeAnimationConfig&&(n.close=this.closeAnimationConfig,i=i.concat(n.close)),i.forEach(function(n){n.node=this.containedElement},this),this.animationConfig=n},_updateOverlayPosition:function(){this.isAttached&&this.notifyResize()},refit:function(){if(this.opened){var n,i,o=this.containedElement;o&&(n=o.scrollTop,i=o.scrollLeft),Polymer.IronFitBehavior.refit.apply(this,arguments),o&&(o.scrollTop=n,o.scrollLeft=i)}},_applyFocus:function(){var n=this.focusTarget||this.containedElement;n&&this.opened&&!this.noAutoFocus?n.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}</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]]" horizontal-offset="[[horizontalOffset]]" vertical-offset="[[verticalOffset]]" open-animation-config="[[openAnimationConfig]]" close-animation-config="[[closeAnimationConfig]]" no-animations="[[noAnimations]]" focus-target="[[_dropdownContent]]" 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=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},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},noAnimations:{type:Boolean,value:!1},ignoreSelect:{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"}}]}},_dropdownContent:{type:Object}},hostAttributes:{role:"group","aria-haspopup":"true"},listeners:{"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()},_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()}});e.ANIMATION_CUBIC_BEZIER="cubic-bezier(.3,.95,.5,1)",e.MAX_ANIMATION_TIME_MS=400,Polymer.PaperMenuButton=e}()</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;cursor:pointer;-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><div role="button"></div><paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}"><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"},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"}},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.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="state-card-input_select" assetpath="state-summary/"><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-dropdown-menu{margin-left:16px}</style><template><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><paper-dropdown-menu no-label-float="" selected-item-label="{{selectedOption}}" on-tap="stopPropagation"><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></div></template></dom-module><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){return t=parseFloat(t),this.step?(Math.round((t+this.min)/this.step)-this.min/this.step)/(1/this.step):t},_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}#progressContainer{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 2s linear infinite;animation:indeterminate-bar 2s linear infinite}:host(:not([disabled])) #primaryProgress.indeterminate::after{content:"";-webkit-transform-origin:center center;transform-origin:center center;-webkit-animation:indeterminate-splitter 2s linear infinite;animation:indeterminate-splitter 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-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,observer:"_maxMarkersChanged"},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)"],hostAttributes:{role:"slider",tabindex:0},keyBindings:{"left down pagedown home":"_decrementKey","right up pageup end":"_incrementKey"},ready:function(){this.async(function(){this._updateKnob(this.value)},1)},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)},_maxMarkersChanged:function(t){this.snaps||this._setMarkers([]);var e=Math.round((this.max-this.min)/this.step);e>t&&(e=t),this._setMarkers(new Array(e))},_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/"><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-slider{margin-left:16px}</style><template><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"></paper-slider></div></template></dom-module><dom-module id="state-card-media_player" assetpath="state-summary/"><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><template><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><dom-module id="state-card-rollershutter" assetpath="state-summary/"><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><template><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="onMoveUpTap" disabled="[[computeIsFullyClosed(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="onMoveDownTap" disabled="[[computeIsFullyOpen(stateObj)]]"></paper-icon-button></div></div></template></dom-module><dom-module id="state-card-scene" assetpath="state-summary/"><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}</style><template><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><dom-module id="state-card-script" assetpath="state-summary/"><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}</style><template><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]]"></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><dom-module id="state-card-thermostat" assetpath="state-summary/"><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)}</style><template><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><div class="state"><div class="target">[[computeTargetTemperature(stateObj)]]</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><dom-module id="state-card-toggle" assetpath="state-summary/"><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>ha-entity-toggle{margin-left:16px}</style><template><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><ha-entity-toggle state-obj="[[stateObj]]"></ha-entity-toggle></div></template></dom-module><dom-module id="state-card-weblink" assetpath="state-summary/"><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><template><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><dom-module id="ha-entities-card" assetpath="cards/"><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;text-transform:capitalize}.header .name{@apply(--paper-font-common-nowrap)}ha-entity-toggle{margin-left:16px}</style><template><ha-card><div class="header horizontal layout center"><div class="flex name">[[computeTitle(states, groupEntity)]]</div><template is="dom-if" if="[[showGroupToggle(groupEntity, states)]]"><ha-entity-toggle 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 class="state-card" state-obj="[[item]]"></state-card-content></div></template></div></ha-card></template></dom-module><dom-module id="ha-introduction-card" assetpath="cards/"><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><template><ha-card header="Welcome Home!"><div class="content"><template is="dom-if" if="[[showInstallInstruction]]">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="[[showInstallInstruction]]"><li><a href="https://home-assistant.io/getting-started/">Installation instructions per platform</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">Getting 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><dom-module id="ha-media_player-card" assetpath="cards/"><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-position:center center;background-image:url(/static/images/card_media_player_bg.png);background-repeat:no-repeat;background-color:var(--primary-color);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:before{padding-top:91px}.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;text-transform:capitalize;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}.controls{@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{color:var(--primary-text-color)}paper-icon-button[disabled]{color:var(--paper-grey-400)}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><template><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><div class="controls layout horizontal justified"><paper-icon-button icon="mdi:power" on-tap="handleTogglePower" invisible$="[[!playerObj.supportsTurnOff]]" 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><dom-module id="ha-cards" assetpath="components/"><style is="custom-style" include="iron-flex iron-flex-factors"></style><style>:host{display:block;padding-right:8px}.no-badges{height:8px}.badges{margin-top:16px;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><template><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]]"></ha-badges-card></div></template><template is="dom-if" if="[[!cards.badges]]"><div class="no-badges"></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]]"></ha-card-chooser></div></template></div></template></div></div></template></dom-module><dom-module id="partial-cards" assetpath="layouts/"><style is="custom-style" include="iron-flex iron-positioning"></style><style>:host{display:block;background-color:#E5E5E5;-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none}paper-tab{text-transform:uppercase}</style><template><paper-header-panel mode="waterfall"><paper-toolbar class="medium"><paper-icon-button icon="mdi:menu" class$="[[computeMenuButtonClass(narrow, showMenu)]]" on-tap="toggleMenu"></paper-icon-button><template is="dom-if" if="[[!hasViews]]"><div class="title">[[locationName]]</div></template><template is="dom-if" if="[[hasViews]]"><div class="flex"><paper-tabs selected="[[currentView]]" attr-for-selected="data-entity" on-iron-select="viewSelected" scrollable="true"><paper-tab data-entity="">[[locationName]]</paper-tab><template is="dom-repeat" items="[[views]]"><paper-tab data-entity$="[[item.entityId]]"><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></template><paper-icon-button icon="mdi:refresh" class$="[[computeRefreshButtonClass(isFetching)]]" on-tap="handleRefresh" hidden$="[[isStreaming]]"></paper-icon-button><paper-icon-button icon="mdi:microphone" hidden$="[[!canListen]]" on-tap="handleListenClick"></paper-icon-button></paper-toolbar><div class="fit"><ha-cards show-introduction="[[computeShowIntroduction(currentView, introductionLoaded, states)]]" states="[[states]]" columns="[[columns]]"></ha-cards></div></paper-header-panel></template></dom-module><dom-module id="paper-scroll-header-panel" assetpath="../bower_components/paper-scroll-header-panel/"><style>:host{display:block;position:relative;overflow:hidden}#mainContainer{position:absolute;top:0;right:0;bottom:0;left:0;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-overflow-scrolling:touch;overflow-x:hidden;overflow-y:auto;@apply(--paper-scroll-header-container)}#headerContainer{position:absolute;top:0;right:0;left:0}.bg-container{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}#headerBg{@apply(--paper-scroll-header-panel-full-header)}#condensedHeaderBg{@apply(--paper-scroll-header-panel-condensed-header)}#condensedHeaderBg,#headerBg{position:absolute;top:0;left:0;width:100%;height:100%;background-repeat:no-repeat;background-size:cover;background-position:center center}#condensedHeaderBg{opacity:0}</style><template><div id="mainContainer"><content id="mainContent" select=":not(paper-toolbar):not(.paper-header)"></content></div><div id="headerContainer"><div class="bg-container"><div id="condensedHeaderBg"></div><div id="headerBg"></div></div><content id="headerContent" select="paper-toolbar, .paper-header"></content></div></template></dom-module><script>!function(){"use strict";Polymer.PaperScrollHeaderPanel=Polymer({is:"paper-scroll-header-panel",behaviors:[Polymer.IronResizableBehavior],properties:{condenses:{type:Boolean,value:!1},noDissolve:{type:Boolean,value:!1},noReveal:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},keepCondensedHeader:{type:Boolean,value:!1},headerHeight:{type:Number,value:0},condensedHeaderHeight:{type:Number,value:0},scrollAwayTopbar:{type:Boolean,value:!1},headerState:{type:Number,readOnly:!0,notify:!0,value:0},_defaultCondsensedHeaderHeight:{type:Number,value:0}},observers:["_setup(headerHeight, condensedHeaderHeight, fixed)","_condensedHeaderHeightChanged(condensedHeaderHeight)","_headerHeightChanged(headerHeight, condensedHeaderHeight)","_condensesChanged(condenses)"],listeners:{"iron-resize":"measureHeaderHeight"},ready:function(){this._scrollHandler=this._scroll.bind(this),this.scroller.addEventListener("scroll",this._scrollHandler)},attached:function(){this.async(this.measureHeaderHeight,1)},get header(){return Polymer.dom(this.$.headerContent).getDistributedNodes()[0]},get content(){return Polymer.dom(this.$.mainContent).getDistributedNodes()[0]},get scroller(){return this.$.mainContainer},get _headerMaxDelta(){return this.keepCondensedHeader?this._headerMargin:this.headerHeight},get _headerMargin(){return this.headerHeight-this.condensedHeaderHeight},_y:0,_prevScrollTop:0,measureHeaderHeight:function(){var e=this.header;e&&e.offsetHeight&&(this.headerHeight=e.offsetHeight)},scroll:function(e,t){if(t){var s=function(e,t,s,r){return e/=r,-s*e*(e-2)+t},r=Math.random(),a=200,i=Date.now(),n=this.scroller.scrollTop,h=e-n;this._currentAnimationId=r,function o(){var t=Date.now(),d=t-i;d>a?(this.scroller.scrollTop=e,this._updateScrollState(e)):this._currentAnimationId===r&&(this.scroller.scrollTop=s(d,n,h,a),requestAnimationFrame(o.bind(this)))}.call(this)}else this.scroller.scrollTop=e,this._updateScrollState(e)},condense:function(e){if(this.condenses&&!this.fixed&&!this.noReveal)switch(this.headerState){case 1:this.scroll(this.scroller.scrollTop-(this._headerMaxDelta-this._headerMargin),e);break;case 0:case 3:this.scroll(this._headerMargin,e)}},scrollToTop:function(e){this.scroll(0,e)},_headerHeightChanged:function(e){null!==this._defaultCondsensedHeaderHeight&&(this._defaultCondsensedHeaderHeight=Math.round(1*e/3),this.condensedHeaderHeight=this._defaultCondsensedHeaderHeight)},_condensedHeaderHeightChanged:function(e){e&&this._defaultCondsensedHeaderHeight!=e&&(this._defaultCondsensedHeaderHeight=null)},_condensesChanged:function(){this._updateScrollState(this.scroller.scrollTop),this._condenseHeader(null)},_setup:function(){var e=this.scroller.style;if(e.paddingTop=this.fixed?"":this.headerHeight+"px",e.top=this.fixed?this.headerHeight+"px":"",this.fixed)this._setHeaderState(0),this._transformHeader(null);else switch(this.headerState){case 1:this._transformHeader(this._headerMaxDelta);break;case 2:this._transformHeader(this._headerMargin)}},_transformHeader:function(e){this._translateY(this.$.headerContainer,-e),this.condenses&&this._condenseHeader(e),this.fire("paper-header-transform",{y:e,height:this.headerHeight,condensedHeight:this.condensedHeaderHeight})},_condenseHeader:function(e){var t=null===e;!this.scrollAwayTopbar&&this.header&&this.header.$&&this.header.$.topBar&&this._translateY(this.header.$.topBar,t?null:Math.min(e,this._headerMargin)),this.noDissolve||(this.$.headerBg.style.opacity=t?"":(this._headerMargin-e)/this._headerMargin),this._translateY(this.$.headerBg,t?null:e/2),this.noDissolve||(this.$.condensedHeaderBg.style.opacity=t?"":e/this._headerMargin,this._translateY(this.$.condensedHeaderBg,t?null:e/2))},_translateY:function(e,t){this.transform(null===t?"":"translate3d(0, "+t+"px, 0)",e)},_scroll:function(e){this.header&&(this._updateScrollState(this.scroller.scrollTop),this.fire("content-scroll",{target:this.scroller},{cancelable:!1}))},_updateScrollState:function(e){var t=e-this._prevScrollTop,s=Math.max(0,this.noReveal?e:this._y+t);s>this._headerMaxDelta?(s=this._headerMaxDelta,this.keepCondensedHeader?this._setHeaderState(2):this._setHeaderState(1)):this.condenses&&e>=this._headerMargin?(s=Math.max(s,this._headerMargin),this._setHeaderState(2)):0===s?this._setHeaderState(0):this._setHeaderState(3),this.fixed||s===this._y||this._transformHeader(s),this._prevScrollTop=Math.max(e,0),this._y=s}}),Polymer.PaperScrollHeaderPanel.HEADER_STATE_EXPANDED=0,Polymer.PaperScrollHeaderPanel.HEADER_STATE_HIDDEN=1,Polymer.PaperScrollHeaderPanel.HEADER_STATE_CONDENSED=2,Polymer.PaperScrollHeaderPanel.HEADER_STATE_INTERPOLATED=3}()</script><dom-module id="paper-toolbar" assetpath="../bower_components/paper-toolbar/"><template><style>:host{display:block;position:relative;box-sizing:border-box;-moz-box-sizing:border-box;height:var(--paper-toolbar-height,64px);background:var(--paper-toolbar-background,--primary-color);color:var(--paper-toolbar-color,--dark-theme-text-color);@apply(--paper-toolbar)}:host(.animate){transition:var(--paper-toolbar-transition,height .18s ease-in)}:host(.medium-tall){height:calc(var(--paper-toolbar-height,64px) * 2);@apply(--paper-toolbar-medium)}:host(.tall){height:calc(var(--paper-toolbar-height,64px) * 3);@apply(--paper-toolbar-tall)}.toolbar-tools{position:relative;height:var(--paper-toolbar-height,64px);padding:0 16px;pointer-events:none;@apply(--layout-horizontal);@apply(--layout-center);@apply(--paper-toolbar-content)}@media (max-width:600px){:host{height:var(--paper-toolbar-sm-height,56px)}:host(.medium-tall){height:calc(var(--paper-toolbar-sm-height,56px) * 2)}:host(.tall){height:calc(var(--paper-toolbar-sm-height,56px) * 3)}.toolbar-tools{height:var(--paper-toolbar-sm-height,56px)}}#topBar{position:relative}#middleBar{position:absolute;top:0;right:0;left:0}:host(.medium-tall) #middleBar,:host(.tall) #middleBar{-webkit-transform:translateY(100%);transform:translateY(100%)}#bottomBar{position:absolute;right:0;bottom:0;left:0}.toolbar-tools>::content>:not([disabled]){pointer-events:auto}.toolbar-tools>::content .title{@apply(--paper-font-common-base);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;font-weight:400;line-height:1;pointer-events:none;@apply(--layout-flex);@apply(--paper-toolbar-title)}.toolbar-tools>::content paper-icon-button[icon=menu]{margin-right:24px}.toolbar-tools>::content>.title,.toolbar-tools>::content[select=".middle"]>.title,.toolbar-tools>::content[select=".bottom"]>.title{margin-left:56px}.toolbar-tools>::content>paper-icon-button+.title,.toolbar-tools>::content[select=".middle"] paper-icon-button+.title,.toolbar-tools>::content[select=".bottom"] paper-icon-button+.title{margin-left:0}.toolbar-tools>::content>.fit{position:absolute;top:auto;right:0;bottom:0;left:0;width:auto;margin:0}.start-justified{@apply(--layout-start-justified)}.center-justified{@apply(--layout-center-justified)}.end-justified{@apply(--layout-end-justified)}.around-justified{@apply(--layout-around-justified)}.justified{@apply(--layout-justified)}</style><div id="topBar" class$="toolbar-tools [[_computeBarExtraClasses(justify)]]"><content select=":not(.middle):not(.bottom)"></content></div><div id="middleBar" class$="toolbar-tools [[_computeBarExtraClasses(middleJustify)]]"><content select=".middle"></content></div><div id="bottomBar" class$="toolbar-tools [[_computeBarExtraClasses(bottomJustify)]]"><content select=".bottom"></content></div></template><script>Polymer({is:"paper-toolbar",hostAttributes:{role:"toolbar"},properties:{bottomJustify:{type:String,value:""},justify:{type:String,value:""},middleJustify:{type:String,value:""}},attached:function(){this._observer=this._observe(this),this._updateAriaLabelledBy()},detached:function(){this._observer&&this._observer.disconnect()},_observe:function(t){var e=new MutationObserver(function(){this._updateAriaLabelledBy()}.bind(this));return e.observe(t,{childList:!0,subtree:!0}),e},_updateAriaLabelledBy:function(){for(var t,e=[],i=Polymer.dom(this.root).querySelectorAll("content"),r=0;t=i[r];r++)for(var s,o=Polymer.dom(t).getDistributedNodes(),a=0;s=o[a];a++)if(s.classList&&s.classList.contains("title"))if(s.id)e.push(s.id);else{var l="paper-toolbar-label-"+Math.floor(1e4*Math.random());s.id=l,e.push(l)}e.length>0&&this.setAttribute("aria-labelledby",e.join(" "))},_computeBarExtraClasses:function(t){return t?t+("justified"===t?"":"-justified"):""}})</script></dom-module><dom-module id="partial-base" assetpath="layouts/"><style is="custom-style" include="iron-positioning"></style><style>:host{-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none}</style><template><paper-scroll-header-panel class="fit"><paper-toolbar><paper-icon-button icon="mdi:menu" class$="[[computeMenuButtonClass(narrow, showMenu)]]" on-tap="toggleMenu"></paper-icon-button><div class="title"><content select="[header-title]"></content></div><content select="[header-buttons]"></content></paper-toolbar><content></content></paper-scroll-header-panel></template></dom-module><dom-module id="domain-icon" assetpath="components/"><template><iron-icon icon="[[computeIcon(domain, state)]]"></iron-icon></template></dom-module><dom-module id="display-time" assetpath="components/"><template>[[computeTime(dateObj)]]</template></dom-module><dom-module id="logbook-entry" assetpath="components/"><style is="custom-style" include="iron-flex"></style><style>:host{@apply(--paper-font-body1);display:block;line-height:2em}display-time{width:55px;font-size:.8em;color:var(--secondary-text-color)}domain-icon{margin:0 8px 0 16px;color:var(--primary-text-color)}.name{text-transform:capitalize}.message{color:var(--primary-text-color)}a{color:var(--primary-color)}</style><template><div class="horizontal layout"><display-time date-obj="[[entryObj.when]]"></display-time><domain-icon domain="[[entryObj.domain]]" class="icon"></domain-icon><div class="message" flex=""><template is="dom-if" if="[[!entryObj.entityId]]"><span class="name">[[entryObj.name]]</span></template><template is="dom-if" if="[[entryObj.entityId]]"><a href="#" on-click="entityClicked" class="name">[[entryObj.name]]</a></template><span></span> <span>[[entryObj.message]]</span></div></div></template></dom-module><dom-module id="ha-logbook" assetpath="components/"><style>:host{display:block;padding:16px}</style><template><template is="dom-if" if="[[noEntries(entries)]]">No logbook entries found.</template><template is="dom-repeat" items="[[entries]]"><logbook-entry entry-obj="[[item]]"></logbook-entry></template></template></dom-module><dom-module id="loading-box" assetpath="components/"><style is="custom-style" include="iron-flex"></style><style>.text{display:inline-block;line-height:28px;vertical-align:top;margin-left:8px}</style><template><div class="layout horizontal"><paper-spinner active="true"></paper-spinner><div class="text"><content></content></div></div></template></dom-module><script>!function(t,e){"use strict";var n;if("object"==typeof exports){try{n=require("moment")}catch(i){}module.exports=e(n)}else"function"==typeof define&&define.amd?define(function(t){var i="moment";try{n=t(i)}catch(a){}return e(n)}):t.Pikaday=e(t.moment)}(this,function(t){"use strict";var e="function"==typeof t,n=!!window.addEventListener,i=window.document,a=window.setTimeout,o=function(t,e,i,a){n?t.addEventListener(e,i,!!a):t.attachEvent("on"+e,i)},s=function(t,e,i,a){n?t.removeEventListener(e,i,!!a):t.detachEvent("on"+e,i)},r=function(t,e,n){var a;i.createEvent?(a=i.createEvent("HTMLEvents"),a.initEvent(e,!0,!1),a=D(a,n),t.dispatchEvent(a)):i.createEventObject&&(a=i.createEventObject(),a=D(a,n),t.fireEvent("on"+e,a))},h=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},l=function(t,e){return-1!==(" "+t.className+" ").indexOf(" "+e+" ")},d=function(t,e){l(t,e)||(t.className=""===t.className?e:t.className+" "+e)},u=function(t,e){t.className=h((" "+t.className+" ").replace(" "+e+" "," "))},c=function(t){return/Array/.test(Object.prototype.toString.call(t))},f=function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())},g=function(t){var e=t.getDay();return 0===e||6===e},m=function(t){return t%4===0&&t%100!==0||t%400===0},p=function(t,e){return[31,m(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},y=function(t){f(t)&&t.setHours(0,0,0,0)},_=function(t,e){return t.getTime()===e.getTime()},D=function(t,e,n){var i,a;for(i in e)a=void 0!==t[i],a&&"object"==typeof e[i]&&null!==e[i]&&void 0===e[i].nodeName?f(e[i])?n&&(t[i]=new Date(e[i].getTime())):c(e[i])?n&&(t[i]=e[i].slice(0)):t[i]=D({},e[i],n):!n&&a||(t[i]=e[i]);return t},v=function(t){return t.month<0&&(t.year-=Math.ceil(Math.abs(t.month)/12),t.month+=12),t.month>11&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t},b={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},w=function(t,e,n){for(e+=t.firstDay;e>=7;)e-=7;return n?t.i18n.weekdaysShort[e]:t.i18n.weekdays[e]},M=function(t){if(t.isEmpty)return'<td class="is-empty"></td>';var e=[];return t.isDisabled&&e.push("is-disabled"),t.isToday&&e.push("is-today"),t.isSelected&&e.push("is-selected"),t.isInRange&&e.push("is-inrange"),t.isStartRange&&e.push("is-startrange"),t.isEndRange&&e.push("is-endrange"),'<td data-day="'+t.day+'" class="'+e.join(" ")+'"><button class="pika-button pika-day" type="button" data-pika-year="'+t.year+'" data-pika-month="'+t.month+'" data-pika-day="'+t.day+'">'+t.day+"</button></td>"},k=function(t,e,n){var i=new Date(n,0,1),a=Math.ceil(((new Date(n,e,t)-i)/864e5+i.getDay()+1)/7);return'<td class="pika-week">'+a+"</td>"},R=function(t,e){return"<tr>"+(e?t.reverse():t).join("")+"</tr>"},x=function(t){return"<tbody>"+t.join("")+"</tbody>"},N=function(t){var e,n=[];for(t.showWeekNumber&&n.push("<th></th>"),e=0;7>e;e++)n.push('<th scope="col"><abbr title="'+w(t,e)+'">'+w(t,e,!0)+"</abbr></th>");return"<thead>"+(t.isRTL?n.reverse():n).join("")+"</thead>"},C=function(t,e,n,i,a){var o,s,r,h,l,d=t._o,u=n===d.minYear,f=n===d.maxYear,g='<div class="pika-title">',m=!0,p=!0;for(r=[],o=0;12>o;o++)r.push('<option value="'+(n===a?o-e:12+o-e)+'"'+(o===i?" selected":"")+(u&&o<d.minMonth||f&&o>d.maxMonth?"disabled":"")+">"+d.i18n.months[o]+"</option>");for(h='<div class="pika-label">'+d.i18n.months[i]+'<select class="pika-select pika-select-month" tabindex="-1">'+r.join("")+"</select></div>",c(d.yearRange)?(o=d.yearRange[0],s=d.yearRange[1]+1):(o=n-d.yearRange,s=1+n+d.yearRange),r=[];s>o&&o<=d.maxYear;o++)o>=d.minYear&&r.push('<option value="'+o+'"'+(o===n?" selected":"")+">"+o+"</option>");return l='<div class="pika-label">'+n+d.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+r.join("")+"</select></div>",g+=d.showMonthAfterYear?l+h:h+l,u&&(0===i||d.minMonth>=i)&&(m=!1),f&&(11===i||d.maxMonth<=i)&&(p=!1),0===e&&(g+='<button class="pika-prev'+(m?"":" is-disabled")+'" type="button">'+d.i18n.previousMonth+"</button>"),e===t._o.numberOfMonths-1&&(g+='<button class="pika-next'+(p?"":" is-disabled")+'" type="button">'+d.i18n.nextMonth+"</button>"),g+="</div>"},T=function(t,e){return'<table cellpadding="0" cellspacing="0" class="pika-table">'+N(t)+x(e)+"</table>"},E=function(s){var r=this,h=r.config(s);r._onMouseDown=function(t){if(r._v){t=t||window.event;var e=t.target||t.srcElement;if(e)if(l(e,"is-disabled")||(l(e,"pika-button")&&!l(e,"is-empty")?(r.setDate(new Date(e.getAttribute("data-pika-year"),e.getAttribute("data-pika-month"),e.getAttribute("data-pika-day"))),h.bound&&a(function(){r.hide(),h.field&&h.field.blur()},100)):l(e,"pika-prev")?r.prevMonth():l(e,"pika-next")&&r.nextMonth()),l(e,"pika-select"))r._c=!0;else{if(!t.preventDefault)return t.returnValue=!1,!1;t.preventDefault()}}},r._onChange=function(t){t=t||window.event;var e=t.target||t.srcElement;e&&(l(e,"pika-select-month")?r.gotoMonth(e.value):l(e,"pika-select-year")&&r.gotoYear(e.value))},r._onInputChange=function(n){var i;n.firedBy!==r&&(e?(i=t(h.field.value,h.format),i=i&&i.isValid()?i.toDate():null):i=new Date(Date.parse(h.field.value)),f(i)&&r.setDate(i),r._v||r.show())},r._onInputFocus=function(){r.show()},r._onInputClick=function(){r.show()},r._onInputBlur=function(){var t=i.activeElement;do if(l(t,"pika-single"))return;while(t=t.parentNode);r._c||(r._b=a(function(){r.hide()},50)),r._c=!1},r._onClick=function(t){t=t||window.event;var e=t.target||t.srcElement,i=e;if(e){!n&&l(e,"pika-select")&&(e.onchange||(e.setAttribute("onchange","return;"),o(e,"change",r._onChange)));do if(l(i,"pika-single")||i===h.trigger)return;while(i=i.parentNode);r._v&&e!==h.trigger&&i!==h.trigger&&r.hide()}},r.el=i.createElement("div"),r.el.className="pika-single"+(h.isRTL?" is-rtl":"")+(h.theme?" "+h.theme:""),o(r.el,"mousedown",r._onMouseDown,!0),o(r.el,"touchend",r._onMouseDown,!0),o(r.el,"change",r._onChange),h.field&&(h.container?h.container.appendChild(r.el):h.bound?i.body.appendChild(r.el):h.field.parentNode.insertBefore(r.el,h.field.nextSibling),o(h.field,"change",r._onInputChange),h.defaultDate||(e&&h.field.value?h.defaultDate=t(h.field.value,h.format).toDate():h.defaultDate=new Date(Date.parse(h.field.value)),h.setDefaultDate=!0));var d=h.defaultDate;f(d)?h.setDefaultDate?r.setDate(d,!0):r.gotoDate(d):r.gotoDate(new Date),h.bound?(this.hide(),r.el.className+=" is-bound",o(h.trigger,"click",r._onInputClick),o(h.trigger,"focus",r._onInputFocus),o(h.trigger,"blur",r._onInputBlur)):this.show()};return E.prototype={config:function(t){this._o||(this._o=D({},b,!0));var e=D(this._o,t,!0);e.isRTL=!!e.isRTL,e.field=e.field&&e.field.nodeName?e.field:null,e.theme="string"==typeof e.theme&&e.theme?e.theme:null,e.bound=!!(void 0!==e.bound?e.field&&e.bound:e.field),e.trigger=e.trigger&&e.trigger.nodeName?e.trigger:e.field,e.disableWeekends=!!e.disableWeekends,e.disableDayFn="function"==typeof e.disableDayFn?e.disableDayFn:null;var n=parseInt(e.numberOfMonths,10)||1;if(e.numberOfMonths=n>4?4:n,f(e.minDate)||(e.minDate=!1),f(e.maxDate)||(e.maxDate=!1),e.minDate&&e.maxDate&&e.maxDate<e.minDate&&(e.maxDate=e.minDate=!1),e.minDate&&this.setMinDate(e.minDate),e.maxDate&&this.setMaxDate(e.maxDate),c(e.yearRange)){var i=(new Date).getFullYear()-10;e.yearRange[0]=parseInt(e.yearRange[0],10)||i,e.yearRange[1]=parseInt(e.yearRange[1],10)||i}else e.yearRange=Math.abs(parseInt(e.yearRange,10))||b.yearRange,e.yearRange>100&&(e.yearRange=100);return e},toString:function(n){return f(this._d)?e?t(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return e?t(this._d):null},setMoment:function(n,i){e&&t.isMoment(n)&&this.setDate(n.toDate(),i)},getDate:function(){return f(this._d)?new Date(this._d.getTime()):null},setDate:function(t,e){if(!t)return this._d=null,this._o.field&&(this._o.field.value="",r(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof t&&(t=new Date(Date.parse(t))),f(t)){var n=this._o.minDate,i=this._o.maxDate;f(n)&&n>t?t=n:f(i)&&t>i&&(t=i),this._d=new Date(t.getTime()),y(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),r(this._o.field,"change",{firedBy:this})),e||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(t){var e=!0;if(f(t)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),i=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),a=t.getTime();i.setMonth(i.getMonth()+1),i.setDate(i.getDate()-1),e=a<n.getTime()||i.getTime()<a}e&&(this.calendars=[{month:t.getMonth(),year:t.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustCalendars:function(){this.calendars[0]=v(this.calendars[0]);for(var t=1;t<this._o.numberOfMonths;t++)this.calendars[t]=v({month:this.calendars[0].month+t,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())},setMinDate:function(t){y(t),this._o.minDate=t,this._o.minYear=t.getFullYear(),this._o.minMonth=t.getMonth(),this.draw()},setMaxDate:function(t){y(t),this._o.maxDate=t,this._o.maxYear=t.getFullYear(),this._o.maxMonth=t.getMonth(),this.draw()},setStartRange:function(t){this._o.startRange=t},setEndRange:function(t){this._o.endRange=t},draw:function(t){if(this._v||t){var e=this._o,n=e.minYear,i=e.maxYear,o=e.minMonth,s=e.maxMonth,r="";this._y<=n&&(this._y=n,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=i&&(this._y=i,!isNaN(s)&&this._m>s&&(this._m=s));for(var h=0;h<e.numberOfMonths;h++)r+='<div class="pika-lendar">'+C(this,h,this.calendars[h].year,this.calendars[h].month,this.calendars[0].year)+this.render(this.calendars[h].year,this.calendars[h].month)+"</div>";if(this.el.innerHTML=r,e.bound&&"hidden"!==e.field.type&&a(function(){e.trigger.focus()},1),"function"==typeof this._o.onDraw){var l=this;a(function(){l._o.onDraw.call(l)},0)}}},adjustPosition:function(){var t,e,n,a,o,s,r,h,l,d;if(!this._o.container){if(this.el.style.position="absolute",t=this._o.trigger,e=t,n=this.el.offsetWidth,a=this.el.offsetHeight,o=window.innerWidth||i.documentElement.clientWidth,s=window.innerHeight||i.documentElement.clientHeight,r=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,"function"==typeof t.getBoundingClientRect)d=t.getBoundingClientRect(),h=d.left+window.pageXOffset,l=d.bottom+window.pageYOffset;else for(h=e.offsetLeft,l=e.offsetTop+e.offsetHeight;e=e.offsetParent;)h+=e.offsetLeft,l+=e.offsetTop;(this._o.reposition&&h+n>o||this._o.position.indexOf("right")>-1&&h-n+t.offsetWidth>0)&&(h=h-n+t.offsetWidth),(this._o.reposition&&l+a>s+r||this._o.position.indexOf("top")>-1&&l-a-t.offsetHeight>0)&&(l=l-a-t.offsetHeight),this.el.style.left=h+"px",this.el.style.top=l+"px"}},render:function(t,e){var n=this._o,i=new Date,a=p(t,e),o=new Date(t,e,1).getDay(),s=[],r=[];y(i),n.firstDay>0&&(o-=n.firstDay,0>o&&(o+=7));for(var h=a+o,l=h;l>7;)l-=7;h+=7-l;for(var d=0,u=0;h>d;d++){var c=new Date(t,e,1+(d-o)),m=f(this._d)?_(c,this._d):!1,D=_(c,i),v=o>d||d>=a+o,b=n.startRange&&_(n.startRange,c),w=n.endRange&&_(n.endRange,c),x=n.startRange&&n.endRange&&n.startRange<c&&c<n.endRange,N=n.minDate&&c<n.minDate||n.maxDate&&c>n.maxDate||n.disableWeekends&&g(c)||n.disableDayFn&&n.disableDayFn(c),C={day:1+(d-o),month:e,year:t,isSelected:m,isToday:D,isDisabled:N,isEmpty:v,isStartRange:b,isEndRange:w,isInRange:x};r.push(M(C)),7===++u&&(n.showWeekNumber&&r.unshift(k(d-o,e,t)),s.push(R(r,n.isRTL)),r=[],u=0)}return T(n,s)},isVisible:function(){return this._v},show:function(){this._v||(u(this.el,"is-hidden"),this._v=!0,this.draw(),this._o.bound&&(o(i,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var t=this._v;t!==!1&&(this._o.bound&&s(i,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",d(this.el,"is-hidden"),this._v=!1,void 0!==t&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),s(this.el,"mousedown",this._onMouseDown,!0),s(this.el,"touchend",this._onMouseDown,!0),s(this.el,"change",this._onChange),this._o.field&&(s(this._o.field,"change",this._onInputChange),this._o.bound&&(s(this._o.trigger,"click",this._onInputClick),s(this._o.trigger,"focus",this._onInputFocus),s(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},E})</script><style>@media all{@charset "UTF-8";/*!
* Pikaday
* Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/
*/.pika-single{z-index:9999;display:block;position:relative;color:#333;background:#fff;border:1px solid #ccc;border-bottom-color:#bbb;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.pika-single:after,.pika-single:before{content:" ";display:table}.pika-single:after{clear:both}.pika-single.is-hidden{display:none}.pika-single.is-bound{position:absolute;box-shadow:0 5px 15px -5px rgba(0,0,0,.5)}.pika-lendar{float:left;width:240px;margin:8px}.pika-title{position:relative;text-align:center}.pika-label{display:inline-block;position:relative;z-index:9999;overflow:hidden;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:700;background-color:#fff}.pika-title select{cursor:pointer;position:absolute;z-index:9998;margin:0;left:0;top:5px;filter:alpha(opacity=0);opacity:0}.pika-next,.pika-prev{display:block;cursor:pointer;position:relative;outline:0;border:0;padding:0;width:20px;height:30px;text-indent:20px;white-space:nowrap;overflow:hidden;background-color:transparent;background-position:center center;background-repeat:no-repeat;background-size:75% 75%;opacity:.5}.pika-next:hover,.pika-prev:hover{opacity:1}.is-rtl .pika-next,.pika-prev{float:left;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==)}.is-rtl .pika-prev,.pika-next{float:right;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=)}.pika-next.is-disabled,.pika-prev.is-disabled{cursor:default;opacity:.2}.pika-select{display:inline-block}.pika-table{width:100%;border-collapse:collapse;border-spacing:0;border:0}.pika-table td,.pika-table th{width:14.285714285714286%;padding:0}.pika-table th{color:#999;font-size:12px;line-height:25px;font-weight:700;text-align:center}.pika-button{cursor:pointer;display:block;box-sizing:border-box;-moz-box-sizing:border-box;outline:0;border:0;margin:0;width:100%;padding:5px;color:#666;font-size:12px;line-height:15px;text-align:right;background:#f5f5f5}.pika-week{font-size:11px;color:#999}.is-today .pika-button{color:#3af;font-weight:700}.is-selected .pika-button{color:#fff;font-weight:700;background:#3af;box-shadow:inset 0 1px 3px #178fe5;border-radius:3px}.is-inrange .pika-button{background:#D5E9F7}.is-startrange .pika-button{color:#fff;background:#6CB31D;box-shadow:none;border-radius:3px}.is-endrange .pika-button{color:#fff;background:#3af;box-shadow:none;border-radius:3px}.is-disabled .pika-button{pointer-events:none;cursor:default;color:#999;opacity:.3}.pika-button:hover{color:#fff;background:#ff8000;box-shadow:none;border-radius:3px}.pika-table abbr{border-bottom:none;cursor:help}}</style><dom-module id="partial-logbook" assetpath="layouts/"><style>.selected-date-container{padding:0 16px}paper-input{max-width:200px}</style><template><partial-base narrow="[[narrow]]" show-menu="[[showMenu]]"><span header-title="">Logbook</span><paper-icon-button icon="mdi:refresh" header-buttons="" on-tap="handleRefresh"></paper-icon-button><div><div class="selected-date-container"><paper-input label="Showing entries for" id="datePicker" value="[[selectedDate]]" on-focus="datepickerFocus"></paper-input><loading-box hidden$="[[!isLoading]]">Loading logbook entries</loading-box></div><ha-logbook entries="[[entries]]" hidden$="[[isLoading]]"></ha-logbook></div></partial-base></template></dom-module><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 is="state-history-chart-timeline"><style>:host{display:block}</style><template></template></dom-module><dom-module id="state-history-charts" assetpath="components/"><style>:host{display:block}.loading-container{text-align:center;padding:8px}.loading{height:0;overflow:hidden}</style><template><google-legacy-loader on-api-load="googleApiLoaded"></google-legacy-loader><div hidden$="{{!isLoading}}" class="loading-container"><loading-box>Updating history data</loading-box></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="[[extractUnit(item)]]" data="[[extractData(item)]]" is-single-device="[[isSingleDevice]]"></state-history-chart-line></template></div></template></dom-module><dom-module id="partial-history" assetpath="layouts/"><style is="custom-style" include="iron-flex"></style><style>.content{background-color:#fff}.content.wide{padding:8px}paper-input{max-width:200px}.narrow paper-input{margin-left:8px}</style><template><partial-base narrow="[[narrow]]" show-menu="[[showMenu]]"><span header-title="">History</span><paper-icon-button icon="mdi:refresh" header-buttons="" on-tap="handleRefreshClick"></paper-icon-button><div class$="[[computeContentClasses(narrow)]]"><paper-input label="Showing entries for" id="datePicker" value="[[selectedDate]]"></paper-input><state-history-charts state-history="[[stateHistory]]" is-loading-data="[[isLoadingData]]"></state-history-charts></div></partial-base></template></dom-module><script>!function(t,e,i){var n=t.L,o={};o.version="0.7.7","object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;i<o.length&&!n;i++)n=t[o[i]+e];return n}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,a=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,a,r){return e=o.bind(e,n),a&&s===i?void e():s.call(t,e,r)},o.Util.cancelAnimFrame=function(e){e&&a.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=o.extend({},n.options,t.options)),o.extend(n,t),n._initHooks=[];var a=this;return e.__super__=a.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;e>t;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(l=h+"_idx",u=l+"_len",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+"_idx",c=u+"_len",d=_[u],e){if(h=m&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u],delete _[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);r=u[t+"_idx"];for(h in r)if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in t,s=n&&!e.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf("webkit"),h=-1!==a.indexOf("chrome"),l=-1!==a.indexOf("phantom"),u=-1!==a.indexOf("android"),c=-1!==a.search("android [23]"),d=-1!==a.indexOf("gecko"),p=typeof orientation!=i+"",_=!t.PointerEvent&&t.MSPointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled||_,f="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=e.documentElement,v=n&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!c,P="MozPerspective"in g.style,L="OTransition"in g.style,x=!t.L_DISABLE_3D&&(v||y||P||L)&&!l,w=!t.L_NO_TOUCH&&!l&&(m||"ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch);o.Browser={ie:n,ielt9:s,webkit:r,gecko:d&&!r&&!t.opera&&!n,android:u,android23:c,chrome:h,ie3d:v,webkit3d:y,gecko3d:P,opera3d:L,any3d:x,mobile:p,mobileWebkit:p&&r,mobileWebkit3d:p&&y,mobileOpera:p&&t.opera,touch:w,msPointer:_,pointer:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=o.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var l=o.DomUtil.getStyle(a,"width"),u=o.DomUtil.getStyle(a,"max-width"),c=a.getBoundingClientRect();("none"!==l||"none"!==u)&&(s+=c.left+a.clientLeft),n+=c.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil._getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,a=n.length;a>s;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var r=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(r?r+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((" "+o.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1},getTranslateString:function(t){var e=o.Browser.webkit3d,i="translate"+(e?"3d":"")+"(",n=(e?",0":"")+")";return i+t.x+"px,"+t.y+"px"+n},getScaleString:function(t,e){var i=o.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t))),n=" scale("+t+") ";return i+n},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&o.Browser.any3d?t.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},o.DomUtil.TRANSFORM=o.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),o.DomUtil.TRANSITION=o.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),o.DomUtil.TRANSITION_END="webkitTransition"===o.DomUtil.TRANSITION||"OTransition"===o.DomUtil.TRANSITION?o.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in e)o.extend(o.DomUtil,{disableTextSelection:function(){o.DomEvent.on(t,"selectstart",o.DomEvent.preventDefault)},enableTextSelection:function(){o.DomEvent.off(t,"selectstart",o.DomEvent.preventDefault)}});else{var i=o.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);o.extend(o.DomUtil,{disableTextSelection:function(){if(i){var t=e.documentElement.style;this._userSelect=t[i],t[i]="none"}},enableTextSelection:function(){i&&(e.documentElement.style[i]=this._userSelect,delete this._userSelect)}})}o.extend(o.DomUtil,{disableImageDrag:function(){o.DomEvent.on(t,"dragstart",o.DomEvent.preventDefault)},enableImageDrag:function(){o.DomEvent.off(t,"dragstart",o.DomEvent.preventDefault)}})}(),o.LatLng=function(t,e,n){if(t=parseFloat(t),e=parseFloat(e),isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=t,this.lng=e,n!==i&&(this.alt=parseFloat(n))},o.extend(o.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),o.LatLng.prototype={equals:function(t){if(!t)return!1;t=o.latLng(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return e<=o.LatLng.MAX_MARGIN},toString:function(t){return"LatLng("+o.Util.formatNum(this.lat,t)+", "+o.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=o.latLng(t);var e=6378137,i=o.LatLng.DEG_TO_RAD,n=(t.lat-this.lat)*i,s=(t.lng-this.lng)*i,a=this.lat*i,r=t.lat*i,h=Math.sin(n/2),l=Math.sin(s/2),u=h*h+l*l*Math.cos(a)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))},wrap:function(t,e){var i=this.lng;return t=t||-180,e=e||180,i=(i+e)%(e-t)+(t>i||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===i?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return t=null!==e?e:o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=t instanceof o.Point?t:this.latLngToContainerPoint(t),r=a.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(r));return this.setView(h,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));s=e.maxZoom?Math.min(e.maxZoom,s):s;var a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return this.setView(l,s,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?o.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),a=n.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x<r.x||n.y<r.y:r.contains(n);while(u&&a>=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(s||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-(1/0),o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),a=new o.Bounds(n.subtract(s),n.add(s)),r=this._getBoundsOffset(a,i,e);return this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),s=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(n.x,-s.x),r=this._rebound(n.y,-s.y);return new o.Point(a,r)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),c=15,d=1e-7,p=c,_=.1;Math.abs(_)>d&&--p>0;)e=h*Math.sin(u),_=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u,u+=_;return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,
transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new o.Transformation(i,.5,-i,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-(1/0));for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||i<this.options.minZoom)){var s=o.bounds(e.min.divideBy(n)._floor(),e.max.divideBy(n)._floor());this._addTilesFromCenterOut(s),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(s)}}},_addTilesFromCenterOut:function(t){var i,n,s,a=[],r=t.getCenter();for(i=t.min.y;i<=t.max.y;i++)for(n=t.min.x;n<=t.max.x;n++)s=new o.Point(n,i),this._tileShouldBeLoaded(s)&&a.push(s);var h=a.length;if(0!==h){a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)});var l=e.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=h,n=0;h>n;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=this._getTileSize(),o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(i<t.min.x||i>t.max.x||n<t.min.y||n>t.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;e.detectRetina&&o.Browser.retina?i.width=i.height=2*n:i.width=i.height=n;for(var s in e)this.options.hasOwnProperty(s)||"crs"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+"&BBOX="+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+"Size"]);i="shadow"===e?o.point(n.shadowAnchor||n.iconAnchor):o.point(n.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s,a=e.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=a.length;i>t;t++)if(n=a[t].src,o=n.match(r))return s=n.split(r)[0],(s?s+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){return this._icon&&this._setPos(this._map.latLngToLayerPoint(this._latlng).round()),this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",s=t.icon.createIcon(this._icon),a=!1;s!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(s.title=t.title),t.alt&&(s.alt=t.alt)),o.DomUtil.addClass(s,n),t.keyboard&&(s.tabIndex="0"),this._icon=s,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(s,"mouseover",this._bringToFront,this).on(s,"mouseout",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),h=!1;r!==this._shadow&&(this._removeShadow(),h=!0),r&&o.DomUtil.addClass(r,n),this._shadow=r,t.opacity<1&&this._updateOpacity();var l=this._map._panes;a&&l.markerPane.appendChild(this._icon),r&&h&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)o.DomEvent.on(t,e[i],this._fireMouseEvent,this);o.Handler.MarkerDrag&&(this.dragging=new o.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&o.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t,latlng:this._latlng})},_onKeyPress:function(t){13===t.keyCode&&this.fire("click",{originalEvent:t,latlng:this._latlng})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t,latlng:this._latlng}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&o.DomEvent.preventDefault(t),"mousedown"!==t.type?o.DomEvent.stopPropagation(t):o.DomEvent.preventDefault(t)},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){o.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&o.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;return n.html!==!1?i.innerHTML=n.html:i.innerHTML="",n.bgPos&&(i.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.Map.mergeOptions({closePopupOnClick:!0}),o.Popup=o.Class.extend({includes:o.Mixin.Events,options:{minWidth:50,maxWidth:300,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(t,e){o.setOptions(this,t),this._source=e,this._animated=o.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._container||this._initLayout();var e=t.options.fadeAnimation;e&&o.DomUtil.setOpacity(this._container,0),t._panes.popupPane.appendChild(this._container),t.on(this._getEvents(),this),this.update(),e&&o.DomUtil.setOpacity(this._container,1),this.fire("open"),t.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(t){return t.addLayer(this),this},openOn:function(t){return t.openPopup(this),this},onRemove:function(t){t._panes.popupPane.removeChild(this._container),o.Util.falseFn(this._container.offsetWidth),t.off(this._getEvents(),this),t.options.fadeAnimation&&o.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),t.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_getEvents:function(){var t={viewreset:this._updatePosition};return this._animated&&(t.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,e="leaflet-popup",i=e+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),n=this._container=o.DomUtil.create("div",i);this.options.closeButton&&(t=this._closeButton=o.DomUtil.create("a",e+"-close-button",n),t.href="#close",t.innerHTML="&#215;",o.DomEvent.disableClickPropagation(t),o.DomEvent.on(t,"click",this._onCloseButtonClick,this));var s=this._wrapper=o.DomUtil.create("div",e+"-content-wrapper",n);o.DomEvent.disableClickPropagation(s),this._contentNode=o.DomUtil.create("div",e+"-content",s),o.DomEvent.disableScrollPropagation(this._contentNode),o.DomEvent.on(s,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",e+"-tip-container",n),this._tip=o.DomUtil.create("div",e+"-tip",this._tipContainer)},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,a="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=o.point(this.options.autoPanPaddingTopLeft||a),h=o.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;s.x+i+h.x>l.x&&(u=s.x+i-l.x+h.x),s.x-u-r.x<0&&(u=s.x-r.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-r.y<0&&(c=s.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t,t._source=this):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),"off"in t&&t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(n,s)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,"leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e<t.length;e++)o.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this._map&&this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),n=e.containerPointToLayerPoint(i),s=e.layerPointToLatLng(n);this.fire(t.type,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&o.DomEvent.preventDefault(t),"mousemove"!==t.type&&o.DomEvent.stopPropagation(t)}}}),o.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=o.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&o.Browser.any3d?(o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),
this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,n=i.x-e.x,s=i.y-e.y,a=this._pathRoot,r=this._panes.overlayPane;o.Browser.mobileWebkit&&r.removeChild(a),o.DomUtil.setPosition(a,e),a.setAttribute("width",n),a.setAttribute("height",s),a.setAttribute("viewBox",[e.x,e.y,n,s].join(" ")),o.Browser.mobileWebkit&&r.appendChild(a)}}}),o.Path.include({bindPopup:function(t,e){return t instanceof o.Popup?this._popup=t:((!this._popup||e)&&(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=o.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color),t.lineCap&&(this._ctx.lineCap=t.lineCap),t.lineJoin&&(this._ctx.lineJoin=t.lineJoin)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill(e.fillRule||"evenodd")),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click dblclick contextmenu",this._fireMouseEvent,this))},_fireMouseEvent:function(t){this._containsPoint(t.layerPoint)&&this.fire(t.type,t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0),r>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a="";s>n;n++)e=t[n],i&&e._round(),a+=(n?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)i=h.clipSegment(n[t],n[t+1],r,t),i&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,l=t.length,s=l-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)n=this._holes[e]=this._convertLatLngs(this._holes[e]),n[0].equals(n[n.length-1])&&n.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){var e=o.Polyline.prototype._getPathPartStr.call(this,t);return e+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),o.circle=function(t,e,i){return new o.Circle(t,e,i)},o.CircleMarker=o.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){o.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){o.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(t){return o.Circle.prototype.setLatLng.call(this,t),this._popup&&this._popup._isOpen&&this._popup.setLatLng(t),this},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}}),o.circleMarker=function(t,e){return new o.CircleMarker(t,e)},o.Polyline.include(o.Path.CANVAS?{_containsPoint:function(t,e){var i,n,s,a,r,h,l,u=this.options.weight/2;for(o.Browser.touch&&(u+=10),i=0,a=this._parts.length;a>i;i++)for(l=this._parts[i],n=0,r=l.length,s=r-1;r>n;s=n++)if((e||0!==n)&&(h=o.LineUtil.pointToSegmentDistance(t,l[s],l[n]),u>=h))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._parts[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i,n){var s,a,r,h,l="Feature"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case"Point":return s=i(u),e?e(t,s):new o.Marker(s);case"MultiPoint":for(r=0,h=u.length;h>r;r++)s=i(u[r]),c.push(e?e(t,s):new o.Marker(s));return new o.FeatureGroup(c);case"LineString":return a=this.coordsToLatLngs(u,0,i),new o.Polyline(a,n);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(u,1,i),new o.Polygon(a,n);case"MultiLineString":return a=this.coordsToLatLngs(u,1,i),new o.MultiPolyline(a,n);case"MultiPolygon":return a=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(a,n);case"GeometryCollection":for(r=0,h=l.geometries.length;h>r;r++)c.push(this.geometryToLayer({geometry:l.geometries[r],type:"Feature",properties:t.properties},e,i,n));return new o.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==i&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=o.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),o.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),o.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,n=[];if(i&&"MultiPoint"===i.type)return t("MultiPoint").call(this);var s=i&&"GeometryCollection"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),n.push(s?e.geometry:o.GeoJSON.asFeature(e)))}),s?o.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l="_leaflet_"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,s,h):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",s,!1),t.addEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?(a=s,r="mouseenter"===e?"mouseover":"mouseout",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):"click"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s="_leaflet_"+e+n,a=t[s];return a?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,n):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.on(t,o.Draggable.START[i],e);return o.DomEvent.on(t,"click",o.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&500>n||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(o.DomEvent.stopPropagation(t),!o.Draggable._disabled&&(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),!this._moving))){var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY),s=n.subtract(this._startPoint);(s.x||s.y)&&(o.Browser.touch&&Math.abs(s.x)+Math.abs(s.y)<3||(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(s),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=+new Date-this._lastTime,s=!i.inertia||n>i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),s)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+n-this._times[0])/1e3,h=i.easeLinearity,l=a.multiplyBy(h/r),u=l.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),d=l.multiplyBy(c/u),p=c/(i.inertiaDeceleration*h),_=d.multiplyBy(-p/2).round();_.x&&_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:p,easeLinearity:h,noMoveStart:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.pointer?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.pointer){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.pointer){var n,s={};for(var a in h)n=h[a],"function"==typeof n?s[a]=n.bind(h):s[a]=n;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,n);
case"touchend":return this.addPointerListenerEnd(t,e,i,n);case"touchmove":return this.addPointerListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,i,n,s){var a="_leaflet_",r=this._pointers,h=function(t){"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&o.DomEvent.preventDefault(t);for(var e=!1,i=0;i<r.length;i++)if(r[i].pointerId===t.pointerId){e=!0;break}e||r.push(t),t.touches=r.slice(),t.changedTouches=[t],n(t)};if(t[a+"touchstart"+s]=h,t.addEventListener(this.POINTER_DOWN,h,!1),!this._pointerDocumentListener){var l=function(t){for(var e=0;e<r.length;e++)if(r[e].pointerId===t.pointerId){r.splice(e,1);break}};e.documentElement.addEventListener(this.POINTER_UP,l,!1),e.documentElement.addEventListener(this.POINTER_CANCEL,l,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(t,e,i,n){function o(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._pointers;return t[s+"touchmove"+n]=o,t.addEventListener(this.POINTER_MOVE,o,!1),this},addPointerListenerEnd:function(t,e,i,n){var o="_leaflet_",s=this._pointers,a=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[o+"touchend"+n]=a,t.addEventListener(this.POINTER_UP,a,!1),t.addEventListener(this.POINTER_CANCEL,a,!1),this},removePointerListener:function(t,e,i){var n="_leaflet_",o=t[n+e+i];switch(e){case"touchstart":t.removeEventListener(this.POINTER_DOWN,o,!1);break;case"touchmove":t.removeEventListener(this.POINTER_MOVE,o,!1);break;case"touchend":t.removeEventListener(this.POINTER_UP,o,!1),t.removeEventListener(this.POINTER_CANCEL,o,!1)}return this}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToLayerPoint(t.touches[0]),s=i.mouseEventToLayerPoint(t.touches[1]),a=i._getCenterLayerPoint();this._startCenter=n.add(s)._divideBy(2),this._startDist=n.distanceTo(s),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(e.options.bounceAtZoomLimits||!(e.getZoom()===e.getMinZoom()&&this._scale<1||e.getZoom()===e.getMaxZoom()&&this._scale>1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button?!1:(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(s.x)-4)+"px",i.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"';i&&(n+=' checked="checked"'),n+="/>";var o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var a=e.createElement("span");a.innerHTML=" "+t.name,n.appendChild(i),n.appendChild(a);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(n),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=n.length;for(this._handlingClick=!0,t=0;o>t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(n=a[o.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,s,a,r){r||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a}),setTimeout(o.bind(this._onZoomTransitionEnd,this),250)},this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),o.Util.requestAnimFrame(function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)},this))}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth);var i=this._map.getZoom();(i>this.options.maxZoom||i<this.options.minZoom)&&this._clearBgBuffer(),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[o.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),n=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document)</script><dom-module id="leaflet-map" assetpath="../bower_components/leaflet-map/"><style>:host{display:block}:host #map{height:100%;width:100%}</style><style>.leaflet-image-layer,.leaflet-layer,.leaflet-map-pane,.leaflet-marker-icon,.leaflet-marker-pane,.leaflet-marker-shadow,.leaflet-overlay-pane,.leaflet-overlay-pane svg,.leaflet-popup-pane,.leaflet-shadow-pane,.leaflet-tile,.leaflet-tile-container,.leaflet-tile-pane,.leaflet-zoom-box{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden;-ms-touch-action:none;touch-action:none}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container img{max-width:none!important}.leaflet-container img.leaflet-image-layer{max-width:15000px!important}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-tile-pane{z-index:2}.leaflet-objects-pane{z-index:3}.leaflet-overlay-pane{z-index:4}.leaflet-shadow-pane{z-index:5}.leaflet-marker-pane{z-index:6}.leaflet-popup-pane{z-index:7}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:7;pointer-events:auto}.leaflet-bottom,.leaflet-top{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup,.leaflet-fade-anim .leaflet-tile{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup,.leaflet-fade-anim .leaflet-tile-loaded{opacity:1}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);-o-transition:-o-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-touching .leaflet-zoom-animated,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-clickable{cursor:pointer}.leaflet-container{cursor:-webkit-grab;cursor:-moz-grab}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-clickable,.leaflet-dragging .leaflet-container{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078A8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,.5)}.leaflet-container{font:12px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:4px}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px 'Lucida Console',Monaco,monospace;text-indent:1px}.leaflet-control-zoom-out{font-size:20px}.leaflet-touch .leaflet-control-zoom-in{font-size:22px}.leaflet-touch .leaflet-control-zoom-out{font-size:24px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(../bower_components/leaflet/dist/images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(../bower_components/leaflet/dist/images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255,255,255,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;font-size:11px;white-space:nowrap;overflow:hidden;-moz-box-sizing:content-box;box-sizing:content-box;background:#fff;background:rgba(255,255,255,.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 19px;line-height:1.4}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{margin:0 auto;width:40px;height:20px;position:relative;overflow:hidden}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;padding:4px 4px 0 0;text-align:center;width:18px;height:14px;font:16px/14px Tahoma,Verdana,sans-serif;color:#c3c3c3;text-decoration:none;font-weight:700;background:0 0}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678, M12=.70710678, M21=-.70710678, M22=.70710678)}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}</style><template><style>.leaflet-image-layer,.leaflet-layer,.leaflet-map-pane,.leaflet-marker-icon,.leaflet-marker-pane,.leaflet-marker-shadow,.leaflet-overlay-pane,.leaflet-overlay-pane svg,.leaflet-popup-pane,.leaflet-shadow-pane,.leaflet-tile,.leaflet-tile-container,.leaflet-tile-pane,.leaflet-zoom-box{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden;-ms-touch-action:none;touch-action:none}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container img{max-width:none!important}.leaflet-container img.leaflet-image-layer{max-width:15000px!important}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-tile-pane{z-index:2}.leaflet-objects-pane{z-index:3}.leaflet-overlay-pane{z-index:4}.leaflet-shadow-pane{z-index:5}.leaflet-marker-pane{z-index:6}.leaflet-popup-pane{z-index:7}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:7;pointer-events:auto}.leaflet-bottom,.leaflet-top{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup,.leaflet-fade-anim .leaflet-tile{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup,.leaflet-fade-anim .leaflet-tile-loaded{opacity:1}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);-o-transition:-o-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-touching .leaflet-zoom-animated,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-clickable{cursor:pointer}.leaflet-container{cursor:-webkit-grab;cursor:-moz-grab}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-clickable,.leaflet-dragging .leaflet-container{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078A8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,.5)}.leaflet-container{font:12px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:4px}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px 'Lucida Console',Monaco,monospace;text-indent:1px}.leaflet-control-zoom-out{font-size:20px}.leaflet-touch .leaflet-control-zoom-in{font-size:22px}.leaflet-touch .leaflet-control-zoom-out{font-size:24px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(../bower_components/leaflet/dist/images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(../bower_components/leaflet/dist/images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255,255,255,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;font-size:11px;white-space:nowrap;overflow:hidden;-moz-box-sizing:content-box;box-sizing:content-box;background:#fff;background:rgba(255,255,255,.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 19px;line-height:1.4}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{margin:0 auto;width:40px;height:20px;position:relative;overflow:hidden}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;padding:4px 4px 0 0;text-align:center;width:18px;height:14px;font:16px/14px Tahoma,Verdana,sans-serif;color:#c3c3c3;text-decoration:none;font-weight:700;background:0 0}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678, M12=.70710678, M21=-.70710678, M22=.70710678)}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}</style><div id="map"></div><content id="markers" select="*"></content></template></dom-module><script>"use strict";Polymer({is:"leaflet-map",properties:{latitude:{type:Number,value:51,reflectToAttribute:!0,notify:!0,observer:"_viewChanged"},longitude:{type:Number,value:0,reflectToAttribute:!0,notify:!0,observer:"_viewChanged"},zoom:{type:Number,value:-1,reflectToAttribute:!0,notify:!0,observer:"_viewChanged"},minZoom:{type:Number,value:0},maxZoom:{type:Number,value:9007199254740992},noDragging:{type:Boolean,value:!1},noTouchZoom:{type:Boolean,value:!1},noScrollWheelZoom:{type:Boolean,value:!1},noDoubleClickZoom:{type:Boolean,value:!1},noBoxZoom:{type:Boolean,value:!1},noTap:{type:Boolean,value:!1},tapTolerance:{type:Number,value:15},noTrackResize:{type:Boolean,value:!1},worldCopyJump:{type:Boolean,value:!1},noClosePopupOnClick:{type:Boolean,value:!1},noBounceAtZoomLimits:{type:Boolean,value:!1},noKeyboard:{type:Boolean,value:!1},keyboardPanOffset:{type:Number,value:80},keyboardZoomOffset:{type:Number,value:1},noInertia:{type:Boolean,value:!1},inertiaDeceleration:3e3,inertiaMaxSpeed:{type:Number,value:1500},noZoomControl:{type:Boolean,value:!1},noAttributionControl:{type:Boolean,value:!1},zoomAnimationThreshold:{type:Number,value:4},fitToMarkers:{type:Boolean,value:!1,observer:"_fitToMarkers"}},map:void 0,ready:function(){var e=this;setTimeout(function(){e.domReady()},1)},guessLeafletImagePath:function(){if(!L.Icon.Default.imagePath){var e,o,t,i,a,n=document.getElementsByTagName("link"),r=/[\/^]leaflet-map.html$/;for(e=0,o=n.length;o>e;e++)t=n[e].href,i=t.match(r),i&&(a=t.split(r)[0],L.Icon.Default.imagePath=(a?a+"/":"")+"../leaflet/dist/images")}},domReady:function(){this.guessLeafletImagePath();var e=L.map(this.$.map,{minZoom:this.minZoom,maxZoom:this.maxZoom,dragging:!this.noDragging,touchZoom:!this.noTouchZoom,scrollWheelZoom:!this.noScrollWheelZoom,doubleClickZoom:!this.noDoubleClickZoom,boxZoom:!this.noBoxZoom,tap:!this.noTap,tapTolerance:this.tapTolerance,trackResize:!this.noTrackResize,worldCopyJump:this.worldCopyJump,closePopupOnClick:!this.noClosePopupOnClick,bounceAtZoomLimits:!this.noBounceAtZoomLimits,keyboard:!this.noKeyboard,keyboardPanOffset:this.keyboardPanOffset,keyboardZoomOffset:this.keyboardZoomOffset,inertia:!this.noInertia,inertiaDeceleration:this.inertiaDeceleration,inertiaMaxSpeed:this.inertiaMaxSpeed,zoomControl:!this.noZoomControl,attributionControl:!this.noAttributionControl,zoomAnimationThreshold:this.zoomAnimationThreshold});this.map=e,this.fire("map-ready"),e.on("click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu focus blur preclick load unload viewreset movestart move moveend dragstart drag dragend zoomstart zoomend zoomlevelschange resize autopanstart layeradd layerremove baselayerchange overlayadd overlayremove locationfound locationerror popupopen popupclose",function(e){this.fire(e.type,e)},this),e.setView([this.latitude,this.longitude],this.zoom),e.on("moveend",function(o){this._ignoreViewChange=!0,this.longitude=e.getCenter().lng,this.latitude=e.getCenter().lat,this._ignoreViewChange=!1},this),e.on("zoomend",function(o){this.zoom=e.getZoom()},this),-1==this.zoom&&this.map.fitWorld();for(var o=!0,t=0;t<this.children.length;t++){var i=this.children[t];i.isLayer&&i.isLayer()&&(o=!1)}o&&L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery &copy; <a href="http://mapbox.com">Mapbox</a>',maxZoom:18}).addTo(this.map),this.registerMapOnChildren(),this._mutationObserver=new MutationObserver(this.registerMapOnChildren.bind(this)),this._mutationObserver.observe(this,{childList:!0})},detached:function(){this._mutationObserver.disconnect()},_viewChanged:function(e,o){this.map&&!this._ignoreViewChange&&setTimeout(function(){this.map.setView(L.latLng(this.latitude,this.longitude),this.zoom)}.bind(this),1)},registerMapOnChildren:function(){for(var e=0;e<this.children.length;e++)this.children[e].container=this.map;this._fitToMarkers()},_fitToMarkers:function(){if(this.map&&this.fitToMarkers){for(var e,o=[],t=0;e=this.children[t];t++)e.latitude&&e.longitude&&o.push([e.latitude,e.longitude]);o.length>0&&(this.map.fitBounds(o),this.map.invalidateSize())}},toGeoJSON:function(){for(var e,o={type:"FeatureCollection",features:[]},t=0;e=this.features[t];t++)o.features.push(e.feature.toGeoJSON());return o}})</script><script>"use strict";var leafletMap=leafletMap||{};leafletMap.LeafletPopupContent={attached:function(){MutationObserver&&!this.observer_&&(this.observer_=new MutationObserver(this.updatePopupContent.bind(this)),this.observer_.observe(this,{childList:!0,characterData:!0,attributes:!0,subtree:!0}))},updatePopupContent:function(){if(this.feature){this.feature.unbindPopup();var e=Polymer.dom(this).innerHTML.replace(/<\/?leaflet-point[^>]*>/g,"").trim();e&&this.feature.bindPopup(e)}},detached:function(){this.observer_&&this.observer_.disconnect()}}</script><script>"use strict";var leafletMap=leafletMap||{};window.leafletMap.LeafletPath={properties:{noStroke:{type:Boolean,value:!1},color:{type:String,value:"#03f"},weight:{type:Number,value:5},opacity:{type:Number,value:.5},fill:{type:Boolean,value:null},fillColor:{type:String,value:null},fillOpacity:{type:Number,value:.2},dashArray:{type:String,value:null},lineCap:{type:String,value:null},lineJoin:{type:String,value:null},noClickable:{type:Boolean,value:!1},pointerEvents:{type:String,value:null},className:{type:String,value:""}},getPathOptions:function(){return{stroke:!this.noStroke,color:this.color,weight:this.weight,opacity:this.opacity,fill:this.fill,fillColor:this.fillColor,fillOpacity:this.fillOpacity,dashArray:this.dashArray,lineCap:this.lineCap,lineJoin:this.lineJoin,clickable:!this.noClickable,pointerEvents:this.pointerEvents,className:this.className}}},window.leafletMap.LeafletPointContent={attached:function(){MutationObserver&&!this.observer_&&(this.observer_=new MutationObserver(this.updatePointContent.bind(this)),this.observer_.observe(this,{childList:!0,characterData:!0,attributes:!0,subtree:!0}))},updatePointContent:function(){if(this.feature){var t,e=[],i=this.children;for(t=0;t<i.length;t++)"leaflet-point"==i[t].localName&&e.push(L.latLng(i[t].getAttribute("latitude"),i[t].getAttribute("longitude")));this.feature.setLatLngs(e)}},detached:function(){this.observer_&&this.observer_.disconnect()}}</script><dom-module id="leaflet-circle" assetpath="../bower_components/leaflet-map/"><style>:host{display:none}</style><template></template></dom-module><script>"use strict";Polymer({is:"leaflet-circle",feature:null,behaviors:[leafletMap.LeafletPath,leafletMap.LeafletPopupContent],properties:{longitude:{type:Number,observer:"_updatePosition"},latitude:{type:Number,observer:"_updatePosition"},radius:{type:Number,value:100,observer:"_updateRadius"},container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){this.latitude&&this.longitude&&this.container&&(this.feature=L.circle([this.latitude,this.longitude],this.radius,this.getPathOptions()),this.feature.addTo(this.container),this.updatePopupContent(),this.feature.on("click dblclick mousedown mouseover mouseout contextmenu add remove popupopen popupclose",function(t){this.fire(t.type,t)},this))},_updatePosition:function(){this.feature&&null!=this.latitude&&null!=this.longitude&&this.feature.setLatLng(L.latLng(this.latitude,this.longitude))},_updateRadius:function(){this.feature&&null!=this.radius&&this.feature.setRadius(this.radius)},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature)}})</script><dom-module id="leaflet-point" assetpath="../bower_components/leaflet-map/"><script>Polymer({is:"leaflet-point",properties:{latitude:{type:Number,value:0,reflectToAttribute:!0},longitude:{type:Number,value:0,reflectToAttribute:!0}}})</script></dom-module><dom-module id="leaflet-polyline" assetpath="../bower_components/leaflet-map/"><style>:host{display:none}</style><template><content id="points" select="leaflet-point"></content></template></dom-module><script>"use strict";Polymer({is:"leaflet-polyline",behaviors:[leafletMap.LeafletPath,leafletMap.LeafletPointContent,leafletMap.LeafletPopupContent],feature:null,properties:{container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){this.container&&(this.feature=L.polyline([],this.getPathOptions()),this.feature.addTo(this.container),this.updatePointContent(),this.updatePopupContent(),this.feature.on("click dblclick mousedown mouseover mouseout contextmenu add remove popupopen popupclose",function(e){this.fire(e.type,e)},this))},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature)}})</script><dom-module id="leaflet-polygon" assetpath="../bower_components/leaflet-map/"><style>:host{display:none}</style><template><content id="points" select="leaflet-point"></content></template></dom-module><script>"use strict";Polymer({is:"leaflet-polygon",behaviors:[leafletMap.LeafletPath,leafletMap.LeafletPointContent,leafletMap.LeafletPopupContent],properties:{container:{type:Object,observer:"_containerChanged"}},feature:null,_containerChanged:function(){if(this.container){var e=this.getPathOptions();"undefined"!=typeof e.fill&&null!==e.fill||(e.fill=!0),this.feature=L.polygon([],e),this.feature.addTo(this.container),this.updatePointContent(),this.updatePopupContent(),this.feature.on("click dblclick mousedown mouseover mouseout contextmenu add remove popupopen popupclose",function(e){this.fire(e.type,e)},this)}},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature)}})</script><dom-module id="leaflet-scale-control" assetpath="../bower_components/leaflet-map/"><style>:host{display:none}</style><template></template><script>"use strict";Polymer({is:"leaflet-scale-control",properties:{position:{type:String,value:"bottomleft"},maxWidth:{type:Number,value:100},metric:{type:Boolean,value:!1},imperial:{type:Boolean,value:!1},updateWhenIdle:{type:Boolean,value:!1},container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){if(this.container){var t=L.control.scale({position:this.position,maxWidth:this.maxWidth,metric:this.metric||!this.imperial,imperial:this.imperial||!this.metric,updateWhenIdle:this.updateWhenIdle});this.control=t,this.control.addTo(this.container)}},detached:function(){this.container&&this.control&&this.container.removeControl(this.control)}})</script></dom-module><script>"use strict";var leafletMap=leafletMap||{};window.leafletMap.LeafletILayer={isLayer:function(){return!0}},window.leafletMap.LeafletTileLayer={properties:{minZoom:{type:Number,value:0},maxZoom:{type:Number,value:18},maxNativeZoom:{type:Number,value:null},tileSize:{type:Number,value:256},subdomains:{type:String,value:"abc"},errorTileUrl:{type:String,value:""},attribution:{type:String,value:""},tms:{type:Number,value:!1},continuousWorld:{type:Boolean,value:!1},noWrap:{type:Boolean,value:!1},zoomOffset:{type:Number,value:0},zoomReverse:{type:Boolean,value:!1},opacity:{type:Number,value:1,observer:"_opacityChanged"},zIndex:{type:Number,value:null,observer:"_zIndexChanged"},detectRetina:{type:Boolean,value:!1},reuseTiles:{type:Boolean,value:!1}},_opacityChanged:function(){this.layer&&this.layer.setOpacity(this.opacity)},_zIndexChanged:function(){this.layer&&this.layer.setZIndex(this.zIndex)},detached:function(){this.container&&this.layer&&this.container.removeLayer(this.layer)}}</script><dom-module id="leaflet-tilelayer" assetpath="../bower_components/leaflet-map/"><style>:host{display:none}</style><template></template></dom-module><script>"use strict";Polymer({is:"leaflet-tilelayer",behaviors:[leafletMap.LeafletILayer,leafletMap.LeafletTileLayer],properties:{url:{type:String,value:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",observer:"_urlChanged"},container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){if(this.container){var e=this.url.replace(new RegExp("%7B([sxyz])%7D","g"),"{$1}"),t=L.tileLayer(e,{attribution:Polymer.dom(this).innerHTML+this.attribution,minZoom:this.minZoom,maxZoom:this.maxZoom,maxNativeZoom:this.maxNativeZoom,tileSize:this.tileSize,subdomains:this.subdomains,errorTileUrl:this.errorTileUrl,tms:this.tms,continuousWorld:this.continuousWorld,noWrap:this.noWrap,zoomOffset:this.zoomOffset,zoomReverse:this.zoomReverse,opacity:this.opacity,zIndex:this.zIndex,detectRetina:this.detectRetina,reuseTiles:this.reuseTiles});this.layer=t,t.on("loading load tileloadstart tileload tileunload",function(e){this.fire(e.type,e)},this),this.layer.addTo(this.container)}},_urlChanged:function(){if(this.layer){var e=this.url.replace(new RegExp("%7B([sxyz])%7D","g"),"{$1}");this.layer.setUrl(e)}}})</script><dom-module id="leaflet-tilelayer-wms" assetpath="../bower_components/leaflet-map/"><style>:host{display:none}</style><template></template></dom-module><script>"use strict";Polymer({is:"leaflet-tilelayer-wms",behaviors:[leafletMap.LeafletILayer,leafletMap.LeafletTileLayer],properties:{url:{type:String,observer:"_urlChanged"},layers:{type:String,value:""},styles:{type:String,value:""},format:{type:String,value:"image/jpeg"},transparent:{type:Boolean,value:!1},version:{type:String,value:"1.1.1"},crs:Object,container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){if(this.container){var e=L.tileLayer.wms(this.url,{attribution:Polymer.dom(this).innerHTML+this.attribution,minZoom:this.minZoom,maxZoom:this.maxZoom,maxNativeZoom:this.maxNativeZoom,tileSize:this.tileSize,subdomains:this.subdomains,errorTileUrl:this.errorTileUrl,tms:this.tms,continuousWorld:this.continuousWorld,noWrap:this.noWrap,zoomOffset:this.zoomOffset,zoomReverse:this.zoomReverse,opacity:this.opacity,zIndex:this.zIndex,detectRetina:this.detectRetina,reuseTiles:this.reuseTiles,layers:this.layers,styles:this.styles,format:this.format,transparent:this.transparent,version:this.version,crs:this.crs});this.layer=e,e.on("loading load tileloadstart tileload tileunload",function(e){this.fire(e.type,e)},this),this.layer.addTo(this.container)}},_urlChanged:function(){this.layer&&this.layer.setUrl(this.url)}})</script>-<dom-module id="leaflet-layer-group" assetpath="../bower_components/leaflet-map/"><template></template></dom-module><script>"use strict";Polymer({is:"leaflet-layer-group",properties:{container:{type:Object,observer:"_containerChanged"}},ready:function(){this._mutationObserver=new MutationObserver(this.registerContainerOnChildren.bind(this)),this._mutationObserver.observe(this,{childList:!0})},_containerChanged:function(){if(this.container){var e=L.layerGroup();this.feature=e,this.feature.addTo(this.container),this.registerContaierOnChildren()}},registerContaierOnChildren:function(){for(var e=0;e<this.children.length;e++)this.children[e].container=this.feature},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature),this._mutationObserver.disconnect()}})</script><dom-element name="leaflet-geojson"><template><style>:host{display:none}</style></template></dom-element><script>"use strict";Polymer({is:"leaflet-geojson",behaviors:[leafletMap.LeafletILayer],properties:{data:{type:Object,observer:"_dataChanged"},container:{type:Object,observer:"_containerChanged"},color:{type:String,value:"#03f"},weight:{type:Number,value:5},opacity:{type:Number,value:.5},fill:{type:Boolean,value:null},fillColor:{type:String,value:null},fillOpacity:{type:Number,value:.2},dashArray:{type:String,value:null},lineCap:{type:String,value:null},lineJoin:{type:String,value:null}},_containerChanged:function(){this.container&&this.data&&this._dataChanged()},_dataChanged:function(){this.container&&this.data&&(this.feature&&this.container.removeLayer(this.feature),this.feature=L.geoJson(this.data),this.feature.addTo(this.container).setStyle({color:this.color,weight:this.weight,opacity:this.opacity,fill:this.fill,fillColor:this.fillColor,fillOpacity:this.fillOpacity,dashArray:this.dashArray,lineCap:this.lineCap,lineJoin:this.lineJoin}))},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature)}})</script><dom-module id="leaflet-icon" assetpath="../bower_components/leaflet-map/"><style>:host{display:none}</style><template></template><script>"use strict";Polymer({is:"leaflet-icon",properties:{iconUrl:{type:String,observer:"_attributeChanged"},iconRetinaUrl:{type:String,observer:"_attributeChanged"},iconWidth:{type:Number,observer:"_attributeChanged"},iconHeight:{type:Number,observer:"_attributeChanged"},iconAnchorX:{type:Number,observer:"_attributeChanged"},iconAnchorY:{type:Number,observer:"_attributeChanged"},shadowUrl:{type:String,observer:"_attributeChanged"},shadowRetinaUrl:{type:String,observer:"_attributeChanged"},shadowWidth:{type:Number,observer:"_attributeChanged"},shadowHeight:{type:Number,observer:"_attributeChanged"},shadowAnchorX:{type:Number,observer:"_attributeChanged"},shadowAnchorY:{type:Number,observer:"_attributeChanged"},popupAnchorX:{type:Number,observer:"_attributeChanged"},popupAnchorY:{type:Number,observer:"_attributeChanged"},className:{type:String,value:"",observer:"_attributeChanged"}},icon_:null,getIcon:function(){if(this.icon_)return this.icon_;var t={iconUrl:this.iconUrl,iconRetinaUrl:this.iconRetinaUrl,shadowUrl:this.shadowUrl,shadowRetinaUrl:this.shadowRetinaUrl,className:this.className};return this.iconWidth&&this.iconHeight&&(t.iconSize=L.point(this.iconWidth,this.iconHeight)),this.iconAnchorX&&this.iconAnchorY&&(t.iconAnchor=L.point(this.iconAnchorX,this.iconAnchorY)),this.shadowWidth&&this.shadowHeight&&(t.shadowSize=L.point(this.shadowWidth,this.shadowHeight)),this.shadowAnchorX&&this.shadowAnchorY&&(t.shadowAnchor=L.point(this.shadowAnchorX,this.shadowAnchorY)),this.popupAnchorX&&this.popupAnchorY&&(t.popupAnchor=L.point(this.popupAnchorX,this.popupAnchorY)),this.icon_=L.icon(t),this.icon_},_attributeChanged:function(){this.icon_=null}})</script></dom-module><dom-module id="leaflet-divicon" assetpath="../bower_components/leaflet-map/"><style>:host{display:none}</style><template></template><script>"use strict";Polymer({is:"leaflet-divicon",properties:{iconWidth:{type:Number,observer:"_attributeChanged"},iconHeight:{type:Number,observer:"_attributeChanged"},iconAnchorX:{type:Number,observer:"_attributeChanged"},iconAnchorY:{type:Number,observer:"_attributeChanged"},className:{type:String,value:"",observer:"_attributeChanged"}},icon_:null,getIcon:function(){if(this.icon_)return this.icon_;var i={className:this.className,html:Polymer.dom(this).innerHTML};return this.iconWidth&&this.iconHeight&&(i.iconSize=L.point(this.iconWidth,this.iconHeight)),this.iconAnchorX&&this.iconAnchorY&&(i.iconAnchor=L.point(this.iconAnchorX,this.iconAnchorY)),this.icon_=L.divIcon(i),this.icon_},_attributeChanged:function(){this.icon_=null}})</script></dom-module><dom-module id="leaflet-marker" assetpath="../bower_components/leaflet-map/"><style>:host{display:none}</style><template></template><script>"use strict";Polymer({is:"leaflet-marker",behaviors:[leafletMap.LeafletPopupContent],properties:{latitude:{type:Number,value:null,reflectToAttribute:!0,notify:!0,observer:"_positionChanged"},longitude:{type:Number,value:null,reflectToAttribute:!0,notify:!0,observer:"_positionChanged"},icon:{type:Object,observer:"_iconChanged"},noClickable:{type:Boolean,value:!1},draggable:{type:Boolean,value:!1},noKeyboard:{type:Boolean,value:!1},title:{type:String,value:""},alt:{type:String,value:""},zIndexOffset:{type:Number,value:0,observer:"_zIndexOffsetChanged"},opacity:{type:Number,value:1,observer:"_opacityChanged"},riseOnHover:{type:Boolean,value:!1},riseoffset:{type:Number,value:250},container:{type:Object,observer:"_containerChanged"}},feature:void 0,observer_:void 0,_containerChanged:function(){if(this.container){var e=L.marker([this.latitude,this.longitude],{clickable:!this.noClickable,draggable:this.draggable,keyboard:!this.noKeyboard,title:this.title,alt:this.alt,zIndexOffset:this.zIndexOffset,opacity:this.opacity,riseOnHover:this.riseOnHover,riseOffset:this.riseOffset});this.feature=e,this._iconChanged(),e.on("click dblclick mousedown mouseover mouseout contextmenu dragstart drag dragend move add remove popupopen popupclose",function(e){this.fire(e.type,e)},this),this.updatePopupContent(),this.feature.addTo(this.container)}},_iconChanged:function(){var e;if(this.icon){if("string"==typeof this.icon){var t=document.getElementById(this.icon);if(null!=t)t.getIcon&&(e=t.getIcon());else try{e=L.icon(JSON.parse(this.icon))}catch(i){e=new L.Icon.Default}}"object"==typeof this.icon&&(e=this.icon.options?this.icon:L.icon(this.icon))}e||(e=new L.Icon.Default),this.feature&&this.feature.setIcon(e)},_positionChanged:function(){this.feature&&this.feature.setLatLng(L.latLng(this.latitude,this.longitude))},_zIndexOffsetChanged:function(){this.feature&&this.feature.setZIndexOffset(this.zIndexOffset)},_opacityChanged:function(){this.feature&&this.feature.setOpacity(this.opacity)},detached:function(){this.container&&this.feature&&this.container.removeLayer(this.feature)}})</script></dom-module><dom-module id="leaflet-geolocation" assetpath="../bower_components/leaflet-map/"><style>:host{display:none}</style><template></template></dom-module><script>"use strict";Polymer({is:"leaflet-geolocation",properties:{watch:{type:Boolean,value:!1},setView:{type:Boolean,value:!1},maxZoom:{type:Number,value:1/0},timeout:{type:Number,value:1e4},maximumAge:{type:Number,value:0},enableHighAccuracy:{type:Boolean,value:!1},latitude:{type:Number,value:null,notify:!0},longitude:{type:Number,value:null,notify:!0},bounds:{type:Number,value:null,notify:!0},accuracy:{type:Number,value:null,notify:!0},altitude:{type:Number,value:null,notify:!0},altitudeAccuracy:{type:Number,value:null,notify:!0},heading:{type:Number,value:null,notify:!0},speed:{type:Number,value:null,notify:!0},timestamp:{type:Number,value:null,notify:!0},container:{type:Object,observer:"_containerChanged"}},_containerChanged:function(){this.container&&(this.container.on("locationfound locationerror",function(e){this.fire(e.type,e)},this),this.container.on("locationfound",function(e){this.latitude=e.latlng.lat,this.longitude=e.latlng.lng,this.bounds=e.bounds,this.accuracy=e.accuracy,this.altitude=e.altitude,this.altitudeAccuracy=e.altitudeAccuracy,this.heading=e.heading,this.speed=e.speed,this.timestamp=e.timestamp},this),this.container.locate({watch:this.watch,setView:this.setView,maxZoom:this.maxZoom,timeout:this.timeout,maximumAge:this.maximumAge,enableHighAccuracy:this.enableHighAccuracy}))}})</script><dom-module id="iron-image" assetpath="../bower_components/iron-image/"><template><style>:host{display:inline-block;overflow:hidden;position:relative}#sizedImgDiv{@apply(--layout-fit);display:none}#img{display:block;width:var(--iron-image-width,auto);height:var(--iron-image-height,auto)}:host([sizing]) #sizedImgDiv{display:block}:host([sizing]) #img{display:none}#placeholder{@apply(--layout-fit);background-color:inherit;opacity:1;@apply(--iron-image-placeholder)}#placeholder.faded-out{transition:opacity .5s linear;opacity:0}</style><div id="sizedImgDiv" role="img" hidden$="[[_computeImgDivHidden(sizing)]]" aria-hidden$="[[_computeImgDivARIAHidden(alt)]]" aria-label$="[[_computeImgDivARIALabel(alt, src)]]"></div><img id="img" alt$="[[alt]]" hidden$="[[_computeImgHidden(sizing)]]"><div id="placeholder" hidden$="[[_computePlaceholderHidden(preload, fade, loading, loaded)]]" class$="[[_computePlaceholderClassName(preload, fade, loading, loaded)]]"></div></template><script>Polymer({is:"iron-image",properties:{src:{observer:"_srcChanged",type:String,value:""},alt:{type:String,value:null},preventLoad:{type:Boolean,value:!1,observer:"_preventLoadChanged"},sizing:{type:String,value:null,reflectToAttribute:!0},position:{type:String,value:"center"},preload:{type:Boolean,value:!1},placeholder:{type:String,value:null,observer:"_placeholderChanged"},fade:{type:Boolean,value:!1},loaded:{notify:!0,readOnly:!0,type:Boolean,value:!1},loading:{notify:!0,readOnly:!0,type:Boolean,value:!1},error:{notify:!0,readOnly:!0,type:Boolean,value:!1},width:{observer:"_widthChanged",type:Number,value:null},height:{observer:"_heightChanged",type:Number,value:null}},observers:["_transformChanged(sizing, position)"],ready:function(){var e=this.$.img;e.onload=function(){this.$.img.src===this._resolveSrc(this.src)&&(this._setLoading(!1),this._setLoaded(!0),this._setError(!1))}.bind(this),e.onerror=function(){this.$.img.src===this._resolveSrc(this.src)&&(this._reset(),this._setLoading(!1),this._setLoaded(!1),this._setError(!0))}.bind(this),this._resolvedSrc=""},_load:function(e){e?this.$.img.src=e:this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage=e?'url("'+e+'")':"",this._setLoading(!!e),this._setLoaded(!1),this._setError(!1)},_reset:function(){this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",this._setLoading(!1),this._setLoaded(!1),this._setError(!1)},_computePlaceholderHidden:function(){return!this.preload||!this.fade&&!this.loading&&this.loaded},_computePlaceholderClassName:function(){return this.preload&&this.fade&&!this.loading&&this.loaded?"faded-out":""},_computeImgDivHidden:function(){return!this.sizing},_computeImgDivARIAHidden:function(){return""===this.alt?"true":void 0},_computeImgDivARIALabel:function(){if(null!==this.alt)return this.alt;if(""===this.src)return"";var e=new URL(this._resolveSrc(this.src)).pathname.split("/");return e[e.length-1]},_computeImgHidden:function(){return!!this.sizing},_widthChanged:function(){this.style.width=isNaN(this.width)?this.width:this.width+"px"},_heightChanged:function(){this.style.height=isNaN(this.height)?this.height:this.height+"px"},_preventLoadChanged:function(){this.preventLoad||this.loaded||(this._reset(),this._load(this.src))},_srcChanged:function(e,t){var i=this._resolveSrc(e);i!==this._resolvedSrc&&(this._resolvedSrc=i,this._reset(),this.preventLoad||this._load(e))},_placeholderChanged:function(){this.$.placeholder.style.backgroundImage=this.placeholder?'url("'+this.placeholder+'")':""},_transformChanged:function(){var e=this.$.sizedImgDiv.style,t=this.$.placeholder.style;e.backgroundSize=t.backgroundSize=this.sizing,e.backgroundPosition=t.backgroundPosition=this.sizing?this.position:"",e.backgroundRepeat=t.backgroundRepeat=this.sizing?"no-repeat":""},_resolveSrc:function(e){return Polymer.ResolveUrl.resolveUrl(e,this.ownerDocument.baseURI)}})</script></dom-module><dom-module id="ha-entity-marker" assetpath="components/entity/"><style is="custom-style" include="iron-positioning"></style><style>.marker{vertical-align:top;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-marker-color,--default-primary-color);color:#4c4c4c;background-color:#fff}iron-image{border-radius:50%}</style><template><div class="marker"><template is="dom-if" if="[[icon]]"><iron-icon icon="[[icon]]"></iron-icon></template><template is="dom-if" if="[[value]]">[[value]]</template><template is="dom-if" if="[[image]]"><iron-image sizing="cover" class="fit" src="[[image]]"></iron-image></template></div></template></dom-module><style>.leaflet-image-layer,.leaflet-layer,.leaflet-map-pane,.leaflet-marker-icon,.leaflet-marker-pane,.leaflet-marker-shadow,.leaflet-overlay-pane,.leaflet-overlay-pane svg,.leaflet-popup-pane,.leaflet-shadow-pane,.leaflet-tile,.leaflet-tile-container,.leaflet-tile-pane,.leaflet-zoom-box{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden;-ms-touch-action:none;touch-action:none}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container img{max-width:none!important}.leaflet-container img.leaflet-image-layer{max-width:15000px!important}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-tile-pane{z-index:2}.leaflet-objects-pane{z-index:3}.leaflet-overlay-pane{z-index:4}.leaflet-shadow-pane{z-index:5}.leaflet-marker-pane{z-index:6}.leaflet-popup-pane{z-index:7}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:7;pointer-events:auto}.leaflet-bottom,.leaflet-top{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup,.leaflet-fade-anim .leaflet-tile{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup,.leaflet-fade-anim .leaflet-tile-loaded{opacity:1}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);-o-transition:-o-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-touching .leaflet-zoom-animated,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-clickable{cursor:pointer}.leaflet-container{cursor:-webkit-grab;cursor:-moz-grab}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-clickable,.leaflet-dragging .leaflet-container{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078A8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,.5)}.leaflet-container{font:12px/1.5 "Helvetica Neue",Arial,Helvetica,sans-serif}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:4px}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px 'Lucida Console',Monaco,monospace;text-indent:1px}.leaflet-control-zoom-out{font-size:20px}.leaflet-touch .leaflet-control-zoom-in{font-size:22px}.leaflet-touch .leaflet-control-zoom-out{font-size:24px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(../bower_components/leaflet/dist/images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(../bower_components/leaflet/dist/images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255,255,255,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;font-size:11px;white-space:nowrap;overflow:hidden;-moz-box-sizing:content-box;box-sizing:content-box;background:#fff;background:rgba(255,255,255,.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 19px;line-height:1.4}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{margin:0 auto;width:40px;height:20px;position:relative;overflow:hidden}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;box-shadow:0 3px 14px rgba(0,0,0,.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;padding:4px 4px 0 0;text-align:center;width:18px;height:14px;font:16px/14px Tahoma,Verdana,sans-serif;color:#c3c3c3;text-decoration:none;font-weight:700;background:0 0}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678, M12=.70710678, M21=-.70710678, M22=.70710678)}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}</style><style>.leaflet-bottom,.leaflet-top{z-index:0}</style><dom-module id="partial-map" assetpath="layouts/"><style is="custom-style" include="iron-flex iron-positioning"></style><style>.map{position:relative}</style><template><div class="layout vertical fit"><paper-toolbar><paper-icon-button icon="mdi:menu" class$="[[computeMenuButtonClass(narrow, showMenu)]]" on-tap="toggleMenu"></paper-icon-button><div class="title">Map</div></paper-toolbar><div class="flex map"><leaflet-map class="fit" fit-to-markers="" id="map" max-zoom="17"><leaflet-tilelayer detect-retina="" max-zoom="18" url="https://otile1-s.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png">© <a href="/copyright">OpenStreetMap contributors</a>. Tiles courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="https://developer.mapquest.com/content/osm/mq_logo.png"></leaflet-tilelayer><template is="dom-repeat" items="[[zoneEntities]]"><leaflet-divicon id="[[item.entityId]]" icon-width="24" icon-height="24"><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></leaflet-divicon><leaflet-marker latitude="[[item.attributes.latitude]]" icon="[[item.entityId]]" longitude="[[item.attributes.longitude]]" title="[[item.entityDisplay]]" no-clickable=""></leaflet-marker><leaflet-circle latitude="[[item.attributes.latitude]]" longitude="[[item.attributes.longitude]]" no-clickable="" radius="[[item.attributes.radius]]" fill="" color="#FF9800"></leaflet-circle></template><template is="dom-repeat" items="[[locationEntities]]"><leaflet-divicon id="[[item.entityId]]" icon-height="45" icon-width="45"><ha-entity-marker entity-id$="[[item.entityId]]"></ha-entity-marker></leaflet-divicon><leaflet-marker latitude="[[item.attributes.latitude]]" icon="[[item.entityId]]" longitude="[[item.attributes.longitude]]" title="[[item.entityDisplay]]"></leaflet-marker><template is="dom-if" if="[[item.attributes.gps_accuracy]]"><leaflet-circle latitude="[[item.attributes.latitude]]" longitude="[[item.attributes.longitude]]" no-clickable="" radius="[[item.attributes.gps_accuracy]]" fill="" color="#0288D1"></leaflet-circle></template></template></leaflet-map></div></div></template></dom-module><dom-module id="iron-autogrow-textarea" assetpath="../bower_components/iron-autogrow-textarea/"><style>:host{display:inline-block;position:relative;width:400px;border:1px solid;padding:2px;-moz-appearance:textarea;-webkit-appearance:textarea;overflow:hidden}.mirror-text{visibility:hidden;word-wrap:break-word}.fit{@apply(--layout-fit)}textarea{position:relative;outline:0;border:none;resize:none;background:inherit;color:inherit;width:100%;height:100%;font-size:inherit;font-family:inherit;line-height:inherit;text-align:inherit;@apply(--iron-autogrow-textarea)}::content textarea:invalid{box-shadow:none}textarea::-webkit-input-placeholder{@apply(--iron-autogrow-textarea-placeholder)}textarea:-moz-placeholder{@apply(--iron-autogrow-textarea-placeholder)}textarea::-moz-placeholder{@apply(--iron-autogrow-textarea-placeholder)}textarea:-ms-input-placeholder{@apply(--iron-autogrow-textarea-placeholder)}</style><template><div id="mirror" class="mirror-text" aria-hidden="true">&nbsp;</div><div class="textarea-container fit"><textarea id="textarea" name$="[[name]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" disabled$="[[disabled]]" rows$="[[rows]]" maxlength$="[[maxlength]]"></textarea></div></template></dom-module><script>Polymer({is:"iron-autogrow-textarea",behaviors:[Polymer.IronFormElementBehavior,Polymer.IronValidatableBehavior,Polymer.IronControlState],properties:{bindValue:{observer:"_bindValueChanged",type:String},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean},maxlength:{type:Number}},listeners:{input:"_onInput"},observers:["_onValueChanged(value)"],get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(e){this.$.textarea.selectionStart=e},set selectionEnd(e){this.$.textarea.selectionEnd=e},validate:function(){if(!this.required&&""==this.value)return this.invalid=!1,!0;var e;return this.hasValidator()?e=Polymer.IronValidatableBehavior.validate.call(this,this.value):(e=this.$.textarea.validity.valid,this.invalid=!e),this.fire("iron-input-validate"),e},_bindValueChanged:function(){var e=this.textarea;e&&(e.value!==this.bindValue&&(e.value=this.bindValue||0===this.bindValue?this.bindValue:""),this.value=this.bindValue,this.$.mirror.innerHTML=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))},_onInput:function(e){this.bindValue=e.path?e.path[0].value:e.target.value},_constrain:function(e){var t;for(e=e||[""],t=this.maxRows>0&&e.length>this.maxRows?e.slice(0,this.maxRows):e.slice(0);this.rows>0&&t.length<this.rows;)t.push("");return t.join("<br/>")+"&#160;"},_valueForMirror:function(){var e=this.textarea;if(e)return this.tokens=e&&e.value?e.value.replace(/&/gm,"&amp;").replace(/"/gm,"&quot;").replace(/'/gm,"&#39;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").split("\n"):[""],this._constrain(this.tokens)},_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)},_onValueChanged:function(){this.bindValue=this.value}})</script><dom-module id="paper-textarea" assetpath="../bower_components/paper-input/"><template><style>:host{display:block}</style><paper-input-container no-label-float$="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]"><label hidden$="[[!label]]">[[label]]</label><iron-autogrow-textarea id="input" class="paper-input-input" bind-value="{{value}}" disabled$="[[disabled]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" maxlength$="[[maxlength]]" autocapitalize$="[[autocapitalize]]" rows$="[[rows]]" max-rows$="[[maxRows]]" on-change="_onChange"></iron-autogrow-textarea><template is="dom-if" if="[[errorMessage]]"><paper-input-error>[[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-textarea",behaviors:[Polymer.PaperInputBehavior,Polymer.IronFormElementBehavior],properties:{_ariaLabelledBy:{observer:"_ariaLabelledByChanged",type:String},_ariaDescribedBy:{observer:"_ariaDescribedByChanged",type:String},rows:{type:Number,value:1},maxRows:{type:Number,value:0}},_ariaLabelledByChanged:function(e){this.$.input.textarea.setAttribute("aria-labelledby",e)},_ariaDescribedByChanged:function(e){this.$.input.textarea.setAttribute("aria-describedby",e)},get _focusableElement(){return this.$.input.textarea}})</script><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><dom-module id="services-list" assetpath="components/"><style>ul{margin:0;padding:0}li{list-style:none;line-height:2em}a{color:var(--dark-primary-color)}</style><template><ul><template is="dom-repeat" items="[[computeDomains(serviceDomains)]]" as="domain"><template is="dom-repeat" items="[[computeServices(serviceDomains, domain)]]" as="service"><li><a href="#" on-click="serviceClicked"><span>[[domain]]</span>/<span>[[service]]</span></a></li></template></template></ul></template></dom-module><dom-module id="partial-dev-call-service" assetpath="layouts/"><style is="custom-style" include="iron-flex iron-positioning"></style><style>.content{@apply(--paper-font-body1);margin-top:64px;padding:24px;background-color:#fff;-ms-user-select:initial;-webkit-user-select:initial;-moz-user-select:initial}.ha-form{margin-right:16px}.description{margin-top:24px;white-space:pre-wrap}.header{@apply(--paper-font-title)}</style><template><partial-base narrow="[[narrow]]" show-menu="[[showMenu]]"><span header-title="">Services</span><div class$="[[computeFormClasses(narrow)]]"><div class="flex"><p>Call a service from a component.</p><div class="ha-form"><paper-input label="Domain" autofocus="" value="{{domain}}"></paper-input><paper-input label="Service" value="{{service}}"></paper-input><paper-textarea label="Service Data (JSON, optional)" value="{{serviceData}}"></paper-textarea><paper-button on-tap="callService" raised="">Call Service</paper-button></div><div class="description">[[description]]</div></div><div><div class="header">Available services</div><services-list on-service-selected="serviceSelected"></services-list></div></div></partial-base></template></dom-module><dom-module id="events-list" assetpath="components/"><style>ul{margin:0;padding:0}li{list-style:none;line-height:2em}a{color:var(--dark-primary-color)}</style><template><ul><template is="dom-repeat" items="[[events]]" as="event"><li><a href="#" on-click="eventSelected">{{event.event}}</a> <span>(</span><span>{{event.listenerCount}}</span><span> listeners)</span></li></template></ul></template></dom-module><dom-module id="partial-dev-fire-event" assetpath="layouts/"><style is="custom-style" include="iron-flex iron-positioning"></style><style>.content{@apply(--paper-font-body1);margin-top:64px;padding:24px;background-color:#fff;-ms-user-select:initial;-webkit-user-select:initial;-moz-user-select:initial}.ha-form{margin-right:16px}.header{@apply(--paper-font-title)}</style><template><partial-base narrow="{{narrow}}" show-menu="[[showMenu]]"><span header-title="">Events</span><div class$="[[computeFormClasses(narrow)]]"><div class="flex"><p>Fire an event on the event bus.</p><div class="ha-form"><paper-input label="Event Type" autofocus="" required="" value="{{eventType}}"></paper-input><paper-textarea label="Event Data (JSON, optional)" value="{{eventData}}"></paper-textarea><paper-button on-tap="fireEvent" raised="">Fire Event</paper-button></div></div><div><div class="header">Available Events</div><events-list on-event-selected="eventSelected"></events-list></div></div></partial-base></template></dom-module><dom-module id="entity-list" assetpath="components/"><style>ul{margin:0;padding:0}li{list-style:none;line-height:2em}a{color:var(--dark-primary-color)}</style><template><ul><template is="dom-repeat" items="[[entities]]" as="entity"><li><a href="#" on-click="entitySelected">[[entity.entityId]]</a></li></template></ul></template></dom-module><dom-module id="partial-dev-set-state" assetpath="layouts/"><style is="custom-style" include="iron-flex iron-positioning"></style><style>.content{@apply(--paper-font-body1);margin-top:64px;padding:24px;background-color:#fff;-ms-user-select:initial;-webkit-user-select:initial;-moz-user-select:initial}.ha-form{margin-right:16px}.header{@apply(--paper-font-title)}</style><template><partial-base narrow="[[narrow]]" show-menu="[[showMenu]]"><span header-title="">States</span><div class$="[[computeFormClasses(narrow)]]"><div class="flex"><p>Set the representation of a device within Home Assistant.<br>This will not communicate with the actual device.</p><div class="ha-form"><paper-input label="Entity ID" autofocus="" required="" value="{{entityId}}"></paper-input><paper-input label="State" required="" value="{{state}}"></paper-input><paper-textarea label="State attributes (JSON, optional)" value="{{stateAttributes}}"></paper-textarea><paper-button on-tap="handleSetState" raised="">Set State</paper-button></div></div><div><div class="header">Current entities</div><entity-list on-entity-selected="entitySelected"></entity-list></div></div></partial-base></template></dom-module><dom-module id="partial-dev-template" assetpath="layouts/"><style is="custom-style" include="iron-flex iron-positioning"></style><style>.content{@apply(--paper-font-body1);margin-top:64px;padding:16px;background-color:#fff;-ms-user-select:initial;-webkit-user-select:initial;-moz-user-select:initial}.edit-pane{margin-right:16px}.edit-pane a{color:var(--dark-primary-color)}.horizontal .edit-pane{max-width:50%}.render-pane{position:relative}.render-spinner{position:absolute;top:8px;right:8px}.rendered{@apply(--paper-font-code1)
clear: both;white-space:pre-wrap}.rendered.error{color:red}</style><template><partial-base narrow="[[narrow]]" show-menu="[[showMenu]]"><span header-title="">Template Editor</span><div class$="[[computeFormClasses(narrow)]]"><div class="edit-pane"><p>Templates are rendered using the Jinja2 template engine with some Home Assistant specific extensions.</p><ul><li><a href="http://jinja.pocoo.org/docs/dev/templates/" target="_blank">Jinja2 tempate documentation</a></li><li><a href="https://home-assistant.io/topics/templating/" target="_blank">Home Assistant template extensions</a></li></ul><paper-textarea label="Template" value="{{template}}"></paper-textarea></div><div class="render-pane"><paper-spinner class="render-spinner" active="[[rendering]]"></paper-spinner><pre class$="[[computeRenderedClasses(error)]]">[[processed]]</pre></div></div></partial-base></template></dom-module><dom-module id="partial-dev-info" assetpath="layouts/"><style is="custom-style" include="iron-positioning"></style><style>.content{margin-top:64px;padding:24px;background-color:#fff;-ms-user-select:initial;-webkit-user-select:initial;-moz-user-select:initial}.about{text-align:center;line-height:2em}.version{@apply(--paper-font-headline)}.develop{@apply(--paper-font-subhead)}.about a{color:var(--dark-primary-color)}.error-log-intro{margin-top:16px;border-top:1px solid var(--light-primary-color);padding-top:16px}paper-icon-button{float:right}.error-log{@apply(--paper-font-code1)
clear: both;white-space:pre-wrap}</style><template><partial-base narrow="[[narrow]]" show-menu="[[showMenu]]"><span header-title="">About</span><div class="content fit"><div class="about"><p class="version"><a href="https://home-assistant.io"><img src="/static/favicon-192x192.png" height="192"></a><br>Home Assistant<br>[[hassVersion]]</p><p class="develop"><a href="https://home-assistant.io/developers/credits/" target="_blank">Developed by a bunch of awesome people.</a></p><p>Published under the MIT license<br>Source: <a href="https://github.com/balloob/home-assistant" target="_blank">server</a><a href="https://github.com/balloob/home-assistant-polymer" target="_blank">frontend-ui</a><a href="https://github.com/balloob/home-assistant-js" target="_blank">frontend-core</a></p><p>Built using <a href="https://www.python.org">Python 3</a>, <a href="https://www.polymer-project.org" target="_blank">Polymer [[polymerVersion]]</a>, <a href="https://optimizely.github.io/nuclear-js/" target="_blank">NuclearJS [[nuclearVersion]]</a><br>Icons by <a href="https://www.google.com/design/icons/" target="_blank">Google</a> and <a href="https://MaterialDesignIcons.com" target="_blank">MaterialDesignIcons.com</a>.</p></div><p class="error-log-intro">The following errors have been logged this session:<paper-icon-button icon="mdi:refresh" on-tap="refreshErrorLog"></paper-icon-button></p><div class="error-log">[[errorLog]]</div></div></partial-base></template></dom-module><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;left:0;bottom:0;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:{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 console.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("_")?console.warn('The property "'+t+'" is private and was not set.'):t in this?this[t]=e[t]:console.warn('The property "'+t+'" is not valid.');this.open()},hide:function(){this.close()},center:function(){if(this.fitInto===window)this.style.bottom=this.style.left="";else{var e=this.fitInto.getBoundingClientRect();this.style.left=e.left+"px",this.style.bottom=window.innerHeight-e.bottom+"px"}},__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")},_onIronResize:function(){Polymer.IronOverlayBehaviorImpl._onIronResize.apply(this,arguments),this.opened&&(this.style.position="")}})}()</script></dom-module><dom-module id="notification-manager" assetpath="managers/"><style>paper-toast{z-index:1}</style><template><paper-toast id="toast" text="{{text}}" no-cancel-on-outside-click="[[neg]]"></paper-toast></template></dom-module><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){i?this.setAttribute("aria-modal","true"):this.setAttribute("aria-modal","false"),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,t=0;t<e.indexOf(this);t++){var o=e[t];if(o.hasAttribute&&(o.hasAttribute("dialog-dismiss")||o.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(o.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.withBackdrop&&this.backdropElement.open(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.withBackdrop&&this.backdropElement.close(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}})}()</script><dom-module id="paper-dialog-scrollable" assetpath="../bower_components/paper-dialog-scrollable/"><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><template><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><dom-module id="more-info-default" assetpath="more-infos/"><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>.data-entry .value{max-width:200px}</style><template><div class="layout vertical"><template is="dom-repeat" items="[[computeDisplayAttributes(stateObj)]]" as="attribute"><div class="data-entry layout justified horizontal"><div class="key">[[attribute]]</div><div class="value">[[getAttributeValue(stateObj, attribute)]]</div></div></template></div></template></dom-module><dom-module id="more-info-group" assetpath="more-infos/"><style>.child-card{margin-bottom:8px}.child-card:last-child{margin-bottom:0}</style><template><template is="dom-repeat" items="[[states]]" as="state"><div class="child-card"><state-card-content state-obj="[[state]]"></state-card-content></div></template></template></dom-module><dom-module id="more-info-sun" assetpath="more-infos/"><style is="custom-style" include="iron-flex iron-flex-alignment"></style><template><template is="dom-repeat" items="[[computeOrder(risingDate, settingDate)]]"><div class="data-entry layout justified horizontal"><div class="key"><span>[[itemCaption(item)]]</span><relative-ha-datetime datetime-obj="[[itemDate(item)]]"></relative-ha-datetime></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><dom-module id="more-info-configurator" assetpath="more-infos/"><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}</style><template><div class="layout vertical"><template is="dom-if" if="[[isConfigurable]]"><p hidden$="[[!stateObj.attributes.description]]">[[stateObj.attributes.description]]</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="" on-tap="submitClicked" hidden$="[[isConfiguring]]">[[submitCaption]]</paper-button><loading-box hidden$="[[!isConfiguring]]">Configuring</loading-box></p></template></div></template></dom-module><dom-module id="more-info-thermostat" assetpath="more-infos/"><style is="custom-style" include="iron-flex"></style><style>paper-slider{width:100%}.away-mode-toggle{display:none;margin-top:16px}.has-away_mode .away-mode-toggle{display:block}</style><template><div class$="[[computeClassNames(stateObj)]]"><div><div>Target Temperature</div><paper-slider min="[[tempMin]]" max="[[tempMax]]" step="0.5" value="[[targetTemperatureSliderValue]]" pin="" on-change="targetTemperatureSliderChanged"></paper-slider></div><div class="away-mode-toggle"><div class="center horizontal layout"><div class="flex">Away Mode</div><paper-toggle-button checked="[[awayToggleChecked]]" on-change="toggleChanged"></paper-toggle-button></div></div></div></template></dom-module><dom-module id="more-info-script" assetpath="more-infos/"><style is="custom-style" include="iron-flex iron-flex-alignment"></style><template><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><dom-module id="ha-color-picker" assetpath="components/"><style>canvas{cursor:crosshair}</style><template><canvas width="[[width]]" height="[[height]]"></canvas></template></dom-module><dom-module id="more-info-light" assetpath="more-infos/"><style is="custom-style" include="iron-flex"></style><style>.brightness,.color_temp{max-height:0;overflow:hidden;transition:max-height .5s ease-in}ha-color-picker{display:block;margin:0 auto;width:250px;max-height:0;overflow:hidden;transition:max-height .2s ease-in}.has-brightness .brightness,.has-color_temp .color_temp{margin-bottom:8px;max-height:40px}.has-rgb_color ha-color-picker{max-height:200px}</style><template><div class$="[[computeClassNames(stateObj)]]"><div class="brightness center horizontal layout"><div>Brightness</div><paper-slider max="255" id="brightness" value="{{brightnessSliderValue}}" on-change="brightnessSliderChanged" class="flex"></paper-slider></div><div class="color_temp center horizontal layout"><div>Color temperature</div><paper-slider min="154" max="500" id="color_temp" value="{{ctSliderValue}}" on-change="ctSliderChanged" class="flex"></paper-slider></div><ha-color-picker on-colorselected="colorPicked" height="200" width="250"></ha-color-picker></div></template></dom-module><dom-module id="more-info-media_player" assetpath="more-infos/"><style is="custom-style" include="iron-flex"></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}</style><template><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" 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$="[[!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></template></dom-module><dom-module id="more-info-camera" assetpath="more-infos/"><style>:host{max-width:640px}.camera-image{width:100%}</style><template><img class="camera-image" src="[[computeCameraImageUrl(stateObj)]]" on-load="imageLoaded"></template></dom-module><dom-module id="more-info-updater" assetpath="more-infos/"><style is="custom-style" include="iron-flex"></style><style>.link{color:#03A9F4}</style><template><div class="layout vertical"><a class="link" href="https://home-assistant.io/getting-started/#updating" target="_blank">Update Instructions</a></div></template></dom-module><dom-module id="more-info-alarm_control_panel" assetpath="more-infos/"><style is="custom-style" include="iron-flex"></style><template><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><dom-module id="more-info-lock" assetpath="more-infos/"><style>paper-input{display:inline-block}</style><template><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><dom-module id="more-info-content" assetpath="more-infos/"><style>:host{display:block}</style></dom-module><dom-module id="more-info-dialog" assetpath="dialogs/"><style>paper-dialog{font-size:14px}state-card-content{margin-bottom:24px;font-size:14px}@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><template><paper-dialog id="dialog" with-backdrop="" opened="{{dialogOpen}}"><h2><state-card-content state-obj="[[stateObj]]" in-dialog=""></state-card-content></h2><paper-dialog-scrollable><template is="dom-if" if="[[showHistoryComponent]]"><state-history-charts state-history="[[stateHistory]]" is-loading-data="[[isLoadingHistoryData]]"></state-history-charts></template><more-info-content state-obj="[[stateObj]]"></more-info-content></paper-dialog-scrollable></paper-dialog></template></dom-module><dom-module id="ha-voice-command-dialog" assetpath="dialogs/"><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><template><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.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="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><iron-iconset-svg name="notification" size="24"><svg><defs><g id="adb"><path d="M5 16c0 3.87 3.13 7 7 7s7-3.13 7-7v-4H5v4zM16.12 4.37l2.1-2.1-.82-.83-2.3 2.31C14.16 3.28 13.12 3 12 3s-2.16.28-3.09.75L6.6 1.44l-.82.83 2.1 2.1C6.14 5.64 5 7.68 5 10v1h14v-1c0-2.32-1.14-4.36-2.88-5.63zM9 9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"></path></g><g id="airline-seat-flat"><path d="M22 11v2H9V7h9c2.21 0 4 1.79 4 4zM2 14v2h6v2h8v-2h6v-2H2zm5.14-1.9c1.16-1.19 1.14-3.08-.04-4.24-1.19-1.16-3.08-1.14-4.24.04-1.16 1.19-1.14 3.08.04 4.24 1.19 1.16 3.08 1.14 4.24-.04z"></path></g><g id="airline-seat-flat-angled"><path d="M22.25 14.29l-.69 1.89L9.2 11.71l2.08-5.66 8.56 3.09c2.1.76 3.18 3.06 2.41 5.15zM1.5 12.14L8 14.48V19h8v-1.63L20.52 19l.69-1.89-19.02-6.86-.69 1.89zm5.8-1.94c1.49-.72 2.12-2.51 1.41-4C7.99 4.71 6.2 4.08 4.7 4.8c-1.49.71-2.12 2.5-1.4 4 .71 1.49 2.5 2.12 4 1.4z"></path></g><g id="airline-seat-individual-suite"><path d="M7 13c1.65 0 3-1.35 3-3S8.65 7 7 7s-3 1.35-3 3 1.35 3 3 3zm12-6h-8v7H3V7H1v10h22v-6c0-2.21-1.79-4-4-4z"></path></g><g id="airline-seat-legroom-extra"><path d="M4 12V3H2v9c0 2.76 2.24 5 5 5h6v-2H7c-1.66 0-3-1.34-3-3zm18.83 5.24c-.38-.72-1.29-.97-2.03-.63l-1.09.5-3.41-6.98c-.34-.68-1.03-1.12-1.79-1.12L11 9V3H5v8c0 1.66 1.34 3 3 3h7l3.41 7 3.72-1.7c.77-.36 1.1-1.3.7-2.06z"></path></g><g id="airline-seat-legroom-normal"><path d="M5 12V3H3v9c0 2.76 2.24 5 5 5h6v-2H8c-1.66 0-3-1.34-3-3zm15.5 6H19v-7c0-1.1-.9-2-2-2h-5V3H6v8c0 1.65 1.35 3 3 3h7v7h4.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5z"></path></g><g id="airline-seat-legroom-reduced"><path d="M19.97 19.2c.18.96-.55 1.8-1.47 1.8H14v-3l1-4H9c-1.65 0-3-1.35-3-3V3h6v6h5c1.1 0 2 .9 2 2l-2 7h1.44c.73 0 1.39.49 1.53 1.2zM5 12V3H3v9c0 2.76 2.24 5 5 5h4v-2H8c-1.66 0-3-1.34-3-3z"></path></g><g id="airline-seat-recline-extra"><path d="M5.35 5.64c-.9-.64-1.12-1.88-.49-2.79.63-.9 1.88-1.12 2.79-.49.9.64 1.12 1.88.49 2.79-.64.9-1.88 1.12-2.79.49zM16 19H8.93c-1.48 0-2.74-1.08-2.96-2.54L4 7H2l1.99 9.76C4.37 19.2 6.47 21 8.94 21H16v-2zm.23-4h-4.88l-1.03-4.1c1.58.89 3.28 1.54 5.15 1.22V9.99c-1.63.31-3.44-.27-4.69-1.25L9.14 7.47c-.23-.18-.49-.3-.76-.38-.32-.09-.66-.12-.99-.06h-.02c-1.23.22-2.05 1.39-1.84 2.61l1.35 5.92C7.16 16.98 8.39 18 9.83 18h6.85l3.82 3 1.5-1.5-5.77-4.5z"></path></g><g id="airline-seat-recline-normal"><path d="M7.59 5.41c-.78-.78-.78-2.05 0-2.83.78-.78 2.05-.78 2.83 0 .78.78.78 2.05 0 2.83-.79.79-2.05.79-2.83 0zM6 16V7H4v9c0 2.76 2.24 5 5 5h6v-2H9c-1.66 0-3-1.34-3-3zm14 4.07L14.93 15H11.5v-3.68c1.4 1.15 3.6 2.16 5.5 2.16v-2.16c-1.66.02-3.61-.87-4.67-2.04l-1.4-1.55c-.19-.21-.43-.38-.69-.5-.29-.14-.62-.23-.96-.23h-.03C8.01 7 7 8.01 7 9.25V15c0 1.66 1.34 3 3 3h5.07l3.5 3.5L20 20.07z"></path></g><g id="bluetooth-audio"><path d="M14.24 12.01l2.32 2.32c.28-.72.44-1.51.44-2.33 0-.82-.16-1.59-.43-2.31l-2.33 2.32zm5.29-5.3l-1.26 1.26c.63 1.21.98 2.57.98 4.02s-.36 2.82-.98 4.02l1.2 1.2c.97-1.54 1.54-3.36 1.54-5.31-.01-1.89-.55-3.67-1.48-5.19zm-3.82 1L10 2H9v7.59L4.41 5 3 6.41 8.59 12 3 17.59 4.41 19 9 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM11 5.83l1.88 1.88L11 9.59V5.83zm1.88 10.46L11 18.17v-3.76l1.88 1.88z"></path></g><g id="confirmation-number"><path d="M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2s.9-2 2-2zm-9 7.5h-2v-2h2v2zm0-4.5h-2v-2h2v2zm0-4.5h-2v-2h2v2z"></path></g><g id="disc-full"><path d="M20 16h2v-2h-2v2zm0-9v5h2V7h-2zM10 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 10c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g><g id="do-not-disturb"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"></path></g><g id="do-not-disturb-alt"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zM4 12c0-4.4 3.6-8 8-8 1.8 0 3.5.6 4.9 1.7L5.7 16.9C4.6 15.5 4 13.8 4 12zm8 8c-1.8 0-3.5-.6-4.9-1.7L18.3 7.1C19.4 8.5 20 10.2 20 12c0 4.4-3.6 8-8 8z"></path></g><g id="drive-eta"><path d="M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 15c-.83 0-1.5-.67-1.5-1.5S5.67 12 6.5 12s1.5.67 1.5 1.5S7.33 15 6.5 15zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 10l1.5-4.5h11L19 10H5z"></path></g><g id="enhanced-encryption"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9V6zM16 16h-3v3h-2v-3H8v-2h3v-3h2v3h3v2z"></path></g><g id="event-available"><path d="M16.53 11.06L15.47 10l-4.88 4.88-2.12-2.12-1.06 1.06L10.59 17l5.94-5.94zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"></path></g><g id="event-busy"><path d="M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"></path></g><g id="event-note"><path d="M17 10H7v2h10v-2zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zm-5-5H7v2h7v-2z"></path></g><g id="folder-special"><path d="M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-2.06 11L15 15.28 12.06 17l.78-3.33-2.59-2.24 3.41-.29L15 8l1.34 3.14 3.41.29-2.59 2.24.78 3.33z"></path></g><g id="live-tv"><path d="M21 6h-7.59l3.29-3.29L16 2l-4 4-4-4-.71.71L10.59 6H3c-1.1 0-2 .89-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.11-.9-2-2-2zm0 14H3V8h18v12zM9 10v8l7-4z"></path></g><g id="mms"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 14l3.5-4.5 2.5 3.01L14.5 8l4.5 6H5z"></path></g><g id="more"><path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.97.89 1.66.89H22c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 13.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm5 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm5 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g><g id="network-check"><path d="M15.9 5c-.17 0-.32.09-.41.23l-.07.15-5.18 11.65c-.16.29-.26.61-.26.96 0 1.11.9 2.01 2.01 2.01.96 0 1.77-.68 1.96-1.59l.01-.03L16.4 5.5c0-.28-.22-.5-.5-.5zM1 9l2 2c2.88-2.88 6.79-4.08 10.53-3.62l1.19-2.68C9.89 3.84 4.74 5.27 1 9zm20 2l2-2c-1.64-1.64-3.55-2.82-5.59-3.57l-.53 2.82c1.5.62 2.9 1.53 4.12 2.75zm-4 4l2-2c-.8-.8-1.7-1.42-2.66-1.89l-.55 2.92c.42.27.83.59 1.21.97zM5 13l2 2c1.13-1.13 2.56-1.79 4.03-2l1.28-2.88c-2.63-.08-5.3.87-7.31 2.88z"></path></g><g id="network-locked"><path d="M19.5 10c.17 0 .33.03.5.05V1L1 20h13v-3c0-.89.39-1.68 1-2.23v-.27c0-2.48 2.02-4.5 4.5-4.5zm2.5 6v-1.5c0-1.38-1.12-2.5-2.5-2.5S17 13.12 17 14.5V16c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1zm-1 0h-3v-1.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V16z"></path></g><g id="no-encryption"><path d="M21 21.78L4.22 5 3 6.22l2.04 2.04C4.42 8.6 4 9.25 4 10v10c0 1.1.9 2 2 2h12c.23 0 .45-.05.66-.12L19.78 23 21 21.78zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H9.66L20 18.34V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5-2.56 0-4.64 1.93-4.94 4.4L8.9 7.24V6z"></path></g><g id="ondemand-video"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-6l-7 4V7z"></path></g><g id="personal-video"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12z"></path></g><g id="phone-bluetooth-speaker"><path d="M14.71 9.5L17 7.21V11h.5l2.85-2.85L18.21 6l2.15-2.15L17.5 1H17v3.79L14.71 2.5l-.71.71L16.79 6 14 8.79l.71.71zM18 2.91l.94.94-.94.94V2.91zm0 4.3l.94.94-.94.94V7.21zm2 8.29c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z"></path></g><g id="phone-forwarded"><path d="M18 11l5-5-5-5v3h-4v4h4v3zm2 4.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z"></path></g><g id="phone-in-talk"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 12h2c0-4.97-4.03-9-9-9v2c3.87 0 7 3.13 7 7zm-4 0h2c0-2.76-2.24-5-5-5v2c1.66 0 3 1.34 3 3z"></path></g><g id="phone-locked"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM20 4v-.5C20 2.12 18.88 1 17.5 1S15 2.12 15 3.5V4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-.8 0h-3.4v-.5c0-.94.76-1.7 1.7-1.7s1.7.76 1.7 1.7V4z"></path></g><g id="phone-missed"><path d="M6.5 5.5L12 11l7-7-1-1-6 6-4.5-4.5H11V3H5v6h1.5V5.5zm17.21 11.17C20.66 13.78 16.54 12 12 12 7.46 12 3.34 13.78.29 16.67c-.18.18-.29.43-.29.71s.11.53.29.71l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.11.7-.28.79-.74 1.69-1.36 2.66-1.85.33-.16.56-.5.56-.9v-3.1c1.45-.48 3-.73 4.6-.73 1.6 0 3.15.25 4.6.72v3.1c0 .39.23.74.56.9.98.49 1.87 1.12 2.67 1.85.18.18.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.12-.52-.3-.7z"></path></g><g id="phone-paused"><path d="M17 3h-2v7h2V3zm3 12.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 3v7h2V3h-2z"></path></g><g id="power"><path d="M16.01 7L16 3h-2v4h-4V3H8v4h-.01C7 6.99 6 7.99 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1-1-2-1.99-1.99z"></path></g><g id="rv-hookup"><path d="M20 17v-6c0-1.1-.9-2-2-2H7V7l-3 3 3 3v-2h4v3H4v3c0 1.1.9 2 2 2h2c0 1.66 1.34 3 3 3s3-1.34 3-3h8v-2h-2zm-9 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm7-6h-4v-3h4v3zM17 2v2H9v2h8v2l3-3z"></path></g><g id="sd-card"><path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 6h-2V4h2v4zm3 0h-2V4h2v4zm3 0h-2V4h2v4z"></path></g><g id="sim-card-alert"><path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 15h-2v-2h2v2zm0-4h-2V8h2v5z"></path></g><g id="sms"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"></path></g><g id="sms-failed"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"></path></g><g id="sync"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"></path></g><g id="sync-disabled"><path d="M10 6.35V4.26c-.8.21-1.55.54-2.23.96l1.46 1.46c.25-.12.5-.24.77-.33zm-7.14-.94l2.36 2.36C4.45 8.99 4 10.44 4 12c0 2.21.91 4.2 2.36 5.64L4 20h6v-6l-2.24 2.24C6.68 15.15 6 13.66 6 12c0-1 .25-1.94.68-2.77l8.08 8.08c-.25.13-.5.25-.77.34v2.09c.8-.21 1.55-.54 2.23-.96l2.36 2.36 1.27-1.27L4.14 4.14 2.86 5.41zM20 4h-6v6l2.24-2.24C17.32 8.85 18 10.34 18 12c0 1-.25 1.94-.68 2.77l1.46 1.46C19.55 15.01 20 13.56 20 12c0-2.21-.91-4.2-2.36-5.64L20 4z"></path></g><g id="sync-problem"><path d="M3 12c0 2.21.91 4.2 2.36 5.64L3 20h6v-6l-2.24 2.24C5.68 15.15 5 13.66 5 12c0-2.61 1.67-4.83 4-5.65V4.26C5.55 5.15 3 8.27 3 12zm8 5h2v-2h-2v2zM21 4h-6v6l2.24-2.24C18.32 8.85 19 10.34 19 12c0 2.61-1.67 4.83-4 5.65v2.09c3.45-.89 6-4.01 6-7.74 0-2.21-.91-4.2-2.36-5.64L21 4zm-10 9h2V7h-2v6z"></path></g><g id="system-update"><path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14zm-1-6h-3V8h-2v5H8l4 4 4-4z"></path></g><g id="tap-and-play"><path d="M2 16v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0 4v3h3c0-1.66-1.34-3-3-3zm0-8v2c4.97 0 9 4.03 9 9h2c0-6.08-4.92-11-11-11zM17 1.01L7 1c-1.1 0-2 .9-2 2v7.37c.69.16 1.36.37 2 .64V5h10v13h-3.03c.52 1.25.84 2.59.95 4H17c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"></path></g><g id="time-to-leave"><path d="M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 15c-.83 0-1.5-.67-1.5-1.5S5.67 12 6.5 12s1.5.67 1.5 1.5S7.33 15 6.5 15zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 10l1.5-4.5h11L19 10H5z"></path></g><g id="vibration"><path d="M0 15h2V9H0v6zm3 2h2V7H3v10zm19-8v6h2V9h-2zm-3 8h2V7h-2v10zM16.5 3h-9C6.67 3 6 3.67 6 4.5v15c0 .83.67 1.5 1.5 1.5h9c.83 0 1.5-.67 1.5-1.5v-15c0-.83-.67-1.5-1.5-1.5zM16 19H8V5h8v14z"></path></g><g id="voice-chat"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12l-4-3.2V14H6V6h8v3.2L18 6v8z"></path></g><g id="vpn-lock"><path d="M22 4v-.5C22 2.12 20.88 1 19.5 1S17 2.12 17 3.5V4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-.8 0h-3.4v-.5c0-.94.76-1.7 1.7-1.7s1.7.76 1.7 1.7V4zm-2.28 8c.04.33.08.66.08 1 0 2.08-.8 3.97-2.1 5.39-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H7v-2h2c.55 0 1-.45 1-1V8h2c1.1 0 2-.9 2-2V3.46c-.95-.3-1.95-.46-3-.46C5.48 3 1 7.48 1 13s4.48 10 10 10 10-4.48 10-10c0-.34-.02-.67-.05-1h-2.03zM10 20.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L8 16v1c0 1.1.9 2 2 2v1.93z"></path></g><g id="wc"><path d="M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"></path></g><g id="wifi"><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z"></path></g></defs></svg></iron-iconset-svg><dom-module id="stream-status" assetpath="components/"><style>:host{display:inline-block;height:24px}paper-toggle-button{vertical-align:middle}iron-icon{opacity:var(--dark-primary-opacity)}</style><template><iron-icon icon="mdi:alert" hidden$="[[!hasError]]"></iron-icon><paper-toggle-button id="toggle" on-change="toggleChanged" checked$="[[isStreaming]]" hidden$="[[hasError]]"></paper-toggle-button></template></dom-module><dom-module id="ha-sidebar" assetpath="components/"><style is="custom-style" include="iron-flex iron-flex-alignment iron-positioning"></style><style>:host{--sidebar-text:{opacity:var(--dark-primary-opacity);font-weight:500;font-size:14px};}.sidenav{-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none}paper-toolbar{--paper-toolbar-title:{text-align:left;margin-left:0!important};--paper-toolbar-background:#fff;--paper-toolbar-color:#000;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-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)}.streaming{@apply(--sidebar-text)}.subheader{@apply(--sidebar-text);padding:16px}.dev-tools{padding:0 8px;opacity:var(--dark-secondary-opacity)}</style><template><paper-header-panel mode="scroll" class="sidenav fit"><paper-toolbar><div class="title">Home Assistant</div><paper-icon-button icon="mdi:chevron-left" hidden$="[[narrow]]" on-tap="toggleMenu"></paper-icon-button></paper-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><paper-icon-item on-tap="menuClicked" data-panel="map"><iron-icon item-icon="" icon="mdi:account-location"></iron-icon><span class="item-text">Map</span></paper-icon-item><template is="dom-if" if="[[hasHistoryComponent]]"><paper-icon-item on-tap="menuClicked" data-panel="history"><iron-icon item-icon="" icon="mdi:poll-box"></iron-icon><span class="item-text">History</span></paper-icon-item></template><template is="dom-if" if="[[hasLogbookComponent]]"><paper-icon-item on-tap="menuClicked" data-panel="logbook"><iron-icon item-icon="" icon="mdi:format-list-bulleted-type"></iron-icon><span class="item-text">Logbook</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><div class="divider"></div><paper-item class="horizontal layout justified"><div class="streaming">Streaming updates</div><stream-status></stream-status></paper-item><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="devService" on-tap="menuClicked"></paper-icon-button><paper-icon-button icon="mdi:code-tags" data-panel="devState" on-tap="menuClicked"></paper-icon-button><paper-icon-button icon="mdi:radio-tower" data-panel="devEvent" on-tap="menuClicked"></paper-icon-button><paper-icon-button icon="mdi:file-xml" data-panel="devTemplate" on-tap="menuClicked"></paper-icon-button><paper-icon-button icon="mdi:information-outline" data-panel="devInfo" on-tap="menuClicked"></paper-icon-button></div></div></paper-header-panel></template></dom-module><dom-module id="home-assistant-main" assetpath="layouts/"><template><notification-manager></notification-manager><more-info-dialog></more-info-dialog><ha-voice-command-dialog></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]]"></ha-sidebar><template is="dom-if" if="[[isSelectedStates]]"><partial-cards main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-cards></template><template is="dom-if" if="[[isSelectedLogbook]]"><partial-logbook main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-logbook></template><template is="dom-if" if="[[isSelectedHistory]]"><partial-history main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-history></template><template is="dom-if" if="[[isSelectedMap]]"><partial-map main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-map></template><template is="dom-if" if="[[isSelectedDevService]]"><partial-dev-call-service main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-dev-call-service></template><template is="dom-if" if="[[isSelectedDevEvent]]"><partial-dev-fire-event main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-dev-fire-event></template><template is="dom-if" if="[[isSelectedDevState]]"><partial-dev-set-state main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-dev-set-state></template><template is="dom-if" if="[[isSelectedDevTemplate]]"><partial-dev-template main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-dev-template></template><template is="dom-if" if="[[isSelectedDevInfo]]"><partial-dev-info main="" narrow="[[narrow]]" show-menu="[[showSidebar]]"></partial-dev-info></template></paper-drawer-panel></template></dom-module><style is="custom-style">:root{--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-toolbar-background:#03A9F4;font-size:14px}@-webkit-keyframes ha-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes ha-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.ha-spin{-webkit-animation:ha-spin 2s infinite linear;animation:ha-spin 2s infinite linear}</style></div><dom-module id="home-assistant"><style>:host{font-family:Roboto,Noto,sans-serif;font-weight:300;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}</style><template><template is="dom-if" if="[[!loaded]]"><login-form force-show-loading="[[computeForceShowLoading(dataLoaded, iconsLoaded)]]"></login-form></template><template is="dom-if" if="[[loaded]]"><home-assistant-main></home-assistant-main></template></template></dom-module><script>!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(e.s=175)}([function(t,e,n){"use strict";e.a=window.Polymer},function(t,e,n){"use strict";var r=n(73);e.a=new r.a},function(t,e,n){!function(e,n){t.exports=n()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),n(1);var i=n(2),o=r(i),a=n(6),s=r(a),u=n(3),c=r(u),l=n(5),f=n(11),d=n(10),h=n(7),p=r(h);e["default"]={Reactor:s["default"],Store:o["default"],Immutable:c["default"],isKeyPath:f.isKeyPath,isGetter:d.isGetter,toJS:l.toJS,toImmutable:l.toImmutable,isImmutable:l.isImmutable,createReactMixin:p["default"]},t.exports=e["default"]},function(t,e){"use strict";try{window.console&&console.log||(console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){}})}catch(n){}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return t instanceof c}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.isStore=i;var a=n(3),s=n(4),u=n(5),c=function(){function t(e){r(this,t),this.__handlers=(0,a.Map)({}),e&&(0,s.extend)(this,e),this.initialize()}return o(t,[{key:"initialize",value:function(){}},{key:"getInitialState",value:function(){return(0,a.Map)()}},{key:"handle",value:function(t,e,n){var r=this.__handlers.get(e);return"function"==typeof r?r.call(this,t,n,e):t}},{key:"handleReset",value:function(t){return this.getInitialState()}},{key:"on",value:function(t,e){this.__handlers=this.__handlers.set(t,e)}},{key:"serialize",value:function(t){return(0,u.toJS)(t)}},{key:"deserialize",value:function(t){return(0,u.toImmutable)(t)}}]),t}();e["default"]=(0,s.toFactory)(c)},function(t,e,n){!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return t.value=!1,t}function n(t){t&&(t.value=!0)}function r(){}function i(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;n>i;i++)r[i]=t[i+e];return r}function o(t){return void 0===t.size&&(t.size=t.__iterate(s)),t.size}function a(t,e){if("number"!=typeof e){var n=+e;if(""+n!==e)return NaN;e=n}return 0>e?o(t)+e:e}function s(){return!0}function u(t,e,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===e||void 0!==n&&e>=n)}function c(t,e){return f(t,e,0)}function l(t,e){return f(t,e,e)}function f(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function d(t){return _(t)?t:C(t)}function h(t){return m(t)?t:M(t)}function p(t){return y(t)?t:j(t)}function v(t){return _(t)&&!g(t)?t:P(t)}function _(t){return!(!t||!t[vn])}function m(t){return!(!t||!t[_n])}function y(t){return!(!t||!t[mn])}function g(t){return m(t)||y(t)}function b(t){return!(!t||!t[yn])}function S(t){this.next=t}function w(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function O(){return{value:void 0,done:!0}}function T(t){return!!D(t)}function I(t){return t&&"function"==typeof t.next}function E(t){var e=D(t);return e&&e.call(t)}function D(t){var e=t&&(wn&&t[wn]||t[On]);return"function"==typeof e?e:void 0}function k(t){return t&&"number"==typeof t.length}function C(t){return null===t||void 0===t?H():_(t)?t.toSeq():U(t)}function M(t){return null===t||void 0===t?H().toKeyedSeq():_(t)?m(t)?t.toSeq():t.fromEntrySeq():z(t)}function j(t){return null===t||void 0===t?H():_(t)?m(t)?t.entrySeq():t.toIndexedSeq():Y(t)}function P(t){return(null===t||void 0===t?H():_(t)?m(t)?t.entrySeq():t:Y(t)).toSetSeq()}function A(t){this._array=t,this.size=t.length}function L(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function x(t){this._iterable=t,this.size=t.length||t.size}function R(t){this._iterator=t,this._iteratorCache=[]}function N(t){return!(!t||!t[In])}function H(){return En||(En=new A([]))}function z(t){var e=Array.isArray(t)?new A(t).fromEntrySeq():I(t)?new R(t).fromEntrySeq():T(t)?new x(t).fromEntrySeq():"object"==typeof t?new L(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function Y(t){var e=V(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function U(t){var e=V(t)||"object"==typeof t&&new L(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function V(t){return k(t)?new A(t):I(t)?new R(t):T(t)?new x(t):void 0}function B(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,a=0;o>=a;a++){var s=i[n?o-a:a];if(e(s[1],r?s[0]:a,t)===!1)return a+1}return a}return t.__iterateUncached(e,n)}function G(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,a=0;return new S(function(){var t=i[n?o-a:a];return a++>o?O():w(e,r?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,n)}function F(){throw TypeError("Abstract")}function W(){}function q(){}function K(){}function J(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function $(t,e){return e?Z(e,t,"",{"":t}):X(t)}function Z(t,e,n,r){return Array.isArray(e)?t.call(r,n,j(e).map(function(n,r){return Z(t,n,r,e)})):Q(e)?t.call(r,n,M(e).map(function(n,r){return Z(t,n,r,e)})):e}function X(t){return Array.isArray(t)?j(t).map(X).toList():Q(t)?M(t).map(X).toMap():t}function Q(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return tt(n)}return"string"===e?t.length>Ln?nt(t):rt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function nt(t){var e=Nn[t];return void 0===e&&(e=rt(t),Rn===xn&&(Rn=0,Nn={}),Rn++,Nn[t]=e),e}function rt(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return tt(e)}function it(t){var e;if(jn&&(e=Dn.get(t),void 0!==e))return e;if(e=t[An],void 0!==e)return e;if(!Mn){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[An],void 0!==e)return e;if(e=ot(t),void 0!==e)return e}if(e=++Pn,1073741824&Pn&&(Pn=0),jn)Dn.set(t,e);else{if(void 0!==Cn&&Cn(t)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(Mn)Object.defineProperty(t,An,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[An]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[An]=e}}return e}function ot(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function at(t,e){if(!t)throw new Error(e)}function st(t){at(t!==1/0,"Cannot perform this action with an infinite size.")}function ut(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function lt(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function dt(t){var e=At(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Lt,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return e(n,t,r)!==!1},n)},e.__iteratorUncached=function(e,n){if(e===Sn){var r=t.__iterator(e,n);return new S(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===bn?gn:bn,n)},e}function ht(t,e,n){var r=At(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,dn);return o===dn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,a){return r(e.call(n,t,i,a),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(Sn,i);return new S(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return w(r,s,e.call(n,a[1],s,t),i)})},r}function pt(t,e){var n=At(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=dt(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=Lt,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function vt(t,e,n,r){var i=At(t);return r&&(i.has=function(r){var i=t.get(r,dn);return i!==dn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,dn);return o!==dn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return t.__iterate(function(t,o,u){return e.call(n,t,o,u)?(s++,i(t,r?o:s-1,a)):void 0},o),s},i.__iteratorUncached=function(i,o){var a=t.__iterator(Sn,o),s=0;return new S(function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(e.call(n,l,c,t))return w(i,r?c:s++,l,o)}})},i}function _t(t,e,n){var r=Nt().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function mt(t,e,n){var r=m(t),i=(b(t)?Oe():Nt()).asMutable();t.__iterate(function(o,a){i.update(e.call(n,o,a,t),function(t){return t=t||[],t.push(r?[a,o]:o),t})});var o=Pt(t);return i.map(function(e){return Ct(t,o(e))})}function yt(t,e,n,r){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==n&&(n=0|n),u(e,n,i))return t;var o=c(e,i),s=l(n,i);if(o!==o||s!==s)return yt(t.toSeq().cacheResult(),e,n,r);var f,d=s-o;d===d&&(f=0>d?0:d);var h=At(t);return h.size=0===f?f:t.size&&f||void 0,!r&&N(t)&&f>=0&&(h.get=function(e,n){return e=a(this,e),e>=0&&f>e?t.get(e+o,n):n}),h.__iterateUncached=function(e,n){var i=this;if(0===f)return 0;if(n)return this.cacheResult().__iterate(e,n);var a=0,s=!0,u=0;return t.__iterate(function(t,n){return s&&(s=a++<o)?void 0:(u++,e(t,r?n:u-1,i)!==!1&&u!==f)}),u},h.__iteratorUncached=function(e,n){if(0!==f&&n)return this.cacheResult().__iterator(e,n);var i=0!==f&&t.__iterator(e,n),a=0,s=0;return new S(function(){for(;a++<o;)i.next();if(++s>f)return O();var t=i.next();return r||e===bn?t:e===gn?w(e,s-1,void 0,t):w(e,s-1,t.value[1],t)})},h}function gt(t,e,n){var r=At(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return t.__iterate(function(t,i,s){return e.call(n,t,i,s)&&++a&&r(t,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=t.__iterator(Sn,i),s=!0;return new S(function(){if(!s)return O();var t=a.next();if(t.done)return t;var i=t.value,u=i[0],c=i[1];return e.call(n,c,u,o)?r===Sn?t:w(r,u,c,t):(s=!1,O())})},r}function bt(t,e,n,r){var i=At(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate(function(t,o,c){return s&&(s=e.call(n,t,o,c))?void 0:(u++,i(t,r?o:u-1,a))}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(Sn,o),u=!0,c=0;return new S(function(){var t,o,l;do{if(t=s.next(),t.done)return r||i===bn?t:i===gn?w(i,c++,void 0,t):w(i,c++,t.value[1],t);var f=t.value;o=f[0],l=f[1],u&&(u=e.call(n,l,o,a))}while(u);return i===Sn?t:w(i,o,l,t)})},i}function St(t,e){var n=m(t),r=[t].concat(e).map(function(t){return _(t)?n&&(t=h(t)):t=n?z(t):Y(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===r.length)return t;if(1===r.length){var i=r[0];if(i===t||n&&m(i)||y(t)&&y(i))return i}var o=new A(r);return n?o=o.toKeyedSeq():y(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=r.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),o}function wt(t,e,n){var r=At(t);return r.__iterateUncached=function(r,i){function o(t,u){var c=this;t.__iterate(function(t,i){return(!e||e>u)&&_(t)?o(t,u+1):r(t,n?i:a++,c)===!1&&(s=!0),!s},i)}var a=0,s=!1;return o(t,0),a},r.__iteratorUncached=function(r,i){var o=t.__iterator(r,i),a=[],s=0;return new S(function(){for(;o;){var t=o.next();if(t.done===!1){var u=t.value;if(r===Sn&&(u=u[1]),e&&!(a.length<e)||!_(u))return n?t:w(r,s++,u,t);a.push(o),o=u.__iterator(r,i)}else o=a.pop()}return O()})},r}function Ot(t,e,n){var r=Pt(t);return t.toSeq().map(function(i,o){return r(e.call(n,i,o,t))}).flatten(!0)}function Tt(t,e){var n=At(t);return n.size=t.size&&2*t.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return t.__iterate(function(t,r){return(!o||n(e,o++,i)!==!1)&&n(t,o++,i)!==!1},r),o},n.__iteratorUncached=function(n,r){var i,o=t.__iterator(bn,r),a=0;return new S(function(){return(!i||a%2)&&(i=o.next(),i.done)?i:a%2?w(n,a++,e):w(n,a++,i.value,i)})},n}function It(t,e,n){e||(e=xt);var r=m(t),i=0,o=t.toSeq().map(function(e,r){return[r,e,i++,n?n(e,r,t):e]}).toArray();return o.sort(function(t,n){return e(t[3],n[3])||t[2]-n[2]}).forEach(r?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),r?M(o):y(t)?j(o):P(o)}function Et(t,e,n){if(e||(e=xt),n){var r=t.toSeq().map(function(e,r){return[e,n(e,r,t)]}).reduce(function(t,n){return Dt(e,t[1],n[1])?n:t});return r&&r[0]}return t.reduce(function(t,n){return Dt(e,t,n)?n:t})}function Dt(t,e,n){var r=t(n,e);return 0===r&&n!==e&&(void 0===n||null===n||n!==n)||r>0}function kt(t,e,n){var r=At(t);return r.size=new A(n).map(function(t){return t.size}).min(),r.__iterate=function(t,e){for(var n,r=this.__iterator(bn,e),i=0;!(n=r.next()).done&&t(n.value,i++,this)!==!1;);return i},r.__iteratorUncached=function(t,r){var i=n.map(function(t){return t=d(t),E(r?t.reverse():t)}),o=0,a=!1;return new S(function(){var n;return a||(n=i.map(function(t){return t.next()}),a=n.some(function(t){return t.done})),a?O():w(t,o++,e.apply(null,n.map(function(t){return t.value})))})},r}function Ct(t,e){return N(t)?e:t.constructor(e)}function Mt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function jt(t){return st(t.size),o(t)}function Pt(t){return m(t)?h:y(t)?p:v}function At(t){return Object.create((m(t)?M:y(t)?j:P).prototype)}function Lt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):C.prototype.cacheResult.call(this)}function xt(t,e){return t>e?1:e>t?-1:0}function Rt(t){var e=E(t);if(!e){if(!k(t))throw new TypeError("Expected iterable or array-like: "+t);e=E(d(t))}return e}function Nt(t){return null===t||void 0===t?Kt():Ht(t)&&!b(t)?t:Kt().withMutations(function(e){var n=h(t);st(n.size),n.forEach(function(t,n){return e.set(n,t)})})}function Ht(t){return!(!t||!t[Hn])}function zt(t,e){this.ownerID=t,this.entries=e}function Yt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Ut(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function Vt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function Bt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Gt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&Wt(t._root)}function Ft(t,e){return w(t,e[0],e[1])}function Wt(t,e){return{node:t,index:0,__prev:e}}function qt(t,e,n,r){var i=Object.create(zn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Kt(){return Yn||(Yn=qt(0))}function Jt(t,n,r){var i,o;if(t._root){var a=e(hn),s=e(pn);if(i=$t(t._root,t.__ownerID,0,void 0,n,r,a,s),!s.value)return t;o=t.size+(a.value?r===dn?-1:1:0)}else{if(r===dn)return t;o=1,i=new zt(t.__ownerID,[[n,r]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?qt(o,i):Kt()}function $t(t,e,r,i,o,a,s,u){return t?t.update(e,r,i,o,a,s,u):a===dn?t:(n(u),n(s),new Bt(e,i,[o,a]))}function Zt(t){return t.constructor===Bt||t.constructor===Vt}function Xt(t,e,n,r,i){if(t.keyHash===r)return new Vt(e,r,[t.entry,i]);var o,a=(0===n?t.keyHash:t.keyHash>>>n)&fn,s=(0===n?r:r>>>n)&fn,u=a===s?[Xt(t,e,n+cn,r,i)]:(o=new Bt(e,r,i),s>a?[t,o]:[o,t]);return new Yt(e,1<<a|1<<s,u)}function Qt(t,e,n,i){t||(t=new r);for(var o=new Bt(t,et(n),[n,i]),a=0;a<e.length;a++){var s=e[a];o=o.update(t,0,void 0,s[0],s[1])}return o}function te(t,e,n,r){for(var i=0,o=0,a=new Array(n),s=0,u=1,c=e.length;c>s;s++,u<<=1){var l=e[s];void 0!==l&&s!==r&&(i|=u,a[o++]=l)}return new Yt(t,i,a)}function ee(t,e,n,r,i){for(var o=0,a=new Array(ln),s=0;0!==n;s++,n>>>=1)a[s]=1&n?e[o++]:void 0;return a[r]=i,new Ut(t,o+1,a)}function ne(t,e,n){for(var r=[],i=0;i<n.length;i++){var o=n[i],a=h(o);_(o)||(a=a.map(function(t){return $(t)})),r.push(a)}return ie(t,e,r)}function re(t){return function(e,n,r){return e&&e.mergeDeepWith&&_(n)?e.mergeDeepWith(t,n):t?t(e,n,r):n}}function ie(t,e,n){return n=n.filter(function(t){return 0!==t.size}),0===n.length?t:0!==t.size||t.__ownerID||1!==n.length?t.withMutations(function(t){for(var r=e?function(n,r){t.update(r,dn,function(t){return t===dn?n:e(t,n,r)})}:function(e,n){t.set(n,e)},i=0;i<n.length;i++)n[i].forEach(r)}):t.constructor(n[0])}function oe(t,e,n,r){var i=t===dn,o=e.next();if(o.done){var a=i?n:t,s=r(a);return s===a?t:s}at(i||t&&t.set,"invalid keyPath");var u=o.value,c=i?dn:t.get(u,dn),l=oe(c,e,n,r);return l===c?t:l===dn?t.remove(u):(i?Kt():t).set(u,l)}function ae(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function se(t,e,n,r){var o=r?t:i(t);return o[e]=n,o}function ue(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),a=0,s=0;i>s;s++)s===e?(o[s]=n,a=-1):o[s]=t[s+a];return o}function ce(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,a=0;r>a;a++)a===e&&(o=1),i[a]=t[a+o];return i}function le(t){var e=ve();if(null===t||void 0===t)return e;if(fe(t))return t;var n=p(t),r=n.size;return 0===r?e:(st(r),r>0&&ln>r?pe(0,r,cn,null,new de(n.toArray())):e.withMutations(function(t){t.setSize(r),n.forEach(function(e,n){return t.set(n,e)})}))}function fe(t){return!(!t||!t[Gn])}function de(t,e){this.array=t,this.ownerID=e}function he(t,e){function n(t,e,n){return 0===e?r(t,n):i(t,e,n)}function r(t,n){var r=n===s?u&&u.array:t&&t.array,i=n>o?0:o-n,c=a-n;return c>ln&&(c=ln),function(){if(i===c)return qn;var t=e?--c:i++;return r&&r[t]}}function i(t,r,i){var s,u=t&&t.array,c=i>o?0:o-i>>r,l=(a-i>>r)+1;return l>ln&&(l=ln),function(){for(;;){if(s){var t=s();if(t!==qn)return t;s=null}if(c===l)return qn;var o=e?--l:c++;s=n(u&&u[o],r-cn,i+(o<<r))}}}var o=t._origin,a=t._capacity,s=we(a),u=t._tail;return n(t._root,t._level,0)}function pe(t,e,n,r,i,o,a){var s=Object.create(Fn);return s.size=e-t,s._origin=t,s._capacity=e,s._level=n,s._root=r,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function ve(){return Wn||(Wn=pe(0,0,cn))}function _e(t,n,r){if(n=a(t,n),n!==n)return t;if(n>=t.size||0>n)return t.withMutations(function(t){0>n?be(t,n).set(0,r):be(t,0,n+1).set(n,r)});n+=t._origin;var i=t._tail,o=t._root,s=e(pn);return n>=we(t._capacity)?i=me(i,t.__ownerID,0,n,r,s):o=me(o,t.__ownerID,t._level,n,r,s),s.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):pe(t._origin,t._capacity,t._level,o,i):t}function me(t,e,r,i,o,a){var s=i>>>r&fn,u=t&&s<t.array.length;if(!u&&void 0===o)return t;var c;if(r>0){var l=t&&t.array[s],f=me(l,e,r-cn,i,o,a);return f===l?t:(c=ye(t,e),c.array[s]=f,c)}return u&&t.array[s]===o?t:(n(a),c=ye(t,e),void 0===o&&s===c.array.length-1?c.array.pop():c.array[s]=o,c)}function ye(t,e){return e&&t&&e===t.ownerID?t:new de(t?t.array.slice():[],e)}function ge(t,e){if(e>=we(t._capacity))return t._tail;if(e<1<<t._level+cn){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&fn],r-=cn;return n}}function be(t,e,n){void 0!==e&&(e=0|e),void 0!==n&&(n=0|n);var i=t.__ownerID||new r,o=t._origin,a=t._capacity,s=o+e,u=void 0===n?a:0>n?a+n:o+n;if(s===o&&u===a)return t;if(s>=u)return t.clear();for(var c=t._level,l=t._root,f=0;0>s+f;)l=new de(l&&l.array.length?[void 0,l]:[],i),c+=cn,f+=1<<c;f&&(s+=f,o+=f,u+=f,a+=f);for(var d=we(a),h=we(u);h>=1<<c+cn;)l=new de(l&&l.array.length?[l]:[],i),c+=cn;var p=t._tail,v=d>h?ge(t,u-1):h>d?new de([],i):p;if(p&&h>d&&a>s&&p.array.length){l=ye(l,i);for(var _=l,m=c;m>cn;m-=cn){var y=d>>>m&fn;_=_.array[y]=ye(_.array[y],i)}_.array[d>>>cn&fn]=p}if(a>u&&(v=v&&v.removeAfter(i,0,u)),s>=h)s-=h,u-=h,c=cn,l=null,v=v&&v.removeBefore(i,0,s);else if(s>o||d>h){for(f=0;l;){var g=s>>>c&fn;if(g!==h>>>c&fn)break;g&&(f+=(1<<c)*g),c-=cn,l=l.array[g]}l&&s>o&&(l=l.removeBefore(i,c,s-f)),l&&d>h&&(l=l.removeAfter(i,c,h-f)),f&&(s-=f,u-=f)}return t.__ownerID?(t.size=u-s,t._origin=s,t._capacity=u,t._level=c,t._root=l,t._tail=v,t.__hash=void 0,t.__altered=!0,t):pe(s,u,c,l,v)}function Se(t,e,n){for(var r=[],i=0,o=0;o<n.length;o++){var a=n[o],s=p(a);s.size>i&&(i=s.size),_(a)||(s=s.map(function(t){return $(t)})),r.push(s)}return i>t.size&&(t=t.setSize(i)),ie(t,e,r)}function we(t){return ln>t?0:t-1>>>cn<<cn}function Oe(t){return null===t||void 0===t?Ee():Te(t)?t:Ee().withMutations(function(e){var n=h(t);st(n.size),n.forEach(function(t,n){return e.set(n,t)})})}function Te(t){return Ht(t)&&b(t)}function Ie(t,e,n,r){var i=Object.create(Oe.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function Ee(){return Kn||(Kn=Ie(Kt(),ve()))}function De(t,e,n){var r,i,o=t._map,a=t._list,s=o.get(e),u=void 0!==s;if(n===dn){if(!u)return t;a.size>=ln&&a.size>=2*o.size?(i=a.filter(function(t,e){return void 0!==t&&s!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return t;r=o,i=a.set(s,[e,n])}else r=o.set(e,a.size),i=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):Ie(r,i)}function ke(t){return null===t||void 0===t?je():Ce(t)?t:je().unshiftAll(t)}function Ce(t){return!(!t||!t[Jn])}function Me(t,e,n,r){var i=Object.create($n);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function je(){return Zn||(Zn=Me(0))}function Pe(t){return null===t||void 0===t?Re():Ae(t)&&!b(t)?t:Re().withMutations(function(e){var n=v(t);st(n.size),n.forEach(function(t){return e.add(t)})})}function Ae(t){return!(!t||!t[Xn])}function Le(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function xe(t,e){var n=Object.create(Qn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Re(){return tr||(tr=xe(Kt()))}function Ne(t){return null===t||void 0===t?Ye():He(t)?t:Ye().withMutations(function(e){var n=v(t);st(n.size),n.forEach(function(t){return e.add(t)})})}function He(t){return Ae(t)&&b(t)}function ze(t,e){var n=Object.create(er);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ye(){return nr||(nr=ze(Ee()))}function Ue(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(t);Ge(i,a),i.size=a.length,i._name=e,i._keys=a,i._defaultValues=t}this._map=Nt(o)},i=r.prototype=Object.create(rr);return i.constructor=r,r}function Ve(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function Be(t){return t._name||t.constructor.name||"Record"}function Ge(t,e){try{e.forEach(Fe.bind(void 0,t))}catch(n){}}function Fe(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){at(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function We(t,e){if(t===e)return!0;if(!_(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||m(t)!==m(e)||y(t)!==y(e)||b(t)!==b(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!g(t);if(b(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&J(i[1],t)&&(n||J(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var a=!0,s=e.__iterate(function(e,r){return(n?t.has(e):i?J(e,t.get(r,dn)):J(t.get(r,dn),e))?void 0:(a=!1,!1)});return a&&t.size===s}function qe(t,e,n){if(!(this instanceof qe))return new qe(t,e,n);if(at(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),t>e&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(ir)return ir;ir=this}}function Ke(t,e){if(!(this instanceof Ke))return new Ke(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(or)return or;or=this}}function Je(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function $e(t,e){return e}function Ze(t,e){return[e,t]}function Xe(t){return function(){return!t.apply(this,arguments)}}function Qe(t){return function(){return-t.apply(this,arguments)}}function tn(t){return"string"==typeof t?JSON.stringify(t):t}function en(){return i(arguments)}function nn(t,e){return e>t?1:t>e?-1:0}function rn(t){if(t.size===1/0)return 0;var e=b(t),n=m(t),r=e?1:0,i=t.__iterate(n?e?function(t,e){r=31*r+an(et(t),et(e))|0}:function(t,e){r=r+an(et(t),et(e))|0}:e?function(t){r=31*r+et(t)|0}:function(t){r=r+et(t)|0});return on(i,r)}function on(t,e){return e=kn(e,3432918353),e=kn(e<<15|e>>>-15,461845907),e=kn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=kn(e^e>>>16,2246822507),e=kn(e^e>>>13,3266489909),e=tt(e^e>>>16)}function an(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var sn=Array.prototype.slice,un="delete",cn=5,ln=1<<cn,fn=ln-1,dn={},hn={value:!1},pn={value:!1};t(h,d),t(p,d),t(v,d),d.isIterable=_,d.isKeyed=m,d.isIndexed=y,d.isAssociative=g,d.isOrdered=b,d.Keyed=h,d.Indexed=p,d.Set=v;var vn="@@__IMMUTABLE_ITERABLE__@@",_n="@@__IMMUTABLE_KEYED__@@",mn="@@__IMMUTABLE_INDEXED__@@",yn="@@__IMMUTABLE_ORDERED__@@",gn=0,bn=1,Sn=2,wn="function"==typeof Symbol&&Symbol.iterator,On="@@iterator",Tn=wn||On;S.prototype.toString=function(){return"[Iterator]"},S.KEYS=gn,S.VALUES=bn,S.ENTRIES=Sn,S.prototype.inspect=S.prototype.toSource=function(){return this.toString()},S.prototype[Tn]=function(){return this},t(C,d),C.of=function(){return C(arguments)},C.prototype.toSeq=function(){return this},C.prototype.toString=function(){return this.__toString("Seq {","}")},C.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},C.prototype.__iterate=function(t,e){return B(this,t,e,!0)},C.prototype.__iterator=function(t,e){return G(this,t,e,!0)},t(M,C),M.prototype.toKeyedSeq=function(){return this},t(j,C),j.of=function(){return j(arguments)},j.prototype.toIndexedSeq=function(){return this},j.prototype.toString=function(){return this.__toString("Seq [","]")},j.prototype.__iterate=function(t,e){return B(this,t,e,!1)},j.prototype.__iterator=function(t,e){return G(this,t,e,!1)},t(P,C),P.of=function(){return P(arguments)},P.prototype.toSetSeq=function(){return this},C.isSeq=N,C.Keyed=M,C.Set=P,C.Indexed=j;var In="@@__IMMUTABLE_SEQ__@@";C.prototype[In]=!0,t(A,j),A.prototype.get=function(t,e){return this.has(t)?this._array[a(this,t)]:e},A.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length-1,i=0;r>=i;i++)if(t(n[e?r-i:i],i,this)===!1)return i+1;return i},A.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new S(function(){return i>r?O():w(t,i,n[e?r-i++:i++])})},t(L,M),L.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},L.prototype.has=function(t){return this._object.hasOwnProperty(t)},L.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var a=r[e?i-o:o];if(t(n[a],a,this)===!1)return o+1}return o},L.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new S(function(){var a=r[e?i-o:o];return o++>i?O():w(t,a,n[a])})},L.prototype[yn]=!0,t(x,j),x.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=E(n),i=0;if(I(r))for(var o;!(o=r.next()).done&&t(o.value,i++,this)!==!1;);return i},x.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=E(n);if(!I(r))return new S(O);var i=0;return new S(function(){var e=r.next();return e.done?e:w(t,i++,e.value)})},t(R,j),R.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i<r.length;)if(t(r[i],i++,this)===!1)return i;for(var o;!(o=n.next()).done;){var a=o.value;if(r[i]=a,t(a,i++,this)===!1)break}return i},R.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterator,r=this._iteratorCache,i=0;return new S(function(){if(i>=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return w(t,i,r[i++])})};var En;t(F,d),t(W,F),t(q,F),t(K,F),F.Keyed=W,F.Indexed=q,F.Set=K;var Dn,kn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},Cn=Object.isExtensible,Mn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),jn="function"==typeof WeakMap;jn&&(Dn=new WeakMap);var Pn=0,An="__immutablehash__";"function"==typeof Symbol&&(An=Symbol(An));var Ln=16,xn=255,Rn=0,Nn={};t(ut,M),ut.prototype.get=function(t,e){return this._iter.get(t,e)},ut.prototype.has=function(t){return this._iter.has(t)},ut.prototype.valueSeq=function(){return this._iter.valueSeq()},ut.prototype.reverse=function(){var t=this,e=pt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},ut.prototype.map=function(t,e){var n=this,r=ht(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},ut.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?jt(this):0,function(i){return t(i,e?--n:n++,r)}),e)},ut.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(bn,e),r=e?jt(this):0;return new S(function(){var i=n.next();return i.done?i:w(t,e?--r:r++,i.value,i)})},ut.prototype[yn]=!0,t(ct,j),ct.prototype.includes=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ct.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e),r=0;return new S(function(){var e=n.next();return e.done?e:w(t,r++,e.value,e)})},t(lt,P),lt.prototype.has=function(t){return this._iter.includes(t)},lt.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},lt.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new S(function(){var e=n.next();return e.done?e:w(t,e.value,e.value,e)})},t(ft,M),ft.prototype.entrySeq=function(){return this._iter.toSeq()},ft.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){Mt(e);var r=_(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n);
}},e)},ft.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new S(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Mt(r);var i=_(r);return w(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ct.prototype.cacheResult=ut.prototype.cacheResult=lt.prototype.cacheResult=ft.prototype.cacheResult=Lt,t(Nt,W),Nt.prototype.toString=function(){return this.__toString("Map {","}")},Nt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Nt.prototype.set=function(t,e){return Jt(this,t,e)},Nt.prototype.setIn=function(t,e){return this.updateIn(t,dn,function(){return e})},Nt.prototype.remove=function(t){return Jt(this,t,dn)},Nt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return dn})},Nt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},Nt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=oe(this,Rt(t),e,n);return r===dn?void 0:r},Nt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Kt()},Nt.prototype.merge=function(){return ne(this,void 0,arguments)},Nt.prototype.mergeWith=function(t){var e=sn.call(arguments,1);return ne(this,t,e)},Nt.prototype.mergeIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,Kt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Nt.prototype.mergeDeep=function(){return ne(this,re(void 0),arguments)},Nt.prototype.mergeDeepWith=function(t){var e=sn.call(arguments,1);return ne(this,re(t),e)},Nt.prototype.mergeDeepIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,Kt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Nt.prototype.sort=function(t){return Oe(It(this,t))},Nt.prototype.sortBy=function(t,e){return Oe(It(this,e,t))},Nt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Nt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new r)},Nt.prototype.asImmutable=function(){return this.__ensureOwner()},Nt.prototype.wasAltered=function(){return this.__altered},Nt.prototype.__iterator=function(t,e){return new Gt(this,t,e)},Nt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},Nt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?qt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Nt.isMap=Ht;var Hn="@@__IMMUTABLE_MAP__@@",zn=Nt.prototype;zn[Hn]=!0,zn[un]=zn.remove,zn.removeIn=zn.deleteIn,zt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;a>o;o++)if(J(n,i[o][0]))return i[o][1];return r},zt.prototype.update=function(t,e,r,o,a,s,u){for(var c=a===dn,l=this.entries,f=0,d=l.length;d>f&&!J(o,l[f][0]);f++);var h=d>f;if(h?l[f][1]===a:c)return this;if(n(u),(c||!h)&&n(s),!c||1!==l.length){if(!h&&!c&&l.length>=Un)return Qt(t,l,o,a);var p=t&&t===this.ownerID,v=p?l:i(l);return h?c?f===d-1?v.pop():v[f]=v.pop():v[f]=[o,a]:v.push([o,a]),p?(this.entries=v,this):new zt(t,v)}},Yt.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=1<<((0===t?e:e>>>t)&fn),o=this.bitmap;return 0===(o&i)?r:this.nodes[ae(o&i-1)].get(t+cn,e,n,r)},Yt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=et(r));var s=(0===e?n:n>>>e)&fn,u=1<<s,c=this.bitmap,l=0!==(c&u);if(!l&&i===dn)return this;var f=ae(c&u-1),d=this.nodes,h=l?d[f]:void 0,p=$t(h,t,e+cn,n,r,i,o,a);if(p===h)return this;if(!l&&p&&d.length>=Vn)return ee(t,d,c,s,p);if(l&&!p&&2===d.length&&Zt(d[1^f]))return d[1^f];if(l&&p&&1===d.length&&Zt(p))return p;var v=t&&t===this.ownerID,_=l?p?c:c^u:c|u,m=l?p?se(d,f,p,v):ce(d,f,v):ue(d,f,p,v);return v?(this.bitmap=_,this.nodes=m,this):new Yt(t,_,m)},Ut.prototype.get=function(t,e,n,r){void 0===e&&(e=et(n));var i=(0===t?e:e>>>t)&fn,o=this.nodes[i];return o?o.get(t+cn,e,n,r):r},Ut.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=et(r));var s=(0===e?n:n>>>e)&fn,u=i===dn,c=this.nodes,l=c[s];if(u&&!l)return this;var f=$t(l,t,e+cn,n,r,i,o,a);if(f===l)return this;var d=this.count;if(l){if(!f&&(d--,Bn>d))return te(t,c,d,s)}else d++;var h=t&&t===this.ownerID,p=se(c,s,f,h);return h?(this.count=d,this.nodes=p,this):new Ut(t,d,p)},Vt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;a>o;o++)if(J(n,i[o][0]))return i[o][1];return r},Vt.prototype.update=function(t,e,r,o,a,s,u){void 0===r&&(r=et(o));var c=a===dn;if(r!==this.keyHash)return c?this:(n(u),n(s),Xt(this,t,e,r,[o,a]));for(var l=this.entries,f=0,d=l.length;d>f&&!J(o,l[f][0]);f++);var h=d>f;if(h?l[f][1]===a:c)return this;if(n(u),(c||!h)&&n(s),c&&2===d)return new Bt(t,this.keyHash,l[1^f]);var p=t&&t===this.ownerID,v=p?l:i(l);return h?c?f===d-1?v.pop():v[f]=v.pop():v[f]=[o,a]:v.push([o,a]),p?(this.entries=v,this):new Vt(t,this.keyHash,v)},Bt.prototype.get=function(t,e,n,r){return J(n,this.entry[0])?this.entry[1]:r},Bt.prototype.update=function(t,e,r,i,o,a,s){var u=o===dn,c=J(i,this.entry[0]);return(c?o===this.entry[1]:u)?this:(n(s),u?void n(a):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Bt(t,this.keyHash,[i,o]):(n(a),Xt(this,t,e,et(i),[i,o])))},zt.prototype.iterate=Vt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1},Yt.prototype.iterate=Ut.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[e?i-r:r];if(o&&o.iterate(t,e)===!1)return!1}},Bt.prototype.iterate=function(t,e){return t(this.entry)},t(Gt,S),Gt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return Ft(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return Ft(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return Ft(t,o.entry);e=this._stack=Wt(o,e)}continue}e=this._stack=this._stack.__prev}return O()};var Yn,Un=ln/4,Vn=ln/2,Bn=ln/4;t(le,q),le.of=function(){return this(arguments)},le.prototype.toString=function(){return this.__toString("List [","]")},le.prototype.get=function(t,e){if(t=a(this,t),t>=0&&t<this.size){t+=this._origin;var n=ge(this,t);return n&&n.array[t&fn]}return e},le.prototype.set=function(t,e){return _e(this,t,e)},le.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},le.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=cn,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ve()},le.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){be(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])})},le.prototype.pop=function(){return be(this,0,-1)},le.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){be(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])})},le.prototype.shift=function(){return be(this,1)},le.prototype.merge=function(){return Se(this,void 0,arguments)},le.prototype.mergeWith=function(t){var e=sn.call(arguments,1);return Se(this,t,e)},le.prototype.mergeDeep=function(){return Se(this,re(void 0),arguments)},le.prototype.mergeDeepWith=function(t){var e=sn.call(arguments,1);return Se(this,re(t),e)},le.prototype.setSize=function(t){return be(this,0,t)},le.prototype.slice=function(t,e){var n=this.size;return u(t,e,n)?this:be(this,c(t,n),l(e,n))},le.prototype.__iterator=function(t,e){var n=0,r=he(this,e);return new S(function(){var e=r();return e===qn?O():w(t,n++,e)})},le.prototype.__iterate=function(t,e){for(var n,r=0,i=he(this,e);(n=i())!==qn&&t(n,r++,this)!==!1;);return r},le.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?pe(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},le.isList=fe;var Gn="@@__IMMUTABLE_LIST__@@",Fn=le.prototype;Fn[Gn]=!0,Fn[un]=Fn.remove,Fn.setIn=zn.setIn,Fn.deleteIn=Fn.removeIn=zn.removeIn,Fn.update=zn.update,Fn.updateIn=zn.updateIn,Fn.mergeIn=zn.mergeIn,Fn.mergeDeepIn=zn.mergeDeepIn,Fn.withMutations=zn.withMutations,Fn.asMutable=zn.asMutable,Fn.asImmutable=zn.asImmutable,Fn.wasAltered=zn.wasAltered,de.prototype.removeBefore=function(t,e,n){if(n===e?1<<e:0===this.array.length)return this;var r=n>>>e&fn;if(r>=this.array.length)return new de([],t);var i,o=0===r;if(e>0){var a=this.array[r];if(i=a&&a.removeBefore(t,e-cn,n),i===a&&o)return this}if(o&&!i)return this;var s=ye(this,t);if(!o)for(var u=0;r>u;u++)s.array[u]=void 0;return i&&(s.array[r]=i),s},de.prototype.removeAfter=function(t,e,n){if(n===(e?1<<e:0)||0===this.array.length)return this;var r=n-1>>>e&fn;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if(i=o&&o.removeAfter(t,e-cn,n),i===o&&r===this.array.length-1)return this}var a=ye(this,t);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Wn,qn={};t(Oe,Nt),Oe.of=function(){return this(arguments)},Oe.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Oe.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Oe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ee()},Oe.prototype.set=function(t,e){return De(this,t,e)},Oe.prototype.remove=function(t){return De(this,t,dn)},Oe.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Oe.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Oe.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Oe.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?Ie(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Oe.isOrderedMap=Te,Oe.prototype[yn]=!0,Oe.prototype[un]=Oe.prototype.remove;var Kn;t(ke,q),ke.of=function(){return this(arguments)},ke.prototype.toString=function(){return this.__toString("Stack [","]")},ke.prototype.get=function(t,e){var n=this._head;for(t=a(this,t);n&&t--;)n=n.next;return n?n.value:e},ke.prototype.peek=function(){return this._head&&this._head.value},ke.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Me(t,e)},ke.prototype.pushAll=function(t){if(t=p(t),0===t.size)return this;st(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Me(e,n)},ke.prototype.pop=function(){return this.slice(1)},ke.prototype.unshift=function(){return this.push.apply(this,arguments)},ke.prototype.unshiftAll=function(t){return this.pushAll(t)},ke.prototype.shift=function(){return this.pop.apply(this,arguments)},ke.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):je()},ke.prototype.slice=function(t,e){if(u(t,e,this.size))return this;var n=c(t,this.size),r=l(e,this.size);if(r!==this.size)return q.prototype.slice.call(this,t,e);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Me(i,o)},ke.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Me(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},ke.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&t(r.value,n++,this)!==!1;)r=r.next;return n},ke.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new S(function(){if(r){var e=r.value;return r=r.next,w(t,n++,e)}return O()})},ke.isStack=Ce;var Jn="@@__IMMUTABLE_STACK__@@",$n=ke.prototype;$n[Jn]=!0,$n.withMutations=zn.withMutations,$n.asMutable=zn.asMutable,$n.asImmutable=zn.asImmutable,$n.wasAltered=zn.wasAltered;var Zn;t(Pe,K),Pe.of=function(){return this(arguments)},Pe.fromKeys=function(t){return this(h(t).keySeq())},Pe.prototype.toString=function(){return this.__toString("Set {","}")},Pe.prototype.has=function(t){return this._map.has(t)},Pe.prototype.add=function(t){return Le(this,this._map.set(t,!0))},Pe.prototype.remove=function(t){return Le(this,this._map.remove(t))},Pe.prototype.clear=function(){return Le(this,this._map.clear())},Pe.prototype.union=function(){var t=sn.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)v(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},Pe.prototype.intersect=function(){var t=sn.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return v(t)});var e=this;return this.withMutations(function(n){e.forEach(function(e){t.every(function(t){return t.includes(e)})||n.remove(e)})})},Pe.prototype.subtract=function(){var t=sn.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return v(t)});var e=this;return this.withMutations(function(n){e.forEach(function(e){t.some(function(t){return t.includes(e)})&&n.remove(e)})})},Pe.prototype.merge=function(){return this.union.apply(this,arguments)},Pe.prototype.mergeWith=function(t){var e=sn.call(arguments,1);return this.union.apply(this,e)},Pe.prototype.sort=function(t){return Ne(It(this,t))},Pe.prototype.sortBy=function(t,e){return Ne(It(this,e,t))},Pe.prototype.wasAltered=function(){return this._map.wasAltered()},Pe.prototype.__iterate=function(t,e){var n=this;return this._map.__iterate(function(e,r){return t(r,r,n)},e)},Pe.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},Pe.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},Pe.isSet=Ae;var Xn="@@__IMMUTABLE_SET__@@",Qn=Pe.prototype;Qn[Xn]=!0,Qn[un]=Qn.remove,Qn.mergeDeep=Qn.merge,Qn.mergeDeepWith=Qn.mergeWith,Qn.withMutations=zn.withMutations,Qn.asMutable=zn.asMutable,Qn.asImmutable=zn.asImmutable,Qn.__empty=Re,Qn.__make=xe;var tr;t(Ne,Pe),Ne.of=function(){return this(arguments)},Ne.fromKeys=function(t){return this(h(t).keySeq())},Ne.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Ne.isOrderedSet=He;var er=Ne.prototype;er[yn]=!0,er.__empty=Ye,er.__make=ze;var nr;t(Ue,W),Ue.prototype.toString=function(){return this.__toString(Be(this)+" {","}")},Ue.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Ue.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},Ue.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Ve(this,Kt()))},Ue.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+Be(this));var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:Ve(this,n)},Ue.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Ve(this,e)},Ue.prototype.wasAltered=function(){return this._map.wasAltered()},Ue.prototype.__iterator=function(t,e){var n=this;return h(this._defaultValues).map(function(t,e){return n.get(e)}).__iterator(t,e)},Ue.prototype.__iterate=function(t,e){var n=this;return h(this._defaultValues).map(function(t,e){return n.get(e)}).__iterate(t,e)},Ue.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Ve(this,e,t):(this.__ownerID=t,this._map=e,this)};var rr=Ue.prototype;rr[un]=rr.remove,rr.deleteIn=rr.removeIn=zn.removeIn,rr.merge=zn.merge,rr.mergeWith=zn.mergeWith,rr.mergeIn=zn.mergeIn,rr.mergeDeep=zn.mergeDeep,rr.mergeDeepWith=zn.mergeDeepWith,rr.mergeDeepIn=zn.mergeDeepIn,rr.setIn=zn.setIn,rr.update=zn.update,rr.updateIn=zn.updateIn,rr.withMutations=zn.withMutations,rr.asMutable=zn.asMutable,rr.asImmutable=zn.asImmutable,t(qe,j),qe.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},qe.prototype.get=function(t,e){return this.has(t)?this._start+a(this,t)*this._step:e},qe.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},qe.prototype.slice=function(t,e){return u(t,e,this.size)?this:(t=c(t,this.size),e=l(e,this.size),t>=e?new qe(0,0):new qe(this.get(t,this._end),this.get(e,this._end),this._step))},qe.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var n=e/this._step;if(n>=0&&n<this.size)return n}return-1},qe.prototype.lastIndexOf=function(t){return this.indexOf(t)},qe.prototype.__iterate=function(t,e){for(var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;n>=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-r:r}return o},qe.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new S(function(){var a=i;return i+=e?-r:r,o>n?O():w(t,o++,a)})},qe.prototype.equals=function(t){return t instanceof qe?this._start===t._start&&this._end===t._end&&this._step===t._step:We(this,t)};var ir;t(Ke,j),Ke.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Ke.prototype.get=function(t,e){return this.has(t)?this._value:e},Ke.prototype.includes=function(t){return J(this._value,t)},Ke.prototype.slice=function(t,e){var n=this.size;return u(t,e,n)?this:new Ke(this._value,l(e,n)-c(t,n))},Ke.prototype.reverse=function(){return this},Ke.prototype.indexOf=function(t){return J(this._value,t)?0:-1},Ke.prototype.lastIndexOf=function(t){return J(this._value,t)?this.size:-1},Ke.prototype.__iterate=function(t,e){for(var n=0;n<this.size;n++)if(t(this._value,n,this)===!1)return n+1;return n},Ke.prototype.__iterator=function(t,e){var n=this,r=0;return new S(function(){return r<n.size?w(t,r++,n._value):O()})},Ke.prototype.equals=function(t){return t instanceof Ke?J(this._value,t._value):We(t)};var or;d.Iterator=S,Je(d,{toArray:function(){st(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new ct(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new ut(this,!0)},toMap:function(){return Nt(this.toKeyedSeq())},toObject:function(){st(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Oe(this.toKeyedSeq())},toOrderedSet:function(){return Ne(m(this)?this.valueSeq():this)},toSet:function(){return Pe(m(this)?this.valueSeq():this)},toSetSeq:function(){return new lt(this)},toSeq:function(){return y(this)?this.toIndexedSeq():m(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return ke(m(this)?this.valueSeq():this)},toList:function(){return le(m(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var t=sn.call(arguments,0);return Ct(this,St(this,t))},includes:function(t){return this.some(function(e){return J(e,t)})},entries:function(){return this.__iterator(Sn)},every:function(t,e){st(this.size);var n=!0;return this.__iterate(function(r,i,o){return t.call(e,r,i,o)?void 0:(n=!1,!1)}),n},filter:function(t,e){return Ct(this,vt(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},findEntry:function(t,e){var n;return this.__iterate(function(r,i,o){return t.call(e,r,i,o)?(n=[i,r],!1):void 0}),n},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e)},forEach:function(t,e){return st(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){st(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator(gn)},map:function(t,e){return Ct(this,ht(this,t,e))},reduce:function(t,e,n){st(this.size);var r,i;return arguments.length<2?i=!0:r=e,this.__iterate(function(e,o,a){i?(i=!1,r=e):r=t.call(n,r,e,o,a)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Ct(this,pt(this,!0))},slice:function(t,e){return Ct(this,yt(this,t,e,!0))},some:function(t,e){return!this.every(Xe(t),e)},sort:function(t){return Ct(this,It(this,t))},values:function(){return this.__iterator(bn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return o(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return _t(this,t,e)},equals:function(t){return We(this,t)},entrySeq:function(){var t=this;if(t._cache)return new A(t._cache);var e=t.toSeq().map(Ze).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Xe(t),e)},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},first:function(){return this.find(s)},flatMap:function(t,e){return Ct(this,Ot(this,t,e))},flatten:function(t){return Ct(this,wt(this,t,!0))},fromEntrySeq:function(){return new ft(this)},get:function(t,e){return this.find(function(e,n){return J(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=Rt(t);!(n=i.next()).done;){var o=n.value;if(r=r&&r.get?r.get(o,dn):dn,r===dn)return e}return r},groupBy:function(t,e){return mt(this,t,e)},has:function(t){return this.get(t,dn)!==dn},hasIn:function(t){return this.getIn(t,dn)!==dn},isSubset:function(t){return t="function"==typeof t.includes?t:d(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:d(t),t.isSubset(this)},keySeq:function(){return this.toSeq().map($e).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return Et(this,t)},maxBy:function(t,e){return Et(this,e,t)},min:function(t){return Et(this,t?Qe(t):nn)},minBy:function(t,e){return Et(this,e?Qe(e):nn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Ct(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Ct(this,bt(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Xe(t),e)},sortBy:function(t,e){return Ct(this,It(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Ct(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Ct(this,gt(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Xe(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=rn(this))}});var ar=d.prototype;ar[vn]=!0,ar[Tn]=ar.values,ar.__toJS=ar.toArray,ar.__toStringMapper=tn,ar.inspect=ar.toSource=function(){return this.toString()},ar.chain=ar.flatMap,ar.contains=ar.includes,function(){try{Object.defineProperty(ar,"length",{get:function(){if(!d.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}(),Je(h,{flip:function(){return Ct(this,dt(this))},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return J(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return J(e,t)})},mapEntries:function(t,e){var n=this,r=0;return Ct(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Ct(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var sr=h.prototype;sr[_n]=!0,sr[Tn]=ar.entries,sr.__toJS=ar.toObject,sr.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+tn(t)},Je(p,{toKeyedSeq:function(){return new ut(this,!1)},filter:function(t,e){return Ct(this,vt(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){return this.toSeq().reverse().indexOf(t)},reverse:function(){return Ct(this,pt(this,!1))},slice:function(t,e){return Ct(this,yt(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=c(t,0>t?this.count():this.size);var r=this.slice(0,t);return Ct(this,1===n?r:r.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.toKeyedSeq().findLastKey(t,e);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(t){return Ct(this,wt(this,t,!1))},get:function(t,e){return t=a(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return t=a(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Ct(this,Tt(this,t))},interleave:function(){var t=[this].concat(i(arguments)),e=kt(this.toSeq(),j.of,t),n=e.flatten(!0);return e.size&&(n.size=e.size*t.length),Ct(this,n)},last:function(){return this.get(-1)},skipWhile:function(t,e){return Ct(this,bt(this,t,e,!1))},zip:function(){var t=[this].concat(i(arguments));return Ct(this,kt(this,en,t))},zipWith:function(t){var e=i(arguments);return e[0]=this,Ct(this,kt(this,t,e))}}),p.prototype[mn]=!0,p.prototype[yn]=!0,Je(v,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),v.prototype.has=ar.includes,Je(M,h.prototype),Je(j,p.prototype),Je(P,v.prototype),Je(W,h.prototype),Je(q,p.prototype),Je(K,v.prototype);var ur={Iterable:d,Seq:C,Collection:F,Map:Nt,OrderedMap:Oe,List:le,Stack:ke,Set:Pe,OrderedSet:Ne,Record:Ue,Range:qe,Repeat:Ke,is:J,fromJS:$};return ur})},function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&toString.call(t)}function r(t){return"number"==typeof t&&t>-1&&t%1===0&&t<=Number.MAX_VALUE}var i=Function.prototype.bind;e.isString=function(t){return"string"==typeof t||"[object String]"===n(t)},e.isArray=Array.isArray||function(t){return"[object Array]"===n(t)},"function"!=typeof/./&&"object"!=typeof Int8Array?e.isFunction=function(t){return"function"==typeof t||!1}:e.isFunction=function(t){return"[object Function]"===toString.call(t)},e.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},e.extend=function(t){var e=arguments.length;if(!t||2>e)return t||{};for(var n=1;e>n;n++)for(var r=arguments[n],i=Object.keys(r),o=i.length,a=0;o>a;a++){var s=i[a];t[s]=r[s]}return t},e.clone=function(t){return e.isObject(t)?e.isArray(t)?t.slice():e.extend({},t):t},e.each=function(t,e,n){var i,o,a=t?t.length:0,s=-1;if(n&&(o=e,e=function(t,e,r){return o.call(n,t,e,r)}),r(a))for(;++s<a&&e(t[s],s,t)!==!1;);else for(i=Object.keys(t),a=i.length;++s<a&&e(t[i[s]],i[s],t)!==!1;);return t},e.partial=function(t){var e=Array.prototype.slice,n=e.call(arguments,1);return function(){return t.apply(this,n.concat(e.call(arguments)))}},e.toFactory=function(t){var e=function(){for(var e=arguments.length,n=Array(e),r=0;e>r;r++)n[r]=arguments[r];return new(i.apply(t,[null].concat(n)))};return e.__proto__=t,e.prototype=t.prototype,e}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return c["default"].Iterable.isIterable(t)}function o(t){return i(t)||!(0,l.isObject)(t)}function a(t){return i(t)?t.toJS():t}function s(t){return i(t)?t:c["default"].fromJS(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isImmutable=i,e.isImmutableValue=o,e.toJS=a,e.toImmutable=s;var u=n(3),c=r(u),l=n(4)},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(3),c=i(u),l=n(7),f=i(l),d=n(8),h=r(d),p=n(11),v=n(10),_=n(5),m=n(4),y=n(12),g=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];a(this,t);var n=!!e.debug,r=n?y.DEBUG_OPTIONS:y.PROD_OPTIONS,i=new y.ReactorState({debug:n,options:r.merge(e.options||{})});this.prevReactorState=i,this.reactorState=i,this.observerState=new y.ObserverState,this.ReactMixin=(0,f["default"])(this),this.__batchDepth=0,this.__isDispatching=!1}return s(t,[{key:"evaluate",value:function(t){var e=h.evaluate(this.reactorState,t),n=e.result,r=e.reactorState;return this.reactorState=r,n}},{key:"evaluateToJS",value:function(t){return(0,_.toJS)(this.evaluate(t))}},{key:"observe",value:function(t,e){var n=this;1===arguments.length&&(e=t,t=[]);var r=h.addObserver(this.observerState,t,e),i=r.observerState,o=r.entry;return this.observerState=i,function(){n.observerState=h.removeObserverByEntry(n.observerState,o)}}},{key:"unobserve",value:function(t,e){if(0===arguments.length)throw new Error("Must call unobserve with a Getter");if(!(0,v.isGetter)(t)&&!(0,p.isKeyPath)(t))throw new Error("Must call unobserve with a Getter");this.observerState=h.removeObserver(this.observerState,t,e)}},{key:"dispatch",value:function(t,e){if(0===this.__batchDepth){if(h.getOption(this.reactorState,"throwOnDispatchInDispatch")&&this.__isDispatching)throw this.__isDispatching=!1,new Error("Dispatch may not be called while a dispatch is in progress");this.__isDispatching=!0}try{this.reactorState=h.dispatch(this.reactorState,t,e)}catch(n){throw this.__isDispatching=!1,n}try{this.__notify()}finally{this.__isDispatching=!1}}},{key:"batch",value:function(t){this.batchStart(),t(),this.batchEnd()}},{key:"registerStore",value:function(t,e){console.warn("Deprecation warning: `registerStore` will no longer be supported in 1.1, use `registerStores` instead"),this.registerStores(o({},t,e))}},{key:"registerStores",value:function(t){this.reactorState=h.registerStores(this.reactorState,t),this.__notify()}},{key:"replaceStores",value:function(t){this.reactorState=h.replaceStores(this.reactorState,t)}},{key:"serialize",value:function(){return h.serialize(this.reactorState)}},{key:"loadState",value:function(t){this.reactorState=h.loadState(this.reactorState,t),this.__notify()}},{key:"reset",value:function(){var t=h.reset(this.reactorState);this.reactorState=t,this.prevReactorState=t,this.observerState=new y.ObserverState}},{key:"__notify",value:function(){var t=this;if(!(this.__batchDepth>0)){var e=this.reactorState.get("dirtyStores");if(0!==e.size){var n=c["default"].Set().withMutations(function(n){n.union(t.observerState.get("any")),e.forEach(function(e){var r=t.observerState.getIn(["stores",e]);r&&n.union(r)})});n.forEach(function(e){var n=t.observerState.getIn(["observersMap",e]);
if(n){var r=n.get("getter"),i=n.get("handler"),o=h.evaluate(t.prevReactorState,r),a=h.evaluate(t.reactorState,r);t.prevReactorState=o.reactorState,t.reactorState=a.reactorState;var s=o.result,u=a.result;c["default"].is(s,u)||i.call(null,u)}});var r=h.resetDirtyStores(this.reactorState);this.prevReactorState=r,this.reactorState=r}}}},{key:"batchStart",value:function(){this.__batchDepth++}},{key:"batchEnd",value:function(){if(this.__batchDepth--,this.__batchDepth<=0){this.__isDispatching=!0;try{this.__notify()}catch(t){throw this.__isDispatching=!1,t}this.__isDispatching=!1}}}]),t}();e["default"]=(0,m.toFactory)(g),t.exports=e["default"]},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n={};return(0,o.each)(e,function(e,r){n[r]=t.evaluate(e)}),n}Object.defineProperty(e,"__esModule",{value:!0});var o=n(4);e["default"]=function(t){return{getInitialState:function(){return i(t,this.getDataBindings())},componentDidMount:function(){var e=this;this.__unwatchFns=[],(0,o.each)(this.getDataBindings(),function(n,i){var o=t.observe(n,function(t){e.setState(r({},i,t))});e.__unwatchFns.push(o)})},componentWillUnmount:function(){for(;this.__unwatchFns.length;)this.__unwatchFns.shift()()}}},t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return new P({result:t,reactorState:e})}function o(t,e){return t.withMutations(function(t){(0,j.each)(e,function(e,n){t.getIn(["stores",n])&&console.warn("Store already defined for id = "+n);var r=e.getInitialState();if(void 0===r&&l(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store getInitialState() must return a value, did you forget a return statement");if(l(t,"throwOnNonImmutableStore")&&!(0,k.isImmutableValue)(r))throw new Error("Store getInitialState() must return an immutable value, did you forget to call toImmutable");t.update("stores",function(t){return t.set(n,e)}).update("state",function(t){return t.set(n,r)}).update("dirtyStores",function(t){return t.add(n)}).update("storeStates",function(t){return O(t,[n])})}),w(t)})}function a(t,e){return t.withMutations(function(t){(0,j.each)(e,function(e,n){t.update("stores",function(t){return t.set(n,e)})})})}function s(t,e,n){if(void 0===e&&l(t,"throwOnUndefinedActionType"))throw new Error("`dispatch` cannot be called with an `undefined` action type.");var r=t.get("state"),i=t.get("dirtyStores"),o=r.withMutations(function(r){D["default"].dispatchStart(t,e,n),t.get("stores").forEach(function(o,a){var s=r.get(a),u=void 0;try{u=o.handle(s,e,n)}catch(c){throw D["default"].dispatchError(t,c.message),c}if(void 0===u&&l(t,"throwOnUndefinedStoreReturnValue")){var f="Store handler must return a value, did you forget a return statement";throw D["default"].dispatchError(t,f),new Error(f)}r.set(a,u),s!==u&&(i=i.add(a))}),D["default"].dispatchEnd(t,r,i)}),a=t.set("state",o).set("dirtyStores",i).update("storeStates",function(t){return O(t,i)});return w(a)}function u(t,e){var n=[],r=(0,k.toImmutable)({}).withMutations(function(r){(0,j.each)(e,function(e,i){var o=t.getIn(["stores",i]);if(o){var a=o.deserialize(e);void 0!==a&&(r.set(i,a),n.push(i))}})}),i=I["default"].Set(n);return t.update("state",function(t){return t.merge(r)}).update("dirtyStores",function(t){return t.union(i)}).update("storeStates",function(t){return O(t,n)})}function c(t,e,n){var r=e;(0,M.isKeyPath)(e)&&(e=(0,C.fromKeyPath)(e));var i=t.get("nextId"),o=(0,C.getStoreDeps)(e),a=I["default"].Map({id:i,storeDeps:o,getterKey:r,getter:e,handler:n}),s=void 0;return s=0===o.size?t.update("any",function(t){return t.add(i)}):t.withMutations(function(t){o.forEach(function(e){var n=["stores",e];t.hasIn(n)||t.setIn(n,I["default"].Set()),t.updateIn(["stores",e],function(t){return t.add(i)})})}),s=s.set("nextId",i+1).setIn(["observersMap",i],a),{observerState:s,entry:a}}function l(t,e){var n=t.getIn(["options",e]);if(void 0===n)throw new Error("Invalid option: "+e);return n}function f(t,e,n){var r=t.get("observersMap").filter(function(t){var r=t.get("getterKey"),i=!n||t.get("handler")===n;return i?(0,M.isKeyPath)(e)&&(0,M.isKeyPath)(r)?(0,M.isEqual)(e,r):e===r:!1});return t.withMutations(function(t){r.forEach(function(e){return d(t,e)})})}function d(t,e){return t.withMutations(function(t){var n=e.get("id"),r=e.get("storeDeps");0===r.size?t.update("any",function(t){return t.remove(n)}):r.forEach(function(e){t.updateIn(["stores",e],function(t){return t?t.remove(n):t})}),t.removeIn(["observersMap",n])})}function h(t){var e=t.get("state");return t.withMutations(function(t){var n=t.get("stores"),r=n.keySeq().toJS();n.forEach(function(n,r){var i=e.get(r),o=n.handleReset(i);if(void 0===o&&l(t,"throwOnUndefinedStoreReturnValue"))throw new Error("Store handleReset() must return a value, did you forget a return statement");if(l(t,"throwOnNonImmutableStore")&&!(0,k.isImmutableValue)(o))throw new Error("Store reset state must be an immutable value, did you forget to call toImmutable");t.setIn(["state",r],o)}),t.update("storeStates",function(t){return O(t,r)}),_(t)})}function p(t,e){var n=t.get("state");if((0,M.isKeyPath)(e))return i(n.getIn(e),t);if(!(0,C.isGetter)(e))throw new Error("evaluate must be passed a keyPath or Getter");if(g(t,e))return i(S(t,e),t);var r=(0,C.getDeps)(e).map(function(e){return p(t,e).result}),o=(0,C.getComputeFn)(e).apply(null,r);return i(o,b(t,e,o))}function v(t){var e={};return t.get("stores").forEach(function(n,r){var i=t.getIn(["state",r]),o=n.serialize(i);void 0!==o&&(e[r]=o)}),e}function _(t){return t.set("dirtyStores",I["default"].Set())}function m(t){return t}function y(t,e){var n=m(e);return t.getIn(["cache",n])}function g(t,e){var n=y(t,e);if(!n)return!1;var r=n.get("storeStates");return 0===r.size?!1:r.every(function(e,n){return t.getIn(["storeStates",n])===e})}function b(t,e,n){var r=m(e),i=t.get("dispatchId"),o=(0,C.getStoreDeps)(e),a=(0,k.toImmutable)({}).withMutations(function(e){o.forEach(function(n){var r=t.getIn(["storeStates",n]);e.set(n,r)})});return t.setIn(["cache",r],I["default"].Map({value:n,storeStates:a,dispatchId:i}))}function S(t,e){var n=m(e);return t.getIn(["cache",n,"value"])}function w(t){return t.update("dispatchId",function(t){return t+1})}function O(t,e){return t.withMutations(function(t){e.forEach(function(e){var n=t.has(e)?t.get(e)+1:1;t.set(e,n)})})}Object.defineProperty(e,"__esModule",{value:!0}),e.registerStores=o,e.replaceStores=a,e.dispatch=s,e.loadState=u,e.addObserver=c,e.getOption=l,e.removeObserver=f,e.removeObserverByEntry=d,e.reset=h,e.evaluate=p,e.serialize=v,e.resetDirtyStores=_;var T=n(3),I=r(T),E=n(9),D=r(E),k=n(5),C=n(10),M=n(11),j=n(4),P=I["default"].Record({result:null,reactorState:null})},function(t,e,n){"use strict";var r=n(8);e.dispatchStart=function(t,e,n){(0,r.getOption)(t,"logDispatches")&&console.group&&(console.groupCollapsed("Dispatch: %s",e),console.group("payload"),console.debug(n),console.groupEnd())},e.dispatchError=function(t,e){(0,r.getOption)(t,"logDispatches")&&console.group&&(console.debug("Dispatch error: "+e),console.groupEnd())},e.dispatchEnd=function(t,e,n){(0,r.getOption)(t,"logDispatches")&&console.group&&((0,r.getOption)(t,"logDirtyStores")&&console.log("Stores updated:",n.toList().toJS()),(0,r.getOption)(t,"logAppState")&&console.debug("Dispatch done, new state: ",e.toJS()),console.groupEnd())}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,d.isArray)(t)&&(0,d.isFunction)(t[t.length-1])}function o(t){return t[t.length-1]}function a(t){return t.slice(0,t.length-1)}function s(t,e){e||(e=f["default"].Set());var n=f["default"].Set().withMutations(function(e){if(!i(t))throw new Error("getFlattenedDeps must be passed a Getter");a(t).forEach(function(t){if((0,h.isKeyPath)(t))e.add((0,l.List)(t));else{if(!i(t))throw new Error("Invalid getter, each dependency must be a KeyPath or Getter");e.union(s(t))}})});return e.union(n)}function u(t){if(!(0,h.isKeyPath)(t))throw new Error("Cannot create Getter from KeyPath: "+t);return[t,p]}function c(t){if(t.hasOwnProperty("__storeDeps"))return t.__storeDeps;var e=s(t).map(function(t){return t.first()}).filter(function(t){return!!t});return Object.defineProperty(t,"__storeDeps",{enumerable:!1,configurable:!1,writable:!1,value:e}),e}Object.defineProperty(e,"__esModule",{value:!0});var l=n(3),f=r(l),d=n(4),h=n(11),p=function(t){return t};e["default"]={isGetter:i,getComputeFn:o,getFlattenedDeps:s,getStoreDeps:c,getDeps:a,fromKeyPath:u},t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){return(0,u.isArray)(t)&&!(0,u.isFunction)(t[t.length-1])}function o(t,e){var n=s["default"].List(t),r=s["default"].List(e);return s["default"].is(n,r)}Object.defineProperty(e,"__esModule",{value:!0}),e.isKeyPath=i,e.isEqual=o;var a=n(3),s=r(a),u=n(4)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=(0,r.Map)({logDispatches:!1,logAppState:!1,logDirtyStores:!1,throwOnUndefinedActionType:!1,throwOnUndefinedStoreReturnValue:!1,throwOnNonImmutableStore:!1,throwOnDispatchInDispatch:!1});e.PROD_OPTIONS=i;var o=(0,r.Map)({logDispatches:!0,logAppState:!0,logDirtyStores:!0,throwOnUndefinedActionType:!0,throwOnUndefinedStoreReturnValue:!0,throwOnNonImmutableStore:!0,throwOnDispatchInDispatch:!0});e.DEBUG_OPTIONS=o;var a=(0,r.Record)({dispatchId:0,state:(0,r.Map)(),stores:(0,r.Map)(),cache:(0,r.Map)(),storeStates:(0,r.Map)(),dirtyStores:(0,r.Set)(),debug:!1,options:i});e.ReactorState=a;var s=(0,r.Record)({any:(0,r.Set)(),stores:(0,r.Map)({}),observersMap:(0,r.Map)({}),nextId:1});e.ObserverState=s}])})},function(t,e,n){"use strict";var r=n(1),i=n(210);e.a=i.a.bind()(r.a.reactor)},function(t,e,n){"use strict";var r=n(74),i=r.a;Object.defineProperty(e,"a",{configurable:!1,enumerable:!0,get:function(){return i}})},function(t,e){"use strict";var n=function(t){var e,n={};if(!(t instanceof Object)||Array.isArray(t))throw new Error("keyMirror(...): Argument must be an object.");for(e in t)t.hasOwnProperty(e)&&(n[e]=e);return n};t.exports=n},function(t,e,n){"use strict";var r=n(0);n(161),n(59),e["default"]=new r.a({is:"state-info",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object}}})},function(t,e,n){"use strict";var r=n(96),i=n(98),o=r.a;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return o}});var a=i;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return a}})},function(t,e,n){"use strict";var r=n(0);e["default"]=new r.a({is:"partial-base",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1}},computeMenuButtonClass:function(t,e){return!t&&e?"invisible":""},toggleMenu:function(){this.fire("open-menu")}})},function(t,e,n){"use strict";function r(t){t.registerStores({restApiCache:c.a})}function i(t){return[["restApiCache",t.entity],function(t){return!!t}]}function o(t){return[["restApiCache",t.entity],function(t){return t||s.toImmutable.bind()({})}]}function a(t){return function(e){return["restApiCache",t.entity,e]}}var s=n(2),u=s&&s.__esModule?function(){return s["default"]}:function(){return s};Object.defineProperty(u,"a",{get:u});var c=n(123),l=n(122);e.register=r,e.createHasDataGetter=i,e.createEntityMapGetter=o,e.createByIdGetter=a;var f=l.a;Object.defineProperty(e,"createApiActions",{configurable:!1,enumerable:!0,get:function(){return f}})},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({ENTITY_HISTORY_DATE_SELECTED:null,ENTITY_HISTORY_FETCH_START:null,ENTITY_HISTORY_FETCH_ERROR:null,ENTITY_HISTORY_FETCH_SUCCESS:null,RECENT_ENTITY_HISTORY_FETCH_START:null,RECENT_ENTITY_HISTORY_FETCH_ERROR:null,RECENT_ENTITY_HISTORY_FETCH_SUCCESS:null,LOG_OUT:null})},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({LOGBOOK_DATE_SELECTED:null,LOGBOOK_ENTRIES_FETCH_START:null,LOGBOOK_ENTRIES_FETCH_ERROR:null,LOGBOOK_ENTRIES_FETCH_SUCCESS:null})},function(t,e,n){"use strict";var r=n(124),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=n(49),a=i.a;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return a}});var s=o;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return s}})},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({VALIDATING_AUTH_TOKEN:null,VALID_AUTH_TOKEN:null,INVALID_AUTH_TOKEN:null,LOG_OUT:null})},function(t,e,n){"use strict";function r(t){t.registerStores({authAttempt:i.a,authCurrent:o.a,rememberAuth:a.a})}var i=n(77),o=n(78),a=n(79),s=n(75),u=n(76);e.register=r;var c=s;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return c}});var l=u;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return l}})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(2),s=a&&a.__esModule?function(){return a["default"]}:function(){return a};Object.defineProperty(s,"a",{get:s});var u=n(97),c=n(26),l=n(4),f=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),h="entity",p=new a.Immutable.Record({entityId:null,domain:null,objectId:null,state:null,entityDisplay:null,stateDisplay:null,lastChanged:null,lastChangedAsDate:null,lastUpdated:null,lastUpdatedAsDate:null,attributes:{},isCustomGroup:null},"Entity"),v=function(t){function e(t,n,o,a){var s=arguments.length<=4||void 0===arguments[4]?{}:arguments[4];r(this,e);var u=t.split("."),l=f(u,2),d=l[0],h=l[1],p=n.replace(/_/g," ");return s.unit_of_measurement&&(p+=" "+s.unit_of_measurement),i(this,Object.getPrototypeOf(e).call(this,{entityId:t,domain:d,objectId:h,state:n,stateDisplay:p,lastChanged:o,lastUpdated:a,attributes:s,entityDisplay:s.friendly_name||h.replace(/_/g," "),lastChangedAsDate:c.a.bind()(o),lastUpdatedAsDate:c.a.bind()(a),isCustomGroup:"group"===d&&!s.auto}))}return o(e,t),d(e,[{key:"domainModel",value:function(t){if("media_player"!==this.domain)throw new Error("Domain does not have a model");return new u.a(t,this)}},{key:"id",get:function(){return this.entityId}}],[{key:"save",value:function(t,e){var n=a.toJS.bind()(e),r=n.entityId,i=n.state,o=n.attributes,s=void 0===o?{}:o,u={state:i,attributes:s};return l.a.bind()(t,"POST","states/"+r,u)}},{key:"fetch",value:function(t,e){return l.a.bind()(t,"GET","states/"+e)}},{key:"fetchAll",value:function(t){return l.a.bind()(t,"GET","states")}},{key:"fromJSON",value:function(t){var n=t.entity_id,r=t.state,i=t.last_changed,o=t.last_updated,a=t.attributes;return new e(n,r,i,o,a)}}]),e}(p);v.entity=h,e.a=v},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({SERVER_CONFIG_LOADED:null,COMPONENT_LOADED:null,LOG_OUT:null})},function(t,e,n){"use strict";function r(t){t.registerStores({serverComponent:i.a,serverConfig:o.a})}var i=n(82),o=n(83),a=n(80),s=n(81);e.register=r;var u=a;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return u}});var c=s;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return c}})},function(t,e,n){"use strict";var r=n(101),i=n(102),o=r.a;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return o}});var a=i;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return a}})},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({NAVIGATE:null,SHOW_SIDEBAR:null,LOG_OUT:null})},function(t,e,n){"use strict";function r(t){t.registerStores({notifications:i.a})}var i=n(119),o=n(117),a=n(118);e.register=r;var s=o;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return s}});var u=a;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return u}})},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({API_FETCH_SUCCESS:null,API_FETCH_START:null,API_FETCH_FAIL:null,API_SAVE_SUCCESS:null,API_SAVE_START:null,API_SAVE_FAIL:null,API_DELETE_SUCCESS:null,API_DELETE_START:null,API_DELETE_FAIL:null,LOG_OUT:null})},function(t,e,n){"use strict";function r(t){t.registerStores({streamStatus:i.a})}var i=n(131),o=n(127),a=n(128);e.register=r;var s=o;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return s}});var u=a;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return u}})},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({API_FETCH_ALL_START:null,API_FETCH_ALL_SUCCESS:null,API_FETCH_ALL_FAIL:null,SYNC_SCHEDULED:null,SYNC_SCHEDULE_CANCELLED:null})},function(t,e,n){"use strict";function r(t){t.registerStores({isFetchingData:i.a,isSyncScheduled:o.a})}var i=n(133),o=n(134),a=n(132),s=n(52);e.register=r;var u=a;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return u}});var c=s;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return c}})},function(t,e,n){"use strict";function r(t){return t.getUTCFullYear()+"-"+(t.getUTCMonth()+1)+"-"+t.getUTCDate()}e.a=r},function(t,e,n){"use strict";function r(t){return new Date(t)}e.a=r},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(211),a=i.a.serviceActions;e["default"]=new r.a({is:"ha-entity-toggle",properties:{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&&-1===o.a.indexOf(t.state)},callService:function(t){var e=this,n=void 0,r=void 0;"lock"===this.stateObj.domain?(n="lock",r=t?"lock":"unlock"):"garage_door"===this.stateObj.domain?(n="garage_door",r=t?"open":"close"):(n="homeassistant",r=t?"turn_on":"turn_off");var i=a.callService(n,r,{entity_id:this.stateObj.entityId});this.stateObj.attributes.assumed_state||i.then(function(){return e.forceStateChange()})}})},function(t,e,n){"use strict";var r=n(0);e["default"]=new r.a({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(t){return t&&t.length>4?"value big":"value"},computeHideIcon:function(t,e,n){return!t||e||n},computeHideValue:function(t,e){return!t||e},imageChanged:function(t){this.$.badge.style.backgroundImage=t?"url("+t+")":""}})},function(t,e,n){"use strict";var r=n(0);e["default"]=new r.a({is:"loading-box"})},function(t,e,n){"use strict";var r=n(0),i=n(212),o=n(34);n(200),n(61),n(201),n(202),n(203),n(205),n(206),n(204),n(207),n(208),n(209),e["default"]=new r.a({is:"state-card-content",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},observers:["inputChanged(inDialog, stateObj)"],inputChanged:function(t,e){e&&o.a.bind()(this,"STATE-CARD-"+i.a.bind()(e).toUpperCase(),{stateObj:e,inDialog:t})}})},function(t,e,n){"use strict";function r(t,e){return t?e.map(function(e){return e in t.attributes?"has-"+e:""}).join(" "):""}e.a=r},function(t,e,n){"use strict";function r(t){return o.evaluate(a.canToggleEntity(t))}var i=n(1);e.a=r;var o=i.a.reactor,a=i.a.serviceGetters},function(t,e,n){"use strict";function r(t,e){switch(t){case"alarm_control_panel":return e&&"disarmed"===e?"mdi:bell-outline":"mdi:bell";case"automation":return"mdi:playlist-play";case"binary_sensor":return e&&"off"===e?"mdi:radiobox-blank":"mdi:checkbox-marked-circle";case"camera":return"mdi:video";case"configurator":return"mdi:settings";case"conversation":return"mdi:text-to-speech";case"device_tracker":return"mdi:account";case"garage_door":return"mdi:glassdoor";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 e&&"unlocked"===e?"mdi:lock-open":"mdi:lock";case"media_player":return e&&"off"!==e&&"idle"!==e?"mdi:cast-connected":"mdi:cast";case"notify":return"mdi:comment-alert";case"proximity":return"mdi:apple-safari";case"rollershutter":return e&&"open"===e?"mdi:window-open":"mdi:window-closed";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"thermostat":return"mdi:nest-thermostat";case"updater":return"mdi:cloud-upload";case"weblink":return"mdi:open-in-new";default:return console.warn("Unable to find icon for domain "+t+" ("+e+")"),i.a}}var i=n(62);e.a=r},function(t,e,n){"use strict";function r(t,e,n){var r=i.a.dom(t),o=void 0;r.lastChild&&r.lastChild.tagName===e?o=r.lastChild:(r.lastChild&&r.removeChild(r.lastChild),o=document.createElement(e)),Object.keys(n).forEach(function(t){o[t]=n[t]}),null===o.parentNode&&r.appendChild(o)}var i=n(0);e.a=r},function(t,e){function n(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=n},function(t,e){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function r(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;10>n;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(o){return!1}}var i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=r()?Object.assign:function(t,e){for(var r,a,s=n(t),u=1;u<arguments.length;u++){r=Object(arguments[u]);for(var c in r)i.call(r,c)&&(s[c]=r[c]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var l=0;l<a.length;l++)o.call(r,a[l])&&(s[a[l]]=r[a[l]])}}return s}},function(t,e){function n(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){"use strict";var r=n(1),i=r.a.authActions,o=r.a.localStoragePreferences;e.a=function(t,e){i.validate(t,{rememberAuth:e,useStreaming:o.useStreaming})}},function(t,e,n){"use strict";function r(){var t=new Date((new Date).getTime()-80*Math.random()*60*1e3);return t.toISOString()}function i(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];a.push({state:e,attributes:n,entity_id:t,last_changed:r(),last_updated:r()})}function o(t,e,n,r,o){s++;var a={entity_id:n,order:s};r&&(a.friendly_name=r),o&&(a.view=o,a.hidden=!0),i("group."+t,e,a)}var a=[],s=0;i("a.demo_mode","enabled"),i("configurator.philips_hue","configure",{configure_id:"4415244496-1",description:"Press the button on the bridge to register Philips Hue with Home Assistant.",description_image:"/demo/images/config_philips_hue.jpg",fields:[],submit_caption:"I have pressed the button"}),o("default_view","on",["a.demo_mode","sensor.humidity","sensor.temperature","device_tracker.paulus","device_tracker.anne_therese","configurator.philips_hue","group.cooking","group.general","group.rooms","camera.roundabout","media_player.living_room","scene.romantic","scene.good_morning","script.water_lawn"],"Main",!0),o("rooms_view","on",["group.living_room","group.bedroom"],"Rooms",!0),o("rooms","on",["group.living_room","group.bedroom"]),i("device_tracker.anne_therese","school",{entity_picture:"https://graph.facebook.com/621994601/picture",friendly_name:"Anne Therese",latitude:32.879898,longitude:-117.236776,gps_accuracy:250,battery:76}),i("device_tracker.paulus","not_home",{entity_picture:"https://graph.facebook.com/297400035/picture",friendly_name:"Paulus",gps_accuracy:75,latitude:32.89295,longitude:-117.203431,battery:56}),i("zone.school","zoning",{radius:250,latitude:32.880834,longitude:-117.237556,icon:"mdi:library",hidden:!0}),i("zone.work","zoning",{radius:250,latitude:32.896844,longitude:-117.202204,icon:"mdi:worker",hidden:!0}),i("zone.home","zoning",{radius:100,latitude:32.873708,longitude:-117.22659,icon:"mdi:home",hidden:!0}),o("general","off",["alarm_control_panel.home","garage_door.garage_door","lock.kitchen_door","thermostat.nest","camera.roundabout"]),i("camera.roundabout","idle",{entity_picture:"/demo/webcam.jpg"}),i("garage_door.garage_door","open"),i("alarm_control_panel.home","armed_home",{friendly_name:"Alarm",code_format:"^\\d{4}"}),i("lock.kitchen_door","open"),i("script.water_lawn","off"),i("scene.romantic","scening"),i("scene.good_morning","scening"),o("living_room","on",["light.table_lamp","light.ceiling","light.tv_back_light","switch.ac","media_player.living_room"]),i("light.tv_back_light","off",{friendly_name:"TV Back Light"}),i("light.ceiling","on",{friendly_name:"Ceiling Lights",brightness:200,rgb_color:[255,116,155]}),i("light.table_lamp","on",{brightness:200,rgb_color:[150,212,94]}),i("switch.ac","on",{friendly_name:"AC",icon:"mdi:air-conditioner"}),i("media_player.living_room","playing",{entity_picture:"/demo/images/thrones.jpg",friendly_name:"Chromecast",supported_media_commands:509,media_content_type:"tvshow",media_title:"The Dance of Dragons",media_series_title:"Game of Thrones",media_season:5,media_episode:9,app_name:"HBO Now"}),o("bedroom","off",["light.bed_light","switch.decorative_lights","rollershutter.bedroom_window"]),i("switch.decorative_lights","off"),i("light.bed_light","off"),i("rollershutter.bedroom_window","closed",{friendly_name:"Window",current_position:0}),i("sensor.temperature","15.6",{unit_of_measurement:"°C",friendly_name:"Temperature"}),i("sensor.humidity","54",{unit_of_measurement:"%",friendly_name:"Humidity"}),i("thermostat.nest","23",{away_mode:"off",temperature:"21",current_temperature:"18",unit_of_measurement:"°C"}),i("input_select.cook_today","Paulus",{options:["Paulus","Anne Therese"],icon:"mdi:panda"}),i("input_boolean.notify_cook","on",{icon:"mdi:alarm"}),o("cooking","unknown",["input_select.cook_today","input_boolean.notify_cook"]),e.a=a},function(t,e,n){"use strict";var r=n(2),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=["isLoadingEntityHistory"];Object.defineProperty(e,"isLoadingEntityHistory",{configurable:!1,enumerable:!0,get:function(){return o}});var a=["currentEntityHistoryDate"];Object.defineProperty(e,"currentDate",{configurable:!1,enumerable:!0,get:function(){return a}});var s=["entityHistory"];Object.defineProperty(e,"entityHistoryMap",{configurable:!1,enumerable:!0,get:function(){return s}});var u=[a,s,function(t,e){return e.get(t)||r.toImmutable.bind()({})}];Object.defineProperty(e,"entityHistoryForCurrentDate",{configurable:!1,enumerable:!0,get:function(){return u}});var c=[a,s,function(t,e){return!!e.get(t)}];Object.defineProperty(e,"hasDataForCurrentDate",{configurable:!1,enumerable:!0,get:function(){return c}});var l=["recentEntityHistory"];Object.defineProperty(e,"recentEntityHistoryMap",{configurable:!1,enumerable:!0,get:function(){return l}});var f=["recentEntityHistory"];Object.defineProperty(e,"recentEntityHistoryUpdatedMap",{configurable:!1,enumerable:!0,get:function(){return f}})},function(t,e,n){"use strict";function r(t){t.registerStores({currentEntityHistoryDate:i.a,entityHistory:o.a,isLoadingEntityHistory:a.a,recentEntityHistory:s.a,recentEntityHistoryUpdated:u.a})}var i=n(91),o=n(92),a=n(93),s=n(94),u=n(95),c=n(90),l=n(40);e.register=r;var f=c;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return f}});var d=l;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return d}})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(2),s=a&&a.__esModule?function(){return a["default"]}:function(){return a};Object.defineProperty(s,"a",{get:s});var u=n(4),c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l="event",f=new a.Immutable.Record({event:null,listenerCount:0},"Event"),d=function(t){function e(t){var n=arguments.length<=1||void 0===arguments[1]?0:arguments[1];return r(this,e),i(this,Object.getPrototypeOf(e).call(this,{event:t,listenerCount:n}))}return o(e,t),c(e,[{key:"id",get:function(){return this.event}}],[{key:"fetchAll",value:function(t){return u.a.bind()(t,"GET","events")}},{key:"fromJSON",value:function(t){var n=t.event,r=t.listener_count;return new e(n,r)}}]),e}(f);d.entity=l,e.a=d},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({SELECT_ENTITY:null,LOG_OUT:null})},function(t,e,n){"use strict";function r(t){t.registerStores({moreInfoEntityId:i.a})}var i=n(113),o=n(111),a=n(112);e.register=r;var s=o;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return s}});var u=a;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){
return u}})},function(t,e,n){"use strict";function r(t,e){t.dispatch(o.a.SHOW_SIDEBAR,{show:e})}function i(t,e){t.dispatch(o.a.NAVIGATE,{pane:e})}var o=n(19);e.showSidebar=r,e.navigate=i},function(t,e,n){"use strict";function r(t){return[i,function(e){return e===t}]}e.isActivePane=r;var i=["selectedNavigationPanel"];Object.defineProperty(e,"activePane",{configurable:!1,enumerable:!0,get:function(){return i}});var o=["showSidebar"];Object.defineProperty(e,"showSidebar",{configurable:!1,enumerable:!0,get:function(){return o}})},function(t,e,n){"use strict";function r(t){t.registerStores({selectedNavigationPanel:i.a,showSidebar:o.a})}var i=n(114),o=n(115),a=n(45),s=n(46),u=n(116);e.register=r;var c=a;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return c}});var l=s;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return l}});var f=u;Object.defineProperty(e,"urlSync",{configurable:!1,enumerable:!0,get:function(){return f}})},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({NOTIFICATION_CREATED:null})},function(t,e,n){"use strict";function r(t,e){return[f(t),function(t){return!!t&&t.services.has(e)}]}function i(t){return[a.getters.byId(t),l,u.a]}var o=n(9),a=n(7),s=n(50),u=n(126);e.hasService=r,e.canToggleEntity=i;var c=o.createHasDataGetter.bind()(s.a);Object.defineProperty(e,"hasData",{configurable:!1,enumerable:!0,get:function(){return c}});var l=o.createEntityMapGetter.bind()(s.a);Object.defineProperty(e,"entityMap",{configurable:!1,enumerable:!0,get:function(){return l}});var f=o.createByIdGetter.bind()(s.a);Object.defineProperty(e,"byDomain",{configurable:!1,enumerable:!0,get:function(){return f}})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(2),s=a&&a.__esModule?function(){return a["default"]}:function(){return a};Object.defineProperty(s,"a",{get:s});var u=n(4),c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l="service",f=new a.Immutable.Record({domain:null,services:[]},"ServiceDomain"),d=function(t){function e(t,n){return r(this,e),i(this,Object.getPrototypeOf(e).call(this,{domain:t,services:n}))}return o(e,t),c(e,[{key:"id",get:function(){return this.domain}}],[{key:"fetchAll",value:function(){return u.a.bind()("GET","services")}},{key:"fromJSON",value:function(t){var n=t.domain,r=t.services;return new e(n,a.toImmutable.bind()(r))}}]),e}(f);d.entity=l,e.a=d},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({STREAM_START:null,STREAM_STOP:null,STREAM_ERROR:null})},function(t,e,n){"use strict";var r=n(7),i=n(18),o=n(12),a=[r.getters.hasData,i.getters.hasData,o.getters.hasData,function(t,e,n){return t&&e&&n}];Object.defineProperty(e,"isDataLoaded",{configurable:!1,enumerable:!0,get:function(){return a}});var s=["isFetchingData"];Object.defineProperty(e,"isFetching",{configurable:!1,enumerable:!0,get:function(){return s}});var u=["isSyncScheduled"];Object.defineProperty(e,"isSyncScheduled",{configurable:!1,enumerable:!0,get:function(){return u}})},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({SELECT_VIEW:null})},function(t,e,n){"use strict";function r(t){t.registerStores({currentView:i.a})}var i=n(139),o=n(137),a=n(138);e.register=r;var s=o;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return s}});var u=a;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return u}})},function(t,e,n){"use strict";var r=n(5),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i}),e.a=i.a.bind()({VOICE_START:null,VOICE_RESULT:null,VOICE_TRANSMITTING:null,VOICE_DONE:null,VOICE_ERROR:null})},function(t,e,n){"use strict";function r(t){return!t||(new Date).getTime()-t>6e4}e.a=r},function(t,e,n){"use strict";var r=n(0),i=n(33);e["default"]=new r.a({is:"domain-icon",properties:{domain:{type:String,value:""},state:{type:String,value:""}},computeIcon:function(t,e){return i.a.bind()(t,e)}})},function(t,e,n){"use strict";var r=n(0);e["default"]=new r.a({is:"ha-card",properties:{header:{type:String},elevation:{type:Number,value:1,reflectToAttribute:!0}}})},function(t,e,n){"use strict";var r=n(69),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=n(1),a=n(0),s=6e4,u=o.a.util.parseDateTime;e["default"]=new a.a({is:"relative-ha-datetime",properties:{datetime:{type:String,observer:"datetimeChanged"},datetimeObj:{type:Object,observer:"datetimeObjChanged"},parsedDateTime:{type:Object},relativeTime:{type:String,value:"not set"}},created:function(){this.updateRelative=this.updateRelative.bind(this)},attached:function(){this.updateInterval=setInterval(this.updateRelative,s)},detached:function(){clearInterval(this.updateInterval)},datetimeChanged:function(t){this.parsedDateTime=t?u(t):null,this.updateRelative()},datetimeObjChanged:function(t){this.parsedDateTime=t,this.updateRelative()},updateRelative:function(){this.relativeTime=this.parsedDateTime?i.a.bind()(this.parsedDateTime).fromNow():""}})},function(t,e,n){"use strict";var r=n(0);n(29),n(171),n(170),e["default"]=new r.a({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){if(t||!e)return{line:[],timeline:[]};var n={},r=[];e.forEach(function(t){if(t&&0!==t.size){var e=t.find(function(t){return"unit_of_measurement"in t.attributes}),i=e?e.attributes.unit_of_measurement:!1;i?i in n?n[i].push(t.toArray()):n[i]=[t.toArray()]:r.push(t.toArray())}}),r=r.length>0&&r;var i=Object.keys(n).map(function(t){return[t,n[t]]});return{line:i,timeline:r}},googleApiLoaded:function(){var t=this;window.google.load("visualization","1",{packages:["timeline","corechart"],callback:function(){t.apiLoaded=!0}})},computeContentClasses:function(t){return t?"loading":""},computeIsLoading:function(t,e){return t||!e},computeIsEmpty:function(t){return t&&0===t.size},extractUnit:function(t){return t[0]},extractData:function(t){return t[1]}})},function(t,e,n){"use strict";var r=n(0);n(6),e["default"]=new r.a({is:"state-card-display",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object}}})},function(t,e,n){"use strict";e.a="mdi:bookmark"},function(t,e,n){"use strict";function r(t){return o.a.bind()(t).format("LT")}var i=n(69),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(o,"a",{get:o}),e.a=r},function(t,e,n){"use strict";function r(){var t=document.getElementById("ha-init-skeleton");t&&t.parentElement.removeChild(t)}e.a=r},function(t,e,n){"use strict";function r(t){var e=t.state&&"off"===t.state;switch(t.attributes.sensor_class){case"opening":return e?"mdi:crop-square":"mdi:exit-to-app";case"moisture":return e?"mdi:water-off":"mdi:water";case"light":return e?"mdi:brightness-5":"mdi:brightness-7";case"sound":return e?"mdi:music-note-off":"mdi:music-note";case"vibration":return e?"mdi:crop-portrait":"mdi:vibrate";case"connectivity":return e?"mdi:server-network-off":"mdi:server-network";case"safety":case"gas":case"smoke":case"power":return e?"mdi:verified":"mdi:alert";case"motion":return e?"mdi:walk":"mdi:run";case"digital":default:return e?"mdi:radiobox-blank":"mdi:checkbox-marked-circle"}}function i(t){if(!t)return o.a;if(t.attributes.icon)return t.attributes.icon;var e=t.attributes.unit_of_measurement;if(e&&"sensor"===t.domain){if(e===u.UNIT_TEMP_C||e===u.UNIT_TEMP_F)return"mdi:thermometer";if("Mice"===e)return"mdi:mouse-variant"}else if("binary_sensor"===t.domain)return r(t);return a.a.bind()(t.domain,t.state)}var o=n(62),a=n(33),s=n(1);e.a=i;var u=s.a.util.temperatureUnits},function(t,e,n){function r(t,e,n){function r(e){var n=y,r=g;return y=g=void 0,T=e,S=t.apply(r,n)}function l(t){return T=t,w=setTimeout(h,e),I?r(t):S}function f(t){var n=t-O,r=t-T,i=e-n;return E?c(i,b-r):i}function d(t){var n=t-O,r=t-T;return!O||n>=e||0>n||E&&r>=b}function h(){var t=o();return d(t)?p(t):void(w=setTimeout(h,f(t)))}function p(t){return clearTimeout(w),w=void 0,D&&y?r(t):(y=g=void 0,S)}function v(){void 0!==w&&clearTimeout(w),O=T=0,y=g=w=void 0}function _(){return void 0===w?S:p(o())}function m(){var t=o(),n=d(t);if(y=arguments,g=this,O=t,n){if(void 0===w)return l(O);if(E)return clearTimeout(w),w=setTimeout(h,e),r(O)}return void 0===w&&(w=setTimeout(h,e)),S}var y,g,b,S,w,O=0,T=0,I=!1,E=!1,D=!0;if("function"!=typeof t)throw new TypeError(s);return e=a(e)||0,i(n)&&(I=!!n.leading,E="maxWait"in n,b=E?u(a(n.maxWait)||0,e):b,D="trailing"in n?!!n.trailing:D),m.cancel=v,m.flush=_,m}var i=n(35),o=n(219),a=n(220),s="Expected a function",u=Math.max,c=Math.min;t.exports=r},function(t,e,n){function r(t){var e=i(t)?u.call(t):"";return e==o||e==a}var i=n(35),o="[object Function]",a="[object GeneratorFunction]",s=Object.prototype,u=s.toString;t.exports=r},function(t,e,n){function r(t){var e=i(t)?u.call(t):"";return e==o||e==a}var i=n(37),o="[object Function]",a="[object GeneratorFunction]",s=Object.prototype,u=s.toString;t.exports=r},function(t,e,n){(function(t){!function(e,n){t.exports=n()}(this,function(){"use strict";function e(){return sr.apply(null,arguments)}function n(t){sr=t}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function i(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function o(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function a(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function s(t,e){for(var n in e)a(e,n)&&(t[n]=e[n]);return a(e,"toString")&&(t.toString=e.toString),a(e,"valueOf")&&(t.valueOf=e.valueOf),t}function u(t,e,n,r){return Rt(t,e,n,r,!0).utc()}function c(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function l(t){return null==t._pf&&(t._pf=c()),t._pf}function f(t){if(null==t._isValid){var e=l(t),n=ur.call(e.parsedDateParts,function(t){return null!=t});t._isValid=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n),t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)}return t._isValid}function d(t){var e=u(NaN);return null!=t?s(l(e),t):l(e).userInvalidated=!0,e}function h(t){return void 0===t}function p(t,e){var n,r,i;if(h(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),h(e._i)||(t._i=e._i),h(e._f)||(t._f=e._f),h(e._l)||(t._l=e._l),h(e._strict)||(t._strict=e._strict),h(e._tzm)||(t._tzm=e._tzm),h(e._isUTC)||(t._isUTC=e._isUTC),h(e._offset)||(t._offset=e._offset),h(e._pf)||(t._pf=l(e)),h(e._locale)||(t._locale=e._locale),cr.length>0)for(n in cr)r=cr[n],i=e[r],h(i)||(t[r]=i);return t}function v(t){p(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),lr===!1&&(lr=!0,e.updateOffset(this),lr=!1)}function _(t){return t instanceof v||null!=t&&null!=t._isAMomentObject}function m(t){return 0>t?Math.ceil(t):Math.floor(t)}function y(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=m(e)),n}function g(t,e,n){var r,i=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),a=0;for(r=0;i>r;r++)(n&&t[r]!==e[r]||!n&&y(t[r])!==y(e[r]))&&a++;return a+o}function b(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function S(t,n){var r=!0;return s(function(){return null!=e.deprecationHandler&&e.deprecationHandler(null,t),r&&(b(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),r=!1),n.apply(this,arguments)},n)}function w(t,n){null!=e.deprecationHandler&&e.deprecationHandler(t,n),fr[t]||(b(n),fr[t]=!0)}function O(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function T(t){return"[object Object]"===Object.prototype.toString.call(t)}function I(t){var e,n;for(n in t)e=t[n],O(e)?this[n]=e:this["_"+n]=e;this._config=t,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function E(t,e){var n,r=s({},t);for(n in e)a(e,n)&&(T(t[n])&&T(e[n])?(r[n]={},s(r[n],t[n]),s(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);return r}function D(t){null!=t&&this.set(t)}function k(t){return t?t.toLowerCase().replace("_","-"):t}function C(t){for(var e,n,r,i,o=0;o<t.length;){for(i=k(t[o]).split("-"),e=i.length,n=k(t[o+1]),n=n?n.split("-"):null;e>0;){if(r=M(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&g(i,n,!0)>=e-1)break;e--}o++}return null}function M(e){var n=null;if(!vr[e]&&"undefined"!=typeof t&&t&&t.exports)try{n=hr._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),j(n)}catch(r){}return vr[e]}function j(t,e){var n;return t&&(n=h(e)?L(t):P(t,e),n&&(hr=n)),hr._abbr}function P(t,e){return null!==e?(e.abbr=t,null!=vr[t]?(w("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),e=E(vr[t]._config,e)):null!=e.parentLocale&&(null!=vr[e.parentLocale]?e=E(vr[e.parentLocale]._config,e):w("parentLocaleUndefined","specified parentLocale is not defined yet")),vr[t]=new D(e),j(t),vr[t]):(delete vr[t],null)}function A(t,e){if(null!=e){var n;null!=vr[t]&&(e=E(vr[t]._config,e)),n=new D(e),n.parentLocale=vr[t],vr[t]=n,j(t)}else null!=vr[t]&&(null!=vr[t].parentLocale?vr[t]=vr[t].parentLocale:null!=vr[t]&&delete vr[t]);return vr[t]}function L(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return hr;if(!r(t)){if(e=M(t))return e;t=[t]}return C(t)}function x(){return dr(vr)}function R(t,e){var n=t.toLowerCase();_r[n]=_r[n+"s"]=_r[e]=t}function N(t){return"string"==typeof t?_r[t]||_r[t.toLowerCase()]:void 0}function H(t){var e,n,r={};for(n in t)a(t,n)&&(e=N(n),e&&(r[e]=t[n]));return r}function z(t,n){return function(r){return null!=r?(U(this,t,r),e.updateOffset(this,n),this):Y(this,t)}}function Y(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function U(t,e,n){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](n)}function V(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if(t=N(t),O(this[t]))return this[t](e);return this}function B(t,e,n){var r=""+Math.abs(t),i=e-r.length,o=t>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}function G(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(br[t]=i),e&&(br[e[0]]=function(){return B(i.apply(this,arguments),e[1],e[2])}),n&&(br[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function F(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function W(t){var e,n,r=t.match(mr);for(e=0,n=r.length;n>e;e++)br[r[e]]?r[e]=br[r[e]]:r[e]=F(r[e]);return function(e){var i,o="";for(i=0;n>i;i++)o+=r[i]instanceof Function?r[i].call(e,t):r[i];return o}}function q(t,e){return t.isValid()?(e=K(e,t.localeData()),gr[e]=gr[e]||W(e),gr[e](t)):t.localeData().invalidDate()}function K(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(yr.lastIndex=0;r>=0&&yr.test(t);)t=t.replace(yr,n),yr.lastIndex=0,r-=1;return t}function J(t,e,n){Hr[t]=O(e)?e:function(t,r){return t&&n?n:e}}function $(t,e){return a(Hr,t)?Hr[t](e._strict,e._locale):new RegExp(Z(t))}function Z(t){return X(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i}))}function X(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(r=function(t,n){n[e]=y(t)}),n=0;n<t.length;n++)zr[t[n]]=r}function tt(t,e){Q(t,function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)})}function et(t,e,n){null!=e&&a(zr,t)&&zr[t](e,n._a,n,t)}function nt(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function rt(t,e){return r(this._months)?this._months[t.month()]:this._months[Jr.test(e)?"format":"standalone"][t.month()]}function it(t,e){return r(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Jr.test(e)?"format":"standalone"][t.month()]}function ot(t,e,n){var r,i,o,a=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;12>r;++r)o=u([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===e?(i=pr.call(this._shortMonthsParse,a),-1!==i?i:null):(i=pr.call(this._longMonthsParse,a),-1!==i?i:null):"MMM"===e?(i=pr.call(this._shortMonthsParse,a),-1!==i?i:(i=pr.call(this._longMonthsParse,a),-1!==i?i:null)):(i=pr.call(this._longMonthsParse,a),-1!==i?i:(i=pr.call(this._shortMonthsParse,a),-1!==i?i:null))}function at(t,e,n){var r,i,o;if(this._monthsParseExact)return ot.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(i=u([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function st(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=y(e);else if(e=t.localeData().monthsParse(e),"number"!=typeof e)return t;return n=Math.min(t.date(),nt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function ut(t){return null!=t?(st(this,t),e.updateOffset(this,!0),this):Y(this,"Month")}function ct(){return nt(this.year(),this.month())}function lt(t){return this._monthsParseExact?(a(this,"_monthsRegex")||dt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function ft(t){return this._monthsParseExact?(a(this,"_monthsRegex")||dt.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function dt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],o=[];for(e=0;12>e;e++)n=u([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),o.sort(t),e=0;12>e;e++)r[e]=X(r[e]),i[e]=X(i[e]),o[e]=X(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function ht(t){var e,n=t._a;return n&&-2===l(t).overflow&&(e=n[Ur]<0||n[Ur]>11?Ur:n[Vr]<1||n[Vr]>nt(n[Yr],n[Ur])?Vr:n[Br]<0||n[Br]>24||24===n[Br]&&(0!==n[Gr]||0!==n[Fr]||0!==n[Wr])?Br:n[Gr]<0||n[Gr]>59?Gr:n[Fr]<0||n[Fr]>59?Fr:n[Wr]<0||n[Wr]>999?Wr:-1,l(t)._overflowDayOfYear&&(Yr>e||e>Vr)&&(e=Vr),l(t)._overflowWeeks&&-1===e&&(e=qr),l(t)._overflowWeekday&&-1===e&&(e=Kr),l(t).overflow=e),t}function pt(t){var e,n,r,i,o,a,s=t._i,u=ti.exec(s)||ei.exec(s);if(u){for(l(t).iso=!0,e=0,n=ri.length;n>e;e++)if(ri[e][1].exec(u[1])){i=ri[e][0],r=ri[e][2]!==!1;break}if(null==i)return void(t._isValid=!1);if(u[3]){for(e=0,n=ii.length;n>e;e++)if(ii[e][1].exec(u[3])){o=(u[2]||" ")+ii[e][0];break}if(null==o)return void(t._isValid=!1)}if(!r&&null!=o)return void(t._isValid=!1);if(u[4]){if(!ni.exec(u[4]))return void(t._isValid=!1);a="Z"}t._f=i+(o||"")+(a||""),Ct(t)}else t._isValid=!1}function vt(t){var n=oi.exec(t._i);return null!==n?void(t._d=new Date(+n[1])):(pt(t),void(t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t))))}function _t(t,e,n,r,i,o,a){var s=new Date(t,e,n,r,i,o,a);return 100>t&&t>=0&&isFinite(s.getFullYear())&&s.setFullYear(t),s}function mt(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function yt(t){return gt(t)?366:365}function gt(t){return t%4===0&&t%100!==0||t%400===0}function bt(){return gt(this.year())}function St(t,e,n){var r=7+e-n,i=(7+mt(t,0,r).getUTCDay()-e)%7;return-i+r-1}function wt(t,e,n,r,i){var o,a,s=(7+n-r)%7,u=St(t,r,i),c=1+7*(e-1)+s+u;return 0>=c?(o=t-1,a=yt(o)+c):c>yt(t)?(o=t+1,a=c-yt(t)):(o=t,a=c),{year:o,dayOfYear:a}}function Ot(t,e,n){var r,i,o=St(t.year(),e,n),a=Math.floor((t.dayOfYear()-o-1)/7)+1;return 1>a?(i=t.year()-1,r=a+Tt(i,e,n)):a>Tt(t.year(),e,n)?(r=a-Tt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=a),{week:r,year:i}}function Tt(t,e,n){var r=St(t,e,n),i=St(t+1,e,n);return(yt(t)-r+i)/7}function It(t,e,n){return null!=t?t:null!=e?e:n}function Et(t){var n=new Date(e.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function Dt(t){var e,n,r,i,o=[];if(!t._d){for(r=Et(t),t._w&&null==t._a[Vr]&&null==t._a[Ur]&&kt(t),t._dayOfYear&&(i=It(t._a[Yr],r[Yr]),t._dayOfYear>yt(i)&&(l(t)._overflowDayOfYear=!0),n=mt(i,0,t._dayOfYear),t._a[Ur]=n.getUTCMonth(),t._a[Vr]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=o[e]=r[e];for(;7>e;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Br]&&0===t._a[Gr]&&0===t._a[Fr]&&0===t._a[Wr]&&(t._nextDay=!0,t._a[Br]=0),t._d=(t._useUTC?mt:_t).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Br]=24)}}function kt(t){var e,n,r,i,o,a,s,u;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,a=4,n=It(e.GG,t._a[Yr],Ot(Nt(),1,4).year),r=It(e.W,1),i=It(e.E,1),(1>i||i>7)&&(u=!0)):(o=t._locale._week.dow,a=t._locale._week.doy,n=It(e.gg,t._a[Yr],Ot(Nt(),o,a).year),r=It(e.w,1),null!=e.d?(i=e.d,(0>i||i>6)&&(u=!0)):null!=e.e?(i=e.e+o,(e.e<0||e.e>6)&&(u=!0)):i=o),1>r||r>Tt(n,o,a)?l(t)._overflowWeeks=!0:null!=u?l(t)._overflowWeekday=!0:(s=wt(n,r,i,o,a),t._a[Yr]=s.year,t._dayOfYear=s.dayOfYear)}function Ct(t){if(t._f===e.ISO_8601)return void pt(t);t._a=[],l(t).empty=!0;var n,r,i,o,a,s=""+t._i,u=s.length,c=0;for(i=K(t._f,t._locale).match(mr)||[],n=0;n<i.length;n++)o=i[n],r=(s.match($(o,t))||[])[0],r&&(a=s.substr(0,s.indexOf(r)),a.length>0&&l(t).unusedInput.push(a),s=s.slice(s.indexOf(r)+r.length),c+=r.length),br[o]?(r?l(t).empty=!1:l(t).unusedTokens.push(o),et(o,r,t)):t._strict&&!r&&l(t).unusedTokens.push(o);l(t).charsLeftOver=u-c,s.length>0&&l(t).unusedInput.push(s),l(t).bigHour===!0&&t._a[Br]<=12&&t._a[Br]>0&&(l(t).bigHour=void 0),l(t).parsedDateParts=t._a.slice(0),l(t).meridiem=t._meridiem,t._a[Br]=Mt(t._locale,t._a[Br],t._meridiem),Dt(t),ht(t)}function Mt(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&12>e&&(e+=12),r||12!==e||(e=0),e):e}function jt(t){var e,n,r,i,o;if(0===t._f.length)return l(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<t._f.length;i++)o=0,e=p({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Ct(e),f(e)&&(o+=l(e).charsLeftOver,o+=10*l(e).unusedTokens.length,l(e).score=o,(null==r||r>o)&&(r=o,n=e));s(t,n||e)}function Pt(t){if(!t._d){var e=H(t._i);t._a=o([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),Dt(t)}}function At(t){var e=new v(ht(Lt(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Lt(t){var e=t._i,n=t._f;return t._locale=t._locale||L(t._l),null===e||void 0===n&&""===e?d({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),_(e)?new v(ht(e)):(r(n)?jt(t):n?Ct(t):i(e)?t._d=e:xt(t),f(t)||(t._d=null),t))}function xt(t){var n=t._i;void 0===n?t._d=new Date(e.now()):i(n)?t._d=new Date(n.valueOf()):"string"==typeof n?vt(t):r(n)?(t._a=o(n.slice(0),function(t){return parseInt(t,10)}),Dt(t)):"object"==typeof n?Pt(t):"number"==typeof n?t._d=new Date(n):e.createFromInputFallback(t)}function Rt(t,e,n,r,i){var o={};return"boolean"==typeof n&&(r=n,n=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=t,o._f=e,o._strict=r,At(o)}function Nt(t,e,n,r){return Rt(t,e,n,r,!1)}function Ht(t,e){var n,i;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return Nt();for(n=e[0],i=1;i<e.length;++i)e[i].isValid()&&!e[i][t](n)||(n=e[i]);return n}function zt(){var t=[].slice.call(arguments,0);return Ht("isBefore",t)}function Yt(){var t=[].slice.call(arguments,0);return Ht("isAfter",t)}function Ut(t){var e=H(t),n=e.year||0,r=e.quarter||0,i=e.month||0,o=e.week||0,a=e.day||0,s=e.hour||0,u=e.minute||0,c=e.second||0,l=e.millisecond||0;this._milliseconds=+l+1e3*c+6e4*u+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=L(),this._bubble()}function Vt(t){return t instanceof Ut}function Bt(t,e){G(t,0,0,function(){var t=this.utcOffset(),n="+";return 0>t&&(t=-t,n="-"),n+B(~~(t/60),2)+e+B(~~t%60,2)})}function Gt(t,e){var n=(e||"").match(t)||[],r=n[n.length-1]||[],i=(r+"").match(li)||["-",0,0],o=+(60*i[1])+y(i[2]);return"+"===i[0]?o:-o}function Ft(t,n){var r,o;return n._isUTC?(r=n.clone(),o=(_(t)||i(t)?t.valueOf():Nt(t).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+o),e.updateOffset(r,!1),r):Nt(t).local()}function Wt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function qt(t,n){var r,i=this._offset||0;return this.isValid()?null!=t?("string"==typeof t?t=Gt(xr,t):Math.abs(t)<16&&(t=60*t),!this._isUTC&&n&&(r=Wt(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!n||this._changeInProgress?le(this,ie(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Wt(this):null!=t?this:NaN}function Kt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Jt(t){return this.utcOffset(0,t)}function $t(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Wt(this),"m")),this}function Zt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Gt(Lr,this._i)),this}function Xt(t){return this.isValid()?(t=t?Nt(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function Qt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function te(){if(!h(this._isDSTShifted))return this._isDSTShifted;var t={};if(p(t,this),t=Lt(t),t._a){var e=t._isUTC?u(t._a):Nt(t._a);this._isDSTShifted=this.isValid()&&g(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function ee(){return this.isValid()?!this._isUTC:!1}function ne(){return this.isValid()?this._isUTC:!1}function re(){return this.isValid()?this._isUTC&&0===this._offset:!1}function ie(t,e){var n,r,i,o=t,s=null;return Vt(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(s=fi.exec(t))?(n="-"===s[1]?-1:1,o={y:0,d:y(s[Vr])*n,h:y(s[Br])*n,m:y(s[Gr])*n,s:y(s[Fr])*n,ms:y(s[Wr])*n}):(s=di.exec(t))?(n="-"===s[1]?-1:1,o={y:oe(s[2],n),M:oe(s[3],n),w:oe(s[4],n),d:oe(s[5],n),h:oe(s[6],n),m:oe(s[7],n),s:oe(s[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=se(Nt(o.from),Nt(o.to)),o={},o.ms=i.milliseconds,o.M=i.months),r=new Ut(o),Vt(t)&&a(t,"_locale")&&(r._locale=t._locale),r}function oe(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function ae(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function se(t,e){var n;return t.isValid()&&e.isValid()?(e=Ft(e,t),t.isBefore(e)?n=ae(t,e):(n=ae(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function ue(t){return 0>t?-1*Math.round(-1*t):Math.round(t)}function ce(t,e){return function(n,r){var i,o;return null===r||isNaN(+r)||(w(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),o=n,n=r,r=o),n="string"==typeof n?+n:n,i=ie(n,r),le(this,i,t),this}}function le(t,n,r,i){var o=n._milliseconds,a=ue(n._days),s=ue(n._months);t.isValid()&&(i=null==i?!0:i,o&&t._d.setTime(t._d.valueOf()+o*r),a&&U(t,"Date",Y(t,"Date")+a*r),s&&st(t,Y(t,"Month")+s*r),i&&e.updateOffset(t,a||s))}function fe(t,e){var n=t||Nt(),r=Ft(n,this).startOf("day"),i=this.diff(r,"days",!0),o=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse",a=e&&(O(e[o])?e[o]():e[o]);return this.format(a||this.localeData().calendar(o,this,Nt(n)))}function de(){return new v(this)}function he(t,e){var n=_(t)?t:Nt(t);return this.isValid()&&n.isValid()?(e=N(h(e)?"millisecond":e),"millisecond"===e?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function pe(t,e){var n=_(t)?t:Nt(t);return this.isValid()&&n.isValid()?(e=N(h(e)?"millisecond":e),"millisecond"===e?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function ve(t,e,n,r){return r=r||"()",("("===r[0]?this.isAfter(t,n):!this.isBefore(t,n))&&(")"===r[1]?this.isBefore(e,n):!this.isAfter(e,n))}function _e(t,e){var n,r=_(t)?t:Nt(t);return this.isValid()&&r.isValid()?(e=N(e||"millisecond"),"millisecond"===e?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf())):!1}function me(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function ye(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function ge(t,e,n){var r,i,o,a;return this.isValid()?(r=Ft(t,this),r.isValid()?(i=6e4*(r.utcOffset()-this.utcOffset()),e=N(e),"year"===e||"month"===e||"quarter"===e?(a=be(this,r),"quarter"===e?a/=3:"year"===e&&(a/=12)):(o=this-r,a="second"===e?o/1e3:"minute"===e?o/6e4:"hour"===e?o/36e5:"day"===e?(o-i)/864e5:"week"===e?(o-i)/6048e5:o),n?a:m(a)):NaN):NaN}function be(t,e){var n,r,i=12*(e.year()-t.year())+(e.month()-t.month()),o=t.clone().add(i,"months");return 0>e-o?(n=t.clone().add(i-1,"months"),r=(e-o)/(o-n)):(n=t.clone().add(i+1,"months"),r=(e-o)/(n-o)),-(i+r)||0}function Se(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function we(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?O(Date.prototype.toISOString)?this.toDate().toISOString():q(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):q(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function Oe(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var n=q(this,t);return this.localeData().postformat(n)}function Te(t,e){return this.isValid()&&(_(t)&&t.isValid()||Nt(t).isValid())?ie({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Ie(t){return this.from(Nt(),t)}
function Ee(t,e){return this.isValid()&&(_(t)&&t.isValid()||Nt(t).isValid())?ie({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function De(t){return this.to(Nt(),t)}function ke(t){var e;return void 0===t?this._locale._abbr:(e=L(t),null!=e&&(this._locale=e),this)}function Ce(){return this._locale}function Me(t){switch(t=N(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function je(t){return t=N(t),void 0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function Pe(){return this._d.valueOf()-6e4*(this._offset||0)}function Ae(){return Math.floor(this.valueOf()/1e3)}function Le(){return this._offset?new Date(this.valueOf()):this._d}function xe(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Re(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Ne(){return this.isValid()?this.toISOString():null}function He(){return f(this)}function ze(){return s({},l(this))}function Ye(){return l(this).overflow}function Ue(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ve(t,e){G(0,[t,t.length],0,e)}function Be(t){return qe.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Ge(t){return qe.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Fe(){return Tt(this.year(),1,4)}function We(){var t=this.localeData()._week;return Tt(this.year(),t.dow,t.doy)}function qe(t,e,n,r,i){var o;return null==t?Ot(this,r,i).year:(o=Tt(t,r,i),e>o&&(e=o),Ke.call(this,t,e,n,r,i))}function Ke(t,e,n,r,i){var o=wt(t,e,n,r,i),a=mt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Je(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function $e(t){return Ot(t,this._week.dow,this._week.doy).week}function Ze(){return this._week.dow}function Xe(){return this._week.doy}function Qe(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function tn(t){var e=Ot(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function en(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function nn(t,e){return r(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function rn(t){return this._weekdaysShort[t.day()]}function on(t){return this._weekdaysMin[t.day()]}function an(t,e,n){var r,i,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;7>r;++r)o=u([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?(i=pr.call(this._weekdaysParse,a),-1!==i?i:null):"ddd"===e?(i=pr.call(this._shortWeekdaysParse,a),-1!==i?i:null):(i=pr.call(this._minWeekdaysParse,a),-1!==i?i:null):"dddd"===e?(i=pr.call(this._weekdaysParse,a),-1!==i?i:(i=pr.call(this._shortWeekdaysParse,a),-1!==i?i:(i=pr.call(this._minWeekdaysParse,a),-1!==i?i:null))):"ddd"===e?(i=pr.call(this._shortWeekdaysParse,a),-1!==i?i:(i=pr.call(this._weekdaysParse,a),-1!==i?i:(i=pr.call(this._minWeekdaysParse,a),-1!==i?i:null))):(i=pr.call(this._minWeekdaysParse,a),-1!==i?i:(i=pr.call(this._weekdaysParse,a),-1!==i?i:(i=pr.call(this._shortWeekdaysParse,a),-1!==i?i:null)))}function sn(t,e,n){var r,i,o;if(this._weekdaysParseExact)return an.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;7>r;r++){if(i=u([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function un(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=en(t,this.localeData()),this.add(t-e,"d")):e}function cn(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function ln(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN}function fn(t){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||pn.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex}function dn(t){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||pn.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function hn(t){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||pn.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function pn(){function t(t,e){return e.length-t.length}var e,n,r,i,o,a=[],s=[],c=[],l=[];for(e=0;7>e;e++)n=u([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),c.push(o),l.push(r),l.push(i),l.push(o);for(a.sort(t),s.sort(t),c.sort(t),l.sort(t),e=0;7>e;e++)s[e]=X(s[e]),c[e]=X(c[e]),l[e]=X(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function vn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function _n(){return this.hours()%12||12}function mn(){return this.hours()||24}function yn(t,e){G(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function gn(t,e){return e._meridiemParse}function bn(t){return"p"===(t+"").toLowerCase().charAt(0)}function Sn(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function wn(t,e){e[Wr]=y(1e3*("0."+t))}function On(){return this._isUTC?"UTC":""}function Tn(){return this._isUTC?"Coordinated Universal Time":""}function In(t){return Nt(1e3*t)}function En(){return Nt.apply(null,arguments).parseZone()}function Dn(t,e,n){var r=this._calendar[t];return O(r)?r.call(e,n):r}function kn(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function Cn(){return this._invalidDate}function Mn(t){return this._ordinal.replace("%d",t)}function jn(t){return t}function Pn(t,e,n,r){var i=this._relativeTime[n];return O(i)?i(t,e,n,r):i.replace(/%d/i,t)}function An(t,e){var n=this._relativeTime[t>0?"future":"past"];return O(n)?n(e):n.replace(/%s/i,e)}function Ln(t,e,n,r){var i=L(),o=u().set(r,e);return i[n](o,t)}function xn(t,e,n){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Ln(t,e,n,"month");var r,i=[];for(r=0;12>r;r++)i[r]=Ln(t,r,n,"month");return i}function Rn(t,e,n,r){"boolean"==typeof t?("number"==typeof e&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,"number"==typeof e&&(n=e,e=void 0),e=e||"");var i=L(),o=t?i._week.dow:0;if(null!=n)return Ln(e,(n+o)%7,r,"day");var a,s=[];for(a=0;7>a;a++)s[a]=Ln(e,(a+o)%7,r,"day");return s}function Nn(t,e){return xn(t,e,"months")}function Hn(t,e){return xn(t,e,"monthsShort")}function zn(t,e,n){return Rn(t,e,n,"weekdays")}function Yn(t,e,n){return Rn(t,e,n,"weekdaysShort")}function Un(t,e,n){return Rn(t,e,n,"weekdaysMin")}function Vn(){var t=this._data;return this._milliseconds=zi(this._milliseconds),this._days=zi(this._days),this._months=zi(this._months),t.milliseconds=zi(t.milliseconds),t.seconds=zi(t.seconds),t.minutes=zi(t.minutes),t.hours=zi(t.hours),t.months=zi(t.months),t.years=zi(t.years),this}function Bn(t,e,n,r){var i=ie(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function Gn(t,e){return Bn(this,t,e,1)}function Fn(t,e){return Bn(this,t,e,-1)}function Wn(t){return 0>t?Math.floor(t):Math.ceil(t)}function qn(){var t,e,n,r,i,o=this._milliseconds,a=this._days,s=this._months,u=this._data;return o>=0&&a>=0&&s>=0||0>=o&&0>=a&&0>=s||(o+=864e5*Wn(Jn(s)+a),a=0,s=0),u.milliseconds=o%1e3,t=m(o/1e3),u.seconds=t%60,e=m(t/60),u.minutes=e%60,n=m(e/60),u.hours=n%24,a+=m(n/24),i=m(Kn(a)),s+=i,a-=Wn(Jn(i)),r=m(s/12),s%=12,u.days=a,u.months=s,u.years=r,this}function Kn(t){return 4800*t/146097}function Jn(t){return 146097*t/4800}function $n(t){var e,n,r=this._milliseconds;if(t=N(t),"month"===t||"year"===t)return e=this._days+r/864e5,n=this._months+Kn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(Jn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}}function Zn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function Xn(t){return function(){return this.as(t)}}function Qn(t){return t=N(t),this[t+"s"]()}function tr(t){return function(){return this._data[t]}}function er(){return m(this.days()/7)}function nr(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function rr(t,e,n){var r=ie(t).abs(),i=eo(r.as("s")),o=eo(r.as("m")),a=eo(r.as("h")),s=eo(r.as("d")),u=eo(r.as("M")),c=eo(r.as("y")),l=i<no.s&&["s",i]||1>=o&&["m"]||o<no.m&&["mm",o]||1>=a&&["h"]||a<no.h&&["hh",a]||1>=s&&["d"]||s<no.d&&["dd",s]||1>=u&&["M"]||u<no.M&&["MM",u]||1>=c&&["y"]||["yy",c];return l[2]=e,l[3]=+t>0,l[4]=n,nr.apply(null,l)}function ir(t,e){return void 0===no[t]?!1:void 0===e?no[t]:(no[t]=e,!0)}function or(t){var e=this.localeData(),n=rr(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function ar(){var t,e,n,r=ro(this._milliseconds)/1e3,i=ro(this._days),o=ro(this._months);t=m(r/60),e=m(t/60),r%=60,t%=60,n=m(o/12),o%=12;var a=n,s=o,u=i,c=e,l=t,f=r,d=this.asSeconds();return d?(0>d?"-":"")+"P"+(a?a+"Y":"")+(s?s+"M":"")+(u?u+"D":"")+(c||l||f?"T":"")+(c?c+"H":"")+(l?l+"M":"")+(f?f+"S":""):"P0D"}var sr,ur;ur=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;n>r;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var cr=e.momentProperties=[],lr=!1,fr={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;var dr;dr=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)a(t,e)&&n.push(e);return n};var hr,pr,vr={},_r={},mr=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,yr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,gr={},br={},Sr=/\d/,wr=/\d\d/,Or=/\d{3}/,Tr=/\d{4}/,Ir=/[+-]?\d{6}/,Er=/\d\d?/,Dr=/\d\d\d\d?/,kr=/\d\d\d\d\d\d?/,Cr=/\d{1,3}/,Mr=/\d{1,4}/,jr=/[+-]?\d{1,6}/,Pr=/\d+/,Ar=/[+-]?\d+/,Lr=/Z|[+-]\d\d:?\d\d/gi,xr=/Z|[+-]\d\d(?::?\d\d)?/gi,Rr=/[+-]?\d+(\.\d{1,3})?/,Nr=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Hr={},zr={},Yr=0,Ur=1,Vr=2,Br=3,Gr=4,Fr=5,Wr=6,qr=7,Kr=8;pr=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},G("M",["MM",2],"Mo",function(){return this.month()+1}),G("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),G("MMMM",0,0,function(t){return this.localeData().months(this,t)}),R("month","M"),J("M",Er),J("MM",Er,wr),J("MMM",function(t,e){return e.monthsShortRegex(t)}),J("MMMM",function(t,e){return e.monthsRegex(t)}),Q(["M","MM"],function(t,e){e[Ur]=y(t)-1}),Q(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[Ur]=i:l(n).invalidMonth=t});var Jr=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,$r="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Zr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Xr=Nr,Qr=Nr,ti=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ei=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,ni=/Z|[+-]\d\d(?::?\d\d)?/,ri=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ii=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],oi=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=S("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),G("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),G(0,["YY",2],0,function(){return this.year()%100}),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),R("year","y"),J("Y",Ar),J("YY",Er,wr),J("YYYY",Mr,Tr),J("YYYYY",jr,Ir),J("YYYYYY",jr,Ir),Q(["YYYYY","YYYYYY"],Yr),Q("YYYY",function(t,n){n[Yr]=2===t.length?e.parseTwoDigitYear(t):y(t)}),Q("YY",function(t,n){n[Yr]=e.parseTwoDigitYear(t)}),Q("Y",function(t,e){e[Yr]=parseInt(t,10)}),e.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var ai=z("FullYear",!0);e.ISO_8601=function(){};var si=S("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Nt.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:d()}),ui=S("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Nt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:d()}),ci=function(){return Date.now?Date.now():+new Date};Bt("Z",":"),Bt("ZZ",""),J("Z",xr),J("ZZ",xr),Q(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Gt(xr,t)});var li=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var fi=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,di=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;ie.fn=Ut.prototype;var hi=ce(1,"add"),pi=ce(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var vi=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ve("gggg","weekYear"),Ve("ggggg","weekYear"),Ve("GGGG","isoWeekYear"),Ve("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),J("G",Ar),J("g",Ar),J("GG",Er,wr),J("gg",Er,wr),J("GGGG",Mr,Tr),J("gggg",Mr,Tr),J("GGGGG",jr,Ir),J("ggggg",jr,Ir),tt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=y(t)}),tt(["gg","GG"],function(t,n,r,i){n[i]=e.parseTwoDigitYear(t)}),G("Q",0,"Qo","quarter"),R("quarter","Q"),J("Q",Sr),Q("Q",function(t,e){e[Ur]=3*(y(t)-1)}),G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),J("w",Er),J("ww",Er,wr),J("W",Er),J("WW",Er,wr),tt(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=y(t)});var _i={dow:0,doy:6};G("D",["DD",2],"Do","date"),R("date","D"),J("D",Er),J("DD",Er,wr),J("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),Q(["D","DD"],Vr),Q("Do",function(t,e){e[Vr]=y(t.match(Er)[0],10)});var mi=z("Date",!0);G("d",0,"do","day"),G("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),G("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),G("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),J("d",Er),J("e",Er),J("E",Er),J("dd",function(t,e){return e.weekdaysMinRegex(t)}),J("ddd",function(t,e){return e.weekdaysShortRegex(t)}),J("dddd",function(t,e){return e.weekdaysRegex(t)}),tt(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:l(n).invalidWeekday=t}),tt(["d","e","E"],function(t,e,n,r){e[r]=y(t)});var yi="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),gi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),bi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Si=Nr,wi=Nr,Oi=Nr;G("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),J("DDD",Cr),J("DDDD",Or),Q(["DDD","DDDD"],function(t,e,n){n._dayOfYear=y(t)}),G("H",["HH",2],0,"hour"),G("h",["hh",2],0,_n),G("k",["kk",2],0,mn),G("hmm",0,0,function(){return""+_n.apply(this)+B(this.minutes(),2)}),G("hmmss",0,0,function(){return""+_n.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),G("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),G("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)}),yn("a",!0),yn("A",!1),R("hour","h"),J("a",gn),J("A",gn),J("H",Er),J("h",Er),J("HH",Er,wr),J("hh",Er,wr),J("hmm",Dr),J("hmmss",kr),J("Hmm",Dr),J("Hmmss",kr),Q(["H","HH"],Br),Q(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),Q(["h","hh"],function(t,e,n){e[Br]=y(t),l(n).bigHour=!0}),Q("hmm",function(t,e,n){var r=t.length-2;e[Br]=y(t.substr(0,r)),e[Gr]=y(t.substr(r)),l(n).bigHour=!0}),Q("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Br]=y(t.substr(0,r)),e[Gr]=y(t.substr(r,2)),e[Fr]=y(t.substr(i)),l(n).bigHour=!0}),Q("Hmm",function(t,e,n){var r=t.length-2;e[Br]=y(t.substr(0,r)),e[Gr]=y(t.substr(r))}),Q("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Br]=y(t.substr(0,r)),e[Gr]=y(t.substr(r,2)),e[Fr]=y(t.substr(i))});var Ti=/[ap]\.?m?\.?/i,Ii=z("Hours",!0);G("m",["mm",2],0,"minute"),R("minute","m"),J("m",Er),J("mm",Er,wr),Q(["m","mm"],Gr);var Ei=z("Minutes",!1);G("s",["ss",2],0,"second"),R("second","s"),J("s",Er),J("ss",Er,wr),Q(["s","ss"],Fr);var Di=z("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,function(){return 10*this.millisecond()}),G(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),G(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),G(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),G(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),G(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),R("millisecond","ms"),J("S",Cr,Sr),J("SS",Cr,wr),J("SSS",Cr,Or);var ki;for(ki="SSSS";ki.length<=9;ki+="S")J(ki,Pr);for(ki="S";ki.length<=9;ki+="S")Q(ki,wn);var Ci=z("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var Mi=v.prototype;Mi.add=hi,Mi.calendar=fe,Mi.clone=de,Mi.diff=ge,Mi.endOf=je,Mi.format=Oe,Mi.from=Te,Mi.fromNow=Ie,Mi.to=Ee,Mi.toNow=De,Mi.get=V,Mi.invalidAt=Ye,Mi.isAfter=he,Mi.isBefore=pe,Mi.isBetween=ve,Mi.isSame=_e,Mi.isSameOrAfter=me,Mi.isSameOrBefore=ye,Mi.isValid=He,Mi.lang=vi,Mi.locale=ke,Mi.localeData=Ce,Mi.max=ui,Mi.min=si,Mi.parsingFlags=ze,Mi.set=V,Mi.startOf=Me,Mi.subtract=pi,Mi.toArray=xe,Mi.toObject=Re,Mi.toDate=Le,Mi.toISOString=we,Mi.toJSON=Ne,Mi.toString=Se,Mi.unix=Ae,Mi.valueOf=Pe,Mi.creationData=Ue,Mi.year=ai,Mi.isLeapYear=bt,Mi.weekYear=Be,Mi.isoWeekYear=Ge,Mi.quarter=Mi.quarters=Je,Mi.month=ut,Mi.daysInMonth=ct,Mi.week=Mi.weeks=Qe,Mi.isoWeek=Mi.isoWeeks=tn,Mi.weeksInYear=We,Mi.isoWeeksInYear=Fe,Mi.date=mi,Mi.day=Mi.days=un,Mi.weekday=cn,Mi.isoWeekday=ln,Mi.dayOfYear=vn,Mi.hour=Mi.hours=Ii,Mi.minute=Mi.minutes=Ei,Mi.second=Mi.seconds=Di,Mi.millisecond=Mi.milliseconds=Ci,Mi.utcOffset=qt,Mi.utc=Jt,Mi.local=$t,Mi.parseZone=Zt,Mi.hasAlignedHourOffset=Xt,Mi.isDST=Qt,Mi.isDSTShifted=te,Mi.isLocal=ee,Mi.isUtcOffset=ne,Mi.isUtc=re,Mi.isUTC=re,Mi.zoneAbbr=On,Mi.zoneName=Tn,Mi.dates=S("dates accessor is deprecated. Use date instead.",mi),Mi.months=S("months accessor is deprecated. Use month instead",ut),Mi.years=S("years accessor is deprecated. Use year instead",ai),Mi.zone=S("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Kt);var ji=Mi,Pi={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ai={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Li="Invalid date",xi="%d",Ri=/\d{1,2}/,Ni={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Hi=D.prototype;Hi._calendar=Pi,Hi.calendar=Dn,Hi._longDateFormat=Ai,Hi.longDateFormat=kn,Hi._invalidDate=Li,Hi.invalidDate=Cn,Hi._ordinal=xi,Hi.ordinal=Mn,Hi._ordinalParse=Ri,Hi.preparse=jn,Hi.postformat=jn,Hi._relativeTime=Ni,Hi.relativeTime=Pn,Hi.pastFuture=An,Hi.set=I,Hi.months=rt,Hi._months=$r,Hi.monthsShort=it,Hi._monthsShort=Zr,Hi.monthsParse=at,Hi._monthsRegex=Qr,Hi.monthsRegex=ft,Hi._monthsShortRegex=Xr,Hi.monthsShortRegex=lt,Hi.week=$e,Hi._week=_i,Hi.firstDayOfYear=Xe,Hi.firstDayOfWeek=Ze,Hi.weekdays=nn,Hi._weekdays=yi,Hi.weekdaysMin=on,Hi._weekdaysMin=bi,Hi.weekdaysShort=rn,Hi._weekdaysShort=gi,Hi.weekdaysParse=sn,Hi._weekdaysRegex=Si,Hi.weekdaysRegex=fn,Hi._weekdaysShortRegex=wi,Hi.weekdaysShortRegex=dn,Hi._weekdaysMinRegex=Oi,Hi.weekdaysMinRegex=hn,Hi.isPM=bn,Hi._meridiemParse=Ti,Hi.meridiem=Sn,j("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),e.lang=S("moment.lang is deprecated. Use moment.locale instead.",j),e.langData=S("moment.langData is deprecated. Use moment.localeData instead.",L);var zi=Math.abs,Yi=Xn("ms"),Ui=Xn("s"),Vi=Xn("m"),Bi=Xn("h"),Gi=Xn("d"),Fi=Xn("w"),Wi=Xn("M"),qi=Xn("y"),Ki=tr("milliseconds"),Ji=tr("seconds"),$i=tr("minutes"),Zi=tr("hours"),Xi=tr("days"),Qi=tr("months"),to=tr("years"),eo=Math.round,no={s:45,m:45,h:22,d:26,M:11},ro=Math.abs,io=Ut.prototype;io.abs=Vn,io.add=Gn,io.subtract=Fn,io.as=$n,io.asMilliseconds=Yi,io.asSeconds=Ui,io.asMinutes=Vi,io.asHours=Bi,io.asDays=Gi,io.asWeeks=Fi,io.asMonths=Wi,io.asYears=qi,io.valueOf=Zn,io._bubble=qn,io.get=Qn,io.milliseconds=Ki,io.seconds=Ji,io.minutes=$i,io.hours=Zi,io.days=Xi,io.weeks=er,io.months=Qi,io.years=to,io.humanize=or,io.toISOString=ar,io.toString=ar,io.toJSON=ar,io.locale=ke,io.localeData=Ce,io.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ar),io.lang=vi,G("X",0,0,"unix"),G("x",0,0,"valueOf"),J("x",Ar),J("X",Rr),Q("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Q("x",function(t,e,n){n._d=new Date(y(t))}),e.version="2.13.0",n(Nt),e.fn=ji,e.min=zt,e.max=Yt,e.now=ci,e.utc=u,e.unix=In,e.months=Nn,e.isDate=i,e.locale=j,e.invalid=d,e.duration=ie,e.isMoment=_,e.weekdays=zn,e.parseZone=En,e.localeData=L,e.isDuration=Vt,e.monthsShort=Hn,e.weekdaysMin=Un,e.defineLocale=P,e.updateLocale=A,e.locales=x,e.weekdaysShort=Yn,e.normalizeUnits=N,e.relativeTimeThreshold=ir,e.prototype=ji;var oo=e;return oo})}).call(e,n(70)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],Object.defineProperty(t,"loaded",{enumerable:!0,configurable:!1,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,configurable:!1,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(3),a=n(64);n(167),n(176),n(183),n(182),n(184),n(177),n(178),n(180),n(181),n(179),n(185),n(174),n(173);var s=i.a.navigationActions,u=i.a.navigationGetters,c=i.a.startUrlSync,l=i.a.stopUrlSync;e["default"]=new r.a({is:"home-assistant-main",behaviors:[o.a],properties:{narrow:{type:Boolean,value:!1},activePane:{type:String,bindNuclear:u.activePane,observer:"activePaneChanged"},isSelectedStates:{type:Boolean,bindNuclear:u.isActivePane("states")},isSelectedHistory:{type:Boolean,bindNuclear:u.isActivePane("history")},isSelectedMap:{type:Boolean,bindNuclear:u.isActivePane("map")},isSelectedLogbook:{type:Boolean,bindNuclear:u.isActivePane("logbook")},isSelectedDevEvent:{type:Boolean,bindNuclear:u.isActivePane("devEvent")},isSelectedDevState:{type:Boolean,bindNuclear:u.isActivePane("devState")},isSelectedDevTemplate:{type:Boolean,bindNuclear:u.isActivePane("devTemplate")},isSelectedDevService:{type:Boolean,bindNuclear:u.isActivePane("devService")},isSelectedDevInfo:{type:Boolean,bindNuclear:u.isActivePane("devInfo")},showSidebar:{type:Boolean,bindNuclear:u.showSidebar}},listeners:{"open-menu":"openMenu","close-menu":"closeMenu"},openMenu:function(){this.narrow?this.$.drawer.openDrawer():s.showSidebar(!0)},closeMenu:function(){this.$.drawer.closeDrawer(),this.showSidebar&&s.showSidebar(!1)},activePaneChanged:function(){this.narrow&&this.$.drawer.closeDrawer()},attached:function(){a.a.bind()(),c()},computeForceNarrow:function(t,e){return t||!e},detached:function(){l()}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(3),a=n(38),s=n(64),u=i.a.authGetters;e["default"]=new r.a({is:"login-form",behaviors:[o.a],properties:{errorMessage:{type:String,bindNuclear:u.attemptErrorMessage},isInvalid:{type:Boolean,bindNuclear:u.isInvalidAttempt},isValidating:{type:Boolean,observer:"isValidatingChanged",bindNuclear:u.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(){s.a.bind()()},computeShowSpinner:function(t,e){return t||e},validatingChanged:function(t,e){t||e||(this.$.passwordInput.value="")},isValidatingChanged:function(t){var e=this;t||this.async(function(){return e.$.passwordInput.focus()},10)},passwordKeyDown:function(t){13===t.keyCode?(this.validatePassword(),t.preventDefault()):this.isInvalid&&(this.isInvalid=!1)},validatePassword:function(){this.$.hideKeyboardOnFocus.focus(),a.a.bind()(this.$.passwordInput.value,this.$.rememberLogin.checked)}})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(120),o=n(145),a=n(147),s=n(149),u=n(14),c=n(17),l=n(7),f=n(41),d=n(100),h=n(18),p=n(105),v=n(44),_=n(47),m=n(20),y=n(54),g=n(12),b=n(22),S=n(24),w=n(136),O=n(142),T=n(9),I=function E(){r(this,E);var t=o.a.bind()();Object.defineProperties(this,{demo:{value:1,enumerable:!0},localStoragePreferences:{value:i.a,enumerable:!0},reactor:{value:t,enumerable:!0},util:{value:s.a,enumerable:!0},startLocalStoragePreferencesSync:{value:i.a.startSync.bind(i.a,t)},startUrlSync:{value:_.urlSync.startSync.bind(null,t)},stopUrlSync:{value:_.urlSync.stopSync.bind(null,t)}}),a.a.bind()(this,t,{auth:u,config:c,entity:l,entityHistory:f,errorLog:d,event:h,logbook:p,moreInfo:v,navigation:_,notification:m,view:y,service:g,stream:b,sync:S,template:w,voice:O,restApi:T})};e.a=I},function(t,e,n){"use strict";var r=n(215),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=n(14),a=function(t,e,n){var i=arguments.length<=3||void 0===arguments[3]?null:arguments[3],a=t.evaluate(o.getters.authInfo),s=a.host+"/api/"+n;return new r.Promise(function(t,n){var r=new XMLHttpRequest;r.open(e,s,!0),r.setRequestHeader("X-HA-access",a.authToken),r.onload=function(){var e=void 0;try{e="application/json"===r.getResponseHeader("content-type")?JSON.parse(r.responseText):r.responseText}catch(i){e=r.responseText}r.status>199&&r.status<300?t(e):n(e)},r.onerror=function(){return n({})},i?r.send(JSON.stringify(i)):r.send()})};a=function(t,e,i){return new r.Promise(function(t){if("GET"!==e)throw new Error("Method "+e+" not allowed in demo mode.");var r=i.split("/",1)[0];switch(r){case"bootstrap":t(n(84)["default"]);break;case"logbook":t(n(87)["default"]);break;case"history":t(n(89)["default"]);break;default:throw new Error("URL not implemented in demo mode /api/"+i)}})},e.a=a},function(t,e,n){"use strict";function r(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r=n.useStreaming,i=(void 0===r?t.evaluate(s.getters.isSupported):r,n.rememberAuth),a=void 0===i?!1:i,l=n.host,f=void 0===l?"":l;t.dispatch(o.a.VALIDATING_AUTH_TOKEN,{authToken:e,host:f}),u.actions.fetchAll(t).then(function(){return t.dispatch(o.a.VALID_AUTH_TOKEN,{authToken:e,host:f,rememberAuth:a}),void t.dispatch("STREAM_START")},function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=e.message,r=void 0===n?c:n;t.dispatch(o.a.INVALID_AUTH_TOKEN,{errorMessage:r})})}function i(t){a.a.bind()(t,"POST","log_out"),t.dispatch(o.a.LOG_OUT,{})}var o=n(13),a=n(4),s=n(22),u=n(24);e.validate=r,e.logOut=i;var c="Unexpected result from API"},function(t,e,n){"use strict";var r=["authAttempt","isValidating"];Object.defineProperty(e,"isValidating",{configurable:!1,enumerable:!0,get:function(){return r}});var i=["authAttempt","isInvalid"];Object.defineProperty(e,"isInvalidAttempt",{configurable:!1,enumerable:!0,get:function(){return i}});var o=["authAttempt","errorMessage"];Object.defineProperty(e,"attemptErrorMessage",{configurable:!1,enumerable:!0,get:function(){return o}});var a=["rememberAuth"];Object.defineProperty(e,"rememberAuth",{configurable:!1,enumerable:!0,get:function(){return a}});var s=[["authAttempt","authToken"],["authAttempt","host"],function(t,e){return{authToken:t,host:e}}];Object.defineProperty(e,"attemptAuthInfo",{configurable:!1,enumerable:!0,get:function(){return s}});var u=["authCurrent","authToken"];Object.defineProperty(e,"currentAuthToken",{configurable:!1,enumerable:!0,get:function(){return u}});var c=[u,["authCurrent","host"],function(t,e){return{authToken:t,host:e}}];Object.defineProperty(e,"currentAuthInfo",{configurable:!1,enumerable:!0,get:function(){return c}});var l=[r,["authAttempt","authToken"],["authCurrent","authToken"],function(t,e,n){return t?e:n}];Object.defineProperty(e,"authToken",{configurable:!1,enumerable:!0,get:function(){return l}});var f=[r,s,c,function(t,e,n){return t?e:n}];Object.defineProperty(e,"authInfo",{configurable:!1,
enumerable:!0,get:function(){return f}})},function(t,e,n){"use strict";function r(t,e){var n=e.authToken,r=e.host;return a.toImmutable.bind()({authToken:n,host:r,isValidating:!0,isInvalid:!1,errorMessage:""})}function i(){return c.getInitialState()}function o(t,e){var n=e.errorMessage;return t.withMutations(function(t){return t.set("isValidating",!1).set("isInvalid",!0).set("errorMessage",n)})}var a=n(2),s=a&&a.__esModule?function(){return a["default"]}:function(){return a};Object.defineProperty(s,"a",{get:s});var u=n(13),c=new a.Store({getInitialState:function(){return a.toImmutable.bind()({isValidating:!1,authToken:!1,host:null,isInvalid:!1,errorMessage:""})},initialize:function(){this.on(u.a.VALIDATING_AUTH_TOKEN,r),this.on(u.a.VALID_AUTH_TOKEN,i),this.on(u.a.INVALID_AUTH_TOKEN,o)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var n=e.authToken,r=e.host;return o.toImmutable.bind()({authToken:n,host:r})}function i(){return u.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(13),u=new o.Store({getInitialState:function(){return o.toImmutable.bind()({authToken:null,host:""})},initialize:function(){this.on(s.a.VALID_AUTH_TOKEN,r),this.on(s.a.LOG_OUT,i)}});e.a=u},function(t,e,n){"use strict";function r(t,e){var n=e.rememberAuth;return n}var i=n(2),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(o,"a",{get:o});var a=n(13),s=new i.Store({getInitialState:function(){return!0},initialize:function(){this.on(a.a.VALID_AUTH_TOKEN,r)}});e.a=s},function(t,e,n){"use strict";function r(t,e){t.dispatch(s.a.SERVER_CONFIG_LOADED,e)}function i(t){a.a.bind()(t,"GET","config").then(function(e){return r(t,e)})}function o(t,e){t.dispatch(s.a.COMPONENT_LOADED,{component:e})}var a=n(4),s=n(16);e.configLoaded=r,e.fetchAll=i,e.componentLoaded=o},function(t,e,n){"use strict";function r(t){return[["serverComponent"],function(e){return e.contains(t)}]}e.isComponentLoaded=r;var i=[["serverConfig","latitude"],["serverConfig","longitude"],function(t,e){return{latitude:t,longitude:e}}];Object.defineProperty(e,"locationGPS",{configurable:!1,enumerable:!0,get:function(){return i}});var o=["serverConfig","location_name"];Object.defineProperty(e,"locationName",{configurable:!1,enumerable:!0,get:function(){return o}});var a=["serverConfig","serverVersion"];Object.defineProperty(e,"serverVersion",{configurable:!1,enumerable:!0,get:function(){return a}})},function(t,e,n){"use strict";function r(t,e){var n=e.component;return t.push(n)}function i(t,e){var n=e.components;return a.toImmutable.bind()(n)}function o(){return c.getInitialState()}var a=n(2),s=a&&a.__esModule?function(){return a["default"]}:function(){return a};Object.defineProperty(s,"a",{get:s});var u=n(16),c=new a.Store({getInitialState:function(){return a.toImmutable.bind()([])},initialize:function(){this.on(u.a.COMPONENT_LOADED,r),this.on(u.a.SERVER_CONFIG_LOADED,i),this.on(u.a.LOG_OUT,o)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var n=e.latitude,r=e.longitude,i=e.location_name,a=e.temperature_unit,s=e.time_zone,u=e.version;return o.toImmutable.bind()({latitude:n,longitude:r,location_name:i,temperature_unit:a,time_zone:s,serverVersion:u})}function i(){return u.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(16),u=new o.Store({getInitialState:function(){return o.toImmutable.bind()({latitude:null,longitude:null,location_name:"Home",temperature_unit:"°C",time_zone:"UTC",serverVersion:"unknown"})},initialize:function(){this.on(s.a.SERVER_CONFIG_LOADED,r),this.on(s.a.LOG_OUT,i)}});e.a=u},function(t,e,n){"use strict";var r=n(85),i=n(86),o=n(88),a=n(39);e["default"]={config:r.a,events:i.a,services:o.a,states:a.a}},function(t,e,n){"use strict";e.a={components:["configurator","http","api","frontend","history","conversation","logbook","introduction"],latitude:32.87336,location_name:"Home",longitude:-117.22743,temperature_unit:"°F",time_zone:"America/Los_Angeles",version:"0.9"}},function(t,e,n){"use strict";e.a=[{event:"call_service",listener_count:1},{event:"time_changed",listener_count:1},{event:"state_changed",listener_count:3},{event:"homeassistant_stop",listener_count:2}]},function(t,e,n){"use strict";e["default"]=[{domain:"sun",entity_id:"sun.sun",message:"has risen",name:"sun",when:"2015-04-24T06:08:47.000Z"},{domain:"device_tracker",entity_id:"device_tracker.paulus",message:"left home",name:"Paulus",when:"2015-04-24T08:54:47.000Z"},{domain:"device_tracker",entity_id:"device_tracker.anne_therese",message:"left home",name:"Anne Therese",when:"2015-04-24T09:08:47.000Z"},{domain:"group",entity_id:"group.all_devices",message:"left home",name:"All devices",when:"2015-04-24T09:08:47.000Z"},{domain:"thermostat",entity_id:"thermostat.nest",message:"changed to 17 °C",name:"Nest",when:"2015-04-24T09:08:47.000Z"},{domain:"thermostat",entity_id:"thermostat.nest",message:"changed to 21 °C",name:"Nest",when:"2015-04-24T16:00:47.000Z"},{domain:"device_tracker",entity_id:"device_tracker.anne_therese",message:"came home",name:"Anne Therese",when:"2015-04-24T16:24:47.000Z"},{domain:"group",entity_id:"group.all_devices",message:"came home",name:"All devices",when:"2015-04-24T16:24:47.000Z"},{domain:"light",entity_id:"light.bowl",message:"turned on",name:"Bowl",when:"2015-04-24T18:01:47.000Z"},{domain:"light",entity_id:"light.ceiling",message:"turned on",name:"Ceiling",when:"2015-04-24T18:16:47.000Z"},{domain:"light",entity_id:"light.tv_back_light",message:"turned on",name:"TV Back Light",when:"2015-04-24T18:31:47.000Z"},{domain:"sun",entity_id:"sun.sun",message:"has set",name:"sun",when:"2015-04-24T18:46:47.000Z"},{domain:"media_player",entity_id:"media_player.living_room",message:"changed to Plex",name:"Media Player",when:"2015-04-24T19:12:47.000Z"}]},function(t,e,n){"use strict";e.a=[{domain:"homeassistant",services:{stop:{description:"",fields:{}},turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"light",services:{turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"switch",services:{turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"input_boolean",services:{turn_off:{description:"",fields:{}},turn_on:{description:"",fields:{}}}},{domain:"configurator",services:{configure:{description:"",fields:{}}}}]},function(t,e,n){"use strict";function r(t){var e=new Date(Date.now()-60*t*1e3);return e.toISOString()}function i(t){return Math.random()*t-t/2}function o(t,e){u[t.entity_id]=!0;var n=void 0;n="string"==typeof e[0]?e.map(function(t){return{state:t}}):e;var o=900/n.length;c.push(n.map(function(e,n){var a=void 0;a=e.attributes||t.attributes?e.attributes?t.attributes?s.a.bind()({},t.attributes,e.attributes):e.attributes:t.attributes:{};var u=r(0===n?l:l-n*o+i(o));return{attributes:a,entity_id:t.entity_id,state:e.state||t.state,last_changed:u,last_updated:u}}))}var a=n(36),s=a&&a.__esModule?function(){return a["default"]}:function(){return a};Object.defineProperty(s,"a",{get:s});var u=(n(39),{"a.demo_mode":!0,"configurator.philips_hue":!0,"group.default_view":!0,"group.rooms_view":!0,"group.rooms":!0,"zone.school":!0,"zone.work":!0,"zone.home":!0,"group.general":!0,"camera.roundabout":!0,"script.water_lawn":!0,"scene.romantic":!0,"scene.good_morning":!0,"group.cooking":!0}),c=[],l=1440;o({entity_id:"sensor.humidity",attributes:{unit_of_measurement:"%"}},["45","49","52","49","52","49","45","42"]),o({entity_id:"sensor.temperature",attributes:{unit_of_measurement:"°C"}},["23","27","25","23","24"]),o({entity_id:"thermostat.nest",attributes:{unit_of_measurement:"°C"}},[{state:"23",attributes:{current_temperature:20,temperature:23}},{state:"23",attributes:{current_temperature:22,temperature:23}},{state:"20",attributes:{current_temperature:21,temperature:20}},{state:"20",attributes:{current_temperature:20,temperature:20}},{state:"20",attributes:{current_temperature:19,temperature:20}}]),o({entity_id:"media_player.living_room",attributes:{friendly_name:"Chromecast"}},["Plex","idle","YouTube","Netflix","idle","Plex"]),o({entity_id:"group.all_devices"},["home","not_home","home"]),o({entity_id:"device_tracker.paulus"},["home","not_home","work","not_home"]),o({entity_id:"device_tracker.anne_therese"},["home","not_home","home","not_home","school"]),o({entity_id:"garage_door.garage_door"},["open","closed","open"]),o({entity_id:"alarm_control_panel.home"},["disarmed","pending","armed_home","pending","disarmed","pending","armed_home"]),o({entity_id:"lock.kitchen_door"},["unlocked","locked","unlocked","locked"]),o({entity_id:"light.tv_back_light"},["on","off","on","off"]),o({entity_id:"light.ceiling"},["on","off","on"]),o({entity_id:"light.table_lamp"},["on","off","on"]),o({entity_id:"switch.ac"},["on","off","on"]),o({entity_id:"group.bedroom"},["on","off","on","off"]),o({entity_id:"group.living_room"},["on","off","on"]),o({entity_id:"switch.decorative_lights"},["on","off","on","off"]),o({entity_id:"light.bed_light"},["on","off","on","off"]),o({entity_id:"rollershutter.bedroom_window"},["open","closed","open","closed"]),o({entity_id:"input_select.cook_today"},["Anne Therese","Paulus"]),o({entity_id:"input_boolean.notify_cook"},["off","on"]),e["default"]=c},function(t,e,n){"use strict";function r(t,e){t.dispatch(u.a.ENTITY_HISTORY_DATE_SELECTED,{date:e})}function i(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];t.dispatch(u.a.RECENT_ENTITY_HISTORY_FETCH_START,{});var n="history/period";return null!==e&&(n+="?filter_entity_id="+e),s.a.bind()(t,"GET",n).then(function(e){return t.dispatch(u.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,{stateHistory:e})},function(){return t.dispatch(u.a.RECENT_ENTITY_HISTORY_FETCH_ERROR,{})})}function o(t,e){return t.dispatch(u.a.ENTITY_HISTORY_FETCH_START,{date:e}),s.a.bind()(t,"GET","history/period/"+e).then(function(n){return t.dispatch(u.a.ENTITY_HISTORY_FETCH_SUCCESS,{date:e,stateHistory:n})},function(){return t.dispatch(u.a.ENTITY_HISTORY_FETCH_ERROR,{})})}function a(t){var e=t.evaluate(c.currentDate);return o(t,e)}var s=n(4),u=n(10),c=n(40);e.changeCurrentDate=r,e.fetchRecent=i,e.fetchDate=o,e.fetchSelectedDate=a},function(t,e,n){"use strict";function r(t,e){var n=e.date;return s.a.bind()(n)}function i(){return c.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(25),u=n(10),c=new o.Store({getInitialState:function(){var t=new Date;return t.setDate(t.getUTCDate()-1),s.a.bind()(t)},initialize:function(){this.on(u.a.ENTITY_HISTORY_DATE_SELECTED,r),this.on(u.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var n=e.date,r=e.stateHistory;return 0===r.length?t.set(n,o.toImmutable.bind()({})):t.withMutations(function(t){r.forEach(function(e){return t.setIn([n,e[0].entity_id],o.toImmutable.bind()(e.map(u.a.fromJSON)))})})}function i(){return c.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(10),u=n(15),c=new o.Store({getInitialState:function(){return o.toImmutable.bind()({})},initialize:function(){this.on(s.a.ENTITY_HISTORY_FETCH_SUCCESS,r),this.on(s.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";var r=n(2),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=n(10),a=new r.Store({getInitialState:function(){return!1},initialize:function(){this.on(o.a.ENTITY_HISTORY_FETCH_START,function(){return!0}),this.on(o.a.ENTITY_HISTORY_FETCH_SUCCESS,function(){return!1}),this.on(o.a.ENTITY_HISTORY_FETCH_ERROR,function(){return!1}),this.on(o.a.RECENT_ENTITY_HISTORY_FETCH_START,function(){return!0}),this.on(o.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,function(){return!1}),this.on(o.a.RECENT_ENTITY_HISTORY_FETCH_ERROR,function(){return!1}),this.on(o.a.LOG_OUT,function(){return!1})}});e.a=a},function(t,e,n){"use strict";function r(t,e){var n=e.stateHistory;return t.withMutations(function(t){n.forEach(function(e){return t.set(e[0].entity_id,o.toImmutable.bind()(e.map(u.a.fromJSON)))})})}function i(){return c.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(10),u=n(15),c=new o.Store({getInitialState:function(){return o.toImmutable.bind()({})},initialize:function(){this.on(s.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,r),this.on(s.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var n=e.stateHistory,r=(new Date).getTime();return t.withMutations(function(t){n.forEach(function(e){return t.set(e[0].entity_id,r)}),history.length>1&&t.set(u,r)})}function i(){return c.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(10),u="ALL_ENTRY_FETCH",c=new o.Store({getInitialState:function(){return o.toImmutable.bind()({})},initialize:function(){this.on(s.a.RECENT_ENTITY_HISTORY_FETCH_SUCCESS,r),this.on(s.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";var r=n(9),i=n(15),o=r.createApiActions.bind()(i.a);e.a=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=["playing","paused","unknown"],a=function(){function t(e,n){r(this,t),this.serviceActions=e.serviceActions,this.stateObj=n}return i(t,[{key:"mediaPlayPause",value:function(){this.callService("media_play_pause")}},{key:"nextTrack",value:function(){this.callService("media_next_track")}},{key:"playbackControl",value:function(){this.callService("media_play_pause")}},{key:"previousTrack",value:function(){this.callService("media_previous_track")}},{key:"setVolume",value:function(t){this.callService("volume_set",{volume_level:t})}},{key:"togglePower",value:function(){this.isOff?this.turnOn():this.turnOff()}},{key:"turnOff",value:function(){this.callService("turn_off")}},{key:"turnOn",value:function(){this.callService("turn_on")}},{key:"volumeDown",value:function(){this.callService("volume_down")}},{key:"volumeMute",value:function(t){if(!this.supportsVolumeMute)throw new Error("Muting volume not supported");this.callService("volume_mute",{is_volume_muted:t})}},{key:"volumeUp",value:function(){this.callService("volume_down")}},{key:"callService",value:function(t,e){var n=e||{};n.entity_id=this.stateObj.entityId,this.serviceActions.callService("media_player",t,n)}},{key:"isOff",get:function(){return"off"===this.stateObj.state}},{key:"isIdle",get:function(){return"idle"===this.stateObj.state}},{key:"isMuted",get:function(){return this.stateObj.attributes.is_volume_muted}},{key:"isPaused",get:function(){return"paused"===this.stateObj.state}},{key:"isPlaying",get:function(){return"playing"===this.stateObj.state}},{key:"isMusic",get:function(){return"music"===this.stateObj.attributes.media_content_type}},{key:"isTVShow",get:function(){return"tvshow"===this.stateObj.attributes.media_content_type}},{key:"hasMediaControl",get:function(){return-1!==o.indexOf(this.stateObj.state)}},{key:"volumeSliderValue",get:function(){return 100*this.stateObj.attributes.volume_level}},{key:"supportsPause",get:function(){return 0!==(1&this.stateObj.attributes.supported_media_commands)}},{key:"supportsVolumeSet",get:function(){return 0!==(4&this.stateObj.attributes.supported_media_commands)}},{key:"supportsVolumeMute",get:function(){return 0!==(8&this.stateObj.attributes.supported_media_commands)}},{key:"supportsPreviousTrack",get:function(){return 0!==(16&this.stateObj.attributes.supported_media_commands)}},{key:"supportsNextTrack",get:function(){return 0!==(32&this.stateObj.attributes.supported_media_commands)}},{key:"supportsTurnOn",get:function(){return 0!==(128&this.stateObj.attributes.supported_media_commands)}},{key:"supportsTurnOff",get:function(){return 0!==(256&this.stateObj.attributes.supported_media_commands)}},{key:"supportsVolumeButtons",get:function(){return 0!==(1024&this.stateObj.attributes.supported_media_commands)}},{key:"primaryText",get:function(){return this.stateObj.attributes.media_title||this.stateObj.stateDisplay}},{key:"secondaryText",get:function(){if(this.isMusic)return this.stateObj.attributes.media_artist;if(this.isTVShow){var t=this.stateObj.attributes.media_series_title;return this.stateObj.attributes.media_season&&(t+=" S"+this.stateObj.attributes.media_season,this.stateObj.attributes.media_episode&&(t+="E"+this.stateObj.attributes.media_episode)),t}return this.stateObj.attributes.app_name?this.stateObj.attributes.app_name:""}}]),t}();e.a=a},function(t,e,n){"use strict";var r=n(9),i=n(15),o=r.createHasDataGetter.bind()(i.a);Object.defineProperty(e,"hasData",{configurable:!1,enumerable:!0,get:function(){return o}});var a=r.createEntityMapGetter.bind()(i.a);Object.defineProperty(e,"entityMap",{configurable:!1,enumerable:!0,get:function(){return a}});var s=r.createByIdGetter.bind()(i.a);Object.defineProperty(e,"byId",{configurable:!1,enumerable:!0,get:function(){return s}});var u=[a,function(t){return t.filter(function(t){return!t.attributes.hidden})}];Object.defineProperty(e,"visibleEntityMap",{configurable:!1,enumerable:!0,get:function(){return u}})},function(t,e,n){"use strict";function r(t){return i.a.bind()(t,"GET","error_log")}var i=n(4);e.fetchErrorLog=r},function(t,e,n){"use strict";var r=n(99),i=r;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return i}})},function(t,e,n){"use strict";var r=n(4),i=n(9),o=n(20),a=n(42),s=i.createApiActions.bind()(a.a);s.fireEvent=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.a.bind()(t,"POST","events/"+e,n).then(function(){o.actions.createNotification(t,"Event "+e+" successful fired!")})},e.a=s},function(t,e,n){"use strict";var r=n(9),i=n(42),o=r.createHasDataGetter.bind()(i.a);Object.defineProperty(e,"hasData",{configurable:!1,enumerable:!0,get:function(){return o}});var a=r.createEntityMapGetter.bind()(i.a);Object.defineProperty(e,"entityMap",{configurable:!1,enumerable:!0,get:function(){return a}});var s=r.createByIdGetter.bind()(i.a);Object.defineProperty(e,"byId",{configurable:!1,enumerable:!0,get:function(){return s}})},function(t,e,n){"use strict";function r(t,e){t.dispatch(a.a.LOGBOOK_DATE_SELECTED,{date:e})}function i(t,e){t.dispatch(a.a.LOGBOOK_ENTRIES_FETCH_START,{date:e}),o.a.bind()(t,"GET","logbook/"+e).then(function(n){return t.dispatch(a.a.LOGBOOK_ENTRIES_FETCH_SUCCESS,{date:e,entries:n})},function(){return t.dispatch(a.a.LOGBOOK_ENTRIES_FETCH_ERROR,{})})}var o=n(4),a=n(11);e.changeCurrentDate=r,e.fetchDate=i},function(t,e,n){"use strict";function r(t){return!t||(new Date).getTime()-t>a}var i=n(2),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(o,"a",{get:o});var a=6e4,s=["currentLogbookDate"];Object.defineProperty(e,"currentDate",{configurable:!1,enumerable:!0,get:function(){return s}});var u=[s,["logbookEntriesUpdated"],function(t,e){return r(e.get(t))}];Object.defineProperty(e,"isCurrentStale",{configurable:!1,enumerable:!0,get:function(){return u}});var c=[s,["logbookEntries"],function(t,e){return e.get(t)||i.toImmutable.bind()([])}];Object.defineProperty(e,"currentEntries",{configurable:!1,enumerable:!0,get:function(){return c}});var l=["isLoadingLogbookEntries"];Object.defineProperty(e,"isLoadingEntries",{configurable:!1,enumerable:!0,get:function(){return l}})},function(t,e,n){"use strict";function r(t){t.registerStores({currentLogbookDate:i.a,isLoadingLogbookEntries:o.a,logbookEntries:a.a,logbookEntriesUpdated:s.a})}var i=n(107),o=n(108),a=n(109),s=n(110),u=n(103),c=n(104);e.register=r;var l=u;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return l}});var f=c;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return f}})},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(2),s=a&&a.__esModule?function(){return a["default"]}:function(){return a};Object.defineProperty(s,"a",{get:s});var u=n(26),c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=new a.Immutable.Record({when:null,name:null,message:null,domain:null,entityId:null},"LogbookEntry"),f=function(t){function e(t,n,o,a,s){return r(this,e),i(this,Object.getPrototypeOf(e).call(this,{when:t,name:n,message:o,domain:a,entityId:s}))}return o(e,t),c(e,null,[{key:"fromJSON",value:function(t){var n=t.when,r=t.name,i=t.message,o=t.domain,a=t.entity_id;return new e(u.a.bind()(n),r,i,o,a)}}]),e}(l);e.a=f},function(t,e,n){"use strict";function r(t,e){var n=e.date;return s.a.bind()(n)}function i(){return c.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(25),u=n(11),c=new o.Store({getInitialState:function(){return s.a.bind()(new Date)},initialize:function(){this.on(u.a.LOGBOOK_DATE_SELECTED,r),this.on(u.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";var r=n(2),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=n(11),a=new r.Store({getInitialState:function(){return!1},initialize:function(){this.on(o.a.LOGBOOK_ENTRIES_FETCH_START,function(){return!0}),this.on(o.a.LOGBOOK_ENTRIES_FETCH_SUCCESS,function(){return!1}),this.on(o.a.LOGBOOK_ENTRIES_FETCH_ERROR,function(){return!1}),this.on(o.a.LOG_OUT,function(){return!1})}});e.a=a},function(t,e,n){"use strict";function r(t,e){var n=e.date,r=e.entries;return t.set(n,o.toImmutable.bind()(r.map(u.a.fromJSON)))}function i(){return c.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(11),u=n(106),c=new o.Store({getInitialState:function(){return o.toImmutable.bind()({})},initialize:function(){this.on(s.a.LOGBOOK_ENTRIES_FETCH_SUCCESS,r),this.on(s.a.LOG_OUT,i)}});e.a=c},function(t,e,n){"use strict";function r(t,e){var n=e.date;return t.set(n,(new Date).getTime())}function i(){return u.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(11),u=new o.Store({getInitialState:function(){return o.toImmutable.bind()({})},initialize:function(){this.on(s.a.LOGBOOK_ENTRIES_FETCH_SUCCESS,r),this.on(s.a.LOG_OUT,i)}});e.a=u},function(t,e,n){"use strict";function r(t,e){t.dispatch(o.a.SELECT_ENTITY,{entityId:e})}function i(t){t.dispatch(o.a.SELECT_ENTITY,{entityId:null})}var o=n(43);e.selectEntity=r,e.deselectEntity=i},function(t,e,n){"use strict";var r=n(56),i=n(7),o=n(41),a=["moreInfoEntityId"];Object.defineProperty(e,"currentEntityId",{configurable:!1,enumerable:!0,get:function(){return a}});var s=[a,function(t){return null!==t}];Object.defineProperty(e,"hasCurrentEntityId",{configurable:!1,enumerable:!0,get:function(){return s}});var u=[a,i.getters.entityMap,function(t,e){return e.get(t)||null}];Object.defineProperty(e,"currentEntity",{configurable:!1,enumerable:!0,get:function(){return u}});var c=[a,o.getters.recentEntityHistoryMap,function(t,e){return e.get(t)}];Object.defineProperty(e,"currentEntityHistory",{configurable:!1,enumerable:!0,get:function(){return c}});var l=[a,o.getters.recentEntityHistoryUpdatedMap,function(t,e){return r.a.bind()(e.get(t))}];Object.defineProperty(e,"isCurrentEntityHistoryStale",{configurable:!1,enumerable:!0,get:function(){return l}})},function(t,e,n){"use strict";function r(t,e){var n=e.entityId;return n}function i(){return u.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(43),u=new o.Store({getInitialState:function(){return null},initialize:function(){this.on(s.a.SELECT_ENTITY,r),this.on(s.a.LOG_OUT,i)}});e.a=u},function(t,e,n){"use strict";function r(t,e){var n=e.pane;return n}function i(){return u.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(19),u=new o.Store({getInitialState:function(){return"states"},initialize:function(){this.on(s.a.NAVIGATE,r),this.on(s.a.LOG_OUT,i)}});e.a=u},function(t,e,n){"use strict";function r(t,e){var n=e.show;return!!n}function i(){return u.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(19),u=new o.Store({getInitialState:function(){return!1},initialize:function(){this.on(s.a.SHOW_SIDEBAR,r),this.on(s.a.LOG_OUT,i)}});e.a=u},function(t,e,n){"use strict";function r(t){return m[t.hassId]}function i(t,e){var n={pane:t};return"states"===t&&(n.view=e||null),n}function o(t,e){return"states"===t&&e?"/"+t+"/"+e:"/"+t}function a(t){var e=void 0,n=void 0;if("/"===window.location.pathname)e=t.evaluate(d.activePane),n=t.evaluate(f.getters.currentView);else{var r=window.location.pathname.substr(1).split("/"),a=p(r,2);e=a[0],n=a[1],t.batch(function(){h.navigate.bind()(t,e),n&&f.actions.selectView(t,n)})}history.replaceState(i(e,n),_,o(e,n))}function s(t,e){var n=e.state,i=n.pane,o=n.view;t.evaluate(l.getters.hasCurrentEntityId)?(r(t).ignoreNextDeselectEntity=!0,l.actions.deselectEntity(t)):i===t.evaluate(d.activePane)&&o===t.evaluate(f.getters.currentView)||t.batch(function(){h.navigate.bind()(t,i),void 0!==o&&f.actions.selectView(t,o)})}function u(t){if(v){a(t);var e={ignoreNextDeselectEntity:!1,popstateChangeListener:s.bind(null,t),unwatchNavigationObserver:t.observe(d.activePane,function(t){t!==history.state.pane&&history.pushState(i(t,history.state.view),_,o(t,history.state.view))}),unwatchViewObserver:t.observe(f.getters.currentView,function(t){t!==history.state.view&&history.pushState(i(history.state.pane,t),_,o(history.state.pane,t))}),unwatchMoreInfoObserver:t.observe(l.getters.hasCurrentEntityId,function(t){t?history.pushState(history.state,_,window.location.pathname):e.ignoreNextDeselectEntity?e.ignoreNextDeselectEntity=!1:setTimeout(function(){return history.back()},0)})};m[t.hassId]=e,window.addEventListener("popstate",e.popstateChangeListener)}}function c(t){if(v){var e=r(t);e&&(e.unwatchNavigationObserver(),e.unwatchViewObserver(),e.unwatchMoreInfoObserver(),window.removeEventListener("popstate",e.popstateChangeListener),m[t.hassId]=!1)}}var l=n(44),f=n(54),d=n(46),h=n(45);e.startSync=u,e.stopSync=c;var p=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),v=history.pushState&&!1,_="Home Assistant",m={}},function(t,e,n){"use strict";function r(t,e){t.dispatch(i.a.NOTIFICATION_CREATED,{message:e})}var i=n(48);e.createNotification=r},function(t,e,n){"use strict";var r=["notifications"];Object.defineProperty(e,"notificationMap",{configurable:!1,enumerable:!0,get:function(){return r}});var i=[r,function(t){return t.last()}];Object.defineProperty(e,"lastNotificationMessage",{configurable:!1,enumerable:!0,get:function(){return i}})},function(t,e,n){"use strict";function r(t,e){var n=e.message;return t.set(t.size,n)}function i(){return u.getInitialState()}var o=n(2),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(48),u=new o.Store({getInitialState:function(){return new o.Immutable.OrderedMap},initialize:function(){this.on(s.a.NOTIFICATION_CREATED,r),this.on(s.a.LOG_OUT,i)}});e.a=u},function(t,e,n){"use strict";var r=n(121),i=r.a;Object.defineProperty(e,"a",{configurable:!1,enumerable:!0,get:function(){return i}})},function(t,e,n){"use strict";function r(){if(!("localStorage"in window))return{};var t=window.localStorage,e="___test";try{return t.setItem(e,e),t.removeItem(e),t}catch(n){return{}}}var i=n(14),o=n(22),a=n(47),s=r(),u={authToken:{getter:[i.getters.currentAuthToken,i.getters.rememberAuth,function(t,e){return e?t:null}],defaultValue:null},useStreaming:{getter:o.getters.useStreaming,defaultValue:!0},showSidebar:{getter:a.getters.showSidebar,defaultValue:!1}},c={};Object.keys(u).forEach(function(t){t in s||(s[t]=u[t].defaultValue),Object.defineProperty(c,t,{get:function(){try{return JSON.parse(s[t])}catch(e){return u[t].defaultValue}}})}),c.startSync=function(t){Object.keys(u).forEach(function(e){var n=u[e].getter,r=function(t){s[e]=JSON.stringify(t)};t.observe(n,r),r(t.evaluate(n))})},e.a=c},function(t,e,n){"use strict";function r(t){var e={};return e.incrementData=function(e,n){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];i(e,t,r,n)},e.replaceData=function(e,n){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];i(e,t,f.a.bind()({},r,{replace:!0}),n)},e.removeData=function(e,n){u(e,t,{id:n})},t.fetch&&(e.fetch=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.dispatch(d.a.API_FETCH_START,{model:t,params:n,method:"fetch"}),t.fetch(e,n).then(i.bind(null,e,t,n),o.bind(null,e,t,n))}),e.fetchAll=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.dispatch(d.a.API_FETCH_START,{model:t,params:n,method:"fetchAll"}),t.fetchAll(e,n).then(i.bind(null,e,t,f.a.bind()({},n,{replace:!0})),o.bind(null,e,t,n))},t.save&&(e.save=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.dispatch(d.a.API_SAVE_START,{params:n}),t.save(e,n).then(a.bind(null,e,t,n),s.bind(null,e,t,n))}),t["delete"]&&(e["delete"]=function(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.dispatch(d.a.API_DELETE_START,{params:n}),t["delete"](e,n).then(u.bind(null,e,t,n),c.bind(null,e,t,n))}),e}function i(t,e,n,r){return t.dispatch(d.a.API_FETCH_SUCCESS,{model:e,params:n,result:r}),r}function o(t,e,n,r){return t.dispatch(d.a.API_FETCH_FAIL,{model:e,params:n,reason:r}),Promise.reject(r)}function a(t,e,n,r){return t.dispatch(d.a.API_SAVE_SUCCESS,{model:e,params:n,result:r}),r}function s(t,e,n,r){return t.dispatch(d.a.API_SAVE_FAIL,{model:e,params:n,reason:r}),Promise.reject(r)}function u(t,e,n,r){return t.dispatch(d.a.API_DELETE_SUCCESS,{model:e,params:n,result:r}),r}function c(t,e,n,r){return t.dispatch(d.a.API_DELETE_FAIL,{model:e,params:n,reason:r}),Promise.reject(r)}var l=n(36),f=l&&l.__esModule?function(){return l["default"]}:function(){return l};Object.defineProperty(f,"a",{get:f});var d=n(21);e.a=r},function(t,e,n){"use strict";function r(t,e){var n=e.model,r=e.result,i=e.params,o=n.entity;if(!r)return t;var u=i.replace?t.set(o,s.toImmutable.bind()({})):t,c=a.a.bind()(r)?r:[r],l=n.fromJSON||s.toImmutable;return u.withMutations(function(t){return c.forEach(function(e){var n=l(e);t.setIn([o,n.id],n)})})}function i(t,e){
var n=e.model,r=e.params;return t.removeIn([n.entity,r.id])}var o=n(216),a=o&&o.__esModule?function(){return o["default"]}:function(){return o};Object.defineProperty(a,"a",{get:a});var s=n(2),u=s&&s.__esModule?function(){return s["default"]}:function(){return s};Object.defineProperty(u,"a",{get:u});var c=n(21),l=new s.Store({getInitialState:function(){return s.toImmutable.bind()({})},initialize:function(){var t=this;this.on(c.a.API_FETCH_SUCCESS,r),this.on(c.a.API_SAVE_SUCCESS,r),this.on(c.a.API_DELETE_SUCCESS,i),this.on(c.a.LOG_OUT,function(){return t.getInitialState()})}});e.a=l},function(t,e,n){"use strict";var r=n(36),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=n(4),a=n(9),s=n(7),u=n(20),c=n(49),l=n(50),f=a.createApiActions.bind()(l.a);f.serviceRegistered=function(t,e,n){var r=t.evaluateToJS(c.byDomain(e));r?r.services.push(n):r={domain:e,services:[n]},f.incrementData(t,r)},f.callTurnOn=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return f.callService(t,"homeassistant","turn_on",i.a.bind()({},n,{entity_id:e}))},f.callTurnOff=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return f.callService(t,"homeassistant","turn_off",i.a.bind()({},n,{entity_id:e}))},f.callService=function(t,e,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];return o.a.bind()(t,"POST","services/"+e+"/"+n,r).then(function(i){"turn_on"===n&&r.entity_id?u.actions.createNotification(t,"Turned on "+r.entity_id+"."):"turn_off"===n&&r.entity_id?u.actions.createNotification(t,"Turned off "+r.entity_id+"."):u.actions.createNotification(t,"Service "+e+"/"+n+" called."),s.actions.incrementData(t,i)})},t.exports=f},function(t,e,n){"use strict";function r(t,e){if("lock"===t)return!0;if("garage_door"===t)return!0;var n=e.get(t);return!!n&&n.services.has("turn_on")}e.a=r},function(t,e,n){"use strict";function r(t,e){return t?"group"===t.domain?"on"===t.state||"off"===t.state:i.a.bind()(t.domain,e):!1}var i=n(125);e.a=r},function(t,e,n){"use strict";function r(t){var e=h[t.hassId];e&&(e.scheduleHealthCheck.cancel(),e.source.close(),h[t.hassId]=!1)}function i(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=e.syncOnInitialConnect,o=void 0===n?!0:n;r(t);var a=s.a.bind()(i.bind(null,t),d),v=t.evaluate(u.getters.authToken),_=new EventSource("/api/stream?api_password="+v+"&restrict="+p),m=o;h[t.hassId]={source:_,scheduleHealthCheck:a},_.addEventListener("open",function(){a(),t.batch(function(){t.dispatch(l.a.STREAM_START),c.actions.stop(t),m?c.actions.fetchAll(t):m=!0})},!1),_.addEventListener("message",function(e){a(),"ping"!==e.data&&f.a.bind()(t,JSON.parse(e.data))},!1),_.addEventListener("error",function(){a(),_.readyState!==EventSource.CLOSED&&t.dispatch(l.a.STREAM_ERROR)},!1)}function o(t){r(t),t.batch(function(){t.dispatch(l.a.STREAM_STOP),c.actions.start(t)})}var a=n(66),s=a&&a.__esModule?function(){return a["default"]}:function(){return a};Object.defineProperty(s,"a",{get:s});var u=n(14),c=n(24),l=n(51),f=n(129);e.start=i,e.stop=o;var d=6e4,h={},p=["state_changed","component_loaded","service_registered"].join(",")},function(t,e,n){"use strict";var r=["streamStatus","isStreaming"];Object.defineProperty(e,"isStreamingEvents",{configurable:!1,enumerable:!0,get:function(){return r}});var i=["streamStatus","isSupported"];Object.defineProperty(e,"isSupported",{configurable:!1,enumerable:!0,get:function(){return i}});var o=["streamStatus","useStreaming"];Object.defineProperty(e,"useStreaming",{configurable:!1,enumerable:!0,get:function(){return o}});var a=["streamStatus","hasError"];Object.defineProperty(e,"hasStreamingEventsError",{configurable:!1,enumerable:!0,get:function(){return a}})},function(t,e,n){"use strict";var r=n(7),i=n(17),o=n(12);e.a=function(t,e){switch(e.event_type){case"state_changed":e.data.new_state?r.actions.incrementData(t,e.data.new_state):r.actions.removeData(t,e.data.entity_id);break;case"component_loaded":i.actions.componentLoaded(t,e.data.component);break;case"service_registered":o.actions.serviceRegistered(t,e.data.domain,e.data.service)}}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.a="object"===("undefined"==typeof window?"undefined":r(window))&&"EventSource"in window},function(t,e,n){"use strict";function r(t){return t.withMutations(function(t){t.set("isStreaming",!0).set("useStreaming",!0).set("hasError",!1)})}function i(t){return t.withMutations(function(t){t.set("isStreaming",!1).set("useStreaming",!1).set("hasError",!1)})}function o(t){return t.withMutations(function(t){t.set("isStreaming",!1).set("hasError",!0)})}function a(){return f.getInitialState()}var s=n(2),u=s&&s.__esModule?function(){return s["default"]}:function(){return s};Object.defineProperty(u,"a",{get:u});var c=n(51),l=n(130),f=new s.Store({getInitialState:function(){return s.toImmutable.bind()({isSupported:l.a,isStreaming:!1,useStreaming:!0,hasError:!1})},initialize:function(){this.on(c.a.STREAM_START,r),this.on(c.a.STREAM_STOP,i),this.on(c.a.STREAM_ERROR,o),this.on(c.a.LOG_OUT,a)}});e.a=f},function(t,e,n){"use strict";function r(t){return t.evaluate(d.isSyncScheduled)}function i(t){r(t)&&(t.hassId in g||(g[t.hassId]=l.a.bind()(a.bind(null,t),y)),g[t.hassId]())}function o(t){var e=g[t.hassId];e&&e.cancel()}function a(t){return t.dispatch(f.a.API_FETCH_ALL_START,{}),h.a.bind()(t,"GET","bootstrap").then(function(e){t.batch(function(){p.actions.replaceData(t,e.states),v.actions.replaceData(t,e.services),_.actions.replaceData(t,e.events),m.actions.configLoaded(t,e.config),t.dispatch(f.a.API_FETCH_ALL_SUCCESS,{})}),i(t)},function(e){return t.dispatch(f.a.API_FETCH_ALL_FAIL,{message:e}),i(t),Promise.reject(e)})}function s(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=e.skipInitialSync,r=void 0===n?!1:n;t.dispatch(f.a.SYNC_SCHEDULED),r?i(t):a(t)}function u(t){t.dispatch(f.a.SYNC_SCHEDULE_CANCELLED),o(t)}var c=n(66),l=c&&c.__esModule?function(){return c["default"]}:function(){return c};Object.defineProperty(l,"a",{get:l});var f=n(23),d=n(52),h=n(4),p=n(7),v=n(12),_=n(18),m=n(17);e.fetchAll=a,e.start=s,e.stop=u;var y=3e4,g={}},function(t,e,n){"use strict";var r=n(2),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=n(23),a=new r.Store({getInitialState:function(){return!0},initialize:function(){this.on(o.a.API_FETCH_ALL_START,function(){return!0}),this.on(o.a.API_FETCH_ALL_SUCCESS,function(){return!1}),this.on(o.a.API_FETCH_ALL_FAIL,function(){return!1}),this.on(o.a.LOG_OUT,function(){return!1})}});e.a=a},function(t,e,n){"use strict";var r=n(2),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=n(23),a=new r.Store({getInitialState:function(){return!1},initialize:function(){this.on(o.a.SYNC_SCHEDULED,function(){return!0}),this.on(o.a.SYNC_SCHEDULE_CANCELLED,function(){return!1}),this.on(o.a.LOG_OUT,function(){return!1})}});e.a=a},function(t,e,n){"use strict";function r(t,e){return i.a.bind()(t,"POST","template",{template:e})}var i=n(4);e.render=r},function(t,e,n){"use strict";var r=n(135),i=r;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return i}})},function(t,e,n){"use strict";function r(t,e){t.dispatch(i.a.SELECT_VIEW,{view:e})}var i=n(53);e.selectView=r},function(t,e,n){"use strict";function r(t,e,n){var i=arguments.length<=3||void 0===arguments[3]?!0:arguments[3];n.attributes.entity_id.forEach(function(n){if(!t.has(n)){var o=e.get(n);o&&!o.attributes.hidden&&(t.set(n,o),"group"===o.domain&&i&&r(t,e,o,!1))}})}var i=n(2),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(o,"a",{get:o});var a=n(7),s="group.default_view",u=["currentView"];Object.defineProperty(e,"currentView",{configurable:!1,enumerable:!0,get:function(){return u}});var c=[a.getters.entityMap,function(t){return t.filter(function(t){return"group"===t.domain&&t.attributes.view&&t.entityId!==s})}];Object.defineProperty(e,"views",{configurable:!1,enumerable:!0,get:function(){return c}});var l=[a.getters.entityMap,u,function(t,e){var n=void 0;return n=e?t.get(e):t.get(s),n?(new i.Immutable.Map).withMutations(function(e){r(e,t,n)}):t.filter(function(t){return!t.attributes.hidden})}];Object.defineProperty(e,"currentViewEntities",{configurable:!1,enumerable:!0,get:function(){return l}})},function(t,e,n){"use strict";function r(t,e){var n=e.model,r=e.result,i=e.params;if(null===t||"entity"!==n.entity||!i.replace)return t;for(var o=0;o<r.length;o++)if(r[o].entity_id===t)return t;return null}var i=n(2),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(o,"a",{get:o});var a=n(53),s=n(21),u=new i.Store({getInitialState:function(){return null},initialize:function(){this.on(a.a.SELECT_VIEW,function(t,e){var n=e.view;return n}),this.on(s.a.API_FETCH_SUCCESS,r)}});e.a=u},function(t,e,n){"use strict";function r(t){return l[t.hassId]}function i(t){var e=r(t);if(e){var n=e.finalTranscript||e.interimTranscript;t.dispatch(c.a.VOICE_TRANSMITTING,{finalTranscript:n}),u.actions.callService(t,"conversation","process",{text:n}).then(function(){t.dispatch(c.a.VOICE_DONE)},function(){t.dispatch(c.a.VOICE_ERROR)})}}function o(t){var e=r(t);e&&(e.recognition.stop(),l[t.hassId]=!1)}function a(t){i(t),o(t)}function s(t){var e=a.bind(null,t);e();var n=new webkitSpeechRecognition;l[t.hassId]={recognition:n,interimTranscript:"",finalTranscript:""},n.interimResults=!0,n.onstart=function(){return t.dispatch(c.a.VOICE_START)},n.onerror=function(){return t.dispatch(c.a.VOICE_ERROR)},n.onend=e,n.onresult=function(e){var n=r(t);if(n){for(var i="",o="",a=e.resultIndex;a<e.results.length;a++)e.results[a].isFinal?i+=e.results[a][0].transcript:o+=e.results[a][0].transcript;n.interimTranscript=o,n.finalTranscript+=i,t.dispatch(c.a.VOICE_RESULT,{interimTranscript:o,finalTranscript:n.finalTranscript})}},n.start()}var u=n(12),c=n(55);e.stop=o,e.finish=a,e.listen=s;var l={}},function(t,e,n){"use strict";var r=["isVoiceSupported"];Object.defineProperty(e,"isVoiceSupported",{configurable:!1,enumerable:!0,get:function(){return r}});var i=["currentVoiceCommand","isListening"];Object.defineProperty(e,"isListening",{configurable:!1,enumerable:!0,get:function(){return i}});var o=["currentVoiceCommand","isTransmitting"];Object.defineProperty(e,"isTransmitting",{configurable:!1,enumerable:!0,get:function(){return o}});var a=["currentVoiceCommand","interimTranscript"];Object.defineProperty(e,"interimTranscript",{configurable:!1,enumerable:!0,get:function(){return a}});var s=["currentVoiceCommand","finalTranscript"];Object.defineProperty(e,"finalTranscript",{configurable:!1,enumerable:!0,get:function(){return s}});var u=[a,s,function(t,e){return t.slice(e.length)}];Object.defineProperty(e,"extraInterimTranscript",{configurable:!1,enumerable:!0,get:function(){return u}})},function(t,e,n){"use strict";function r(t){t.registerStores({currentVoiceCommand:o.a,isVoiceSupported:i.a})}var i=n(144),o=n(143),a=n(140),s=n(141);e.register=r;var u=a;Object.defineProperty(e,"actions",{configurable:!1,enumerable:!0,get:function(){return u}});var c=s;Object.defineProperty(e,"getters",{configurable:!1,enumerable:!0,get:function(){return c}})},function(t,e,n){"use strict";function r(t){return t.set("isListening",!0)}function i(t,e){var n=e.interimTranscript,r=e.finalTranscript;return t.withMutations(function(t){return t.set("isListening",!0).set("isTransmitting",!1).set("interimTranscript",n).set("finalTranscript",r)})}function o(t,e){var n=e.finalTranscript;return t.withMutations(function(t){return t.set("isListening",!1).set("isTransmitting",!0).set("interimTranscript","").set("finalTranscript",n)})}function a(){return d.getInitialState()}function s(){return d.getInitialState()}function u(){return d.getInitialState()}var c=n(2),l=c&&c.__esModule?function(){return c["default"]}:function(){return c};Object.defineProperty(l,"a",{get:l});var f=n(55),d=new c.Store({getInitialState:function(){return c.toImmutable.bind()({isListening:!1,isTransmitting:!1,interimTranscript:"",finalTranscript:""})},initialize:function(){this.on(f.a.VOICE_START,r),this.on(f.a.VOICE_RESULT,i),this.on(f.a.VOICE_TRANSMITTING,o),this.on(f.a.VOICE_DONE,a),this.on(f.a.VOICE_ERROR,s),this.on(f.a.LOG_OUT,u)}});e.a=d},function(t,e,n){"use strict";var r=n(2),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=new r.Store({getInitialState:function(){return"webkitSpeechRecognition"in window}});e.a=o},function(t,e,n){"use strict";function r(){var t=new i.Reactor({debug:1});return t.hassId=a++,t}var i=n(2),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(o,"a",{get:o}),e.a=r;var a=0},function(t,e,n){"use strict";function r(t,e){return i.toImmutable.bind()(t.attributes.entity_id.map(function(t){return e.get(t)}).filter(function(t){return!!t}))}var i=n(2),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(o,"a",{get:o}),e.a=r},function(t,e,n){"use strict";function r(t,e,n){Object.keys(n).forEach(function(r){var i=n[r];"register"in i&&i.register(e),"getters"in i&&Object.defineProperty(t,r+"Getters",{value:i.getters,enumerable:!0}),"actions"in i&&!function(){var n={};Object.getOwnPropertyNames(i.actions).forEach(function(t){o.a.bind()(i.actions[t])&&Object.defineProperty(n,t,{value:i.actions[t].bind(null,e),enumerable:!0})}),Object.defineProperty(t,r+"Actions",{value:n,enumerable:!0})}()})}var i=n(67),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(o,"a",{get:o}),e.a=r},function(t,e,n){"use strict";e.a={UNIT_TEMP_C:"°C",UNIT_TEMP_F:"°F"}},function(t,e,n){"use strict";var r=n(25),i=n(146),o=n(56),a=n(26),s=n(148);e.a={dateToStr:r.a,expandGroup:i.a,isStaleTime:o.a,parseDateTime:a.a,temperatureUnits:s.a}},function(t,e,n){"use strict";var r=n(0);n(160),e["default"]=new r.a({is:"ha-badges-card",properties:{states:{type:Array}}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=i.a.moreInfoActions,a=1e4;e["default"]=new r.a({is:"ha-camera-card",properties:{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(){var t=this;this.timer=setInterval(function(){return t.updateCameraFeedSrc(t.stateObj)},a)},detached:function(){clearInterval(this.timer)},cardTapped:function(){var t=this;this.async(function(){return o.selectEntity(t.stateObj.entityId)},1)},updateCameraFeedSrc:function(t){var e=(new Date).getTime();this.cameraFeedSrc=t.attributes.entity_picture+"?time="+e},imageLoadSuccess:function(){this.imageLoaded=!0},imageLoadFail:function(){this.imageLoaded=!1}})},function(t,e,n){"use strict";var r=n(0),i=n(34);n(151),n(153),n(154),n(155),e["default"]=new r.a({is:"ha-card-chooser",properties:{cardData:{type:Object,observer:"cardDataChanged"}},cardDataChanged:function(t){t&&i.a.bind()(this,"HA-"+t.cardType.toUpperCase()+"-CARD",t)}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(32);n(58),n(27),n(30);var a=i.a.moreInfoActions;e["default"]=new r.a({is:"ha-entities-card",properties:{states:{type:Array},groupEntity:{type:Object}},computeTitle:function(t,e){return e?e.entityDisplay:t[0].domain.replace(/_/g," ")},entityTapped:function(t){if(!t.target.classList.contains("paper-toggle-button")&&!t.target.classList.contains("paper-icon-button")){t.stopPropagation();var e=t.model.item.entityId;this.async(function(){return a.selectEntity(e)},1)}},showGroupToggle:function(t,e){return!t||!e||"on"!==t.state&&"off"!==t.state?!1:e.reduce(function(t,e){return t+o.a.bind()(e.entityId)},0)>1}})},function(t,e,n){"use strict";var r=n(0);n(58),e["default"]=new r.a({is:"ha-introduction-card",properties:{showInstallInstruction:{type:Boolean,value:1},showHideInstruction:{type:Boolean,value:!0}}})},function(t,e,n){"use strict";var r=n(214),i=r&&r.__esModule?function(){return r["default"]}:function(){return r};Object.defineProperty(i,"a",{get:i});var o=n(0),a=n(1),s=a.a.moreInfoActions;e["default"]=new o.a({is:"ha-media_player-card",properties:{stateObj:{type:Object},playerObj:{type:Object,computed:"computePlayerObj(stateObj)",observer:"playerObjChanged"},playbackControlIcon:{type:String,computed:"computePlaybackControlIcon(playerObj)"},elevation:{type:Number,value:1,reflectToAttribute:!0}},playerObjChanged:function(t){t.isOff||t.isIdle||(this.$.cover.style.backgroundImage=t.stateObj.attributes.entity_picture?"url("+t.stateObj.attributes.entity_picture+")":"")},computeBannerClasses:function(t){return i.a.bind()({banner:!0,"is-off":t.isOff||t.isIdle,"no-cover":!t.stateObj.attributes.entity_picture})},computeHidePowerOnButton:function(t){return!t.isOff||!t.supportsTurnOn},computePlayerObj:function(t){return t.domainModel(a.a)},computePlaybackControlIcon:function(t){return t.isPlaying?t.supportsPause?"mdi:pause":"mdi:stop":t.isPaused||t.isOff?"mdi:play":""},computeShowControls:function(t){return!t.isOff},handleNext:function(t){t.stopPropagation(),this.playerObj.nextTrack()},handleOpenMoreInfo:function(t){var e=this;t.stopPropagation(),this.async(function(){return s.selectEntity(e.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()}})},function(t,e,n){"use strict";var r=n(0),i=n(63);e["default"]=new r.a({is:"display-time",properties:{dateObj:{type:Object}},computeTime:function(t){return t?i.a.bind()(t):""}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3),a=r.a.entityGetters;e["default"]=new i.a({is:"entity-list",behaviors:[o.a],properties:{entities:{type:Array,bindNuclear:[a.entityMap,function(t){return t.valueSeq().sortBy(function(t){return t.entityId}).toArray()}]}},entitySelected:function(t){t.preventDefault(),this.fire("entity-selected",{entityId:t.model.entity.entityId})}})},function(t,e,n){"use strict";var r=n(0),i=n(1);n(28);var o=i.a.reactor,a=i.a.entityGetters,s=i.a.moreInfoActions;e["default"]=new r.a({is:"ha-entity-marker",properties:{entityId:{type:String,value:""},state:{type:Object,computed:"computeState(entityId)"},icon:{type:Object,computed:"computeIcon(state)"},image:{type:Object,computed:"computeImage(state)"},value:{type:String,computed:"computeValue(state)"}},listeners:{tap:"badgeTap"},badgeTap:function(t){var e=this;t.stopPropagation(),this.entityId&&this.async(function(){return s.selectEntity(e.entityId)},1)},computeState:function(t){return t&&o.evaluate(a.byId(t))},computeIcon:function(t){return!t&&"home"},computeImage:function(t){return t&&t.attributes.entity_picture},computeValue:function(t){return t&&t.entityDisplay.split(" ").map(function(t){return t.substr(0,1)}).join("")}})},function(t,e,n){"use strict";var r=n(0),i=n(65);e["default"]=new r.a({is:"ha-state-icon",properties:{stateObj:{type:Object}},computeIcon:function(t){return i.a.bind()(t)}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(33),a=n(32),s=n(65);n(28);var u=i.a.moreInfoActions,c=i.a.serviceActions;e["default"]=new r.a({is:"ha-state-label-badge",properties:{state:{type:Object,observer:"stateChanged"}},listeners:{tap:"badgeTap"},badgeTap:function(t){var e=this;return t.stopPropagation(),a.a.bind()(this.state.entityId)?void("scene"===this.state.domain||"off"===this.state.state?c.callTurnOn(this.state.entityId):c.callTurnOff(this.state.entityId)):void this.async(function(){return u.selectEntity(e.state.entityId)},1)},computeClasses:function(t){switch(t.domain){case"scene":return"green";case"binary_sensor":case"script":return"on"===t.state?"blue":"grey";case"updater":return"blue";default:return""}},computeValue:function(t){switch(t.domain){case"binary_sensor":case"device_tracker":case"updater":case"sun":case"scene":case"script":case"alarm_control_panel":return null;case"sensor":default:return"unknown"===t.state?"-":t.state}},computeIcon:function(t){if("unavailable"===t.state)return null;switch(t.domain){case"alarm_control_panel":return"pending"===t.state?"mdi:clock-fast":"armed_away"===t.state?"mdi:nature":"armed_home"===t.state?"mdi:home-variant":o.a.bind()(t.domain,t.state);case"binary_sensor":case"device_tracker":case"scene":case"updater":case"script":return s.a.bind()(t);case"sun":return"above_horizon"===t.state?o.a.bind()(t.domain):"mdi:brightness-3";default:return null}},computeImage:function(t){return t.attributes.entity_picture||null},computeLabel:function(t){if("unavailable"===t.state)return"unavai";switch(t.domain){case"scene":case"script":return t.domain;case"device_tracker":return"not_home"===t.state?"Away":t.state;case"alarm_control_panel":return"pending"===t.state?"pend":"armed_away"===t.state||"armed_home"===t.state?"armed":"disarm";default:return t.attributes.unit_of_measurement||null}},computeDescription:function(t){return t.entityDisplay},stateChanged:function(){this.updateStyles()}})},function(t,e,n){"use strict";var r=n(0);n(159),e["default"]=new r.a({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))}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3),a=r.a.eventGetters;e["default"]=new i.a({is:"events-list",behaviors:[o.a],properties:{events:{type:Array,bindNuclear:[a.entityMap,function(t){return t.valueSeq().sortBy(function(t){return t.event}).toArray()}]}},eventSelected:function(t){t.preventDefault(),this.fire("event-selected",{eventType:t.model.event.event})}})},function(t,e,n){"use strict";function r(t){return t in c?c[t]:30}function i(t){return"group"===t.domain?t.attributes.order:t.entityDisplay.toLowerCase()}var o=n(0),a=n(1);n(165),n(150),n(152);var s=a.a.util,u={camera:4,media_player:3},c={configurator:-20,group:-10,a:-1,updater:0,sun:1,device_tracker:2,alarm_control_panel:3,sensor:5,binary_sensor:6,scene:7,script:8};e["default"]=new o.a({is:"ha-cards",properties:{showIntroduction:{type:Boolean,value:!1},columns:{type:Number,value:2},states:{type:Object},cards:{type:Object}},observers:["updateCards(columns, states, showIntroduction)"],updateCards:function(t,e,n){var r=this;this.debounce("updateCards",function(){r.cards=r.computeCards(t,e,n)},0)},computeCards:function(t,e,n){function o(t){return t.filter(function(t){return!(t.entityId in f)})}function a(t){for(var e=0,n=e;n<h.length;n++){if(h[n]<5){e=n;break}h[n]<h[e]&&(e=n)}return h[e]+=t,e}function c(t,e){var n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];if(0!==e.length){var r=[],i=[],o=0;e.forEach(function(t){t.domain in u?(r.push(t),o+=u[t.domain]):(i.push(t),o++)}),o+=i.length>1;var s=a(o);i.length>0&&d.columns[s].push({cardType:"entities",states:i,groupEntity:n}),r.forEach(function(t){d.columns[s].push({cardType:t.domain,stateObj:t})})}}for(var l=e.groupBy(function(t){return t.domain}),f={},d={demo:!1,badges:[],columns:[]},h=[],p=0;t>p;p++)d.columns.push([]),h.push(0);return n&&d.columns[a(5)].push({cardType:"introduction",showHideInstruction:e.size>0&&!1}),l.keySeq().sortBy(function(t){return r(t)}).forEach(function(t){if("a"===t)return void(d.demo=!0);var n=r(t);n>=0&&10>n?d.badges.push.apply(d.badges,o(l.get(t)).sortBy(i).toArray()):"group"===t?l.get(t).sortBy(i).forEach(function(t){var n=s.expandGroup(t,e);n.forEach(function(t){f[t.entityId]=!0}),c(t.entityId,n.toArray(),t)}):c(t,o(l.get(t)).sortBy(i).toArray())}),d.columns=d.columns.filter(function(t){return t.length>0}),d}})},function(t,e,n){"use strict";var r=n(0);e["default"]=new r.a({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){var e=this;this.mouseMoveIsThrottled&&(this.mouseMoveIsThrottled=!1,this.processColorSelect(t.touches[0]),this.async(function(){e.mouseMoveIsThrottled=!0},100))},onMouseMove:function(t){var e=this;this.mouseMoveIsThrottled&&(this.mouseMoveIsThrottled=!1,this.processColorSelect(t),this.async(function(){e.mouseMoveIsThrottled=!0},100))},processColorSelect:function(t){var e=this.canvas.getBoundingClientRect();t.clientX<e.left||t.clientX>=e.left+e.width||t.clientY<e.top||t.clientY>=e.top+e.height||this.onColorSelect(t.clientX-e.left,t.clientY-e.top)},onColorSelect:function(t,e){var n=this.context.getImageData(t,e,1,1).data;this.setColor({r:n[0],g:n[1],b:n[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=void 0;this.width&&this.height||(t=getComputedStyle(this));var e=this.width||parseInt(t.width,10),n=this.height||parseInt(t.height,10),r=this.context.createLinearGradient(0,0,e,0);r.addColorStop(0,"rgb(255,0,0)"),r.addColorStop(.16,"rgb(255,0,255)"),r.addColorStop(.32,"rgb(0,0,255)"),r.addColorStop(.48,"rgb(0,255,255)"),r.addColorStop(.64,"rgb(0,255,0)"),r.addColorStop(.8,"rgb(255,255,0)"),r.addColorStop(1,"rgb(255,0,0)"),this.context.fillStyle=r,this.context.fillRect(0,0,e,n);var i=this.context.createLinearGradient(0,0,0,n);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(.5,"rgba(255,255,255,0)"),i.addColorStop(.5,"rgba(0,0,0,0)"),i.addColorStop(1,"rgba(0,0,0,1)"),this.context.fillStyle=i,this.context.fillRect(0,0,e,n)}})},function(t,e,n){"use strict";var r=n(0);n(28),e["default"]=new r.a({is:"ha-demo-badge"})},function(t,e,n){"use strict";var r=n(0);n(168),e["default"]=new r.a({is:"ha-logbook",properties:{entries:{type:Object,value:[]}},noEntries:function(t){return!t.length}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3);n(172);var a=r.a.configGetters,s=r.a.navigationGetters,u=r.a.authActions,c=r.a.navigationActions;e["default"]=new i.a({is:"ha-sidebar",behaviors:[o.a],properties:{menuShown:{type:Boolean},menuSelected:{type:String},narrow:{type:Boolean},selected:{type:String,bindNuclear:s.activePane},hasHistoryComponent:{type:Boolean,bindNuclear:a.isComponentLoaded("history")},hasLogbookComponent:{type:Boolean,bindNuclear:a.isComponentLoaded("logbook")}},menuSelect:function(){var t=this;this.debounce("updateStyles",function(){return t.updateStyles()},1)},menuClicked:function(t){for(var e=t.target,n=5;n&&!e.getAttribute("data-panel");)e=e.parentElement,n--;n&&this.selectPanel(e.getAttribute("data-panel"))},toggleMenu:function(){this.fire("close-menu")},selectPanel:function(t){var e=this;if(t!==this.selected){if("logout"===t)return void this.handleLogOut();c.navigate.apply(null,t.split("/")),this.debounce("updateStyles",function(){return e.updateStyles()},1)}},handleLogOut:function(){u.logOut()}})},function(t,e,n){"use strict";var r=n(1),i=n(0);n(57),n(156),n(59);var o=r.a.moreInfoActions;e["default"]=new i.a({is:"logbook-entry",entityClicked:function(t){t.preventDefault(),o.selectEntity(this.entryObj.entityId)}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3);n(57);var a=r.a.serviceGetters;e["default"]=new i.a({is:"services-list",behaviors:[o.a],properties:{serviceDomains:{type:Array,bindNuclear:a.entityMap}},computeDomains:function(t){return t.valueSeq().map(function(t){return t.domain}).sort().toJS()},computeServices:function(t,e){return t.get(e).get("services").keySeq().toArray()},serviceClicked:function(t){t.preventDefault(),this.fire("service-selected",{domain:t.model.domain,service:t.model.service})}})},function(t,e,n){"use strict";function r(t){var e=parseFloat(t);return!isNaN(e)&&isFinite(e)?e:null}var i=n(232),o=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(o,"a",{get:o});var a=n(0);e["default"]=new a.a({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(){if(this.isAttached){this.chartEngine||(this.chartEngine=new window.google.visualization.LineChart(this));var t=this.unit,e=this.data;if(0!==e.length){var n={legend:{position:"top"},interpolateNulls:!0,titlePosition:"none",vAxes:{0:{title:t}},hAxis:{format:"H:mm"},chartArea:{left:"60",width:"95%"},explorer:{actions:["dragToZoom","rightClickToReset","dragToPan"],keepInBounds:!0,axis:"horizontal",maxZoomIn:.1}};this.isSingleDevice&&(n.legend.position="none",n.vAxes[0].title=null,n.chartArea.left=40,n.chartArea.height="80%",n.chartArea.top=5,n.enableInteractivity=!1);var i=new Date(Math.min.apply(null,e.map(function(t){return t[0].lastChangedAsDate}))),a=new Date(i);a.setDate(a.getDate()+1),a>new Date&&(a=new Date);var s=e.map(function(t){function e(t,e){c&&e&&u.push([t[0]].concat(c.slice(1).map(function(t,n){return e[n]?t:null}))),u.push(t),c=t}var n=t[t.length-1],i=n.domain,o=n.entityDisplay,s=new window.google.visualization.DataTable;s.addColumn({type:"datetime",id:"Time"});var u=[],c=void 0;if("thermostat"===i){var l=t.reduce(function(t,e){return t||e.attributes.target_temp_high!==e.attributes.target_temp_low},!1);s.addColumn("number",o+" current temperature");var f=void 0;l?!function(){s.addColumn("number",o+" target temperature high"),s.addColumn("number",o+" target temperature low");var t=[!1,!0,!0];f=function(n){var i=r(n.attributes.current_temperature),o=r(n.attributes.target_temp_high),a=r(n.attributes.target_temp_low);e([n.lastUpdatedAsDate,i,o,a],t)}}():!function(){s.addColumn("number",o+" target temperature");var t=[!1,!0];f=function(n){var i=r(n.attributes.current_temperature),o=r(n.attributes.temperature);e([n.lastUpdatedAsDate,i,o],t)}}(),t.forEach(f)}else!function(){s.addColumn("number",o);var n="sensor"!==i&&[!0];t.forEach(function(t){var i=r(t.state);e([t.lastChangedAsDate,i],n)})}();return e([a].concat(c.slice(1)),!1),s.addRows(u),s}),u=void 0;u=1===s.length?s[0]:s.slice(1).reduce(function(t,e){return window.google.visualization.data.join(t,e,"full",[[0,0]],o.a.bind()(1,t.getNumberOfColumns()),o.a.bind()(1,e.getNumberOfColumns()))},s[0]),this.chartEngine.draw(u,n)}}}})},function(t,e,n){"use strict";var r=n(0);e["default"]=new r.a({is:"state-history-chart-timeline",properties:{data:{type:Object,observer:"dataChanged"},isAttached:{type:Boolean,value:!1,observer:"dataChanged"}},attached:function(){this.isAttached=!0},dataChanged:function(){this.drawChart()},drawChart:function(){function t(t,e,n,r){var i=e.replace(/_/g," ");o.addRow([t,i,n,r])}if(this.isAttached){for(var e=r.a.dom(this),n=this.data;e.node.lastChild;)e.node.removeChild(e.node.lastChild);if(n&&0!==n.length){var i=new window.google.visualization.Timeline(this),o=new window.google.visualization.DataTable;o.addColumn({
type:"string",id:"Entity"}),o.addColumn({type:"string",id:"State"}),o.addColumn({type:"date",id:"Start"}),o.addColumn({type:"date",id:"End"});var a=new Date(n.reduce(function(t,e){return Math.min(t,e[0].lastChangedAsDate)},new Date)),s=new Date(a);s.setDate(s.getDate()+1),s>new Date&&(s=new Date);var u=0;n.forEach(function(e){if(0!==e.length){var n=e[0].entityDisplay,r=void 0,i=null,o=null;e.forEach(function(e){null!==i&&e.state!==i?(r=e.lastChangedAsDate,t(n,i,o,r),i=e.state,o=r):null===i&&(i=e.state,o=e.lastChangedAsDate)}),t(n,i,o,s),u++}}),i.draw(o,{height:55+42*u,timeline:{showRowLabels:n.length>1},hAxis:{format:"H:mm"}})}}}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3),a=r.a.streamGetters,s=r.a.streamActions;e["default"]=new i.a({is:"stream-status",behaviors:[o.a],properties:{isStreaming:{type:Boolean,bindNuclear:a.isStreamingEvents},hasError:{type:Boolean,bindNuclear:a.hasStreamingEventsError}},toggleChanged:function(){this.isStreaming?s.stop():s.start()}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3),a=r.a.voiceActions,s=r.a.voiceGetters;e["default"]=new i.a({is:"ha-voice-command-dialog",behaviors:[o.a],properties:{dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},finalTranscript:{type:String,bindNuclear:s.finalTranscript},interimTranscript:{type:String,bindNuclear:s.extraInterimTranscript},isTransmitting:{type:Boolean,bindNuclear:s.isTransmitting},isListening:{type:Boolean,bindNuclear:s.isListening},showListenInterface:{type:Boolean,computed:"computeShowListenInterface(isListening, isTransmitting)",observer:"showListenInterfaceChanged"}},computeShowListenInterface:function(t,e){return t||e},dialogOpenChanged:function(t){!t&&this.isListening&&a.stop()},showListenInterfaceChanged:function(t){!t&&this.dialogOpen?this.dialogOpen=!1:t&&(this.dialogOpen=!0)}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3);n(30),n(60),n(189);var a=r.a.configGetters,s=r.a.entityHistoryGetters,u=r.a.entityHistoryActions,c=r.a.moreInfoGetters,l=r.a.moreInfoActions,f=["camera","configurator","scene"];e["default"]=new i.a({is:"more-info-dialog",behaviors:[o.a],properties:{stateObj:{type:Object,bindNuclear:c.currentEntity,observer:"stateObjChanged"},stateHistory:{type:Object,bindNuclear:[c.currentEntityHistory,function(t){return t?[t]:!1}]},isLoadingHistoryData:{type:Boolean,computed:"computeIsLoadingHistoryData(delayedDialogOpen, isLoadingEntityHistoryData)"},isLoadingEntityHistoryData:{type:Boolean,bindNuclear:s.isLoadingEntityHistory},hasHistoryComponent:{type:Boolean,bindNuclear:a.isComponentLoaded("history"),observer:"fetchHistoryData"},shouldFetchHistory:{type:Boolean,bindNuclear:c.isCurrentEntityHistoryStale,observer:"fetchHistoryData"},showHistoryComponent:{type:Boolean,value:!1,computed:"computeShowHistoryComponent(hasHistoryComponent, stateObj)"},dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},delayedDialogOpen:{type:Boolean,value:!1}},computeIsLoadingHistoryData:function(t,e){return!t||e},computeShowHistoryComponent:function(t,e){return this.hasHistoryComponent&&e&&-1===f.indexOf(e.domain)},fetchHistoryData:function(){this.stateObj&&this.hasHistoryComponent&&this.shouldFetchHistory&&u.fetchRecent(this.stateObj.entityId)},stateObjChanged:function(t){var e=this;return t?void this.async(function(){e.fetchHistoryData(),e.dialogOpen=!0},10):void(this.dialogOpen=!1)},dialogOpenChanged:function(t){var e=this;t?this.async(function(){e.delayedDialogOpen=!0},10):!t&&this.stateObj&&(this.async(function(){return l.deselectEntity()},10),this.delayedDialogOpen=!1)}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(3),a=n(38);n(72),n(71);var s=i.a.localStoragePreferences,u=i.a.navigationActions,c=i.a.reactor,l=i.a.startLocalStoragePreferencesSync,f=i.a.syncGetters;e["default"]=new r.a({is:"home-assistant",hostAttributes:{auth:null,icons:null},behaviors:[o.a],properties:{auth:{type:String},icons:{type:String},dataLoaded:{type:Boolean,bindNuclear:f.isDataLoaded},iconsLoaded:{type:Boolean,value:!1},loaded:{type:Boolean,computed:"computeLoaded(dataLoaded, iconsLoaded)"}},computeLoaded:function(t,e){return t&&e},computeForceShowLoading:function(t,e){return t&&!e},loadIcons:function(){var t=this,e=function(){t.iconsLoaded=!0};this.importHref("/static/mdi-"+this.icons+".html",e,function(){return t.importHref("/static/mdi.html",e,e)})},created:function(){this.registerServiceWorker()},ready:function(){var t=this;c.batch(function(){t.auth?a.a.bind()(t.auth,!1):s.authToken&&a.a.bind()(s.authToken,!0),u.showSidebar(s.showSidebar)}),l(),this.loadIcons()},registerServiceWorker:function(){"serviceWorker"in navigator&&navigator.serviceWorker.register("/service_worker.js")["catch"](function(t){})}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3);n(8),n(163);var a=r.a.configGetters,s=r.a.viewActions,u=r.a.viewGetters,c=r.a.voiceGetters,l=r.a.streamGetters,f=r.a.syncGetters,d=r.a.syncActions,h=r.a.voiceActions;e["default"]=new i.a({is:"partial-cards",behaviors:[o.a],properties:{narrow:{type:Boolean,value:!1},isFetching:{type:Boolean,bindNuclear:f.isFetching},isStreaming:{type:Boolean,bindNuclear:l.isStreamingEvents},canListen:{type:Boolean,bindNuclear:[c.isVoiceSupported,a.isComponentLoaded("conversation"),function(t,e){return t&&e}]},introductionLoaded:{type:Boolean,bindNuclear:a.isComponentLoaded("introduction")},locationName:{type:String,bindNuclear:a.locationName},showMenu:{type:Boolean,value:!1,observer:"windowChange"},currentView:{type:String,bindNuclear:[u.currentView,function(t){return t||""}],observer:"removeFocus"},views:{type:Array,bindNuclear:[u.views,function(t){return t.valueSeq().sortBy(function(t){return t.attributes.order}).toArray()}]},hasViews:{type:Boolean,computed:"computeHasViews(views)"},states:{type:Object,bindNuclear:u.currentViewEntities},columns:{type:Number,value:1}},created:function(){var t=this;this.windowChange=this.windowChange.bind(this);for(var e=[],n=0;5>n;n++)e.push(300+300*n);this.mqls=e.map(function(e){var n=window.matchMedia("(min-width: "+e+"px)");return n.addListener(t.windowChange),n})},detached:function(){var t=this;this.mqls.forEach(function(e){return e.removeListener(t.windowChange)})},windowChange:function(){var t=this.mqls.reduce(function(t,e){return t+e.matches},0);this.columns=Math.max(1,t-(!this.narrow&&this.showMenu))},removeFocus:function(){document.activeElement&&document.activeElement.blur()},handleRefresh:function(){d.fetchAll()},handleListenClick:function(){h.listen()},computeMenuButtonClass:function(t,e){return!t&&e?"invisible":""},computeRefreshButtonClass:function(t){return t?"ha-spin":""},computeShowIntroduction:function(t,e,n){return""===t&&(e||0===n.size)},computeHasViews:function(t){return t.length>0},toggleMenu:function(){this.fire("open-menu")},viewSelected:function(t){var e=t.detail.item.getAttribute("data-entity")||null,n=this.currentView||null;e!==n&&this.async(function(){return s.selectView(e)},0)}})},function(t,e,n){"use strict";var r=n(1),i=n(0);n(8),n(169);var o=r.a.reactor,a=r.a.serviceActions,s=r.a.serviceGetters;e["default"]=new i.a({is:"partial-dev-call-service",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},domain:{type:String,value:""},service:{type:String,value:""},serviceData:{type:String,value:""},description:{type:String,computed:"computeDescription(domain, service)"}},computeDescription:function(t,e){return o.evaluate([s.entityMap,function(n){return n.has(t)&&n.get(t).get("services").has(e)?JSON.stringify(n.get(t).get("services").get(e).toJS(),null,2):"No description available"}])},serviceSelected:function(t){this.domain=t.detail.domain,this.service=t.detail.service},callService:function(){var t=void 0;try{t=this.serviceData?JSON.parse(this.serviceData):{}}catch(e){return void alert("Error parsing JSON: "+e)}a.callService(this.domain,this.service,t)},computeFormClasses:function(t){return"content fit "+(t?"":"layout horizontal")}})},function(t,e,n){"use strict";var r=n(1),i=n(0);n(8),n(162);var o=r.a.eventActions;e["default"]=new i.a({is:"partial-dev-fire-event",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},eventType:{type:String,value:""},eventData:{type:String,value:""}},eventSelected:function(t){this.eventType=t.detail.eventType},fireEvent:function(){var t=void 0;try{t=this.eventData?JSON.parse(this.eventData):{}}catch(e){return void alert("Error parsing JSON: "+e)}o.fireEvent(this.eventType,t)},computeFormClasses:function(t){return"content fit "+(t?"":"layout horizontal")}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3);n(8);var a=r.a.configGetters,s=r.a.errorLogActions;e["default"]=new i.a({is:"partial-dev-info",behaviors:[o.a],properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},hassVersion:{type:String,bindNuclear:a.serverVersion},polymerVersion:{type:String,value:i.a.version},nuclearVersion:{type:String,value:"1.3.0"},errorLog:{type:String,value:""}},attached:function(){this.refreshErrorLog()},refreshErrorLog:function(t){var e=this;t&&t.preventDefault(),this.errorLog="Loading error log…",s.fetchErrorLog().then(function(t){e.errorLog=t||"No errors have been reported."})}})},function(t,e,n){"use strict";var r=n(1),i=n(0);n(8),n(157);var o=r.a.reactor,a=r.a.entityGetters,s=r.a.entityActions;e["default"]=new i.a({is:"partial-dev-set-state",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},entityId:{type:String,value:""},state:{type:String,value:""},stateAttributes:{type:String,value:""}},setStateData:function(t){var e=t?JSON.stringify(t,null," "):"";this.$.inputData.value=e,this.$.inputDataWrapper.update(this.$.inputData)},entitySelected:function(t){var e=o.evaluate(a.byId(t.detail.entityId));this.entityId=e.entityId,this.state=e.state,this.stateAttributes=JSON.stringify(e.attributes,null," ")},handleSetState:function(){var t=void 0;try{t=this.stateAttributes?JSON.parse(this.stateAttributes):{}}catch(e){return void alert("Error parsing JSON: "+e)}s.save({entityId:this.entityId,state:this.state,attributes:t})},computeFormClasses:function(t){return"content fit "+(t?"":"layout horizontal")}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3);n(8);var a=r.a.templateActions;e["default"]=new i.a({is:"partial-dev-template",behaviors:[o.a],properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},error:{type:Boolean,value:!1},rendering:{type:Boolean,value:!1},template:{type:String,value:'{%- if is_state("device_tracker.paulus", "home") and \n is_state("device_tracker.anne_therese", "home") -%}\n\n You are both home, you silly\n\n{%- else -%}\n\n Anne Therese is at {{ states("device_tracker.anne_therese") }} and Paulus is at {{ states("device_tracker.paulus") }}\n\n{%- endif %}\n\nFor loop example:\n\n{% for state in states.sensor -%}\n {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}\n {{ state.name | lower }} is {{state.state}} {{- state.attributes.unit_of_measurement}}\n{%- endfor -%}.',observer:"templateChanged"},processed:{type:String,value:""}},computeFormClasses:function(t){return"content fit "+(t?"":"layout horizontal")},computeRenderedClasses:function(t){return t?"error rendered":"rendered"},templateChanged:function(){this.error&&(this.error=!1),this.debounce("render-template",this.renderTemplate,500)},renderTemplate:function(){var t=this;this.rendering=!0,a.render(this.template).then(function(e){t.processed=e,t.rendering=!1},function(e){t.processed=e.message,t.error=!0,t.rendering=!1})}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3);n(8),n(60);var a=r.a.entityHistoryGetters,s=r.a.entityHistoryActions;e["default"]=new i.a({is:"partial-history",behaviors:[o.a],properties:{narrow:{type:Boolean},showMenu:{type:Boolean,value:!1},isDataLoaded:{type:Boolean,bindNuclear:a.hasDataForCurrentDate,observer:"isDataLoadedChanged"},stateHistory:{type:Object,bindNuclear:a.entityHistoryForCurrentDate},isLoadingData:{type:Boolean,bindNuclear:a.isLoadingEntityHistory},selectedDate:{type:String,value:null,bindNuclear:a.currentDate}},isDataLoadedChanged:function(t){t||this.async(function(){return s.fetchSelectedDate()},1)},handleRefreshClick:function(){s.fetchSelectedDate()},datepickerFocus:function(){this.datePicker.adjustPosition()},attached:function(){this.datePicker=new window.Pikaday({field:this.$.datePicker.inputElement,onSelect:s.changeCurrentDate})},detached:function(){this.datePicker.destroy()},computeContentClasses:function(t){return"flex content "+(t?"narrow":"wide")}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3);n(8),n(166),n(29);var a=r.a.logbookGetters,s=r.a.logbookActions;e["default"]=new i.a({is:"partial-logbook",behaviors:[o.a],properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},selectedDate:{type:String,bindNuclear:a.currentDate},isLoading:{type:Boolean,bindNuclear:a.isLoadingEntries},isStale:{type:Boolean,bindNuclear:a.isCurrentStale,observer:"isStaleChanged"},entries:{type:Array,bindNuclear:[a.currentEntries,function(t){return t.reverse().toArray()}]},datePicker:{type:Object}},isStaleChanged:function(t){var e=this;t&&this.async(function(){return s.fetchDate(e.selectedDate)},1)},handleRefresh:function(){s.fetchDate(this.selectedDate)},datepickerFocus:function(){this.datePicker.adjustPosition()},attached:function(){this.datePicker=new window.Pikaday({field:this.$.datePicker.inputElement,onSelect:s.changeCurrentDate})},detached:function(){this.datePicker.destroy()}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3);n(158);var a=r.a.configGetters,s=r.a.entityGetters;window.L.Icon.Default.imagePath="/static/images/leaflet",e["default"]=new i.a({is:"partial-map",behaviors:[o.a],properties:{locationGPS:{type:Number,bindNuclear:a.locationGPS},locationName:{type:String,bindNuclear:a.locationName},locationEntities:{type:Array,bindNuclear:[s.visibleEntityMap,function(t){return t.valueSeq().filter(function(t){return t.attributes.latitude&&"home"!==t.state}).toArray()}]},zoneEntities:{type:Array,bindNuclear:[s.entityMap,function(t){return t.valueSeq().filter(function(t){return"zone"===t.domain&&!t.attributes.passive}).toArray()}]},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1}},attached:function(){var t=this;(window.L.Browser.mobileWebkit||window.L.Browser.webkit)&&this.async(function(){var e=t.$.map,n=e.style.display;e.style.display="none",t.async(function(){e.style.display=n},1)},1)},computeMenuButtonClass:function(t,e){return!t&&e?"invisible":""},toggleMenu:function(){this.fire("open-menu")}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3),a=r.a.notificationGetters;e["default"]=new i.a({is:"notification-manager",behaviors:[o.a],properties:{neg:{type:Boolean,value:!1},text:{type:String,bindNuclear:a.lastNotificationMessage,observer:"showNotification"}},showNotification:function(t){t&&this.$.toast.show()}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=r.a.serviceActions;e["default"]=new i.a({is:"more-info-alarm_control_panel",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})},properties:{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(t,e){var n=new RegExp(e);return null===e?!0:n.test(t)},stateObjChanged:function(t){var e=this;t&&(this.codeFormat=t.attributes.code_format,this.codeInputVisible=null!==this.codeFormat,this.codeInputEnabled="armed_home"===t.state||"armed_away"===t.state||"disarmed"===t.state||"pending"===t.state||"triggered"===t.state,this.disarmButtonVisible="armed_home"===t.state||"armed_away"===t.state||"pending"===t.state||"triggered"===t.state,this.armHomeButtonVisible="disarmed"===t.state,this.armAwayButtonVisible="disarmed"===t.state),this.async(function(){return e.fire("iron-resize")},500)},callService:function(t,e){var n=e||{};n.entity_id=this.stateObj.entityId,o.callService("alarm_control_panel",t,n)}})},function(t,e,n){"use strict";var r=n(0);e["default"]=new r.a({is:"more-info-camera",properties:{stateObj:{type:Object}},imageLoaded:function(){this.fire("iron-resize")},computeCameraImageUrl:function(t){return"/demo/webcam.jpg"}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3);n(29);var a=r.a.streamGetters,s=r.a.syncActions,u=r.a.serviceActions;e["default"]=new i.a({is:"more-info-configurator",behaviors:[o.a],properties:{stateObj:{type:Object},action:{type:String,value:"display"},isStreaming:{type:Boolean,bindNuclear:a.isStreamingEvents},isConfigurable:{type:Boolean,computed:"computeIsConfigurable(stateObj)"},isConfiguring:{type:Boolean,value:!1},submitCaption:{type:String,computed:"computeSubmitCaption(stateObj)"},fieldInput:{type:Object,value:{}}},computeIsConfigurable:function(t){return"configure"===t.state},computeSubmitCaption:function(t){return t.attributes.submit_caption||"Set configuration"},fieldChanged:function(t){var e=t.target;this.fieldInput[e.id]=e.value},submitClicked:function(){var t=this;this.isConfiguring=!0;var e={configure_id:this.stateObj.attributes.configure_id,fields:this.fieldInput};u.callService("configurator","configure",e).then(function(){t.isConfiguring=!1,t.isStreaming||s.fetchAll()},function(){t.isConfiguring=!1})}})},function(t,e,n){"use strict";var r=n(0),i=n(34),o=n(213);n(190),n(191),n(196),n(188),n(197),n(195),n(192),n(194),n(187),n(198),n(186),n(193),e["default"]=new r.a({is:"more-info-content",properties:{stateObj:{type:Object,observer:"stateObjChanged"}},stateObjChanged:function(t){t&&i.a.bind()(this,"MORE-INFO-"+o.a.bind()(t).toUpperCase(),{stateObj:t})}})},function(t,e,n){"use strict";var r=n(0),i=["entity_picture","friendly_name","icon","unit_of_measurement"];e["default"]=new r.a({is:"more-info-default",properties:{stateObj:{type:Object}},computeDisplayAttributes:function(t){return t?Object.keys(t.attributes).filter(function(t){return-1===i.indexOf(t)}):[]},getAttributeValue:function(t,e){var n=t.attributes[e];return Array.isArray(n)?n.join(", "):n}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(3);n(30);var a=r.a.entityGetters,s=r.a.moreInfoGetters;e["default"]=new i.a({is:"more-info-group",behaviors:[o.a],properties:{stateObj:{type:Object},states:{type:Array,bindNuclear:[s.currentEntity,a.entityMap,function(t,e){return t?t.attributes.entity_id.map(e.get.bind(e)):[]}]}}})},function(t,e,n){"use strict";function r(t,e){s.callService("light","turn_on",{entity_id:t,rgb_color:[e.r,e.g,e.b]})}var i=n(1),o=n(0),a=n(31);n(164);var s=i.a.serviceActions,u=["brightness","rgb_color","color_temp"];e["default"]=new o.a({is:"more-info-light",properties:{stateObj:{type:Object,observer:"stateObjChanged"},brightnessSliderValue:{type:Number,value:0},ctSliderValue:{type:Number,value:0}},stateObjChanged:function(t){var e=this;t&&"on"===t.state&&(this.brightnessSliderValue=t.attributes.brightness,this.ctSliderValue=t.attributes.color_temp),this.async(function(){return e.fire("iron-resize")},500)},computeClassNames:function(t){return a.a.bind()(t,u)},brightnessSliderChanged:function(t){var e=parseInt(t.target.value,10);isNaN(e)||(0===e?s.callTurnOff(this.stateObj.entityId):s.callService("light","turn_on",{entity_id:this.stateObj.entityId,brightness:e}))},ctSliderChanged:function(t){var e=parseInt(t.target.value,10);isNaN(e)||s.callService("light","turn_on",{entity_id:this.stateObj.entityId,color_temp:e})},colorPicked:function(t){var e=this;return this.skipColorPicked?void(this.colorChanged=!0):(this.color=t.detail.rgb,r(this.stateObj.entityId,this.color),this.colorChanged=!1,this.skipColorPicked=!0,void(this.colorDebounce=setTimeout(function(){e.colorChanged&&r(e.stateObj.entityId,e.color),e.skipColorPicked=!1},500)))}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=r.a.serviceActions;e["default"]=new i.a({is:"more-info-lock",properties:{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(t){var e=this;t&&(this.isLocked="locked"===t.state),this.async(function(){return e.fire("iron-resize")},500)},callService:function(t,e){var n=e||{};n.entity_id=this.stateObj.entityId,o.callService("lock",t,n)}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(31),a=r.a.serviceActions,s=["volume_level"];e["default"]=new i.a({is:"more-info-media_player",properties:{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},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},supportsVolumeButtons:{type:Boolean,value:!1},supportsSelectSource:{type:Boolean,value:!1},hasMediaControl:{type:Boolean,value:!1}},stateObjChanged:function(t){var e=this;if(t){var n=["playing","paused","unknown"];this.isOff="off"===t.state,this.isPlaying="playing"===t.state,this.hasMediaControl=-1!==n.indexOf(t.state),this.volumeSliderValue=100*t.attributes.volume_level,this.isMuted=t.attributes.is_volume_muted,this.source=t.attributes.source,this.sourceIndex=0,this.supportsPause=0!==(1&t.attributes.supported_media_commands),this.supportsVolumeSet=0!==(4&t.attributes.supported_media_commands),this.supportsVolumeMute=0!==(8&t.attributes.supported_media_commands),this.supportsPreviousTrack=0!==(16&t.attributes.supported_media_commands),this.supportsNextTrack=0!==(32&t.attributes.supported_media_commands),this.supportsTurnOn=0!==(128&t.attributes.supported_media_commands),this.supportsTurnOff=0!==(256&t.attributes.supported_media_commands),this.supportsVolumeButtons=0!==(1024&t.attributes.supported_media_commands),this.supportsSelectSource=0!==(2048&t.attributes.supported_media_commands),void 0!==t.attributes.source_list&&(this.sourceIndex=t.attributes.source_list.indexOf(this.source))}this.async(function(){return e.fire("iron-resize")},500)},computeClassNames:function(t){return o.a.bind()(t,s)},computeIsOff:function(t){return"off"===t.state},computeMuteVolumeIcon:function(t){return t?"mdi:volume-off":"mdi:volume-high"},computeHideVolumeButtons:function(t,e){return!e||t},computeShowPlaybackControls:function(t,e){return!t&&e},computePlaybackControlIcon:function(){return this.isPlaying?this.supportsPause?"mdi:pause":"mdi:stop":"mdi:play"},computeHidePowerButton:function(t,e,n){return t?!e:!n},computeSelectedSource:function(t){return t.attributes.source_list.indexOf(t.attributes.source)},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(t){if(!(!this.stateObj||void 0===this.stateObj.attributes.source_list||0>t||t>=this.stateObj.attributes.source_list.length)){var e=this.stateObj.attributes.source_list[t];e!==this.stateObj.attributes.source&&this.callService("select_source",{source:e})}},handleVolumeTap:function(){this.supportsVolumeMute&&this.callService("volume_mute",{is_volume_muted:!this.isMuted})},handleVolumeUp:function(){var t=this.$.volumeUp;this.handleVolumeWorker("volume_up",t,!0)},handleVolumeDown:function(){var t=this.$.volumeDown;this.handleVolumeWorker("volume_down",t,!0)},handleVolumeWorker:function(t,e,n){var r=this;(n||void 0!==e&&e.pointerDown)&&(this.callService(t),this.async(function(){return r.handleVolumeWorker(t,e,!1)},500))},volumeSliderChanged:function(t){var e=parseFloat(t.target.value),n=e>0?e/100:0;this.callService("volume_set",{volume_level:n})},callService:function(t,e){var n=e||{};n.entity_id=this.stateObj.entityId,a.callService("media_player",t,n)}})},function(t,e,n){"use strict";var r=n(0);e["default"]=new r.a({is:"more-info-script",properties:{stateObj:{type:Object}}})},function(t,e,n){"use strict";var r=n(0),i=n(1),o=n(63),a=i.a.util.parseDateTime;e["default"]=new r.a({is:"more-info-sun",properties:{stateObj:{type:Object},risingDate:{type:Object,computed:"computeRising(stateObj)"},settingDate:{type:Object,computed:"computeSetting(stateObj)"}},computeRising:function(t){return a(t.attributes.next_rising)},computeSetting:function(t){return a(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 o.a.bind()(this.itemDate(t))}})},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(31),a=r.a.serviceActions,s=["away_mode"];e["default"]=new i.a({is:"more-info-thermostat",properties:{stateObj:{type:Object,observer:"stateObjChanged"},tempMin:{type:Number},tempMax:{type:Number},targetTemperatureSliderValue:{type:Number},awayToggleChecked:{type:Boolean}},stateObjChanged:function(t){this.targetTemperatureSliderValue=t.attributes.temperature,this.awayToggleChecked="on"===t.attributes.away_mode,this.tempMin=t.attributes.min_temp,this.tempMax=t.attributes.max_temp},computeClassNames:function(t){return o.a.bind()(t,s)},targetTemperatureSliderChanged:function(t){a.callService("thermostat","set_temperature",{entity_id:this.stateObj.entityId,temperature:t.target.value})},toggleChanged:function(t){var e=t.target.checked;e&&"off"===this.stateObj.attributes.away_mode?this.service_set_away(!0):e||"on"!==this.stateObj.attributes.away_mode||this.service_set_away(!1)},service_set_away:function(t){var e=this;a.callService("thermostat","set_away_mode",{away_mode:t,entity_id:this.stateObj.entityId}).then(function(){return e.stateObjChanged(e.stateObj)})}})},function(t,e,n){"use strict";var r=n(0);e["default"]=new r.a({is:"more-info-updater",properties:{}})},,function(t,e,n){"use strict";var r=n(0);n(6),n(61),e["default"]=new r.a({is:"state-card-configurator",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}}})},function(t,e,n){"use strict";var r=n(1),i=n(0);n(6);var o=r.a.serviceActions;e["default"]=new i.a({is:"state-card-input_select",properties:{detailed:{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&&o.callService("input_select","select_option",{option:t,entity_id:this.stateObj.entityId})},stopPropagation:function(t){t.stopPropagation()}})},function(t,e,n){"use strict";var r=n(1),i=n(0);n(6);var o=r.a.serviceActions;e["default"]=new i.a({is:"state-card-input_slider",properties:{detailed:{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)&&o.callService("input_slider","select_value",{value:this.value,entity_id:this.stateObj.entityId})}})},function(t,e,n){"use strict";var r=n(0);n(6);var i=["playing","paused"];e["default"]=new r.a({is:"state-card-media_player",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object},isPlaying:{type:Boolean,computed:"computeIsPlaying(stateObj)"},secondaryText:{type:String,computed:"computeSecondaryText(stateObj)"}},computeIsPlaying:function(t){return-1!==i.indexOf(t.state)},computePrimaryText:function(t,e){return e?t.attributes.media_title:t.stateDisplay},computeSecondaryText:function(t){var e=void 0;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:""}})},function(t,e,n){"use strict";var r=n(1),i=n(0);n(6);var o=r.a.serviceActions;e["default"]=new i.a({is:"state-card-rollershutter",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object}},computeIsFullyOpen:function(t){return 100===t.attributes.current_position},computeIsFullyClosed:function(t){return 0===t.attributes.current_position},onMoveUpTap:function(){o.callService("rollershutter","move_up",{entity_id:this.stateObj.entityId})},onMoveDownTap:function(){o.callService("rollershutter","move_down",{entity_id:this.stateObj.entityId})},onStopTap:function(){o.callService("rollershutter","stop",{entity_id:this.stateObj.entityId})}})},function(t,e,n){"use strict";var r=n(0),i=n(1);n(6);var o=i.a.serviceActions;e["default"]=new r.a({is:"state-card-scene",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object}},activateScene:function(t){t.stopPropagation(),o.callTurnOn(this.stateObj.entityId)}})},function(t,e,n){"use strict";var r=n(0),i=n(1);n(6),n(27);var o=i.a.serviceActions;e["default"]=new r.a({is:"state-card-script",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object}},fireScript:function(t){t.stopPropagation(),o.callTurnOn(this.stateObj.entityId)}})},function(t,e,n){"use strict";var r=n(0);n(6),e["default"]=new r.a({is:"state-card-thermostat",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object}},computeTargetTemperature:function(t){return t.attributes.temperature+" "+t.attributes.unit_of_measurement}})},function(t,e,n){"use strict";var r=n(0);n(6),n(27),e["default"]=new r.a({is:"state-card-toggle",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object}}})},function(t,e,n){"use strict";var r=n(0);n(6),e["default"]=new r.a({is:"state-card-weblink",properties:{detailed:{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")}})},function(t,e,n){"use strict";function r(t){return{attached:function(){var e=this;this.nuclearUnwatchFns=Object.keys(this.properties).reduce(function(n,r){if(!("bindNuclear"in e.properties[r]))return n;var i=e.properties[r].bindNuclear;if(!i)throw new Error("Undefined getter specified for key "+r);return e[r]=t.evaluate(i),n.concat(t.observe(i,function(t){e[r]=t}))},[])},detached:function(){for(;this.nuclearUnwatchFns.length;)this.nuclearUnwatchFns.shift()()}}}e.a=r},function(t,e,n){"use strict";e.a=["off","closed","unlocked"]},function(t,e,n){"use strict";function r(t){return"unavailable"===t.state?"display":-1!==o.indexOf(t.domain)?t.domain:i.a.bind()(t.entityId)?"toggle":"display"}var i=n(32);e.a=r;var o=["configurator","input_select","input_slider","media_player","rollershutter","scene","script","thermostat","weblink"]},function(t,e,n){"use strict";function r(t){return-1!==i.indexOf(t.domain)?t.domain:"default"}e.a=r;var i=["light","group","sun","configurator","thermostat","script","media_player","camera","updater","alarm_control_panel","lock"]},function(t,e,n){var r,i;!function(){"use strict";function n(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r))t.push(n.apply(null,r));else if("object"===i)for(var a in r)o.call(r,a)&&r[a]&&t.push(a);
}}return t.join(" ")}var o={}.hasOwnProperty;"undefined"!=typeof t&&t.exports?t.exports=n:(r=[],i=function(){return n}.apply(e,r),!(void 0!==i&&(t.exports=i)))}()},function(t,e,n){(function(t,r,i){var o;(function(){"use strict";function a(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return"function"==typeof t}function u(t){q=t}function c(t){Z=t}function l(){return function(){t.nextTick(v)}}function f(){return function(){W(v)}}function d(){var t=0,e=new tt(v),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function h(){var t=new MessageChannel;return t.port1.onmessage=v,function(){t.port2.postMessage(0)}}function p(){return function(){setTimeout(v,1)}}function v(){for(var t=0;$>t;t+=2){var e=rt[t],n=rt[t+1];e(n),rt[t]=void 0,rt[t+1]=void 0}$=0}function _(){try{var t=n(238);return W=t.runOnLoop||t.runOnContext,f()}catch(e){return p()}}function m(t,e){var n=this,r=n._state;if(r===st&&!t||r===ut&&!e)return this;var i=new this.constructor(g),o=n._result;if(r){var a=arguments[r-1];Z(function(){x(r,i,a,o)})}else j(n,i,t,e);return i}function y(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(g);return D(n,t),n}function g(){}function b(){return new TypeError("You cannot resolve a promise with itself")}function S(){return new TypeError("A promises callback cannot return that same promise.")}function w(t){try{return t.then}catch(e){return ct.error=e,ct}}function O(t,e,n,r){try{t.call(e,n,r)}catch(i){return i}}function T(t,e,n){Z(function(t){var r=!1,i=O(n,e,function(n){r||(r=!0,e!==n?D(t,n):C(t,n))},function(e){r||(r=!0,M(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&i&&(r=!0,M(t,i))},t)}function I(t,e){e._state===st?C(t,e._result):e._state===ut?M(t,e._result):j(e,void 0,function(e){D(t,e)},function(e){M(t,e)})}function E(t,e,n){e.constructor===t.constructor&&n===it&&constructor.resolve===ot?I(t,e):n===ct?M(t,ct.error):void 0===n?C(t,e):s(n)?T(t,e,n):C(t,e)}function D(t,e){t===e?M(t,b()):a(e)?E(t,e,w(e)):C(t,e)}function k(t){t._onerror&&t._onerror(t._result),P(t)}function C(t,e){t._state===at&&(t._result=e,t._state=st,0!==t._subscribers.length&&Z(P,t))}function M(t,e){t._state===at&&(t._state=ut,t._result=e,Z(k,t))}function j(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+st]=n,i[o+ut]=r,0===o&&t._state&&Z(P,t)}function P(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,i,o=t._result,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?x(n,r,i,o):i(o);t._subscribers.length=0}}function A(){this.error=null}function L(t,e){try{return t(e)}catch(n){return lt.error=n,lt}}function x(t,e,n,r){var i,o,a,u,c=s(n);if(c){if(i=L(n,r),i===lt?(u=!0,o=i.error,i=null):a=!0,e===i)return void M(e,S())}else i=r,a=!0;e._state!==at||(c&&a?D(e,i):u?M(e,o):t===st?C(e,i):t===ut&&M(e,i))}function R(t,e){try{e(function(e){D(t,e)},function(e){M(t,e)})}catch(n){M(t,n)}}function N(t){return new _t(this,t).promise}function H(t){function e(t){D(i,t)}function n(t){M(i,t)}var r=this,i=new r(g);if(!J(t))return M(i,new TypeError("You must pass an array to race.")),i;for(var o=t.length,a=0;i._state===at&&o>a;a++)j(r.resolve(t[a]),void 0,e,n);return i}function z(t){var e=this,n=new e(g);return M(n,t),n}function Y(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function U(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function V(t){this._id=pt++,this._state=void 0,this._result=void 0,this._subscribers=[],g!==t&&("function"!=typeof t&&Y(),this instanceof V?R(this,t):U())}function B(t,e){this._instanceConstructor=t,this.promise=new t(g),Array.isArray(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?C(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&C(this.promise,this._result))):M(this.promise,this._validationError())}function G(){var t;if("undefined"!=typeof r)t=r;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;n&&"[object Promise]"===Object.prototype.toString.call(n.resolve())&&!n.cast||(t.Promise=vt)}var F;F=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var W,q,K,J=F,$=0,Z=function(t,e){rt[$]=t,rt[$+1]=e,$+=2,2===$&&(q?q(v):K())},X="undefined"!=typeof window?window:void 0,Q=X||{},tt=Q.MutationObserver||Q.WebKitMutationObserver,et="undefined"!=typeof t&&"[object process]"==={}.toString.call(t),nt="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,rt=new Array(1e3);K=et?l():tt?d():nt?h():void 0===X?_():p();var it=m,ot=y,at=void 0,st=1,ut=2,ct=new A,lt=new A,ft=N,dt=H,ht=z,pt=0,vt=V;V.all=ft,V.race=dt,V.resolve=ot,V.reject=ht,V._setScheduler=u,V._setAsap=c,V._asap=Z,V.prototype={constructor:V,then:it,"catch":function(t){return this.then(null,t)}};var _t=B;B.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},B.prototype._enumerate=function(){for(var t=this.length,e=this._input,n=0;this._state===at&&t>n;n++)this._eachEntry(e[n],n)},B.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===ot){var i=w(t);if(i===it&&t._state!==at)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===vt){var o=new n(g);E(o,t,i),this._willSettleAt(o,e)}else this._willSettleAt(new n(function(e){e(t)}),e)}else this._willSettleAt(r(t),e)},B.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===at&&(this._remaining--,t===ut?M(r,n):this._result[e]=n),0===this._remaining&&C(r,this._result)},B.prototype._willSettleAt=function(t,e){var n=this;j(t,void 0,function(t){n._settledAt(st,e,t)},function(t){n._settledAt(ut,e,t)})};var mt=G,yt={Promise:vt,polyfill:mt};n(236).amd?(o=function(){return yt}.call(e,n,e,i),!(void 0!==o&&(i.exports=o))):"undefined"!=typeof i&&i.exports?i.exports=yt:"undefined"!=typeof this&&(this.ES6Promise=yt),mt()}).call(this)}).call(e,n(235),n(237),n(70)(t))},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){function n(t){return!!t&&"object"==typeof t}t.exports=n},function(t,e,n){function r(t){return"symbol"==typeof t||i(t)&&s.call(t)==o}var i=n(217),o="[object Symbol]",a=Object.prototype,s=a.toString;t.exports=r},function(t,e){var n=Date.now;t.exports=n},function(t,e,n){function r(t){if("number"==typeof t)return t;if(a(t))return s;if(o(t)){var e=i(t.valueOf)?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(u,"");var n=l.test(t);return n||f.test(t)?d(t.slice(2),n?2:8):c.test(t)?s:+t}var i=n(67),o=n(35),a=n(218),s=NaN,u=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,f=/^0o[0-7]+$/i,d=parseInt;t.exports=r},function(t,e){function n(t){return function(e){return null==e?void 0:e[t]}}t.exports=n},function(t,e){function n(t,e,n,o){for(var a=-1,s=i(r((e-t)/(n||1)),0),u=Array(s);s--;)u[o?s:++a]=t,t+=n;return u}var r=Math.ceil,i=Math.max;t.exports=n},function(t,e,n){function r(t){return function(e,n,r){return r&&"number"!=typeof r&&o(e,n,r)&&(n=r=void 0),e=a(e),e=e===e?e:0,void 0===n?(n=e,e=0):n=a(n)||0,r=void 0===r?n>e?1:-1:a(r)||0,i(e,n,r,t)}}var i=n(222),o=n(226),a=n(233);t.exports=r},function(t,e,n){var r=n(221),i=r("length");t.exports=i},function(t,e){function n(t,e){return e=null==e?r:e,!!e&&("number"==typeof t||i.test(t))&&t>-1&&t%1==0&&e>t}var r=9007199254740991,i=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,e,n){function r(t,e,n){if(!s(n))return!1;var r=typeof e;return("number"==r?o(n)&&a(e,n.length):"string"==r&&e in n)?i(n[e],t):!1}var i=n(227),o=n(228),a=n(225),s=n(37);t.exports=r},function(t,e){function n(t,e){return t===e||t!==t&&e!==e}t.exports=n},function(t,e,n){function r(t){return null!=t&&a(i(t))&&!o(t)}var i=n(224),o=n(68),a=n(229);t.exports=r},function(t,e){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&r>=t}var r=9007199254740991;t.exports=n},function(t,e){function n(t){return!!t&&"object"==typeof t}t.exports=n},function(t,e,n){function r(t){return"symbol"==typeof t||i(t)&&s.call(t)==o}var i=n(230),o="[object Symbol]",a=Object.prototype,s=a.toString;t.exports=r},function(t,e,n){var r=n(223),i=r();t.exports=i},function(t,e,n){function r(t){if("number"==typeof t)return t;if(a(t))return s;if(o(t)){var e=i(t.valueOf)?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(u,"");var n=l.test(t);return n||f.test(t)?d(t.slice(2),n?2:8):c.test(t)?s:+t}var i=n(68),o=n(37),a=n(231),s=NaN,u=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,f=/^0o[0-7]+$/i,d=parseInt;t.exports=r},function(t,e){function n(t){throw new Error("Cannot find module '"+t+"'.")}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id=234},function(t,e){function n(){c=!1,a.length?u=a.concat(u):l=-1,u.length&&r()}function r(){if(!c){var t=setTimeout(n);c=!0;for(var e=u.length;e;){for(a=u,u=[];++l<e;)a&&a[l].run();l=-1,e=u.length}a=null,c=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var a,s=t.exports={},u=[],c=!1,l=-1;s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new i(t,e)),1!==u.length||c||setTimeout(r,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=o,s.addListener=o,s.once=o,s.off=o,s.removeListener=o,s.removeAllListeners=o,s.emit=o,s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(r){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){}])</script></body></html>