text: console.warn("This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead"),console.warn("This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead"),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||{},i=location.search.slice(1).split("&"),n=0;n<i.length&&(e=i[n]);n++)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 i=t(e);e=i.prototype;var n={prototype:e};return e["extends"]&&(n["extends"]=e["extends"]),Polymer.telemetry._registrate(e),document.registerElement(e.is,n),i};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 i in e)Polymer[i]=e[i];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,i){this._watchNextRender(),this._afterNextRenderQueue.push([e,t,i])},_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,i=0;i<e.length;i++)t=e[i],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(t){t.__hasRegisterFinished!==t.is&&(t.__hasRegisterFinished=t.is,t._finishRegisterFeatures&&t._finishRegisterFeatures(),t._doBehavior("registered"),e.usePolyfillProto&&t!==this&&t.extend(this,t))},attachedCallback:function(){var e=this;Polymer.RenderStatus.whenReady(function(){e.isAttached=!0,e._doBehavior("attached")})},detachedCallback:function(){var e=this;Polymer.RenderStatus.whenReady(function(){e.isAttached=!1,e._doBehavior("detached")})},attributeChangedCallback:function(e,t,i){this._attributeChangedImpl(e),this._doBehavior("attributeChanged",[e,t,i])},_attributeChangedImpl:function(e){this._setAttributeToProperty(this,e)},extend:function(e,t){if(e&&t)for(var i,n=Object.getOwnPropertyNames(t),r=0;r<n.length&&(i=n[r]);r++)this.copyOwnProperty(i,t,e);return e||t},mixin:function(e,t){for(var i in t)e[i]=t[i];return e},copyOwnProperty:function(e,t,i){var n=Object.getOwnPropertyDescriptor(t,e);n&&Object.defineProperty(i,e,n)},_logger:function(e,t){switch(1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":console[e].apply(console,t)}},_log:function(){var e=Array.prototype.slice.call(arguments,0);this._logger("log",e)},_warn:function(){var e=Array.prototype.slice.call(arguments,0);this._logger("warn",e)},_error:function(){var e=Array.prototype.slice.call(arguments,0);this._logger("error",e)},_logf:function(){return this._logPrefix.concat(this.is).concat(Array.prototype.slice.call(arguments,0))}},Polymer.Base._logPrefix=function(){var e=window.chrome&&!/edge/i.test(navigator.userAgent)||/firefox/i.test(navigator.userAgent);return e?["%c[%s::%s]:","font-weight: bold; background-color:#EEEE00;"]:["[%s::%s]:"]}(),Polymer.Base.chainObject=function(e,t){return e&&t&&e!==t&&(Object.__proto__||(e=Polymer.Base.extend(Object.create(t),e)),e.__proto__=t),e},Polymer.Base=Polymer.Base.chainObject(Polymer.Base,HTMLElement.prototype),window.CustomElements?Polymer["instanceof"]=CustomElements["instanceof"]:Polymer["instanceof"]=function(e,t){return e instanceof t},Polymer.isInstance=function(e){return Boolean(e&&e.__isPolymerInstance__)},Polymer.telemetry.instanceCount=0}(),function(){function e(){if(o)for(var e,t=document._currentScript||document.currentScript,i=t&&t.ownerDocument||document,n=i.querySelectorAll("dom-module"),r=n.length-1;r>=0&&(e=n[r]);r--){if(e.__upgraded__)return;CustomElements.upgrade(e)}}var t={},i={},n=function(e){return t[e]||i[e.toLowerCase()]},r=function(){return document.createElement("dom-module")};r.prototype=Object.create(HTMLElement.prototype),Polymer.Base.extend(r.prototype,{constructor:r,createdCallback:function(){this.register()},register:function(e){e=e||this.id||this.getAttribute("name")||this.getAttribute("is"),e&&(this.id=e,t[e]=this,i[e.toLowerCase()]=this)},"import":function(t,i){if(t){var r=n(t);return r||(e(),r=n(t)),r&&i&&(r=r.querySelector(i)),r}}});var o=window.CustomElements&&!CustomElements.useNative;document.registerElement("dom-module",r)}(),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 i=e.length-1;i>=0;i--){var n=e[i];t.indexOf(n)===-1&&(this._mixinBehavior(n),t.unshift(n))}return t},_flattenBehaviorsList:function(e){for(var t=[],i=0;i<e.length;i++){var n=e[i];n instanceof Array?t=t.concat(this._flattenBehaviorsList(n)):n?t.push(n):this._warn(this._logf("_flattenBehaviorsList","behavior is null, check for missing or 404 import"))}return t},_mixinBehavior:function(e){for(var t,i=Object.getOwnPropertyNames(e),n=0;n<i.length&&(t=i[n]);n++)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,i=e.length;t<i;t++)this._prepBehavior(e[t]);this._prepBehavior(this)},_doBehavior:function(e,t){for(var i=0;i<this.behaviors.length;i++)this._invokeBehavior(this.behaviors[i],e,t);this._invokeBehavior(this,e,t)},_invokeBehavior:function(e,t,i){var n=e[t];n&&n.apply(this,i||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 i=this.getNativePrototype(e);t=this.extend(Object.create(i),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 i=0;i<this.behaviors.length;i++)if(t=this._getPropertyInfo(e,this.behaviors[i].properties))return t;return t||Polymer.nob},_getPropertyInfo:function(e,t){var i=t&&t[e];return"function"==typeof i&&(i=t[e]={type:i}),i&&(i.defined=!0),i},_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 i,n;for(var r in t)i=e[r],n=t[r],("_"!==r[0]||n.readOnly)&&(e[r]?(i.type||(i.type=n.type),i.readOnly||(i.readOnly=n.readOnly)):e[r]={type:"function"==typeof n?n:n.type,readOnly:n.readOnly,attribute:Polymer.CaseMap.camelToDashCase(r)})}}}),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 i in t)if(!this.hasAttribute(i)&&"class"!==i){var n=t[i];this.serializeValueToAttribute(n,i,this)}},_marshalAttributes:function(){this._takeAttributesToModel(this)},_takeAttributesToModel:function(e){if(this.hasAttributes())for(var t in this._propertyInfo){var i=this._propertyInfo[t];this.hasAttribute(i.attribute)&&this._setAttributeToProperty(e,i.attribute,t,i)}},_setAttributeToProperty:function(e,t,i,n){if(!this._serializing&&(i=i||Polymer.CaseMap.dashToCamelCase(t),n=n||this._propertyInfo&&this._propertyInfo[i],n&&!n.readOnly)){var r=this.getAttribute(t);e[i]=this.deserialize(r,n.type)}},_serializing:!1,reflectPropertyToAttribute:function(e,t,i){this._serializing=!0,i=void 0===i?this[e]:i,this.serializeValueToAttribute(i,t||Polymer.CaseMap.camelToDashCase(e)),this._serializing=!1},serializeValueToAttribute:function(e,t,i){var n=this.serialize(e);i=i||this,void 0===n?i.removeAttribute(t):i.setAttribute(t,n)},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(i){}break;case Array:try{e=JSON.parse(e)}catch(i){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.5.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()}}),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,i=0,n=e.length;i<n&&(t=e[i]);i++)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,i){return{index:e,removed:t,addedCount:i}}function t(){}var i=0,n=1,r=2,o=3;return t.prototype={calcEditDistances:function(e,t,i,n,r,o){for(var s=o-r+1,a=i-t+1,l=new Array(s),h=0;h<s;h++)l[h]=new Array(a),l[h][0]=h;for(var c=0;c<a;c++)l[0][c]=c;for(h=1;h<s;h++)for(c=1;c<a;c++)if(this.equals(e[t+c-1],n[r+h-1]))l[h][c]=l[h-1][c-1];else{var u=l[h-1][c]+1,d=l[h][c-1]+1;l[h][c]=u<d?u:d}return l},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,s=e[0].length-1,a=e[t][s],l=[];t>0||s>0;)if(0!=t)if(0!=s){var h,c=e[t-1][s-1],u=e[t-1][s],d=e[t][s-1];h=u<d?u<c?u:c:d<c?d:c,h==c?(c==a?l.push(i):(l.push(n),a=c),t--,s--):h==u?(l.push(o),t--,a=u):(l.push(r),s--,a=d)}else l.push(o),t--;else l.push(r),s--;return l.reverse(),l},calcSplices:function(t,s,a,l,h,c){var u=0,d=0,f=Math.min(a-s,c-h);if(0==s&&0==h&&(u=this.sharedPrefix(t,l,f)),a==t.length&&c==l.length&&(d=this.sharedSuffix(t,l,f-u)),s+=u,h+=u,a-=d,c-=d,a-s==0&&c-h==0)return[];if(s==a){for(var p=e(s,[],0);h<c;)p.removed.push(l[h++]);return[p]}if(h==c)return[e(s,[],a-s)];var _=this.spliceOperationsFromEditDistances(this.calcEditDistances(t,s,a,l,h,c));p=void 0;for(var m=[],y=s,v=h,g=0;g<_.length;g++)switch(_[g]){case i:p&&(m.push(p),p=void 0),y++,v++;break;case n:p||(p=e(y,[],0)),p.addedCount++,y++,p.removed.push(l[v]),v++;break;case r:p||(p=e(y,[],0)),p.addedCount++,y++;break;case o:p||(p=e(y,[],0)),p.removed.push(l[v]),v++}return p&&m.push(p),m},sharedPrefix:function(e,t,i){for(var n=0;n<i;n++)if(!this.equals(e[n],t[n]))return n;return i},sharedSuffix:function(e,t,i){for(var n=e.length,r=t.length,o=0;o<i&&this.equals(e[--n],t[--r]);)o++;return o},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(s,e)}function i(t){return t.replace(a,e)}function n(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=!0;return t}function r(e,n,r){switch(e.nodeType){case Node.ELEMENT_NODE:for(var s,a=e.localName,c="<"+a,u=e.attributes,d=0;s=u[d];d++)c+=" "+s.name+'="'+t(s.value)+'"';return c+=">",l[a]?c:c+o(e,r)+"</"+a+">";case Node.TEXT_NODE:var f=e.data;return n&&h[n.localName]?f:i(f);case Node.COMMENT_NODE:return"<!--"+e.data+"-->";default:throw console.error(e),new Error("not implemented")}}function o(e,t){e instanceof HTMLTemplateElement&&(e=e.content);for(var i,n="",o=Polymer.dom(e).childNodes,s=0,a=o.length;s<a&&(i=o[s]);s++)n+=r(i,e,t);return n}var s=/[&\u00A0"]/g,a=/[&\u00A0<>]/g,l=n(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),h=n(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);return{getInnerHTML:o}}(),function(){"use strict";var e=Element.prototype.insertBefore,t=Element.prototype.appendChild,i=Element.prototype.removeChild;Polymer.TreeApi={arrayCopyChildNodes:function(e){for(var t=[],i=0,n=e.firstChild;n;n=n.nextSibling)t[i++]=n;return t},arrayCopyChildren:function(e){for(var t=[],i=0,n=e.firstElementChild;n;n=n.nextElementSibling)t[i++]=n;return t},arrayCopy:function(e){for(var t=e.length,i=new Array(t),n=0;n<t;n++)i[n]=e[n];return i}},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,i){if(t.__dom.childNodes=null,e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var n=e.firstChild;n;n=n.nextSibling)this._linkNode(n,t,i);else this._linkNode(e,t,i)},_linkNode:function(e,t,i){e.__dom=e.__dom||{},t.__dom=t.__dom||{},i&&(i.__dom=i.__dom||{}),e.__dom.previousSibling=i?i.__dom.previousSibling:t.__dom.lastChild,e.__dom.previousSibling&&(e.__dom.previousSibling.__dom.nextSibling=e),e.__dom.nextSibling=i,e.__dom.nextSibling&&(e.__dom.nextSibling.__dom.previousSibling=e),e.__dom.parentNode=t,i?i===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 i=e.__dom.previousSibling,n=e.__dom.nextSibling;i&&(i.__dom.nextSibling=n),n&&(n.__dom.previousSibling=i),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,i,n){return e.call(t,i,n||null)},appendChild:function(e,i){return t.call(e,i)},removeChild:function(e,t){return i.call(e,t)}}}(),Polymer.DomApi=function(){"use strict";var e=Polymer.Settings,t=Polymer.TreeApi,i=function(e){this.node=n?i.wrap(e):e},n=e.hasShadow&&!e.nativeShadow;i.wrap=window.wrap?window.wrap:function(e){return e},i.prototype={flush:function(){Polymer.dom.flush()},deepContains:function(e){if(this.node.contains(e))return!0;for(var t=e,i=e.ownerDocument;t&&t!==i&&t!==this.node;)t=Polymer.dom(t).parentNode||t.host;return t===this.node},queryDistributedElements:function(e){for(var t,n=this.getEffectiveChildNodes(),r=[],o=0,s=n.length;o<s&&(t=n[o]);o++)t.nodeType===Node.ELEMENT_NODE&&i.matchesSelector.call(t,e)&&r.push(t);return r},getEffectiveChildNodes:function(){for(var e,t=[],i=this.childNodes,n=0,s=i.length;n<s&&(e=i[n]);n++)if(e.localName===r)for(var a=o(e).getDistributedNodes(),l=0;l<a.length;l++)t.push(a[l]);else t.push(e);return t},observeNodes:function(e){if(e)return this.observer||(this.observer=this.node.localName===r?new i.DistributedNodesObserver(this):new i.EffectiveNodesObserver(this)),this.observer.addListener(e)},unobserveNodes:function(e){this.observer&&this.observer.removeListener(e)},notifyObserver:function(){this.observer&&this.observer.notify()},_query:function(e,i,n){i=i||this.node;var r=[];return this._queryElements(t.Logical.getChildNodes(i),e,n,r),r},_queryElements:function(e,t,i,n){for(var r,o=0,s=e.length;o<s&&(r=e[o]);o++)if(r.nodeType===Node.ELEMENT_NODE&&this._queryElement(r,t,i,n))return!0},_queryElement:function(e,i,n,r){var o=i(e);return o&&r.push(e),n&&n(o)?o:void this._queryElements(t.Logical.getChildNodes(e),i,n,r)}};var r=i.CONTENT="content",o=i.factory=function(e){return e=e||document,e.__domApi||(e.__domApi=new i.ctor(e)),e.__domApi};i.hasApi=function(e){return Boolean(e.__domApi)},i.ctor=i,Polymer.dom=function(e,t){return e instanceof Event?Polymer.EventApi.factory(e):i.factory(e,t)};var s=Element.prototype;return i.matchesSelector=s.matches||s.matchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.webkitMatchesSelector,i}(),function(){"use strict";var e=Polymer.Settings,t=Polymer.DomApi,i=t.factory,n=Polymer.TreeApi,r=Polymer.domInnerHTML.getInnerHTML,o=t.CONTENT;if(!e.useShadow){var s=Element.prototype.cloneNode,a=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,r){if(r&&n.Logical.getParentNode(r)!==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 s=n.Logical.getParentNode(e);s?(t.hasApi(s)&&i(s).notifyObserver(),this._removeNode(e)):this._removeOwnerShadyRoot(e)}if(!this._addNode(e,r)){r&&(r=r.localName===o?this._firstComposedNode(r):r);var a=this.node._isShadyRoot?this.node.host:this.node;r?n.Composed.insertBefore(a,e,r):n.Composed.appendChild(a,e)}return this.notifyObserver(),e},_addNode:function(e,t){var i=this.getOwnerRoot();if(i){var r=this._maybeAddInsertionPoint(e,this.node);i._invalidInsertionPoints||(i._invalidInsertionPoints=r),this._addNodeToHost(i.host,e)}n.Logical.hasChildNodes(this.node)&&n.Logical.recordInsertBefore(e,this.node,t);var o=this._maybeDistribute(e)||this.node.shadyRoot;if(o)if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(;e.firstChild;)n.Composed.removeChild(e,e.firstChild);else{var s=n.Composed.getParentNode(e);s&&n.Composed.removeChild(s,e)}return o},removeChild:function(e){if(n.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,i=n.Composed.getParentNode(e);t===i&&n.Composed.removeChild(t,e)}return this.notifyObserver(),e},_removeNode:function(e){var t,r=n.Logical.hasParentNode(e)&&n.Logical.getParentNode(e),o=this._ownerShadyRootForNode(e);return r&&(t=i(e)._maybeDistributeParent(),n.Logical.recordRemoveChild(e,r),o&&this._removeDistributedChildren(o,e)&&(o._invalidInsertionPoints=!0,this._lazyDistribute(o.host))),this._removeOwnerShadyRoot(e),o&&this._removeNodeFromHost(o.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 i=n.Logical.getParentNode(e);t=i?i._isShadyRoot?i:this._ownerShadyRootForNode(i):null}(t||document.documentElement.contains(e))&&(e._ownerShadyRoot=t)}return t}},_maybeDistribute:function(e){var t=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noContent&&i(e).querySelector(o),r=t&&n.Logical.getParentNode(t).nodeType!==Node.DOCUMENT_FRAGMENT_NODE,s=t||e.localName===o;if(s){var a=this.getOwnerRoot();a&&this._lazyDistribute(a.host)}var l=this._nodeNeedsDistribution(this.node);return l&&this._lazyDistribute(this.node),l||s&&!r},_maybeAddInsertionPoint:function(e,t){var r;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noContent)e.localName===o&&(n.Logical.saveChildNodes(t),n.Logical.saveChildNodes(e),r=!0);else for(var s,a,l,h=i(e).querySelectorAll(o),c=0;c<h.length&&(s=h[c]);c++)a=n.Logical.getParentNode(s),a===e&&(a=t),l=this._maybeAddInsertionPoint(s,a),r=r||l;return r},_updateInsertionPoints:function(e){for(var t,r=e.shadyRoot._insertionPoints=i(e.shadyRoot).querySelectorAll(o),s=0;s<r.length;s++)t=r[s],n.Logical.saveChildNodes(t),n.Logical.saveChildNodes(n.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 r,o=e._insertionPoints,s=0;s<o.length;s++){var a=o[s];if(this._contains(t,a))for(var l=i(a).getDistributedNodes(),h=0;h<l.length;h++){r=!0;var c=l[h],u=n.Composed.getParentNode(c);u&&n.Composed.removeChild(u,c)}}return r},_contains:function(e,t){for(;t;){if(t==e)return!0;t=n.Logical.getParentNode(t)}},_removeOwnerShadyRoot:function(e){if(this._hasCachedOwnerRoot(e))for(var t,i=n.Logical.getChildNodes(e),r=0,o=i.length;r<o&&(t=i[r]);r++)this._removeOwnerShadyRoot(t);e._ownerShadyRoot=void 0},_firstComposedNode:function(e){for(var t,n,r=i(e).getDistributedNodes(),o=0,s=r.length;o<s&&(t=r[o]);o++)if(n=i(t).getDestinationInsertionPoints(),n[n.length-1]===e)return t},querySelector:function(e){var i=this._query(function(i){return t.matchesSelector.call(i,e)},this.node,function(e){return Boolean(e)})[0];return i||null},querySelectorAll:function(e){return this._query(function(i){return t.matchesSelector.call(i,e)},this.node)},getDestinationInsertionPoints:function(){return this.node._destinationInsertionPoints||[]},getDistributedNodes:function(){return this.node._distributedNodes||[]},_clear:function(){for(;this.childNodes.length;)this.removeChild(this.childNodes[0])},setAttribute:function(e,t){this.node.setAttribute(e,t),this._maybeDistributeParent()},removeAttribute:function(e){this.node.removeAttribute(e),this._maybeDistributeParent()},_maybeDistributeParent:function(){if(this._nodeNeedsDistribution(this.parentNode))return this._lazyDistribute(this.parentNode),!0},cloneNode:function(e){var t=s.call(this.node,!1);if(e)for(var n,r=this.childNodes,o=i(t),a=0;a<r.length;a++)n=i(r[a]).cloneNode(!0),o.appendChild(n);return t},importNode:function(e,t){var r=this.node instanceof Document?this.node:this.node.ownerDocument,o=a.call(r,e,!1);if(t)for(var s,l=n.Logical.getChildNodes(e),h=i(o),c=0;c<l.length;c++)s=i(r).importNode(l[c],!0),h.appendChild(s);return o},_getComposedInnerHTML:function(){return r(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 n=i(e).getOwnerRoot();n&&n!==this.node;)e=n.host,n=i(e).getOwnerRoot();return this.node===document?n?null:e:n===this.node?e:null},configurable:!0},childNodes:{get:function(){var e=n.Logical.getChildNodes(this.node);return Array.isArray(e)?e:n.arrayCopyChildNodes(this.node)},configurable:!0},children:{get:function(){return n.Logical.hasChildNodes(this.node)?Array.prototype.filter.call(this.childNodes,function(e){return e.nodeType===Node.ELEMENT_NODE}):n.arrayCopyChildren(this.node)},configurable:!0},parentNode:{get:function(){return n.Logical.getParentNode(this.node)},configurable:!0},firstChild:{get:function(){return n.Logical.getFirstChild(this.node)},configurable:!0},lastChild:{get:function(){return n.Logical.getLastChild(this.node)},configurable:!0},nextSibling:{get:function(){return n.Logical.getNextSibling(this.node)},configurable:!0},previousSibling:{get:function(){return n.Logical.getPreviousSibling(this.node)},configurable:!0},firstElementChild:{get:function(){return n.Logical.getFirstElementChild(this.node)},configurable:!0},lastElementChild:{get:function(){return n.Logical.getLastElementChild(this.node)},configurable:!0},nextElementSibling:{get:function(){return n.Logical.getNextElementSibling(this.node)},configurable:!0},previousElementSibling:{get:function(){return n.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,i=[],n=0,r=this.childNodes;t=r[n];n++)t.nodeType!==Node.COMMENT_NODE&&i.push(t.textContent);return i.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:r(this.node)},set:function(e){var t=this.node.nodeType;if(t!==Node.TEXT_NODE||t!==Node.COMMENT_NODE){this._clear();var i=document.createElement("div");i.innerHTML=e;for(var r=n.arrayCopyChildNodes(i),o=0;o<r.length;o++)this.appendChild(r[o])}},configurable:!0}}),t.hasInsertionPoint=function(e){return Boolean(e&&e._insertionPoints.length)}}}(),function(){"use strict";var e=Polymer.Settings,t=Polymer.TreeApi,i=Polymer.DomApi;if(e.useShadow){Polymer.Base.extend(i.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 i=this.node instanceof Document?this.node:this.node.ownerDocument;return i.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(i.prototype,{activeElement:{get:function(){var e=i.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 n=function(e){for(var t=0;t<e.length;t++)r(e[t])},r=function(e){i.prototype[e]=function(){return this.node[e].apply(this.node,arguments)}};n(["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector"]);var o=function(e){for(var t=0;t<e.length;t++)s(e[t])},s=function(e){Object.defineProperty(i.prototype,e,{get:function(){return this.node[e]},configurable:!0})};o(["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(),i=this.path,n=0;n<i.length;n++)if(Polymer.dom(i[n]).getOwnerRoot()===t)return i[n]},get path(){if(!this.event._path){for(var e=[],t=this.rootTarget;t;){e.push(t);var i=Polymer.dom(t).getDestinationInsertionPoints();if(i.length){for(var n=0;n<i.length-1;n++)e.push(i[n]);t=i[i.length-1]}else t=Polymer.dom(t).parentNode||t.host}e.push(window),this.event._path=e}return this.event._path}};var i=function(t){return t.__eventApi||(t.__eventApi=new e.Event(t)),t.__eventApi};return{factory:i}}(),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,i=0;i<e.length&&(t=e[i]);i++)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,i=Polymer.dom(e).observeNodes(function(){t._scheduleNotify()});return i._avoidChangeCalculation=!0,i},_unobserveContentElements:function(e){for(var t,i,n=0;n<e.length&&(t=e[n]);n++)this._isContent(t)&&(i=t.__observeNodesMap.get(this),i&&(Polymer.dom(t).unobserveNodes(i),t.__observeNodesMap["delete"](this)))},_isContent:function(e){return"content"===e.localName},_callListeners:function(){for(var e,t=this._listeners,i=this._getEffectiveNodes(),n=0;n<t.length&&(e=t[n]);n++){var r=this._generateListenerInfo(e,i);(r||e._alwaysNotify)&&this._callListener(e,r)}},_getEffectiveNodes:function(){return this.domApi.getEffectiveChildNodes()},_generateListenerInfo:function(e,t){if(e._avoidChangeCalculation)return!0;for(var i,n=e._nodes,r={target:this.node,addedNodes:[],removedNodes:[]},o=Polymer.ArraySplice.calculateSplices(t,n),s=0;s<o.length&&(i=o[s]);s++)for(var a,l=0;l<i.removed.length&&(a=i.removed[l]);l++)r.removedNodes.push(a);for(s=0,i;s<o.length&&(i=o[s]);s++)for(l=i.index;l<i.index+i.addedCount;l++)r.addedNodes.push(t[l]);return e._nodes=t,r.addedNodes.length||r.removedNodes.length?r:void 0},_callListener:function(e,t){return e.fn.call(this.node,t)},enableShadowAttributeTracking:function(){}},t.useShadow){var i=e.EffectiveNodesObserver.prototype._setup,n=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})}i.call(this)},_cleanup:function(){this._observer.disconnect(),this._observer=null,this._mutationHandler=null,Polymer.dom.removeStaticFlush(this._boundFlush),n.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 i=this;this._observer=Polymer.dom(t).observeNodes(function(){i._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 i=e._destinationInsertionPoints;i?i.push(t):e._destinationInsertionPoints=[t]}function t(e){var t=e._distributedNodes;if(t)for(var i=0;i<t.length;i++){var n=t[i]._destinationInsertionPoints;n&&n.splice(n.indexOf(e)+1,n.length)}}function i(e,t){var i=u.Logical.getParentNode(e);i&&i.shadyRoot&&c.hasInsertionPoint(i.shadyRoot)&&i.shadyRoot._distributionClean&&(i.shadyRoot._distributionClean=!1,t.shadyRoot._dirtyRoots.push(i))}function n(e,t){var i=t._destinationInsertionPoints;return i&&i[i.length-1]===e}function r(e){return"content"==e.localName}function o(e){for(;e&&s(e);)e=e.domHost;return e}function s(e){for(var t,i=u.Logical.getChildNodes(e),n=0;n<i.length;n++)if(t=i[n],t.localName&&"content"===t.localName)return e.domHost}function a(e){for(var t,i=0;i<e._insertionPoints.length;i++)t=e._insertionPoints[i],c.hasApi(t)&&Polymer.dom(t).notifyObserver()}function l(e){c.hasApi(e)&&Polymer.dom(e).notifyObserver()}function h(e){if(d&&e)for(var t=0;t<e.length;t++)CustomElements.upgrade(e[t])}var c=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||h(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,i=0;i<e.length;i++)t=e[i],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=o(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&&c.hasInsertionPoint(this.shadyRoot)&&(this._resetDistribution(),this._distributePool(this.shadyRoot,this._collectPool()))},_distributeDirtyRoots:function(){for(var e,t=this.shadyRoot._dirtyRoots,i=0,n=t.length;i<n&&(e=t[i]);i++)e._distributeContent();this.shadyRoot._dirtyRoots=[]},_finishDistribute:function(){if(this._useContent){if(this.shadyRoot._distributionClean=!0,c.hasInsertionPoint(this.shadyRoot))this._composeTree(),a(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||l(this),this.shadyRoot._hasDistributed=!0}},elementMatches:function(e,t){return t=t||this,c.matchesSelector.call(t,e)},_resetDistribution:function(){for(var e=u.Logical.getChildNodes(this),i=0;i<e.length;i++){var n=e[i];n._destinationInsertionPoints&&(n._destinationInsertionPoints=void 0),r(n)&&t(n)}for(var o=this.shadyRoot,s=o._insertionPoints,a=0;a<s.length;a++)s[a]._distributedNodes=[]},_collectPool:function(){for(var e=[],t=u.Logical.getChildNodes(this),i=0;i<t.length;i++){var n=t[i];r(n)?e.push.apply(e,n._distributedNodes):e.push(n)}return e},_distributePool:function(e,t){for(var n,r=e._insertionPoints,o=0,s=r.length;o<s&&(n=r[o]);o++)this._distributeInsertionPoint(n,t),i(n,this)},_distributeInsertionPoint:function(t,i){for(var n,r=!1,o=0,s=i.length;o<s;o++)n=i[o],n&&this._matchesContentSelect(n,t)&&(e(n,t),i[o]=void 0,r=!0);if(!r)for(var a=u.Logical.getChildNodes(t),l=0;l<a.length;l++)e(a[l],t)},_composeTree:function(){this._updateChildNodes(this,this._composeNode(this));for(var e,t,i=this.shadyRoot._insertionPoints,n=0,r=i.length;n<r&&(e=i[n]);n++)t=u.Logical.getParentNode(e),t._useContent||t===this||t===this.shadyRoot||this._updateChildNodes(t,this._composeNode(t))},_composeNode:function(e){for(var t=[],i=u.Logical.getChildNodes(e.shadyRoot||e),o=0;o<i.length;o++){var s=i[o];if(r(s))for(var a=s._distributedNodes,l=0;l<a.length;l++){var h=a[l];n(s,h)&&t.push(h)}else t.push(s)}return t},_updateChildNodes:function(e,t){for(var i,n=u.Composed.getChildNodes(e),r=Polymer.ArraySplice.calculateSplices(t,n),o=0,s=0;o<r.length&&(i=r[o]);o++){for(var a,l=0;l<i.removed.length&&(a=i.removed[l]);l++)u.Composed.getParentNode(a)===e&&u.Composed.removeChild(e,a),n.splice(i.index+s,1);s-=i.addedCount}for(var i,h,o=0;o<r.length&&(i=r[o]);o++)for(h=n[i.index],l=i.index,a;l<i.index+i.addedCount;l++)a=t[l],u.Composed.insertBefore(e,a,h),n.splice(l,0,a)},_matchesContentSelect:function(e,t){var i=t.getAttribute("select");if(!i)return!0;if(i=i.trim(),!i)return!0;if(!(e instanceof Element))return!1;var n=/^(:not\()?[*.#[a-zA-Z_|]/;return!!n.test(i)&&this.elementMatches(i,e)},_elementAdd:function(){},_elementRemove:function(){}});var d=window.CustomElements&&!CustomElements.useNative}(),Polymer.Settings.useShadow&&Polymer.Base._addFeature({_poolContent:function(){},_beginDistribute:function(){},distributeContent:function(){},_distributeContent:function(){},_finishDistribute:function(){},_createLocalRoot:function(){this.createShadowRoot(),this.shadowRoot.appendChild(this.root),this.root=this.shadowRoot}}),Polymer.Async={_currVal:0,_lastVal:0,_callbacks:[],_twiddleContent:0,_twiddle:document.createTextNode(""),run:function(e,t){return t>0?~setTimeout(e,t):(this._twiddle.textContent=this._twiddleContent++,this._callbacks.push(e),this._currVal++)},cancel:function(e){if(e<0)clearTimeout(~e);else{var t=e-this._lastVal;if(t>=0){if(!this._callbacks[t])throw"invalid async handle: "+e;this._callbacks[t]=null}}},_atEndOfMicrotask:function(){for(var e=this._callbacks.length,t=0;t<e;t++){var i=this._callbacks[t];if(i)try{i()}catch(n){throw t++,this._callbacks.splice(0,t),this._lastVal+=t,this._twiddle.textContent=this._twiddleContent++,n}}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,n){return e?e.stop():e=new i(this),e.go(t,n),e}var t=Polymer.Async,i=function(e){this.context=e;var t=this;this.boundComplete=function(){t.complete()}};return i.prototype={go:function(e,i){var n;this.finish=function(){t.cancel(n)},n=t.run(this.boundComplete,i),this.callback=e},stop:function(){this.finish&&(this.finish(),this.finish=null,this.callback=null)},complete:function(){if(this.finish){var e=this.callback;this.stop(),e.call(this.context)}}},e}(),Polymer.Base._addFeature({_setupDebouncers:function(){this._debouncers={}},debounce:function(e,t,i){return this._debouncers[e]=Polymer.Debounce.call(this,this._debouncers[e],t,i)},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){}}),Polymer.nar=[],Polymer.Annotations={parseAnnotations:function(e){var t=[],i=e._content||e.content;return this._parseNodeAnnotations(i,t,e.hasAttribute("strip-whitespace")),t},_parseNodeAnnotations:function(e,t,i){return e.nodeType===Node.TEXT_NODE?this._parseTextNodeAnnotation(e,t):this._parseElementAnnotations(e,t,i)},_bindingRegex:function(){var e="(?:[a-zA-Z_$][\\w.:$\\-*]*)",t="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",i="(?:'(?:[^'\\\\]|\\\\.)*')",n='(?:"(?:[^"\\\\]|\\\\.)*")',r="(?:"+i+"|"+n+")",o="(?:"+e+"|"+t+"|"+r+"\\s*)",s="(?:"+o+"(?:,\\s*"+o+")*)",a="(?:\\(\\s*(?:"+s+"?)\\)\\s*)",l="("+e+"\\s*"+a+"?)",h="(\\[\\[|{{)\\s*",c="(?:]]|}})",u="(?:(!)\\s*)?",d=h+u+l+c;return new RegExp(d,"g")}(),_parseBindings:function(e){for(var t,i=this._bindingRegex,n=[],r=0;null!==(t=i.exec(e));){t.index>r&&n.push({literal:e.slice(r,t.index)});var o,s,a,l=t[1][0],h=Boolean(t[2]),c=t[3].trim();"{"==l&&(a=c.indexOf("::"))>0&&(s=c.substring(a+2),c=c.substring(0,a),o=!0),n.push({compoundIndex:n.length,value:c,mode:l,negate:h,event:s,customEvent:o}),r=i.lastIndex}if(r&&r<e.length){var u=e.substring(r);u&&n.push({literal:u})}if(n.length)return n},_literalFromParts:function(e){for(var t="",i=0;i<e.length;i++){var n=e[i].literal;t+=n||""}return t},_parseTextNodeAnnotation:function(e,t){var i=this._parseBindings(e.textContent);if(i){e.textContent=this._literalFromParts(i)||" ";var n={bindings:[{kind:"text",name:"textContent",parts:i,isCompound:1!==i.length}]};return t.push(n),n}},_parseElementAnnotations:function(e,t,i){var n={bindings:[],events:[]};return"content"===e.localName&&(t._hasContent=!0),this._parseChildNodesAnnotations(e,n,t,i),e.attributes&&(this._parseNodeAttributeAnnotations(e,n,t),this.prepElement&&this.prepElement(e)),(n.bindings.length||n.events.length||n.id)&&t.push(n),n},_parseChildNodesAnnotations:function(e,t,i,n){if(e.firstChild)for(var r=e.firstChild,o=0;r;){var s=r.nextSibling;if("template"!==r.localName||r.hasAttribute("preserve-content")||this._parseTemplate(r,o,i,t),r.nodeType===Node.TEXT_NODE){for(var a=s;a&&a.nodeType===Node.TEXT_NODE;)r.textContent+=a.textContent,s=a.nextSibling,e.removeChild(a),a=s;n&&!r.textContent.trim()&&(e.removeChild(r),o--)}if(r.parentNode){var l=this._parseNodeAnnotations(r,i,n);l&&(l.parent=t,l.index=o)}r=s,o++}},_parseTemplate:function(e,t,i,n){var r=document.createDocumentFragment();r._notes=this.parseAnnotations(e),r.appendChild(e.content),i.push({bindings:Polymer.nar,events:Polymer.nar,templateContent:r,parent:n,index:t})},_parseNodeAttributeAnnotations:function(e,t){for(var i,n=Array.prototype.slice.call(e.attributes),r=n.length-1;i=n[r];r--){var o,s=i.name,a=i.value;"on-"===s.slice(0,3)?(e.removeAttribute(s),t.events.push({name:s.slice(3),value:a})):(o=this._parseNodeAttributeAnnotation(e,s,a))?t.bindings.push(o):"id"===s&&(t.id=a)}},_parseNodeAttributeAnnotation:function(e,t,i){var n=this._parseBindings(i);if(n){var r=t,o="property";"$"==t[t.length-1]&&(t=t.slice(0,-1),o="attribute");var s=this._literalFromParts(n);s&&"attribute"==o&&e.setAttribute(t,s),"input"===e.localName&&"value"===r&&e.setAttribute(r,""),e.removeAttribute(r);var a=Polymer.CaseMap.dashToCamelCase(t);return"property"===o&&(t=a),{kind:o,name:t,propertyName:a,parts:n,literal:s,isCompound:1!==n.length}}},findAnnotatedNode:function(e,t){var i=t.parent&&Polymer.Annotations.findAnnotatedNode(e,t.parent);if(!i)return e;for(var n=i.firstChild,r=0;n;n=n.nextSibling)if(t.index===r++)return n}},function(){function e(e,t){return e.replace(a,function(e,n,r,o){return n+"'"+i(r.replace(/["']/g,""),t)+"'"+o})}function t(t,n){for(var r in l)for(var o,s,a,c=l[r],u=0,d=c.length;u<d&&(o=c[u]);u++)"*"!==r&&t.localName!==r||(s=t.attributes[o],a=s&&s.value,a&&a.search(h)<0&&(s.value="style"===o?e(a,n):i(a,n)))}function i(e,t){if(e&&"#"===e[0])return e;var i=r(t);return i.href=e,i.href||e}function n(e,t){return o||(o=document.implementation.createHTMLDocument("temp"),s=o.createElement("base"),o.head.appendChild(s)),s.href=t,i(e,o)}function r(e){return e.__urlResolver||(e.__urlResolver=e.createElement("a"))}var o,s,a=/(url\()([^)]*)(\))/g,l={"*":["href","src","style","url"],form:["action"]},h=/\{\{|\[\[/;Polymer.ResolveUrl={resolveCss:e,resolveAttrs:t,resolveUrl:n}}(),Polymer.Base._addFeature({_prepAnnotations:function(){if(this._template){var e=this;Polymer.Annotations.prepElement=function(t){e._prepElement(t)},this._template._content&&this._template._content._notes?this._notes=this._template._content._notes:(this._notes=Polymer.Annotations.parseAnnotations(this._template),this._processAnnotations(this._notes)),Polymer.Annotations.prepElement=null}else this._notes=[]},_processAnnotations:function(e){for(var t=0;t<e.length;t++){for(var i=e[t],n=0;n<i.bindings.length;n++)for(var r=i.bindings[n],o=0;o<r.parts.length;o++){var s=r.parts[o];if(!s.literal){var a=this._parseMethod(s.value);a?s.signature=a:s.model=this._modelForPath(s.value)}}if(i.templateContent){this._processAnnotations(i.templateContent._notes);var l=i.templateContent._parentProps=this._discoverTemplateParentProps(i.templateContent._notes),h=[];for(var c in l){var u="_parent_"+c;h.push({index:i.index,kind:"property",name:u,propertyName:u,parts:[{mode:"{",model:c,value:c}]})}i.bindings=i.bindings.concat(h)}}},_discoverTemplateParentProps:function(e){for(var t,i={},n=0;n<e.length&&(t=e[n]);n++){for(var r,o=0,s=t.bindings;o<s.length&&(r=s[o]);o++)for(var a,l=0,h=r.parts;l<h.length&&(a=h[l]);l++)if(a.signature){for(var c=a.signature.args,u=0;u<c.length;u++){var d=c[u].model;d&&(i[d]=!0)}a.signature.dynamicFn&&(i[a.signature.method]=!0)}else a.model&&(i[a.model]=!0);if(t.templateContent){var f=t.templateContent._parentProps;Polymer.Base.mixin(i,f)}}return i},_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,i=0;i<e.length;i++){var n=e[i],r=t[i];this._configureTemplateContent(n,r),this._configureCompoundBindings(n,r)}},_configureTemplateContent:function(e,t){e.templateContent&&(t._content=e.templateContent)},_configureCompoundBindings:function(e,t){for(var i=e.bindings,n=0;n<i.length;n++){var r=i[n];if(r.isCompound){for(var o=t.__compoundStorage__||(t.__compoundStorage__={}),s=r.parts,a=new Array(s.length),l=0;l<s.length;l++)a[l]=s[l].literal;var h=r.name;o[h]=a,r.literal&&"property"==r.kind&&(t._configValue?t._configValue(h,r.literal):t[h]=r.literal)}}},_marshalIdNodes:function(){this.$={};for(var e,t=0,i=this._notes.length;t<i&&(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,i=this._notes.length;t<i&&(e=this._notes[t]);t++)if(e.events&&e.events.length)for(var n,r=this._findAnnotatedNode(this.root,e),o=0,s=e.events;o<s.length&&(n=s[o]);o++)this.listen(r,n.name,n.value)}}),Polymer.Base._addFeature({listeners:{},_listenListeners:function(e){var t,i,n;for(n in e)n.indexOf(".")<0?(t=this,i=n):(i=n.split("."),t=this.$[i[0]],i=i[1]),this.listen(t,i,e[n])},listen:function(e,t,i){var n=this._recallEventHandler(this,t,e,i);n||(n=this._createEventHandler(e,t,i)),n._listening||(this._listen(e,t,n),n._listening=!0)},_boundListenerKey:function(e,t){return e+":"+t},_recordEventHandler:function(e,t,i,n,r){var o=e.__boundListeners;o||(o=e.__boundListeners=new WeakMap);var s=o.get(i);s||(s={},o.set(i,s));var a=this._boundListenerKey(t,n);s[a]=r},_recallEventHandler:function(e,t,i,n){var r=e.__boundListeners;if(r){var o=r.get(i);if(o){var s=this._boundListenerKey(t,n);return o[s]}}},_createEventHandler:function(e,t,i){var n=this,r=function(e){n[i]?n[i](e,e.detail):n._warn(n._logf("_createEventHandler","listener method `"+i+"` not defined"))};return r._listening=!1,this._recordEventHandler(n,t,e,i,r),r},unlisten:function(e,t,i){var n=this._recallEventHandler(this,t,e,i);n&&(this._unlisten(e,t,n),n._listening=!1)},_listen:function(e,t,i){e.addEventListener(t,i)},_unlisten:function(e,t,i){e.removeEventListener(t,i)}}),function(){"use strict";function e(e){for(var t,i=0;i<m.length;i++)t=m[i],e?document.addEventListener(t,b,!0):document.removeEventListener(t,b,!0)}function t(){if(!g){P.mouse.mouseIgnoreJob||e(!0);var t=function(){e(),P.mouse.target=null,P.mouse.mouseIgnoreJob=null};P.mouse.mouseIgnoreJob=Polymer.Debounce(P.mouse.mouseIgnoreJob,t,_)}}function i(e){var t=e.type;if(m.indexOf(t)===-1)return!1;if("mousemove"===t){var i=void 0===e.buttons?1:e.buttons;return e instanceof window.MouseEvent&&!v&&(i=y[e.which]||0),Boolean(1&i)}var n=void 0===e.button?0:e.button;return 0===n}function n(e){if("click"===e.type){if(0===e.detail)return!0;var t=C.findOriginalTarget(e),i=t.getBoundingClientRect(),n=e.pageX,r=e.pageY;return!(n>=i.left&&n<=i.right&&r>=i.top&&r<=i.bottom)}return!1}function r(e){for(var t,i=Polymer.dom(e).path,n="auto",r=0;r<i.length;r++)if(t=i[r],t[u]){n=t[u];break}return n}function o(e,t,i){e.movefn=t,e.upfn=i,document.addEventListener("mousemove",t),document.addEventListener("mouseup",i)}function s(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",d=25,f=5,p=2,_=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/),b=function(e){if(e[c]={skip:!0},"click"===e.type){for(var t=Polymer.dom(e).path,i=0;i<t.length;i++)if(t[i]===P.mouse.target)return;e.preventDefault(),e.stopPropagation()}},P={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}},C={gestures:{},recognizers:[],deepTargetFind:function(e,t){for(var i=document.elementFromPoint(e,t),n=i;n&&n.shadowRoot;)n=n.shadowRoot.elementFromPoint(e,t),n&&(i=n);return i},findOriginalTarget:function(e){return e.path?e.path[0]:e.target},handleNative:function(e){var i,n=e.type,r=a(e.currentTarget),o=r[h];if(o){var s=o[n];if(s){if(!e[c]&&(e[c]={},"touch"===n.slice(0,5))){var u=e.changedTouches[0];if("touchstart"===n&&1===e.touches.length&&(P.touch.id=u.identifier),P.touch.id!==u.identifier)return;l||"touchstart"!==n&&"touchmove"!==n||C.handleTouchAction(e),"touchend"===n&&(P.mouse.target=Polymer.dom(e).rootTarget,t())}if(i=e[c],!i.skip){for(var d,f=C.recognizers,p=0;p<f.length;p++)d=f[p],s[d.name]&&!i[d.name]&&d.flow&&d.flow.start.indexOf(e.type)>-1&&d.reset&&d.reset();for(p=0,d;p<f.length;p++)d=f[p],s[d.name]&&!i[d.name]&&(i[d.name]=!0,d[n](e))}}}},handleTouchAction:function(e){var t=e.changedTouches[0],i=e.type;if("touchstart"===i)P.touch.x=t.clientX,P.touch.y=t.clientY,P.touch.scrollDecided=!1;else if("touchmove"===i){if(P.touch.scrollDecided)return;P.touch.scrollDecided=!0;var n=r(e),o=!1,s=Math.abs(P.touch.x-t.clientX),a=Math.abs(P.touch.y-t.clientY);e.cancelable&&("none"===n?o=!0:"pan-x"===n?o=a>s:"pan-y"===n&&(o=s>a)),o?e.preventDefault():C.prevent("track")}},add:function(e,t,i){e=a(e);var n=this.gestures[t],r=n.deps,o=n.name,s=e[h];s||(e[h]=s={});for(var l,c,u=0;u<r.length;u++)l=r[u],g&&m.indexOf(l)>-1||(c=s[l],c||(s[l]=c={_count:0}),0===c._count&&e.addEventListener(l,this.handleNative),c[o]=(c[o]||0)+1,c._count=(c._count||0)+1);e.addEventListener(t,i),n.touchAction&&this.setTouchAction(e,n.touchAction)},remove:function(e,t,i){e=a(e);var n=this.gestures[t],r=n.deps,o=n.name,s=e[h];if(s)for(var l,c,u=0;u<r.length;u++)l=r[u],c=s[l],c&&c[o]&&(c[o]=(c[o]||1)-1,c._count=(c._count||1)-1,0===c._count&&e.removeEventListener(l,this.handleNative));e.removeEventListener(t,i)},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,i=0;i<this.recognizers.length;i++){t=this.recognizers[i];for(var n,r=0;r<t.emits.length;r++)if(n=t.emits[r],n===e)return t}return null},setTouchAction:function(e,t){l&&(e.style.touchAction=t),e[u]=t},fire:function(e,t,i){var n=Polymer.Base.fire(t,i,{node:e,bubbles:!0,cancelable:!0});if(n.defaultPrevented){var r=i.sourceEvent;r&&r.preventDefault&&r.preventDefault()}},prevent:function(e){var t=this.findRecognizerByEvent(e);t.info&&(t.info.prevent=!0)},resetMouseCanceller:function(){P.mouse.mouseIgnoreJob&&P.mouse.mouseIgnoreJob.complete()}};C.register({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){s(this.info)},mousedown:function(e){if(i(e)){var t=C.findOriginalTarget(e),n=this,r=function(e){i(e)||(n.fire("up",t,e),s(n.info))},a=function(e){i(e)&&n.fire("up",t,e),s(n.info)};o(this.info,r,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,i){C.fire(t,e,{x:i.clientX,y:i.clientY,sourceEvent:i,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>p&&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,s(this.info)},hasMovedEnough:function(e,t){if(this.info.prevent)return!1;if(this.info.started)return!0;var i=Math.abs(this.info.x-e),n=Math.abs(this.info.y-t);return i>=f||n>=f},mousedown:function(e){if(i(e)){var t=C.findOriginalTarget(e),n=this,r=function(e){var r=e.clientX,o=e.clientY;n.hasMovedEnough(r,o)&&(n.info.state=n.info.started?"mouseup"===e.type?"end":"track":"start","start"===n.info.state&&C.prevent("tap"),n.info.addMove({x:r,y:o}),i(e)||(n.info.state="end",s(n.info)),n.fire(t,e),n.info.started=!0)},a=function(e){n.info.started&&r(e),s(n.info)};o(this.info,r,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),i=e.changedTouches[0],n=i.clientX,r=i.clientY;this.hasMovedEnough(n,r)&&("start"===this.info.state&&C.prevent("tap"),this.info.addMove({x:n,y:r}),this.fire(t,i),this.info.state="track",this.info.started=!0)},touchend:function(e){var t=C.findOriginalTarget(e),i=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),this.fire(t,i))},fire:function(e,t){var i,n=this.info.moves[this.info.moves.length-2],r=this.info.moves[this.info.moves.length-1],o=r.x-this.info.x,s=r.y-this.info.y,a=0;return n&&(i=r.x-n.x,a=r.y-n.y),C.fire(e,"track",{state:this.info.state,x:t.clientX,y:t.clientY,dx:o,dy:s,ddx:i,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){i(e)&&this.save(e)},click:function(e){i(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),i=Math.abs(e.clientY-this.info.y),r=C.findOriginalTarget(e);(isNaN(t)||isNaN(i)||t<=d&&i<=d||n(e))&&(this.info.prevent||C.fire(r,"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,i){C.gestures[t]?C.add(e,t,i):e.addEventListener(t,i)},_unlisten:function(e,t,i){C.gestures[t]?C.remove(e,t,i):e.removeEventListener(t,i)},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,i){i=i||this,1==arguments.length&&(t=!i.classList.contains(e)),t?Polymer.dom(i).classList.add(e):Polymer.dom(i).classList.remove(e)},toggleAttribute:function(e,t,i){i=i||this,1==arguments.length&&(t=!i.hasAttribute(e)),t?Polymer.dom(i).setAttribute(e,""):Polymer.dom(i).removeAttribute(e)},classFollows:function(e,t,i){i&&Polymer.dom(i).classList.remove(e),t&&Polymer.dom(t).classList.add(e)},attributeFollows:function(e,t,i){i&&Polymer.dom(i).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(),i=[],n=0;e=t[n];n++)e.nodeType!==Node.COMMENT_NODE&&i.push(Polymer.dom(e).textContent);return i.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,i){i=i||Polymer.nob;var n=i.node||this;t=null===t||void 0===t?{}:t;var r=void 0===i.bubbles||i.bubbles,o=Boolean(i.cancelable),s=i._useCache,a=this._getEvent(e,r,o,s);return a.detail=t,s&&(this.__eventCache[e]=null),n.dispatchEvent(a),s&&(this.__eventCache[e]=a),a},__eventCache:{},_getEvent:function(e,t,i,n){var r=n&&this.__eventCache[e];return r&&r.bubbles==t&&r.cancelable==i||(r=new Event(e,{bubbles:Boolean(t),cancelable:i})),r},async:function(e,t){var i=this;return Polymer.Async.run(function(){e.call(i)},t)},cancelAsync:function(e){Polymer.Async.cancel(e)},arrayDelete:function(e,t){var i;if(Array.isArray(e)){if(i=e.indexOf(t),i>=0)return e.splice(i,1)}else{var n=this._get(e);if(i=n.indexOf(t),i>=0)return this.splice(e,i,1)}},transform:function(e,t){t=t||this,t.style.webkitTransform=e,t.style.transform=e},translate3d:function(e,t,i,n){n=n||this,this.transform("translate3d("+e+","+t+","+i+")",n)},importHref:function(e,t,i,n){var r=document.createElement("link");r.rel="import",r.href=e,n=Boolean(n),n&&r.setAttribute("async","");var o=this;return t&&(r.onload=function(e){return t.call(o,e)}),i&&(r.onerror=function(e){return i.call(o,e)}),document.head.appendChild(r),r},create:function(e,t){var i=document.createElement(e);if(t)for(var n in t)i[n]=t[n];return i},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={prepareModel:function(e){Polymer.Base.mixin(e,this._modelApi)},_modelApi:{_notifyChange:function(e,t,i){i=void 0===i?this[e]:i,t=t||Polymer.CaseMap.camelToDashCase(e)+"-changed",this.fire(t,{value:i},{bubbles:!1,cancelable:!1,_useCache:!0})},_propertySetter:function(e,t,i,n){var r=this.__data__[e];return r===t||r!==r&&t!==t||(this.__data__[e]=t,"object"==typeof t&&this._clearPath(e),this._propertyChanged&&this._propertyChanged(e,t,r),i&&this._effectEffects(e,t,i,r,n)),r},__setProperty:function(e,t,i,n){n=n||this;var r=n._propertyEffects&&n._propertyEffects[e];r?n._propertySetter(e,t,r,i):n[e]=t},_effectEffects:function(e,t,i,n,r){for(var o,s=0,a=i.length;s<a&&(o=i[s]);s++)o.fn.call(this,e,t,o.effect,n,r)},_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 i=e._propertyEffects[t];return i||(i=e._propertyEffects[t]=[]),i},addPropertyEffect:function(e,t,i,n){var r=this.ensurePropertyEffects(e,t),o={kind:i,effect:n,fn:Polymer.Bind["_"+i+"Effect"]};return r.push(o),o},createBindings:function(e){var t=e._propertyEffects;if(t)for(var i in t){var n=t[i];n.sort(this._sortPropertyEffects),this._createAccessors(e,i,n)}},_sortPropertyEffects:function(){var e={compute:0,annotation:1,annotatedComputation:2,reflect:3,notify:4,observer:5,complexObserver:6,"function":7};return function(t,i){return e[t.kind]-e[i.kind]}}(),_createAccessors:function(e,t,i){var n={get:function(){return this.__data__[t]}},r=function(e){this._propertySetter(t,e,i)},o=e.getPropertyInfo&&e.getPropertyInfo(t);o&&o.readOnly?o.computed||(e["_set"+this.upper(t)]=r):n.set=r,Object.defineProperty(e,t,n)},upper:function(e){return e[0].toUpperCase()+e.substring(1)},_addAnnotatedListener:function(e,t,i,n,r,o){e._bindListeners||(e._bindListeners=[]);var s=this._notedListenerFactory(i,n,this._isStructured(n),o),a=r||Polymer.CaseMap.camelToDashCase(i)+"-changed";e._bindListeners.push({index:t,property:i,path:n,changedFn:s,event:a})},_isStructured:function(e){return e.indexOf(".")>0},_isEventBogus:function(e,t){return e.path&&e.path[0]!==t},_notedListenerFactory:function(e,t,i,n){return function(r,o,s){s?this._notifyPath(this._fixPath(t,e,s),o):(o=r[e],n&&(o=!o),i?this.__data__[t]!=o&&this.set(t,o):this[t]=o)}},prepareInstance:function(e){e.__data__=Object.create(null)},setupBindListeners:function(e){for(var t,i=e._bindListeners,n=0,r=i.length;n<r&&(t=i[n]);n++){var o=e._nodes[t.index];this._addNotifyListener(o,e,t.event,t.changedFn)}},_addNotifyListener:function(e,t,i,n){e.addEventListener(i,function(e){return t._notifyListener(n,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,i){e!=i.value&&(t=this._get(i.value),this.__data__[i.value]=t),this._applyEffectValue(i,t)},_reflectEffect:function(e,t,i){this.reflectPropertyToAttribute(e,i.attribute,t)},_notifyEffect:function(e,t,i,n,r){r||this._notifyChange(e,i.event,t)},_functionEffect:function(e,t,i,n,r){i.call(this,e,t,n,r)},_observerEffect:function(e,t,i,n){var r=this[i.method];r?r.call(this,t,n):this._warn(this._logf("_observerEffect","observer method `"+i.method+"` not defined"))},_complexObserverEffect:function(e,t,i){var n=this[i.method];if(n){var r=Polymer.Bind._marshalArgs(this.__data__,i,e,t);r&&n.apply(this,r)}else i.dynamicFn||this._warn(this._logf("_complexObserverEffect","observer method `"+i.method+"` not defined"))},_computeEffect:function(e,t,i){var n=this[i.method];if(n){var r=Polymer.Bind._marshalArgs(this.__data__,i,e,t);if(r){var o=n.apply(this,r);this.__setProperty(i.name,o)}}else i.dynamicFn||this._warn(this._logf("_computeEffect","compute method `"+i.method+"` not defined"))},_annotatedComputationEffect:function(e,t,i){var n=this._rootDataHost||this,r=n[i.method];if(r){var o=Polymer.Bind._marshalArgs(this.__data__,i,e,t);if(o){var s=r.apply(n,o);this._applyEffectValue(i,s)}}else i.dynamicFn||n._warn(n._logf("_annotatedComputationEffect","compute method `"+i.method+"` not defined"))},_marshalArgs:function(e,t,i,n){for(var r=[],o=t.args,s=o.length>1||t.dynamicFn,a=0,l=o.length;a<l;a++){var h,c=o[a],u=c.name;if(c.literal?h=c.value:i===u?h=n:(h=e[u],void 0===h&&c.structured&&(h=Polymer.Base._get(u,e))),s&&void 0===h)return;if(c.wildcard){var d=0===i.indexOf(u+".");r[a]={path:d?i:u,value:d?n:h,base:h}}else r[a]=h}return r}}),Polymer.Base._addFeature({_addPropertyEffect:function(e,t,i){var n=Polymer.Bind.addPropertyEffect(this,e,t,i);n.pathFn=this["_"+n.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 i=e[t];if(i.observer&&this._addObserverEffect(t,i.observer),i.computed&&(i.readOnly=!0,this._addComputedEffect(t,i.computed)),i.notify&&this._addPropertyEffect(t,"notify",{event:Polymer.CaseMap.camelToDashCase(t)+"-changed"}),i.reflectToAttribute){var n=Polymer.CaseMap.camelToDashCase(t);"-"===n[0]?this._warn(this._logf("_addPropertyEffects","Property "+t+" cannot be reflected to attribute "+n+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.')):this._addPropertyEffect(t,"reflect",{attribute:n})}i.readOnly&&Polymer.Bind.ensurePropertyEffects(this,t)}},_addComputedEffect:function(e,t){for(var i,n=this._parseMethod(t),r=n.dynamicFn,o=0;o<n.args.length&&(i=n.args[o]);o++)this._addPropertyEffect(i.model,"compute",{method:n.method,args:n.args,trigger:i,name:e,dynamicFn:r});r&&this._addPropertyEffect(n.method,"compute",{method:n.method,args:n.args,trigger:null,name:e,dynamicFn:r})},_addObserverEffect:function(e,t){this._addPropertyEffect(e,"observer",{method:t,property:e})},_addComplexObserverEffects:function(e){if(e)for(var t,i=0;i<e.length&&(t=e[i]);i++)this._addComplexObserverEffect(t)},_addComplexObserverEffect:function(e){var t=this._parseMethod(e);if(!t)throw new Error("Malformed observer expression '"+e+"'");for(var i,n=t.dynamicFn,r=0;r<t.args.length&&(i=t.args[r]);r++)this._addPropertyEffect(i.model,"complexObserver",{method:t.method,args:t.args,trigger:i,dynamicFn:n});n&&this._addPropertyEffect(t.method,"complexObserver",{method:t.method,args:t.args,trigger:null,dynamicFn:n})},_addAnnotationEffects:function(e){for(var t,i=0;i<e.length&&(t=e[i]);i++)for(var n,r=t.bindings,o=0;o<r.length&&(n=r[o]);o++)this._addAnnotationEffect(n,i)},_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 i=0;i<e.parts.length;i++){var n=e.parts[i];n.signature?this._addAnnotatedComputationEffect(e,n,t):n.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(n.model,"annotation",{kind:e.kind,index:t,name:e.name,propertyName:e.propertyName,value:n.value,isCompound:e.isCompound,compoundIndex:n.compoundIndex,event:n.event,customEvent:n.customEvent,negate:n.negate}))}},_addAnnotatedComputationEffect:function(e,t,i){var n=t.signature;if(n["static"])this.__addAnnotatedComputationEffect("__static__",i,e,t,null);else{for(var r,o=0;o<n.args.length&&(r=n.args[o]);o++)r.literal||this.__addAnnotatedComputationEffect(r.model,i,e,t,r);n.dynamicFn&&this.__addAnnotatedComputationEffect(n.method,i,e,t,null)}},__addAnnotatedComputationEffect:function(e,t,i,n,r){this._addPropertyEffect(e,"annotatedComputation",{index:t,isCompound:i.isCompound,compoundIndex:n.compoundIndex,kind:i.kind,name:i.name,negate:n.negate,method:n.signature.method,args:n.signature.args,trigger:r,dynamicFn:n.signature.dynamicFn})},_parseMethod:function(e){var t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){var i={method:t[1],"static":!0};if(this.getPropertyInfo(i.method)!==Polymer.nob&&(i["static"]=!1,i.dynamicFn=!0),t[2].trim()){var n=t[2].replace(/\\,/g,"&comma;").split(",");return this._parseArgs(n,i)}return i.args=Polymer.nar,i}},_parseArgs:function(e,t){return t.args=e.map(function(e){var i=this._parseArg(e);return i.literal||(t["static"]=!1),i},this),t},_parseArg:function(e){var t=e.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),i={name:t},n=t[0];switch("-"===n&&(n=t[1]),n>="0"&&n<="9"&&(n="#"),n){case"'":case'"':i.value=t.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(t),i.literal=!0}return i.literal||(i.model=this._modelForPath(t),i.structured=t.indexOf(".")>0,i.structured&&(i.wildcard=".*"==t.slice(-2),i.wildcard&&(i.name=t.slice(0,-2)))),i},_marshalInstanceEffects:function(){Polymer.Bind.prepareInstance(this),this._bindListeners&&Polymer.Bind.setupBindListeners(this)},_applyEffectValue:function(e,t){var i=this._nodes[e.index],n=e.name;if(t=this._computeFinalAnnotationValue(i,n,t,e),!e.customEvent||i[n]!==t)if("attribute"==e.kind)this.serializeValueToAttribute(t,n,i);else{var r=i._propertyInfo&&i._propertyInfo[n];if(r&&r.readOnly)return;this.__setProperty(n,t,!1,i)}},_computeFinalAnnotationValue:function(e,t,i,n){if(n.negate&&(i=!i),n.isCompound){var r=e.__compoundStorage__[t];r[n.compoundIndex]=i,i=r.join("")}return"attribute"!==n.kind&&("className"===t&&(i=this._scopeElementClass(e,i)),("textContent"===t||"input"==e.localName&&"value"==t)&&(i=void 0==i?"":i)),i},_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 i=this._propertyInfo[e];i&&i.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,i){for(var n in t){var r=t[n];if(!e&&this.hasOwnProperty(n)&&this._propertyEffects&&this._propertyEffects[n])i[n]=this[n],delete this[n];else if(void 0!==r.value){var o=r.value;"function"==typeof o&&(o=o.call(this,this._config)),i[n]=o}}},_distributeConfig:function(e){var t=this._propertyEffects;if(t)for(var i in e){var n=t[i];if(n)for(var r,o=0,s=n.length;o<s&&(r=n[o]);o++)if("annotation"===r.kind){var a=this._nodes[r.effect.index],l=r.effect.propertyName,h="attribute"==r.effect.kind,c=a._propertyEffects&&a._propertyEffects[l];if(a._configValue&&(c||!h)){var u=i===r.effect.value?e[i]:this._get(r.effect.value,e);u=this._computeFinalAnnotationValue(a,l,u,r.effect),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 i in e)void 0===this[i]&&this.__setProperty(i,e[i],i in t)},_notifyListener:function(e,t){if(!Polymer.Bind._isEventBogus(t,t.target)){var i,n;if(t.detail&&(i=t.detail.value,n=t.detail.path),this._clientsReadied)return e.call(this,t.target,i,n);this._queueHandler([e,t.target,i,n])}},_queueHandler:function(e){this._handlers.push(e)},_flushHandlers:function(){for(var e,t=this._handlers,i=0,n=t.length;i<n&&(e=t[i]);i++)e[0].call(this,e[1],e[2],e[3]);this._handlers=[]}})}(),function(){"use strict";Polymer.Base._addFeature({notifyPath:function(e,t,i){var n={},r=this._get(e,this,n);1===arguments.length&&(t=r),n.path&&this._notifyPath(n.path,t,i)},_notifyPath:function(e,t,i){var n=this._propertySetter(e,t);if(n!==t&&(n===n||t===t))return this._pathEffector(e,t),i||this._notifyPathUp(e,t),!0},_getPathParts:function(e){if(Array.isArray(e)){for(var t=[],i=0;i<e.length;i++)for(var n=e[i].toString().split("."),r=0;r<n.length;r++)t.push(n[r]);return t}return e.toString().split(".")},set:function(e,t,i){var n,r=i||this,o=this._getPathParts(e),s=o[o.length-1];if(o.length>1){for(var a=0;a<o.length-1;a++){var l=o[a];if(n&&"#"==l[0]?r=Polymer.Collection.get(n).getItem(l):(r=r[l],n&&parseInt(l,10)==l&&(o[a]=Polymer.Collection.get(n).getKey(r))),!r)return;n=Array.isArray(r)?r:null}if(n){var h,c,u=Polymer.Collection.get(n);"#"==s[0]?(c=s,h=u.getItem(c),s=n.indexOf(h),u.setItem(c,t)):parseInt(s,10)==s&&(h=r[s],c=u.getKey(h),o[a]=c,u.setItem(c,t))}r[s]=t,i||this._notifyPath(o.join("."),t)}else r[e]=t},get:function(e,t){return this._get(e,t)},_get:function(e,t,i){for(var n,r=t||this,o=this._getPathParts(e),s=0;s<o.length;s++){if(!r)return;var a=o[s];n&&"#"==a[0]?r=Polymer.Collection.get(n).getItem(a):(r=r[a],i&&n&&parseInt(a,10)==a&&(o[s]=Polymer.Collection.get(n).getKey(r))),n=Array.isArray(r)?r:null}return i&&(i.path=o.join(".")),r},_pathEffector:function(e,t){var i=this._modelForPath(e),n=this._propertyEffects&&this._propertyEffects[i];if(n)for(var r,o=0;o<n.length&&(r=n[o]);o++){var s=r.pathFn;s&&s.call(this,e,t,r.effect)}this._boundPaths&&this._notifyBoundPaths(e,t)},_annotationPathEffect:function(e,t,i){if(i.value===e||0===i.value.indexOf(e+"."))Polymer.Bind._annotationEffect.call(this,e,t,i);else if(0===e.indexOf(i.value+".")&&!i.negate){var n=this._nodes[i.index];if(n&&n._notifyPath){var r=this._fixPath(i.name,i.value,e);n._notifyPath(r,t,!0)}}},_complexObserverPathEffect:function(e,t,i){this._pathMatchesEffect(e,i)&&Polymer.Bind._complexObserverEffect.call(this,e,t,i)},_computePathEffect:function(e,t,i){this._pathMatchesEffect(e,i)&&Polymer.Bind._computeEffect.call(this,e,t,i)},_annotatedComputationPathEffect:function(e,t,i){this._pathMatchesEffect(e,i)&&Polymer.Bind._annotatedComputationEffect.call(this,e,t,i)},_pathMatchesEffect:function(e,t){var i=t.trigger.name;return i==e||0===i.indexOf(e+".")||t.trigger.wildcard&&0===e.indexOf(i)},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 i in this._boundPaths){var n=this._boundPaths[i];0==e.indexOf(i+".")?this._notifyPath(this._fixPath(n,i,e),t):0==e.indexOf(n+".")&&this._notifyPath(this._fixPath(i,n,e),t)}},_fixPath:function(e,t,i){return e+i.slice(t.length)},_notifyPathUp:function(e,t){var i=this._modelForPath(e),n=Polymer.CaseMap.camelToDashCase(i),r=n+this._EVENT_CHANGED;this.fire(r,{path:e,value:t},{bubbles:!1,_useCache:!0})},_modelForPath:function(e){var t=e.indexOf(".");return t<0?e:e.slice(0,t)},_EVENT_CHANGED:"-changed",notifySplices:function(e,t){var i={},n=this._get(e,this,i);this._notifySplices(n,i.path,t)},_notifySplices:function(e,t,i){var n={keySplices:Polymer.Collection.applySplices(e,i),indexSplices:i},r=t+".splices";this._notifyPath(r,n),this._notifyPath(t+".length",e.length),this.__data__[r]={keySplices:null,indexSplices:null}},_notifySplice:function(e,t,i,n,r){this._notifySplices(e,t,[{index:i,addedCount:n,removed:r,object:e,type:"splice"}])},push:function(e){var t={},i=this._get(e,this,t),n=Array.prototype.slice.call(arguments,1),r=i.length,o=i.push.apply(i,n);return n.length&&this._notifySplice(i,t.path,r,n.length,[]),o},pop:function(e){var t={},i=this._get(e,this,t),n=Boolean(i.length),r=Array.prototype.slice.call(arguments,1),o=i.pop.apply(i,r);return n&&this._notifySplice(i,t.path,i.length,0,[o]),o},splice:function(e,t){var i={},n=this._get(e,this,i);t=t<0?n.length-Math.floor(-t):Math.floor(t),t||(t=0);var r=Array.prototype.slice.call(arguments,1),o=n.splice.apply(n,r),s=Math.max(r.length-2,0);return(s||o.length)&&this._notifySplice(n,i.path,t,s,o),o},shift:function(e){var t={},i=this._get(e,this,t),n=Boolean(i.length),r=Array.prototype.slice.call(arguments,1),o=i.shift.apply(i,r);return n&&this._notifySplice(i,t.path,0,0,[o]),o},unshift:function(e){var t={},i=this._get(e,this,t),n=Array.prototype.slice.call(arguments,1),r=i.unshift.apply(i,n);return n.length&&this._notifySplice(i,t.path,0,n.length,[]),r},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),i="";if(t){var n=t.getAttribute("assetpath")||"";i=Polymer.ResolveUrl.resolveUrl(n,t.ownerDocument.baseURI)}return Polymer.ResolveUrl.resolveUrl(e,i)}}),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},i=t,n=0,r=e.length;n<r;n++)switch(e[n]){case this.OPEN_BRACE:i.rules||(i.rules=[]);var o=i,s=o.rules[o.rules.length-1];i={start:n+1,parent:o,previous:s},o.rules.push(i);break;case this.CLOSE_BRACE:i.end=n+1,i=i.parent||t}return t},_parseCss:function(e,t){var i=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=i.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;i=t.substring(n,e.start-1),i=this._expandUnicodeEscapes(i),i=i.replace(this._rx.multipleSpaces," "),i=i.substring(i.lastIndexOf(";")+1);var r=e.parsedSelector=e.selector=i.trim();e.atRule=0===r.indexOf(this.AT_START),e.atRule?0===r.indexOf(this.MEDIA_START)?e.type=this.types.MEDIA_RULE:r.match(this._rx.keyframesRule)&&(e.type=this.types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(this._rx.multipleSpaces).pop()):0===r.indexOf(this.VAR_START)?e.type=this.types.MIXIN_RULE:e.type=this.types.STYLE_RULE}var o=e.rules;if(o)for(var s,a=0,l=o.length;a<l&&(s=o[a]);a++)this._parseCss(s,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,i){i=i||"";var n="";if(e.cssText||e.rules){var r=e.rules;if(!r||!t&&this._hasMixinRules(r))n=t?e.cssText:this.removeCustomProps(e.cssText),n=n.trim(),n&&(n="  "+n+"\n");else for(var o,s=0,a=r.length;s<a&&(o=r[s]);s++)n=this.stringify(o,t,n)}return n&&(e.selector&&(i+=e.selector+" "+this.OPEN_BRACE+"\n"),i+=n,e.selector&&(i+=this.CLOSE_BRACE+"\n\n")),i},_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,i){return"string"==typeof e&&(e=this.parser.parse(e)),t&&this.forEachRule(e,t),this.parser.stringify(e,i)},forRulesInStyles:function(e,t,i){if(e)for(var n,r=0,o=e.length;r<o&&(n=e[r]);r++)this.forEachRule(this.rulesForStyle(n),t,i)},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,i){if(e){var n=!1;e.type===this.ruleTypes.STYLE_RULE?t(e):i&&e.type===this.ruleTypes.KEYFRAMES_RULE?i(e):e.type===this.ruleTypes.MIXIN_RULE&&(n=!0);var r=e.rules;if(r&&!n)for(var o,s=0,a=r.length;s<a&&(o=r[s]);s++)this.forEachRule(o,t,i)}},applyCss:function(e,t,i,n){var r=this.createScopeStyle(e,t);return this.applyStyle(r,i,n)},applyStyle:function(e,t,i){t=t||document.head;var n=i&&i.nextSibling||t.firstChild;return this.__lastHeadApplyNode=e,t.insertBefore(e,n)},createScopeStyle:function(e,t){var i=document.createElement("style");return t&&i.setAttribute("scope",t),i.textContent=e,i},__lastHeadApplyNode:null,applyStylePlaceHolder:function(e){var t=document.createComment(" Shady DOM styles for "+e+" "),i=this.__lastHeadApplyNode?this.__lastHeadApplyNode.nextSibling:null,n=document.head;return n.insertBefore(t,i||n.firstChild),this.__lastHeadApplyNode=t,t},cssFromModules:function(e,t){for(var i=e.trim().split(" "),n="",r=0;r<i.length;r++)n+=this.cssFromModule(i[r],t);return n},cssFromModule:function(e,t){var i=Polymer.DomModule["import"](e);return i&&!i._cssText&&(i._cssText=this.cssFromElement(i)),!i&&t&&console.warn("Could not find style data in module named",e),i&&i._cssText||""},cssFromElement:function(e){for(var t,i="",n=e.content||e,r=Polymer.TreeApi.arrayCopy(n.querySelectorAll(this.MODULE_STYLES_SELECTOR)),o=0;o<r.length;o++)if(t=r[o],"template"===t.localName)i+=this.cssFromElement(t);else if("style"===t.localName){var s=t.getAttribute(this.INCLUDE_ATTR);s&&(i+=this.cssFromModules(s,!0)),t=t.__appliedElement||t,t.parentNode.removeChild(t),i+=this.resolveCss(t.textContent,e.ownerDocument)}else t["import"]&&t["import"].body&&(i+=this.resolveCss(t["import"].body.textContent,t["import"]));return i},resolveCss:Polymer.ResolveUrl.resolveCss,parser:Polymer.CssParse,ruleTypes:Polymer.CssParse.types}}(),Polymer.StyleTransformer=function(){var e=Polymer.Settings.useNativeShadow,t=Polymer.StyleUtil,i={dom:function(e,t,i,n){this._transformDom(e,t||"",i,n)},_transformDom:function(e,t,i,n){e.setAttribute&&this.element(e,t,i,n);for(var r=Polymer.dom(e).childNodes,o=0;o<r.length;o++)this._transformDom(r[o],t,i,n)},element:function(e,t,i,r){if(i)r?e.removeAttribute(n):e.setAttribute(n,t);else if(t)if(e.classList)r?(e.classList.remove(n),e.classList.remove(t)):(e.classList.add(n),e.classList.add(t));else if(e.getAttribute){var o=e.getAttribute(v);r?o&&e.setAttribute(v,o.replace(n,"").replace(t,"")):e.setAttribute(v,(o?o+" ":"")+n+" "+t)}},elementStyles:function(i,n){for(var r,o=i._styles,s="",a=0,l=o.length;a<l&&(r=o[a]);a++){var h=t.rulesForStyle(r);s+=e?t.toCssText(h,n):this.css(h,i.is,i["extends"],n,i._scopeCssViaAttr)+"\n\n"}return s.trim()},css:function(e,i,n,r,o){var s=this._calcHostScope(i,n);i=this._calcElementScope(i,o);var a=this;return t.toCssText(e,function(e){e.isScoped||(a.rule(e,i,s),e.isScoped=!0),r&&r(e,i,s)})},_calcElementScope:function(e,t){return e?t?_+e+m:p+e:""},_calcHostScope:function(e,t){return t?"[is="+e+"]":e},rule:function(e,t,i){this._transformRule(e,this._transformComplexSelector,t,i)},_transformRule:function(e,i,n,r){var s=e.selector.split(o);if(!t.isKeyframesSelector(e))for(var a,l=0,h=s.length;l<h&&(a=s[l]);l++)s[l]=i.call(this,a,n,r);e.selector=e.transformedSelector=s.join(o)},_transformComplexSelector:function(e,t,i){var n=!1,r=!1,l=this;return e=e.replace(g,a+" $1"),e=e.replace(s,function(e,o,s){if(n)s=s.replace(f," ");else{var a=l._transformCompoundSelector(s,o,t,i);n=n||a.stop,r=r||a.hostContext,o=a.combinator,s=a.value}return o+s}),r&&(e=e.replace(u,function(e,t,n,r){return t+n+" "+i+r+o+" "+t+i+n+r})),e},_transformCompoundSelector:function(e,t,i,n){var r=e.search(f),o=!1;e.indexOf(c)>=0?o=!0:e.indexOf(a)>=0?(e=e.replace(h,function(e,t,i){return n+i}),e=e.replace(a,n)):0!==r&&(e=i?this._transformSimpleSelector(e,i):e),e.indexOf(d)>=0&&(t="");var s;return r>=0&&(e=e.replace(f," "),s=!0),{value:e,combinator:t,stop:s,hostContext:o}},_transformSimpleSelector:function(e,t){var i=e.split(y);return i[0]+=t,i.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(f)?this._transformComplexSelector(e,r):this._transformSimpleSelector(e.trim(),r)},SCOPE_NAME:"style-scope"},n=i.SCOPE_NAME,r=":not(["+n+"]):not(."+n+")",o=",",s=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,a=":host",l=":root",h=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g,c=":host-context",u=/(.*)(?::host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/,d="::content",f=/::content|::shadow|\/deep\//,p=".",_="["+n+"~=",m="]",y=":",v="class",g=new RegExp("^("+d+")");return i}(),Polymer.StyleExtends=function(){var e=Polymer.StyleUtil;return{hasExtends:function(e){return Boolean(e.match(this.rx.EXTEND))},transform:function(t){var i=e.rulesForStyle(t),n=this;return e.forEachRule(i,function(e){if(n._mapRuleOntoParent(e),e.parent)for(var t;t=n.rx.EXTEND.exec(e.cssText);){var i=t[1],r=n._findExtendor(i,e);r&&n._extendRule(e,r)}e.cssText=e.cssText.replace(n.rx.EXTEND,"");
  }),e.toCssText(i,function(e){e.selector.match(n.rx.STRIP)&&(e.cssText="")},!0)},_mapRuleOntoParent:function(e){if(e.parent){for(var t,i=e.parent.map||(e.parent.map={}),n=e.selector.split(","),r=0;r<n.length;r++)t=n[r],i[t.trim()]=e;return i}},_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,i=Polymer.StyleUtil,n=Polymer.StyleTransformer,r=Polymer.StyleExtends;Polymer.Base._addFeature({_prepElement:function(t){this._encapsulateStyle&&n.element(t,this.is,this._scopeCssViaAttr),e.call(this,t)},_prepStyles:function(){t||(this._scopeStyle=i.applyStylePlaceHolder(this.is))},_prepShimStyles:function(){if(this._template){void 0===this._encapsulateStyle&&(this._encapsulateStyle=!t),this._styles=this._collectStyles();var e=n.elementStyles(this);this._prepStyleProperties(),!this._needsStyleProperties()&&this._styles.length&&i.applyCss(e,this.is,t?this._template.content:null,this._scopeStyle)}else this._styles=[]},_collectStyles:function(){var e=[],t="",n=this.styleModules;if(n)for(var o,s=0,a=n.length;s<a&&(o=n[s]);s++)t+=i.cssFromModule(o);t+=i.cssFromModule(this.is);var l=this._template&&this._template.parentNode;if(!this._template||l&&l.id.toLowerCase()===this.is||(t+=i.cssFromElement(this._template)),t){var h=document.createElement("style");h.textContent=t,r.hasExtends(h.textContent)&&(t=r.transform(h)),e.push(h)}return e},_elementAdd:function(e){this._encapsulateStyle&&(e.__styleScoped?e.__styleScoped=!1:n.dom(e,this.is,this._scopeCssViaAttr))},_elementRemove:function(e){this._encapsulateStyle&&n.dom(e,this.is,this._scopeCssViaAttr,!0)},scopeSubtree:function(e,i){if(!t){var n=this,r=function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.getAttribute("class");e.setAttribute("class",n._scopeElementClass(e,t));for(var i,r=e.querySelectorAll("*"),o=0;o<r.length&&(i=r[o]);o++)t=i.getAttribute("class"),i.setAttribute("class",n._scopeElementClass(i,t))}};if(r(e),i){var o=new MutationObserver(function(e){for(var t,i=0;i<e.length&&(t=e[i]);i++)if(t.addedNodes)for(var n=0;n<t.addedNodes.length;n++)r(t.addedNodes[n])});return o.observe(e,{childList:!0,subtree:!0}),o}}}})}(),Polymer.StyleProperties=function(){"use strict";function e(e,t){var i=parseInt(e/32),n=1<<e%32;t[i]=(t[i]||0)|n}var t=Polymer.Settings.useNativeShadow,i=Polymer.DomApi.matchesSelector,n=Polymer.StyleUtil,r=Polymer.StyleTransformer;return{decorateStyles:function(e){var t=this,i={},r=[];n.forRulesInStyles(e,function(e){t.decorateRule(e),t.collectPropertiesInCssText(e.propertyInfo.cssText,i)},function(e){r.push(e)}),e._keyframes=r;var o=[];for(var s in i)o.push(s);return o},decorateRule:function(e){if(e.propertyInfo)return e.propertyInfo;var t={},i={},n=this.collectProperties(e,i);return n&&(t.properties=i,e.rules=null),t.cssText=this.collectCssText(e),e.propertyInfo=t,t},collectProperties:function(e,t){var i=e.propertyInfo;if(!i){for(var n,r,o=this.rx.VAR_ASSIGN,s=e.parsedCssText;n=o.exec(s);)t[n[1]]=(n[2]||n[3]).trim(),r=!0;return r}if(i.properties)return Polymer.Base.mixin(t,i.properties),!0},collectCssText:function(e){return this.collectConsumingCssText(e.parsedCssText)},collectConsumingCssText:function(e){return e.replace(this.rx.BRACKETED,"").replace(this.rx.VAR_ASSIGN,"")},collectPropertiesInCssText:function(e,t){for(var i;i=this.rx.VAR_CAPTURE.exec(e);){t[i[1]]=!0;var n=i[2];n&&n.match(this.rx.IS_VAR)&&(t[n]=!0)}},reify:function(e){for(var t,i=Object.getOwnPropertyNames(e),n=0;n<i.length;n++)t=i[n],e[t]=this.valueForProperty(e[t],e)},valueForProperty:function(e,t){if(e)if(e.indexOf(";")>=0)e=this.valueForProperties(e,t);else{var i=this,n=function(e,n,r,o){var s=i.valueForProperty(t[r],t)||(t[o]?i.valueForProperty(t[o],t):o);return n+(s||"")};e=e.replace(this.rx.VAR_MATCH,n)}return e&&e.trim()||""},valueForProperties:function(e,t){for(var i,n,r=e.split(";"),o=0;o<r.length;o++)if(i=r[o]){if(n=i.match(this.rx.MIXIN_MATCH))i=this.valueForProperty(t[n[1]],t);else{var s=i.indexOf(":");if(s!==-1){var a=i.substring(s);a=a.trim(),a=this.valueForProperty(a,t)||a,i=i.substring(0,s)+a}}r[o]=i&&i.lastIndexOf(";")===i.length-1?i.slice(0,-1):i||""}return r.join(";")},applyProperties:function(e,t){var i="";e.propertyInfo||this.decorateRule(e),e.propertyInfo.cssText&&(i=this.valueForProperties(e.propertyInfo.cssText,t)),e.cssText=i},applyKeyframeTransforms:function(e,t){var i=e.cssText,n=e.cssText;if(null==e.hasAnimations&&(e.hasAnimations=this.rx.ANIMATION_MATCH.test(i)),e.hasAnimations){var r;if(null==e.keyframeNamesToTransform){e.keyframeNamesToTransform=[];for(var o in t)r=t[o],n=r(i),i!==n&&(i=n,e.keyframeNamesToTransform.push(o))}else{for(var s=0;s<e.keyframeNamesToTransform.length;++s)r=t[e.keyframeNamesToTransform[s]],i=r(i);n=i}}e.cssText=n},propertyDataFromStyles:function(t,r){var o={},s=this,a=[],l=0;return n.forRulesInStyles(t,function(t){t.propertyInfo||s.decorateRule(t),r&&t.propertyInfo.properties&&i.call(r,t.transformedSelector||t.parsedSelector)&&(s.collectProperties(t,o),e(l,a)),l++}),{properties:o,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 i={},r=this;return n.forRulesInStyles(e,function(e){e.propertyInfo||r.decorateRule(e);for(var n=0;n<t.length;n++)if(e.parsedSelector===t[n])return void r.collectProperties(e,i)}),i},transformStyles:function(e,i,n){var o=this,s=r._calcHostScope(e.is,e["extends"]),a=e["extends"]?"\\"+s.slice(0,-1)+"\\]":s,l=new RegExp(this.rx.HOST_PREFIX+a+this.rx.HOST_SUFFIX),h=this._elementKeyframeTransforms(e,n);return r.elementStyles(e,function(r){o.applyProperties(r,i),t||Polymer.StyleUtil.isKeyframesSelector(r)||!r.cssText||(o.applyKeyframeTransforms(r,h),o._scopeSelector(r,l,s,e._scopeCssViaAttr,n))})},_elementKeyframeTransforms:function(e,i){var n=e._styles._keyframes,r={};if(!t&&n)for(var o=0,s=n[o];o<n.length;s=n[++o])this._scopeKeyframes(s,i),r[s.keyframesName]=this._keyframesRuleTransformer(s);return r},_keyframesRuleTransformer:function(e){return function(t){return t.replace(e.keyframesNameRx,e.transformedKeyframesName)}},_scopeKeyframes:function(e,t){e.keyframesNameRx=new RegExp(e.keyframesName,"g"),e.transformedKeyframesName=e.keyframesName+"-"+t,e.transformedSelector=e.transformedSelector||e.selector,e.selector=e.transformedSelector.replace(e.keyframesName,e.transformedKeyframesName)},_scopeSelector:function(e,t,i,n,o){e.transformedSelector=e.transformedSelector||e.selector;for(var s,a=e.transformedSelector,l=n?"["+r.SCOPE_NAME+"~="+o+"]":"."+o,h=a.split(","),c=0,u=h.length;c<u&&(s=h[c]);c++)h[c]=s.match(t)?s.replace(i,l):l+" "+s;e.selector=h.join(",")},applyElementScopeSelector:function(e,t,i,n){var o=n?e.getAttribute(r.SCOPE_NAME):e.getAttribute("class")||"",s=i?o.replace(i,t):(o?o+" ":"")+this.XSCOPE_NAME+" "+t;o!==s&&(n?e.setAttribute(r.SCOPE_NAME,s):e.setAttribute("class",s))},applyElementStyle:function(e,i,r,o){var s=o?o.textContent||"":this.transformStyles(e,i,r),a=e._customStyle;return a&&!t&&a!==o&&(a._useCount--,a._useCount<=0&&a.parentNode&&a.parentNode.removeChild(a)),t?e._customStyle?(e._customStyle.textContent=s,o=e._customStyle):s&&(o=n.applyCss(s,r,e.root)):o?o.parentNode||n.applyStyle(o,null,e._scopeStyle):s&&(o=n.applyCss(s,r,null,e._scopeStyle)),o&&(o._useCount=o._useCount||0,e._customStyle!=o&&o._useCount++,e._customStyle=o),o},mixinCustomStyle:function(e,t){var i;for(var n in t)i=t[n],(i||0===i)&&(e[n]=i)},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,i,n){t.keyValues=i,t.styles=n;var r=this.cache[e]=this.cache[e]||[];r.push(t),r.length>this.MAX&&r.shift()},retrieve:function(e,t,i){var n=this.cache[e];if(n)for(var r,o=n.length-1;o>=0;o--)if(r=n[o],i===r.styles&&this._objectsEqual(t,r.keyValues))return r},clear:function(){this.cache={}},_objectsEqual:function(e,t){var i,n;for(var r in e)if(i=e[r],n=t[r],!("object"==typeof i&&i?this._objectsStrictlyEqual(i,n):i===n))return!1;return!Array.isArray(e)||e.length===t.length},_objectsStrictlyEqual:function(e,t){return this._objectsEqual(e,t)&&this._objectsEqual(t,e)}}}(),Polymer.StyleDefaults=function(){var e=Polymer.StyleProperties,t=Polymer.StyleCache,i={_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,i=0;i<this._styles.length;i++)t=this._styles[i],t=t.__importElement||t,t._apply()}};return i}(),function(){"use strict";var e=Polymer.Base.serializeValueToAttribute,t=Polymer.StyleProperties,i=Polymer.StyleTransformer,n=Polymer.StyleDefaults,r=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 n},_updateStyleProperties:function(){var e,i=this._findStyleHost();i._styleCache||(i._styleCache=new Polymer.StyleCache);var n=t.propertyDataFromStyles(i._styles,this);n.key.customStyle=this.customStyle,e=i._styleCache.retrieve(this.is,n.key,this._styles);var s=Boolean(e);s?this._styleProperties=e._styleProperties:this._computeStyleProperties(n.properties),this._computeOwnStyleProperties(),s||(e=o.retrieve(this.is,this._ownStyleProperties,this._styles));var a=Boolean(e)&&!s,l=this._applyStyleProperties(e);s||(l=l&&r?l.cloneNode(!0):l,e={style:l,_scopeSelector:this._scopeSelector,_styleProperties:this._styleProperties},n.key.customStyle={},this.mixin(n.key.customStyle,this.customStyle),i._styleCache.store(this.is,e,n.key,this._styles),a||o.store(this.is,Object.create(e),this._ownStyleProperties,this._styles))},_computeStyleProperties:function(e){var i=this._findStyleHost();i._styleProperties||i._computeStyleProperties();var n=Object.create(i._styleProperties);this.mixin(n,t.hostPropertiesFromStyles(this._styles)),e=e||t.propertyDataFromStyles(i._styles,this).properties,this.mixin(n,e),this.mixin(n,t.scopePropertiesFromStyles(this._styles)),t.mixinCustomStyle(n,this.customStyle),t.reify(n),this._styleProperties=n},_computeOwnStyleProperties:function(){for(var e,t={},i=0;i<this._ownStylePropertyNames.length;i++)e=this._ownStylePropertyNames[i],t[e]=this._styleProperties[e];this._ownStyleProperties=t},_scopeCount:0,_applyStyleProperties:function(e){var i=this._scopeSelector;this._scopeSelector=e?e._scopeSelector:this.is+"-"+this.__proto__._scopeCount++;var n=t.applyElementStyle(this,this._styleProperties,this._scopeSelector,e&&e.style);return r||t.applyElementScopeSelector(this,this._scopeSelector,i,this._scopeCssViaAttr),n},serializeValueToAttribute:function(t,i,n){if(n=n||this,"class"===i&&!r){var o=n===this?this.domHost||this.dataHost:this;o&&(t=o._scopeElementClass(n,t))}n=this.shadyRoot&&this.shadyRoot._hasDistributed?Polymer.dom(n):n,e.call(this,t,i,n)},_scopeElementClass:function(e,t){return r||this._scopeCssViaAttr||(t=(t?t+" ":"")+s+" "+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,i=Polymer.dom(e)._query(function(e){return e.shadyRoot||e.shadowRoot}),n=0,r=i.length;n<r&&(t=i[n]);n++)t.updateStyles&&t.updateStyles()}}),Polymer.updateStyles=function(e){n.updateStyles(e),Polymer.Base._updateRootStyles(document)};var o=new Polymer.StyleCache;Polymer.customStyleCache=o;var s=i.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,i=Polymer.CssParse,n=Polymer.StyleDefaults,r=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(n.addStyle(e),e.textContent||this.include)this._apply(!0);else{var t=this,i=new MutationObserver(function(){i.disconnect(),t._apply(!0)});i.observe(e,{childList:!0})}}},_apply:function(e){var i=this.__appliedElement||this;if(this.include&&(i.textContent=t.cssFromModules(this.include,!0)+i.textContent),i.textContent){t.forEachRule(t.rulesForStyle(i),function(e){r.documentRule(e)});var n=this,o=function(){n._applyCustomProperties(i)};this._pendingApplyProperties&&(cancelAnimationFrame(this._pendingApplyProperties),this._pendingApplyProperties=null),e?this._pendingApplyProperties=requestAnimationFrame(o):o()}},_applyCustomProperties:function(n){this._computeStyleProperties();var r=this._styleProperties,o=t.rulesForStyle(n);n.textContent=t.toCssText(o,function(t){var n=t.cssText=t.parsedCssText;t.propertyInfo&&t.propertyInfo.cssText&&(n=i.removeCustomPropAssignment(n),t.cssText=e.valueForProperties(n,r))})}})}(),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 i=this._constructorImpl,n=function(e,t){i.call(this,e,t)};n.prototype=t,t.constructor=n,e._content._ctor=n,this.ctor=n},_getRootDataHost:function(){return this.dataHost&&this.dataHost._rootDataHost||this.dataHost},_showHideChildrenImpl:function(e){for(var t=this._children,i=0;i<t.length;i++){var n=t[i];Boolean(e)!=Boolean(n.__hideTemplateChildren__)&&(n.nodeType===Node.TEXT_NODE?e?(n.__polymerTextContent__=n.textContent,n.textContent=""):n.textContent=n.__polymerTextContent__:n.style&&(e?(n.__polymerDisplay__=n.style.display,n.style.display="none"):n.style.display=n.__polymerDisplay__)),n.__hideTemplateChildren__=e}},__setPropertyImpl:function(e,t,i,n){n&&n.__hideTemplateChildren__&&"textContent"==e&&(e="__polymerTextContent__"),this.__setPropertyOrig(e,t,i,n)},_debounceTemplate:function(e){Polymer.dom.addDebouncer(this.debounce("_debounceTemplate",e))},_flushTemplates:function(){Polymer.dom.flush()},_customPrepEffects:function(e){var t=e._parentProps;for(var i in t)e._addPropertyEffect(i,"function",this._createHostPropEffector(i));for(i in this._instanceProps)e._addPropertyEffect(i,"function",this._createInstancePropEffector(i))},_customPrepAnnotations:function(e,t){e._template=t;var i=t._content;if(!i._notes){var n=e._rootDataHost;n&&(Polymer.Annotations.prepElement=function(){n._prepElement()}),i._notes=Polymer.Annotations.parseAnnotations(t),Polymer.Annotations.prepElement=null,this._processAnnotations(i._notes)}e._notes=i._notes,e._parentProps=i._parentProps},_prepParentProperties:function(e,t){var i=this._parentProps=e._parentProps;if(this._forwardParentProp&&i){var n,r=e._parentPropProto;if(!r){for(n in this._instanceProps)delete i[n];r=e._parentPropProto=Object.create(null),t!=this&&(Polymer.Bind.prepareModel(r),Polymer.Base.prepareModelNotifyPath(r));for(n in i){var o=this._parentPropPrefix+n,s=[{kind:"function",effect:this._createForwardPropEffector(n),fn:Polymer.Bind._functionEffect},{kind:"notify",fn:Polymer.Bind._notifyEffect,effect:{event:Polymer.CaseMap.camelToDashCase(o)+"-changed"}}];Polymer.Bind._createAccessors(r,o,s)}}var a=this;t!=this&&(Polymer.Bind.prepareInstance(t),t._forwardParentProp=function(e,t){a._forwardParentProp(e,t)}),this._extendTemplate(t,r),t._pathEffector=function(e,t,i){return a._pathEffectorImpl(e,t,i)}}},_createForwardPropEffector:function(e){return function(t,i){this._forwardParentProp(e,i)}},_createHostPropEffector:function(e){var t=this._parentPropPrefix;return function(i,n){this.dataHost._templatized[t+e]=n}},_createInstancePropEffector:function(e){return function(t,i,n,r){r||this.dataHost._forwardInstanceProp(this,e,i)}},_extendTemplate:function(e,t){var i=Object.getOwnPropertyNames(t);t._propertySetter&&(e._propertySetter=t._propertySetter);for(var n,r=0;r<i.length&&(n=i[r]);r++){var o=e[n],s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s),void 0!==o&&e._propertySetter(n,o)}},_showHideChildren:function(e){},_forwardInstancePath:function(e,t,i){},_forwardInstanceProp:function(e,t,i){},_notifyPathUpImpl:function(e,t){var i=this.dataHost,n=e.indexOf("."),r=n<0?e:e.slice(0,n);i._forwardInstancePath.call(i,this,e,t),r in i._parentProps&&i._templatized._notifyPath(i._parentPropPrefix+e,t)},_pathEffectorImpl:function(e,t,i){if(this._forwardParentPath&&0===e.indexOf(this._parentPropPrefix)){var n=e.substring(this._parentPropPrefix.length),r=this._modelForPath(n);r in this._parentProps&&this._forwardParentPath(n,t)}Polymer.Base._pathEffector.call(this._templatized,e,t,i)},_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 i=[],n=this.root.firstChild;n;n=n.nextSibling)i.push(n),n._templateInstance=this;this._children=i,t.__hideTemplateChildren__&&this._showHideChildren(!0),this._tryReady()},_listenImpl:function(e,t,i){var n=this,r=this._rootDataHost,o=r._createEventHandler(e,t,i),s=function(e){e.model=n,o(e)};r._listen(e,t,s)},_scopeElementClassImpl:function(e,t){var i=this._rootDataHost;return i?i._scopeElementClass(e,t):t},stamp:function(e){if(e=e||{},this._parentProps){var t=this._templatized;for(var i in this._parentProps)void 0===e[i]&&(e[i]=t[this._parentPropPrefix+i])}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={},i=this.store,n=0;n<i.length;n++){var r=i[n];r&&"object"==typeof r?e.set(r,n):t[r]=n}},add:function(e){var t=this.store.push(e)-1;return e&&"object"==typeof e?this.omap.set(e,t):this.pmap[e]=t,"#"+t},removeKey:function(e){(e=this._parseKey(e))&&(this._removeFromMap(this.store[e]),delete this.store[e])},_removeFromMap:function(e){e&&"object"==typeof e?this.omap["delete"](e):delete this.pmap[e]},remove:function(e){var t=this.getKey(e);return this.removeKey(t),t},getKey:function(e){var t;if(t=e&&"object"==typeof e?this.omap.get(e):this.pmap[e],void 0!=t)return"#"+t},getKeys:function(){return Object.keys(this.store).map(function(e){return"#"+e})},_parseKey:function(e){if(e&&"#"==e[0])return e.slice(1)},setItem:function(e,t){if(e=this._parseKey(e)){var i=this.store[e];i&&this._removeFromMap(i),t&&"object"==typeof t?this.omap.set(t,e):this.pmap[t]=e,this.store[e]=t}},getItem:function(e){if(e=this._parseKey(e))return this.store[e]},getItems:function(){var e=[],t=this.store;for(var i in t)e.push(t[i]);return e},_applySplices:function(e){for(var t,i,n={},r=0;r<e.length&&(i=e[r]);r++){i.addedKeys=[];for(var o=0;o<i.removed.length;o++)t=this.getKey(i.removed[o]),n[t]=n[t]?null:-1;for(o=0;o<i.addedCount;o++){var s=this.userArray[i.index+o];t=this.getKey(s),t=void 0===t?this.add(s):t,n[t]=n[t]?null:1,i.addedKeys.push(t)}}var a=[],l=[];for(t in n)n[t]<0&&(this.removeKey(t),a.push(t)),n[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 i=Polymer._collections.get(e);return i?i._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,i=0;i<t.length;i++)if(0===e.indexOf(t[i]))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 i=this._instances[t];i.isPlaceholder&&t<this._limit?i=this._insertInstance(t,i.__key__):!i.isPlaceholder&&t>=this._limit&&(i=this._downgradeInstance(t,i.__key__)),e[i.__key__]=t,i.isPlaceholder||i.__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 i=this.items;if(i)for(var n=0;n<i.length;n++)e.push(t.getKey(i[n]))}var r=this;for(this._filterFn&&(e=e.filter(function(e){return r._filterFn(t.getItem(e))})),this._sortFn&&e.sort(function(e,i){return r._sortFn(t.getItem(e),t.getItem(i))}),n=0;n<e.length;n++){var o=e[n],s=this._instances[n];s?(s.__key__=o,!s.isPlaceholder&&n<this._limit&&s.__setProperty(this.as,t.getItem(o),!0)):n<this._limit?this._insertInstance(n,o):this._insertPlaceholder(n,o)}for(var a=this._instances.length-1;a>=n;a--)this._detachAndRemoveInstance(a)},_numericSort:function(e,t){return e-t},_applySplicesUserSort:function(e){for(var t,i,n=this.collection,r={},o=0;o<e.length&&(i=e[o]);o++){for(var s=0;s<i.removed.length;s++)t=i.removed[s],r[t]=r[t]?null:-1;for(s=0;s<i.added.length;s++)t=i.added[s],r[t]=r[t]?null:1}var a=[],l=[];for(t in r)r[t]===-1&&a.push(this._keyToInstIdx[t]),1===r[t]&&l.push(t);if(a.length)for(a.sort(this._numericSort),o=a.length-1;o>=0;o--){var h=a[o];void 0!==h&&this._detachAndRemoveInstance(h)}var c=this;if(l.length){this._filterFn&&(l=l.filter(function(e){return c._filterFn(n.getItem(e))})),l.sort(function(e,t){return c._sortFn(n.getItem(e),n.getItem(t))});var u=0;for(o=0;o<l.length;o++)u=this._insertRowUserSort(u,l[o])}},_insertRowUserSort:function(e,t){for(var i=this.collection,n=i.getItem(t),r=this._instances.length-1,o=-1;e<=r;){var s=e+r>>1,a=this._instances[s].__key__,l=this._sortFn(i.getItem(a),n);if(l<0)e=s+1;else{if(!(l>0)){o=s;break}r=s-1}}return o<0&&(o=r+1),this._insertPlaceholder(o,t),o},_applySplicesArrayOrder:function(e){for(var t,i=0;i<e.length&&(t=e[i]);i++){for(var n=0;n<t.removed.length;n++)this._detachAndRemoveInstance(t.index);for(n=0;n<t.addedKeys.length;n++)this._insertPlaceholder(t.index+n,t.addedKeys[n])}},_detachInstance:function(e){var t=this._instances[e];if(!t.isPlaceholder){for(var i=0;i<t._children.length;i++){var n=t._children[i];Polymer.dom(t.root).appendChild(n)}return t}},_attachInstance:function(e,t){var i=this._instances[e];i.isPlaceholder||t.insertBefore(i.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 i={__key__:t};return i[this.as]=this.collection.getItem(t),i[this.indexAs]=e,this.stamp(i)},_insertInstance:function(e,t){var i=this._pool.pop();i?(i.__setProperty(this.as,this.collection.getItem(t),!0),i.__setProperty("__key__",t,!0)):i=this._stampInstance(e,t);var n=this._instances[e+1],r=n&&!n.isPlaceholder?n._children[0]:this,o=Polymer.dom(this).parentNode;return Polymer.dom(o).insertBefore(i.root,r),this._instances[e]=i,i},_downgradeInstance:function(e,t){var i=this._detachInstance(e);return i&&this._pool.push(i),i={isPlaceholder:!0,__key__:t},this._instances[e]=i,i},_showHideChildren:function(e){for(var t=0;t<this._instances.length;t++)this._instances[t]._showHideChildren(e)},_forwardInstanceProp:function(e,t,i){if(t==this.as){var n;n=this._sortFn||this._filterFn?this.items.indexOf(this.collection.getItem(e.__key__)):e[this.indexAs],this.set("items."+n,i)}},_forwardInstancePath:function(e,t,i){0===t.indexOf(this.as+".")&&this._notifyPath("items."+e.__key__+"."+t.slice(this.as.length+1),i)},_forwardParentProp:function(e,t){for(var i,n=this._instances,r=0;r<n.length&&(i=n[r]);r++)i.isPlaceholder||i.__setProperty(e,t,!0)},_forwardParentPath:function(e,t){for(var i,n=this._instances,r=0;r<n.length&&(i=n[r]);r++)i.isPlaceholder||i._notifyPath(e,t,!0)},_forwardItemPath:function(e,t){if(this._keyToInstIdx){var i=e.indexOf("."),n=e.substring(0,i<0?e.length:i),r=this._keyToInstIdx[n],o=this._instances[r];o&&!o.isPlaceholder&&(i>=0?(e=this.as+"."+e.substring(i+1),o._notifyPath(e,t,!0)):o.__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),i=t.getKey(e);if(this.multi)if(this.isSelected(e))this.toggle&&this.deselect(e);else{this.push("selected",e);var n=this._selectedColl.getKey(e);this.linkPaths("selected."+n,"items."+i)}else this.toggle&&e==this.selected?this.deselect():(this.selected=e,this.selectedItem=e,this.linkPaths("selected","items."+i),this.linkPaths("selectedItem","items."+i))}}),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 i=this._instance._children;if(i&&i.length){var n=Polymer.dom(this).previousSibling;if(n!==i[i.length-1])for(var r,o=0;o<i.length&&(r=i[o]);o++)t.insertBefore(r,this)}}else{this._instance=this.stamp();var s=this._instance.root;t.insertBefore(s,this)}}},_teardownInstance:function(){if(this._instance){var e=this._instance._children;if(e&&e.length)for(var t,i=Polymer.dom(Polymer.dom(e[0]).parentNode),n=0;n<e.length&&(t=e[n]);n++)i.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 i=this._setupConfigure;this._setupConfigure=function(){i.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")}}),function(){"use strict";function e(e,t){var i="";if(e){var n=e.toLowerCase();" "===n||f.test(n)?i="space":p.test(n)?i="esc":1==n.length?t&&!c.test(n)||(i=n):i=d.test(n)?n.replace("arrow",""):"multiply"==n?"*":n}return i}function t(e){var t="";return e&&(e in a?t=a[e]:u.test(e)?(e=parseInt(e.replace("U+","0x"),16),t=String.fromCharCode(e).toLowerCase()):t=e.toLowerCase()),t}function i(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):l[e]),t}function n(n,r){return e(n.key,r)||t(n.keyIdentifier)||i(n.keyCode)||e(n.detail?n.detail.key:n.detail,r)||""}function r(e,t){var i=n(t,e.hasModifiers);return i===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function o(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce(function(e,t){var i=t.split(":"),n=i[0],r=i[1];return n in h?(e[h[n]]=!0,e.hasModifiers=!0):(e.key=n,e.event=r||"keydown"),e},{combo:e.split(":").shift()})}function s(e){return e.trim().split(" ").map(function(e){return o(e)})}var a={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},l={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:"*"},h={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},c=/[a-z0-9*]/,u=/U\+/,d=/^arrow/,f=/^space(bar)?/,p=/^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 i=s(t),n=0;n<i.length;++n)if(r(i[n],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map(function(e){return e.keyBindings});return e.indexOf(this.keyBindings)===-1&&e.push(this.keyBindings),e},_prepKeyBindings:function(){this._keyBindings={},this._collectKeyBindings().forEach(function(e){for(var t in e)this._addKeyBinding(t,e[t])},this);for(var e in this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort(function(e,t){var i=e[0].hasModifiers,n=t[0].hasModifiers;return i===n?0:i?-1:1})},_addKeyBinding:function(e,t){s(e).forEach(function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])},this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach(function(e){var t=this._keyBindings[e],i=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,i]),this.keyEventTarget.addEventListener(e,i)},this)},_unlistenKeyEventListeners:function(){for(var e,t,i,n;this._boundKeyHandlers.length;)e=this._boundKeyHandlers.pop(),t=e[0],i=e[1],n=e[2],t.removeEventListener(i,n)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var i=0;i<e.length;i++){var n=e[i][0],o=e[i][1];if(r(n,t)&&(this._triggerKeyHandler(n,o,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,i){var n=Object.create(e);n.keyboardEvent=i;var r=new CustomEvent(e.event,{detail:n,cancelable:!0});this[t].call(this,r),r.defaultPrevented&&i.preventDefault()}}}(),Polymer.IronControlState={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:Number},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0),this.addEventListener("blur",this._boundFocusBlurHandler,!0)},_focusBlurHandler:function(e){if(e.target===this)this._setFocused("focus"===e.type);else if(!this.shadowRoot){var t=Polymer.dom(e).localTarget;this.isLightDescendant(t)||this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})}},_disabledChanged:function(e,t){this.setAttribute("aria-disabled",e?"true":"false"),this.style.pointerEvents=e?"none":"",e?(this._oldTabIndex=this.tabIndex,this._setFocused(!1),this.tabIndex=-1,this.blur()):void 0!==this._oldTabIndex&&(this.tabIndex=this._oldTabIndex)},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}},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],function(){function e(e){this.element=e,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}function t(e){this.element=e,this.color=window.getComputedStyle(e).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),Polymer.dom(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}var i={distance:function(e,t,i,n){var r=e-i,o=t-n;return Math.sqrt(r*r+o*o)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};e.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(e,t){var n=i.distance(e,t,0,0),r=i.distance(e,t,this.width,0),o=i.distance(e,t,0,this.height),s=i.distance(e,t,this.width,this.height);return Math.max(n,r,o,s)}},t.MAX_RADIUS=300,t.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var e;return this.mouseDownStart?(e=i.now()-this.mouseDownStart,this.mouseUpStart&&(e-=this.mouseUpElapsed),e):0},get mouseUpElapsed(){return this.mouseUpStart?i.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var e=this.containerMetrics.width*this.containerMetrics.width,i=this.containerMetrics.height*this.containerMetrics.height,n=1.1*Math.min(Math.sqrt(e+i),t.MAX_RADIUS)+5,r=1.1-.2*(n/t.MAX_RADIUS),o=this.mouseInteractionSeconds/r,s=n*(1-Math.pow(80,-o));return Math.abs(s)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var e=.3*this.mouseUpElapsedSeconds,t=this.opacity;return Math.max(0,Math.min(e,t))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,t.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,t.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 e(this.element)},draw:function(){var e,t,i;this.wave.style.opacity=this.opacity,e=this.radius/(this.containerMetrics.size/2),t=this.xNow-this.containerMetrics.width/2,i=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+t+"px, "+i+"px)",this.waveContainer.style.transform="translate3d("+t+"px, "+i+"px, 0)",this.wave.style.webkitTransform="scale("+e+","+e+")",this.wave.style.transform="scale3d("+e+","+e+",1)"},downAction:function(e){var t=this.containerMetrics.width/2,n=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=i.now(),this.center?(this.xStart=t,this.yStart=n,this.slideDistance=i.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=e?e.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=e?e.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=t,this.yEnd=n,this.slideDistance=i.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(e){this.isMouseDown&&(this.mouseUpStart=i.now())},remove:function(){Polymer.dom(this.waveContainer.parentNode).removeChild(this.waveContainer)}},Polymer({is:"paper-ripple",behaviors:[Polymer.IronA11yKeysBehavior],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){11==this.parentNode.nodeType?this.keyEventTarget=Polymer.dom(this).getOwnerRoot().host:this.keyEventTarget=this.parentNode;var e=this.keyEventTarget;this.listen(e,"up","uiUpAction"),this.listen(e,"down","uiDownAction")},detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction"),this.unlisten(this.keyEventTarget,"down","uiDownAction"),this.keyEventTarget=null},get shouldKeepAnimating(){for(var e=0;e<this.ripples.length;++e)if(!this.ripples[e].isAnimationComplete)return!0;return!1},simulatedRipple:function(){this.downAction(null),this.async(function(){this.upAction()},1)},uiDownAction:function(e){this.noink||this.downAction(e)},downAction:function(e){if(!(this.holdDown&&this.ripples.length>0)){var t=this.addRipple();t.downAction(e),this._animating||(this._animating=!0,this.animate())}},uiUpAction:function(e){this.noink||this.upAction(e)},upAction:function(e){this.holdDown||(this.ripples.forEach(function(t){t.upAction(e)}),this._animating=!0,this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor=null,this.fire("transitionend")},addRipple:function(){var e=new t(this);return Polymer.dom(this.$.waves).appendChild(e.waveContainer),this.$.background.style.backgroundColor=e.color,this.ripples.push(e),this._setAnimating(!0),e},removeRipple:function(e){var t=this.ripples.indexOf(e);t<0||(this.ripples.splice(t,1),e.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){if(this._animating){var e,t;for(e=0;e<this.ripples.length;++e)t=this.ripples[e],t.draw(),this.$.background.style.opacity=t.outerOpacity,t.isOpacityFullyDecayed&&!t.isRestingAtMaxRadius&&this.removeRipple(t);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(e,t){void 0!==t&&(e?this.downAction():this.upAction())}})}(),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 t=this._rippleContainer||this.root;if(t&&Polymer.dom(t).appendChild(this._ripple),e){var i=Polymer.dom(this._rippleContainer||this),n=Polymer.dom(e).rootTarget;i.deepContains(n)&&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)}},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],Polymer({is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}}),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)}}),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,n){e&&i&&void 0!==t&&(i[e]=t,n.push(t))},_unregister:function(e,t,i){if(e&&t&&e in t){var n=t[e];delete t[e],this.arrayDelete(i,n)}}}),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]}})}(),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(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&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))}}),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 i=this._cloneIcon(t);if(i){var n=Polymer.dom(e);return n.insertBefore(i,n.childNodes[0]),e._svgIcon=i}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 i=e.cloneNode(!0),n=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=i.getAttribute("viewBox")||"0 0 "+t+" "+t;return n.setAttribute("viewBox",r),n.setAttribute("preserveAspectRatio","xMidYMid meet"),n.style.cssText="pointer-events: none; display: block; width: 100%; height: 100%;",n.appendChild(i).removeAttribute("id"),n}return null}}),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 t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this.unlisten(e,"iron-resize","_onDescendantIronResize"))},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){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 t=e.path?e.path[0]:e.target;t!==this&&(this._interestedResizables.indexOf(t)===-1&&(this._interestedResizables.push(t),this.listen(t,"iron-resize","_onDescendantIronResize")),t.assignParentResizable(this),this._notifyDescendant(t),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)}},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))}},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 n=i.indexOf(t);if(n>=0){var r=this._indexToValue(n);return void this._itemActivate(r,t)}t=t.parentNode}},_itemActivate:function(e,t){this.fire("iron-activate",{selected:e,item:t},{cancelable:!0}).defaultPrevented||this.select(e)}},Polymer({is:"iron-pages",behaviors:[Polymer.IronResizableBehavior,Polymer.IronSelectableBehavior],properties:{activateEvent:{type:String,value:null}},observers:["_selectedPageChanged(selected)"],_selectedPageChanged:function(e,t){this.async(this.notifyResize)}}),function(e){"use strict";function t(){function e(e){t=e}if("function"!=typeof Object.observe||"function"!=typeof Array.observe)return!1;var t=[],i={},n=[];return Object.observe(i,e),Array.observe(n,e),i.id=1,i.id=2,delete i.id,n.push(1,2),n.length=0,Object.deliverChangeRecords(e),5===t.length&&("add"==t[0].type&&"update"==t[1].type&&"delete"==t[2].type&&"splice"==t[3].type&&"splice"==t[4].type&&(Object.unobserve(i,e),Array.unobserve(n,e),!0))}function i(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if("undefined"!=typeof navigator&&navigator.getDeviceStorage)return!1;try{var e=new Function("","return true;");return e()}catch(t){return!1}}function n(e){return+e===e>>>0&&""!==e}function r(e){return+e}function o(e){return e===Object(e)}function s(e,t){return e===t?0!==e||1/e===1/t:!(!U(e)||!U(t))||e!==e&&t!==t}function a(e){if(void 0===e)return"eof";var t=e.charCodeAt(0);switch(t){case 91:case 93:case 46:case 34:case 39:case 48:return e;case 95:case 36:return"ident";case 32:case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return 97<=t&&t<=122||65<=t&&t<=90?"ident":49<=t&&t<=57?"number":"else"}function l(){}function h(e){function t(){if(!(d>=e.length)){var t=e[d+1];return"inSingleQuote"==f&&"'"==t||"inDoubleQuote"==f&&'"'==t?(d++,n=t,p.append(),!0):void 0}}for(var i,n,r,o,s,h,c,u=[],d=-1,f="beforePath",p={push:function(){void 0!==r&&(u.push(r),r=void 0)},append:function(){void 0===r?r=n:r+=n}};f;)if(d++,i=e[d],"\\"!=i||!t(f)){if(o=a(i),c=G[f],s=c[o]||c["else"]||"error","error"==s)return;if(f=s[0],h=p[s[1]]||l,n=void 0===s[2]?i:s[2],h(),"afterPath"===f)return u}}function c(e){return $.test(e)}function u(e,t){if(t!==Y)throw Error("Use Path.get to retrieve path objects");for(var i=0;i<e.length;i++)this.push(String(e[i]));K&&this.length&&(this.getValueFrom=this.compiledGetValueFromFn())}function d(e){if(e instanceof u)return e;if(null!=e&&0!=e.length||(e=""),"string"!=typeof e){if(n(e.length))return new u(e,Y);e=String(e)}var t=Q[e];if(t)return t;var i=h(e);return i?(t=new u(i,Y),Q[e]=t,t):W}function f(e){return n(e)?"["+e+"]":'["'+e.replace(/"/g,'\\"')+'"]'}function p(t){for(var i=0;i<Z&&t.check_();)i++;return H&&(e.dirtyCheckCycleCount=i),i>0}function _(e){for(var t in e)return!1;return!0}function m(e){return _(e.added)&&_(e.removed)&&_(e.changed)}function y(e,t){var i,n={},r={},o={};for(i in t){var s=e[i];void 0!==s&&s===t[i]||(i in e?s!==t[i]&&(o[i]=s):r[i]=void 0)}for(i in e)i in t||(n[i]=e[i]);return Array.isArray(e)&&e.length!==t.length&&(o.length=e.length),{added:n,removed:r,changed:o}}function v(){if(!ee.length)return!1;for(var e=0;e<ee.length;e++)ee[e]();return ee.length=0,!0}function g(){function e(e){t&&t.state_===oe&&!n&&t.check_(e)}var t,i,n=!1,r=!0;return{open:function(i){if(t)throw Error("ObservedObject in use");r||Object.deliverChangeRecords(e),t=i,r=!1},observe:function(t,n){i=t,n?Array.observe(i,e):Object.observe(i,e)},deliver:function(t){n=t,Object.deliverChangeRecords(e),n=!1},close:function(){t=void 0,Object.unobserve(i,e),ie.push(this)}}}function b(e,t,i){var n=ie.pop()||g();return n.open(e),n.observe(t,i),n}function P(){function e(t,o){t&&(t===n&&(r[o]=!0),a.indexOf(t)<0&&(a.push(t),Object.observe(t,i)),e(Object.getPrototypeOf(t),o))}function t(e){for(var t=0;t<e.length;t++){var i=e[t];if(i.object!==n||r[i.name]||"setPrototype"===i.type)return!1}return!0}function i(i){if(!t(i)){var n,r;for(n=0;n<s.length;n++)r=s[n],r.state_==oe&&r.iterateObjects_(e);for(n=0;n<s.length;n++)r=s[n],r.state_==oe&&r.check_()}}var n,r,o=0,s=[],a=[],l={objects:a,get rootObject(){return n},set rootObject(e){n=e,r={}},open:function(t,i){s.push(t),o++,t.iterateObjects_(e)},close:function(e){if(o--,!(o>0)){for(var t=0;t<a.length;t++)Object.unobserve(a[t],i),S.unobservedCount++;s.length=0,a.length=0,n=void 0,r=void 0,ne.push(this),J===this&&(J=null)}}};return l}function C(e,t){return J&&J.rootObject===t||(J=ne.pop()||P(),J.rootObject=t),J.open(e,t),J}function S(){this.state_=re,this.callback_=void 0,this.target_=void 0,this.directObserver_=void 0,this.value_=void 0,this.id_=le++}function E(e){S._allObserversCount++,ce&&he.push(e)}function A(e){S._allObserversCount--}function x(e){S.call(this),this.value_=e,this.oldObject_=void 0}function N(e){if(!Array.isArray(e))throw Error("Provided object is not an Array");x.call(this,e)}function w(e,t,i){S.call(this),this.object_=e,this.path_=d(t),this.defaultValue_=i,this.directObserver_=void 0}function O(e){S.call(this),this.reportChangesOnOpen_=e,this.value_=[],this.directObserver_=void 0,this.observed_=[]}function I(e){return e}function T(e,t,i,n){this.callback_=void 0,this.target_=void 0,this.value_=void 0,this.observable_=e,this.getValueFn_=t||I,this.setValueFn_=i||I,this.dontPassThroughSet_=n}function R(e,t,i){for(var n={},r={},o=0;o<t.length;o++){var s=t[o];fe[s.type]?(s.name in i||(i[s.name]=s.oldValue),"update"!=s.type&&("add"!=s.type?s.name in n?(delete n[s.name],delete i[s.name]):r[s.name]=!0:s.name in r?delete r[s.name]:n[s.name]=!0)):(console.error("Unknown changeRecord type: "+s.type),console.error(s))}var a;for(a in n)n[a]=e[a];for(a in r)r[a]=void 0;var l={};for(a in i)if(!(a in n||a in r)){var h=e[a];i[a]!==h&&(l[a]=h)}return{added:n,removed:r,changed:l}}function k(e,t,i){return{index:e,removed:t,addedCount:i}}function B(){}function F(e,t,i,n,r,o){return ve.calcSplices(e,t,i,n,r,o)}function D(e,t,i,n){return t<i||n<e?-1:t==i||n==e?0:e<i?t<n?t-i:n-i:n<t?n-e:t-e}function L(e,t,i,n){for(var r=k(t,i,n),o=!1,s=0,a=0;a<e.length;a++){var l=e[a];if(l.index+=s,!o){var h=D(r.index,r.index+r.removed.length,l.index,l.index+l.addedCount);if(h>=0){e.splice(a,1),a--,s-=l.addedCount-l.removed.length,r.addedCount+=l.addedCount-h;var c=r.removed.length+l.removed.length-h;if(r.addedCount||c){if(i=l.removed,r.index<l.index){var u=r.removed.slice(0,l.index-r.index);Array.prototype.push.apply(u,i),i=u}if(r.index+r.removed.length>l.index+l.addedCount){var d=r.removed.slice(l.index+l.addedCount-r.index);Array.prototype.push.apply(i,d)}r.removed=i,l.index<r.index&&(r.index=l.index)}else o=!0}else if(r.index<l.index){o=!0,e.splice(a,0,r),a++;var f=r.addedCount-r.removed.length;l.index+=f,s+=f}}}o||e.push(r)}function M(e,t){for(var i=[],o=0;o<t.length;o++){var s=t[o];switch(s.type){case"splice":L(i,s.index,s.removed.slice(),s.addedCount);break;case"add":case"update":case"delete":if(!n(s.name))continue;var a=r(s.name);if(a<0)continue;L(i,a,[s.oldValue],1);break;default:console.error("Unexpected record type: "+JSON.stringify(s))}}return i}function j(e,t){var i=[];return M(e,t).forEach(function(t){return 1==t.addedCount&&1==t.removed.length?void(t.removed[0]!==e[t.index]&&i.push(t)):void(i=i.concat(F(e,t.index,t.index+t.addedCount,t.removed,0,t.removed.length)))}),i}var H=e.testingExposeCycleCount,V=t(),K=i(),U=e.Number.isNaN||function(t){return"number"==typeof t&&e.isNaN(t)},z="__proto__"in{}?function(e){return e}:function(e){var t=e.__proto__;if(!t)return e;var i=Object.create(t);return Object.getOwnPropertyNames(e).forEach(function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))}),i},q="[$_a-zA-Z]",X="[$_a-zA-Z0-9]",$=new RegExp("^"+q+"+"+X+"*$"),G={beforePath:{ws:["beforePath"],ident:["inIdent","append"],"[":["beforeElement"],eof:["afterPath"]},inPath:{ws:["inPath"],".":["beforeIdent"],"[":["beforeElement"],eof:["afterPath"]},beforeIdent:{ws:["beforeIdent"],ident:["inIdent","append"]},inIdent:{ident:["inIdent","append"],0:["inIdent","append"],number:["inIdent","append"],ws:["inPath","push"],".":["beforeIdent","push"],"[":["beforeElement","push"],eof:["afterPath","push"]},beforeElement:{ws:["beforeElement"],0:["afterZero","append"],number:["inIndex","append"],"'":["inSingleQuote","append",""],'"':["inDoubleQuote","append",""]},afterZero:{ws:["afterElement","push"],"]":["inPath","push"]},inIndex:{0:["inIndex","append"],number:["inIndex","append"],ws:["afterElement"],"]":["inPath","push"]},inSingleQuote:{"'":["afterElement"],eof:["error"],"else":["inSingleQuote","append"]},inDoubleQuote:{'"':["afterElement"],eof:["error"],"else":["inDoubleQuote","append"]},afterElement:{ws:["afterElement"],"]":["inPath","push"]}},Y={},Q={};u.get=d,u.prototype=z({__proto__:[],valid:!0,toString:function(){for(var e="",t=0;t<this.length;t++){var i=this[t];e+=c(i)?t?"."+i:i:f(i)}return e},getValueFrom:function(e,t){for(var i=0;i<this.length;i++){var n=this[i];if(null==e||!(n in e))return t;e=e[n]}return e},iterateObjects:function(e,t){for(var i=0;i<this.length;i++){if(i&&(e=e[this[i-1]]),!o(e))return;t(e,this[i])}},compiledGetValueFromFn:function(){var e="",t="obj";e+="if (obj != null";for(var i,n=0;n<this.length-1;n++)i=this[n],t+=c(i)?"."+i:f(i),e+=" &&\n    "+t+" != null";i=this[n];var r=c(i),o=r?'"'+i.replace(/"/g,'\\"')+'"':i;return e+=" &&\n    "+o+" in "+t+")\n",t+=r?"."+i:f(i),e+="  return "+t+";\nelse\n  return defaultValue;",new Function("obj","defaultValue",e)},setValueFrom:function(e,t){if(!this.length)return!1;for(var i=0;i<this.length-1;i++){if(!o(e))return!1;e=e[this[i]]}return!!o(e)&&(e[this[i]]=t,!0)}});var W=new u("",Y);W.valid=!1,W.getValueFrom=W.setValueFrom=function(){};var J,Z=1e3,ee=[],te=V?function(){return function(e){return Promise.resolve().then(e)}}():function(){return function(e){ee.push(e)}}(),ie=[],ne=[],re=0,oe=1,se=2,ae=3,le=1;S.prototype={open:function(e,t){if(this.state_!=re)throw Error("Observer has already been opened.");return E(this),this.callback_=e,this.target_=t,this.connect_(),this.state_=oe,this.value_},close:function(){this.state_==oe&&(A(this),this.disconnect_(),this.value_=void 0,this.callback_=void 0,this.target_=void 0,this.state_=se)},deliver:function(){this.state_==oe&&p(this)},report_:function(e){try{this.callback_.apply(this.target_,e)}catch(t){S._errorThrownDuringCallback=!0,console.error("Exception caught during observer callback: "+(t.stack||t))}},discardChanges:function(){return this.check_(void 0,!0),this.value_}};var he,ce=!V;S._allObserversCount=0,ce&&(he=[]);var ue=!1;e.Platform=e.Platform||{},e.Platform.performMicrotaskCheckpoint=function(){if(!ue&&ce){ue=!0;var t,i,n=0;do{n++,i=he,he=[],t=!1;for(var r=0;r<i.length;r++){var o=i[r];o.state_==oe&&(o.check_()&&(t=!0),he.push(o))}v()&&(t=!0)}while(n<Z&&t);H&&(e.dirtyCheckCycleCount=n),ue=!1}},ce&&(e.Platform.clearObservers=function(){he=[]}),x.prototype=z({__proto__:S.prototype,arrayObserve:!1,connect_:function(e,t){V?this.directObserver_=b(this,this.value_,this.arrayObserve):this.oldObject_=this.copyObject(this.value_)},copyObject:function(e){var t=Array.isArray(e)?[]:{};for(var i in e)t[i]=e[i];return Array.isArray(e)&&(t.length=e.length),t},check_:function(e,t){var i,n;if(V){if(!e)return!1;n={},i=R(this.value_,e,n)}else n=this.oldObject_,i=y(this.value_,this.oldObject_);return!m(i)&&(V||(this.oldObject_=this.copyObject(this.value_)),this.report_([i.added||{},i.removed||{},i.changed||{},function(e){return n[e]}]),!0)},disconnect_:function(){V?(this.directObserver_.close(),this.directObserver_=void 0):this.oldObject_=void 0},deliver:function(){this.state_==oe&&(V?this.directObserver_.deliver(!1):p(this))},discardChanges:function(){return this.directObserver_?this.directObserver_.deliver(!0):this.oldObject_=this.copyObject(this.value_),this.value_}}),N.prototype=z({__proto__:x.prototype,arrayObserve:!0,copyObject:function(e){return e.slice()},check_:function(e){var t;if(V){if(!e)return!1;t=j(this.value_,e)}else t=F(this.value_,0,this.value_.length,this.oldObject_,0,this.oldObject_.length);return!(!t||!t.length)&&(V||(this.oldObject_=this.copyObject(this.value_)),this.report_([t]),!0)}}),N.applySplices=function(e,t,i){i.forEach(function(i){for(var n=[i.index,i.removed.length],r=i.index;r<i.index+i.addedCount;)n.push(t[r]),r++;Array.prototype.splice.apply(e,n)})},w.prototype=z({__proto__:S.prototype,get path(){return this.path_},connect_:function(){V&&(this.directObserver_=C(this,this.object_)),this.check_(void 0,!0)},disconnect_:function(){this.value_=void 0,this.directObserver_&&(this.directObserver_.close(this),this.directObserver_=void 0)},iterateObjects_:function(e){this.path_.iterateObjects(this.object_,e)},check_:function(e,t){var i=this.value_;return this.value_=this.path_.getValueFrom(this.object_,this.defaultValue_),!t&&!s(this.value_,i)&&(this.report_([this.value_,i,this]),!0)},setValue:function(e){this.path_&&this.path_.setValueFrom(this.object_,e)}});var de={};O.prototype=z({__proto__:S.prototype,connect_:function(){if(V){for(var e,t=!1,i=0;i<this.observed_.length;i+=2)if(e=this.observed_[i],e!==de){t=!0;break}t&&(this.directObserver_=C(this,e))}this.check_(void 0,!this.reportChangesOnOpen_)},disconnect_:function(){for(var e=0;e<this.observed_.length;e+=2)this.observed_[e]===de&&this.observed_[e+1].close();this.observed_.length=0,this.value_.length=0,this.directObserver_&&(this.directObserver_.close(this),this.directObserver_=void 0)},addPath:function(e,t){if(this.state_!=re&&this.state_!=ae)throw Error("Cannot add paths once started.");if(t=d(t),this.observed_.push(e,t),this.reportChangesOnOpen_){var i=this.observed_.length/2-1;this.value_[i]=t.getValueFrom(e)}},addObserver:function(e){if(this.state_!=re&&this.state_!=ae)throw Error("Cannot add observers once started.");if(this.observed_.push(de,e),this.reportChangesOnOpen_){var t=this.observed_.length/2-1;this.value_[t]=e.open(this.deliver,this)}},startReset:function(){if(this.state_!=oe)throw Error("Can only reset while open");this.state_=ae,this.disconnect_()},finishReset:function(){if(this.state_!=ae)throw Error("Can only finishReset after startReset");return this.state_=oe,this.connect_(),this.value_},iterateObjects_:function(e){for(var t,i=0;i<this.observed_.length;i+=2)t=this.observed_[i],t!==de&&this.observed_[i+1].iterateObjects(t,e)},check_:function(e,t){for(var i,n=0;n<this.observed_.length;n+=2){var r,o=this.observed_[n],a=this.observed_[n+1];if(o===de){var l=a;r=this.state_===re?l.open(this.deliver,this):l.discardChanges()}else r=a.getValueFrom(o);t?this.value_[n/2]=r:s(r,this.value_[n/2])||(i=i||[],i[n/2]=this.value_[n/2],this.value_[n/2]=r)}return!!i&&(this.report_([this.value_,i,this.observed_]),!0)}}),T.prototype={open:function(e,t){return this.callback_=e,this.target_=t,this.value_=this.getValueFn_(this.observable_.open(this.observedCallback_,this)),this.value_},observedCallback_:function(e){if(e=this.getValueFn_(e),!s(e,this.value_)){var t=this.value_;this.value_=e,this.callback_.call(this.target_,this.value_,t)}},discardChanges:function(){return this.value_=this.getValueFn_(this.observable_.discardChanges()),this.value_},deliver:function(){return this.observable_.deliver()},setValue:function(e){if(e=this.setValueFn_(e),!this.dontPassThroughSet_&&this.observable_.setValue)return this.observable_.setValue(e)},close:function(){this.observable_&&this.observable_.close(),this.callback_=void 0,this.target_=void 0,this.observable_=void 0,this.value_=void 0,this.getValueFn_=void 0,this.setValueFn_=void 0}};var fe={add:!0,update:!0,"delete":!0},pe=0,_e=1,me=2,ye=3;B.prototype={calcEditDistances:function(e,t,i,n,r,o){var s,a,l=o-r+1,h=i-t+1,c=new Array(l);for(s=0;s<l;s++)c[s]=new Array(h),c[s][0]=s;for(a=0;a<h;a++)c[0][a]=a;for(s=1;s<l;s++)for(a=1;a<h;a++)if(this.equals(e[t+a-1],n[r+s-1]))c[s][a]=c[s-1][a-1];else{var u=c[s-1][a]+1,d=c[s][a-1]+1;c[s][a]=u<d?u:d}return c},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,i=e[0].length-1,n=e[t][i],r=[];t>0||i>0;)if(0!=t)if(0!=i){var o,s=e[t-1][i-1],a=e[t-1][i],l=e[t][i-1];o=a<l?a<s?a:s:l<s?l:s,o==s?(s==n?r.push(pe):(r.push(_e),n=s),t--,i--):o==a?(r.push(ye),t--,n=a):(r.push(me),i--,n=l)}else r.push(ye),t--;else r.push(me),i--;return r.reverse(),r},calcSplices:function(e,t,i,n,r,o){var s=0,a=0,l=Math.min(i-t,o-r);if(0==t&&0==r&&(s=this.sharedPrefix(e,n,l)),i==e.length&&o==n.length&&(a=this.sharedSuffix(e,n,l-s)),t+=s,r+=s,i-=a,o-=a,i-t==0&&o-r==0)return[];var h;if(t==i){for(h=k(t,[],0);r<o;)h.removed.push(n[r++]);return[h]}if(r==o)return[k(t,[],i-t)];for(var c=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,t,i,n,r,o)),u=[],d=t,f=r,p=0;p<c.length;p++)switch(c[p]){case pe:h&&(u.push(h),h=void 0),d++,f++;break;case _e:h||(h=k(d,[],0)),h.addedCount++,d++,h.removed.push(n[f]),f++;break;case me:h||(h=k(d,[],0)),h.addedCount++,d++;break;case ye:h||(h=k(d,[],0)),h.removed.push(n[f]),f++}return h&&u.push(h),u},sharedPrefix:function(e,t,i){for(var n=0;n<i;n++)if(!this.equals(e[n],t[n]))return n;return i},sharedSuffix:function(e,t,i){for(var n=e.length,r=t.length,o=0;o<i&&this.equals(e[--n],t[--r]);)o++;return o},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}};var ve=new B,ge=e;"undefined"==typeof exports||exports.nodeType||("undefined"!=typeof module&&module.exports&&(exports=module.exports),ge=exports),ge.Observer=S,ge.Observer.runEOM_=te,ge.Observer.observerSentinel_=de,ge.Observer.hasObjectObserve=V,ge.ArrayObserver=N,ge.ArrayObserver.calculateSplices=function(e,t){return ve.calculateSplices(e,t)},ge.ArraySplice=B,ge.ObjectObserver=x,ge.PathObserver=w,ge.CompoundObserver=O,ge.Path=u,ge.ObserverTransform=T}("undefined"!=typeof global&&global&&"undefined"!=typeof module&&module?global:this||window),function(){window.I18nMsg=window.I18nMsg||{lang:null,url:"locales",locales:{}};var e=[],t=!1,i=0;i18nMsgBehavior={properties:{language:{type:String,value:null,observer:"_languageChanged",readOnly:!0},messagesUrl:{type:String,value:"locales"},locales:{type:Object,value:{}},i18n:{type:Object,value:{}}},init:function(t){this.I18nMsg=t,this.messagesUrl=this.I18nMsg.url,this._setLanguage(this.I18nMsg.lang);var n=new PathObserver(this.I18nMsg,"lang");n.open(function(e,t){i=0,this._setLanguage(e)}.bind(this));var r=new PathObserver(this.I18nMsg,"url");r.open(function(e,t){i=0,this.messagesUrl=e,this._fetchLanguage()}.bind(this)),e.push(this)},_parentGetMsg:function(e){var t=e;if(this.locales){var i=this.locales[this.language];if(i&&i[t])return i[t].message}return null},_languageChanged:function(){return this.language&&this.locales[this.language]&&!t?(i==e.length-1&&this.fire("i18n-language-ready",{language:this.language}),this._updateMessages(),void i++):void(!this.language||this.locales[this.language]||t||this._fetchLanguage())},_fetchLanguage:function(){t=!0;var e=this.messagesUrl+"/"+this.language+".json",i=new XMLHttpRequest;i.open("GET",e),i.onload=function(e){if(t=!1,200===e.target.status||0===e.target.status){var i=JSON.parse(e.target.response);this.locales[this.language]=i,this._notifyInstances(),this.fire("i18n-language-ready",{language:this.language})}}.bind(this),i.onerror=function(e){t=!1}.bind(this),i.send()},_notifyInstances:function(){for(var t,i=0;t=e[i];++i)t._setLanguage(this.I18nMsg.lang),t.locales[this.language]=this.locales[this.language],t._updateMessages()},ready:function(){this.init(window.I18nMsg)},_setMsgs:function(e){var t=this._parentGetMsg(e);t?this.set("i18n."+e,t):console.warn(this.language+': "'+e+'" message id was not found in '+this.I18nMsg.url)},_updateMessages:function(){if(this.locales&&this.locales[this.language])if(0===Object.keys(this.i18n).length){var e=Object.keys(this.locales);e.length>0&&Object.keys(this.locales[e[0]]).forEach(function(e){this.i18n[e]="",this._setMsgs(e)}.bind(this))}else Object.keys(this.i18n).forEach(this._setMsgs.bind(this))}}}(),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],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(e,t){var i=this.getAttribute("aria-label");i&&t!=i||this.setAttribute("aria-label",e)}}),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})}},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(e){this._text="",this.async(function(){this._text=e},100)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.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)}}(),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(e){return this.invalid=!this._getValidity(e),!this.invalid},_getValidity:function(e){return!this.hasValidator()||this._validator.validate(e)},__computeValidator:function(){return Polymer.IronValidatableBehaviorMeta&&Polymer.IronValidatableBehaviorMeta.byKey(this.validator)}},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})}}),Polymer.PaperInputHelper={},Polymer.PaperInputHelper.NextLabelID=1,Polymer.PaperInputHelper.NextAddonID=1,Polymer.PaperInputBehaviorImpl={properties:{label:{type:String},value:{notify:!0,type:String},disabled:{type:Boolean,value:!1},invalid:{type:Boolean,value:!1,notify:!0},preventInvalidInput:{type:Boolean},allowedPattern:{type:String},type:{type:String},list:{type:String},pattern:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},charCounter:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},autoValidate:{type:Boolean,value:!1},validator:{type:String},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,observer:"_autofocusChanged"},inputmode:{type:String},minlength:{type:Number},maxlength:{type:Number},min:{type:String},max:{type:String},step:{type:String},name:{type:String},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1},size:{type:Number},autocapitalize:{type:String,value:"none"},autocorrect:{type:String,value:"off"},autosave:{type:String},results:{type:Number},accept:{type:String},multiple:{type:Boolean},_ariaDescribedBy:{type:String,value:""},_ariaLabelledBy:{type:String,value:""}},listeners:{"addon-attached":"_onAddonAttached"},keyBindings:{"shift+tab:keydown":"_onShiftTabDown"},hostAttributes:{tabindex:0},get inputElement(){return this.$.input},get _focusableElement(){return this.inputElement},registered:function(){this._typesThatHaveText=["date","datetime","datetime-local","month","time","week","file"]},attached:function(){this._updateAriaLabelledBy(),this.inputElement&&this._typesThatHaveText.indexOf(this.inputElement.type)!==-1&&(this.alwaysFloatLabel=!0)},_appendStringWithSpace:function(e,t){return e=e?e+" "+t:t},_onAddonAttached:function(e){var t=e.path?e.path[0]:e.target;if(t.id)this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,t.id);else{var i="paper-input-add-on-"+Polymer.PaperInputHelper.NextAddonID++;t.id=i,this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,i)}},validate:function(){return this.inputElement.validate()},_focusBlurHandler:function(e){Polymer.IronControlState._focusBlurHandler.call(this,e),this.focused&&!this._shiftTabPressed&&this._focusableElement.focus()},_onShiftTabDown:function(e){var t=this.getAttribute("tabindex");this._shiftTabPressed=!0,this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),this._shiftTabPressed=!1},1)},_handleAutoValidate:function(){this.autoValidate&&this.validate()},updateValueAndPreserveCaret:function(e){try{var t=this.inputElement.selectionStart;this.value=e,this.inputElement.selectionStart=t,this.inputElement.selectionEnd=t}catch(i){this.value=e}},_computeAlwaysFloatLabel:function(e,t){return t||e},_updateAriaLabelledBy:function(){var e=Polymer.dom(this.root).querySelector("label");if(!e)return void(this._ariaLabelledBy="");var t;e.id?t=e.id:(t="paper-input-label-"+Polymer.PaperInputHelper.NextLabelID++,e.id=t),this._ariaLabelledBy=t},_onChange:function(e){this.shadowRoot&&this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})},_autofocusChanged:function(){if(this.autofocus&&this._focusableElement){var e=document.activeElement,t=e instanceof HTMLElement,i=t&&e!==document.body&&e!==document.documentElement;i||this._focusableElement.focus()}}},Polymer.PaperInputBehavior=[Polymer.IronControlState,Polymer.IronA11yKeysBehavior,Polymer.PaperInputBehaviorImpl],Polymer.PaperInputAddonBehavior={hostAttributes:{"add-on":""},attached:function(){this.fire("addon-attached")},update:function(e){}},Polymer({is:"paper-input-char-counter",behaviors:[Polymer.PaperInputAddonBehavior],properties:{_charCounterStr:{type:String,value:"0"}},update:function(e){if(e.inputElement){e.value=e.value||"";var t=e.value.toString().length.toString();e.inputElement.hasAttribute("maxlength")&&(t+="/"+e.inputElement.getAttribute("maxlength")),this._charCounterStr=t}}}),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(e){this._addons||(this._addons=[]);var t=e.target;this._addons.indexOf(t)===-1&&(this._addons.push(t),this.isAttached&&this._handleValue(this._inputElement))},_onFocus:function(){this._setFocused(!0)},_onBlur:function(){this._setFocused(!1),this._handleValueAndAutoValidate(this._inputElement)},_onInput:function(e){this._handleValueAndAutoValidate(e.target)},_onValueChanged:function(e){this._handleValueAndAutoValidate(e.target)},_handleValue:function(e){var t=this._inputElementValue;t||0===t||"number"===e.type&&!e.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1,this.updateAddons({inputElement:e,value:t,invalid:this.invalid})},_handleValueAndAutoValidate:function(e){if(this.autoValidate){var t;t=e.validate?e.validate(this._inputElementValue):e.checkValidity(),this.invalid=!t}this._handleValue(e)},_onIronInputValidate:function(e){this.invalid=this._inputElement.invalid},_invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})},updateAddons:function(e){for(var t,i=0;t=this._addons[i];i++)t.update(e)},_computeInputContentClass:function(e,t,i,n,r){var o="input-content";if(e)r&&(o+=" label-is-hidden");else{var s=this.querySelector("label");t||r?(o+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",n?o+=" is-invalid":i&&(o+=" label-is-highlighted")):s&&(this.$.labelAndInputContainer.style.position="relative")}return o},_computeUnderlineClass:function(e,t){var i="underline";return t?i+=" is-invalid":e&&(i+=" is-highlighted"),i},_computeAddOnContentClass:function(e,t){var i="add-on-content";return t?i+=" is-invalid":e&&(i+=" is-highlighted"),i}}),Polymer({is:"paper-input-error",behaviors:[Polymer.PaperInputAddonBehavior],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(e){this._setInvalid(e.invalid)}}),Polymer({is:"paper-input",behaviors:[Polymer.IronFormElementBehavior,Polymer.PaperInputBehavior]}),Polymer({is:"cic-contributor",behaviors:[i18nMsgBehavior],properties:{name:{type:String,value:"Name",notify:!0},value:{type:Number,value:0,notify:!0},index:{type:Number}},destroy:function(){this.fire("destroy",this.index)},ready:function(){this._focus(this.$$("#name").$$("input"))},_focus:function(e){window.setTimeout(function(){e.focus()},0)},_onKeyPress:function(e){13===e.keyCode&&("number"===e.target.getAttribute("type")?this.fire("enter-press"):this._focus(this.$$("#value").$$("input")))}}),Polymer({is:"cic-utils",clone:function(e){var t=null,i=this;if(null==e||"object"!=typeof e)return e;if(e instanceof Date)return t=new Date,t.setTime(e.getTime()),t;if(e instanceof Array){t=[];for(var n=0,r=e.length;n<r;n++)t[n]=i.clone(e[n]);return t}if(e instanceof Object){t={};for(var o in e)e.hasOwnProperty(o)&&(t[o]=i.clone(e[o]));return t}throw new Error("Unable to copy obj! Its type isn't supported.")},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},loadScript:function(e,t){var i,n,r;n=!1,i=document.createElement("script"),i.type="text/javascript",i.src=e,i.onload=i.onreadystatechange=function(){n||this.readyState&&"complete"!=this.readyState||(n=!0,t())},r=document.getElementsByTagName("script")[0],r.parentNode.insertBefore(i,r)},isDefined:function(e){return"undefined"!=typeof e},calculate:function(e){var e=e.filter(function(e){return this.isDefined(e.value)}.bind(this)),t=[],i=0,n=0,r=[],o=[],s=null,a=null,l=[],h=0;for(i=e.reduce(function(e,t){return e+t.value},0),n=i/e.length,t=e.map(function(e){return e.value=n-e.value,e}),r=t.filter(function(e){return e.value>0}),o=t.filter(function(e){return e.value<0}),s=o[0],a=r[0],l=[],h=0;o.length>0&&r.length>0;)s=s||o[0],a=a||r[0],h=a.value+s.value,h<0?(l.push({from:a.name,to:s.name,value:a.value}),s.value+=a.value,a.value=0):(l.push({from:a.name,to:s.name,value:-s.value}),a.value+=s.value,s.value=0),0===a.value&&(r.splice(0,1),a=null),0===s.value&&(o.splice(0,1),s=null),h=0;return{values:l,totalValue:i,equalPayment:n}}}),Polymer({is:"cic-contributors",_emptyContributor:{name:"",value:null},properties:{contributors:{type:Array,value:function(){return[]},notify:!0}},destroy:function(e){var t=e.detail;this.splice("contributors",t,1)},add:function(){this.push("contributors",this.$.utils.clone(this._emptyContributor)),this.contributors[this.contributors.length-1].value=null}}),Polymer({is:"cic-router",properties:{name:{type:String,value:"Name",notify:!0},routerPath:{type:String,value:"/CIC/bower_components/page/page.js"}},ready:function(){this.currentPage=""},init:function(){this.rules(),page({hashbang:!0})},rules:function(){var e=function(e){return function(t){t||(t={}),this.currentPage=e,this.currentParams=t.params;var i={page:this.currentPage,params:t.params};this.fire("page-changed",i),window.scrollTo(0,0)}.bind(this)}.bind(this);page("/home",e("home")),page("/r/:pointer",e("r")),page("*",function(){page.redirect("/home")})},redirect:function(e,t){var i="/"+e;t&&(i+="/"+t),page.redirect(i)},getLocation:function(){return document.location.href}}),Polymer({is:"cic-result",behaviors:[i18nMsgBehavior],properties:{result:{type:Object,value:function(){return{values:[],totalValue:0,equalPayment:0}},notify:!0}},ready:function(){},observers:["_resultChanged(result.*)"],_getNameFrom:function(e){return e||i18nMsgBehavior.properties.i18n.value.from_somebody},_getNameTo:function(e){return e||i18nMsgBehavior.properties.i18n.value.to_somebody},_getValue:function(e,t){return t||(t=2),e?parseFloat(e).toFixed(t):0},_onClick:function(){this.fire("ok-clicked")},_resultChanged:function(){this.link=this.$.router.getLocation()},_getLinkLabel:function(e){return e.substr(7)}}),Polymer({is:"cic-footer",behaviors:[i18nMsgBehavior],properties:{},ready:function(){}}),Polymer({is:"cic-parse",properties:{appId:{type:String,value:"OAliOF0kM1OcWQGr0VNvn33X3tgpjDxubZnRZT0W"},jsId:{type:String,value:"qZLeXvmqhwO58xYl05XWpChNA0gZtqyfyqf5Rnn8"},parsePath:{type:String,value:"/CIC/bower_components/parse/parse.min.js"}},ready:function(){Parse.initialize(this.appId,this.jsId)},save:function(e,t){var i=Parse.Object.extend("data_raw"),n=new i;n.save({data:e}).then(function(e){var i=e.id;this.fire("saved",i),t&&t(i)}.bind(this))},load:function(e,t){function i(e){t&&t(e.get("data"))}var n=Parse.Object.extend("data_raw"),r=new Parse.Query(n);r.get(e).then(i)}}),Polymer({is:"cic-i18n",properties:{knownLocales:{type:Array,value:["en","ru"]}},loadLocales:function(){var e=(window.navigator.userLanguage||window.navigator.language).slice(0,2),t=this.knownLocales.indexOf(e)>-1;I18nMsg.lang=t?e:"en",I18nMsg.url="locales"}}),Polymer({is:"cic-main",behaviors:[i18nMsgBehavior],properties:{contributors:{type:Array,value:function(){return[]}},isReadyToCalculate:{type:Boolean,value:!1}},observers:["_contributorsChanged(contributors.*)"],ready:function(){this.$.router.init(),this.$.i18n.loadLocales()},showResults:function(){this.$.parse.save(this.contributors)},onParseSaved:function(e){this.$.router.redirect("r",e.detail)},hideResults:function(){this.result={},this._goHome()},add:function(){this.$.contributors.add()},pageChanged:function(e){if(e&&e.detail&&e.detail.page){var t=e.detail.page,i=e.detail.params||null,n=0;"r"==t?(n=1,this.$.parse.load(i.pointer,function(e){this.contributors=e,this.result=this._calculate(this.$.utils.clone(e))}.bind(this))):"home"==t&&(0==this.contributors.length&&this.add(),n=0),this.$.pages.setAttribute("selected",n)}},_calculate:function(e){return this.isReadyToCalculate?this.$.utils.calculate(e):this.result={}},_readyToCalculateResults:function(){return this.contributors.length>1},_contributorsChanged:function(){this.contributors.forEach(function(e){e.value=parseFloat(e.value)||0}),this.isReadyToCalculate=this._readyToCalculateResults(),this.$["show-results"].disabled=!this.isReadyToCalculate},_goHome:function(){this.$.router.redirect("home")}});