if%20(this.hasAttributes())%20%7B%0Afor%20(var%20i%20in%20this._propertyInfo)%20%7B%0Avar%20info%20%3D%20this._propertyInfo%5Bi%5D%3B%0Aif%20(this.hasAttribute(info.attribute))%20%7B%0Athis._setAttributeToProperty(model%2C%20info.attribute%2C%20i%2C%20info)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_setAttributeToProperty%3A%20function%20(model%2C%20attribute%2C%20property%2C%20info)%20%7B%0Aif%20(!this._serializing)%20%7B%0Aproperty%20%3D%20property%20%7C%7C%20Polymer.CaseMap.dashToCamelCase(attribute)%3B%0Ainfo%20%3D%20info%20%7C%7C%20this._propertyInfo%20%26%26%20this._propertyInfo%5Bproperty%5D%3B%0Aif%20(info%20%26%26%20!info.readOnly)%20%7B%0Avar%20v%20%3D%20this.getAttribute(attribute)%3B%0Amodel%5Bproperty%5D%20%3D%20this.deserialize(v%2C%20info.type)%3B%0A%7D%0A%7D%0A%7D%2C%0A_serializing%3A%20false%2C%0AreflectPropertyToAttribute%3A%20function%20(property%2C%20attribute%2C%20value)%20%7B%0Athis._serializing%20%3D%20true%3B%0Avalue%20%3D%20value%20%3D%3D%3D%20undefined%20%3F%20this%5Bproperty%5D%20%3A%20value%3B%0Athis.serializeValueToAttribute(value%2C%20attribute%20%7C%7C%20Polymer.CaseMap.camelToDashCase(property))%3B%0Athis._serializing%20%3D%20false%3B%0A%7D%2C%0AserializeValueToAttribute%3A%20function%20(value%2C%20attribute%2C%20node)%20%7B%0Avar%20str%20%3D%20this.serialize(value)%3B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(str%20%3D%3D%3D%20undefined)%20%7B%0Anode.removeAttribute(attribute)%3B%0A%7D%20else%20%7B%0Anode.setAttribute(attribute%2C%20str)%3B%0A%7D%0A%7D%2C%0Adeserialize%3A%20function%20(value%2C%20type)%20%7B%0Aswitch%20(type)%20%7B%0Acase%20Number%3A%0Avalue%20%3D%20Number(value)%3B%0Abreak%3B%0Acase%20Boolean%3A%0Avalue%20%3D%20value%20!%3D%20null%3B%0Abreak%3B%0Acase%20Object%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0A%7D%0Abreak%3B%0Acase%20Array%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0Avalue%20%3D%20null%3B%0Aconsole.warn('Polymer%3A%3AAttributes%3A%20couldn%60t%20decode%20Array%20as%20JSON')%3B%0A%7D%0Abreak%3B%0Acase%20Date%3A%0Avalue%20%3D%20new%20Date(value)%3B%0Abreak%3B%0Acase%20String%3A%0Adefault%3A%0Abreak%3B%0A%7D%0Areturn%20value%3B%0A%7D%2C%0Aserialize%3A%20function%20(value)%20%7B%0Aswitch%20(typeof%20value)%20%7B%0Acase%20'boolean'%3A%0Areturn%20value%20%3F%20''%20%3A%20undefined%3B%0Acase%20'object'%3A%0Aif%20(value%20instanceof%20Date)%20%7B%0Areturn%20value.toString()%3B%0A%7D%20else%20if%20(value)%20%7B%0Atry%20%7B%0Areturn%20JSON.stringify(value)%3B%0A%7D%20catch%20(x)%20%7B%0Areturn%20''%3B%0A%7D%0A%7D%0Adefault%3A%0Areturn%20value%20!%3D%20null%20%3F%20value%20%3A%20undefined%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.version%20%3D%20'1.3.1'%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._marshalHostAttributes()%3B%0Athis._marshalBehaviors()%3B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-micro.html.js%0A:181 in createdCallback https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in i https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in n https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in u https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in p data:text/javascript;charset=utf-8,(function%20()%20%7B%0Afunction%20resolve()%20%7B%0Adocument.body.removeAttribute('unresolved')%3B%0A%7D%0Aif%20(window.WebComponents)%20%7B%0AaddEventListener('WebComponentsReady'%2C%20resolve)%3B%0A%7D%20else%20%7B%0Aif%20(document.readyState%20%3D%3D%3D%20'interactive'%20%7C%7C%20document.readyState%20%3D%3D%3D%20'complete')%20%7B%0Aresolve()%3B%0A%7D%20else%20%7B%0AaddEventListener('DOMContentLoaded'%2C%20resolve)%3B%0A%7D%0A%7D%0A%7D())%3B%0Awindow.Polymer%20%3D%20%7B%0ASettings%3A%20function%20()%20%7B%0Avar%20user%20%3D%20window.Polymer%20%7C%7C%20%7B%7D%3B%0Avar%20parts%20%3D%20location.search.slice(1).split('%26')%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20parts.length%20%26%26%20(o%20%3D%20parts%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ao%20%3D%20o.split('%3D')%3B%0Ao%5B0%5D%20%26%26%20(user%5Bo%5B0%5D%5D%20%3D%20o%5B1%5D%20%7C%7C%20true)%3B%0A%7D%0Avar%20wantShadow%20%3D%20user.dom%20%3D%3D%3D%20'shadow'%3B%0Avar%20hasShadow%20%3D%20Boolean(Element.prototype.createShadowRoot)%3B%0Avar%20nativeShadow%20%3D%20hasShadow%20%26%26%20!window.ShadowDOMPolyfill%3B%0Avar%20useShadow%20%3D%20wantShadow%20%26%26%20hasShadow%3B%0Avar%20hasNativeImports%20%3D%20Boolean('import'%20in%20document.createElement('link'))%3B%0Avar%20useNativeImports%20%3D%20hasNativeImports%3B%0Avar%20useNativeCustomElements%20%3D%20!window.CustomElements%20%7C%7C%20window.CustomElements.useNative%3B%0Avar%20usePolyfillProto%20%3D%20!useNativeCustomElements%20%26%26%20!Object.__proto__%3B%0Areturn%20%7B%0AwantShadow%3A%20wantShadow%2C%0AhasShadow%3A%20hasShadow%2C%0AnativeShadow%3A%20nativeShadow%2C%0AuseShadow%3A%20useShadow%2C%0AuseNativeShadow%3A%20useShadow%20%26%26%20nativeShadow%2C%0AuseNativeImports%3A%20useNativeImports%2C%0AuseNativeCustomElements%3A%20useNativeCustomElements%2C%0AusePolyfillProto%3A%20usePolyfillProto%0A%7D%3B%0A%7D()%0A%7D%3B%0A(function%20()%20%7B%0Avar%20userPolymer%20%3D%20window.Polymer%3B%0Awindow.Polymer%20%3D%20function%20(prototype)%20%7B%0Aif%20(typeof%20prototype%20%3D%3D%3D%20'function')%20%7B%0Aprototype%20%3D%20prototype.prototype%3B%0A%7D%0Aif%20(!prototype)%20%7B%0Aprototype%20%3D%20%7B%7D%3B%0A%7D%0Avar%20factory%20%3D%20desugar(prototype)%3B%0Aprototype%20%3D%20factory.prototype%3B%0Avar%20options%20%3D%20%7B%20prototype%3A%20prototype%20%7D%3B%0Aif%20(prototype.extends)%20%7B%0Aoptions.extends%20%3D%20prototype.extends%3B%0A%7D%0APolymer.telemetry._registrate(prototype)%3B%0Adocument.registerElement(prototype.is%2C%20options)%3B%0Areturn%20factory%3B%0A%7D%3B%0Avar%20desugar%20%3D%20function%20(prototype)%20%7B%0Avar%20base%20%3D%20Polymer.Base%3B%0Aif%20(prototype.extends)%20%7B%0Abase%20%3D%20Polymer.Base._getExtendedPrototype(prototype.extends)%3B%0A%7D%0Aprototype%20%3D%20Polymer.Base.chainObject(prototype%2C%20base)%3B%0Aprototype.registerCallback()%3B%0Areturn%20prototype.constructor%3B%0A%7D%3B%0Aif%20(userPolymer)%20%7B%0Afor%20(var%20i%20in%20userPolymer)%20%7B%0APolymer%5Bi%5D%20%3D%20userPolymer%5Bi%5D%3B%0A%7D%0A%7D%0APolymer.Class%20%3D%20desugar%3B%0A%7D())%3B%0APolymer.telemetry%20%3D%20%7B%0Aregistrations%3A%20%5B%5D%2C%0A_regLog%3A%20function%20(prototype)%20%7B%0Aconsole.log('%5B'%20%2B%20prototype.is%20%2B%20'%5D%3A%20registered')%3B%0A%7D%2C%0A_registrate%3A%20function%20(prototype)%20%7B%0Athis.registrations.push(prototype)%3B%0APolymer.log%20%26%26%20this._regLog(prototype)%3B%0A%7D%2C%0AdumpRegistrations%3A%20function%20()%20%7B%0Athis.registrations.forEach(this._regLog)%3B%0A%7D%0A%7D%3B%0AObject.defineProperty(window%2C%20'currentImport'%2C%20%7B%0Aenumerable%3A%20true%2C%0Aconfigurable%3A%20true%2C%0Aget%3A%20function%20()%20%7B%0Areturn%20(document._currentScript%20%7C%7C%20document.currentScript).ownerDocument%3B%0A%7D%0A%7D)%3B%0APolymer.RenderStatus%20%3D%20%7B%0A_ready%3A%20false%2C%0A_callbacks%3A%20%5B%5D%2C%0AwhenReady%3A%20function%20(cb)%20%7B%0Aif%20(this._ready)%20%7B%0Acb()%3B%0A%7D%20else%20%7B%0Athis._callbacks.push(cb)%3B%0A%7D%0A%7D%2C%0A_makeReady%3A%20function%20()%20%7B%0Athis._ready%20%3D%20true%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._callbacks.length%3B%20i%2B%2B)%20%7B%0Athis._callbacks%5Bi%5D()%3B%0A%7D%0Athis._callbacks%20%3D%20%5B%5D%3B%0A%7D%2C%0A_catchFirstRender%3A%20function%20()%20%7B%0ArequestAnimationFrame(function%20()%20%7B%0APolymer.RenderStatus._makeReady()%3B%0A%7D)%3B%0A%7D%2C%0A_afterNextRenderQueue%3A%20%5B%5D%2C%0A_waitingNextRender%3A%20false%2C%0AafterNextRender%3A%20function%20(element%2C%20fn%2C%20args)%20%7B%0Athis._watchNextRender()%3B%0Athis._afterNextRenderQueue.push(%5B%0Aelement%2C%0Afn%2C%0Aargs%0A%5D)%3B%0A%7D%2C%0A_watchNextRender%3A%20function%20()%20%7B%0Aif%20(!this._waitingNextRender)%20%7B%0Athis._waitingNextRender%20%3D%20true%3B%0Avar%20fn%20%3D%20function%20()%20%7B%0APolymer.RenderStatus._flushNextRender()%3B%0A%7D%3B%0Aif%20(!this._ready)%20%7B%0Athis.whenReady(fn)%3B%0A%7D%20else%20%7B%0ArequestAnimationFrame(fn)%3B%0A%7D%0A%7D%0A%7D%2C%0A_flushNextRender%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0AsetTimeout(function%20()%20%7B%0Aself._flushRenderCallbacks(self._afterNextRenderQueue)%3B%0Aself._afterNextRenderQueue%20%3D%20%5B%5D%3B%0Aself._waitingNextRender%20%3D%20false%3B%0A%7D)%3B%0A%7D%2C%0A_flushRenderCallbacks%3A%20function%20(callbacks)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20callbacks.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20callbacks%5Bi%5D%3B%0Ah%5B1%5D.apply(h%5B0%5D%2C%20h%5B2%5D%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%0A%7D%3B%0Aif%20(window.HTMLImports)%20%7B%0AHTMLImports.whenReady(function%20()%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D)%3B%0A%7D%20else%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D%0APolymer.ImportStatus%20%3D%20Polymer.RenderStatus%3B%0APolymer.ImportStatus.whenLoaded%20%3D%20Polymer.ImportStatus.whenReady%3B%0APolymer.Base%20%3D%20%7B%0A__isPolymerInstance__%3A%20true%2C%0A_addFeature%3A%20function%20(feature)%20%7B%0Athis.extend(this%2C%20feature)%3B%0A%7D%2C%0AregisterCallback%3A%20function%20()%20%7B%0Athis._desugarBehaviors()%3B%0Athis._doBehavior('beforeRegister')%3B%0Athis._registerFeatures()%3B%0Athis._doBehavior('registered')%3B%0A%7D%2C%0AcreatedCallback%3A%20function%20()%20%7B%0APolymer.telemetry.instanceCount%2B%2B%3B%0Athis.root%20%3D%20this%3B%0Athis._doBehavior('created')%3B%0Athis._initFeatures()%3B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0APolymer.RenderStatus.whenReady(function%20()%20%7B%0Aself.isAttached%20%3D%20true%3B%0Aself._doBehavior('attached')%3B%0A%7D)%3B%0A%7D%2C%0AdetachedCallback%3A%20function%20()%20%7B%0Athis.isAttached%20%3D%20false%3B%0Athis._doBehavior('detached')%3B%0A%7D%2C%0AattributeChangedCallback%3A%20function%20(name%2C%20oldValue%2C%20newValue)%20%7B%0Athis._attributeChangedImpl(name)%3B%0Athis._doBehavior('attributeChanged'%2C%20%5B%0Aname%2C%0AoldValue%2C%0AnewValue%0A%5D)%3B%0A%7D%2C%0A_attributeChangedImpl%3A%20function%20(name)%20%7B%0Athis._setAttributeToProperty(this%2C%20name)%3B%0A%7D%2C%0Aextend%3A%20function%20(prototype%2C%20api)%20%7B%0Aif%20(prototype%20%26%26%20api)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(api)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis.copyOwnProperty(n%2C%20api%2C%20prototype)%3B%0A%7D%0A%7D%0Areturn%20prototype%20%7C%7C%20api%3B%0A%7D%2C%0Amixin%3A%20function%20(target%2C%20source)%20%7B%0Afor%20(var%20i%20in%20source)%20%7B%0Atarget%5Bi%5D%20%3D%20source%5Bi%5D%3B%0A%7D%0Areturn%20target%3B%0A%7D%2C%0AcopyOwnProperty%3A%20function%20(name%2C%20source%2C%20target)%20%7B%0Avar%20pd%20%3D%20Object.getOwnPropertyDescriptor(source%2C%20name)%3B%0Aif%20(pd)%20%7B%0AObject.defineProperty(target%2C%20name%2C%20pd)%3B%0A%7D%0A%7D%2C%0A_log%3A%20console.log.apply.bind(console.log%2C%20console)%2C%0A_warn%3A%20console.warn.apply.bind(console.warn%2C%20console)%2C%0A_error%3A%20console.error.apply.bind(console.error%2C%20console)%2C%0A_logf%3A%20function%20()%20%7B%0Areturn%20this._logPrefix.concat(%5Bthis.is%5D).concat(Array.prototype.slice.call(arguments%2C%200))%3B%0A%7D%0A%7D%3B%0APolymer.Base._logPrefix%20%3D%20function%20()%20%7B%0Avar%20color%20%3D%20window.chrome%20%7C%7C%20%2Ffirefox%2Fi.test(navigator.userAgent)%3B%0Areturn%20color%20%3F%20%5B%0A'%25c%5B%25s%3A%3A%25s%5D%3A'%2C%0A'font-weight%3A%20bold%3B%20background-color%3A%23EEEE00%3B'%0A%5D%20%3A%20%5B'%5B%25s%3A%3A%25s%5D%3A'%5D%3B%0A%7D()%3B%0APolymer.Base.chainObject%20%3D%20function%20(object%2C%20inherited)%20%7B%0Aif%20(object%20%26%26%20inherited%20%26%26%20object%20!%3D%3D%20inherited)%20%7B%0Aif%20(!Object.__proto__)%20%7B%0Aobject%20%3D%20Polymer.Base.extend(Object.create(inherited)%2C%20object)%3B%0A%7D%0Aobject.__proto__%20%3D%20inherited%3B%0A%7D%0Areturn%20object%3B%0A%7D%3B%0APolymer.Base%20%3D%20Polymer.Base.chainObject(Polymer.Base%2C%20HTMLElement.prototype)%3B%0Aif%20(window.CustomElements)%20%7B%0APolymer.instanceof%20%3D%20CustomElements.instanceof%3B%0A%7D%20else%20%7B%0APolymer.instanceof%20%3D%20function%20(obj%2C%20ctor)%20%7B%0Areturn%20obj%20instanceof%20ctor%3B%0A%7D%3B%0A%7D%0APolymer.isInstance%20%3D%20function%20(obj)%20%7B%0Areturn%20Boolean(obj%20%26%26%20obj.__isPolymerInstance__)%3B%0A%7D%3B%0APolymer.telemetry.instanceCount%20%3D%200%3B%0A(function%20()%20%7B%0Avar%20modules%20%3D%20%7B%7D%3B%0Avar%20lcModules%20%3D%20%7B%7D%3B%0Avar%20findModule%20%3D%20function%20(id)%20%7B%0Areturn%20modules%5Bid%5D%20%7C%7C%20lcModules%5Bid.toLowerCase()%5D%3B%0A%7D%3B%0Avar%20DomModule%20%3D%20function%20()%20%7B%0Areturn%20document.createElement('dom-module')%3B%0A%7D%3B%0ADomModule.prototype%20%3D%20Object.create(HTMLElement.prototype)%3B%0APolymer.Base.extend(DomModule.prototype%2C%20%7B%0Aconstructor%3A%20DomModule%2C%0AcreatedCallback%3A%20function%20()%20%7B%0Athis.register()%3B%0A%7D%2C%0Aregister%3A%20function%20(id)%20%7B%0Aid%20%3D%20id%20%7C%7C%20this.id%20%7C%7C%20this.getAttribute('name')%20%7C%7C%20this.getAttribute('is')%3B%0Aif%20(id)%20%7B%0Athis.id%20%3D%20id%3B%0Amodules%5Bid%5D%20%3D%20this%3B%0AlcModules%5Bid.toLowerCase()%5D%20%3D%20this%3B%0A%7D%0A%7D%2C%0Aimport%3A%20function%20(id%2C%20selector)%20%7B%0Aif%20(id)%20%7B%0Avar%20m%20%3D%20findModule(id)%3B%0Aif%20(!m)%20%7B%0AforceDomModulesUpgrade()%3B%0Am%20%3D%20findModule(id)%3B%0A%7D%0Aif%20(m%20%26%26%20selector)%20%7B%0Am%20%3D%20m.querySelector(selector)%3B%0A%7D%0Areturn%20m%3B%0A%7D%0A%7D%0A%7D)%3B%0Avar%20cePolyfill%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Adocument.registerElement('dom-module'%2C%20DomModule)%3B%0Afunction%20forceDomModulesUpgrade()%20%7B%0Aif%20(cePolyfill)%20%7B%0Avar%20script%20%3D%20document._currentScript%20%7C%7C%20document.currentScript%3B%0Avar%20doc%20%3D%20script%20%26%26%20script.ownerDocument%20%7C%7C%20document%3B%0Avar%20modules%20%3D%20doc.querySelectorAll('dom-module')%3B%0Afor%20(var%20i%20%3D%20modules.length%20-%201%2C%20m%3B%20i%20%3E%3D%200%20%26%26%20(m%20%3D%20modules%5Bi%5D)%3B%20i--)%20%7B%0Aif%20(m.__upgraded__)%20%7B%0Areturn%3B%0A%7D%20else%20%7B%0ACustomElements.upgrade(m)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A_prepIs%3A%20function%20()%20%7B%0Aif%20(!this.is)%20%7B%0Avar%20module%20%3D%20(document._currentScript%20%7C%7C%20document.currentScript).parentNode%3B%0Aif%20(module.localName%20%3D%3D%3D%20'dom-module')%20%7B%0Avar%20id%20%3D%20module.id%20%7C%7C%20module.getAttribute('name')%20%7C%7C%20module.getAttribute('is')%3B%0Athis.is%20%3D%20id%3B%0A%7D%0A%7D%0Aif%20(this.is)%20%7B%0Athis.is%20%3D%20this.is.toLowerCase()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0Abehaviors%3A%20%5B%5D%2C%0A_desugarBehaviors%3A%20function%20()%20%7B%0Aif%20(this.behaviors.length)%20%7B%0Athis.behaviors%20%3D%20this._desugarSomeBehaviors(this.behaviors)%3B%0A%7D%0A%7D%2C%0A_desugarSomeBehaviors%3A%20function%20(behaviors)%20%7B%0Avar%20behaviorSet%20%3D%20%5B%5D%3B%0Abehaviors%20%3D%20this._flattenBehaviorsList(behaviors)%3B%0Afor%20(var%20i%20%3D%20behaviors.length%20-%201%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(behaviorSet.indexOf(b)%20%3D%3D%3D%20-1)%20%7B%0Athis._mixinBehavior(b)%3B%0AbehaviorSet.unshift(b)%3B%0A%7D%0A%7D%0Areturn%20behaviorSet%3B%0A%7D%2C%0A_flattenBehaviorsList%3A%20function%20(behaviors)%20%7B%0Avar%20flat%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20behaviors.length%3B%20i%2B%2B)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(b%20instanceof%20Array)%20%7B%0Aflat%20%3D%20flat.concat(this._flattenBehaviorsList(b))%3B%0A%7D%20else%20if%20(b)%20%7B%0Aflat.push(b)%3B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_flattenBehaviorsList'%2C%20'behavior%20is%20null%2C%20check%20for%20missing%20or%20404%20import'))%3B%0A%7D%0A%7D%0Areturn%20flat%3B%0A%7D%2C%0A_mixinBehavior%3A%20function%20(b)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(b)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!Polymer.Base._behaviorProperties%5Bn%5D%20%26%26%20!this.hasOwnProperty(n))%20%7B%0Athis.copyOwnProperty(n%2C%20b%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_prepBehaviors%3A%20function%20()%20%7B%0Athis._prepFlattenedBehaviors(this.behaviors)%3B%0A%7D%2C%0A_prepFlattenedBehaviors%3A%20function%20(behaviors)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20behaviors.length%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Athis._prepBehavior(behaviors%5Bi%5D)%3B%0A%7D%0Athis._prepBehavior(this)%3B%0A%7D%2C%0A_doBehavior%3A%20function%20(name%2C%20args)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._invokeBehavior(this.behaviors%5Bi%5D%2C%20name%2C%20args)%3B%0A%7D%0Athis._invokeBehavior(this%2C%20name%2C%20args)%3B%0A%7D%2C%0A_invokeBehavior%3A%20function%20(b%2C%20name%2C%20args)%20%7B%0Avar%20fn%20%3D%20b%5Bname%5D%3B%0Aif%20(fn)%20%7B%0Afn.apply(this%2C%20args%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%2C%0A_marshalBehaviors%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._marshalBehavior(this.behaviors%5Bi%5D)%3B%0A%7D%0Athis._marshalBehavior(this)%3B%0A%7D%0A%7D)%3B%0APolymer.Base._behaviorProperties%20%3D%20%7B%0AhostAttributes%3A%20true%2C%0AbeforeRegister%3A%20true%2C%0Aregistered%3A%20true%2C%0Aproperties%3A%20true%2C%0Aobservers%3A%20true%2C%0Alisteners%3A%20true%2C%0Acreated%3A%20true%2C%0Aattached%3A%20true%2C%0Adetached%3A%20true%2C%0AattributeChanged%3A%20true%2C%0Aready%3A%20true%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_getExtendedPrototype%3A%20function%20(tag)%20%7B%0Areturn%20this._getExtendedNativePrototype(tag)%3B%0A%7D%2C%0A_nativePrototypes%3A%20%7B%7D%2C%0A_getExtendedNativePrototype%3A%20function%20(tag)%20%7B%0Avar%20p%20%3D%20this._nativePrototypes%5Btag%5D%3B%0Aif%20(!p)%20%7B%0Avar%20np%20%3D%20this.getNativePrototype(tag)%3B%0Ap%20%3D%20this.extend(Object.create(np)%2C%20Polymer.Base)%3B%0Athis._nativePrototypes%5Btag%5D%20%3D%20p%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0AgetNativePrototype%3A%20function%20(tag)%20%7B%0Areturn%20Object.getPrototypeOf(document.createElement(tag))%3B%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0A_prepConstructor%3A%20function%20()%20%7B%0Athis._factoryArgs%20%3D%20this.extends%20%3F%20%5B%0Athis.extends%2C%0Athis.is%0A%5D%20%3A%20%5Bthis.is%5D%3B%0Avar%20ctor%20%3D%20function%20()%20%7B%0Areturn%20this._factory(arguments)%3B%0A%7D%3B%0Aif%20(this.hasOwnProperty('extends'))%20%7B%0Actor.extends%20%3D%20this.extends%3B%0A%7D%0AObject.defineProperty(this%2C%20'constructor'%2C%20%7B%0Avalue%3A%20ctor%2C%0Awritable%3A%20true%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0Actor.prototype%20%3D%20this%3B%0A%7D%2C%0A_factory%3A%20function%20(args)%20%7B%0Avar%20elt%20%3D%20document.createElement.apply(document%2C%20this._factoryArgs)%3B%0Aif%20(this.factoryImpl)%20%7B%0Athis.factoryImpl.apply(elt%2C%20args)%3B%0A%7D%0Areturn%20elt%3B%0A%7D%0A%7D)%3B%0APolymer.nob%20%3D%20Object.create(null)%3B%0APolymer.Base._addFeature(%7B%0Aproperties%3A%20%7B%7D%2C%0AgetPropertyInfo%3A%20function%20(property)%20%7B%0Avar%20info%20%3D%20this._getPropertyInfo(property%2C%20this.properties)%3B%0Aif%20(!info)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Ainfo%20%3D%20this._getPropertyInfo(property%2C%20this.behaviors%5Bi%5D.properties)%3B%0Aif%20(info)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%0A%7D%0Areturn%20info%20%7C%7C%20Polymer.nob%3B%0A%7D%2C%0A_getPropertyInfo%3A%20function%20(property%2C%20properties)%20%7B%0Avar%20p%20%3D%20properties%20%26%26%20properties%5Bproperty%5D%3B%0Aif%20(typeof%20p%20%3D%3D%3D%20'function')%20%7B%0Ap%20%3D%20properties%5Bproperty%5D%20%3D%20%7B%20type%3A%20p%20%7D%3B%0A%7D%0Aif%20(p)%20%7B%0Ap.defined%20%3D%20true%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0A_prepPropertyInfo%3A%20function%20()%20%7B%0Athis._propertyInfo%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.behaviors%5Bi%5D.properties)%3B%0A%7D%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.properties)%3B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this._propertyEffects)%3B%0A%7D%2C%0A_addPropertyInfo%3A%20function%20(target%2C%20source)%20%7B%0Aif%20(source)%20%7B%0Avar%20t%2C%20s%3B%0Afor%20(var%20i%20in%20source)%20%7B%0At%20%3D%20target%5Bi%5D%3B%0As%20%3D%20source%5Bi%5D%3B%0Aif%20(i%5B0%5D%20%3D%3D%3D%20'_'%20%26%26%20!s.readOnly)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(!target%5Bi%5D)%20%7B%0Atarget%5Bi%5D%20%3D%20%7B%0Atype%3A%20typeof%20s%20%3D%3D%3D%20'function'%20%3F%20s%20%3A%20s.type%2C%0AreadOnly%3A%20s.readOnly%2C%0Aattribute%3A%20Polymer.CaseMap.camelToDashCase(i)%0A%7D%3B%0A%7D%20else%20%7B%0Aif%20(!t.type)%20%7B%0At.type%20%3D%20s.type%3B%0A%7D%0Aif%20(!t.readOnly)%20%7B%0At.readOnly%20%3D%20s.readOnly%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer.CaseMap%20%3D%20%7B%0A_caseMap%3A%20%7B%7D%2C%0A_rx%3A%20%7B%0AdashToCamel%3A%20%2F-%5Ba-z%5D%2Fg%2C%0AcamelToDash%3A%20%2F(%5BA-Z%5D)%2Fg%0A%7D%2C%0AdashToCamelCase%3A%20function%20(dash)%20%7B%0Areturn%20this._caseMap%5Bdash%5D%20%7C%7C%20(this._caseMap%5Bdash%5D%20%3D%20dash.indexOf('-')%20%3C%200%20%3F%20dash%20%3A%20dash.replace(this._rx.dashToCamel%2C%20function%20(m)%20%7B%0Areturn%20m%5B1%5D.toUpperCase()%3B%0A%7D))%3B%0A%7D%2C%0AcamelToDashCase%3A%20function%20(camel)%20%7B%0Areturn%20this._caseMap%5Bcamel%5D%20%7C%7C%20(this._caseMap%5Bcamel%5D%20%3D%20camel.replace(this._rx.camelToDash%2C%20'-%241').toLowerCase())%3B%0A%7D%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_addHostAttributes%3A%20function%20(attributes)%20%7B%0Aif%20(!this._aggregatedAttributes)%20%7B%0Athis._aggregatedAttributes%20%3D%20%7B%7D%3B%0A%7D%0Aif%20(attributes)%20%7B%0Athis.mixin(this._aggregatedAttributes%2C%20attributes)%3B%0A%7D%0A%7D%2C%0A_marshalHostAttributes%3A%20function%20()%20%7B%0Aif%20(this._aggregatedAttributes)%20%7B%0Athis._applyAttributes(this%2C%20this._aggregatedAttributes)%3B%0A%7D%0A%7D%2C%0A_applyAttributes%3A%20function%20(node%2C%20attr%24)%20%7B%0Afor%20(var%20n%20in%20attr%24)%20%7B%0Aif%20(!this.hasAttribute(n)%20%26%26%20n%20!%3D%3D%20'class')%20%7B%0Avar%20v%20%3D%20attr%24%5Bn%5D%3B%0Athis.serializeValueToAttribute(v%2C%20n%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_marshalAttributes%3A%20function%20()%20%7B%0Athis._takeAttributesToModel(this)%3B%0A%7D%2C%0A_takeAttributesToModel%3A%20function%20(model)%20%7B%0Aif%20(this.hasAttributes())%20%7B%0Afor%20(var%20i%20in%20this._propertyInfo)%20%7B%0Avar%20info%20%3D%20this._propertyInfo%5Bi%5D%3B%0Aif%20(this.hasAttribute(info.attribute))%20%7B%0Athis._setAttributeToProperty(model%2C%20info.attribute%2C%20i%2C%20info)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_setAttributeToProperty%3A%20function%20(model%2C%20attribute%2C%20property%2C%20info)%20%7B%0Aif%20(!this._serializing)%20%7B%0Aproperty%20%3D%20property%20%7C%7C%20Polymer.CaseMap.dashToCamelCase(attribute)%3B%0Ainfo%20%3D%20info%20%7C%7C%20this._propertyInfo%20%26%26%20this._propertyInfo%5Bproperty%5D%3B%0Aif%20(info%20%26%26%20!info.readOnly)%20%7B%0Avar%20v%20%3D%20this.getAttribute(attribute)%3B%0Amodel%5Bproperty%5D%20%3D%20this.deserialize(v%2C%20info.type)%3B%0A%7D%0A%7D%0A%7D%2C%0A_serializing%3A%20false%2C%0AreflectPropertyToAttribute%3A%20function%20(property%2C%20attribute%2C%20value)%20%7B%0Athis._serializing%20%3D%20true%3B%0Avalue%20%3D%20value%20%3D%3D%3D%20undefined%20%3F%20this%5Bproperty%5D%20%3A%20value%3B%0Athis.serializeValueToAttribute(value%2C%20attribute%20%7C%7C%20Polymer.CaseMap.camelToDashCase(property))%3B%0Athis._serializing%20%3D%20false%3B%0A%7D%2C%0AserializeValueToAttribute%3A%20function%20(value%2C%20attribute%2C%20node)%20%7B%0Avar%20str%20%3D%20this.serialize(value)%3B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(str%20%3D%3D%3D%20undefined)%20%7B%0Anode.removeAttribute(attribute)%3B%0A%7D%20else%20%7B%0Anode.setAttribute(attribute%2C%20str)%3B%0A%7D%0A%7D%2C%0Adeserialize%3A%20function%20(value%2C%20type)%20%7B%0Aswitch%20(type)%20%7B%0Acase%20Number%3A%0Avalue%20%3D%20Number(value)%3B%0Abreak%3B%0Acase%20Boolean%3A%0Avalue%20%3D%20value%20!%3D%20null%3B%0Abreak%3B%0Acase%20Object%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0A%7D%0Abreak%3B%0Acase%20Array%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0Avalue%20%3D%20null%3B%0Aconsole.warn('Polymer%3A%3AAttributes%3A%20couldn%60t%20decode%20Array%20as%20JSON')%3B%0A%7D%0Abreak%3B%0Acase%20Date%3A%0Avalue%20%3D%20new%20Date(value)%3B%0Abreak%3B%0Acase%20String%3A%0Adefault%3A%0Abreak%3B%0A%7D%0Areturn%20value%3B%0A%7D%2C%0Aserialize%3A%20function%20(value)%20%7B%0Aswitch%20(typeof%20value)%20%7B%0Acase%20'boolean'%3A%0Areturn%20value%20%3F%20''%20%3A%20undefined%3B%0Acase%20'object'%3A%0Aif%20(value%20instanceof%20Date)%20%7B%0Areturn%20value.toString()%3B%0A%7D%20else%20if%20(value)%20%7B%0Atry%20%7B%0Areturn%20JSON.stringify(value)%3B%0A%7D%20catch%20(x)%20%7B%0Areturn%20''%3B%0A%7D%0A%7D%0Adefault%3A%0Areturn%20value%20!%3D%20null%20%3F%20value%20%3A%20undefined%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.version%20%3D%20'1.3.1'%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._marshalHostAttributes()%3B%0Athis._marshalBehaviors()%3B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-micro.html.js%0A:450 in _factory data:text/javascript;charset=utf-8,(function%20()%20%7B%0Afunction%20resolve()%20%7B%0Adocument.body.removeAttribute('unresolved')%3B%0A%7D%0Aif%20(window.WebComponents)%20%7B%0AaddEventListener('WebComponentsReady'%2C%20resolve)%3B%0A%7D%20else%20%7B%0Aif%20(document.readyState%20%3D%3D%3D%20'interactive'%20%7C%7C%20document.readyState%20%3D%3D%3D%20'complete')%20%7B%0Aresolve()%3B%0A%7D%20else%20%7B%0AaddEventListener('DOMContentLoaded'%2C%20resolve)%3B%0A%7D%0A%7D%0A%7D())%3B%0Awindow.Polymer%20%3D%20%7B%0ASettings%3A%20function%20()%20%7B%0Avar%20user%20%3D%20window.Polymer%20%7C%7C%20%7B%7D%3B%0Avar%20parts%20%3D%20location.search.slice(1).split('%26')%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20parts.length%20%26%26%20(o%20%3D%20parts%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ao%20%3D%20o.split('%3D')%3B%0Ao%5B0%5D%20%26%26%20(user%5Bo%5B0%5D%5D%20%3D%20o%5B1%5D%20%7C%7C%20true)%3B%0A%7D%0Avar%20wantShadow%20%3D%20user.dom%20%3D%3D%3D%20'shadow'%3B%0Avar%20hasShadow%20%3D%20Boolean(Element.prototype.createShadowRoot)%3B%0Avar%20nativeShadow%20%3D%20hasShadow%20%26%26%20!window.ShadowDOMPolyfill%3B%0Avar%20useShadow%20%3D%20wantShadow%20%26%26%20hasShadow%3B%0Avar%20hasNativeImports%20%3D%20Boolean('import'%20in%20document.createElement('link'))%3B%0Avar%20useNativeImports%20%3D%20hasNativeImports%3B%0Avar%20useNativeCustomElements%20%3D%20!window.CustomElements%20%7C%7C%20window.CustomElements.useNative%3B%0Avar%20usePolyfillProto%20%3D%20!useNativeCustomElements%20%26%26%20!Object.__proto__%3B%0Areturn%20%7B%0AwantShadow%3A%20wantShadow%2C%0AhasShadow%3A%20hasShadow%2C%0AnativeShadow%3A%20nativeShadow%2C%0AuseShadow%3A%20useShadow%2C%0AuseNativeShadow%3A%20useShadow%20%26%26%20nativeShadow%2C%0AuseNativeImports%3A%20useNativeImports%2C%0AuseNativeCustomElements%3A%20useNativeCustomElements%2C%0AusePolyfillProto%3A%20usePolyfillProto%0A%7D%3B%0A%7D()%0A%7D%3B%0A(function%20()%20%7B%0Avar%20userPolymer%20%3D%20window.Polymer%3B%0Awindow.Polymer%20%3D%20function%20(prototype)%20%7B%0Aif%20(typeof%20prototype%20%3D%3D%3D%20'function')%20%7B%0Aprototype%20%3D%20prototype.prototype%3B%0A%7D%0Aif%20(!prototype)%20%7B%0Aprototype%20%3D%20%7B%7D%3B%0A%7D%0Avar%20factory%20%3D%20desugar(prototype)%3B%0Aprototype%20%3D%20factory.prototype%3B%0Avar%20options%20%3D%20%7B%20prototype%3A%20prototype%20%7D%3B%0Aif%20(prototype.extends)%20%7B%0Aoptions.extends%20%3D%20prototype.extends%3B%0A%7D%0APolymer.telemetry._registrate(prototype)%3B%0Adocument.registerElement(prototype.is%2C%20options)%3B%0Areturn%20factory%3B%0A%7D%3B%0Avar%20desugar%20%3D%20function%20(prototype)%20%7B%0Avar%20base%20%3D%20Polymer.Base%3B%0Aif%20(prototype.extends)%20%7B%0Abase%20%3D%20Polymer.Base._getExtendedPrototype(prototype.extends)%3B%0A%7D%0Aprototype%20%3D%20Polymer.Base.chainObject(prototype%2C%20base)%3B%0Aprototype.registerCallback()%3B%0Areturn%20prototype.constructor%3B%0A%7D%3B%0Aif%20(userPolymer)%20%7B%0Afor%20(var%20i%20in%20userPolymer)%20%7B%0APolymer%5Bi%5D%20%3D%20userPolymer%5Bi%5D%3B%0A%7D%0A%7D%0APolymer.Class%20%3D%20desugar%3B%0A%7D())%3B%0APolymer.telemetry%20%3D%20%7B%0Aregistrations%3A%20%5B%5D%2C%0A_regLog%3A%20function%20(prototype)%20%7B%0Aconsole.log('%5B'%20%2B%20prototype.is%20%2B%20'%5D%3A%20registered')%3B%0A%7D%2C%0A_registrate%3A%20function%20(prototype)%20%7B%0Athis.registrations.push(prototype)%3B%0APolymer.log%20%26%26%20this._regLog(prototype)%3B%0A%7D%2C%0AdumpRegistrations%3A%20function%20()%20%7B%0Athis.registrations.forEach(this._regLog)%3B%0A%7D%0A%7D%3B%0AObject.defineProperty(window%2C%20'currentImport'%2C%20%7B%0Aenumerable%3A%20true%2C%0Aconfigurable%3A%20true%2C%0Aget%3A%20function%20()%20%7B%0Areturn%20(document._currentScript%20%7C%7C%20document.currentScript).ownerDocument%3B%0A%7D%0A%7D)%3B%0APolymer.RenderStatus%20%3D%20%7B%0A_ready%3A%20false%2C%0A_callbacks%3A%20%5B%5D%2C%0AwhenReady%3A%20function%20(cb)%20%7B%0Aif%20(this._ready)%20%7B%0Acb()%3B%0A%7D%20else%20%7B%0Athis._callbacks.push(cb)%3B%0A%7D%0A%7D%2C%0A_makeReady%3A%20function%20()%20%7B%0Athis._ready%20%3D%20true%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._callbacks.length%3B%20i%2B%2B)%20%7B%0Athis._callbacks%5Bi%5D()%3B%0A%7D%0Athis._callbacks%20%3D%20%5B%5D%3B%0A%7D%2C%0A_catchFirstRender%3A%20function%20()%20%7B%0ArequestAnimationFrame(function%20()%20%7B%0APolymer.RenderStatus._makeReady()%3B%0A%7D)%3B%0A%7D%2C%0A_afterNextRenderQueue%3A%20%5B%5D%2C%0A_waitingNextRender%3A%20false%2C%0AafterNextRender%3A%20function%20(element%2C%20fn%2C%20args)%20%7B%0Athis._watchNextRender()%3B%0Athis._afterNextRenderQueue.push(%5B%0Aelement%2C%0Afn%2C%0Aargs%0A%5D)%3B%0A%7D%2C%0A_watchNextRender%3A%20function%20()%20%7B%0Aif%20(!this._waitingNextRender)%20%7B%0Athis._waitingNextRender%20%3D%20true%3B%0Avar%20fn%20%3D%20function%20()%20%7B%0APolymer.RenderStatus._flushNextRender()%3B%0A%7D%3B%0Aif%20(!this._ready)%20%7B%0Athis.whenReady(fn)%3B%0A%7D%20else%20%7B%0ArequestAnimationFrame(fn)%3B%0A%7D%0A%7D%0A%7D%2C%0A_flushNextRender%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0AsetTimeout(function%20()%20%7B%0Aself._flushRenderCallbacks(self._afterNextRenderQueue)%3B%0Aself._afterNextRenderQueue%20%3D%20%5B%5D%3B%0Aself._waitingNextRender%20%3D%20false%3B%0A%7D)%3B%0A%7D%2C%0A_flushRenderCallbacks%3A%20function%20(callbacks)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20callbacks.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20callbacks%5Bi%5D%3B%0Ah%5B1%5D.apply(h%5B0%5D%2C%20h%5B2%5D%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%0A%7D%3B%0Aif%20(window.HTMLImports)%20%7B%0AHTMLImports.whenReady(function%20()%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D)%3B%0A%7D%20else%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D%0APolymer.ImportStatus%20%3D%20Polymer.RenderStatus%3B%0APolymer.ImportStatus.whenLoaded%20%3D%20Polymer.ImportStatus.whenReady%3B%0APolymer.Base%20%3D%20%7B%0A__isPolymerInstance__%3A%20true%2C%0A_addFeature%3A%20function%20(feature)%20%7B%0Athis.extend(this%2C%20feature)%3B%0A%7D%2C%0AregisterCallback%3A%20function%20()%20%7B%0Athis._desugarBehaviors()%3B%0Athis._doBehavior('beforeRegister')%3B%0Athis._registerFeatures()%3B%0Athis._doBehavior('registered')%3B%0A%7D%2C%0AcreatedCallback%3A%20function%20()%20%7B%0APolymer.telemetry.instanceCount%2B%2B%3B%0Athis.root%20%3D%20this%3B%0Athis._doBehavior('created')%3B%0Athis._initFeatures()%3B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0APolymer.RenderStatus.whenReady(function%20()%20%7B%0Aself.isAttached%20%3D%20true%3B%0Aself._doBehavior('attached')%3B%0A%7D)%3B%0A%7D%2C%0AdetachedCallback%3A%20function%20()%20%7B%0Athis.isAttached%20%3D%20false%3B%0Athis._doBehavior('detached')%3B%0A%7D%2C%0AattributeChangedCallback%3A%20function%20(name%2C%20oldValue%2C%20newValue)%20%7B%0Athis._attributeChangedImpl(name)%3B%0Athis._doBehavior('attributeChanged'%2C%20%5B%0Aname%2C%0AoldValue%2C%0AnewValue%0A%5D)%3B%0A%7D%2C%0A_attributeChangedImpl%3A%20function%20(name)%20%7B%0Athis._setAttributeToProperty(this%2C%20name)%3B%0A%7D%2C%0Aextend%3A%20function%20(prototype%2C%20api)%20%7B%0Aif%20(prototype%20%26%26%20api)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(api)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis.copyOwnProperty(n%2C%20api%2C%20prototype)%3B%0A%7D%0A%7D%0Areturn%20prototype%20%7C%7C%20api%3B%0A%7D%2C%0Amixin%3A%20function%20(target%2C%20source)%20%7B%0Afor%20(var%20i%20in%20source)%20%7B%0Atarget%5Bi%5D%20%3D%20source%5Bi%5D%3B%0A%7D%0Areturn%20target%3B%0A%7D%2C%0AcopyOwnProperty%3A%20function%20(name%2C%20source%2C%20target)%20%7B%0Avar%20pd%20%3D%20Object.getOwnPropertyDescriptor(source%2C%20name)%3B%0Aif%20(pd)%20%7B%0AObject.defineProperty(target%2C%20name%2C%20pd)%3B%0A%7D%0A%7D%2C%0A_log%3A%20console.log.apply.bind(console.log%2C%20console)%2C%0A_warn%3A%20console.warn.apply.bind(console.warn%2C%20console)%2C%0A_error%3A%20console.error.apply.bind(console.error%2C%20console)%2C%0A_logf%3A%20function%20()%20%7B%0Areturn%20this._logPrefix.concat(%5Bthis.is%5D).concat(Array.prototype.slice.call(arguments%2C%200))%3B%0A%7D%0A%7D%3B%0APolymer.Base._logPrefix%20%3D%20function%20()%20%7B%0Avar%20color%20%3D%20window.chrome%20%7C%7C%20%2Ffirefox%2Fi.test(navigator.userAgent)%3B%0Areturn%20color%20%3F%20%5B%0A'%25c%5B%25s%3A%3A%25s%5D%3A'%2C%0A'font-weight%3A%20bold%3B%20background-color%3A%23EEEE00%3B'%0A%5D%20%3A%20%5B'%5B%25s%3A%3A%25s%5D%3A'%5D%3B%0A%7D()%3B%0APolymer.Base.chainObject%20%3D%20function%20(object%2C%20inherited)%20%7B%0Aif%20(object%20%26%26%20inherited%20%26%26%20object%20!%3D%3D%20inherited)%20%7B%0Aif%20(!Object.__proto__)%20%7B%0Aobject%20%3D%20Polymer.Base.extend(Object.create(inherited)%2C%20object)%3B%0A%7D%0Aobject.__proto__%20%3D%20inherited%3B%0A%7D%0Areturn%20object%3B%0A%7D%3B%0APolymer.Base%20%3D%20Polymer.Base.chainObject(Polymer.Base%2C%20HTMLElement.prototype)%3B%0Aif%20(window.CustomElements)%20%7B%0APolymer.instanceof%20%3D%20CustomElements.instanceof%3B%0A%7D%20else%20%7B%0APolymer.instanceof%20%3D%20function%20(obj%2C%20ctor)%20%7B%0Areturn%20obj%20instanceof%20ctor%3B%0A%7D%3B%0A%7D%0APolymer.isInstance%20%3D%20function%20(obj)%20%7B%0Areturn%20Boolean(obj%20%26%26%20obj.__isPolymerInstance__)%3B%0A%7D%3B%0APolymer.telemetry.instanceCount%20%3D%200%3B%0A(function%20()%20%7B%0Avar%20modules%20%3D%20%7B%7D%3B%0Avar%20lcModules%20%3D%20%7B%7D%3B%0Avar%20findModule%20%3D%20function%20(id)%20%7B%0Areturn%20modules%5Bid%5D%20%7C%7C%20lcModules%5Bid.toLowerCase()%5D%3B%0A%7D%3B%0Avar%20DomModule%20%3D%20function%20()%20%7B%0Areturn%20document.createElement('dom-module')%3B%0A%7D%3B%0ADomModule.prototype%20%3D%20Object.create(HTMLElement.prototype)%3B%0APolymer.Base.extend(DomModule.prototype%2C%20%7B%0Aconstructor%3A%20DomModule%2C%0AcreatedCallback%3A%20function%20()%20%7B%0Athis.register()%3B%0A%7D%2C%0Aregister%3A%20function%20(id)%20%7B%0Aid%20%3D%20id%20%7C%7C%20this.id%20%7C%7C%20this.getAttribute('name')%20%7C%7C%20this.getAttribute('is')%3B%0Aif%20(id)%20%7B%0Athis.id%20%3D%20id%3B%0Amodules%5Bid%5D%20%3D%20this%3B%0AlcModules%5Bid.toLowerCase()%5D%20%3D%20this%3B%0A%7D%0A%7D%2C%0Aimport%3A%20function%20(id%2C%20selector)%20%7B%0Aif%20(id)%20%7B%0Avar%20m%20%3D%20findModule(id)%3B%0Aif%20(!m)%20%7B%0AforceDomModulesUpgrade()%3B%0Am%20%3D%20findModule(id)%3B%0A%7D%0Aif%20(m%20%26%26%20selector)%20%7B%0Am%20%3D%20m.querySelector(selector)%3B%0A%7D%0Areturn%20m%3B%0A%7D%0A%7D%0A%7D)%3B%0Avar%20cePolyfill%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Adocument.registerElement('dom-module'%2C%20DomModule)%3B%0Afunction%20forceDomModulesUpgrade()%20%7B%0Aif%20(cePolyfill)%20%7B%0Avar%20script%20%3D%20document._currentScript%20%7C%7C%20document.currentScript%3B%0Avar%20doc%20%3D%20script%20%26%26%20script.ownerDocument%20%7C%7C%20document%3B%0Avar%20modules%20%3D%20doc.querySelectorAll('dom-module')%3B%0Afor%20(var%20i%20%3D%20modules.length%20-%201%2C%20m%3B%20i%20%3E%3D%200%20%26%26%20(m%20%3D%20modules%5Bi%5D)%3B%20i--)%20%7B%0Aif%20(m.__upgraded__)%20%7B%0Areturn%3B%0A%7D%20else%20%7B%0ACustomElements.upgrade(m)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A_prepIs%3A%20function%20()%20%7B%0Aif%20(!this.is)%20%7B%0Avar%20module%20%3D%20(document._currentScript%20%7C%7C%20document.currentScript).parentNode%3B%0Aif%20(module.localName%20%3D%3D%3D%20'dom-module')%20%7B%0Avar%20id%20%3D%20module.id%20%7C%7C%20module.getAttribute('name')%20%7C%7C%20module.getAttribute('is')%3B%0Athis.is%20%3D%20id%3B%0A%7D%0A%7D%0Aif%20(this.is)%20%7B%0Athis.is%20%3D%20this.is.toLowerCase()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0Abehaviors%3A%20%5B%5D%2C%0A_desugarBehaviors%3A%20function%20()%20%7B%0Aif%20(this.behaviors.length)%20%7B%0Athis.behaviors%20%3D%20this._desugarSomeBehaviors(this.behaviors)%3B%0A%7D%0A%7D%2C%0A_desugarSomeBehaviors%3A%20function%20(behaviors)%20%7B%0Avar%20behaviorSet%20%3D%20%5B%5D%3B%0Abehaviors%20%3D%20this._flattenBehaviorsList(behaviors)%3B%0Afor%20(var%20i%20%3D%20behaviors.length%20-%201%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(behaviorSet.indexOf(b)%20%3D%3D%3D%20-1)%20%7B%0Athis._mixinBehavior(b)%3B%0AbehaviorSet.unshift(b)%3B%0A%7D%0A%7D%0Areturn%20behaviorSet%3B%0A%7D%2C%0A_flattenBehaviorsList%3A%20function%20(behaviors)%20%7B%0Avar%20flat%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20behaviors.length%3B%20i%2B%2B)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(b%20instanceof%20Array)%20%7B%0Aflat%20%3D%20flat.concat(this._flattenBehaviorsList(b))%3B%0A%7D%20else%20if%20(b)%20%7B%0Aflat.push(b)%3B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_flattenBehaviorsList'%2C%20'behavior%20is%20null%2C%20check%20for%20missing%20or%20404%20import'))%3B%0A%7D%0A%7D%0Areturn%20flat%3B%0A%7D%2C%0A_mixinBehavior%3A%20function%20(b)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(b)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!Polymer.Base._behaviorProperties%5Bn%5D%20%26%26%20!this.hasOwnProperty(n))%20%7B%0Athis.copyOwnProperty(n%2C%20b%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_prepBehaviors%3A%20function%20()%20%7B%0Athis._prepFlattenedBehaviors(this.behaviors)%3B%0A%7D%2C%0A_prepFlattenedBehaviors%3A%20function%20(behaviors)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20behaviors.length%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Athis._prepBehavior(behaviors%5Bi%5D)%3B%0A%7D%0Athis._prepBehavior(this)%3B%0A%7D%2C%0A_doBehavior%3A%20function%20(name%2C%20args)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._invokeBehavior(this.behaviors%5Bi%5D%2C%20name%2C%20args)%3B%0A%7D%0Athis._invokeBehavior(this%2C%20name%2C%20args)%3B%0A%7D%2C%0A_invokeBehavior%3A%20function%20(b%2C%20name%2C%20args)%20%7B%0Avar%20fn%20%3D%20b%5Bname%5D%3B%0Aif%20(fn)%20%7B%0Afn.apply(this%2C%20args%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%2C%0A_marshalBehaviors%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._marshalBehavior(this.behaviors%5Bi%5D)%3B%0A%7D%0Athis._marshalBehavior(this)%3B%0A%7D%0A%7D)%3B%0APolymer.Base._behaviorProperties%20%3D%20%7B%0AhostAttributes%3A%20true%2C%0AbeforeRegister%3A%20true%2C%0Aregistered%3A%20true%2C%0Aproperties%3A%20true%2C%0Aobservers%3A%20true%2C%0Alisteners%3A%20true%2C%0Acreated%3A%20true%2C%0Aattached%3A%20true%2C%0Adetached%3A%20true%2C%0AattributeChanged%3A%20true%2C%0Aready%3A%20true%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_getExtendedPrototype%3A%20function%20(tag)%20%7B%0Areturn%20this._getExtendedNativePrototype(tag)%3B%0A%7D%2C%0A_nativePrototypes%3A%20%7B%7D%2C%0A_getExtendedNativePrototype%3A%20function%20(tag)%20%7B%0Avar%20p%20%3D%20this._nativePrototypes%5Btag%5D%3B%0Aif%20(!p)%20%7B%0Avar%20np%20%3D%20this.getNativePrototype(tag)%3B%0Ap%20%3D%20this.extend(Object.create(np)%2C%20Polymer.Base)%3B%0Athis._nativePrototypes%5Btag%5D%20%3D%20p%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0AgetNativePrototype%3A%20function%20(tag)%20%7B%0Areturn%20Object.getPrototypeOf(document.createElement(tag))%3B%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0A_prepConstructor%3A%20function%20()%20%7B%0Athis._factoryArgs%20%3D%20this.extends%20%3F%20%5B%0Athis.extends%2C%0Athis.is%0A%5D%20%3A%20%5Bthis.is%5D%3B%0Avar%20ctor%20%3D%20function%20()%20%7B%0Areturn%20this._factory(arguments)%3B%0A%7D%3B%0Aif%20(this.hasOwnProperty('extends'))%20%7B%0Actor.extends%20%3D%20this.extends%3B%0A%7D%0AObject.defineProperty(this%2C%20'constructor'%2C%20%7B%0Avalue%3A%20ctor%2C%0Awritable%3A%20true%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0Actor.prototype%20%3D%20this%3B%0A%7D%2C%0A_factory%3A%20function%20(args)%20%7B%0Avar%20elt%20%3D%20document.createElement.apply(document%2C%20this._factoryArgs)%3B%0Aif%20(this.factoryImpl)%20%7B%0Athis.factoryImpl.apply(elt%2C%20args)%3B%0A%7D%0Areturn%20elt%3B%0A%7D%0A%7D)%3B%0APolymer.nob%20%3D%20Object.create(null)%3B%0APolymer.Base._addFeature(%7B%0Aproperties%3A%20%7B%7D%2C%0AgetPropertyInfo%3A%20function%20(property)%20%7B%0Avar%20info%20%3D%20this._getPropertyInfo(property%2C%20this.properties)%3B%0Aif%20(!info)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Ainfo%20%3D%20this._getPropertyInfo(property%2C%20this.behaviors%5Bi%5D.properties)%3B%0Aif%20(info)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%0A%7D%0Areturn%20info%20%7C%7C%20Polymer.nob%3B%0A%7D%2C%0A_getPropertyInfo%3A%20function%20(property%2C%20properties)%20%7B%0Avar%20p%20%3D%20properties%20%26%26%20properties%5Bproperty%5D%3B%0Aif%20(typeof%20p%20%3D%3D%3D%20'function')%20%7B%0Ap%20%3D%20properties%5Bproperty%5D%20%3D%20%7B%20type%3A%20p%20%7D%3B%0A%7D%0Aif%20(p)%20%7B%0Ap.defined%20%3D%20true%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0A_prepPropertyInfo%3A%20function%20()%20%7B%0Athis._propertyInfo%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.behaviors%5Bi%5D.properties)%3B%0A%7D%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.properties)%3B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this._propertyEffects)%3B%0A%7D%2C%0A_addPropertyInfo%3A%20function%20(target%2C%20source)%20%7B%0Aif%20(source)%20%7B%0Avar%20t%2C%20s%3B%0Afor%20(var%20i%20in%20source)%20%7B%0At%20%3D%20target%5Bi%5D%3B%0As%20%3D%20source%5Bi%5D%3B%0Aif%20(i%5B0%5D%20%3D%3D%3D%20'_'%20%26%26%20!s.readOnly)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(!target%5Bi%5D)%20%7B%0Atarget%5Bi%5D%20%3D%20%7B%0Atype%3A%20typeof%20s%20%3D%3D%3D%20'function'%20%3F%20s%20%3A%20s.type%2C%0AreadOnly%3A%20s.readOnly%2C%0Aattribute%3A%20Polymer.CaseMap.camelToDashCase(i)%0A%7D%3B%0A%7D%20else%20%7B%0Aif%20(!t.type)%20%7B%0At.type%20%3D%20s.type%3B%0A%7D%0Aif%20(!t.readOnly)%20%7B%0At.readOnly%20%3D%20s.readOnly%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer.CaseMap%20%3D%20%7B%0A_caseMap%3A%20%7B%7D%2C%0A_rx%3A%20%7B%0AdashToCamel%3A%20%2F-%5Ba-z%5D%2Fg%2C%0AcamelToDash%3A%20%2F(%5BA-Z%5D)%2Fg%0A%7D%2C%0AdashToCamelCase%3A%20function%20(dash)%20%7B%0Areturn%20this._caseMap%5Bdash%5D%20%7C%7C%20(this._caseMap%5Bdash%5D%20%3D%20dash.indexOf('-')%20%3C%200%20%3F%20dash%20%3A%20dash.replace(this._rx.dashToCamel%2C%20function%20(m)%20%7B%0Areturn%20m%5B1%5D.toUpperCase()%3B%0A%7D))%3B%0A%7D%2C%0AcamelToDashCase%3A%20function%20(camel)%20%7B%0Areturn%20this._caseMap%5Bcamel%5D%20%7C%7C%20(this._caseMap%5Bcamel%5D%20%3D%20camel.replace(this._rx.camelToDash%2C%20'-%241').toLowerCase())%3B%0A%7D%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_addHostAttributes%3A%20function%20(attributes)%20%7B%0Aif%20(!this._aggregatedAttributes)%20%7B%0Athis._aggregatedAttributes%20%3D%20%7B%7D%3B%0A%7D%0Aif%20(attributes)%20%7B%0Athis.mixin(this._aggregatedAttributes%2C%20attributes)%3B%0A%7D%0A%7D%2C%0A_marshalHostAttributes%3A%20function%20()%20%7B%0Aif%20(this._aggregatedAttributes)%20%7B%0Athis._applyAttributes(this%2C%20this._aggregatedAttributes)%3B%0A%7D%0A%7D%2C%0A_applyAttributes%3A%20function%20(node%2C%20attr%24)%20%7B%0Afor%20(var%20n%20in%20attr%24)%20%7B%0Aif%20(!this.hasAttribute(n)%20%26%26%20n%20!%3D%3D%20'class')%20%7B%0Avar%20v%20%3D%20attr%24%5Bn%5D%3B%0Athis.serializeValueToAttribute(v%2C%20n%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_marshalAttributes%3A%20function%20()%20%7B%0Athis._takeAttributesToModel(this)%3B%0A%7D%2C%0A_takeAttributesToModel%3A%20function%20(model)%20%7B%0Aif%20(this.hasAttributes())%20%7B%0Afor%20(var%20i%20in%20this._propertyInfo)%20%7B%0Avar%20info%20%3D%20this._propertyInfo%5Bi%5D%3B%0Aif%20(this.hasAttribute(info.attribute))%20%7B%0Athis._setAttributeToProperty(model%2C%20info.attribute%2C%20i%2C%20info)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_setAttributeToProperty%3A%20function%20(model%2C%20attribute%2C%20property%2C%20info)%20%7B%0Aif%20(!this._serializing)%20%7B%0Aproperty%20%3D%20property%20%7C%7C%20Polymer.CaseMap.dashToCamelCase(attribute)%3B%0Ainfo%20%3D%20info%20%7C%7C%20this._propertyInfo%20%26%26%20this._propertyInfo%5Bproperty%5D%3B%0Aif%20(info%20%26%26%20!info.readOnly)%20%7B%0Avar%20v%20%3D%20this.getAttribute(attribute)%3B%0Amodel%5Bproperty%5D%20%3D%20this.deserialize(v%2C%20info.type)%3B%0A%7D%0A%7D%0A%7D%2C%0A_serializing%3A%20false%2C%0AreflectPropertyToAttribute%3A%20function%20(property%2C%20attribute%2C%20value)%20%7B%0Athis._serializing%20%3D%20true%3B%0Avalue%20%3D%20value%20%3D%3D%3D%20undefined%20%3F%20this%5Bproperty%5D%20%3A%20value%3B%0Athis.serializeValueToAttribute(value%2C%20attribute%20%7C%7C%20Polymer.CaseMap.camelToDashCase(property))%3B%0Athis._serializing%20%3D%20false%3B%0A%7D%2C%0AserializeValueToAttribute%3A%20function%20(value%2C%20attribute%2C%20node)%20%7B%0Avar%20str%20%3D%20this.serialize(value)%3B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(str%20%3D%3D%3D%20undefined)%20%7B%0Anode.removeAttribute(attribute)%3B%0A%7D%20else%20%7B%0Anode.setAttribute(attribute%2C%20str)%3B%0A%7D%0A%7D%2C%0Adeserialize%3A%20function%20(value%2C%20type)%20%7B%0Aswitch%20(type)%20%7B%0Acase%20Number%3A%0Avalue%20%3D%20Number(value)%3B%0Abreak%3B%0Acase%20Boolean%3A%0Avalue%20%3D%20value%20!%3D%20null%3B%0Abreak%3B%0Acase%20Object%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0A%7D%0Abreak%3B%0Acase%20Array%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0Avalue%20%3D%20null%3B%0Aconsole.warn('Polymer%3A%3AAttributes%3A%20couldn%60t%20decode%20Array%20as%20JSON')%3B%0A%7D%0Abreak%3B%0Acase%20Date%3A%0Avalue%20%3D%20new%20Date(value)%3B%0Abreak%3B%0Acase%20String%3A%0Adefault%3A%0Abreak%3B%0A%7D%0Areturn%20value%3B%0A%7D%2C%0Aserialize%3A%20function%20(value)%20%7B%0Aswitch%20(typeof%20value)%20%7B%0Acase%20'boolean'%3A%0Areturn%20value%20%3F%20''%20%3A%20undefined%3B%0Acase%20'object'%3A%0Aif%20(value%20instanceof%20Date)%20%7B%0Areturn%20value.toString()%3B%0A%7D%20else%20if%20(value)%20%7B%0Atry%20%7B%0Areturn%20JSON.stringify(value)%3B%0A%7D%20catch%20(x)%20%7B%0Areturn%20''%3B%0A%7D%0A%7D%0Adefault%3A%0Areturn%20value%20!%3D%20null%20%3F%20value%20%3A%20undefined%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.version%20%3D%20'1.3.1'%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._marshalHostAttributes()%3B%0Athis._marshalBehaviors()%3B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-micro.html.js%0A:437 in ctor https://alugha.com/embed/polymer-live/scripts/al-player-211b50b5d9.js:1 in setup https://alugha.com/embed/polymer-live/scripts/al-player-211b50b5d9.js:1 in ready data:text/javascript;charset=utf-8,(function%20()%20%7B%0Afunction%20resolve()%20%7B%0Adocument.body.removeAttribute('unresolved')%3B%0A%7D%0Aif%20(window.WebComponents)%20%7B%0AaddEventListener('WebComponentsReady'%2C%20resolve)%3B%0A%7D%20else%20%7B%0Aif%20(document.readyState%20%3D%3D%3D%20'interactive'%20%7C%7C%20document.readyState%20%3D%3D%3D%20'complete')%20%7B%0Aresolve()%3B%0A%7D%20else%20%7B%0AaddEventListener('DOMContentLoaded'%2C%20resolve)%3B%0A%7D%0A%7D%0A%7D())%3B%0Awindow.Polymer%20%3D%20%7B%0ASettings%3A%20function%20()%20%7B%0Avar%20user%20%3D%20window.Polymer%20%7C%7C%20%7B%7D%3B%0Avar%20parts%20%3D%20location.search.slice(1).split('%26')%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20parts.length%20%26%26%20(o%20%3D%20parts%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ao%20%3D%20o.split('%3D')%3B%0Ao%5B0%5D%20%26%26%20(user%5Bo%5B0%5D%5D%20%3D%20o%5B1%5D%20%7C%7C%20true)%3B%0A%7D%0Avar%20wantShadow%20%3D%20user.dom%20%3D%3D%3D%20'shadow'%3B%0Avar%20hasShadow%20%3D%20Boolean(Element.prototype.createShadowRoot)%3B%0Avar%20nativeShadow%20%3D%20hasShadow%20%26%26%20!window.ShadowDOMPolyfill%3B%0Avar%20useShadow%20%3D%20wantShadow%20%26%26%20hasShadow%3B%0Avar%20hasNativeImports%20%3D%20Boolean('import'%20in%20document.createElement('link'))%3B%0Avar%20useNativeImports%20%3D%20hasNativeImports%3B%0Avar%20useNativeCustomElements%20%3D%20!window.CustomElements%20%7C%7C%20window.CustomElements.useNative%3B%0Avar%20usePolyfillProto%20%3D%20!useNativeCustomElements%20%26%26%20!Object.__proto__%3B%0Areturn%20%7B%0AwantShadow%3A%20wantShadow%2C%0AhasShadow%3A%20hasShadow%2C%0AnativeShadow%3A%20nativeShadow%2C%0AuseShadow%3A%20useShadow%2C%0AuseNativeShadow%3A%20useShadow%20%26%26%20nativeShadow%2C%0AuseNativeImports%3A%20useNativeImports%2C%0AuseNativeCustomElements%3A%20useNativeCustomElements%2C%0AusePolyfillProto%3A%20usePolyfillProto%0A%7D%3B%0A%7D()%0A%7D%3B%0A(function%20()%20%7B%0Avar%20userPolymer%20%3D%20window.Polymer%3B%0Awindow.Polymer%20%3D%20function%20(prototype)%20%7B%0Aif%20(typeof%20prototype%20%3D%3D%3D%20'function')%20%7B%0Aprototype%20%3D%20prototype.prototype%3B%0A%7D%0Aif%20(!prototype)%20%7B%0Aprototype%20%3D%20%7B%7D%3B%0A%7D%0Avar%20factory%20%3D%20desugar(prototype)%3B%0Aprototype%20%3D%20factory.prototype%3B%0Avar%20options%20%3D%20%7B%20prototype%3A%20prototype%20%7D%3B%0Aif%20(prototype.extends)%20%7B%0Aoptions.extends%20%3D%20prototype.extends%3B%0A%7D%0APolymer.telemetry._registrate(prototype)%3B%0Adocument.registerElement(prototype.is%2C%20options)%3B%0Areturn%20factory%3B%0A%7D%3B%0Avar%20desugar%20%3D%20function%20(prototype)%20%7B%0Avar%20base%20%3D%20Polymer.Base%3B%0Aif%20(prototype.extends)%20%7B%0Abase%20%3D%20Polymer.Base._getExtendedPrototype(prototype.extends)%3B%0A%7D%0Aprototype%20%3D%20Polymer.Base.chainObject(prototype%2C%20base)%3B%0Aprototype.registerCallback()%3B%0Areturn%20prototype.constructor%3B%0A%7D%3B%0Aif%20(userPolymer)%20%7B%0Afor%20(var%20i%20in%20userPolymer)%20%7B%0APolymer%5Bi%5D%20%3D%20userPolymer%5Bi%5D%3B%0A%7D%0A%7D%0APolymer.Class%20%3D%20desugar%3B%0A%7D())%3B%0APolymer.telemetry%20%3D%20%7B%0Aregistrations%3A%20%5B%5D%2C%0A_regLog%3A%20function%20(prototype)%20%7B%0Aconsole.log('%5B'%20%2B%20prototype.is%20%2B%20'%5D%3A%20registered')%3B%0A%7D%2C%0A_registrate%3A%20function%20(prototype)%20%7B%0Athis.registrations.push(prototype)%3B%0APolymer.log%20%26%26%20this._regLog(prototype)%3B%0A%7D%2C%0AdumpRegistrations%3A%20function%20()%20%7B%0Athis.registrations.forEach(this._regLog)%3B%0A%7D%0A%7D%3B%0AObject.defineProperty(window%2C%20'currentImport'%2C%20%7B%0Aenumerable%3A%20true%2C%0Aconfigurable%3A%20true%2C%0Aget%3A%20function%20()%20%7B%0Areturn%20(document._currentScript%20%7C%7C%20document.currentScript).ownerDocument%3B%0A%7D%0A%7D)%3B%0APolymer.RenderStatus%20%3D%20%7B%0A_ready%3A%20false%2C%0A_callbacks%3A%20%5B%5D%2C%0AwhenReady%3A%20function%20(cb)%20%7B%0Aif%20(this._ready)%20%7B%0Acb()%3B%0A%7D%20else%20%7B%0Athis._callbacks.push(cb)%3B%0A%7D%0A%7D%2C%0A_makeReady%3A%20function%20()%20%7B%0Athis._ready%20%3D%20true%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._callbacks.length%3B%20i%2B%2B)%20%7B%0Athis._callbacks%5Bi%5D()%3B%0A%7D%0Athis._callbacks%20%3D%20%5B%5D%3B%0A%7D%2C%0A_catchFirstRender%3A%20function%20()%20%7B%0ArequestAnimationFrame(function%20()%20%7B%0APolymer.RenderStatus._makeReady()%3B%0A%7D)%3B%0A%7D%2C%0A_afterNextRenderQueue%3A%20%5B%5D%2C%0A_waitingNextRender%3A%20false%2C%0AafterNextRender%3A%20function%20(element%2C%20fn%2C%20args)%20%7B%0Athis._watchNextRender()%3B%0Athis._afterNextRenderQueue.push(%5B%0Aelement%2C%0Afn%2C%0Aargs%0A%5D)%3B%0A%7D%2C%0A_watchNextRender%3A%20function%20()%20%7B%0Aif%20(!this._waitingNextRender)%20%7B%0Athis._waitingNextRender%20%3D%20true%3B%0Avar%20fn%20%3D%20function%20()%20%7B%0APolymer.RenderStatus._flushNextRender()%3B%0A%7D%3B%0Aif%20(!this._ready)%20%7B%0Athis.whenReady(fn)%3B%0A%7D%20else%20%7B%0ArequestAnimationFrame(fn)%3B%0A%7D%0A%7D%0A%7D%2C%0A_flushNextRender%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0AsetTimeout(function%20()%20%7B%0Aself._flushRenderCallbacks(self._afterNextRenderQueue)%3B%0Aself._afterNextRenderQueue%20%3D%20%5B%5D%3B%0Aself._waitingNextRender%20%3D%20false%3B%0A%7D)%3B%0A%7D%2C%0A_flushRenderCallbacks%3A%20function%20(callbacks)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20callbacks.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20callbacks%5Bi%5D%3B%0Ah%5B1%5D.apply(h%5B0%5D%2C%20h%5B2%5D%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%0A%7D%3B%0Aif%20(window.HTMLImports)%20%7B%0AHTMLImports.whenReady(function%20()%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D)%3B%0A%7D%20else%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D%0APolymer.ImportStatus%20%3D%20Polymer.RenderStatus%3B%0APolymer.ImportStatus.whenLoaded%20%3D%20Polymer.ImportStatus.whenReady%3B%0APolymer.Base%20%3D%20%7B%0A__isPolymerInstance__%3A%20true%2C%0A_addFeature%3A%20function%20(feature)%20%7B%0Athis.extend(this%2C%20feature)%3B%0A%7D%2C%0AregisterCallback%3A%20function%20()%20%7B%0Athis._desugarBehaviors()%3B%0Athis._doBehavior('beforeRegister')%3B%0Athis._registerFeatures()%3B%0Athis._doBehavior('registered')%3B%0A%7D%2C%0AcreatedCallback%3A%20function%20()%20%7B%0APolymer.telemetry.instanceCount%2B%2B%3B%0Athis.root%20%3D%20this%3B%0Athis._doBehavior('created')%3B%0Athis._initFeatures()%3B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0APolymer.RenderStatus.whenReady(function%20()%20%7B%0Aself.isAttached%20%3D%20true%3B%0Aself._doBehavior('attached')%3B%0A%7D)%3B%0A%7D%2C%0AdetachedCallback%3A%20function%20()%20%7B%0Athis.isAttached%20%3D%20false%3B%0Athis._doBehavior('detached')%3B%0A%7D%2C%0AattributeChangedCallback%3A%20function%20(name%2C%20oldValue%2C%20newValue)%20%7B%0Athis._attributeChangedImpl(name)%3B%0Athis._doBehavior('attributeChanged'%2C%20%5B%0Aname%2C%0AoldValue%2C%0AnewValue%0A%5D)%3B%0A%7D%2C%0A_attributeChangedImpl%3A%20function%20(name)%20%7B%0Athis._setAttributeToProperty(this%2C%20name)%3B%0A%7D%2C%0Aextend%3A%20function%20(prototype%2C%20api)%20%7B%0Aif%20(prototype%20%26%26%20api)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(api)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis.copyOwnProperty(n%2C%20api%2C%20prototype)%3B%0A%7D%0A%7D%0Areturn%20prototype%20%7C%7C%20api%3B%0A%7D%2C%0Amixin%3A%20function%20(target%2C%20source)%20%7B%0Afor%20(var%20i%20in%20source)%20%7B%0Atarget%5Bi%5D%20%3D%20source%5Bi%5D%3B%0A%7D%0Areturn%20target%3B%0A%7D%2C%0AcopyOwnProperty%3A%20function%20(name%2C%20source%2C%20target)%20%7B%0Avar%20pd%20%3D%20Object.getOwnPropertyDescriptor(source%2C%20name)%3B%0Aif%20(pd)%20%7B%0AObject.defineProperty(target%2C%20name%2C%20pd)%3B%0A%7D%0A%7D%2C%0A_log%3A%20console.log.apply.bind(console.log%2C%20console)%2C%0A_warn%3A%20console.warn.apply.bind(console.warn%2C%20console)%2C%0A_error%3A%20console.error.apply.bind(console.error%2C%20console)%2C%0A_logf%3A%20function%20()%20%7B%0Areturn%20this._logPrefix.concat(%5Bthis.is%5D).concat(Array.prototype.slice.call(arguments%2C%200))%3B%0A%7D%0A%7D%3B%0APolymer.Base._logPrefix%20%3D%20function%20()%20%7B%0Avar%20color%20%3D%20window.chrome%20%7C%7C%20%2Ffirefox%2Fi.test(navigator.userAgent)%3B%0Areturn%20color%20%3F%20%5B%0A'%25c%5B%25s%3A%3A%25s%5D%3A'%2C%0A'font-weight%3A%20bold%3B%20background-color%3A%23EEEE00%3B'%0A%5D%20%3A%20%5B'%5B%25s%3A%3A%25s%5D%3A'%5D%3B%0A%7D()%3B%0APolymer.Base.chainObject%20%3D%20function%20(object%2C%20inherited)%20%7B%0Aif%20(object%20%26%26%20inherited%20%26%26%20object%20!%3D%3D%20inherited)%20%7B%0Aif%20(!Object.__proto__)%20%7B%0Aobject%20%3D%20Polymer.Base.extend(Object.create(inherited)%2C%20object)%3B%0A%7D%0Aobject.__proto__%20%3D%20inherited%3B%0A%7D%0Areturn%20object%3B%0A%7D%3B%0APolymer.Base%20%3D%20Polymer.Base.chainObject(Polymer.Base%2C%20HTMLElement.prototype)%3B%0Aif%20(window.CustomElements)%20%7B%0APolymer.instanceof%20%3D%20CustomElements.instanceof%3B%0A%7D%20else%20%7B%0APolymer.instanceof%20%3D%20function%20(obj%2C%20ctor)%20%7B%0Areturn%20obj%20instanceof%20ctor%3B%0A%7D%3B%0A%7D%0APolymer.isInstance%20%3D%20function%20(obj)%20%7B%0Areturn%20Boolean(obj%20%26%26%20obj.__isPolymerInstance__)%3B%0A%7D%3B%0APolymer.telemetry.instanceCount%20%3D%200%3B%0A(function%20()%20%7B%0Avar%20modules%20%3D%20%7B%7D%3B%0Avar%20lcModules%20%3D%20%7B%7D%3B%0Avar%20findModule%20%3D%20function%20(id)%20%7B%0Areturn%20modules%5Bid%5D%20%7C%7C%20lcModules%5Bid.toLowerCase()%5D%3B%0A%7D%3B%0Avar%20DomModule%20%3D%20function%20()%20%7B%0Areturn%20document.createElement('dom-module')%3B%0A%7D%3B%0ADomModule.prototype%20%3D%20Object.create(HTMLElement.prototype)%3B%0APolymer.Base.extend(DomModule.prototype%2C%20%7B%0Aconstructor%3A%20DomModule%2C%0AcreatedCallback%3A%20function%20()%20%7B%0Athis.register()%3B%0A%7D%2C%0Aregister%3A%20function%20(id)%20%7B%0Aid%20%3D%20id%20%7C%7C%20this.id%20%7C%7C%20this.getAttribute('name')%20%7C%7C%20this.getAttribute('is')%3B%0Aif%20(id)%20%7B%0Athis.id%20%3D%20id%3B%0Amodules%5Bid%5D%20%3D%20this%3B%0AlcModules%5Bid.toLowerCase()%5D%20%3D%20this%3B%0A%7D%0A%7D%2C%0Aimport%3A%20function%20(id%2C%20selector)%20%7B%0Aif%20(id)%20%7B%0Avar%20m%20%3D%20findModule(id)%3B%0Aif%20(!m)%20%7B%0AforceDomModulesUpgrade()%3B%0Am%20%3D%20findModule(id)%3B%0A%7D%0Aif%20(m%20%26%26%20selector)%20%7B%0Am%20%3D%20m.querySelector(selector)%3B%0A%7D%0Areturn%20m%3B%0A%7D%0A%7D%0A%7D)%3B%0Avar%20cePolyfill%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Adocument.registerElement('dom-module'%2C%20DomModule)%3B%0Afunction%20forceDomModulesUpgrade()%20%7B%0Aif%20(cePolyfill)%20%7B%0Avar%20script%20%3D%20document._currentScript%20%7C%7C%20document.currentScript%3B%0Avar%20doc%20%3D%20script%20%26%26%20script.ownerDocument%20%7C%7C%20document%3B%0Avar%20modules%20%3D%20doc.querySelectorAll('dom-module')%3B%0Afor%20(var%20i%20%3D%20modules.length%20-%201%2C%20m%3B%20i%20%3E%3D%200%20%26%26%20(m%20%3D%20modules%5Bi%5D)%3B%20i--)%20%7B%0Aif%20(m.__upgraded__)%20%7B%0Areturn%3B%0A%7D%20else%20%7B%0ACustomElements.upgrade(m)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A_prepIs%3A%20function%20()%20%7B%0Aif%20(!this.is)%20%7B%0Avar%20module%20%3D%20(document._currentScript%20%7C%7C%20document.currentScript).parentNode%3B%0Aif%20(module.localName%20%3D%3D%3D%20'dom-module')%20%7B%0Avar%20id%20%3D%20module.id%20%7C%7C%20module.getAttribute('name')%20%7C%7C%20module.getAttribute('is')%3B%0Athis.is%20%3D%20id%3B%0A%7D%0A%7D%0Aif%20(this.is)%20%7B%0Athis.is%20%3D%20this.is.toLowerCase()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0Abehaviors%3A%20%5B%5D%2C%0A_desugarBehaviors%3A%20function%20()%20%7B%0Aif%20(this.behaviors.length)%20%7B%0Athis.behaviors%20%3D%20this._desugarSomeBehaviors(this.behaviors)%3B%0A%7D%0A%7D%2C%0A_desugarSomeBehaviors%3A%20function%20(behaviors)%20%7B%0Avar%20behaviorSet%20%3D%20%5B%5D%3B%0Abehaviors%20%3D%20this._flattenBehaviorsList(behaviors)%3B%0Afor%20(var%20i%20%3D%20behaviors.length%20-%201%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(behaviorSet.indexOf(b)%20%3D%3D%3D%20-1)%20%7B%0Athis._mixinBehavior(b)%3B%0AbehaviorSet.unshift(b)%3B%0A%7D%0A%7D%0Areturn%20behaviorSet%3B%0A%7D%2C%0A_flattenBehaviorsList%3A%20function%20(behaviors)%20%7B%0Avar%20flat%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20behaviors.length%3B%20i%2B%2B)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(b%20instanceof%20Array)%20%7B%0Aflat%20%3D%20flat.concat(this._flattenBehaviorsList(b))%3B%0A%7D%20else%20if%20(b)%20%7B%0Aflat.push(b)%3B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_flattenBehaviorsList'%2C%20'behavior%20is%20null%2C%20check%20for%20missing%20or%20404%20import'))%3B%0A%7D%0A%7D%0Areturn%20flat%3B%0A%7D%2C%0A_mixinBehavior%3A%20function%20(b)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(b)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!Polymer.Base._behaviorProperties%5Bn%5D%20%26%26%20!this.hasOwnProperty(n))%20%7B%0Athis.copyOwnProperty(n%2C%20b%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_prepBehaviors%3A%20function%20()%20%7B%0Athis._prepFlattenedBehaviors(this.behaviors)%3B%0A%7D%2C%0A_prepFlattenedBehaviors%3A%20function%20(behaviors)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20behaviors.length%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Athis._prepBehavior(behaviors%5Bi%5D)%3B%0A%7D%0Athis._prepBehavior(this)%3B%0A%7D%2C%0A_doBehavior%3A%20function%20(name%2C%20args)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._invokeBehavior(this.behaviors%5Bi%5D%2C%20name%2C%20args)%3B%0A%7D%0Athis._invokeBehavior(this%2C%20name%2C%20args)%3B%0A%7D%2C%0A_invokeBehavior%3A%20function%20(b%2C%20name%2C%20args)%20%7B%0Avar%20fn%20%3D%20b%5Bname%5D%3B%0Aif%20(fn)%20%7B%0Afn.apply(this%2C%20args%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%2C%0A_marshalBehaviors%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._marshalBehavior(this.behaviors%5Bi%5D)%3B%0A%7D%0Athis._marshalBehavior(this)%3B%0A%7D%0A%7D)%3B%0APolymer.Base._behaviorProperties%20%3D%20%7B%0AhostAttributes%3A%20true%2C%0AbeforeRegister%3A%20true%2C%0Aregistered%3A%20true%2C%0Aproperties%3A%20true%2C%0Aobservers%3A%20true%2C%0Alisteners%3A%20true%2C%0Acreated%3A%20true%2C%0Aattached%3A%20true%2C%0Adetached%3A%20true%2C%0AattributeChanged%3A%20true%2C%0Aready%3A%20true%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_getExtendedPrototype%3A%20function%20(tag)%20%7B%0Areturn%20this._getExtendedNativePrototype(tag)%3B%0A%7D%2C%0A_nativePrototypes%3A%20%7B%7D%2C%0A_getExtendedNativePrototype%3A%20function%20(tag)%20%7B%0Avar%20p%20%3D%20this._nativePrototypes%5Btag%5D%3B%0Aif%20(!p)%20%7B%0Avar%20np%20%3D%20this.getNativePrototype(tag)%3B%0Ap%20%3D%20this.extend(Object.create(np)%2C%20Polymer.Base)%3B%0Athis._nativePrototypes%5Btag%5D%20%3D%20p%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0AgetNativePrototype%3A%20function%20(tag)%20%7B%0Areturn%20Object.getPrototypeOf(document.createElement(tag))%3B%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0A_prepConstructor%3A%20function%20()%20%7B%0Athis._factoryArgs%20%3D%20this.extends%20%3F%20%5B%0Athis.extends%2C%0Athis.is%0A%5D%20%3A%20%5Bthis.is%5D%3B%0Avar%20ctor%20%3D%20function%20()%20%7B%0Areturn%20this._factory(arguments)%3B%0A%7D%3B%0Aif%20(this.hasOwnProperty('extends'))%20%7B%0Actor.extends%20%3D%20this.extends%3B%0A%7D%0AObject.defineProperty(this%2C%20'constructor'%2C%20%7B%0Avalue%3A%20ctor%2C%0Awritable%3A%20true%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0Actor.prototype%20%3D%20this%3B%0A%7D%2C%0A_factory%3A%20function%20(args)%20%7B%0Avar%20elt%20%3D%20document.createElement.apply(document%2C%20this._factoryArgs)%3B%0Aif%20(this.factoryImpl)%20%7B%0Athis.factoryImpl.apply(elt%2C%20args)%3B%0A%7D%0Areturn%20elt%3B%0A%7D%0A%7D)%3B%0APolymer.nob%20%3D%20Object.create(null)%3B%0APolymer.Base._addFeature(%7B%0Aproperties%3A%20%7B%7D%2C%0AgetPropertyInfo%3A%20function%20(property)%20%7B%0Avar%20info%20%3D%20this._getPropertyInfo(property%2C%20this.properties)%3B%0Aif%20(!info)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Ainfo%20%3D%20this._getPropertyInfo(property%2C%20this.behaviors%5Bi%5D.properties)%3B%0Aif%20(info)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%0A%7D%0Areturn%20info%20%7C%7C%20Polymer.nob%3B%0A%7D%2C%0A_getPropertyInfo%3A%20function%20(property%2C%20properties)%20%7B%0Avar%20p%20%3D%20properties%20%26%26%20properties%5Bproperty%5D%3B%0Aif%20(typeof%20p%20%3D%3D%3D%20'function')%20%7B%0Ap%20%3D%20properties%5Bproperty%5D%20%3D%20%7B%20type%3A%20p%20%7D%3B%0A%7D%0Aif%20(p)%20%7B%0Ap.defined%20%3D%20true%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0A_prepPropertyInfo%3A%20function%20()%20%7B%0Athis._propertyInfo%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.behaviors%5Bi%5D.properties)%3B%0A%7D%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.properties)%3B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this._propertyEffects)%3B%0A%7D%2C%0A_addPropertyInfo%3A%20function%20(target%2C%20source)%20%7B%0Aif%20(source)%20%7B%0Avar%20t%2C%20s%3B%0Afor%20(var%20i%20in%20source)%20%7B%0At%20%3D%20target%5Bi%5D%3B%0As%20%3D%20source%5Bi%5D%3B%0Aif%20(i%5B0%5D%20%3D%3D%3D%20'_'%20%26%26%20!s.readOnly)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(!target%5Bi%5D)%20%7B%0Atarget%5Bi%5D%20%3D%20%7B%0Atype%3A%20typeof%20s%20%3D%3D%3D%20'function'%20%3F%20s%20%3A%20s.type%2C%0AreadOnly%3A%20s.readOnly%2C%0Aattribute%3A%20Polymer.CaseMap.camelToDashCase(i)%0A%7D%3B%0A%7D%20else%20%7B%0Aif%20(!t.type)%20%7B%0At.type%20%3D%20s.type%3B%0A%7D%0Aif%20(!t.readOnly)%20%7B%0At.readOnly%20%3D%20s.readOnly%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer.CaseMap%20%3D%20%7B%0A_caseMap%3A%20%7B%7D%2C%0A_rx%3A%20%7B%0AdashToCamel%3A%20%2F-%5Ba-z%5D%2Fg%2C%0AcamelToDash%3A%20%2F(%5BA-Z%5D)%2Fg%0A%7D%2C%0AdashToCamelCase%3A%20function%20(dash)%20%7B%0Areturn%20this._caseMap%5Bdash%5D%20%7C%7C%20(this._caseMap%5Bdash%5D%20%3D%20dash.indexOf('-')%20%3C%200%20%3F%20dash%20%3A%20dash.replace(this._rx.dashToCamel%2C%20function%20(m)%20%7B%0Areturn%20m%5B1%5D.toUpperCase()%3B%0A%7D))%3B%0A%7D%2C%0AcamelToDashCase%3A%20function%20(camel)%20%7B%0Areturn%20this._caseMap%5Bcamel%5D%20%7C%7C%20(this._caseMap%5Bcamel%5D%20%3D%20camel.replace(this._rx.camelToDash%2C%20'-%241').toLowerCase())%3B%0A%7D%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_addHostAttributes%3A%20function%20(attributes)%20%7B%0Aif%20(!this._aggregatedAttributes)%20%7B%0Athis._aggregatedAttributes%20%3D%20%7B%7D%3B%0A%7D%0Aif%20(attributes)%20%7B%0Athis.mixin(this._aggregatedAttributes%2C%20attributes)%3B%0A%7D%0A%7D%2C%0A_marshalHostAttributes%3A%20function%20()%20%7B%0Aif%20(this._aggregatedAttributes)%20%7B%0Athis._applyAttributes(this%2C%20this._aggregatedAttributes)%3B%0A%7D%0A%7D%2C%0A_applyAttributes%3A%20function%20(node%2C%20attr%24)%20%7B%0Afor%20(var%20n%20in%20attr%24)%20%7B%0Aif%20(!this.hasAttribute(n)%20%26%26%20n%20!%3D%3D%20'class')%20%7B%0Avar%20v%20%3D%20attr%24%5Bn%5D%3B%0Athis.serializeValueToAttribute(v%2C%20n%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_marshalAttributes%3A%20function%20()%20%7B%0Athis._takeAttributesToModel(this)%3B%0A%7D%2C%0A_takeAttributesToModel%3A%20function%20(model)%20%7B%0Aif%20(this.hasAttributes())%20%7B%0Afor%20(var%20i%20in%20this._propertyInfo)%20%7B%0Avar%20info%20%3D%20this._propertyInfo%5Bi%5D%3B%0Aif%20(this.hasAttribute(info.attribute))%20%7B%0Athis._setAttributeToProperty(model%2C%20info.attribute%2C%20i%2C%20info)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_setAttributeToProperty%3A%20function%20(model%2C%20attribute%2C%20property%2C%20info)%20%7B%0Aif%20(!this._serializing)%20%7B%0Aproperty%20%3D%20property%20%7C%7C%20Polymer.CaseMap.dashToCamelCase(attribute)%3B%0Ainfo%20%3D%20info%20%7C%7C%20this._propertyInfo%20%26%26%20this._propertyInfo%5Bproperty%5D%3B%0Aif%20(info%20%26%26%20!info.readOnly)%20%7B%0Avar%20v%20%3D%20this.getAttribute(attribute)%3B%0Amodel%5Bproperty%5D%20%3D%20this.deserialize(v%2C%20info.type)%3B%0A%7D%0A%7D%0A%7D%2C%0A_serializing%3A%20false%2C%0AreflectPropertyToAttribute%3A%20function%20(property%2C%20attribute%2C%20value)%20%7B%0Athis._serializing%20%3D%20true%3B%0Avalue%20%3D%20value%20%3D%3D%3D%20undefined%20%3F%20this%5Bproperty%5D%20%3A%20value%3B%0Athis.serializeValueToAttribute(value%2C%20attribute%20%7C%7C%20Polymer.CaseMap.camelToDashCase(property))%3B%0Athis._serializing%20%3D%20false%3B%0A%7D%2C%0AserializeValueToAttribute%3A%20function%20(value%2C%20attribute%2C%20node)%20%7B%0Avar%20str%20%3D%20this.serialize(value)%3B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(str%20%3D%3D%3D%20undefined)%20%7B%0Anode.removeAttribute(attribute)%3B%0A%7D%20else%20%7B%0Anode.setAttribute(attribute%2C%20str)%3B%0A%7D%0A%7D%2C%0Adeserialize%3A%20function%20(value%2C%20type)%20%7B%0Aswitch%20(type)%20%7B%0Acase%20Number%3A%0Avalue%20%3D%20Number(value)%3B%0Abreak%3B%0Acase%20Boolean%3A%0Avalue%20%3D%20value%20!%3D%20null%3B%0Abreak%3B%0Acase%20Object%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0A%7D%0Abreak%3B%0Acase%20Array%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0Avalue%20%3D%20null%3B%0Aconsole.warn('Polymer%3A%3AAttributes%3A%20couldn%60t%20decode%20Array%20as%20JSON')%3B%0A%7D%0Abreak%3B%0Acase%20Date%3A%0Avalue%20%3D%20new%20Date(value)%3B%0Abreak%3B%0Acase%20String%3A%0Adefault%3A%0Abreak%3B%0A%7D%0Areturn%20value%3B%0A%7D%2C%0Aserialize%3A%20function%20(value)%20%7B%0Aswitch%20(typeof%20value)%20%7B%0Acase%20'boolean'%3A%0Areturn%20value%20%3F%20''%20%3A%20undefined%3B%0Acase%20'object'%3A%0Aif%20(value%20instanceof%20Date)%20%7B%0Areturn%20value.toString()%3B%0A%7D%20else%20if%20(value)%20%7B%0Atry%20%7B%0Areturn%20JSON.stringify(value)%3B%0A%7D%20catch%20(x)%20%7B%0Areturn%20''%3B%0A%7D%0A%7D%0Adefault%3A%0Areturn%20value%20!%3D%20null%20%3F%20value%20%3A%20undefined%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.version%20%3D%20'1.3.1'%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._marshalHostAttributes()%3B%0Athis._marshalBehaviors()%3B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-micro.html.js%0A:389 in _invokeBehavior data:text/javascript;charset=utf-8,(function%20()%20%7B%0Afunction%20resolve()%20%7B%0Adocument.body.removeAttribute('unresolved')%3B%0A%7D%0Aif%20(window.WebComponents)%20%7B%0AaddEventListener('WebComponentsReady'%2C%20resolve)%3B%0A%7D%20else%20%7B%0Aif%20(document.readyState%20%3D%3D%3D%20'interactive'%20%7C%7C%20document.readyState%20%3D%3D%3D%20'complete')%20%7B%0Aresolve()%3B%0A%7D%20else%20%7B%0AaddEventListener('DOMContentLoaded'%2C%20resolve)%3B%0A%7D%0A%7D%0A%7D())%3B%0Awindow.Polymer%20%3D%20%7B%0ASettings%3A%20function%20()%20%7B%0Avar%20user%20%3D%20window.Polymer%20%7C%7C%20%7B%7D%3B%0Avar%20parts%20%3D%20location.search.slice(1).split('%26')%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20parts.length%20%26%26%20(o%20%3D%20parts%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ao%20%3D%20o.split('%3D')%3B%0Ao%5B0%5D%20%26%26%20(user%5Bo%5B0%5D%5D%20%3D%20o%5B1%5D%20%7C%7C%20true)%3B%0A%7D%0Avar%20wantShadow%20%3D%20user.dom%20%3D%3D%3D%20'shadow'%3B%0Avar%20hasShadow%20%3D%20Boolean(Element.prototype.createShadowRoot)%3B%0Avar%20nativeShadow%20%3D%20hasShadow%20%26%26%20!window.ShadowDOMPolyfill%3B%0Avar%20useShadow%20%3D%20wantShadow%20%26%26%20hasShadow%3B%0Avar%20hasNativeImports%20%3D%20Boolean('import'%20in%20document.createElement('link'))%3B%0Avar%20useNativeImports%20%3D%20hasNativeImports%3B%0Avar%20useNativeCustomElements%20%3D%20!window.CustomElements%20%7C%7C%20window.CustomElements.useNative%3B%0Avar%20usePolyfillProto%20%3D%20!useNativeCustomElements%20%26%26%20!Object.__proto__%3B%0Areturn%20%7B%0AwantShadow%3A%20wantShadow%2C%0AhasShadow%3A%20hasShadow%2C%0AnativeShadow%3A%20nativeShadow%2C%0AuseShadow%3A%20useShadow%2C%0AuseNativeShadow%3A%20useShadow%20%26%26%20nativeShadow%2C%0AuseNativeImports%3A%20useNativeImports%2C%0AuseNativeCustomElements%3A%20useNativeCustomElements%2C%0AusePolyfillProto%3A%20usePolyfillProto%0A%7D%3B%0A%7D()%0A%7D%3B%0A(function%20()%20%7B%0Avar%20userPolymer%20%3D%20window.Polymer%3B%0Awindow.Polymer%20%3D%20function%20(prototype)%20%7B%0Aif%20(typeof%20prototype%20%3D%3D%3D%20'function')%20%7B%0Aprototype%20%3D%20prototype.prototype%3B%0A%7D%0Aif%20(!prototype)%20%7B%0Aprototype%20%3D%20%7B%7D%3B%0A%7D%0Avar%20factory%20%3D%20desugar(prototype)%3B%0Aprototype%20%3D%20factory.prototype%3B%0Avar%20options%20%3D%20%7B%20prototype%3A%20prototype%20%7D%3B%0Aif%20(prototype.extends)%20%7B%0Aoptions.extends%20%3D%20prototype.extends%3B%0A%7D%0APolymer.telemetry._registrate(prototype)%3B%0Adocument.registerElement(prototype.is%2C%20options)%3B%0Areturn%20factory%3B%0A%7D%3B%0Avar%20desugar%20%3D%20function%20(prototype)%20%7B%0Avar%20base%20%3D%20Polymer.Base%3B%0Aif%20(prototype.extends)%20%7B%0Abase%20%3D%20Polymer.Base._getExtendedPrototype(prototype.extends)%3B%0A%7D%0Aprototype%20%3D%20Polymer.Base.chainObject(prototype%2C%20base)%3B%0Aprototype.registerCallback()%3B%0Areturn%20prototype.constructor%3B%0A%7D%3B%0Aif%20(userPolymer)%20%7B%0Afor%20(var%20i%20in%20userPolymer)%20%7B%0APolymer%5Bi%5D%20%3D%20userPolymer%5Bi%5D%3B%0A%7D%0A%7D%0APolymer.Class%20%3D%20desugar%3B%0A%7D())%3B%0APolymer.telemetry%20%3D%20%7B%0Aregistrations%3A%20%5B%5D%2C%0A_regLog%3A%20function%20(prototype)%20%7B%0Aconsole.log('%5B'%20%2B%20prototype.is%20%2B%20'%5D%3A%20registered')%3B%0A%7D%2C%0A_registrate%3A%20function%20(prototype)%20%7B%0Athis.registrations.push(prototype)%3B%0APolymer.log%20%26%26%20this._regLog(prototype)%3B%0A%7D%2C%0AdumpRegistrations%3A%20function%20()%20%7B%0Athis.registrations.forEach(this._regLog)%3B%0A%7D%0A%7D%3B%0AObject.defineProperty(window%2C%20'currentImport'%2C%20%7B%0Aenumerable%3A%20true%2C%0Aconfigurable%3A%20true%2C%0Aget%3A%20function%20()%20%7B%0Areturn%20(document._currentScript%20%7C%7C%20document.currentScript).ownerDocument%3B%0A%7D%0A%7D)%3B%0APolymer.RenderStatus%20%3D%20%7B%0A_ready%3A%20false%2C%0A_callbacks%3A%20%5B%5D%2C%0AwhenReady%3A%20function%20(cb)%20%7B%0Aif%20(this._ready)%20%7B%0Acb()%3B%0A%7D%20else%20%7B%0Athis._callbacks.push(cb)%3B%0A%7D%0A%7D%2C%0A_makeReady%3A%20function%20()%20%7B%0Athis._ready%20%3D%20true%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._callbacks.length%3B%20i%2B%2B)%20%7B%0Athis._callbacks%5Bi%5D()%3B%0A%7D%0Athis._callbacks%20%3D%20%5B%5D%3B%0A%7D%2C%0A_catchFirstRender%3A%20function%20()%20%7B%0ArequestAnimationFrame(function%20()%20%7B%0APolymer.RenderStatus._makeReady()%3B%0A%7D)%3B%0A%7D%2C%0A_afterNextRenderQueue%3A%20%5B%5D%2C%0A_waitingNextRender%3A%20false%2C%0AafterNextRender%3A%20function%20(element%2C%20fn%2C%20args)%20%7B%0Athis._watchNextRender()%3B%0Athis._afterNextRenderQueue.push(%5B%0Aelement%2C%0Afn%2C%0Aargs%0A%5D)%3B%0A%7D%2C%0A_watchNextRender%3A%20function%20()%20%7B%0Aif%20(!this._waitingNextRender)%20%7B%0Athis._waitingNextRender%20%3D%20true%3B%0Avar%20fn%20%3D%20function%20()%20%7B%0APolymer.RenderStatus._flushNextRender()%3B%0A%7D%3B%0Aif%20(!this._ready)%20%7B%0Athis.whenReady(fn)%3B%0A%7D%20else%20%7B%0ArequestAnimationFrame(fn)%3B%0A%7D%0A%7D%0A%7D%2C%0A_flushNextRender%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0AsetTimeout(function%20()%20%7B%0Aself._flushRenderCallbacks(self._afterNextRenderQueue)%3B%0Aself._afterNextRenderQueue%20%3D%20%5B%5D%3B%0Aself._waitingNextRender%20%3D%20false%3B%0A%7D)%3B%0A%7D%2C%0A_flushRenderCallbacks%3A%20function%20(callbacks)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20callbacks.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20callbacks%5Bi%5D%3B%0Ah%5B1%5D.apply(h%5B0%5D%2C%20h%5B2%5D%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%0A%7D%3B%0Aif%20(window.HTMLImports)%20%7B%0AHTMLImports.whenReady(function%20()%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D)%3B%0A%7D%20else%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D%0APolymer.ImportStatus%20%3D%20Polymer.RenderStatus%3B%0APolymer.ImportStatus.whenLoaded%20%3D%20Polymer.ImportStatus.whenReady%3B%0APolymer.Base%20%3D%20%7B%0A__isPolymerInstance__%3A%20true%2C%0A_addFeature%3A%20function%20(feature)%20%7B%0Athis.extend(this%2C%20feature)%3B%0A%7D%2C%0AregisterCallback%3A%20function%20()%20%7B%0Athis._desugarBehaviors()%3B%0Athis._doBehavior('beforeRegister')%3B%0Athis._registerFeatures()%3B%0Athis._doBehavior('registered')%3B%0A%7D%2C%0AcreatedCallback%3A%20function%20()%20%7B%0APolymer.telemetry.instanceCount%2B%2B%3B%0Athis.root%20%3D%20this%3B%0Athis._doBehavior('created')%3B%0Athis._initFeatures()%3B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0APolymer.RenderStatus.whenReady(function%20()%20%7B%0Aself.isAttached%20%3D%20true%3B%0Aself._doBehavior('attached')%3B%0A%7D)%3B%0A%7D%2C%0AdetachedCallback%3A%20function%20()%20%7B%0Athis.isAttached%20%3D%20false%3B%0Athis._doBehavior('detached')%3B%0A%7D%2C%0AattributeChangedCallback%3A%20function%20(name%2C%20oldValue%2C%20newValue)%20%7B%0Athis._attributeChangedImpl(name)%3B%0Athis._doBehavior('attributeChanged'%2C%20%5B%0Aname%2C%0AoldValue%2C%0AnewValue%0A%5D)%3B%0A%7D%2C%0A_attributeChangedImpl%3A%20function%20(name)%20%7B%0Athis._setAttributeToProperty(this%2C%20name)%3B%0A%7D%2C%0Aextend%3A%20function%20(prototype%2C%20api)%20%7B%0Aif%20(prototype%20%26%26%20api)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(api)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis.copyOwnProperty(n%2C%20api%2C%20prototype)%3B%0A%7D%0A%7D%0Areturn%20prototype%20%7C%7C%20api%3B%0A%7D%2C%0Amixin%3A%20function%20(target%2C%20source)%20%7B%0Afor%20(var%20i%20in%20source)%20%7B%0Atarget%5Bi%5D%20%3D%20source%5Bi%5D%3B%0A%7D%0Areturn%20target%3B%0A%7D%2C%0AcopyOwnProperty%3A%20function%20(name%2C%20source%2C%20target)%20%7B%0Avar%20pd%20%3D%20Object.getOwnPropertyDescriptor(source%2C%20name)%3B%0Aif%20(pd)%20%7B%0AObject.defineProperty(target%2C%20name%2C%20pd)%3B%0A%7D%0A%7D%2C%0A_log%3A%20console.log.apply.bind(console.log%2C%20console)%2C%0A_warn%3A%20console.warn.apply.bind(console.warn%2C%20console)%2C%0A_error%3A%20console.error.apply.bind(console.error%2C%20console)%2C%0A_logf%3A%20function%20()%20%7B%0Areturn%20this._logPrefix.concat(%5Bthis.is%5D).concat(Array.prototype.slice.call(arguments%2C%200))%3B%0A%7D%0A%7D%3B%0APolymer.Base._logPrefix%20%3D%20function%20()%20%7B%0Avar%20color%20%3D%20window.chrome%20%7C%7C%20%2Ffirefox%2Fi.test(navigator.userAgent)%3B%0Areturn%20color%20%3F%20%5B%0A'%25c%5B%25s%3A%3A%25s%5D%3A'%2C%0A'font-weight%3A%20bold%3B%20background-color%3A%23EEEE00%3B'%0A%5D%20%3A%20%5B'%5B%25s%3A%3A%25s%5D%3A'%5D%3B%0A%7D()%3B%0APolymer.Base.chainObject%20%3D%20function%20(object%2C%20inherited)%20%7B%0Aif%20(object%20%26%26%20inherited%20%26%26%20object%20!%3D%3D%20inherited)%20%7B%0Aif%20(!Object.__proto__)%20%7B%0Aobject%20%3D%20Polymer.Base.extend(Object.create(inherited)%2C%20object)%3B%0A%7D%0Aobject.__proto__%20%3D%20inherited%3B%0A%7D%0Areturn%20object%3B%0A%7D%3B%0APolymer.Base%20%3D%20Polymer.Base.chainObject(Polymer.Base%2C%20HTMLElement.prototype)%3B%0Aif%20(window.CustomElements)%20%7B%0APolymer.instanceof%20%3D%20CustomElements.instanceof%3B%0A%7D%20else%20%7B%0APolymer.instanceof%20%3D%20function%20(obj%2C%20ctor)%20%7B%0Areturn%20obj%20instanceof%20ctor%3B%0A%7D%3B%0A%7D%0APolymer.isInstance%20%3D%20function%20(obj)%20%7B%0Areturn%20Boolean(obj%20%26%26%20obj.__isPolymerInstance__)%3B%0A%7D%3B%0APolymer.telemetry.instanceCount%20%3D%200%3B%0A(function%20()%20%7B%0Avar%20modules%20%3D%20%7B%7D%3B%0Avar%20lcModules%20%3D%20%7B%7D%3B%0Avar%20findModule%20%3D%20function%20(id)%20%7B%0Areturn%20modules%5Bid%5D%20%7C%7C%20lcModules%5Bid.toLowerCase()%5D%3B%0A%7D%3B%0Avar%20DomModule%20%3D%20function%20()%20%7B%0Areturn%20document.createElement('dom-module')%3B%0A%7D%3B%0ADomModule.prototype%20%3D%20Object.create(HTMLElement.prototype)%3B%0APolymer.Base.extend(DomModule.prototype%2C%20%7B%0Aconstructor%3A%20DomModule%2C%0AcreatedCallback%3A%20function%20()%20%7B%0Athis.register()%3B%0A%7D%2C%0Aregister%3A%20function%20(id)%20%7B%0Aid%20%3D%20id%20%7C%7C%20this.id%20%7C%7C%20this.getAttribute('name')%20%7C%7C%20this.getAttribute('is')%3B%0Aif%20(id)%20%7B%0Athis.id%20%3D%20id%3B%0Amodules%5Bid%5D%20%3D%20this%3B%0AlcModules%5Bid.toLowerCase()%5D%20%3D%20this%3B%0A%7D%0A%7D%2C%0Aimport%3A%20function%20(id%2C%20selector)%20%7B%0Aif%20(id)%20%7B%0Avar%20m%20%3D%20findModule(id)%3B%0Aif%20(!m)%20%7B%0AforceDomModulesUpgrade()%3B%0Am%20%3D%20findModule(id)%3B%0A%7D%0Aif%20(m%20%26%26%20selector)%20%7B%0Am%20%3D%20m.querySelector(selector)%3B%0A%7D%0Areturn%20m%3B%0A%7D%0A%7D%0A%7D)%3B%0Avar%20cePolyfill%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Adocument.registerElement('dom-module'%2C%20DomModule)%3B%0Afunction%20forceDomModulesUpgrade()%20%7B%0Aif%20(cePolyfill)%20%7B%0Avar%20script%20%3D%20document._currentScript%20%7C%7C%20document.currentScript%3B%0Avar%20doc%20%3D%20script%20%26%26%20script.ownerDocument%20%7C%7C%20document%3B%0Avar%20modules%20%3D%20doc.querySelectorAll('dom-module')%3B%0Afor%20(var%20i%20%3D%20modules.length%20-%201%2C%20m%3B%20i%20%3E%3D%200%20%26%26%20(m%20%3D%20modules%5Bi%5D)%3B%20i--)%20%7B%0Aif%20(m.__upgraded__)%20%7B%0Areturn%3B%0A%7D%20else%20%7B%0ACustomElements.upgrade(m)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A_prepIs%3A%20function%20()%20%7B%0Aif%20(!this.is)%20%7B%0Avar%20module%20%3D%20(document._currentScript%20%7C%7C%20document.currentScript).parentNode%3B%0Aif%20(module.localName%20%3D%3D%3D%20'dom-module')%20%7B%0Avar%20id%20%3D%20module.id%20%7C%7C%20module.getAttribute('name')%20%7C%7C%20module.getAttribute('is')%3B%0Athis.is%20%3D%20id%3B%0A%7D%0A%7D%0Aif%20(this.is)%20%7B%0Athis.is%20%3D%20this.is.toLowerCase()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0Abehaviors%3A%20%5B%5D%2C%0A_desugarBehaviors%3A%20function%20()%20%7B%0Aif%20(this.behaviors.length)%20%7B%0Athis.behaviors%20%3D%20this._desugarSomeBehaviors(this.behaviors)%3B%0A%7D%0A%7D%2C%0A_desugarSomeBehaviors%3A%20function%20(behaviors)%20%7B%0Avar%20behaviorSet%20%3D%20%5B%5D%3B%0Abehaviors%20%3D%20this._flattenBehaviorsList(behaviors)%3B%0Afor%20(var%20i%20%3D%20behaviors.length%20-%201%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(behaviorSet.indexOf(b)%20%3D%3D%3D%20-1)%20%7B%0Athis._mixinBehavior(b)%3B%0AbehaviorSet.unshift(b)%3B%0A%7D%0A%7D%0Areturn%20behaviorSet%3B%0A%7D%2C%0A_flattenBehaviorsList%3A%20function%20(behaviors)%20%7B%0Avar%20flat%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20behaviors.length%3B%20i%2B%2B)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(b%20instanceof%20Array)%20%7B%0Aflat%20%3D%20flat.concat(this._flattenBehaviorsList(b))%3B%0A%7D%20else%20if%20(b)%20%7B%0Aflat.push(b)%3B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_flattenBehaviorsList'%2C%20'behavior%20is%20null%2C%20check%20for%20missing%20or%20404%20import'))%3B%0A%7D%0A%7D%0Areturn%20flat%3B%0A%7D%2C%0A_mixinBehavior%3A%20function%20(b)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(b)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!Polymer.Base._behaviorProperties%5Bn%5D%20%26%26%20!this.hasOwnProperty(n))%20%7B%0Athis.copyOwnProperty(n%2C%20b%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_prepBehaviors%3A%20function%20()%20%7B%0Athis._prepFlattenedBehaviors(this.behaviors)%3B%0A%7D%2C%0A_prepFlattenedBehaviors%3A%20function%20(behaviors)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20behaviors.length%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Athis._prepBehavior(behaviors%5Bi%5D)%3B%0A%7D%0Athis._prepBehavior(this)%3B%0A%7D%2C%0A_doBehavior%3A%20function%20(name%2C%20args)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._invokeBehavior(this.behaviors%5Bi%5D%2C%20name%2C%20args)%3B%0A%7D%0Athis._invokeBehavior(this%2C%20name%2C%20args)%3B%0A%7D%2C%0A_invokeBehavior%3A%20function%20(b%2C%20name%2C%20args)%20%7B%0Avar%20fn%20%3D%20b%5Bname%5D%3B%0Aif%20(fn)%20%7B%0Afn.apply(this%2C%20args%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%2C%0A_marshalBehaviors%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._marshalBehavior(this.behaviors%5Bi%5D)%3B%0A%7D%0Athis._marshalBehavior(this)%3B%0A%7D%0A%7D)%3B%0APolymer.Base._behaviorProperties%20%3D%20%7B%0AhostAttributes%3A%20true%2C%0AbeforeRegister%3A%20true%2C%0Aregistered%3A%20true%2C%0Aproperties%3A%20true%2C%0Aobservers%3A%20true%2C%0Alisteners%3A%20true%2C%0Acreated%3A%20true%2C%0Aattached%3A%20true%2C%0Adetached%3A%20true%2C%0AattributeChanged%3A%20true%2C%0Aready%3A%20true%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_getExtendedPrototype%3A%20function%20(tag)%20%7B%0Areturn%20this._getExtendedNativePrototype(tag)%3B%0A%7D%2C%0A_nativePrototypes%3A%20%7B%7D%2C%0A_getExtendedNativePrototype%3A%20function%20(tag)%20%7B%0Avar%20p%20%3D%20this._nativePrototypes%5Btag%5D%3B%0Aif%20(!p)%20%7B%0Avar%20np%20%3D%20this.getNativePrototype(tag)%3B%0Ap%20%3D%20this.extend(Object.create(np)%2C%20Polymer.Base)%3B%0Athis._nativePrototypes%5Btag%5D%20%3D%20p%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0AgetNativePrototype%3A%20function%20(tag)%20%7B%0Areturn%20Object.getPrototypeOf(document.createElement(tag))%3B%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0A_prepConstructor%3A%20function%20()%20%7B%0Athis._factoryArgs%20%3D%20this.extends%20%3F%20%5B%0Athis.extends%2C%0Athis.is%0A%5D%20%3A%20%5Bthis.is%5D%3B%0Avar%20ctor%20%3D%20function%20()%20%7B%0Areturn%20this._factory(arguments)%3B%0A%7D%3B%0Aif%20(this.hasOwnProperty('extends'))%20%7B%0Actor.extends%20%3D%20this.extends%3B%0A%7D%0AObject.defineProperty(this%2C%20'constructor'%2C%20%7B%0Avalue%3A%20ctor%2C%0Awritable%3A%20true%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0Actor.prototype%20%3D%20this%3B%0A%7D%2C%0A_factory%3A%20function%20(args)%20%7B%0Avar%20elt%20%3D%20document.createElement.apply(document%2C%20this._factoryArgs)%3B%0Aif%20(this.factoryImpl)%20%7B%0Athis.factoryImpl.apply(elt%2C%20args)%3B%0A%7D%0Areturn%20elt%3B%0A%7D%0A%7D)%3B%0APolymer.nob%20%3D%20Object.create(null)%3B%0APolymer.Base._addFeature(%7B%0Aproperties%3A%20%7B%7D%2C%0AgetPropertyInfo%3A%20function%20(property)%20%7B%0Avar%20info%20%3D%20this._getPropertyInfo(property%2C%20this.properties)%3B%0Aif%20(!info)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Ainfo%20%3D%20this._getPropertyInfo(property%2C%20this.behaviors%5Bi%5D.properties)%3B%0Aif%20(info)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%0A%7D%0Areturn%20info%20%7C%7C%20Polymer.nob%3B%0A%7D%2C%0A_getPropertyInfo%3A%20function%20(property%2C%20properties)%20%7B%0Avar%20p%20%3D%20properties%20%26%26%20properties%5Bproperty%5D%3B%0Aif%20(typeof%20p%20%3D%3D%3D%20'function')%20%7B%0Ap%20%3D%20properties%5Bproperty%5D%20%3D%20%7B%20type%3A%20p%20%7D%3B%0A%7D%0Aif%20(p)%20%7B%0Ap.defined%20%3D%20true%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0A_prepPropertyInfo%3A%20function%20()%20%7B%0Athis._propertyInfo%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.behaviors%5Bi%5D.properties)%3B%0A%7D%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.properties)%3B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this._propertyEffects)%3B%0A%7D%2C%0A_addPropertyInfo%3A%20function%20(target%2C%20source)%20%7B%0Aif%20(source)%20%7B%0Avar%20t%2C%20s%3B%0Afor%20(var%20i%20in%20source)%20%7B%0At%20%3D%20target%5Bi%5D%3B%0As%20%3D%20source%5Bi%5D%3B%0Aif%20(i%5B0%5D%20%3D%3D%3D%20'_'%20%26%26%20!s.readOnly)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(!target%5Bi%5D)%20%7B%0Atarget%5Bi%5D%20%3D%20%7B%0Atype%3A%20typeof%20s%20%3D%3D%3D%20'function'%20%3F%20s%20%3A%20s.type%2C%0AreadOnly%3A%20s.readOnly%2C%0Aattribute%3A%20Polymer.CaseMap.camelToDashCase(i)%0A%7D%3B%0A%7D%20else%20%7B%0Aif%20(!t.type)%20%7B%0At.type%20%3D%20s.type%3B%0A%7D%0Aif%20(!t.readOnly)%20%7B%0At.readOnly%20%3D%20s.readOnly%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer.CaseMap%20%3D%20%7B%0A_caseMap%3A%20%7B%7D%2C%0A_rx%3A%20%7B%0AdashToCamel%3A%20%2F-%5Ba-z%5D%2Fg%2C%0AcamelToDash%3A%20%2F(%5BA-Z%5D)%2Fg%0A%7D%2C%0AdashToCamelCase%3A%20function%20(dash)%20%7B%0Areturn%20this._caseMap%5Bdash%5D%20%7C%7C%20(this._caseMap%5Bdash%5D%20%3D%20dash.indexOf('-')%20%3C%200%20%3F%20dash%20%3A%20dash.replace(this._rx.dashToCamel%2C%20function%20(m)%20%7B%0Areturn%20m%5B1%5D.toUpperCase()%3B%0A%7D))%3B%0A%7D%2C%0AcamelToDashCase%3A%20function%20(camel)%20%7B%0Areturn%20this._caseMap%5Bcamel%5D%20%7C%7C%20(this._caseMap%5Bcamel%5D%20%3D%20camel.replace(this._rx.camelToDash%2C%20'-%241').toLowerCase())%3B%0A%7D%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_addHostAttributes%3A%20function%20(attributes)%20%7B%0Aif%20(!this._aggregatedAttributes)%20%7B%0Athis._aggregatedAttributes%20%3D%20%7B%7D%3B%0A%7D%0Aif%20(attributes)%20%7B%0Athis.mixin(this._aggregatedAttributes%2C%20attributes)%3B%0A%7D%0A%7D%2C%0A_marshalHostAttributes%3A%20function%20()%20%7B%0Aif%20(this._aggregatedAttributes)%20%7B%0Athis._applyAttributes(this%2C%20this._aggregatedAttributes)%3B%0A%7D%0A%7D%2C%0A_applyAttributes%3A%20function%20(node%2C%20attr%24)%20%7B%0Afor%20(var%20n%20in%20attr%24)%20%7B%0Aif%20(!this.hasAttribute(n)%20%26%26%20n%20!%3D%3D%20'class')%20%7B%0Avar%20v%20%3D%20attr%24%5Bn%5D%3B%0Athis.serializeValueToAttribute(v%2C%20n%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_marshalAttributes%3A%20function%20()%20%7B%0Athis._takeAttributesToModel(this)%3B%0A%7D%2C%0A_takeAttributesToModel%3A%20function%20(model)%20%7B%0Aif%20(this.hasAttributes())%20%7B%0Afor%20(var%20i%20in%20this._propertyInfo)%20%7B%0Avar%20info%20%3D%20this._propertyInfo%5Bi%5D%3B%0Aif%20(this.hasAttribute(info.attribute))%20%7B%0Athis._setAttributeToProperty(model%2C%20info.attribute%2C%20i%2C%20info)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_setAttributeToProperty%3A%20function%20(model%2C%20attribute%2C%20property%2C%20info)%20%7B%0Aif%20(!this._serializing)%20%7B%0Aproperty%20%3D%20property%20%7C%7C%20Polymer.CaseMap.dashToCamelCase(attribute)%3B%0Ainfo%20%3D%20info%20%7C%7C%20this._propertyInfo%20%26%26%20this._propertyInfo%5Bproperty%5D%3B%0Aif%20(info%20%26%26%20!info.readOnly)%20%7B%0Avar%20v%20%3D%20this.getAttribute(attribute)%3B%0Amodel%5Bproperty%5D%20%3D%20this.deserialize(v%2C%20info.type)%3B%0A%7D%0A%7D%0A%7D%2C%0A_serializing%3A%20false%2C%0AreflectPropertyToAttribute%3A%20function%20(property%2C%20attribute%2C%20value)%20%7B%0Athis._serializing%20%3D%20true%3B%0Avalue%20%3D%20value%20%3D%3D%3D%20undefined%20%3F%20this%5Bproperty%5D%20%3A%20value%3B%0Athis.serializeValueToAttribute(value%2C%20attribute%20%7C%7C%20Polymer.CaseMap.camelToDashCase(property))%3B%0Athis._serializing%20%3D%20false%3B%0A%7D%2C%0AserializeValueToAttribute%3A%20function%20(value%2C%20attribute%2C%20node)%20%7B%0Avar%20str%20%3D%20this.serialize(value)%3B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(str%20%3D%3D%3D%20undefined)%20%7B%0Anode.removeAttribute(attribute)%3B%0A%7D%20else%20%7B%0Anode.setAttribute(attribute%2C%20str)%3B%0A%7D%0A%7D%2C%0Adeserialize%3A%20function%20(value%2C%20type)%20%7B%0Aswitch%20(type)%20%7B%0Acase%20Number%3A%0Avalue%20%3D%20Number(value)%3B%0Abreak%3B%0Acase%20Boolean%3A%0Avalue%20%3D%20value%20!%3D%20null%3B%0Abreak%3B%0Acase%20Object%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0A%7D%0Abreak%3B%0Acase%20Array%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0Avalue%20%3D%20null%3B%0Aconsole.warn('Polymer%3A%3AAttributes%3A%20couldn%60t%20decode%20Array%20as%20JSON')%3B%0A%7D%0Abreak%3B%0Acase%20Date%3A%0Avalue%20%3D%20new%20Date(value)%3B%0Abreak%3B%0Acase%20String%3A%0Adefault%3A%0Abreak%3B%0A%7D%0Areturn%20value%3B%0A%7D%2C%0Aserialize%3A%20function%20(value)%20%7B%0Aswitch%20(typeof%20value)%20%7B%0Acase%20'boolean'%3A%0Areturn%20value%20%3F%20''%20%3A%20undefined%3B%0Acase%20'object'%3A%0Aif%20(value%20instanceof%20Date)%20%7B%0Areturn%20value.toString()%3B%0A%7D%20else%20if%20(value)%20%7B%0Atry%20%7B%0Areturn%20JSON.stringify(value)%3B%0A%7D%20catch%20(x)%20%7B%0Areturn%20''%3B%0A%7D%0A%7D%0Adefault%3A%0Areturn%20value%20!%3D%20null%20%3F%20value%20%3A%20undefined%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.version%20%3D%20'1.3.1'%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._marshalHostAttributes()%3B%0Athis._marshalBehaviors()%3B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-micro.html.js%0A:384 in _doBehavior data:text/javascript;charset=utf-8,Polymer.Base._addFeature(%7B%0A_prepTemplate%3A%20function%20()%20%7B%0Aif%20(this._template%20%3D%3D%3D%20undefined)%20%7B%0Athis._template%20%3D%20Polymer.DomModule.import(this.is%2C%20'template')%3B%0A%7D%0Aif%20(this._template%20%26%26%20this._template.hasAttribute('is'))%20%7B%0Athis._warn(this._logf('_prepTemplate'%2C%20'top-level%20Polymer%20template%20'%20%2B%20'must%20not%20be%20a%20type-extension%2C%20found'%2C%20this._template%2C%20'Move%20inside%20simple%20%3Ctemplate%3E.'))%3B%0A%7D%0Aif%20(this._template%20%26%26%20!this._template.content%20%26%26%20window.HTMLTemplateElement%20%26%26%20HTMLTemplateElement.decorate)%20%7B%0AHTMLTemplateElement.decorate(this._template)%3B%0A%7D%0A%7D%2C%0A_stampTemplate%3A%20function%20()%20%7B%0Aif%20(this._template)%20%7B%0Athis.root%20%3D%20this.instanceTemplate(this._template)%3B%0A%7D%0A%7D%2C%0AinstanceTemplate%3A%20function%20(template)%20%7B%0Avar%20dom%20%3D%20document.importNode(template._content%20%7C%7C%20template.content%2C%20true)%3B%0Areturn%20dom%3B%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0Avar%20baseAttachedCallback%20%3D%20Polymer.Base.attachedCallback%3B%0APolymer.Base._addFeature(%7B%0A_hostStack%3A%20%5B%5D%2C%0Aready%3A%20function%20()%20%7B%0A%7D%2C%0A_registerHost%3A%20function%20(host)%20%7B%0Athis.dataHost%20%3D%20host%20%3D%20host%20%7C%7C%20Polymer.Base._hostStack%5BPolymer.Base._hostStack.length%20-%201%5D%3B%0Aif%20(host%20%26%26%20host._clients)%20%7B%0Ahost._clients.push(this)%3B%0A%7D%0Athis._clients%20%3D%20null%3B%0Athis._clientsReadied%20%3D%20false%3B%0A%7D%2C%0A_beginHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.push(this)%3B%0Aif%20(!this._clients)%20%7B%0Athis._clients%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_endHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.pop()%3B%0A%7D%2C%0A_tryReady%3A%20function%20()%20%7B%0Athis._readied%20%3D%20false%3B%0Aif%20(this._canReady())%20%7B%0Athis._ready()%3B%0A%7D%0A%7D%2C%0A_canReady%3A%20function%20()%20%7B%0Areturn%20!this.dataHost%20%7C%7C%20this.dataHost._clientsReadied%3B%0A%7D%2C%0A_ready%3A%20function%20()%20%7B%0Athis._beforeClientsReady()%3B%0Aif%20(this._template)%20%7B%0Athis._setupRoot()%3B%0Athis._readyClients()%3B%0A%7D%0Athis._clientsReadied%20%3D%20true%3B%0Athis._clients%20%3D%20null%3B%0Athis._afterClientsReady()%3B%0Athis._readySelf()%3B%0A%7D%2C%0A_readyClients%3A%20function%20()%20%7B%0Athis._beginDistribute()%3B%0Avar%20c%24%20%3D%20this._clients%3B%0Aif%20(c%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._ready()%3B%0A%7D%0A%7D%0Athis._finishDistribute()%3B%0A%7D%2C%0A_readySelf%3A%20function%20()%20%7B%0Athis._doBehavior('ready')%3B%0Athis._readied%20%3D%20true%3B%0Aif%20(this._attachedPending)%20%7B%0Athis._attachedPending%20%3D%20false%3B%0Athis.attachedCallback()%3B%0A%7D%0A%7D%2C%0A_beforeClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_afterClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeAttached%3A%20function%20()%20%7B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Aif%20(this._readied)%20%7B%0Athis._beforeAttached()%3B%0AbaseAttachedCallback.call(this)%3B%0A%7D%20else%20%7B%0Athis._attachedPending%20%3D%20true%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.ArraySplice%20%3D%20function%20()%20%7B%0Afunction%20newSplice(index%2C%20removed%2C%20addedCount)%20%7B%0Areturn%20%7B%0Aindex%3A%20index%2C%0Aremoved%3A%20removed%2C%0AaddedCount%3A%20addedCount%0A%7D%3B%0A%7D%0Avar%20EDIT_LEAVE%20%3D%200%3B%0Avar%20EDIT_UPDATE%20%3D%201%3B%0Avar%20EDIT_ADD%20%3D%202%3B%0Avar%20EDIT_DELETE%20%3D%203%3B%0Afunction%20ArraySplice()%20%7B%0A%7D%0AArraySplice.prototype%20%3D%20%7B%0AcalcEditDistances%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20rowCount%20%3D%20oldEnd%20-%20oldStart%20%2B%201%3B%0Avar%20columnCount%20%3D%20currentEnd%20-%20currentStart%20%2B%201%3B%0Avar%20distances%20%3D%20new%20Array(rowCount)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Adistances%5Bi%5D%20%3D%20new%20Array(columnCount)%3B%0Adistances%5Bi%5D%5B0%5D%20%3D%20i%3B%0A%7D%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%0Adistances%5B0%5D%5Bj%5D%20%3D%20j%3B%0Afor%20(i%20%3D%201%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%201%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%20%7B%0Aif%20(this.equals(current%5BcurrentStart%20%2B%20j%20-%201%5D%2C%20old%5BoldStart%20%2B%20i%20-%201%5D))%0Adistances%5Bi%5D%5Bj%5D%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Aelse%20%7B%0Avar%20north%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%20%2B%201%3B%0Avar%20west%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%20%2B%201%3B%0Adistances%5Bi%5D%5Bj%5D%20%3D%20north%20%3C%20west%20%3F%20north%20%3A%20west%3B%0A%7D%0A%7D%0A%7D%0Areturn%20distances%3B%0A%7D%2C%0AspliceOperationsFromEditDistances%3A%20function%20(distances)%20%7B%0Avar%20i%20%3D%20distances.length%20-%201%3B%0Avar%20j%20%3D%20distances%5B0%5D.length%20-%201%3B%0Avar%20current%20%3D%20distances%5Bi%5D%5Bj%5D%3B%0Avar%20edits%20%3D%20%5B%5D%3B%0Awhile%20(i%20%3E%200%20%7C%7C%20j%20%3E%200)%20%7B%0Aif%20(i%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acontinue%3B%0A%7D%0Aif%20(j%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acontinue%3B%0A%7D%0Avar%20northWest%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Avar%20west%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%3B%0Avar%20north%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%3B%0Avar%20min%3B%0Aif%20(west%20%3C%20north)%0Amin%20%3D%20west%20%3C%20northWest%20%3F%20west%20%3A%20northWest%3B%0Aelse%0Amin%20%3D%20north%20%3C%20northWest%20%3F%20north%20%3A%20northWest%3B%0Aif%20(min%20%3D%3D%20northWest)%20%7B%0Aif%20(northWest%20%3D%3D%20current)%20%7B%0Aedits.push(EDIT_LEAVE)%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_UPDATE)%3B%0Acurrent%20%3D%20northWest%3B%0A%7D%0Ai--%3B%0Aj--%3B%0A%7D%20else%20if%20(min%20%3D%3D%20west)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acurrent%20%3D%20west%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acurrent%20%3D%20north%3B%0A%7D%0A%7D%0Aedits.reverse()%3B%0Areturn%20edits%3B%0A%7D%2C%0AcalcSplices%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20prefixCount%20%3D%200%3B%0Avar%20suffixCount%20%3D%200%3B%0Avar%20minLength%20%3D%20Math.min(currentEnd%20-%20currentStart%2C%20oldEnd%20-%20oldStart)%3B%0Aif%20(currentStart%20%3D%3D%200%20%26%26%20oldStart%20%3D%3D%200)%0AprefixCount%20%3D%20this.sharedPrefix(current%2C%20old%2C%20minLength)%3B%0Aif%20(currentEnd%20%3D%3D%20current.length%20%26%26%20oldEnd%20%3D%3D%20old.length)%0AsuffixCount%20%3D%20this.sharedSuffix(current%2C%20old%2C%20minLength%20-%20prefixCount)%3B%0AcurrentStart%20%2B%3D%20prefixCount%3B%0AoldStart%20%2B%3D%20prefixCount%3B%0AcurrentEnd%20-%3D%20suffixCount%3B%0AoldEnd%20-%3D%20suffixCount%3B%0Aif%20(currentEnd%20-%20currentStart%20%3D%3D%200%20%26%26%20oldEnd%20-%20oldStart%20%3D%3D%200)%0Areturn%20%5B%5D%3B%0Aif%20(currentStart%20%3D%3D%20currentEnd)%20%7B%0Avar%20splice%20%3D%20newSplice(currentStart%2C%20%5B%5D%2C%200)%3B%0Awhile%20(oldStart%20%3C%20oldEnd)%0Asplice.removed.push(old%5BoldStart%2B%2B%5D)%3B%0Areturn%20%5Bsplice%5D%3B%0A%7D%20else%20if%20(oldStart%20%3D%3D%20oldEnd)%0Areturn%20%5BnewSplice(currentStart%2C%20%5B%5D%2C%20currentEnd%20-%20currentStart)%5D%3B%0Avar%20ops%20%3D%20this.spliceOperationsFromEditDistances(this.calcEditDistances(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd))%3B%0Asplice%20%3D%20undefined%3B%0Avar%20splices%20%3D%20%5B%5D%3B%0Avar%20index%20%3D%20currentStart%3B%0Avar%20oldIndex%20%3D%20oldStart%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ops.length%3B%20i%2B%2B)%20%7B%0Aswitch%20(ops%5Bi%5D)%20%7B%0Acase%20EDIT_LEAVE%3A%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0Asplice%20%3D%20undefined%3B%0A%7D%0Aindex%2B%2B%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_UPDATE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_ADD%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_DELETE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0A%7D%0A%7D%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0A%7D%0Areturn%20splices%3B%0A%7D%2C%0AsharedPrefix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20searchLength%3B%20i%2B%2B)%0Aif%20(!this.equals(current%5Bi%5D%2C%20old%5Bi%5D))%0Areturn%20i%3B%0Areturn%20searchLength%3B%0A%7D%2C%0AsharedSuffix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Avar%20index1%20%3D%20current.length%3B%0Avar%20index2%20%3D%20old.length%3B%0Avar%20count%20%3D%200%3B%0Awhile%20(count%20%3C%20searchLength%20%26%26%20this.equals(current%5B--index1%5D%2C%20old%5B--index2%5D))%0Acount%2B%2B%3B%0Areturn%20count%3B%0A%7D%2C%0AcalculateSplices%3A%20function%20(current%2C%20previous)%20%7B%0Areturn%20this.calcSplices(current%2C%200%2C%20current.length%2C%20previous%2C%200%2C%20previous.length)%3B%0A%7D%2C%0Aequals%3A%20function%20(currentValue%2C%20previousValue)%20%7B%0Areturn%20currentValue%20%3D%3D%3D%20previousValue%3B%0A%7D%0A%7D%3B%0Areturn%20new%20ArraySplice()%3B%0A%7D()%3B%0APolymer.domInnerHTML%20%3D%20function%20()%20%7B%0Avar%20escapeAttrRegExp%20%3D%20%2F%5B%26%5Cu00A0%22%5D%2Fg%3B%0Avar%20escapeDataRegExp%20%3D%20%2F%5B%26%5Cu00A0%3C%3E%5D%2Fg%3B%0Afunction%20escapeReplace(c)%20%7B%0Aswitch%20(c)%20%7B%0Acase%20'%26'%3A%0Areturn%20'%26amp%3B'%3B%0Acase%20'%3C'%3A%0Areturn%20'%26lt%3B'%3B%0Acase%20'%3E'%3A%0Areturn%20'%26gt%3B'%3B%0Acase%20'%22'%3A%0Areturn%20'%26quot%3B'%3B%0Acase%20'%5CxA0'%3A%0Areturn%20'%26nbsp%3B'%3B%0A%7D%0A%7D%0Afunction%20escapeAttr(s)%20%7B%0Areturn%20s.replace(escapeAttrRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20escapeData(s)%20%7B%0Areturn%20s.replace(escapeDataRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20makeSet(arr)%20%7B%0Avar%20set%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20arr.length%3B%20i%2B%2B)%20%7B%0Aset%5Barr%5Bi%5D%5D%20%3D%20true%3B%0A%7D%0Areturn%20set%3B%0A%7D%0Avar%20voidElements%20%3D%20makeSet(%5B%0A'area'%2C%0A'base'%2C%0A'br'%2C%0A'col'%2C%0A'command'%2C%0A'embed'%2C%0A'hr'%2C%0A'img'%2C%0A'input'%2C%0A'keygen'%2C%0A'link'%2C%0A'meta'%2C%0A'param'%2C%0A'source'%2C%0A'track'%2C%0A'wbr'%0A%5D)%3B%0Avar%20plaintextParents%20%3D%20makeSet(%5B%0A'style'%2C%0A'script'%2C%0A'xmp'%2C%0A'iframe'%2C%0A'noembed'%2C%0A'noframes'%2C%0A'plaintext'%2C%0A'noscript'%0A%5D)%3B%0Afunction%20getOuterHTML(node%2C%20parentNode%2C%20composed)%20%7B%0Aswitch%20(node.nodeType)%20%7B%0Acase%20Node.ELEMENT_NODE%3A%0Avar%20tagName%20%3D%20node.localName%3B%0Avar%20s%20%3D%20'%3C'%20%2B%20tagName%3B%0Avar%20attrs%20%3D%20node.attributes%3B%0Afor%20(var%20i%20%3D%200%2C%20attr%3B%20attr%20%3D%20attrs%5Bi%5D%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20'%20'%20%2B%20attr.name%20%2B%20'%3D%22'%20%2B%20escapeAttr(attr.value)%20%2B%20'%22'%3B%0A%7D%0As%20%2B%3D%20'%3E'%3B%0Aif%20(voidElements%5BtagName%5D)%20%7B%0Areturn%20s%3B%0A%7D%0Areturn%20s%20%2B%20getInnerHTML(node%2C%20composed)%20%2B%20'%3C%2F'%20%2B%20tagName%20%2B%20'%3E'%3B%0Acase%20Node.TEXT_NODE%3A%0Avar%20data%20%3D%20node.data%3B%0Aif%20(parentNode%20%26%26%20plaintextParents%5BparentNode.localName%5D)%20%7B%0Areturn%20data%3B%0A%7D%0Areturn%20escapeData(data)%3B%0Acase%20Node.COMMENT_NODE%3A%0Areturn%20'%3C!--'%20%2B%20node.data%20%2B%20'--%3E'%3B%0Adefault%3A%0Aconsole.error(node)%3B%0Athrow%20new%20Error('not%20implemented')%3B%0A%7D%0A%7D%0Afunction%20getInnerHTML(node%2C%20composed)%20%7B%0Aif%20(node%20instanceof%20HTMLTemplateElement)%0Anode%20%3D%20node.content%3B%0Avar%20s%20%3D%20''%3B%0Avar%20c%24%20%3D%20Polymer.dom(node).childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20child%3B%20i%20%3C%20l%20%26%26%20(child%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20getOuterHTML(child%2C%20node%2C%20composed)%3B%0A%7D%0Areturn%20s%3B%0A%7D%0Areturn%20%7B%20getInnerHTML%3A%20getInnerHTML%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20nativeInsertBefore%20%3D%20Element.prototype.insertBefore%3B%0Avar%20nativeAppendChild%20%3D%20Element.prototype.appendChild%3B%0Avar%20nativeRemoveChild%20%3D%20Element.prototype.removeChild%3B%0APolymer.TreeApi%20%3D%20%7B%0AarrayCopyChildNodes%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopyChildren%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstElementChild%3B%20n%3B%20n%20%3D%20n.nextElementSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopy%3A%20function%20(a%24)%20%7B%0Avar%20l%20%3D%20a%24.length%3B%0Avar%20copy%20%3D%20new%20Array(l)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Acopy%5Bi%5D%20%3D%20a%24%5Bi%5D%3B%0A%7D%0Areturn%20copy%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Logical%20%3D%20%7B%0AhasParentNode%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.parentNode)%3B%0A%7D%2C%0AhasChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.childNodes%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20this.hasChildNodes(node)%20%3F%20this._getChildNodes(node)%20%3A%20node.childNodes%3B%0A%7D%2C%0A_getChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!node.__dom.childNodes)%20%7B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.__dom.firstChild%3B%20n%3B%20n%20%3D%20n.__dom.nextSibling)%20%7B%0Anode.__dom.childNodes.push(n)%3B%0A%7D%0A%7D%0Areturn%20node.__dom.childNodes%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.parentNode%20!%3D%3D%20undefined%20%3F%20node.__dom.parentNode%20%3A%20node.parentNode%3B%0A%7D%2C%0AgetFirstChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20node.__dom.firstChild%20%3A%20node.firstChild%3B%0A%7D%2C%0AgetLastChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20node.__dom.lastChild%20%3A%20node.lastChild%3B%0A%7D%2C%0AgetNextSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.nextSibling%20%3A%20node.nextSibling%3B%0A%7D%2C%0AgetPreviousSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.previousSibling%20%3A%20node.previousSibling%3B%0A%7D%2C%0AgetFirstElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20this._getFirstElementChild(node)%20%3A%20node.firstElementChild%3B%0A%7D%2C%0A_getFirstElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.firstChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetLastElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20this._getLastElementChild(node)%20%3A%20node.lastElementChild%3B%0A%7D%2C%0A_getLastElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.lastChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetNextElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20this._getNextElementSibling(node)%20%3A%20node.nextElementSibling%3B%0A%7D%2C%0A_getNextElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetPreviousElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20this._getPreviousElementSibling(node)%20%3A%20node.previousElementSibling%3B%0A%7D%2C%0A_getPreviousElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.previousSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AsaveChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!this.hasChildNodes(node))%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Anode.__dom.firstChild%20%3D%20node.firstChild%3B%0Anode.__dom.lastChild%20%3D%20node.lastChild%3B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0An.__dom%20%3D%20n.__dom%20%7C%7C%20%7B%7D%3B%0An.__dom.parentNode%20%3D%20node%3B%0Anode.__dom.childNodes.push(n)%3B%0An.__dom.nextSibling%20%3D%20n.nextSibling%3B%0An.__dom.previousSibling%20%3D%20n.previousSibling%3B%0A%7D%0A%7D%0A%7D%2C%0ArecordInsertBefore%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Athis._linkNode(n%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%20else%20%7B%0Athis._linkNode(node%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%2C%0A_linkNode%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(ref_node)%20%7B%0Aref_node.__dom%20%3D%20ref_node.__dom%20%7C%7C%20%7B%7D%3B%0A%7D%0Anode.__dom.previousSibling%20%3D%20ref_node%20%3F%20ref_node.__dom.previousSibling%20%3A%20container.__dom.lastChild%3B%0Aif%20(node.__dom.previousSibling)%20%7B%0Anode.__dom.previousSibling.__dom.nextSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.nextSibling%20%3D%20ref_node%3B%0Aif%20(node.__dom.nextSibling)%20%7B%0Anode.__dom.nextSibling.__dom.previousSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20container%3B%0Aif%20(ref_node)%20%7B%0Aif%20(ref_node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%20else%20%7B%0Acontainer.__dom.lastChild%20%3D%20node%3B%0Aif%20(!container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%2C%0ArecordRemoveChild%3A%20function%20(node%2C%20container)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node.__dom.nextSibling%3B%0A%7D%0Aif%20(node%20%3D%3D%3D%20container.__dom.lastChild)%20%7B%0Acontainer.__dom.lastChild%20%3D%20node.__dom.previousSibling%3B%0A%7D%0Avar%20p%20%3D%20node.__dom.previousSibling%3B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Aif%20(p)%20%7B%0Ap.__dom.nextSibling%20%3D%20n%3B%0A%7D%0Aif%20(n)%20%7B%0An.__dom.previousSibling%20%3D%20p%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20node.__dom.previousSibling%20%3D%20node.__dom.nextSibling%20%3D%20undefined%3B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Composed%20%3D%20%7B%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Polymer.TreeApi.arrayCopyChildNodes(node)%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.parentNode%3B%0A%7D%2C%0AclearChildNodes%3A%20function%20(node)%20%7B%0Anode.textContent%20%3D%20''%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(parentNode%2C%20newChild%2C%20refChild)%20%7B%0Areturn%20nativeInsertBefore.call(parentNode%2C%20newChild%2C%20refChild%20%7C%7C%20null)%3B%0A%7D%2C%0AappendChild%3A%20function%20(parentNode%2C%20newChild)%20%7B%0Areturn%20nativeAppendChild.call(parentNode%2C%20newChild)%3B%0A%7D%2C%0AremoveChild%3A%20function%20(parentNode%2C%20node)%20%7B%0Areturn%20nativeRemoveChild.call(parentNode%2C%20node)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0APolymer.DomApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20function%20(node)%20%7B%0Athis.node%20%3D%20needsToWrap%20%3F%20DomApi.wrap(node)%20%3A%20node%3B%0A%7D%3B%0Avar%20needsToWrap%20%3D%20Settings.hasShadow%20%26%26%20!Settings.nativeShadow%3B%0ADomApi.wrap%20%3D%20window.wrap%20%3F%20window.wrap%20%3A%20function%20(node)%20%7B%0Areturn%20node%3B%0A%7D%3B%0ADomApi.prototype%20%3D%20%7B%0Aflush%3A%20function%20()%20%7B%0APolymer.dom.flush()%3B%0A%7D%2C%0AdeepContains%3A%20function%20(node)%20%7B%0Aif%20(this.node.contains(node))%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20n%20%3D%20node%3B%0Avar%20doc%20%3D%20node.ownerDocument%3B%0Awhile%20(n%20%26%26%20n%20!%3D%3D%20doc%20%26%26%20n%20!%3D%3D%20this.node)%20%7B%0An%20%3D%20Polymer.dom(n).parentNode%20%7C%7C%20n.host%3B%0A%7D%0Areturn%20n%20%3D%3D%3D%20this.node%3B%0A%7D%2C%0AqueryDistributedElements%3A%20function%20(selector)%20%7B%0Avar%20c%24%20%3D%20this.getEffectiveChildNodes()%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%20%26%26%20DomApi.matchesSelector.call(c%2C%20selector))%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AgetEffectiveChildNodes%3A%20function%20()%20%7B%0Avar%20list%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.localName%20%3D%3D%3D%20CONTENT)%20%7B%0Avar%20d%24%20%3D%20dom(c).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20d%24.length%3B%20j%2B%2B)%20%7B%0Alist.push(d%24%5Bj%5D)%3B%0A%7D%0A%7D%20else%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AobserveNodes%3A%20function%20(callback)%20%7B%0Aif%20(callback)%20%7B%0Aif%20(!this.observer)%20%7B%0Athis.observer%20%3D%20this.node.localName%20%3D%3D%3D%20CONTENT%20%3F%20new%20DomApi.DistributedNodesObserver(this)%20%3A%20new%20DomApi.EffectiveNodesObserver(this)%3B%0A%7D%0Areturn%20this.observer.addListener(callback)%3B%0A%7D%0A%7D%2C%0AunobserveNodes%3A%20function%20(handle)%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.removeListener(handle)%3B%0A%7D%0A%7D%2C%0AnotifyObserver%3A%20function%20()%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.notify()%3B%0A%7D%0A%7D%2C%0A_query%3A%20function%20(matcher%2C%20node%2C%20halter)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this.node%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0Areturn%20list%3B%0A%7D%2C%0A_queryElements%3A%20function%20(elements%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20elements.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE)%20%7B%0Aif%20(this._queryElement(c%2C%20matcher%2C%20halter%2C%20list))%20%7B%0Areturn%20true%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_queryElement%3A%20function%20(node%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Avar%20result%20%3D%20matcher(node)%3B%0Aif%20(result)%20%7B%0Alist.push(node)%3B%0A%7D%0Aif%20(halter%20%26%26%20halter(result))%20%7B%0Areturn%20result%3B%0A%7D%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0A%7D%0A%7D%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%20%3D%20'content'%3B%0Avar%20dom%20%3D%20DomApi.factory%20%3D%20function%20(node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20document%3B%0Aif%20(!node.__domApi)%20%7B%0Anode.__domApi%20%3D%20new%20DomApi.ctor(node)%3B%0A%7D%0Areturn%20node.__domApi%3B%0A%7D%3B%0ADomApi.hasApi%20%3D%20function%20(node)%20%7B%0Areturn%20Boolean(node.__domApi)%3B%0A%7D%3B%0ADomApi.ctor%20%3D%20DomApi%3B%0APolymer.dom%20%3D%20function%20(obj%2C%20patch)%20%7B%0Aif%20(obj%20instanceof%20Event)%20%7B%0Areturn%20Polymer.EventApi.factory(obj)%3B%0A%7D%20else%20%7B%0Areturn%20DomApi.factory(obj%2C%20patch)%3B%0A%7D%0A%7D%3B%0Avar%20p%20%3D%20Element.prototype%3B%0ADomApi.matchesSelector%20%3D%20p.matches%20%7C%7C%20p.matchesSelector%20%7C%7C%20p.mozMatchesSelector%20%7C%7C%20p.msMatchesSelector%20%7C%7C%20p.oMatchesSelector%20%7C%7C%20p.webkitMatchesSelector%3B%0Areturn%20DomApi%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20dom%20%3D%20DomApi.factory%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20getInnerHTML%20%3D%20Polymer.domInnerHTML.getInnerHTML%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%3B%0Aif%20(Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0Avar%20nativeCloneNode%20%3D%20Element.prototype.cloneNode%3B%0Avar%20nativeImportNode%20%3D%20Document.prototype.importNode%3B%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0A_lazyDistribute%3A%20function%20(host)%20%7B%0Aif%20(host.shadyRoot%20%26%26%20host.shadyRoot._distributionClean)%20%7B%0Ahost.shadyRoot._distributionClean%20%3D%20false%3B%0APolymer.dom.addDebouncer(host.debounce('_distribute'%2C%20host._distributeContent))%3B%0A%7D%0A%7D%2C%0AappendChild%3A%20function%20(node)%20%7B%0Areturn%20this.insertBefore(node)%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(node%2C%20ref_node)%20%7B%0Aif%20(ref_node%20%26%26%20TreeApi.Logical.getParentNode(ref_node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20ref_node%20to%20be%20inserted%20before%20is%20not%20a%20child%20'%20%2B%20'of%20this%20node')%3B%0A%7D%0Aif%20(node.nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aif%20(DomApi.hasApi(parent))%20%7B%0Adom(parent).notifyObserver()%3B%0A%7D%0Athis._removeNode(node)%3B%0A%7D%20else%20%7B%0Athis._removeOwnerShadyRoot(node)%3B%0A%7D%0A%7D%0Aif%20(!this._addNode(node%2C%20ref_node))%20%7B%0Aif%20(ref_node)%20%7B%0Aref_node%20%3D%20ref_node.localName%20%3D%3D%3D%20CONTENT%20%3F%20this._firstComposedNode(ref_node)%20%3A%20ref_node%3B%0A%7D%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Aif%20(ref_node)%20%7B%0ATreeApi.Composed.insertBefore(container%2C%20node%2C%20ref_node)%3B%0A%7D%20else%20%7B%0ATreeApi.Composed.appendChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_addNode%3A%20function%20(node%2C%20ref_node)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Avar%20ipAdded%20%3D%20this._maybeAddInsertionPoint(node%2C%20this.node)%3B%0Aif%20(!root._invalidInsertionPoints)%20%7B%0Aroot._invalidInsertionPoints%20%3D%20ipAdded%3B%0A%7D%0Athis._addNodeToHost(root.host%2C%20node)%3B%0A%7D%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0ATreeApi.Logical.recordInsertBefore(node%2C%20this.node%2C%20ref_node)%3B%0A%7D%0Avar%20handled%20%3D%20this._maybeDistribute(node)%20%7C%7C%20this.node.shadyRoot%3B%0Aif%20(handled)%20%7B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Awhile%20(node.firstChild)%20%7B%0ATreeApi.Composed.removeChild(node%2C%20node.firstChild)%3B%0A%7D%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0Areturn%20handled%3B%0A%7D%2C%0AremoveChild%3A%20function%20(node)%20%7B%0Aif%20(TreeApi.Logical.getParentNode(node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20node%20to%20be%20removed%20is%20not%20a%20child%20of%20this%20node%3A%20'%20%2B%20node)%3B%0A%7D%0Aif%20(!this._removeNode(node))%20%7B%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(container%20%3D%3D%3D%20parent)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_removeNode%3A%20function%20(node)%20%7B%0Avar%20logicalParent%20%3D%20TreeApi.Logical.hasParentNode(node)%20%26%26%20TreeApi.Logical.getParentNode(node)%3B%0Avar%20distributed%3B%0Avar%20root%20%3D%20this._ownerShadyRootForNode(node)%3B%0Aif%20(logicalParent)%20%7B%0Adistributed%20%3D%20dom(node)._maybeDistributeParent()%3B%0ATreeApi.Logical.recordRemoveChild(node%2C%20logicalParent)%3B%0Aif%20(root%20%26%26%20this._removeDistributedChildren(root%2C%20node))%20%7B%0Aroot._invalidInsertionPoints%20%3D%20true%3B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Athis._removeOwnerShadyRoot(node)%3B%0Aif%20(root)%20%7B%0Athis._removeNodeFromHost(root.host%2C%20node)%3B%0A%7D%0Areturn%20distributed%3B%0A%7D%2C%0AreplaceChild%3A%20function%20(node%2C%20ref_node)%20%7B%0Athis.insertBefore(node%2C%20ref_node)%3B%0Athis.removeChild(ref_node)%3B%0Areturn%20node%3B%0A%7D%2C%0A_hasCachedOwnerRoot%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node._ownerShadyRoot%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Areturn%20this._ownerShadyRootForNode(this.node)%3B%0A%7D%2C%0A_ownerShadyRootForNode%3A%20function%20(node)%20%7B%0Aif%20(!node)%20%7B%0Areturn%3B%0A%7D%0Avar%20root%20%3D%20node._ownerShadyRoot%3B%0Aif%20(root%20%3D%3D%3D%20undefined)%20%7B%0Aif%20(node._isShadyRoot)%20%7B%0Aroot%20%3D%20node%3B%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aroot%20%3D%20parent._isShadyRoot%20%3F%20parent%20%3A%20this._ownerShadyRootForNode(parent)%3B%0A%7D%20else%20%7B%0Aroot%20%3D%20null%3B%0A%7D%0A%7D%0Aif%20(root%20%7C%7C%20document.documentElement.contains(node))%20%7B%0Anode._ownerShadyRoot%20%3D%20root%3B%0A%7D%0A%7D%0Areturn%20root%3B%0A%7D%2C%0A_maybeDistribute%3A%20function%20(node)%20%7B%0Avar%20fragContent%20%3D%20node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent%20%26%26%20dom(node).querySelector(CONTENT)%3B%0Avar%20wrappedContent%20%3D%20fragContent%20%26%26%20TreeApi.Logical.getParentNode(fragContent).nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%3B%0Avar%20hasContent%20%3D%20fragContent%20%7C%7C%20node.localName%20%3D%3D%3D%20CONTENT%3B%0Aif%20(hasContent)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Avar%20needsDist%20%3D%20this._nodeNeedsDistribution(this.node)%3B%0Aif%20(needsDist)%20%7B%0Athis._lazyDistribute(this.node)%3B%0A%7D%0Areturn%20needsDist%20%7C%7C%20hasContent%20%26%26%20!wrappedContent%3B%0A%7D%2C%0A_maybeAddInsertionPoint%3A%20function%20(node%2C%20parent)%20%7B%0Avar%20added%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent)%20%7B%0Avar%20c%24%20%3D%20dom(node).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20np%2C%20na%3B%20i%20%3C%20c%24.length%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anp%20%3D%20TreeApi.Logical.getParentNode(n)%3B%0Aif%20(np%20%3D%3D%3D%20node)%20%7B%0Anp%20%3D%20parent%3B%0A%7D%0Ana%20%3D%20this._maybeAddInsertionPoint(n%2C%20np)%3B%0Aadded%20%3D%20added%20%7C%7C%20na%3B%0A%7D%0A%7D%20else%20if%20(node.localName%20%3D%3D%3D%20CONTENT)%20%7B%0ATreeApi.Logical.saveChildNodes(parent)%3B%0ATreeApi.Logical.saveChildNodes(node)%3B%0Aadded%20%3D%20true%3B%0A%7D%0Areturn%20added%3B%0A%7D%2C%0A_updateInsertionPoints%3A%20function%20(host)%20%7B%0Avar%20i%24%20%3D%20host.shadyRoot._insertionPoints%20%3D%20dom(host.shadyRoot).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(TreeApi.Logical.getParentNode(c))%3B%0A%7D%0A%7D%2C%0A_nodeNeedsDistribution%3A%20function%20(node)%20%7B%0Areturn%20node%20%26%26%20node.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(node.shadyRoot)%3B%0A%7D%2C%0A_addNodeToHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementAdd)%20%7B%0Ahost._elementAdd(node)%3B%0A%7D%0A%7D%2C%0A_removeNodeFromHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementRemove)%20%7B%0Ahost._elementRemove(node)%3B%0A%7D%0A%7D%2C%0A_removeDistributedChildren%3A%20function%20(root%2C%20container)%20%7B%0Avar%20hostNeedsDist%3B%0Avar%20ip%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ip%24.length%3B%20i%2B%2B)%20%7B%0Avar%20content%20%3D%20ip%24%5Bi%5D%3B%0Aif%20(this._contains(container%2C%20content))%20%7B%0Avar%20dc%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20dc%24.length%3B%20j%2B%2B)%20%7B%0AhostNeedsDist%20%3D%20true%3B%0Avar%20node%20%3D%20dc%24%5Bj%5D%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Areturn%20hostNeedsDist%3B%0A%7D%2C%0A_contains%3A%20function%20(container%2C%20node)%20%7B%0Awhile%20(node)%20%7B%0Aif%20(node%20%3D%3D%20container)%20%7B%0Areturn%20true%3B%0A%7D%0Anode%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0A%7D%0A%7D%2C%0A_removeOwnerShadyRoot%3A%20function%20(node)%20%7B%0Aif%20(this._hasCachedOwnerRoot(node))%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node)%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20n%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._removeOwnerShadyRoot(n)%3B%0A%7D%0A%7D%0Anode._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%2C%0A_firstComposedNode%3A%20function%20(content)%20%7B%0Avar%20n%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20n%24.length%2C%20n%2C%20p%24%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ap%24%20%3D%20dom(n).getDestinationInsertionPoints()%3B%0Aif%20(p%24%5Bp%24.length%20-%201%5D%20%3D%3D%3D%20content)%20%7B%0Areturn%20n%3B%0A%7D%0A%7D%0A%7D%2C%0AquerySelector%3A%20function%20(selector)%20%7B%0Avar%20result%20%3D%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node%2C%20function%20(n)%20%7B%0Areturn%20Boolean(n)%3B%0A%7D)%5B0%5D%3B%0Areturn%20result%20%7C%7C%20null%3B%0A%7D%2C%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Areturn%20this.node._destinationInsertionPoints%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Areturn%20this.node._distributedNodes%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0A_clear%3A%20function%20()%20%7B%0Awhile%20(this.childNodes.length)%20%7B%0Athis.removeChild(this.childNodes%5B0%5D)%3B%0A%7D%0A%7D%2C%0AsetAttribute%3A%20function%20(name%2C%20value)%20%7B%0Athis.node.setAttribute(name%2C%20value)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0AremoveAttribute%3A%20function%20(name)%20%7B%0Athis.node.removeAttribute(name)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0A_maybeDistributeParent%3A%20function%20()%20%7B%0Aif%20(this._nodeNeedsDistribution(this.parentNode))%20%7B%0Athis._lazyDistribute(this.parentNode)%3B%0Areturn%20true%3B%0A%7D%0A%7D%2C%0AcloneNode%3A%20function%20(deep)%20%7B%0Avar%20n%20%3D%20nativeCloneNode.call(this.node%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(c%24%5Bi%5D).cloneNode(true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Avar%20n%20%3D%20nativeImportNode.call(doc%2C%20externalNode%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(externalNode)%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(doc).importNode(c%24%5Bi%5D%2C%20true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0A_getComposedInnerHTML%3A%20function%20()%20%7B%0Areturn%20getInnerHTML(this.node%2C%20true)%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20active%20%3D%20document.activeElement%3B%0Aif%20(!active)%20%7B%0Areturn%20null%3B%0A%7D%0Avar%20isShadyRoot%20%3D%20!!this.node._isShadyRoot%3B%0Aif%20(this.node%20!%3D%3D%20document)%20%7B%0Aif%20(!isShadyRoot)%20%7B%0Areturn%20null%3B%0A%7D%0Aif%20(this.node.host%20%3D%3D%3D%20active%20%7C%7C%20!this.node.host.contains(active))%20%7B%0Areturn%20null%3B%0A%7D%0A%7D%0Avar%20activeRoot%20%3D%20dom(active).getOwnerRoot()%3B%0Awhile%20(activeRoot%20%26%26%20activeRoot%20!%3D%3D%20this.node)%20%7B%0Aactive%20%3D%20activeRoot.host%3B%0AactiveRoot%20%3D%20dom(active).getOwnerRoot()%3B%0A%7D%0Aif%20(this.node%20%3D%3D%3D%20document)%20%7B%0Areturn%20activeRoot%20%3F%20null%20%3A%20active%3B%0A%7D%20else%20%7B%0Areturn%20activeRoot%20%3D%3D%3D%20this.node%20%3F%20active%20%3A%20null%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(this.node)%3B%0Areturn%20Array.isArray(c%24)%20%3F%20c%24%20%3A%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0Areturn%20Array.prototype.filter.call(this.childNodes%2C%20function%20(n)%20%7B%0Areturn%20n.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%3B%0A%7D)%3B%0A%7D%20else%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AparentNode%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getParentNode(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%20else%20%7B%0Avar%20tc%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20cn%20%3D%20this.childNodes%2C%20c%3B%20c%20%3D%20cn%5Bi%5D%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Atc.push(c.textContent)%3B%0A%7D%0A%7D%0Areturn%20tc.join('')%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis.node.textContent%20%3D%20text%3B%0A%7D%20else%20%7B%0Athis._clear()%3B%0Aif%20(text)%20%7B%0Athis.appendChild(document.createTextNode(text))%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20null%3B%0A%7D%20else%20%7B%0Areturn%20getInnerHTML(this.node)%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20!%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis._clear()%3B%0Avar%20d%20%3D%20document.createElement('div')%3B%0Ad.innerHTML%20%3D%20text%3B%0Avar%20c%24%20%3D%20TreeApi.arrayCopyChildNodes(d)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Athis.appendChild(c%24%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0ADomApi.hasInsertionPoint%20%3D%20function%20(root)%20%7B%0Areturn%20Boolean(root%20%26%26%20root._insertionPoints.length)%3B%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Aif%20(!Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20TreeApi.arrayCopy(this.node.querySelectorAll(selector))%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Avar%20n%20%3D%20this.node%3B%0Awhile%20(n)%20%7B%0Aif%20(n.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20n.host)%20%7B%0Areturn%20n%3B%0A%7D%0An%20%3D%20n.parentNode%3B%0A%7D%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Areturn%20doc.importNode(externalNode%2C%20deep)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDestinationInsertionPoints%20%26%26%20this.node.getDestinationInsertionPoints()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDistributedNodes%20%26%26%20this.node.getDistributedNodes()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20node%20%3D%20DomApi.wrap(this.node)%3B%0Avar%20activeElement%20%3D%20node.activeElement%3B%0Areturn%20node.contains(activeElement)%20%3F%20activeElement%20%3A%20null%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.textContent%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.innerHTML%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.innerHTML%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0Avar%20forwardMethods%20%3D%20function%20(m%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20m%24.length%3B%20i%2B%2B)%20%7B%0AforwardMethod(m%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardMethod%20%3D%20function%20(method)%20%7B%0ADomApi.prototype%5Bmethod%5D%20%3D%20function%20()%20%7B%0Areturn%20this.node%5Bmethod%5D.apply(this.node%2C%20arguments)%3B%0A%7D%3B%0A%7D%3B%0AforwardMethods(%5B%0A'cloneNode'%2C%0A'appendChild'%2C%0A'insertBefore'%2C%0A'removeChild'%2C%0A'replaceChild'%2C%0A'setAttribute'%2C%0A'removeAttribute'%2C%0A'querySelector'%0A%5D)%3B%0Avar%20forwardProperties%20%3D%20function%20(f%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20f%24.length%3B%20i%2B%2B)%20%7B%0AforwardProperty(f%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardProperty%20%3D%20function%20(name)%20%7B%0AObject.defineProperty(DomApi.prototype%2C%20name%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node%5Bname%5D%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0A%7D%3B%0AforwardProperties(%5B%0A'parentNode'%2C%0A'firstChild'%2C%0A'lastChild'%2C%0A'nextSibling'%2C%0A'previousSibling'%2C%0A'firstElementChild'%2C%0A'lastElementChild'%2C%0A'nextElementSibling'%2C%0A'previousElementSibling'%0A%5D)%3B%0A%7D())%3B%0APolymer.Base.extend(Polymer.dom%2C%20%7B%0A_flushGuard%3A%200%2C%0A_FLUSH_MAX%3A%20100%2C%0A_needsTakeRecords%3A%20!Polymer.Settings.useNativeCustomElements%2C%0A_debouncers%3A%20%5B%5D%2C%0A_staticFlushList%3A%20%5B%5D%2C%0A_finishDebouncer%3A%20null%2C%0Aflush%3A%20function%20()%20%7B%0Athis._flushGuard%20%3D%200%3B%0Athis._prepareFlush()%3B%0Awhile%20(this._debouncers.length%20%26%26%20this._flushGuard%20%3C%20this._FLUSH_MAX)%20%7B%0Awhile%20(this._debouncers.length)%20%7B%0Athis._debouncers.shift().complete()%3B%0A%7D%0Aif%20(this._finishDebouncer)%20%7B%0Athis._finishDebouncer.complete()%3B%0A%7D%0Athis._prepareFlush()%3B%0Athis._flushGuard%2B%2B%3B%0A%7D%0Aif%20(this._flushGuard%20%3E%3D%20this._FLUSH_MAX)%20%7B%0Aconsole.warn('Polymer.dom.flush%20aborted.%20Flush%20may%20not%20be%20complete.')%3B%0A%7D%0A%7D%2C%0A_prepareFlush%3A%20function%20()%20%7B%0Aif%20(this._needsTakeRecords)%20%7B%0ACustomElements.takeRecords()%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._staticFlushList.length%3B%20i%2B%2B)%20%7B%0Athis._staticFlushList%5Bi%5D()%3B%0A%7D%0A%7D%2C%0AaddStaticFlush%3A%20function%20(fn)%20%7B%0Athis._staticFlushList.push(fn)%3B%0A%7D%2C%0AremoveStaticFlush%3A%20function%20(fn)%20%7B%0Avar%20i%20%3D%20this._staticFlushList.indexOf(fn)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._staticFlushList.splice(i%2C%201)%3B%0A%7D%0A%7D%2C%0AaddDebouncer%3A%20function%20(debouncer)%20%7B%0Athis._debouncers.push(debouncer)%3B%0Athis._finishDebouncer%20%3D%20Polymer.Debounce(this._finishDebouncer%2C%20this._finishFlush)%3B%0A%7D%2C%0A_finishFlush%3A%20function%20()%20%7B%0APolymer.dom._debouncers%20%3D%20%5B%5D%3B%0A%7D%0A%7D)%3B%0APolymer.EventApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.Event%20%3D%20function%20(event)%20%7B%0Athis.event%20%3D%20event%3B%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.path%5B0%5D%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20path()%20%7B%0Areturn%20this.event.path%3B%0A%7D%0A%7D%3B%0A%7D%20else%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Avar%20current%20%3D%20this.event.currentTarget%3B%0Avar%20currentRoot%20%3D%20current%20%26%26%20Polymer.dom(current).getOwnerRoot()%3B%0Avar%20p%24%20%3D%20this.path%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20p%24.length%3B%20i%2B%2B)%20%7B%0Aif%20(Polymer.dom(p%24%5Bi%5D).getOwnerRoot()%20%3D%3D%3D%20currentRoot)%20%7B%0Areturn%20p%24%5Bi%5D%3B%0A%7D%0A%7D%0A%7D%2C%0Aget%20path()%20%7B%0Aif%20(!this.event._path)%20%7B%0Avar%20path%20%3D%20%5B%5D%3B%0Avar%20current%20%3D%20this.rootTarget%3B%0Awhile%20(current)%20%7B%0Apath.push(current)%3B%0Avar%20insertionPoints%20%3D%20Polymer.dom(current).getDestinationInsertionPoints()%3B%0Aif%20(insertionPoints.length)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20insertionPoints.length%20-%201%3B%20i%2B%2B)%20%7B%0Apath.push(insertionPoints%5Bi%5D)%3B%0A%7D%0Acurrent%20%3D%20insertionPoints%5BinsertionPoints.length%20-%201%5D%3B%0A%7D%20else%20%7B%0Acurrent%20%3D%20Polymer.dom(current).parentNode%20%7C%7C%20current.host%3B%0A%7D%0A%7D%0Apath.push(window)%3B%0Athis.event._path%20%3D%20path%3B%0A%7D%0Areturn%20this.event._path%3B%0A%7D%0A%7D%3B%0A%7D%0Avar%20factory%20%3D%20function%20(event)%20%7B%0Aif%20(!event.__eventApi)%20%7B%0Aevent.__eventApi%20%3D%20new%20DomApi.Event(event)%3B%0A%7D%0Areturn%20event.__eventApi%3B%0A%7D%3B%0Areturn%20%7B%20factory%3A%20factory%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20useShadow%20%3D%20Polymer.Settings.useShadow%3B%0AObject.defineProperty(DomApi.prototype%2C%20'classList'%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(!this._classList)%20%7B%0Athis._classList%20%3D%20new%20DomApi.ClassList(this)%3B%0A%7D%0Areturn%20this._classList%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0ADomApi.ClassList%20%3D%20function%20(host)%20%7B%0Athis.domApi%20%3D%20host%3B%0Athis.node%20%3D%20host.node%3B%0A%7D%3B%0ADomApi.ClassList.prototype%20%3D%20%7B%0Aadd%3A%20function%20()%20%7B%0Athis.node.classList.add.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Aremove%3A%20function%20()%20%7B%0Athis.node.classList.remove.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Atoggle%3A%20function%20()%20%7B%0Athis.node.classList.toggle.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0A_distributeParent%3A%20function%20()%20%7B%0Aif%20(!useShadow)%20%7B%0Athis.domApi._maybeDistributeParent()%3B%0A%7D%0A%7D%2C%0Acontains%3A%20function%20()%20%7B%0Areturn%20this.node.classList.contains.apply(this.node.classList%2C%20arguments)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.EffectiveNodesObserver%20%3D%20function%20(domApi)%20%7B%0Athis.domApi%20%3D%20domApi%3B%0Athis.node%20%3D%20this.domApi.node%3B%0Athis._listeners%20%3D%20%5B%5D%3B%0A%7D%3B%0ADomApi.EffectiveNodesObserver.prototype%20%3D%20%7B%0AaddListener%3A%20function%20(callback)%20%7B%0Aif%20(!this._isSetup)%20%7B%0Athis._setup()%3B%0Athis._isSetup%20%3D%20true%3B%0A%7D%0Avar%20listener%20%3D%20%7B%0Afn%3A%20callback%2C%0A_nodes%3A%20%5B%5D%0A%7D%3B%0Athis._listeners.push(listener)%3B%0Athis._scheduleNotify()%3B%0Areturn%20listener%3B%0A%7D%2C%0AremoveListener%3A%20function%20(handle)%20%7B%0Avar%20i%20%3D%20this._listeners.indexOf(handle)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._listeners.splice(i%2C%201)%3B%0Ahandle._nodes%20%3D%20%5B%5D%3B%0A%7D%0Aif%20(!this._hasListeners())%20%7B%0Athis._cleanup()%3B%0Athis._isSetup%20%3D%20false%3B%0A%7D%0A%7D%2C%0A_setup%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._unobserveContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_hasListeners%3A%20function%20()%20%7B%0Areturn%20Boolean(this._listeners.length)%3B%0A%7D%2C%0A_scheduleNotify%3A%20function%20()%20%7B%0Aif%20(this._debouncer)%20%7B%0Athis._debouncer.stop()%3B%0A%7D%0Athis._debouncer%20%3D%20Polymer.Debounce(this._debouncer%2C%20this._notify)%3B%0Athis._debouncer.context%20%3D%20this%3B%0APolymer.dom.addDebouncer(this._debouncer)%3B%0A%7D%2C%0Anotify%3A%20function%20()%20%7B%0Aif%20(this._hasListeners())%20%7B%0Athis._scheduleNotify()%3B%0A%7D%0A%7D%2C%0A_notify%3A%20function%20()%20%7B%0Athis._beforeCallListeners()%3B%0Athis._callListeners()%3B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0Athis._updateContentElements()%3B%0A%7D%2C%0A_updateContentElements%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_observeContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0An.__observeNodesMap%20%3D%20n.__observeNodesMap%20%7C%7C%20new%20WeakMap()%3B%0Aif%20(!n.__observeNodesMap.has(this))%20%7B%0An.__observeNodesMap.set(this%2C%20this._observeContent(n))%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_observeContent%3A%20function%20(content)%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20h%20%3D%20Polymer.dom(content).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Ah._avoidChangeCalculation%20%3D%20true%3B%0Areturn%20h%3B%0A%7D%2C%0A_unobserveContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20h%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0Ah%20%3D%20n.__observeNodesMap.get(this)%3B%0Aif%20(h)%20%7B%0APolymer.dom(n).unobserveNodes(h)%3B%0An.__observeNodesMap.delete(this)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_isContent%3A%20function%20(node)%20%7B%0Areturn%20node.localName%20%3D%3D%3D%20'content'%3B%0A%7D%2C%0A_callListeners%3A%20function%20()%20%7B%0Avar%20o%24%20%3D%20this._listeners%3B%0Avar%20nodes%20%3D%20this._getEffectiveNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20o%24.length%20%26%26%20(o%20%3D%20o%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20info%20%3D%20this._generateListenerInfo(o%2C%20nodes)%3B%0Aif%20(info%20%7C%7C%20o._alwaysNotify)%20%7B%0Athis._callListener(o%2C%20info)%3B%0A%7D%0A%7D%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getEffectiveChildNodes()%3B%0A%7D%2C%0A_generateListenerInfo%3A%20function%20(listener%2C%20newNodes)%20%7B%0Aif%20(listener._avoidChangeCalculation)%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20oldNodes%20%3D%20listener._nodes%3B%0Avar%20info%20%3D%20%7B%0Atarget%3A%20this.node%2C%0AaddedNodes%3A%20%5B%5D%2C%0AremovedNodes%3A%20%5B%5D%0A%7D%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(newNodes%2C%20oldNodes)%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Ainfo.removedNodes.push(n)%3B%0A%7D%0A%7D%0Afor%20(i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%20s.index%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0Ainfo.addedNodes.push(newNodes%5Bj%5D)%3B%0A%7D%0A%7D%0Alistener._nodes%20%3D%20newNodes%3B%0Aif%20(info.addedNodes.length%20%7C%7C%20info.removedNodes.length)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%2C%0A_callListener%3A%20function%20(listener%2C%20info)%20%7B%0Areturn%20listener.fn.call(this.node%2C%20info)%3B%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0A%7D%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0Avar%20baseSetup%20%3D%20DomApi.EffectiveNodesObserver.prototype._setup%3B%0Avar%20baseCleanup%20%3D%20DomApi.EffectiveNodesObserver.prototype._cleanup%3B%0APolymer.Base.extend(DomApi.EffectiveNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._mutationHandler%20%3D%20function%20(mxns)%20%7B%0Aif%20(mxns%20%26%26%20mxns.length)%20%7B%0Aself._scheduleNotify()%3B%0A%7D%0A%7D%3B%0Athis._observer%20%3D%20new%20MutationObserver(this._mutationHandler)%3B%0Athis._boundFlush%20%3D%20function%20()%20%7B%0Aself._flush()%3B%0A%7D%3B%0APolymer.dom.addStaticFlush(this._boundFlush)%3B%0Athis._observer.observe(this.node%2C%20%7B%20childList%3A%20true%20%7D)%3B%0A%7D%0AbaseSetup.call(this)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._observer.disconnect()%3B%0Athis._observer%20%3D%20null%3B%0Athis._mutationHandler%20%3D%20null%3B%0APolymer.dom.removeStaticFlush(this._boundFlush)%3B%0AbaseCleanup.call(this)%3B%0A%7D%2C%0A_flush%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._mutationHandler(this._observer.takeRecords())%3B%0A%7D%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._makeContentListenersAlwaysNotify()%3B%0Athis._observer.disconnect()%3B%0Athis._observer.observe(this.node%2C%20%7B%0AchildList%3A%20true%2C%0Aattributes%3A%20true%2C%0Asubtree%3A%20true%0A%7D)%3B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host%20%26%26%20Polymer.dom(host).observer)%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%2C%0A_makeContentListenersAlwaysNotify%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20this._listeners.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20this._listeners%5Bi%5D%3B%0Ah._alwaysNotify%20%3D%20h._isContentListener%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.DistributedNodesObserver%20%3D%20function%20(domApi)%20%7B%0ADomApi.EffectiveNodesObserver.call(this%2C%20domApi)%3B%0A%7D%3B%0ADomApi.DistributedNodesObserver.prototype%20%3D%20Object.create(DomApi.EffectiveNodesObserver.prototype)%3B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getDistributedNodes()%3B%0A%7D%0A%7D)%3B%0Aif%20(Settings.useShadow)%20%7B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._observer%20%3D%20Polymer.dom(host).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Athis._observer._isContentListener%20%3D%20true%3B%0Aif%20(this._hasAttrSelect())%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_hasAttrSelect%3A%20function%20()%20%7B%0Avar%20select%20%3D%20this.node.getAttribute('select')%3B%0Areturn%20select%20%26%26%20select.match(%2F%5B%5B.%5D%2B%2F)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0APolymer.dom(host).unobserveNodes(this._observer)%3B%0A%7D%0Athis._observer%20%3D%20null%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0APolymer.Base._addFeature(%7B%0A_prepShady%3A%20function%20()%20%7B%0Athis._useContent%20%3D%20this._useContent%20%7C%7C%20Boolean(this._template)%3B%0A%7D%2C%0A_setupShady%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20null%3B%0Aif%20(!this.__domApi)%20%7B%0Athis.__domApi%20%3D%20null%3B%0A%7D%0Aif%20(!this.__dom)%20%7B%0Athis.__dom%20%3D%20null%3B%0A%7D%0Aif%20(!this._ownerShadyRoot)%20%7B%0Athis._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%0A%7D%2C%0A_poolContent%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0ATreeApi.Logical.saveChildNodes(this)%3B%0A%7D%0A%7D%2C%0A_setupRoot%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis._createLocalRoot()%3B%0Aif%20(!this.dataHost)%20%7B%0AupgradeLogicalChildren(TreeApi.Logical.getChildNodes(this))%3B%0A%7D%0A%7D%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20this.root%3B%0Athis.shadyRoot._distributionClean%20%3D%20false%3B%0Athis.shadyRoot._hasDistributed%20%3D%20false%3B%0Athis.shadyRoot._isShadyRoot%20%3D%20true%3B%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0Avar%20i%24%20%3D%20this.shadyRoot._insertionPoints%20%3D%20!this._notes%20%7C%7C%20this._notes._hasContent%20%3F%20this.shadyRoot.querySelectorAll('content')%20%3A%20%5B%5D%3B%0ATreeApi.Logical.saveChildNodes(this.shadyRoot)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(c.parentNode)%3B%0A%7D%0Athis.shadyRoot.host%20%3D%20this%3B%0A%7D%2C%0Aget%20domHost()%20%7B%0Avar%20root%20%3D%20Polymer.dom(this).getOwnerRoot()%3B%0Areturn%20root%20%26%26%20root.host%3B%0A%7D%2C%0AdistributeContent%3A%20function%20(updateInsertionPoints)%20%7B%0Aif%20(this.shadyRoot)%20%7B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20this.shadyRoot._invalidInsertionPoints%20%7C%7C%20updateInsertionPoints%3B%0Avar%20host%20%3D%20getTopDistributingHost(this)%3B%0APolymer.dom(this)._lazyDistribute(host)%3B%0A%7D%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20!this.shadyRoot._distributionClean)%20%7B%0Aif%20(this.shadyRoot._invalidInsertionPoints)%20%7B%0APolymer.dom(this)._updateInsertionPoints(this)%3B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20false%3B%0A%7D%0Athis._beginDistribute()%3B%0Athis._distributeDirtyRoots()%3B%0Athis._finishDistribute()%3B%0A%7D%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._resetDistribution()%3B%0Athis._distributePool(this.shadyRoot%2C%20this._collectPool())%3B%0A%7D%0A%7D%2C%0A_distributeDirtyRoots%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.shadyRoot._dirtyRoots%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._distributeContent()%3B%0A%7D%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis.shadyRoot._distributionClean%20%3D%20true%3B%0Aif%20(DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._composeTree()%3B%0AnotifyContentObservers(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0ATreeApi.Composed.clearChildNodes(this)%3B%0Athis.appendChild(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Avar%20children%20%3D%20this._composeNode(this)%3B%0Athis._updateChildNodes(this%2C%20children)%3B%0A%7D%0A%7D%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0AnotifyInitialDistribution(this)%3B%0A%7D%0Athis.shadyRoot._hasDistributed%20%3D%20true%3B%0A%7D%0A%7D%2C%0AelementMatches%3A%20function%20(selector%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Areturn%20DomApi.matchesSelector.call(node%2C%20selector)%3B%0A%7D%2C%0A_resetDistribution%3A%20function%20()%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(child._destinationInsertionPoints)%20%7B%0Achild._destinationInsertionPoints%20%3D%20undefined%3B%0A%7D%0Aif%20(isInsertionPoint(child))%20%7B%0AclearDistributedDestinationInsertionPoints(child)%3B%0A%7D%0A%7D%0Avar%20root%20%3D%20this.shadyRoot%3B%0Avar%20p%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20p%24.length%3B%20j%2B%2B)%20%7B%0Ap%24%5Bj%5D._distributedNodes%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_collectPool%3A%20function%20()%20%7B%0Avar%20pool%20%3D%20%5B%5D%3B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Apool.push.apply(pool%2C%20child._distributedNodes)%3B%0A%7D%20else%20%7B%0Apool.push(child)%3B%0A%7D%0A%7D%0Areturn%20pool%3B%0A%7D%2C%0A_distributePool%3A%20function%20(node%2C%20pool)%20%7B%0Avar%20p%24%20%3D%20node._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._distributeInsertionPoint(p%2C%20pool)%3B%0AmaybeRedistributeParent(p%2C%20this)%3B%0A%7D%0A%7D%2C%0A_distributeInsertionPoint%3A%20function%20(content%2C%20pool)%20%7B%0Avar%20anyDistributed%20%3D%20false%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20pool.length%2C%20node%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Anode%20%3D%20pool%5Bi%5D%3B%0Aif%20(!node)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(this._matchesContentSelect(node%2C%20content))%20%7B%0AdistributeNodeInto(node%2C%20content)%3B%0Apool%5Bi%5D%20%3D%20undefined%3B%0AanyDistributed%20%3D%20true%3B%0A%7D%0A%7D%0Aif%20(!anyDistributed)%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(content)%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20children.length%3B%20j%2B%2B)%20%7B%0AdistributeNodeInto(children%5Bj%5D%2C%20content)%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeTree%3A%20function%20()%20%7B%0Athis._updateChildNodes(this%2C%20this._composeNode(this))%3B%0Avar%20p%24%20%3D%20this.shadyRoot._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%2C%20parent%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparent%20%3D%20TreeApi.Logical.getParentNode(p)%3B%0Aif%20(!parent._useContent%20%26%26%20parent%20!%3D%3D%20this%20%26%26%20parent%20!%3D%3D%20this.shadyRoot)%20%7B%0Athis._updateChildNodes(parent%2C%20this._composeNode(parent))%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeNode%3A%20function%20(node)%20%7B%0Avar%20children%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node.shadyRoot%20%7C%7C%20node)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20c%24%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Avar%20distributedNodes%20%3D%20child._distributedNodes%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20distributedNodes.length%3B%20j%2B%2B)%20%7B%0Avar%20distributedNode%20%3D%20distributedNodes%5Bj%5D%3B%0Aif%20(isFinalDestination(child%2C%20distributedNode))%20%7B%0Achildren.push(distributedNode)%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Achildren.push(child)%3B%0A%7D%0A%7D%0Areturn%20children%3B%0A%7D%2C%0A_updateChildNodes%3A%20function%20(container%2C%20children)%20%7B%0Avar%20composed%20%3D%20TreeApi.Composed.getChildNodes(container)%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(children%2C%20composed)%3B%0Afor%20(var%20i%20%3D%200%2C%20d%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Aif%20(TreeApi.Composed.getParentNode(n)%20%3D%3D%3D%20container)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20n)%3B%0A%7D%0Acomposed.splice(s.index%20%2B%20d%2C%201)%3B%0A%7D%0Ad%20-%3D%20s.addedCount%3B%0A%7D%0Afor%20(var%20i%20%3D%200%2C%20s%2C%20next%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anext%20%3D%20composed%5Bs.index%5D%3B%0Afor%20(j%20%3D%20s.index%2C%20n%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0An%20%3D%20children%5Bj%5D%3B%0ATreeApi.Composed.insertBefore(container%2C%20n%2C%20next)%3B%0Acomposed.splice(j%2C%200%2C%20n)%3B%0A%7D%0A%7D%0A%7D%2C%0A_matchesContentSelect%3A%20function%20(node%2C%20contentElement)%20%7B%0Avar%20select%20%3D%20contentElement.getAttribute('select')%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aselect%20%3D%20select.trim()%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aif%20(!(node%20instanceof%20Element))%20%7B%0Areturn%20false%3B%0A%7D%0Avar%20validSelectors%20%3D%20%2F%5E(%3Anot%5C()%3F%5B*.%23%5Ba-zA-Z_%7C%5D%2F%3B%0Aif%20(!validSelectors.test(select))%20%7B%0Areturn%20false%3B%0A%7D%0Areturn%20this.elementMatches(select%2C%20node)%3B%0A%7D%2C%0A_elementAdd%3A%20function%20()%20%7B%0A%7D%2C%0A_elementRemove%3A%20function%20()%20%7B%0A%7D%0A%7D)%3B%0Afunction%20distributeNodeInto(child%2C%20insertionPoint)%20%7B%0AinsertionPoint._distributedNodes.push(child)%3B%0Avar%20points%20%3D%20child._destinationInsertionPoints%3B%0Aif%20(!points)%20%7B%0Achild._destinationInsertionPoints%20%3D%20%5BinsertionPoint%5D%3B%0A%7D%20else%20%7B%0Apoints.push(insertionPoint)%3B%0A%7D%0A%7D%0Afunction%20clearDistributedDestinationInsertionPoints(content)%20%7B%0Avar%20e%24%20%3D%20content._distributedNodes%3B%0Aif%20(e%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20e%24.length%3B%20i%2B%2B)%20%7B%0Avar%20d%20%3D%20e%24%5Bi%5D._destinationInsertionPoints%3B%0Aif%20(d)%20%7B%0Ad.splice(d.indexOf(content)%20%2B%201%2C%20d.length)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Afunction%20maybeRedistributeParent(content%2C%20host)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(content)%3B%0Aif%20(parent%20%26%26%20parent.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(parent.shadyRoot)%20%26%26%20parent.shadyRoot._distributionClean)%20%7B%0Aparent.shadyRoot._distributionClean%20%3D%20false%3B%0Ahost.shadyRoot._dirtyRoots.push(parent)%3B%0A%7D%0A%7D%0Afunction%20isFinalDestination(insertionPoint%2C%20node)%20%7B%0Avar%20points%20%3D%20node._destinationInsertionPoints%3B%0Areturn%20points%20%26%26%20points%5Bpoints.length%20-%201%5D%20%3D%3D%3D%20insertionPoint%3B%0A%7D%0Afunction%20isInsertionPoint(node)%20%7B%0Areturn%20node.localName%20%3D%3D%20'content'%3B%0A%7D%0Afunction%20getTopDistributingHost(host)%20%7B%0Awhile%20(host%20%26%26%20hostNeedsRedistribution(host))%20%7B%0Ahost%20%3D%20host.domHost%3B%0A%7D%0Areturn%20host%3B%0A%7D%0Afunction%20hostNeedsRedistribution(host)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(host)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20c%24%5Bi%5D%3B%0Aif%20(c.localName%20%26%26%20c.localName%20%3D%3D%3D%20'content')%20%7B%0Areturn%20host.domHost%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyContentObservers(root)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20root._insertionPoints.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20root._insertionPoints%5Bi%5D%3B%0Aif%20(DomApi.hasApi(c))%20%7B%0APolymer.dom(c).notifyObserver()%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyInitialDistribution(host)%20%7B%0Aif%20(DomApi.hasApi(host))%20%7B%0APolymer.dom(host).notifyObserver()%3B%0A%7D%0A%7D%0Avar%20needsUpgrade%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Afunction%20upgradeLogicalChildren(children)%20%7B%0Aif%20(needsUpgrade%20%26%26%20children)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0ACustomElements.upgrade(children%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0Aif%20(Polymer.Settings.useShadow)%20%7B%0APolymer.Base._addFeature(%7B%0A_poolContent%3A%20function%20()%20%7B%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0A%7D%2C%0AdistributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.createShadowRoot()%3B%0Athis.shadowRoot.appendChild(this.root)%3B%0Athis.root%20%3D%20this.shadowRoot%3B%0A%7D%0A%7D)%3B%0A%7D%0APolymer.Async%20%3D%20%7B%0A_currVal%3A%200%2C%0A_lastVal%3A%200%2C%0A_callbacks%3A%20%5B%5D%2C%0A_twiddleContent%3A%200%2C%0A_twiddle%3A%20document.createTextNode('')%2C%0Arun%3A%20function%20(callback%2C%20waitTime)%20%7B%0Aif%20(waitTime%20%3E%200)%20%7B%0Areturn%20~setTimeout(callback%2C%20waitTime)%3B%0A%7D%20else%20%7B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athis._callbacks.push(callback)%3B%0Areturn%20this._currVal%2B%2B%3B%0A%7D%0A%7D%2C%0Acancel%3A%20function%20(handle)%20%7B%0Aif%20(handle%20%3C%200)%20%7B%0AclearTimeout(~handle)%3B%0A%7D%20else%20%7B%0Avar%20idx%20%3D%20handle%20-%20this._lastVal%3B%0Aif%20(idx%20%3E%3D%200)%20%7B%0Aif%20(!this._callbacks%5Bidx%5D)%20%7B%0Athrow%20'invalid%20async%20handle%3A%20'%20%2B%20handle%3B%0A%7D%0Athis._callbacks%5Bidx%5D%20%3D%20null%3B%0A%7D%0A%7D%0A%7D%2C%0A_atEndOfMicrotask%3A%20function%20()%20%7B%0Avar%20len%20%3D%20this._callbacks.length%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20len%3B%20i%2B%2B)%20%7B%0Avar%20cb%20%3D%20this._callbacks%5Bi%5D%3B%0Aif%20(cb)%20%7B%0Atry%20%7B%0Acb()%3B%0A%7D%20catch%20(e)%20%7B%0Ai%2B%2B%3B%0Athis._callbacks.splice(0%2C%20i)%3B%0Athis._lastVal%20%2B%3D%20i%3B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athrow%20e%3B%0A%7D%0A%7D%0A%7D%0Athis._callbacks.splice(0%2C%20len)%3B%0Athis._lastVal%20%2B%3D%20len%3B%0A%7D%0A%7D%3B%0Anew%20window.MutationObserver(function%20()%20%7B%0APolymer.Async._atEndOfMicrotask()%3B%0A%7D).observe(Polymer.Async._twiddle%2C%20%7B%20characterData%3A%20true%20%7D)%3B%0APolymer.Debounce%20%3D%20function%20()%20%7B%0Avar%20Async%20%3D%20Polymer.Async%3B%0Avar%20Debouncer%20%3D%20function%20(context)%20%7B%0Athis.context%20%3D%20context%3B%0Avar%20self%20%3D%20this%3B%0Athis.boundComplete%20%3D%20function%20()%20%7B%0Aself.complete()%3B%0A%7D%3B%0A%7D%3B%0ADebouncer.prototype%20%3D%20%7B%0Ago%3A%20function%20(callback%2C%20wait)%20%7B%0Avar%20h%3B%0Athis.finish%20%3D%20function%20()%20%7B%0AAsync.cancel(h)%3B%0A%7D%3B%0Ah%20%3D%20Async.run(this.boundComplete%2C%20wait)%3B%0Athis.callback%20%3D%20callback%3B%0A%7D%2C%0Astop%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.finish()%3B%0Athis.finish%20%3D%20null%3B%0A%7D%0A%7D%2C%0Acomplete%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.stop()%3B%0Athis.callback.call(this.context)%3B%0A%7D%0A%7D%0A%7D%3B%0Afunction%20debounce(debouncer%2C%20callback%2C%20wait)%20%7B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%20else%20%7B%0Adebouncer%20%3D%20new%20Debouncer(this)%3B%0A%7D%0Adebouncer.go(callback%2C%20wait)%3B%0Areturn%20debouncer%3B%0A%7D%0Areturn%20debounce%3B%0A%7D()%3B%0APolymer.Base._addFeature(%7B%0A_setupDebouncers%3A%20function%20()%20%7B%0Athis._debouncers%20%3D%20%7B%7D%3B%0A%7D%2C%0Adebounce%3A%20function%20(jobName%2C%20callback%2C%20wait)%20%7B%0Areturn%20this._debouncers%5BjobName%5D%20%3D%20Polymer.Debounce.call(this%2C%20this._debouncers%5BjobName%5D%2C%20callback%2C%20wait)%3B%0A%7D%2C%0AisDebouncerActive%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Areturn%20!!(debouncer%20%26%26%20debouncer.finish)%3B%0A%7D%2C%0AflushDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.complete()%3B%0A%7D%0A%7D%2C%0AcancelDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.DomModule%20%3D%20document.createElement('dom-module')%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepTemplate()%3B%0Athis._prepShady()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._registerHost()%3B%0Aif%20(this._template)%20%7B%0Athis._poolContent()%3B%0Athis._beginHosting()%3B%0Athis._stampTemplate()%3B%0Athis._endHosting()%3B%0A%7D%0Athis._marshalHostAttributes()%3B%0Athis._setupDebouncers()%3B%0Athis._marshalBehaviors()%3B%0Athis._tryReady()%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-mini.html.js%0A:77 in _readySelf data:text/javascript;charset=utf-8,Polymer.Base._addFeature(%7B%0A_prepTemplate%3A%20function%20()%20%7B%0Aif%20(this._template%20%3D%3D%3D%20undefined)%20%7B%0Athis._template%20%3D%20Polymer.DomModule.import(this.is%2C%20'template')%3B%0A%7D%0Aif%20(this._template%20%26%26%20this._template.hasAttribute('is'))%20%7B%0Athis._warn(this._logf('_prepTemplate'%2C%20'top-level%20Polymer%20template%20'%20%2B%20'must%20not%20be%20a%20type-extension%2C%20found'%2C%20this._template%2C%20'Move%20inside%20simple%20%3Ctemplate%3E.'))%3B%0A%7D%0Aif%20(this._template%20%26%26%20!this._template.content%20%26%26%20window.HTMLTemplateElement%20%26%26%20HTMLTemplateElement.decorate)%20%7B%0AHTMLTemplateElement.decorate(this._template)%3B%0A%7D%0A%7D%2C%0A_stampTemplate%3A%20function%20()%20%7B%0Aif%20(this._template)%20%7B%0Athis.root%20%3D%20this.instanceTemplate(this._template)%3B%0A%7D%0A%7D%2C%0AinstanceTemplate%3A%20function%20(template)%20%7B%0Avar%20dom%20%3D%20document.importNode(template._content%20%7C%7C%20template.content%2C%20true)%3B%0Areturn%20dom%3B%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0Avar%20baseAttachedCallback%20%3D%20Polymer.Base.attachedCallback%3B%0APolymer.Base._addFeature(%7B%0A_hostStack%3A%20%5B%5D%2C%0Aready%3A%20function%20()%20%7B%0A%7D%2C%0A_registerHost%3A%20function%20(host)%20%7B%0Athis.dataHost%20%3D%20host%20%3D%20host%20%7C%7C%20Polymer.Base._hostStack%5BPolymer.Base._hostStack.length%20-%201%5D%3B%0Aif%20(host%20%26%26%20host._clients)%20%7B%0Ahost._clients.push(this)%3B%0A%7D%0Athis._clients%20%3D%20null%3B%0Athis._clientsReadied%20%3D%20false%3B%0A%7D%2C%0A_beginHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.push(this)%3B%0Aif%20(!this._clients)%20%7B%0Athis._clients%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_endHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.pop()%3B%0A%7D%2C%0A_tryReady%3A%20function%20()%20%7B%0Athis._readied%20%3D%20false%3B%0Aif%20(this._canReady())%20%7B%0Athis._ready()%3B%0A%7D%0A%7D%2C%0A_canReady%3A%20function%20()%20%7B%0Areturn%20!this.dataHost%20%7C%7C%20this.dataHost._clientsReadied%3B%0A%7D%2C%0A_ready%3A%20function%20()%20%7B%0Athis._beforeClientsReady()%3B%0Aif%20(this._template)%20%7B%0Athis._setupRoot()%3B%0Athis._readyClients()%3B%0A%7D%0Athis._clientsReadied%20%3D%20true%3B%0Athis._clients%20%3D%20null%3B%0Athis._afterClientsReady()%3B%0Athis._readySelf()%3B%0A%7D%2C%0A_readyClients%3A%20function%20()%20%7B%0Athis._beginDistribute()%3B%0Avar%20c%24%20%3D%20this._clients%3B%0Aif%20(c%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._ready()%3B%0A%7D%0A%7D%0Athis._finishDistribute()%3B%0A%7D%2C%0A_readySelf%3A%20function%20()%20%7B%0Athis._doBehavior('ready')%3B%0Athis._readied%20%3D%20true%3B%0Aif%20(this._attachedPending)%20%7B%0Athis._attachedPending%20%3D%20false%3B%0Athis.attachedCallback()%3B%0A%7D%0A%7D%2C%0A_beforeClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_afterClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeAttached%3A%20function%20()%20%7B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Aif%20(this._readied)%20%7B%0Athis._beforeAttached()%3B%0AbaseAttachedCallback.call(this)%3B%0A%7D%20else%20%7B%0Athis._attachedPending%20%3D%20true%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.ArraySplice%20%3D%20function%20()%20%7B%0Afunction%20newSplice(index%2C%20removed%2C%20addedCount)%20%7B%0Areturn%20%7B%0Aindex%3A%20index%2C%0Aremoved%3A%20removed%2C%0AaddedCount%3A%20addedCount%0A%7D%3B%0A%7D%0Avar%20EDIT_LEAVE%20%3D%200%3B%0Avar%20EDIT_UPDATE%20%3D%201%3B%0Avar%20EDIT_ADD%20%3D%202%3B%0Avar%20EDIT_DELETE%20%3D%203%3B%0Afunction%20ArraySplice()%20%7B%0A%7D%0AArraySplice.prototype%20%3D%20%7B%0AcalcEditDistances%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20rowCount%20%3D%20oldEnd%20-%20oldStart%20%2B%201%3B%0Avar%20columnCount%20%3D%20currentEnd%20-%20currentStart%20%2B%201%3B%0Avar%20distances%20%3D%20new%20Array(rowCount)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Adistances%5Bi%5D%20%3D%20new%20Array(columnCount)%3B%0Adistances%5Bi%5D%5B0%5D%20%3D%20i%3B%0A%7D%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%0Adistances%5B0%5D%5Bj%5D%20%3D%20j%3B%0Afor%20(i%20%3D%201%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%201%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%20%7B%0Aif%20(this.equals(current%5BcurrentStart%20%2B%20j%20-%201%5D%2C%20old%5BoldStart%20%2B%20i%20-%201%5D))%0Adistances%5Bi%5D%5Bj%5D%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Aelse%20%7B%0Avar%20north%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%20%2B%201%3B%0Avar%20west%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%20%2B%201%3B%0Adistances%5Bi%5D%5Bj%5D%20%3D%20north%20%3C%20west%20%3F%20north%20%3A%20west%3B%0A%7D%0A%7D%0A%7D%0Areturn%20distances%3B%0A%7D%2C%0AspliceOperationsFromEditDistances%3A%20function%20(distances)%20%7B%0Avar%20i%20%3D%20distances.length%20-%201%3B%0Avar%20j%20%3D%20distances%5B0%5D.length%20-%201%3B%0Avar%20current%20%3D%20distances%5Bi%5D%5Bj%5D%3B%0Avar%20edits%20%3D%20%5B%5D%3B%0Awhile%20(i%20%3E%200%20%7C%7C%20j%20%3E%200)%20%7B%0Aif%20(i%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acontinue%3B%0A%7D%0Aif%20(j%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acontinue%3B%0A%7D%0Avar%20northWest%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Avar%20west%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%3B%0Avar%20north%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%3B%0Avar%20min%3B%0Aif%20(west%20%3C%20north)%0Amin%20%3D%20west%20%3C%20northWest%20%3F%20west%20%3A%20northWest%3B%0Aelse%0Amin%20%3D%20north%20%3C%20northWest%20%3F%20north%20%3A%20northWest%3B%0Aif%20(min%20%3D%3D%20northWest)%20%7B%0Aif%20(northWest%20%3D%3D%20current)%20%7B%0Aedits.push(EDIT_LEAVE)%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_UPDATE)%3B%0Acurrent%20%3D%20northWest%3B%0A%7D%0Ai--%3B%0Aj--%3B%0A%7D%20else%20if%20(min%20%3D%3D%20west)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acurrent%20%3D%20west%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acurrent%20%3D%20north%3B%0A%7D%0A%7D%0Aedits.reverse()%3B%0Areturn%20edits%3B%0A%7D%2C%0AcalcSplices%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20prefixCount%20%3D%200%3B%0Avar%20suffixCount%20%3D%200%3B%0Avar%20minLength%20%3D%20Math.min(currentEnd%20-%20currentStart%2C%20oldEnd%20-%20oldStart)%3B%0Aif%20(currentStart%20%3D%3D%200%20%26%26%20oldStart%20%3D%3D%200)%0AprefixCount%20%3D%20this.sharedPrefix(current%2C%20old%2C%20minLength)%3B%0Aif%20(currentEnd%20%3D%3D%20current.length%20%26%26%20oldEnd%20%3D%3D%20old.length)%0AsuffixCount%20%3D%20this.sharedSuffix(current%2C%20old%2C%20minLength%20-%20prefixCount)%3B%0AcurrentStart%20%2B%3D%20prefixCount%3B%0AoldStart%20%2B%3D%20prefixCount%3B%0AcurrentEnd%20-%3D%20suffixCount%3B%0AoldEnd%20-%3D%20suffixCount%3B%0Aif%20(currentEnd%20-%20currentStart%20%3D%3D%200%20%26%26%20oldEnd%20-%20oldStart%20%3D%3D%200)%0Areturn%20%5B%5D%3B%0Aif%20(currentStart%20%3D%3D%20currentEnd)%20%7B%0Avar%20splice%20%3D%20newSplice(currentStart%2C%20%5B%5D%2C%200)%3B%0Awhile%20(oldStart%20%3C%20oldEnd)%0Asplice.removed.push(old%5BoldStart%2B%2B%5D)%3B%0Areturn%20%5Bsplice%5D%3B%0A%7D%20else%20if%20(oldStart%20%3D%3D%20oldEnd)%0Areturn%20%5BnewSplice(currentStart%2C%20%5B%5D%2C%20currentEnd%20-%20currentStart)%5D%3B%0Avar%20ops%20%3D%20this.spliceOperationsFromEditDistances(this.calcEditDistances(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd))%3B%0Asplice%20%3D%20undefined%3B%0Avar%20splices%20%3D%20%5B%5D%3B%0Avar%20index%20%3D%20currentStart%3B%0Avar%20oldIndex%20%3D%20oldStart%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ops.length%3B%20i%2B%2B)%20%7B%0Aswitch%20(ops%5Bi%5D)%20%7B%0Acase%20EDIT_LEAVE%3A%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0Asplice%20%3D%20undefined%3B%0A%7D%0Aindex%2B%2B%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_UPDATE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_ADD%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_DELETE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0A%7D%0A%7D%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0A%7D%0Areturn%20splices%3B%0A%7D%2C%0AsharedPrefix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20searchLength%3B%20i%2B%2B)%0Aif%20(!this.equals(current%5Bi%5D%2C%20old%5Bi%5D))%0Areturn%20i%3B%0Areturn%20searchLength%3B%0A%7D%2C%0AsharedSuffix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Avar%20index1%20%3D%20current.length%3B%0Avar%20index2%20%3D%20old.length%3B%0Avar%20count%20%3D%200%3B%0Awhile%20(count%20%3C%20searchLength%20%26%26%20this.equals(current%5B--index1%5D%2C%20old%5B--index2%5D))%0Acount%2B%2B%3B%0Areturn%20count%3B%0A%7D%2C%0AcalculateSplices%3A%20function%20(current%2C%20previous)%20%7B%0Areturn%20this.calcSplices(current%2C%200%2C%20current.length%2C%20previous%2C%200%2C%20previous.length)%3B%0A%7D%2C%0Aequals%3A%20function%20(currentValue%2C%20previousValue)%20%7B%0Areturn%20currentValue%20%3D%3D%3D%20previousValue%3B%0A%7D%0A%7D%3B%0Areturn%20new%20ArraySplice()%3B%0A%7D()%3B%0APolymer.domInnerHTML%20%3D%20function%20()%20%7B%0Avar%20escapeAttrRegExp%20%3D%20%2F%5B%26%5Cu00A0%22%5D%2Fg%3B%0Avar%20escapeDataRegExp%20%3D%20%2F%5B%26%5Cu00A0%3C%3E%5D%2Fg%3B%0Afunction%20escapeReplace(c)%20%7B%0Aswitch%20(c)%20%7B%0Acase%20'%26'%3A%0Areturn%20'%26amp%3B'%3B%0Acase%20'%3C'%3A%0Areturn%20'%26lt%3B'%3B%0Acase%20'%3E'%3A%0Areturn%20'%26gt%3B'%3B%0Acase%20'%22'%3A%0Areturn%20'%26quot%3B'%3B%0Acase%20'%5CxA0'%3A%0Areturn%20'%26nbsp%3B'%3B%0A%7D%0A%7D%0Afunction%20escapeAttr(s)%20%7B%0Areturn%20s.replace(escapeAttrRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20escapeData(s)%20%7B%0Areturn%20s.replace(escapeDataRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20makeSet(arr)%20%7B%0Avar%20set%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20arr.length%3B%20i%2B%2B)%20%7B%0Aset%5Barr%5Bi%5D%5D%20%3D%20true%3B%0A%7D%0Areturn%20set%3B%0A%7D%0Avar%20voidElements%20%3D%20makeSet(%5B%0A'area'%2C%0A'base'%2C%0A'br'%2C%0A'col'%2C%0A'command'%2C%0A'embed'%2C%0A'hr'%2C%0A'img'%2C%0A'input'%2C%0A'keygen'%2C%0A'link'%2C%0A'meta'%2C%0A'param'%2C%0A'source'%2C%0A'track'%2C%0A'wbr'%0A%5D)%3B%0Avar%20plaintextParents%20%3D%20makeSet(%5B%0A'style'%2C%0A'script'%2C%0A'xmp'%2C%0A'iframe'%2C%0A'noembed'%2C%0A'noframes'%2C%0A'plaintext'%2C%0A'noscript'%0A%5D)%3B%0Afunction%20getOuterHTML(node%2C%20parentNode%2C%20composed)%20%7B%0Aswitch%20(node.nodeType)%20%7B%0Acase%20Node.ELEMENT_NODE%3A%0Avar%20tagName%20%3D%20node.localName%3B%0Avar%20s%20%3D%20'%3C'%20%2B%20tagName%3B%0Avar%20attrs%20%3D%20node.attributes%3B%0Afor%20(var%20i%20%3D%200%2C%20attr%3B%20attr%20%3D%20attrs%5Bi%5D%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20'%20'%20%2B%20attr.name%20%2B%20'%3D%22'%20%2B%20escapeAttr(attr.value)%20%2B%20'%22'%3B%0A%7D%0As%20%2B%3D%20'%3E'%3B%0Aif%20(voidElements%5BtagName%5D)%20%7B%0Areturn%20s%3B%0A%7D%0Areturn%20s%20%2B%20getInnerHTML(node%2C%20composed)%20%2B%20'%3C%2F'%20%2B%20tagName%20%2B%20'%3E'%3B%0Acase%20Node.TEXT_NODE%3A%0Avar%20data%20%3D%20node.data%3B%0Aif%20(parentNode%20%26%26%20plaintextParents%5BparentNode.localName%5D)%20%7B%0Areturn%20data%3B%0A%7D%0Areturn%20escapeData(data)%3B%0Acase%20Node.COMMENT_NODE%3A%0Areturn%20'%3C!--'%20%2B%20node.data%20%2B%20'--%3E'%3B%0Adefault%3A%0Aconsole.error(node)%3B%0Athrow%20new%20Error('not%20implemented')%3B%0A%7D%0A%7D%0Afunction%20getInnerHTML(node%2C%20composed)%20%7B%0Aif%20(node%20instanceof%20HTMLTemplateElement)%0Anode%20%3D%20node.content%3B%0Avar%20s%20%3D%20''%3B%0Avar%20c%24%20%3D%20Polymer.dom(node).childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20child%3B%20i%20%3C%20l%20%26%26%20(child%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20getOuterHTML(child%2C%20node%2C%20composed)%3B%0A%7D%0Areturn%20s%3B%0A%7D%0Areturn%20%7B%20getInnerHTML%3A%20getInnerHTML%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20nativeInsertBefore%20%3D%20Element.prototype.insertBefore%3B%0Avar%20nativeAppendChild%20%3D%20Element.prototype.appendChild%3B%0Avar%20nativeRemoveChild%20%3D%20Element.prototype.removeChild%3B%0APolymer.TreeApi%20%3D%20%7B%0AarrayCopyChildNodes%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopyChildren%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstElementChild%3B%20n%3B%20n%20%3D%20n.nextElementSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopy%3A%20function%20(a%24)%20%7B%0Avar%20l%20%3D%20a%24.length%3B%0Avar%20copy%20%3D%20new%20Array(l)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Acopy%5Bi%5D%20%3D%20a%24%5Bi%5D%3B%0A%7D%0Areturn%20copy%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Logical%20%3D%20%7B%0AhasParentNode%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.parentNode)%3B%0A%7D%2C%0AhasChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.childNodes%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20this.hasChildNodes(node)%20%3F%20this._getChildNodes(node)%20%3A%20node.childNodes%3B%0A%7D%2C%0A_getChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!node.__dom.childNodes)%20%7B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.__dom.firstChild%3B%20n%3B%20n%20%3D%20n.__dom.nextSibling)%20%7B%0Anode.__dom.childNodes.push(n)%3B%0A%7D%0A%7D%0Areturn%20node.__dom.childNodes%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.parentNode%20!%3D%3D%20undefined%20%3F%20node.__dom.parentNode%20%3A%20node.parentNode%3B%0A%7D%2C%0AgetFirstChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20node.__dom.firstChild%20%3A%20node.firstChild%3B%0A%7D%2C%0AgetLastChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20node.__dom.lastChild%20%3A%20node.lastChild%3B%0A%7D%2C%0AgetNextSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.nextSibling%20%3A%20node.nextSibling%3B%0A%7D%2C%0AgetPreviousSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.previousSibling%20%3A%20node.previousSibling%3B%0A%7D%2C%0AgetFirstElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20this._getFirstElementChild(node)%20%3A%20node.firstElementChild%3B%0A%7D%2C%0A_getFirstElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.firstChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetLastElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20this._getLastElementChild(node)%20%3A%20node.lastElementChild%3B%0A%7D%2C%0A_getLastElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.lastChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetNextElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20this._getNextElementSibling(node)%20%3A%20node.nextElementSibling%3B%0A%7D%2C%0A_getNextElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetPreviousElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20this._getPreviousElementSibling(node)%20%3A%20node.previousElementSibling%3B%0A%7D%2C%0A_getPreviousElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.previousSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AsaveChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!this.hasChildNodes(node))%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Anode.__dom.firstChild%20%3D%20node.firstChild%3B%0Anode.__dom.lastChild%20%3D%20node.lastChild%3B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0An.__dom%20%3D%20n.__dom%20%7C%7C%20%7B%7D%3B%0An.__dom.parentNode%20%3D%20node%3B%0Anode.__dom.childNodes.push(n)%3B%0An.__dom.nextSibling%20%3D%20n.nextSibling%3B%0An.__dom.previousSibling%20%3D%20n.previousSibling%3B%0A%7D%0A%7D%0A%7D%2C%0ArecordInsertBefore%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Athis._linkNode(n%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%20else%20%7B%0Athis._linkNode(node%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%2C%0A_linkNode%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(ref_node)%20%7B%0Aref_node.__dom%20%3D%20ref_node.__dom%20%7C%7C%20%7B%7D%3B%0A%7D%0Anode.__dom.previousSibling%20%3D%20ref_node%20%3F%20ref_node.__dom.previousSibling%20%3A%20container.__dom.lastChild%3B%0Aif%20(node.__dom.previousSibling)%20%7B%0Anode.__dom.previousSibling.__dom.nextSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.nextSibling%20%3D%20ref_node%3B%0Aif%20(node.__dom.nextSibling)%20%7B%0Anode.__dom.nextSibling.__dom.previousSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20container%3B%0Aif%20(ref_node)%20%7B%0Aif%20(ref_node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%20else%20%7B%0Acontainer.__dom.lastChild%20%3D%20node%3B%0Aif%20(!container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%2C%0ArecordRemoveChild%3A%20function%20(node%2C%20container)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node.__dom.nextSibling%3B%0A%7D%0Aif%20(node%20%3D%3D%3D%20container.__dom.lastChild)%20%7B%0Acontainer.__dom.lastChild%20%3D%20node.__dom.previousSibling%3B%0A%7D%0Avar%20p%20%3D%20node.__dom.previousSibling%3B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Aif%20(p)%20%7B%0Ap.__dom.nextSibling%20%3D%20n%3B%0A%7D%0Aif%20(n)%20%7B%0An.__dom.previousSibling%20%3D%20p%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20node.__dom.previousSibling%20%3D%20node.__dom.nextSibling%20%3D%20undefined%3B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Composed%20%3D%20%7B%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Polymer.TreeApi.arrayCopyChildNodes(node)%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.parentNode%3B%0A%7D%2C%0AclearChildNodes%3A%20function%20(node)%20%7B%0Anode.textContent%20%3D%20''%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(parentNode%2C%20newChild%2C%20refChild)%20%7B%0Areturn%20nativeInsertBefore.call(parentNode%2C%20newChild%2C%20refChild%20%7C%7C%20null)%3B%0A%7D%2C%0AappendChild%3A%20function%20(parentNode%2C%20newChild)%20%7B%0Areturn%20nativeAppendChild.call(parentNode%2C%20newChild)%3B%0A%7D%2C%0AremoveChild%3A%20function%20(parentNode%2C%20node)%20%7B%0Areturn%20nativeRemoveChild.call(parentNode%2C%20node)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0APolymer.DomApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20function%20(node)%20%7B%0Athis.node%20%3D%20needsToWrap%20%3F%20DomApi.wrap(node)%20%3A%20node%3B%0A%7D%3B%0Avar%20needsToWrap%20%3D%20Settings.hasShadow%20%26%26%20!Settings.nativeShadow%3B%0ADomApi.wrap%20%3D%20window.wrap%20%3F%20window.wrap%20%3A%20function%20(node)%20%7B%0Areturn%20node%3B%0A%7D%3B%0ADomApi.prototype%20%3D%20%7B%0Aflush%3A%20function%20()%20%7B%0APolymer.dom.flush()%3B%0A%7D%2C%0AdeepContains%3A%20function%20(node)%20%7B%0Aif%20(this.node.contains(node))%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20n%20%3D%20node%3B%0Avar%20doc%20%3D%20node.ownerDocument%3B%0Awhile%20(n%20%26%26%20n%20!%3D%3D%20doc%20%26%26%20n%20!%3D%3D%20this.node)%20%7B%0An%20%3D%20Polymer.dom(n).parentNode%20%7C%7C%20n.host%3B%0A%7D%0Areturn%20n%20%3D%3D%3D%20this.node%3B%0A%7D%2C%0AqueryDistributedElements%3A%20function%20(selector)%20%7B%0Avar%20c%24%20%3D%20this.getEffectiveChildNodes()%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%20%26%26%20DomApi.matchesSelector.call(c%2C%20selector))%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AgetEffectiveChildNodes%3A%20function%20()%20%7B%0Avar%20list%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.localName%20%3D%3D%3D%20CONTENT)%20%7B%0Avar%20d%24%20%3D%20dom(c).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20d%24.length%3B%20j%2B%2B)%20%7B%0Alist.push(d%24%5Bj%5D)%3B%0A%7D%0A%7D%20else%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AobserveNodes%3A%20function%20(callback)%20%7B%0Aif%20(callback)%20%7B%0Aif%20(!this.observer)%20%7B%0Athis.observer%20%3D%20this.node.localName%20%3D%3D%3D%20CONTENT%20%3F%20new%20DomApi.DistributedNodesObserver(this)%20%3A%20new%20DomApi.EffectiveNodesObserver(this)%3B%0A%7D%0Areturn%20this.observer.addListener(callback)%3B%0A%7D%0A%7D%2C%0AunobserveNodes%3A%20function%20(handle)%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.removeListener(handle)%3B%0A%7D%0A%7D%2C%0AnotifyObserver%3A%20function%20()%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.notify()%3B%0A%7D%0A%7D%2C%0A_query%3A%20function%20(matcher%2C%20node%2C%20halter)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this.node%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0Areturn%20list%3B%0A%7D%2C%0A_queryElements%3A%20function%20(elements%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20elements.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE)%20%7B%0Aif%20(this._queryElement(c%2C%20matcher%2C%20halter%2C%20list))%20%7B%0Areturn%20true%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_queryElement%3A%20function%20(node%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Avar%20result%20%3D%20matcher(node)%3B%0Aif%20(result)%20%7B%0Alist.push(node)%3B%0A%7D%0Aif%20(halter%20%26%26%20halter(result))%20%7B%0Areturn%20result%3B%0A%7D%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0A%7D%0A%7D%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%20%3D%20'content'%3B%0Avar%20dom%20%3D%20DomApi.factory%20%3D%20function%20(node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20document%3B%0Aif%20(!node.__domApi)%20%7B%0Anode.__domApi%20%3D%20new%20DomApi.ctor(node)%3B%0A%7D%0Areturn%20node.__domApi%3B%0A%7D%3B%0ADomApi.hasApi%20%3D%20function%20(node)%20%7B%0Areturn%20Boolean(node.__domApi)%3B%0A%7D%3B%0ADomApi.ctor%20%3D%20DomApi%3B%0APolymer.dom%20%3D%20function%20(obj%2C%20patch)%20%7B%0Aif%20(obj%20instanceof%20Event)%20%7B%0Areturn%20Polymer.EventApi.factory(obj)%3B%0A%7D%20else%20%7B%0Areturn%20DomApi.factory(obj%2C%20patch)%3B%0A%7D%0A%7D%3B%0Avar%20p%20%3D%20Element.prototype%3B%0ADomApi.matchesSelector%20%3D%20p.matches%20%7C%7C%20p.matchesSelector%20%7C%7C%20p.mozMatchesSelector%20%7C%7C%20p.msMatchesSelector%20%7C%7C%20p.oMatchesSelector%20%7C%7C%20p.webkitMatchesSelector%3B%0Areturn%20DomApi%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20dom%20%3D%20DomApi.factory%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20getInnerHTML%20%3D%20Polymer.domInnerHTML.getInnerHTML%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%3B%0Aif%20(Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0Avar%20nativeCloneNode%20%3D%20Element.prototype.cloneNode%3B%0Avar%20nativeImportNode%20%3D%20Document.prototype.importNode%3B%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0A_lazyDistribute%3A%20function%20(host)%20%7B%0Aif%20(host.shadyRoot%20%26%26%20host.shadyRoot._distributionClean)%20%7B%0Ahost.shadyRoot._distributionClean%20%3D%20false%3B%0APolymer.dom.addDebouncer(host.debounce('_distribute'%2C%20host._distributeContent))%3B%0A%7D%0A%7D%2C%0AappendChild%3A%20function%20(node)%20%7B%0Areturn%20this.insertBefore(node)%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(node%2C%20ref_node)%20%7B%0Aif%20(ref_node%20%26%26%20TreeApi.Logical.getParentNode(ref_node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20ref_node%20to%20be%20inserted%20before%20is%20not%20a%20child%20'%20%2B%20'of%20this%20node')%3B%0A%7D%0Aif%20(node.nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aif%20(DomApi.hasApi(parent))%20%7B%0Adom(parent).notifyObserver()%3B%0A%7D%0Athis._removeNode(node)%3B%0A%7D%20else%20%7B%0Athis._removeOwnerShadyRoot(node)%3B%0A%7D%0A%7D%0Aif%20(!this._addNode(node%2C%20ref_node))%20%7B%0Aif%20(ref_node)%20%7B%0Aref_node%20%3D%20ref_node.localName%20%3D%3D%3D%20CONTENT%20%3F%20this._firstComposedNode(ref_node)%20%3A%20ref_node%3B%0A%7D%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Aif%20(ref_node)%20%7B%0ATreeApi.Composed.insertBefore(container%2C%20node%2C%20ref_node)%3B%0A%7D%20else%20%7B%0ATreeApi.Composed.appendChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_addNode%3A%20function%20(node%2C%20ref_node)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Avar%20ipAdded%20%3D%20this._maybeAddInsertionPoint(node%2C%20this.node)%3B%0Aif%20(!root._invalidInsertionPoints)%20%7B%0Aroot._invalidInsertionPoints%20%3D%20ipAdded%3B%0A%7D%0Athis._addNodeToHost(root.host%2C%20node)%3B%0A%7D%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0ATreeApi.Logical.recordInsertBefore(node%2C%20this.node%2C%20ref_node)%3B%0A%7D%0Avar%20handled%20%3D%20this._maybeDistribute(node)%20%7C%7C%20this.node.shadyRoot%3B%0Aif%20(handled)%20%7B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Awhile%20(node.firstChild)%20%7B%0ATreeApi.Composed.removeChild(node%2C%20node.firstChild)%3B%0A%7D%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0Areturn%20handled%3B%0A%7D%2C%0AremoveChild%3A%20function%20(node)%20%7B%0Aif%20(TreeApi.Logical.getParentNode(node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20node%20to%20be%20removed%20is%20not%20a%20child%20of%20this%20node%3A%20'%20%2B%20node)%3B%0A%7D%0Aif%20(!this._removeNode(node))%20%7B%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(container%20%3D%3D%3D%20parent)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_removeNode%3A%20function%20(node)%20%7B%0Avar%20logicalParent%20%3D%20TreeApi.Logical.hasParentNode(node)%20%26%26%20TreeApi.Logical.getParentNode(node)%3B%0Avar%20distributed%3B%0Avar%20root%20%3D%20this._ownerShadyRootForNode(node)%3B%0Aif%20(logicalParent)%20%7B%0Adistributed%20%3D%20dom(node)._maybeDistributeParent()%3B%0ATreeApi.Logical.recordRemoveChild(node%2C%20logicalParent)%3B%0Aif%20(root%20%26%26%20this._removeDistributedChildren(root%2C%20node))%20%7B%0Aroot._invalidInsertionPoints%20%3D%20true%3B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Athis._removeOwnerShadyRoot(node)%3B%0Aif%20(root)%20%7B%0Athis._removeNodeFromHost(root.host%2C%20node)%3B%0A%7D%0Areturn%20distributed%3B%0A%7D%2C%0AreplaceChild%3A%20function%20(node%2C%20ref_node)%20%7B%0Athis.insertBefore(node%2C%20ref_node)%3B%0Athis.removeChild(ref_node)%3B%0Areturn%20node%3B%0A%7D%2C%0A_hasCachedOwnerRoot%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node._ownerShadyRoot%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Areturn%20this._ownerShadyRootForNode(this.node)%3B%0A%7D%2C%0A_ownerShadyRootForNode%3A%20function%20(node)%20%7B%0Aif%20(!node)%20%7B%0Areturn%3B%0A%7D%0Avar%20root%20%3D%20node._ownerShadyRoot%3B%0Aif%20(root%20%3D%3D%3D%20undefined)%20%7B%0Aif%20(node._isShadyRoot)%20%7B%0Aroot%20%3D%20node%3B%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aroot%20%3D%20parent._isShadyRoot%20%3F%20parent%20%3A%20this._ownerShadyRootForNode(parent)%3B%0A%7D%20else%20%7B%0Aroot%20%3D%20null%3B%0A%7D%0A%7D%0Aif%20(root%20%7C%7C%20document.documentElement.contains(node))%20%7B%0Anode._ownerShadyRoot%20%3D%20root%3B%0A%7D%0A%7D%0Areturn%20root%3B%0A%7D%2C%0A_maybeDistribute%3A%20function%20(node)%20%7B%0Avar%20fragContent%20%3D%20node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent%20%26%26%20dom(node).querySelector(CONTENT)%3B%0Avar%20wrappedContent%20%3D%20fragContent%20%26%26%20TreeApi.Logical.getParentNode(fragContent).nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%3B%0Avar%20hasContent%20%3D%20fragContent%20%7C%7C%20node.localName%20%3D%3D%3D%20CONTENT%3B%0Aif%20(hasContent)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Avar%20needsDist%20%3D%20this._nodeNeedsDistribution(this.node)%3B%0Aif%20(needsDist)%20%7B%0Athis._lazyDistribute(this.node)%3B%0A%7D%0Areturn%20needsDist%20%7C%7C%20hasContent%20%26%26%20!wrappedContent%3B%0A%7D%2C%0A_maybeAddInsertionPoint%3A%20function%20(node%2C%20parent)%20%7B%0Avar%20added%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent)%20%7B%0Avar%20c%24%20%3D%20dom(node).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20np%2C%20na%3B%20i%20%3C%20c%24.length%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anp%20%3D%20TreeApi.Logical.getParentNode(n)%3B%0Aif%20(np%20%3D%3D%3D%20node)%20%7B%0Anp%20%3D%20parent%3B%0A%7D%0Ana%20%3D%20this._maybeAddInsertionPoint(n%2C%20np)%3B%0Aadded%20%3D%20added%20%7C%7C%20na%3B%0A%7D%0A%7D%20else%20if%20(node.localName%20%3D%3D%3D%20CONTENT)%20%7B%0ATreeApi.Logical.saveChildNodes(parent)%3B%0ATreeApi.Logical.saveChildNodes(node)%3B%0Aadded%20%3D%20true%3B%0A%7D%0Areturn%20added%3B%0A%7D%2C%0A_updateInsertionPoints%3A%20function%20(host)%20%7B%0Avar%20i%24%20%3D%20host.shadyRoot._insertionPoints%20%3D%20dom(host.shadyRoot).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(TreeApi.Logical.getParentNode(c))%3B%0A%7D%0A%7D%2C%0A_nodeNeedsDistribution%3A%20function%20(node)%20%7B%0Areturn%20node%20%26%26%20node.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(node.shadyRoot)%3B%0A%7D%2C%0A_addNodeToHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementAdd)%20%7B%0Ahost._elementAdd(node)%3B%0A%7D%0A%7D%2C%0A_removeNodeFromHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementRemove)%20%7B%0Ahost._elementRemove(node)%3B%0A%7D%0A%7D%2C%0A_removeDistributedChildren%3A%20function%20(root%2C%20container)%20%7B%0Avar%20hostNeedsDist%3B%0Avar%20ip%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ip%24.length%3B%20i%2B%2B)%20%7B%0Avar%20content%20%3D%20ip%24%5Bi%5D%3B%0Aif%20(this._contains(container%2C%20content))%20%7B%0Avar%20dc%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20dc%24.length%3B%20j%2B%2B)%20%7B%0AhostNeedsDist%20%3D%20true%3B%0Avar%20node%20%3D%20dc%24%5Bj%5D%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Areturn%20hostNeedsDist%3B%0A%7D%2C%0A_contains%3A%20function%20(container%2C%20node)%20%7B%0Awhile%20(node)%20%7B%0Aif%20(node%20%3D%3D%20container)%20%7B%0Areturn%20true%3B%0A%7D%0Anode%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0A%7D%0A%7D%2C%0A_removeOwnerShadyRoot%3A%20function%20(node)%20%7B%0Aif%20(this._hasCachedOwnerRoot(node))%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node)%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20n%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._removeOwnerShadyRoot(n)%3B%0A%7D%0A%7D%0Anode._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%2C%0A_firstComposedNode%3A%20function%20(content)%20%7B%0Avar%20n%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20n%24.length%2C%20n%2C%20p%24%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ap%24%20%3D%20dom(n).getDestinationInsertionPoints()%3B%0Aif%20(p%24%5Bp%24.length%20-%201%5D%20%3D%3D%3D%20content)%20%7B%0Areturn%20n%3B%0A%7D%0A%7D%0A%7D%2C%0AquerySelector%3A%20function%20(selector)%20%7B%0Avar%20result%20%3D%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node%2C%20function%20(n)%20%7B%0Areturn%20Boolean(n)%3B%0A%7D)%5B0%5D%3B%0Areturn%20result%20%7C%7C%20null%3B%0A%7D%2C%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Areturn%20this.node._destinationInsertionPoints%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Areturn%20this.node._distributedNodes%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0A_clear%3A%20function%20()%20%7B%0Awhile%20(this.childNodes.length)%20%7B%0Athis.removeChild(this.childNodes%5B0%5D)%3B%0A%7D%0A%7D%2C%0AsetAttribute%3A%20function%20(name%2C%20value)%20%7B%0Athis.node.setAttribute(name%2C%20value)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0AremoveAttribute%3A%20function%20(name)%20%7B%0Athis.node.removeAttribute(name)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0A_maybeDistributeParent%3A%20function%20()%20%7B%0Aif%20(this._nodeNeedsDistribution(this.parentNode))%20%7B%0Athis._lazyDistribute(this.parentNode)%3B%0Areturn%20true%3B%0A%7D%0A%7D%2C%0AcloneNode%3A%20function%20(deep)%20%7B%0Avar%20n%20%3D%20nativeCloneNode.call(this.node%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(c%24%5Bi%5D).cloneNode(true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Avar%20n%20%3D%20nativeImportNode.call(doc%2C%20externalNode%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(externalNode)%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(doc).importNode(c%24%5Bi%5D%2C%20true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0A_getComposedInnerHTML%3A%20function%20()%20%7B%0Areturn%20getInnerHTML(this.node%2C%20true)%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20active%20%3D%20document.activeElement%3B%0Aif%20(!active)%20%7B%0Areturn%20null%3B%0A%7D%0Avar%20isShadyRoot%20%3D%20!!this.node._isShadyRoot%3B%0Aif%20(this.node%20!%3D%3D%20document)%20%7B%0Aif%20(!isShadyRoot)%20%7B%0Areturn%20null%3B%0A%7D%0Aif%20(this.node.host%20%3D%3D%3D%20active%20%7C%7C%20!this.node.host.contains(active))%20%7B%0Areturn%20null%3B%0A%7D%0A%7D%0Avar%20activeRoot%20%3D%20dom(active).getOwnerRoot()%3B%0Awhile%20(activeRoot%20%26%26%20activeRoot%20!%3D%3D%20this.node)%20%7B%0Aactive%20%3D%20activeRoot.host%3B%0AactiveRoot%20%3D%20dom(active).getOwnerRoot()%3B%0A%7D%0Aif%20(this.node%20%3D%3D%3D%20document)%20%7B%0Areturn%20activeRoot%20%3F%20null%20%3A%20active%3B%0A%7D%20else%20%7B%0Areturn%20activeRoot%20%3D%3D%3D%20this.node%20%3F%20active%20%3A%20null%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(this.node)%3B%0Areturn%20Array.isArray(c%24)%20%3F%20c%24%20%3A%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0Areturn%20Array.prototype.filter.call(this.childNodes%2C%20function%20(n)%20%7B%0Areturn%20n.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%3B%0A%7D)%3B%0A%7D%20else%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AparentNode%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getParentNode(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%20else%20%7B%0Avar%20tc%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20cn%20%3D%20this.childNodes%2C%20c%3B%20c%20%3D%20cn%5Bi%5D%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Atc.push(c.textContent)%3B%0A%7D%0A%7D%0Areturn%20tc.join('')%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis.node.textContent%20%3D%20text%3B%0A%7D%20else%20%7B%0Athis._clear()%3B%0Aif%20(text)%20%7B%0Athis.appendChild(document.createTextNode(text))%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20null%3B%0A%7D%20else%20%7B%0Areturn%20getInnerHTML(this.node)%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20!%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis._clear()%3B%0Avar%20d%20%3D%20document.createElement('div')%3B%0Ad.innerHTML%20%3D%20text%3B%0Avar%20c%24%20%3D%20TreeApi.arrayCopyChildNodes(d)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Athis.appendChild(c%24%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0ADomApi.hasInsertionPoint%20%3D%20function%20(root)%20%7B%0Areturn%20Boolean(root%20%26%26%20root._insertionPoints.length)%3B%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Aif%20(!Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20TreeApi.arrayCopy(this.node.querySelectorAll(selector))%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Avar%20n%20%3D%20this.node%3B%0Awhile%20(n)%20%7B%0Aif%20(n.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20n.host)%20%7B%0Areturn%20n%3B%0A%7D%0An%20%3D%20n.parentNode%3B%0A%7D%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Areturn%20doc.importNode(externalNode%2C%20deep)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDestinationInsertionPoints%20%26%26%20this.node.getDestinationInsertionPoints()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDistributedNodes%20%26%26%20this.node.getDistributedNodes()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20node%20%3D%20DomApi.wrap(this.node)%3B%0Avar%20activeElement%20%3D%20node.activeElement%3B%0Areturn%20node.contains(activeElement)%20%3F%20activeElement%20%3A%20null%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.textContent%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.innerHTML%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.innerHTML%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0Avar%20forwardMethods%20%3D%20function%20(m%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20m%24.length%3B%20i%2B%2B)%20%7B%0AforwardMethod(m%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardMethod%20%3D%20function%20(method)%20%7B%0ADomApi.prototype%5Bmethod%5D%20%3D%20function%20()%20%7B%0Areturn%20this.node%5Bmethod%5D.apply(this.node%2C%20arguments)%3B%0A%7D%3B%0A%7D%3B%0AforwardMethods(%5B%0A'cloneNode'%2C%0A'appendChild'%2C%0A'insertBefore'%2C%0A'removeChild'%2C%0A'replaceChild'%2C%0A'setAttribute'%2C%0A'removeAttribute'%2C%0A'querySelector'%0A%5D)%3B%0Avar%20forwardProperties%20%3D%20function%20(f%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20f%24.length%3B%20i%2B%2B)%20%7B%0AforwardProperty(f%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardProperty%20%3D%20function%20(name)%20%7B%0AObject.defineProperty(DomApi.prototype%2C%20name%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node%5Bname%5D%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0A%7D%3B%0AforwardProperties(%5B%0A'parentNode'%2C%0A'firstChild'%2C%0A'lastChild'%2C%0A'nextSibling'%2C%0A'previousSibling'%2C%0A'firstElementChild'%2C%0A'lastElementChild'%2C%0A'nextElementSibling'%2C%0A'previousElementSibling'%0A%5D)%3B%0A%7D())%3B%0APolymer.Base.extend(Polymer.dom%2C%20%7B%0A_flushGuard%3A%200%2C%0A_FLUSH_MAX%3A%20100%2C%0A_needsTakeRecords%3A%20!Polymer.Settings.useNativeCustomElements%2C%0A_debouncers%3A%20%5B%5D%2C%0A_staticFlushList%3A%20%5B%5D%2C%0A_finishDebouncer%3A%20null%2C%0Aflush%3A%20function%20()%20%7B%0Athis._flushGuard%20%3D%200%3B%0Athis._prepareFlush()%3B%0Awhile%20(this._debouncers.length%20%26%26%20this._flushGuard%20%3C%20this._FLUSH_MAX)%20%7B%0Awhile%20(this._debouncers.length)%20%7B%0Athis._debouncers.shift().complete()%3B%0A%7D%0Aif%20(this._finishDebouncer)%20%7B%0Athis._finishDebouncer.complete()%3B%0A%7D%0Athis._prepareFlush()%3B%0Athis._flushGuard%2B%2B%3B%0A%7D%0Aif%20(this._flushGuard%20%3E%3D%20this._FLUSH_MAX)%20%7B%0Aconsole.warn('Polymer.dom.flush%20aborted.%20Flush%20may%20not%20be%20complete.')%3B%0A%7D%0A%7D%2C%0A_prepareFlush%3A%20function%20()%20%7B%0Aif%20(this._needsTakeRecords)%20%7B%0ACustomElements.takeRecords()%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._staticFlushList.length%3B%20i%2B%2B)%20%7B%0Athis._staticFlushList%5Bi%5D()%3B%0A%7D%0A%7D%2C%0AaddStaticFlush%3A%20function%20(fn)%20%7B%0Athis._staticFlushList.push(fn)%3B%0A%7D%2C%0AremoveStaticFlush%3A%20function%20(fn)%20%7B%0Avar%20i%20%3D%20this._staticFlushList.indexOf(fn)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._staticFlushList.splice(i%2C%201)%3B%0A%7D%0A%7D%2C%0AaddDebouncer%3A%20function%20(debouncer)%20%7B%0Athis._debouncers.push(debouncer)%3B%0Athis._finishDebouncer%20%3D%20Polymer.Debounce(this._finishDebouncer%2C%20this._finishFlush)%3B%0A%7D%2C%0A_finishFlush%3A%20function%20()%20%7B%0APolymer.dom._debouncers%20%3D%20%5B%5D%3B%0A%7D%0A%7D)%3B%0APolymer.EventApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.Event%20%3D%20function%20(event)%20%7B%0Athis.event%20%3D%20event%3B%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.path%5B0%5D%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20path()%20%7B%0Areturn%20this.event.path%3B%0A%7D%0A%7D%3B%0A%7D%20else%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Avar%20current%20%3D%20this.event.currentTarget%3B%0Avar%20currentRoot%20%3D%20current%20%26%26%20Polymer.dom(current).getOwnerRoot()%3B%0Avar%20p%24%20%3D%20this.path%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20p%24.length%3B%20i%2B%2B)%20%7B%0Aif%20(Polymer.dom(p%24%5Bi%5D).getOwnerRoot()%20%3D%3D%3D%20currentRoot)%20%7B%0Areturn%20p%24%5Bi%5D%3B%0A%7D%0A%7D%0A%7D%2C%0Aget%20path()%20%7B%0Aif%20(!this.event._path)%20%7B%0Avar%20path%20%3D%20%5B%5D%3B%0Avar%20current%20%3D%20this.rootTarget%3B%0Awhile%20(current)%20%7B%0Apath.push(current)%3B%0Avar%20insertionPoints%20%3D%20Polymer.dom(current).getDestinationInsertionPoints()%3B%0Aif%20(insertionPoints.length)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20insertionPoints.length%20-%201%3B%20i%2B%2B)%20%7B%0Apath.push(insertionPoints%5Bi%5D)%3B%0A%7D%0Acurrent%20%3D%20insertionPoints%5BinsertionPoints.length%20-%201%5D%3B%0A%7D%20else%20%7B%0Acurrent%20%3D%20Polymer.dom(current).parentNode%20%7C%7C%20current.host%3B%0A%7D%0A%7D%0Apath.push(window)%3B%0Athis.event._path%20%3D%20path%3B%0A%7D%0Areturn%20this.event._path%3B%0A%7D%0A%7D%3B%0A%7D%0Avar%20factory%20%3D%20function%20(event)%20%7B%0Aif%20(!event.__eventApi)%20%7B%0Aevent.__eventApi%20%3D%20new%20DomApi.Event(event)%3B%0A%7D%0Areturn%20event.__eventApi%3B%0A%7D%3B%0Areturn%20%7B%20factory%3A%20factory%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20useShadow%20%3D%20Polymer.Settings.useShadow%3B%0AObject.defineProperty(DomApi.prototype%2C%20'classList'%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(!this._classList)%20%7B%0Athis._classList%20%3D%20new%20DomApi.ClassList(this)%3B%0A%7D%0Areturn%20this._classList%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0ADomApi.ClassList%20%3D%20function%20(host)%20%7B%0Athis.domApi%20%3D%20host%3B%0Athis.node%20%3D%20host.node%3B%0A%7D%3B%0ADomApi.ClassList.prototype%20%3D%20%7B%0Aadd%3A%20function%20()%20%7B%0Athis.node.classList.add.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Aremove%3A%20function%20()%20%7B%0Athis.node.classList.remove.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Atoggle%3A%20function%20()%20%7B%0Athis.node.classList.toggle.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0A_distributeParent%3A%20function%20()%20%7B%0Aif%20(!useShadow)%20%7B%0Athis.domApi._maybeDistributeParent()%3B%0A%7D%0A%7D%2C%0Acontains%3A%20function%20()%20%7B%0Areturn%20this.node.classList.contains.apply(this.node.classList%2C%20arguments)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.EffectiveNodesObserver%20%3D%20function%20(domApi)%20%7B%0Athis.domApi%20%3D%20domApi%3B%0Athis.node%20%3D%20this.domApi.node%3B%0Athis._listeners%20%3D%20%5B%5D%3B%0A%7D%3B%0ADomApi.EffectiveNodesObserver.prototype%20%3D%20%7B%0AaddListener%3A%20function%20(callback)%20%7B%0Aif%20(!this._isSetup)%20%7B%0Athis._setup()%3B%0Athis._isSetup%20%3D%20true%3B%0A%7D%0Avar%20listener%20%3D%20%7B%0Afn%3A%20callback%2C%0A_nodes%3A%20%5B%5D%0A%7D%3B%0Athis._listeners.push(listener)%3B%0Athis._scheduleNotify()%3B%0Areturn%20listener%3B%0A%7D%2C%0AremoveListener%3A%20function%20(handle)%20%7B%0Avar%20i%20%3D%20this._listeners.indexOf(handle)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._listeners.splice(i%2C%201)%3B%0Ahandle._nodes%20%3D%20%5B%5D%3B%0A%7D%0Aif%20(!this._hasListeners())%20%7B%0Athis._cleanup()%3B%0Athis._isSetup%20%3D%20false%3B%0A%7D%0A%7D%2C%0A_setup%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._unobserveContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_hasListeners%3A%20function%20()%20%7B%0Areturn%20Boolean(this._listeners.length)%3B%0A%7D%2C%0A_scheduleNotify%3A%20function%20()%20%7B%0Aif%20(this._debouncer)%20%7B%0Athis._debouncer.stop()%3B%0A%7D%0Athis._debouncer%20%3D%20Polymer.Debounce(this._debouncer%2C%20this._notify)%3B%0Athis._debouncer.context%20%3D%20this%3B%0APolymer.dom.addDebouncer(this._debouncer)%3B%0A%7D%2C%0Anotify%3A%20function%20()%20%7B%0Aif%20(this._hasListeners())%20%7B%0Athis._scheduleNotify()%3B%0A%7D%0A%7D%2C%0A_notify%3A%20function%20()%20%7B%0Athis._beforeCallListeners()%3B%0Athis._callListeners()%3B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0Athis._updateContentElements()%3B%0A%7D%2C%0A_updateContentElements%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_observeContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0An.__observeNodesMap%20%3D%20n.__observeNodesMap%20%7C%7C%20new%20WeakMap()%3B%0Aif%20(!n.__observeNodesMap.has(this))%20%7B%0An.__observeNodesMap.set(this%2C%20this._observeContent(n))%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_observeContent%3A%20function%20(content)%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20h%20%3D%20Polymer.dom(content).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Ah._avoidChangeCalculation%20%3D%20true%3B%0Areturn%20h%3B%0A%7D%2C%0A_unobserveContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20h%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0Ah%20%3D%20n.__observeNodesMap.get(this)%3B%0Aif%20(h)%20%7B%0APolymer.dom(n).unobserveNodes(h)%3B%0An.__observeNodesMap.delete(this)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_isContent%3A%20function%20(node)%20%7B%0Areturn%20node.localName%20%3D%3D%3D%20'content'%3B%0A%7D%2C%0A_callListeners%3A%20function%20()%20%7B%0Avar%20o%24%20%3D%20this._listeners%3B%0Avar%20nodes%20%3D%20this._getEffectiveNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20o%24.length%20%26%26%20(o%20%3D%20o%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20info%20%3D%20this._generateListenerInfo(o%2C%20nodes)%3B%0Aif%20(info%20%7C%7C%20o._alwaysNotify)%20%7B%0Athis._callListener(o%2C%20info)%3B%0A%7D%0A%7D%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getEffectiveChildNodes()%3B%0A%7D%2C%0A_generateListenerInfo%3A%20function%20(listener%2C%20newNodes)%20%7B%0Aif%20(listener._avoidChangeCalculation)%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20oldNodes%20%3D%20listener._nodes%3B%0Avar%20info%20%3D%20%7B%0Atarget%3A%20this.node%2C%0AaddedNodes%3A%20%5B%5D%2C%0AremovedNodes%3A%20%5B%5D%0A%7D%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(newNodes%2C%20oldNodes)%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Ainfo.removedNodes.push(n)%3B%0A%7D%0A%7D%0Afor%20(i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%20s.index%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0Ainfo.addedNodes.push(newNodes%5Bj%5D)%3B%0A%7D%0A%7D%0Alistener._nodes%20%3D%20newNodes%3B%0Aif%20(info.addedNodes.length%20%7C%7C%20info.removedNodes.length)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%2C%0A_callListener%3A%20function%20(listener%2C%20info)%20%7B%0Areturn%20listener.fn.call(this.node%2C%20info)%3B%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0A%7D%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0Avar%20baseSetup%20%3D%20DomApi.EffectiveNodesObserver.prototype._setup%3B%0Avar%20baseCleanup%20%3D%20DomApi.EffectiveNodesObserver.prototype._cleanup%3B%0APolymer.Base.extend(DomApi.EffectiveNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._mutationHandler%20%3D%20function%20(mxns)%20%7B%0Aif%20(mxns%20%26%26%20mxns.length)%20%7B%0Aself._scheduleNotify()%3B%0A%7D%0A%7D%3B%0Athis._observer%20%3D%20new%20MutationObserver(this._mutationHandler)%3B%0Athis._boundFlush%20%3D%20function%20()%20%7B%0Aself._flush()%3B%0A%7D%3B%0APolymer.dom.addStaticFlush(this._boundFlush)%3B%0Athis._observer.observe(this.node%2C%20%7B%20childList%3A%20true%20%7D)%3B%0A%7D%0AbaseSetup.call(this)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._observer.disconnect()%3B%0Athis._observer%20%3D%20null%3B%0Athis._mutationHandler%20%3D%20null%3B%0APolymer.dom.removeStaticFlush(this._boundFlush)%3B%0AbaseCleanup.call(this)%3B%0A%7D%2C%0A_flush%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._mutationHandler(this._observer.takeRecords())%3B%0A%7D%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._makeContentListenersAlwaysNotify()%3B%0Athis._observer.disconnect()%3B%0Athis._observer.observe(this.node%2C%20%7B%0AchildList%3A%20true%2C%0Aattributes%3A%20true%2C%0Asubtree%3A%20true%0A%7D)%3B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host%20%26%26%20Polymer.dom(host).observer)%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%2C%0A_makeContentListenersAlwaysNotify%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20this._listeners.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20this._listeners%5Bi%5D%3B%0Ah._alwaysNotify%20%3D%20h._isContentListener%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.DistributedNodesObserver%20%3D%20function%20(domApi)%20%7B%0ADomApi.EffectiveNodesObserver.call(this%2C%20domApi)%3B%0A%7D%3B%0ADomApi.DistributedNodesObserver.prototype%20%3D%20Object.create(DomApi.EffectiveNodesObserver.prototype)%3B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getDistributedNodes()%3B%0A%7D%0A%7D)%3B%0Aif%20(Settings.useShadow)%20%7B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._observer%20%3D%20Polymer.dom(host).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Athis._observer._isContentListener%20%3D%20true%3B%0Aif%20(this._hasAttrSelect())%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_hasAttrSelect%3A%20function%20()%20%7B%0Avar%20select%20%3D%20this.node.getAttribute('select')%3B%0Areturn%20select%20%26%26%20select.match(%2F%5B%5B.%5D%2B%2F)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0APolymer.dom(host).unobserveNodes(this._observer)%3B%0A%7D%0Athis._observer%20%3D%20null%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0APolymer.Base._addFeature(%7B%0A_prepShady%3A%20function%20()%20%7B%0Athis._useContent%20%3D%20this._useContent%20%7C%7C%20Boolean(this._template)%3B%0A%7D%2C%0A_setupShady%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20null%3B%0Aif%20(!this.__domApi)%20%7B%0Athis.__domApi%20%3D%20null%3B%0A%7D%0Aif%20(!this.__dom)%20%7B%0Athis.__dom%20%3D%20null%3B%0A%7D%0Aif%20(!this._ownerShadyRoot)%20%7B%0Athis._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%0A%7D%2C%0A_poolContent%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0ATreeApi.Logical.saveChildNodes(this)%3B%0A%7D%0A%7D%2C%0A_setupRoot%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis._createLocalRoot()%3B%0Aif%20(!this.dataHost)%20%7B%0AupgradeLogicalChildren(TreeApi.Logical.getChildNodes(this))%3B%0A%7D%0A%7D%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20this.root%3B%0Athis.shadyRoot._distributionClean%20%3D%20false%3B%0Athis.shadyRoot._hasDistributed%20%3D%20false%3B%0Athis.shadyRoot._isShadyRoot%20%3D%20true%3B%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0Avar%20i%24%20%3D%20this.shadyRoot._insertionPoints%20%3D%20!this._notes%20%7C%7C%20this._notes._hasContent%20%3F%20this.shadyRoot.querySelectorAll('content')%20%3A%20%5B%5D%3B%0ATreeApi.Logical.saveChildNodes(this.shadyRoot)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(c.parentNode)%3B%0A%7D%0Athis.shadyRoot.host%20%3D%20this%3B%0A%7D%2C%0Aget%20domHost()%20%7B%0Avar%20root%20%3D%20Polymer.dom(this).getOwnerRoot()%3B%0Areturn%20root%20%26%26%20root.host%3B%0A%7D%2C%0AdistributeContent%3A%20function%20(updateInsertionPoints)%20%7B%0Aif%20(this.shadyRoot)%20%7B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20this.shadyRoot._invalidInsertionPoints%20%7C%7C%20updateInsertionPoints%3B%0Avar%20host%20%3D%20getTopDistributingHost(this)%3B%0APolymer.dom(this)._lazyDistribute(host)%3B%0A%7D%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20!this.shadyRoot._distributionClean)%20%7B%0Aif%20(this.shadyRoot._invalidInsertionPoints)%20%7B%0APolymer.dom(this)._updateInsertionPoints(this)%3B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20false%3B%0A%7D%0Athis._beginDistribute()%3B%0Athis._distributeDirtyRoots()%3B%0Athis._finishDistribute()%3B%0A%7D%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._resetDistribution()%3B%0Athis._distributePool(this.shadyRoot%2C%20this._collectPool())%3B%0A%7D%0A%7D%2C%0A_distributeDirtyRoots%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.shadyRoot._dirtyRoots%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._distributeContent()%3B%0A%7D%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis.shadyRoot._distributionClean%20%3D%20true%3B%0Aif%20(DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._composeTree()%3B%0AnotifyContentObservers(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0ATreeApi.Composed.clearChildNodes(this)%3B%0Athis.appendChild(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Avar%20children%20%3D%20this._composeNode(this)%3B%0Athis._updateChildNodes(this%2C%20children)%3B%0A%7D%0A%7D%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0AnotifyInitialDistribution(this)%3B%0A%7D%0Athis.shadyRoot._hasDistributed%20%3D%20true%3B%0A%7D%0A%7D%2C%0AelementMatches%3A%20function%20(selector%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Areturn%20DomApi.matchesSelector.call(node%2C%20selector)%3B%0A%7D%2C%0A_resetDistribution%3A%20function%20()%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(child._destinationInsertionPoints)%20%7B%0Achild._destinationInsertionPoints%20%3D%20undefined%3B%0A%7D%0Aif%20(isInsertionPoint(child))%20%7B%0AclearDistributedDestinationInsertionPoints(child)%3B%0A%7D%0A%7D%0Avar%20root%20%3D%20this.shadyRoot%3B%0Avar%20p%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20p%24.length%3B%20j%2B%2B)%20%7B%0Ap%24%5Bj%5D._distributedNodes%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_collectPool%3A%20function%20()%20%7B%0Avar%20pool%20%3D%20%5B%5D%3B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Apool.push.apply(pool%2C%20child._distributedNodes)%3B%0A%7D%20else%20%7B%0Apool.push(child)%3B%0A%7D%0A%7D%0Areturn%20pool%3B%0A%7D%2C%0A_distributePool%3A%20function%20(node%2C%20pool)%20%7B%0Avar%20p%24%20%3D%20node._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._distributeInsertionPoint(p%2C%20pool)%3B%0AmaybeRedistributeParent(p%2C%20this)%3B%0A%7D%0A%7D%2C%0A_distributeInsertionPoint%3A%20function%20(content%2C%20pool)%20%7B%0Avar%20anyDistributed%20%3D%20false%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20pool.length%2C%20node%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Anode%20%3D%20pool%5Bi%5D%3B%0Aif%20(!node)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(this._matchesContentSelect(node%2C%20content))%20%7B%0AdistributeNodeInto(node%2C%20content)%3B%0Apool%5Bi%5D%20%3D%20undefined%3B%0AanyDistributed%20%3D%20true%3B%0A%7D%0A%7D%0Aif%20(!anyDistributed)%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(content)%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20children.length%3B%20j%2B%2B)%20%7B%0AdistributeNodeInto(children%5Bj%5D%2C%20content)%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeTree%3A%20function%20()%20%7B%0Athis._updateChildNodes(this%2C%20this._composeNode(this))%3B%0Avar%20p%24%20%3D%20this.shadyRoot._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%2C%20parent%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparent%20%3D%20TreeApi.Logical.getParentNode(p)%3B%0Aif%20(!parent._useContent%20%26%26%20parent%20!%3D%3D%20this%20%26%26%20parent%20!%3D%3D%20this.shadyRoot)%20%7B%0Athis._updateChildNodes(parent%2C%20this._composeNode(parent))%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeNode%3A%20function%20(node)%20%7B%0Avar%20children%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node.shadyRoot%20%7C%7C%20node)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20c%24%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Avar%20distributedNodes%20%3D%20child._distributedNodes%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20distributedNodes.length%3B%20j%2B%2B)%20%7B%0Avar%20distributedNode%20%3D%20distributedNodes%5Bj%5D%3B%0Aif%20(isFinalDestination(child%2C%20distributedNode))%20%7B%0Achildren.push(distributedNode)%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Achildren.push(child)%3B%0A%7D%0A%7D%0Areturn%20children%3B%0A%7D%2C%0A_updateChildNodes%3A%20function%20(container%2C%20children)%20%7B%0Avar%20composed%20%3D%20TreeApi.Composed.getChildNodes(container)%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(children%2C%20composed)%3B%0Afor%20(var%20i%20%3D%200%2C%20d%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Aif%20(TreeApi.Composed.getParentNode(n)%20%3D%3D%3D%20container)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20n)%3B%0A%7D%0Acomposed.splice(s.index%20%2B%20d%2C%201)%3B%0A%7D%0Ad%20-%3D%20s.addedCount%3B%0A%7D%0Afor%20(var%20i%20%3D%200%2C%20s%2C%20next%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anext%20%3D%20composed%5Bs.index%5D%3B%0Afor%20(j%20%3D%20s.index%2C%20n%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0An%20%3D%20children%5Bj%5D%3B%0ATreeApi.Composed.insertBefore(container%2C%20n%2C%20next)%3B%0Acomposed.splice(j%2C%200%2C%20n)%3B%0A%7D%0A%7D%0A%7D%2C%0A_matchesContentSelect%3A%20function%20(node%2C%20contentElement)%20%7B%0Avar%20select%20%3D%20contentElement.getAttribute('select')%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aselect%20%3D%20select.trim()%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aif%20(!(node%20instanceof%20Element))%20%7B%0Areturn%20false%3B%0A%7D%0Avar%20validSelectors%20%3D%20%2F%5E(%3Anot%5C()%3F%5B*.%23%5Ba-zA-Z_%7C%5D%2F%3B%0Aif%20(!validSelectors.test(select))%20%7B%0Areturn%20false%3B%0A%7D%0Areturn%20this.elementMatches(select%2C%20node)%3B%0A%7D%2C%0A_elementAdd%3A%20function%20()%20%7B%0A%7D%2C%0A_elementRemove%3A%20function%20()%20%7B%0A%7D%0A%7D)%3B%0Afunction%20distributeNodeInto(child%2C%20insertionPoint)%20%7B%0AinsertionPoint._distributedNodes.push(child)%3B%0Avar%20points%20%3D%20child._destinationInsertionPoints%3B%0Aif%20(!points)%20%7B%0Achild._destinationInsertionPoints%20%3D%20%5BinsertionPoint%5D%3B%0A%7D%20else%20%7B%0Apoints.push(insertionPoint)%3B%0A%7D%0A%7D%0Afunction%20clearDistributedDestinationInsertionPoints(content)%20%7B%0Avar%20e%24%20%3D%20content._distributedNodes%3B%0Aif%20(e%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20e%24.length%3B%20i%2B%2B)%20%7B%0Avar%20d%20%3D%20e%24%5Bi%5D._destinationInsertionPoints%3B%0Aif%20(d)%20%7B%0Ad.splice(d.indexOf(content)%20%2B%201%2C%20d.length)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Afunction%20maybeRedistributeParent(content%2C%20host)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(content)%3B%0Aif%20(parent%20%26%26%20parent.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(parent.shadyRoot)%20%26%26%20parent.shadyRoot._distributionClean)%20%7B%0Aparent.shadyRoot._distributionClean%20%3D%20false%3B%0Ahost.shadyRoot._dirtyRoots.push(parent)%3B%0A%7D%0A%7D%0Afunction%20isFinalDestination(insertionPoint%2C%20node)%20%7B%0Avar%20points%20%3D%20node._destinationInsertionPoints%3B%0Areturn%20points%20%26%26%20points%5Bpoints.length%20-%201%5D%20%3D%3D%3D%20insertionPoint%3B%0A%7D%0Afunction%20isInsertionPoint(node)%20%7B%0Areturn%20node.localName%20%3D%3D%20'content'%3B%0A%7D%0Afunction%20getTopDistributingHost(host)%20%7B%0Awhile%20(host%20%26%26%20hostNeedsRedistribution(host))%20%7B%0Ahost%20%3D%20host.domHost%3B%0A%7D%0Areturn%20host%3B%0A%7D%0Afunction%20hostNeedsRedistribution(host)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(host)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20c%24%5Bi%5D%3B%0Aif%20(c.localName%20%26%26%20c.localName%20%3D%3D%3D%20'content')%20%7B%0Areturn%20host.domHost%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyContentObservers(root)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20root._insertionPoints.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20root._insertionPoints%5Bi%5D%3B%0Aif%20(DomApi.hasApi(c))%20%7B%0APolymer.dom(c).notifyObserver()%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyInitialDistribution(host)%20%7B%0Aif%20(DomApi.hasApi(host))%20%7B%0APolymer.dom(host).notifyObserver()%3B%0A%7D%0A%7D%0Avar%20needsUpgrade%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Afunction%20upgradeLogicalChildren(children)%20%7B%0Aif%20(needsUpgrade%20%26%26%20children)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0ACustomElements.upgrade(children%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0Aif%20(Polymer.Settings.useShadow)%20%7B%0APolymer.Base._addFeature(%7B%0A_poolContent%3A%20function%20()%20%7B%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0A%7D%2C%0AdistributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.createShadowRoot()%3B%0Athis.shadowRoot.appendChild(this.root)%3B%0Athis.root%20%3D%20this.shadowRoot%3B%0A%7D%0A%7D)%3B%0A%7D%0APolymer.Async%20%3D%20%7B%0A_currVal%3A%200%2C%0A_lastVal%3A%200%2C%0A_callbacks%3A%20%5B%5D%2C%0A_twiddleContent%3A%200%2C%0A_twiddle%3A%20document.createTextNode('')%2C%0Arun%3A%20function%20(callback%2C%20waitTime)%20%7B%0Aif%20(waitTime%20%3E%200)%20%7B%0Areturn%20~setTimeout(callback%2C%20waitTime)%3B%0A%7D%20else%20%7B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athis._callbacks.push(callback)%3B%0Areturn%20this._currVal%2B%2B%3B%0A%7D%0A%7D%2C%0Acancel%3A%20function%20(handle)%20%7B%0Aif%20(handle%20%3C%200)%20%7B%0AclearTimeout(~handle)%3B%0A%7D%20else%20%7B%0Avar%20idx%20%3D%20handle%20-%20this._lastVal%3B%0Aif%20(idx%20%3E%3D%200)%20%7B%0Aif%20(!this._callbacks%5Bidx%5D)%20%7B%0Athrow%20'invalid%20async%20handle%3A%20'%20%2B%20handle%3B%0A%7D%0Athis._callbacks%5Bidx%5D%20%3D%20null%3B%0A%7D%0A%7D%0A%7D%2C%0A_atEndOfMicrotask%3A%20function%20()%20%7B%0Avar%20len%20%3D%20this._callbacks.length%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20len%3B%20i%2B%2B)%20%7B%0Avar%20cb%20%3D%20this._callbacks%5Bi%5D%3B%0Aif%20(cb)%20%7B%0Atry%20%7B%0Acb()%3B%0A%7D%20catch%20(e)%20%7B%0Ai%2B%2B%3B%0Athis._callbacks.splice(0%2C%20i)%3B%0Athis._lastVal%20%2B%3D%20i%3B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athrow%20e%3B%0A%7D%0A%7D%0A%7D%0Athis._callbacks.splice(0%2C%20len)%3B%0Athis._lastVal%20%2B%3D%20len%3B%0A%7D%0A%7D%3B%0Anew%20window.MutationObserver(function%20()%20%7B%0APolymer.Async._atEndOfMicrotask()%3B%0A%7D).observe(Polymer.Async._twiddle%2C%20%7B%20characterData%3A%20true%20%7D)%3B%0APolymer.Debounce%20%3D%20function%20()%20%7B%0Avar%20Async%20%3D%20Polymer.Async%3B%0Avar%20Debouncer%20%3D%20function%20(context)%20%7B%0Athis.context%20%3D%20context%3B%0Avar%20self%20%3D%20this%3B%0Athis.boundComplete%20%3D%20function%20()%20%7B%0Aself.complete()%3B%0A%7D%3B%0A%7D%3B%0ADebouncer.prototype%20%3D%20%7B%0Ago%3A%20function%20(callback%2C%20wait)%20%7B%0Avar%20h%3B%0Athis.finish%20%3D%20function%20()%20%7B%0AAsync.cancel(h)%3B%0A%7D%3B%0Ah%20%3D%20Async.run(this.boundComplete%2C%20wait)%3B%0Athis.callback%20%3D%20callback%3B%0A%7D%2C%0Astop%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.finish()%3B%0Athis.finish%20%3D%20null%3B%0A%7D%0A%7D%2C%0Acomplete%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.stop()%3B%0Athis.callback.call(this.context)%3B%0A%7D%0A%7D%0A%7D%3B%0Afunction%20debounce(debouncer%2C%20callback%2C%20wait)%20%7B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%20else%20%7B%0Adebouncer%20%3D%20new%20Debouncer(this)%3B%0A%7D%0Adebouncer.go(callback%2C%20wait)%3B%0Areturn%20debouncer%3B%0A%7D%0Areturn%20debounce%3B%0A%7D()%3B%0APolymer.Base._addFeature(%7B%0A_setupDebouncers%3A%20function%20()%20%7B%0Athis._debouncers%20%3D%20%7B%7D%3B%0A%7D%2C%0Adebounce%3A%20function%20(jobName%2C%20callback%2C%20wait)%20%7B%0Areturn%20this._debouncers%5BjobName%5D%20%3D%20Polymer.Debounce.call(this%2C%20this._debouncers%5BjobName%5D%2C%20callback%2C%20wait)%3B%0A%7D%2C%0AisDebouncerActive%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Areturn%20!!(debouncer%20%26%26%20debouncer.finish)%3B%0A%7D%2C%0AflushDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.complete()%3B%0A%7D%0A%7D%2C%0AcancelDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.DomModule%20%3D%20document.createElement('dom-module')%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepTemplate()%3B%0Athis._prepShady()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._registerHost()%3B%0Aif%20(this._template)%20%7B%0Athis._poolContent()%3B%0Athis._beginHosting()%3B%0Athis._stampTemplate()%3B%0Athis._endHosting()%3B%0A%7D%0Athis._marshalHostAttributes()%3B%0Athis._setupDebouncers()%3B%0Athis._marshalBehaviors()%3B%0Athis._tryReady()%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-mini.html.js%0A:64 in _ready data:text/javascript;charset=utf-8,Polymer.Base._addFeature(%7B%0A_prepTemplate%3A%20function%20()%20%7B%0Aif%20(this._template%20%3D%3D%3D%20undefined)%20%7B%0Athis._template%20%3D%20Polymer.DomModule.import(this.is%2C%20'template')%3B%0A%7D%0Aif%20(this._template%20%26%26%20this._template.hasAttribute('is'))%20%7B%0Athis._warn(this._logf('_prepTemplate'%2C%20'top-level%20Polymer%20template%20'%20%2B%20'must%20not%20be%20a%20type-extension%2C%20found'%2C%20this._template%2C%20'Move%20inside%20simple%20%3Ctemplate%3E.'))%3B%0A%7D%0Aif%20(this._template%20%26%26%20!this._template.content%20%26%26%20window.HTMLTemplateElement%20%26%26%20HTMLTemplateElement.decorate)%20%7B%0AHTMLTemplateElement.decorate(this._template)%3B%0A%7D%0A%7D%2C%0A_stampTemplate%3A%20function%20()%20%7B%0Aif%20(this._template)%20%7B%0Athis.root%20%3D%20this.instanceTemplate(this._template)%3B%0A%7D%0A%7D%2C%0AinstanceTemplate%3A%20function%20(template)%20%7B%0Avar%20dom%20%3D%20document.importNode(template._content%20%7C%7C%20template.content%2C%20true)%3B%0Areturn%20dom%3B%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0Avar%20baseAttachedCallback%20%3D%20Polymer.Base.attachedCallback%3B%0APolymer.Base._addFeature(%7B%0A_hostStack%3A%20%5B%5D%2C%0Aready%3A%20function%20()%20%7B%0A%7D%2C%0A_registerHost%3A%20function%20(host)%20%7B%0Athis.dataHost%20%3D%20host%20%3D%20host%20%7C%7C%20Polymer.Base._hostStack%5BPolymer.Base._hostStack.length%20-%201%5D%3B%0Aif%20(host%20%26%26%20host._clients)%20%7B%0Ahost._clients.push(this)%3B%0A%7D%0Athis._clients%20%3D%20null%3B%0Athis._clientsReadied%20%3D%20false%3B%0A%7D%2C%0A_beginHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.push(this)%3B%0Aif%20(!this._clients)%20%7B%0Athis._clients%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_endHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.pop()%3B%0A%7D%2C%0A_tryReady%3A%20function%20()%20%7B%0Athis._readied%20%3D%20false%3B%0Aif%20(this._canReady())%20%7B%0Athis._ready()%3B%0A%7D%0A%7D%2C%0A_canReady%3A%20function%20()%20%7B%0Areturn%20!this.dataHost%20%7C%7C%20this.dataHost._clientsReadied%3B%0A%7D%2C%0A_ready%3A%20function%20()%20%7B%0Athis._beforeClientsReady()%3B%0Aif%20(this._template)%20%7B%0Athis._setupRoot()%3B%0Athis._readyClients()%3B%0A%7D%0Athis._clientsReadied%20%3D%20true%3B%0Athis._clients%20%3D%20null%3B%0Athis._afterClientsReady()%3B%0Athis._readySelf()%3B%0A%7D%2C%0A_readyClients%3A%20function%20()%20%7B%0Athis._beginDistribute()%3B%0Avar%20c%24%20%3D%20this._clients%3B%0Aif%20(c%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._ready()%3B%0A%7D%0A%7D%0Athis._finishDistribute()%3B%0A%7D%2C%0A_readySelf%3A%20function%20()%20%7B%0Athis._doBehavior('ready')%3B%0Athis._readied%20%3D%20true%3B%0Aif%20(this._attachedPending)%20%7B%0Athis._attachedPending%20%3D%20false%3B%0Athis.attachedCallback()%3B%0A%7D%0A%7D%2C%0A_beforeClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_afterClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeAttached%3A%20function%20()%20%7B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Aif%20(this._readied)%20%7B%0Athis._beforeAttached()%3B%0AbaseAttachedCallback.call(this)%3B%0A%7D%20else%20%7B%0Athis._attachedPending%20%3D%20true%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.ArraySplice%20%3D%20function%20()%20%7B%0Afunction%20newSplice(index%2C%20removed%2C%20addedCount)%20%7B%0Areturn%20%7B%0Aindex%3A%20index%2C%0Aremoved%3A%20removed%2C%0AaddedCount%3A%20addedCount%0A%7D%3B%0A%7D%0Avar%20EDIT_LEAVE%20%3D%200%3B%0Avar%20EDIT_UPDATE%20%3D%201%3B%0Avar%20EDIT_ADD%20%3D%202%3B%0Avar%20EDIT_DELETE%20%3D%203%3B%0Afunction%20ArraySplice()%20%7B%0A%7D%0AArraySplice.prototype%20%3D%20%7B%0AcalcEditDistances%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20rowCount%20%3D%20oldEnd%20-%20oldStart%20%2B%201%3B%0Avar%20columnCount%20%3D%20currentEnd%20-%20currentStart%20%2B%201%3B%0Avar%20distances%20%3D%20new%20Array(rowCount)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Adistances%5Bi%5D%20%3D%20new%20Array(columnCount)%3B%0Adistances%5Bi%5D%5B0%5D%20%3D%20i%3B%0A%7D%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%0Adistances%5B0%5D%5Bj%5D%20%3D%20j%3B%0Afor%20(i%20%3D%201%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%201%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%20%7B%0Aif%20(this.equals(current%5BcurrentStart%20%2B%20j%20-%201%5D%2C%20old%5BoldStart%20%2B%20i%20-%201%5D))%0Adistances%5Bi%5D%5Bj%5D%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Aelse%20%7B%0Avar%20north%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%20%2B%201%3B%0Avar%20west%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%20%2B%201%3B%0Adistances%5Bi%5D%5Bj%5D%20%3D%20north%20%3C%20west%20%3F%20north%20%3A%20west%3B%0A%7D%0A%7D%0A%7D%0Areturn%20distances%3B%0A%7D%2C%0AspliceOperationsFromEditDistances%3A%20function%20(distances)%20%7B%0Avar%20i%20%3D%20distances.length%20-%201%3B%0Avar%20j%20%3D%20distances%5B0%5D.length%20-%201%3B%0Avar%20current%20%3D%20distances%5Bi%5D%5Bj%5D%3B%0Avar%20edits%20%3D%20%5B%5D%3B%0Awhile%20(i%20%3E%200%20%7C%7C%20j%20%3E%200)%20%7B%0Aif%20(i%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acontinue%3B%0A%7D%0Aif%20(j%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acontinue%3B%0A%7D%0Avar%20northWest%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Avar%20west%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%3B%0Avar%20north%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%3B%0Avar%20min%3B%0Aif%20(west%20%3C%20north)%0Amin%20%3D%20west%20%3C%20northWest%20%3F%20west%20%3A%20northWest%3B%0Aelse%0Amin%20%3D%20north%20%3C%20northWest%20%3F%20north%20%3A%20northWest%3B%0Aif%20(min%20%3D%3D%20northWest)%20%7B%0Aif%20(northWest%20%3D%3D%20current)%20%7B%0Aedits.push(EDIT_LEAVE)%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_UPDATE)%3B%0Acurrent%20%3D%20northWest%3B%0A%7D%0Ai--%3B%0Aj--%3B%0A%7D%20else%20if%20(min%20%3D%3D%20west)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acurrent%20%3D%20west%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acurrent%20%3D%20north%3B%0A%7D%0A%7D%0Aedits.reverse()%3B%0Areturn%20edits%3B%0A%7D%2C%0AcalcSplices%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20prefixCount%20%3D%200%3B%0Avar%20suffixCount%20%3D%200%3B%0Avar%20minLength%20%3D%20Math.min(currentEnd%20-%20currentStart%2C%20oldEnd%20-%20oldStart)%3B%0Aif%20(currentStart%20%3D%3D%200%20%26%26%20oldStart%20%3D%3D%200)%0AprefixCount%20%3D%20this.sharedPrefix(current%2C%20old%2C%20minLength)%3B%0Aif%20(currentEnd%20%3D%3D%20current.length%20%26%26%20oldEnd%20%3D%3D%20old.length)%0AsuffixCount%20%3D%20this.sharedSuffix(current%2C%20old%2C%20minLength%20-%20prefixCount)%3B%0AcurrentStart%20%2B%3D%20prefixCount%3B%0AoldStart%20%2B%3D%20prefixCount%3B%0AcurrentEnd%20-%3D%20suffixCount%3B%0AoldEnd%20-%3D%20suffixCount%3B%0Aif%20(currentEnd%20-%20currentStart%20%3D%3D%200%20%26%26%20oldEnd%20-%20oldStart%20%3D%3D%200)%0Areturn%20%5B%5D%3B%0Aif%20(currentStart%20%3D%3D%20currentEnd)%20%7B%0Avar%20splice%20%3D%20newSplice(currentStart%2C%20%5B%5D%2C%200)%3B%0Awhile%20(oldStart%20%3C%20oldEnd)%0Asplice.removed.push(old%5BoldStart%2B%2B%5D)%3B%0Areturn%20%5Bsplice%5D%3B%0A%7D%20else%20if%20(oldStart%20%3D%3D%20oldEnd)%0Areturn%20%5BnewSplice(currentStart%2C%20%5B%5D%2C%20currentEnd%20-%20currentStart)%5D%3B%0Avar%20ops%20%3D%20this.spliceOperationsFromEditDistances(this.calcEditDistances(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd))%3B%0Asplice%20%3D%20undefined%3B%0Avar%20splices%20%3D%20%5B%5D%3B%0Avar%20index%20%3D%20currentStart%3B%0Avar%20oldIndex%20%3D%20oldStart%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ops.length%3B%20i%2B%2B)%20%7B%0Aswitch%20(ops%5Bi%5D)%20%7B%0Acase%20EDIT_LEAVE%3A%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0Asplice%20%3D%20undefined%3B%0A%7D%0Aindex%2B%2B%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_UPDATE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_ADD%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_DELETE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0A%7D%0A%7D%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0A%7D%0Areturn%20splices%3B%0A%7D%2C%0AsharedPrefix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20searchLength%3B%20i%2B%2B)%0Aif%20(!this.equals(current%5Bi%5D%2C%20old%5Bi%5D))%0Areturn%20i%3B%0Areturn%20searchLength%3B%0A%7D%2C%0AsharedSuffix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Avar%20index1%20%3D%20current.length%3B%0Avar%20index2%20%3D%20old.length%3B%0Avar%20count%20%3D%200%3B%0Awhile%20(count%20%3C%20searchLength%20%26%26%20this.equals(current%5B--index1%5D%2C%20old%5B--index2%5D))%0Acount%2B%2B%3B%0Areturn%20count%3B%0A%7D%2C%0AcalculateSplices%3A%20function%20(current%2C%20previous)%20%7B%0Areturn%20this.calcSplices(current%2C%200%2C%20current.length%2C%20previous%2C%200%2C%20previous.length)%3B%0A%7D%2C%0Aequals%3A%20function%20(currentValue%2C%20previousValue)%20%7B%0Areturn%20currentValue%20%3D%3D%3D%20previousValue%3B%0A%7D%0A%7D%3B%0Areturn%20new%20ArraySplice()%3B%0A%7D()%3B%0APolymer.domInnerHTML%20%3D%20function%20()%20%7B%0Avar%20escapeAttrRegExp%20%3D%20%2F%5B%26%5Cu00A0%22%5D%2Fg%3B%0Avar%20escapeDataRegExp%20%3D%20%2F%5B%26%5Cu00A0%3C%3E%5D%2Fg%3B%0Afunction%20escapeReplace(c)%20%7B%0Aswitch%20(c)%20%7B%0Acase%20'%26'%3A%0Areturn%20'%26amp%3B'%3B%0Acase%20'%3C'%3A%0Areturn%20'%26lt%3B'%3B%0Acase%20'%3E'%3A%0Areturn%20'%26gt%3B'%3B%0Acase%20'%22'%3A%0Areturn%20'%26quot%3B'%3B%0Acase%20'%5CxA0'%3A%0Areturn%20'%26nbsp%3B'%3B%0A%7D%0A%7D%0Afunction%20escapeAttr(s)%20%7B%0Areturn%20s.replace(escapeAttrRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20escapeData(s)%20%7B%0Areturn%20s.replace(escapeDataRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20makeSet(arr)%20%7B%0Avar%20set%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20arr.length%3B%20i%2B%2B)%20%7B%0Aset%5Barr%5Bi%5D%5D%20%3D%20true%3B%0A%7D%0Areturn%20set%3B%0A%7D%0Avar%20voidElements%20%3D%20makeSet(%5B%0A'area'%2C%0A'base'%2C%0A'br'%2C%0A'col'%2C%0A'command'%2C%0A'embed'%2C%0A'hr'%2C%0A'img'%2C%0A'input'%2C%0A'keygen'%2C%0A'link'%2C%0A'meta'%2C%0A'param'%2C%0A'source'%2C%0A'track'%2C%0A'wbr'%0A%5D)%3B%0Avar%20plaintextParents%20%3D%20makeSet(%5B%0A'style'%2C%0A'script'%2C%0A'xmp'%2C%0A'iframe'%2C%0A'noembed'%2C%0A'noframes'%2C%0A'plaintext'%2C%0A'noscript'%0A%5D)%3B%0Afunction%20getOuterHTML(node%2C%20parentNode%2C%20composed)%20%7B%0Aswitch%20(node.nodeType)%20%7B%0Acase%20Node.ELEMENT_NODE%3A%0Avar%20tagName%20%3D%20node.localName%3B%0Avar%20s%20%3D%20'%3C'%20%2B%20tagName%3B%0Avar%20attrs%20%3D%20node.attributes%3B%0Afor%20(var%20i%20%3D%200%2C%20attr%3B%20attr%20%3D%20attrs%5Bi%5D%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20'%20'%20%2B%20attr.name%20%2B%20'%3D%22'%20%2B%20escapeAttr(attr.value)%20%2B%20'%22'%3B%0A%7D%0As%20%2B%3D%20'%3E'%3B%0Aif%20(voidElements%5BtagName%5D)%20%7B%0Areturn%20s%3B%0A%7D%0Areturn%20s%20%2B%20getInnerHTML(node%2C%20composed)%20%2B%20'%3C%2F'%20%2B%20tagName%20%2B%20'%3E'%3B%0Acase%20Node.TEXT_NODE%3A%0Avar%20data%20%3D%20node.data%3B%0Aif%20(parentNode%20%26%26%20plaintextParents%5BparentNode.localName%5D)%20%7B%0Areturn%20data%3B%0A%7D%0Areturn%20escapeData(data)%3B%0Acase%20Node.COMMENT_NODE%3A%0Areturn%20'%3C!--'%20%2B%20node.data%20%2B%20'--%3E'%3B%0Adefault%3A%0Aconsole.error(node)%3B%0Athrow%20new%20Error('not%20implemented')%3B%0A%7D%0A%7D%0Afunction%20getInnerHTML(node%2C%20composed)%20%7B%0Aif%20(node%20instanceof%20HTMLTemplateElement)%0Anode%20%3D%20node.content%3B%0Avar%20s%20%3D%20''%3B%0Avar%20c%24%20%3D%20Polymer.dom(node).childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20child%3B%20i%20%3C%20l%20%26%26%20(child%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20getOuterHTML(child%2C%20node%2C%20composed)%3B%0A%7D%0Areturn%20s%3B%0A%7D%0Areturn%20%7B%20getInnerHTML%3A%20getInnerHTML%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20nativeInsertBefore%20%3D%20Element.prototype.insertBefore%3B%0Avar%20nativeAppendChild%20%3D%20Element.prototype.appendChild%3B%0Avar%20nativeRemoveChild%20%3D%20Element.prototype.removeChild%3B%0APolymer.TreeApi%20%3D%20%7B%0AarrayCopyChildNodes%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopyChildren%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstElementChild%3B%20n%3B%20n%20%3D%20n.nextElementSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopy%3A%20function%20(a%24)%20%7B%0Avar%20l%20%3D%20a%24.length%3B%0Avar%20copy%20%3D%20new%20Array(l)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Acopy%5Bi%5D%20%3D%20a%24%5Bi%5D%3B%0A%7D%0Areturn%20copy%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Logical%20%3D%20%7B%0AhasParentNode%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.parentNode)%3B%0A%7D%2C%0AhasChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.childNodes%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20this.hasChildNodes(node)%20%3F%20this._getChildNodes(node)%20%3A%20node.childNodes%3B%0A%7D%2C%0A_getChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!node.__dom.childNodes)%20%7B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.__dom.firstChild%3B%20n%3B%20n%20%3D%20n.__dom.nextSibling)%20%7B%0Anode.__dom.childNodes.push(n)%3B%0A%7D%0A%7D%0Areturn%20node.__dom.childNodes%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.parentNode%20!%3D%3D%20undefined%20%3F%20node.__dom.parentNode%20%3A%20node.parentNode%3B%0A%7D%2C%0AgetFirstChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20node.__dom.firstChild%20%3A%20node.firstChild%3B%0A%7D%2C%0AgetLastChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20node.__dom.lastChild%20%3A%20node.lastChild%3B%0A%7D%2C%0AgetNextSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.nextSibling%20%3A%20node.nextSibling%3B%0A%7D%2C%0AgetPreviousSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.previousSibling%20%3A%20node.previousSibling%3B%0A%7D%2C%0AgetFirstElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20this._getFirstElementChild(node)%20%3A%20node.firstElementChild%3B%0A%7D%2C%0A_getFirstElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.firstChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetLastElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20this._getLastElementChild(node)%20%3A%20node.lastElementChild%3B%0A%7D%2C%0A_getLastElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.lastChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetNextElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20this._getNextElementSibling(node)%20%3A%20node.nextElementSibling%3B%0A%7D%2C%0A_getNextElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetPreviousElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20this._getPreviousElementSibling(node)%20%3A%20node.previousElementSibling%3B%0A%7D%2C%0A_getPreviousElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.previousSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AsaveChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!this.hasChildNodes(node))%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Anode.__dom.firstChild%20%3D%20node.firstChild%3B%0Anode.__dom.lastChild%20%3D%20node.lastChild%3B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0An.__dom%20%3D%20n.__dom%20%7C%7C%20%7B%7D%3B%0An.__dom.parentNode%20%3D%20node%3B%0Anode.__dom.childNodes.push(n)%3B%0An.__dom.nextSibling%20%3D%20n.nextSibling%3B%0An.__dom.previousSibling%20%3D%20n.previousSibling%3B%0A%7D%0A%7D%0A%7D%2C%0ArecordInsertBefore%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Athis._linkNode(n%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%20else%20%7B%0Athis._linkNode(node%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%2C%0A_linkNode%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(ref_node)%20%7B%0Aref_node.__dom%20%3D%20ref_node.__dom%20%7C%7C%20%7B%7D%3B%0A%7D%0Anode.__dom.previousSibling%20%3D%20ref_node%20%3F%20ref_node.__dom.previousSibling%20%3A%20container.__dom.lastChild%3B%0Aif%20(node.__dom.previousSibling)%20%7B%0Anode.__dom.previousSibling.__dom.nextSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.nextSibling%20%3D%20ref_node%3B%0Aif%20(node.__dom.nextSibling)%20%7B%0Anode.__dom.nextSibling.__dom.previousSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20container%3B%0Aif%20(ref_node)%20%7B%0Aif%20(ref_node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%20else%20%7B%0Acontainer.__dom.lastChild%20%3D%20node%3B%0Aif%20(!container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%2C%0ArecordRemoveChild%3A%20function%20(node%2C%20container)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node.__dom.nextSibling%3B%0A%7D%0Aif%20(node%20%3D%3D%3D%20container.__dom.lastChild)%20%7B%0Acontainer.__dom.lastChild%20%3D%20node.__dom.previousSibling%3B%0A%7D%0Avar%20p%20%3D%20node.__dom.previousSibling%3B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Aif%20(p)%20%7B%0Ap.__dom.nextSibling%20%3D%20n%3B%0A%7D%0Aif%20(n)%20%7B%0An.__dom.previousSibling%20%3D%20p%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20node.__dom.previousSibling%20%3D%20node.__dom.nextSibling%20%3D%20undefined%3B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Composed%20%3D%20%7B%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Polymer.TreeApi.arrayCopyChildNodes(node)%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.parentNode%3B%0A%7D%2C%0AclearChildNodes%3A%20function%20(node)%20%7B%0Anode.textContent%20%3D%20''%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(parentNode%2C%20newChild%2C%20refChild)%20%7B%0Areturn%20nativeInsertBefore.call(parentNode%2C%20newChild%2C%20refChild%20%7C%7C%20null)%3B%0A%7D%2C%0AappendChild%3A%20function%20(parentNode%2C%20newChild)%20%7B%0Areturn%20nativeAppendChild.call(parentNode%2C%20newChild)%3B%0A%7D%2C%0AremoveChild%3A%20function%20(parentNode%2C%20node)%20%7B%0Areturn%20nativeRemoveChild.call(parentNode%2C%20node)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0APolymer.DomApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20function%20(node)%20%7B%0Athis.node%20%3D%20needsToWrap%20%3F%20DomApi.wrap(node)%20%3A%20node%3B%0A%7D%3B%0Avar%20needsToWrap%20%3D%20Settings.hasShadow%20%26%26%20!Settings.nativeShadow%3B%0ADomApi.wrap%20%3D%20window.wrap%20%3F%20window.wrap%20%3A%20function%20(node)%20%7B%0Areturn%20node%3B%0A%7D%3B%0ADomApi.prototype%20%3D%20%7B%0Aflush%3A%20function%20()%20%7B%0APolymer.dom.flush()%3B%0A%7D%2C%0AdeepContains%3A%20function%20(node)%20%7B%0Aif%20(this.node.contains(node))%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20n%20%3D%20node%3B%0Avar%20doc%20%3D%20node.ownerDocument%3B%0Awhile%20(n%20%26%26%20n%20!%3D%3D%20doc%20%26%26%20n%20!%3D%3D%20this.node)%20%7B%0An%20%3D%20Polymer.dom(n).parentNode%20%7C%7C%20n.host%3B%0A%7D%0Areturn%20n%20%3D%3D%3D%20this.node%3B%0A%7D%2C%0AqueryDistributedElements%3A%20function%20(selector)%20%7B%0Avar%20c%24%20%3D%20this.getEffectiveChildNodes()%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%20%26%26%20DomApi.matchesSelector.call(c%2C%20selector))%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AgetEffectiveChildNodes%3A%20function%20()%20%7B%0Avar%20list%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.localName%20%3D%3D%3D%20CONTENT)%20%7B%0Avar%20d%24%20%3D%20dom(c).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20d%24.length%3B%20j%2B%2B)%20%7B%0Alist.push(d%24%5Bj%5D)%3B%0A%7D%0A%7D%20else%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AobserveNodes%3A%20function%20(callback)%20%7B%0Aif%20(callback)%20%7B%0Aif%20(!this.observer)%20%7B%0Athis.observer%20%3D%20this.node.localName%20%3D%3D%3D%20CONTENT%20%3F%20new%20DomApi.DistributedNodesObserver(this)%20%3A%20new%20DomApi.EffectiveNodesObserver(this)%3B%0A%7D%0Areturn%20this.observer.addListener(callback)%3B%0A%7D%0A%7D%2C%0AunobserveNodes%3A%20function%20(handle)%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.removeListener(handle)%3B%0A%7D%0A%7D%2C%0AnotifyObserver%3A%20function%20()%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.notify()%3B%0A%7D%0A%7D%2C%0A_query%3A%20function%20(matcher%2C%20node%2C%20halter)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this.node%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0Areturn%20list%3B%0A%7D%2C%0A_queryElements%3A%20function%20(elements%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20elements.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE)%20%7B%0Aif%20(this._queryElement(c%2C%20matcher%2C%20halter%2C%20list))%20%7B%0Areturn%20true%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_queryElement%3A%20function%20(node%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Avar%20result%20%3D%20matcher(node)%3B%0Aif%20(result)%20%7B%0Alist.push(node)%3B%0A%7D%0Aif%20(halter%20%26%26%20halter(result))%20%7B%0Areturn%20result%3B%0A%7D%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0A%7D%0A%7D%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%20%3D%20'content'%3B%0Avar%20dom%20%3D%20DomApi.factory%20%3D%20function%20(node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20document%3B%0Aif%20(!node.__domApi)%20%7B%0Anode.__domApi%20%3D%20new%20DomApi.ctor(node)%3B%0A%7D%0Areturn%20node.__domApi%3B%0A%7D%3B%0ADomApi.hasApi%20%3D%20function%20(node)%20%7B%0Areturn%20Boolean(node.__domApi)%3B%0A%7D%3B%0ADomApi.ctor%20%3D%20DomApi%3B%0APolymer.dom%20%3D%20function%20(obj%2C%20patch)%20%7B%0Aif%20(obj%20instanceof%20Event)%20%7B%0Areturn%20Polymer.EventApi.factory(obj)%3B%0A%7D%20else%20%7B%0Areturn%20DomApi.factory(obj%2C%20patch)%3B%0A%7D%0A%7D%3B%0Avar%20p%20%3D%20Element.prototype%3B%0ADomApi.matchesSelector%20%3D%20p.matches%20%7C%7C%20p.matchesSelector%20%7C%7C%20p.mozMatchesSelector%20%7C%7C%20p.msMatchesSelector%20%7C%7C%20p.oMatchesSelector%20%7C%7C%20p.webkitMatchesSelector%3B%0Areturn%20DomApi%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20dom%20%3D%20DomApi.factory%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20getInnerHTML%20%3D%20Polymer.domInnerHTML.getInnerHTML%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%3B%0Aif%20(Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0Avar%20nativeCloneNode%20%3D%20Element.prototype.cloneNode%3B%0Avar%20nativeImportNode%20%3D%20Document.prototype.importNode%3B%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0A_lazyDistribute%3A%20function%20(host)%20%7B%0Aif%20(host.shadyRoot%20%26%26%20host.shadyRoot._distributionClean)%20%7B%0Ahost.shadyRoot._distributionClean%20%3D%20false%3B%0APolymer.dom.addDebouncer(host.debounce('_distribute'%2C%20host._distributeContent))%3B%0A%7D%0A%7D%2C%0AappendChild%3A%20function%20(node)%20%7B%0Areturn%20this.insertBefore(node)%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(node%2C%20ref_node)%20%7B%0Aif%20(ref_node%20%26%26%20TreeApi.Logical.getParentNode(ref_node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20ref_node%20to%20be%20inserted%20before%20is%20not%20a%20child%20'%20%2B%20'of%20this%20node')%3B%0A%7D%0Aif%20(node.nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aif%20(DomApi.hasApi(parent))%20%7B%0Adom(parent).notifyObserver()%3B%0A%7D%0Athis._removeNode(node)%3B%0A%7D%20else%20%7B%0Athis._removeOwnerShadyRoot(node)%3B%0A%7D%0A%7D%0Aif%20(!this._addNode(node%2C%20ref_node))%20%7B%0Aif%20(ref_node)%20%7B%0Aref_node%20%3D%20ref_node.localName%20%3D%3D%3D%20CONTENT%20%3F%20this._firstComposedNode(ref_node)%20%3A%20ref_node%3B%0A%7D%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Aif%20(ref_node)%20%7B%0ATreeApi.Composed.insertBefore(container%2C%20node%2C%20ref_node)%3B%0A%7D%20else%20%7B%0ATreeApi.Composed.appendChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_addNode%3A%20function%20(node%2C%20ref_node)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Avar%20ipAdded%20%3D%20this._maybeAddInsertionPoint(node%2C%20this.node)%3B%0Aif%20(!root._invalidInsertionPoints)%20%7B%0Aroot._invalidInsertionPoints%20%3D%20ipAdded%3B%0A%7D%0Athis._addNodeToHost(root.host%2C%20node)%3B%0A%7D%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0ATreeApi.Logical.recordInsertBefore(node%2C%20this.node%2C%20ref_node)%3B%0A%7D%0Avar%20handled%20%3D%20this._maybeDistribute(node)%20%7C%7C%20this.node.shadyRoot%3B%0Aif%20(handled)%20%7B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Awhile%20(node.firstChild)%20%7B%0ATreeApi.Composed.removeChild(node%2C%20node.firstChild)%3B%0A%7D%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0Areturn%20handled%3B%0A%7D%2C%0AremoveChild%3A%20function%20(node)%20%7B%0Aif%20(TreeApi.Logical.getParentNode(node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20node%20to%20be%20removed%20is%20not%20a%20child%20of%20this%20node%3A%20'%20%2B%20node)%3B%0A%7D%0Aif%20(!this._removeNode(node))%20%7B%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(container%20%3D%3D%3D%20parent)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_removeNode%3A%20function%20(node)%20%7B%0Avar%20logicalParent%20%3D%20TreeApi.Logical.hasParentNode(node)%20%26%26%20TreeApi.Logical.getParentNode(node)%3B%0Avar%20distributed%3B%0Avar%20root%20%3D%20this._ownerShadyRootForNode(node)%3B%0Aif%20(logicalParent)%20%7B%0Adistributed%20%3D%20dom(node)._maybeDistributeParent()%3B%0ATreeApi.Logical.recordRemoveChild(node%2C%20logicalParent)%3B%0Aif%20(root%20%26%26%20this._removeDistributedChildren(root%2C%20node))%20%7B%0Aroot._invalidInsertionPoints%20%3D%20true%3B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Athis._removeOwnerShadyRoot(node)%3B%0Aif%20(root)%20%7B%0Athis._removeNodeFromHost(root.host%2C%20node)%3B%0A%7D%0Areturn%20distributed%3B%0A%7D%2C%0AreplaceChild%3A%20function%20(node%2C%20ref_node)%20%7B%0Athis.insertBefore(node%2C%20ref_node)%3B%0Athis.removeChild(ref_node)%3B%0Areturn%20node%3B%0A%7D%2C%0A_hasCachedOwnerRoot%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node._ownerShadyRoot%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Areturn%20this._ownerShadyRootForNode(this.node)%3B%0A%7D%2C%0A_ownerShadyRootForNode%3A%20function%20(node)%20%7B%0Aif%20(!node)%20%7B%0Areturn%3B%0A%7D%0Avar%20root%20%3D%20node._ownerShadyRoot%3B%0Aif%20(root%20%3D%3D%3D%20undefined)%20%7B%0Aif%20(node._isShadyRoot)%20%7B%0Aroot%20%3D%20node%3B%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aroot%20%3D%20parent._isShadyRoot%20%3F%20parent%20%3A%20this._ownerShadyRootForNode(parent)%3B%0A%7D%20else%20%7B%0Aroot%20%3D%20null%3B%0A%7D%0A%7D%0Aif%20(root%20%7C%7C%20document.documentElement.contains(node))%20%7B%0Anode._ownerShadyRoot%20%3D%20root%3B%0A%7D%0A%7D%0Areturn%20root%3B%0A%7D%2C%0A_maybeDistribute%3A%20function%20(node)%20%7B%0Avar%20fragContent%20%3D%20node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent%20%26%26%20dom(node).querySelector(CONTENT)%3B%0Avar%20wrappedContent%20%3D%20fragContent%20%26%26%20TreeApi.Logical.getParentNode(fragContent).nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%3B%0Avar%20hasContent%20%3D%20fragContent%20%7C%7C%20node.localName%20%3D%3D%3D%20CONTENT%3B%0Aif%20(hasContent)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Avar%20needsDist%20%3D%20this._nodeNeedsDistribution(this.node)%3B%0Aif%20(needsDist)%20%7B%0Athis._lazyDistribute(this.node)%3B%0A%7D%0Areturn%20needsDist%20%7C%7C%20hasContent%20%26%26%20!wrappedContent%3B%0A%7D%2C%0A_maybeAddInsertionPoint%3A%20function%20(node%2C%20parent)%20%7B%0Avar%20added%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent)%20%7B%0Avar%20c%24%20%3D%20dom(node).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20np%2C%20na%3B%20i%20%3C%20c%24.length%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anp%20%3D%20TreeApi.Logical.getParentNode(n)%3B%0Aif%20(np%20%3D%3D%3D%20node)%20%7B%0Anp%20%3D%20parent%3B%0A%7D%0Ana%20%3D%20this._maybeAddInsertionPoint(n%2C%20np)%3B%0Aadded%20%3D%20added%20%7C%7C%20na%3B%0A%7D%0A%7D%20else%20if%20(node.localName%20%3D%3D%3D%20CONTENT)%20%7B%0ATreeApi.Logical.saveChildNodes(parent)%3B%0ATreeApi.Logical.saveChildNodes(node)%3B%0Aadded%20%3D%20true%3B%0A%7D%0Areturn%20added%3B%0A%7D%2C%0A_updateInsertionPoints%3A%20function%20(host)%20%7B%0Avar%20i%24%20%3D%20host.shadyRoot._insertionPoints%20%3D%20dom(host.shadyRoot).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(TreeApi.Logical.getParentNode(c))%3B%0A%7D%0A%7D%2C%0A_nodeNeedsDistribution%3A%20function%20(node)%20%7B%0Areturn%20node%20%26%26%20node.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(node.shadyRoot)%3B%0A%7D%2C%0A_addNodeToHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementAdd)%20%7B%0Ahost._elementAdd(node)%3B%0A%7D%0A%7D%2C%0A_removeNodeFromHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementRemove)%20%7B%0Ahost._elementRemove(node)%3B%0A%7D%0A%7D%2C%0A_removeDistributedChildren%3A%20function%20(root%2C%20container)%20%7B%0Avar%20hostNeedsDist%3B%0Avar%20ip%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ip%24.length%3B%20i%2B%2B)%20%7B%0Avar%20content%20%3D%20ip%24%5Bi%5D%3B%0Aif%20(this._contains(container%2C%20content))%20%7B%0Avar%20dc%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20dc%24.length%3B%20j%2B%2B)%20%7B%0AhostNeedsDist%20%3D%20true%3B%0Avar%20node%20%3D%20dc%24%5Bj%5D%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Areturn%20hostNeedsDist%3B%0A%7D%2C%0A_contains%3A%20function%20(container%2C%20node)%20%7B%0Awhile%20(node)%20%7B%0Aif%20(node%20%3D%3D%20container)%20%7B%0Areturn%20true%3B%0A%7D%0Anode%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0A%7D%0A%7D%2C%0A_removeOwnerShadyRoot%3A%20function%20(node)%20%7B%0Aif%20(this._hasCachedOwnerRoot(node))%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node)%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20n%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._removeOwnerShadyRoot(n)%3B%0A%7D%0A%7D%0Anode._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%2C%0A_firstComposedNode%3A%20function%20(content)%20%7B%0Avar%20n%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20n%24.length%2C%20n%2C%20p%24%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ap%24%20%3D%20dom(n).getDestinationInsertionPoints()%3B%0Aif%20(p%24%5Bp%24.length%20-%201%5D%20%3D%3D%3D%20content)%20%7B%0Areturn%20n%3B%0A%7D%0A%7D%0A%7D%2C%0AquerySelector%3A%20function%20(selector)%20%7B%0Avar%20result%20%3D%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node%2C%20function%20(n)%20%7B%0Areturn%20Boolean(n)%3B%0A%7D)%5B0%5D%3B%0Areturn%20result%20%7C%7C%20null%3B%0A%7D%2C%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Areturn%20this.node._destinationInsertionPoints%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Areturn%20this.node._distributedNodes%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0A_clear%3A%20function%20()%20%7B%0Awhile%20(this.childNodes.length)%20%7B%0Athis.removeChild(this.childNodes%5B0%5D)%3B%0A%7D%0A%7D%2C%0AsetAttribute%3A%20function%20(name%2C%20value)%20%7B%0Athis.node.setAttribute(name%2C%20value)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0AremoveAttribute%3A%20function%20(name)%20%7B%0Athis.node.removeAttribute(name)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0A_maybeDistributeParent%3A%20function%20()%20%7B%0Aif%20(this._nodeNeedsDistribution(this.parentNode))%20%7B%0Athis._lazyDistribute(this.parentNode)%3B%0Areturn%20true%3B%0A%7D%0A%7D%2C%0AcloneNode%3A%20function%20(deep)%20%7B%0Avar%20n%20%3D%20nativeCloneNode.call(this.node%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(c%24%5Bi%5D).cloneNode(true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Avar%20n%20%3D%20nativeImportNode.call(doc%2C%20externalNode%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(externalNode)%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(doc).importNode(c%24%5Bi%5D%2C%20true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0A_getComposedInnerHTML%3A%20function%20()%20%7B%0Areturn%20getInnerHTML(this.node%2C%20true)%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20active%20%3D%20document.activeElement%3B%0Aif%20(!active)%20%7B%0Areturn%20null%3B%0A%7D%0Avar%20isShadyRoot%20%3D%20!!this.node._isShadyRoot%3B%0Aif%20(this.node%20!%3D%3D%20document)%20%7B%0Aif%20(!isShadyRoot)%20%7B%0Areturn%20null%3B%0A%7D%0Aif%20(this.node.host%20%3D%3D%3D%20active%20%7C%7C%20!this.node.host.contains(active))%20%7B%0Areturn%20null%3B%0A%7D%0A%7D%0Avar%20activeRoot%20%3D%20dom(active).getOwnerRoot()%3B%0Awhile%20(activeRoot%20%26%26%20activeRoot%20!%3D%3D%20this.node)%20%7B%0Aactive%20%3D%20activeRoot.host%3B%0AactiveRoot%20%3D%20dom(active).getOwnerRoot()%3B%0A%7D%0Aif%20(this.node%20%3D%3D%3D%20document)%20%7B%0Areturn%20activeRoot%20%3F%20null%20%3A%20active%3B%0A%7D%20else%20%7B%0Areturn%20activeRoot%20%3D%3D%3D%20this.node%20%3F%20active%20%3A%20null%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(this.node)%3B%0Areturn%20Array.isArray(c%24)%20%3F%20c%24%20%3A%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0Areturn%20Array.prototype.filter.call(this.childNodes%2C%20function%20(n)%20%7B%0Areturn%20n.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%3B%0A%7D)%3B%0A%7D%20else%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AparentNode%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getParentNode(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%20else%20%7B%0Avar%20tc%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20cn%20%3D%20this.childNodes%2C%20c%3B%20c%20%3D%20cn%5Bi%5D%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Atc.push(c.textContent)%3B%0A%7D%0A%7D%0Areturn%20tc.join('')%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis.node.textContent%20%3D%20text%3B%0A%7D%20else%20%7B%0Athis._clear()%3B%0Aif%20(text)%20%7B%0Athis.appendChild(document.createTextNode(text))%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20null%3B%0A%7D%20else%20%7B%0Areturn%20getInnerHTML(this.node)%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20!%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis._clear()%3B%0Avar%20d%20%3D%20document.createElement('div')%3B%0Ad.innerHTML%20%3D%20text%3B%0Avar%20c%24%20%3D%20TreeApi.arrayCopyChildNodes(d)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Athis.appendChild(c%24%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0ADomApi.hasInsertionPoint%20%3D%20function%20(root)%20%7B%0Areturn%20Boolean(root%20%26%26%20root._insertionPoints.length)%3B%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Aif%20(!Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20TreeApi.arrayCopy(this.node.querySelectorAll(selector))%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Avar%20n%20%3D%20this.node%3B%0Awhile%20(n)%20%7B%0Aif%20(n.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20n.host)%20%7B%0Areturn%20n%3B%0A%7D%0An%20%3D%20n.parentNode%3B%0A%7D%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Areturn%20doc.importNode(externalNode%2C%20deep)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDestinationInsertionPoints%20%26%26%20this.node.getDestinationInsertionPoints()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDistributedNodes%20%26%26%20this.node.getDistributedNodes()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20node%20%3D%20DomApi.wrap(this.node)%3B%0Avar%20activeElement%20%3D%20node.activeElement%3B%0Areturn%20node.contains(activeElement)%20%3F%20activeElement%20%3A%20null%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.textContent%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.innerHTML%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.innerHTML%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0Avar%20forwardMethods%20%3D%20function%20(m%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20m%24.length%3B%20i%2B%2B)%20%7B%0AforwardMethod(m%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardMethod%20%3D%20function%20(method)%20%7B%0ADomApi.prototype%5Bmethod%5D%20%3D%20function%20()%20%7B%0Areturn%20this.node%5Bmethod%5D.apply(this.node%2C%20arguments)%3B%0A%7D%3B%0A%7D%3B%0AforwardMethods(%5B%0A'cloneNode'%2C%0A'appendChild'%2C%0A'insertBefore'%2C%0A'removeChild'%2C%0A'replaceChild'%2C%0A'setAttribute'%2C%0A'removeAttribute'%2C%0A'querySelector'%0A%5D)%3B%0Avar%20forwardProperties%20%3D%20function%20(f%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20f%24.length%3B%20i%2B%2B)%20%7B%0AforwardProperty(f%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardProperty%20%3D%20function%20(name)%20%7B%0AObject.defineProperty(DomApi.prototype%2C%20name%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node%5Bname%5D%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0A%7D%3B%0AforwardProperties(%5B%0A'parentNode'%2C%0A'firstChild'%2C%0A'lastChild'%2C%0A'nextSibling'%2C%0A'previousSibling'%2C%0A'firstElementChild'%2C%0A'lastElementChild'%2C%0A'nextElementSibling'%2C%0A'previousElementSibling'%0A%5D)%3B%0A%7D())%3B%0APolymer.Base.extend(Polymer.dom%2C%20%7B%0A_flushGuard%3A%200%2C%0A_FLUSH_MAX%3A%20100%2C%0A_needsTakeRecords%3A%20!Polymer.Settings.useNativeCustomElements%2C%0A_debouncers%3A%20%5B%5D%2C%0A_staticFlushList%3A%20%5B%5D%2C%0A_finishDebouncer%3A%20null%2C%0Aflush%3A%20function%20()%20%7B%0Athis._flushGuard%20%3D%200%3B%0Athis._prepareFlush()%3B%0Awhile%20(this._debouncers.length%20%26%26%20this._flushGuard%20%3C%20this._FLUSH_MAX)%20%7B%0Awhile%20(this._debouncers.length)%20%7B%0Athis._debouncers.shift().complete()%3B%0A%7D%0Aif%20(this._finishDebouncer)%20%7B%0Athis._finishDebouncer.complete()%3B%0A%7D%0Athis._prepareFlush()%3B%0Athis._flushGuard%2B%2B%3B%0A%7D%0Aif%20(this._flushGuard%20%3E%3D%20this._FLUSH_MAX)%20%7B%0Aconsole.warn('Polymer.dom.flush%20aborted.%20Flush%20may%20not%20be%20complete.')%3B%0A%7D%0A%7D%2C%0A_prepareFlush%3A%20function%20()%20%7B%0Aif%20(this._needsTakeRecords)%20%7B%0ACustomElements.takeRecords()%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._staticFlushList.length%3B%20i%2B%2B)%20%7B%0Athis._staticFlushList%5Bi%5D()%3B%0A%7D%0A%7D%2C%0AaddStaticFlush%3A%20function%20(fn)%20%7B%0Athis._staticFlushList.push(fn)%3B%0A%7D%2C%0AremoveStaticFlush%3A%20function%20(fn)%20%7B%0Avar%20i%20%3D%20this._staticFlushList.indexOf(fn)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._staticFlushList.splice(i%2C%201)%3B%0A%7D%0A%7D%2C%0AaddDebouncer%3A%20function%20(debouncer)%20%7B%0Athis._debouncers.push(debouncer)%3B%0Athis._finishDebouncer%20%3D%20Polymer.Debounce(this._finishDebouncer%2C%20this._finishFlush)%3B%0A%7D%2C%0A_finishFlush%3A%20function%20()%20%7B%0APolymer.dom._debouncers%20%3D%20%5B%5D%3B%0A%7D%0A%7D)%3B%0APolymer.EventApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.Event%20%3D%20function%20(event)%20%7B%0Athis.event%20%3D%20event%3B%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.path%5B0%5D%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20path()%20%7B%0Areturn%20this.event.path%3B%0A%7D%0A%7D%3B%0A%7D%20else%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Avar%20current%20%3D%20this.event.currentTarget%3B%0Avar%20currentRoot%20%3D%20current%20%26%26%20Polymer.dom(current).getOwnerRoot()%3B%0Avar%20p%24%20%3D%20this.path%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20p%24.length%3B%20i%2B%2B)%20%7B%0Aif%20(Polymer.dom(p%24%5Bi%5D).getOwnerRoot()%20%3D%3D%3D%20currentRoot)%20%7B%0Areturn%20p%24%5Bi%5D%3B%0A%7D%0A%7D%0A%7D%2C%0Aget%20path()%20%7B%0Aif%20(!this.event._path)%20%7B%0Avar%20path%20%3D%20%5B%5D%3B%0Avar%20current%20%3D%20this.rootTarget%3B%0Awhile%20(current)%20%7B%0Apath.push(current)%3B%0Avar%20insertionPoints%20%3D%20Polymer.dom(current).getDestinationInsertionPoints()%3B%0Aif%20(insertionPoints.length)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20insertionPoints.length%20-%201%3B%20i%2B%2B)%20%7B%0Apath.push(insertionPoints%5Bi%5D)%3B%0A%7D%0Acurrent%20%3D%20insertionPoints%5BinsertionPoints.length%20-%201%5D%3B%0A%7D%20else%20%7B%0Acurrent%20%3D%20Polymer.dom(current).parentNode%20%7C%7C%20current.host%3B%0A%7D%0A%7D%0Apath.push(window)%3B%0Athis.event._path%20%3D%20path%3B%0A%7D%0Areturn%20this.event._path%3B%0A%7D%0A%7D%3B%0A%7D%0Avar%20factory%20%3D%20function%20(event)%20%7B%0Aif%20(!event.__eventApi)%20%7B%0Aevent.__eventApi%20%3D%20new%20DomApi.Event(event)%3B%0A%7D%0Areturn%20event.__eventApi%3B%0A%7D%3B%0Areturn%20%7B%20factory%3A%20factory%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20useShadow%20%3D%20Polymer.Settings.useShadow%3B%0AObject.defineProperty(DomApi.prototype%2C%20'classList'%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(!this._classList)%20%7B%0Athis._classList%20%3D%20new%20DomApi.ClassList(this)%3B%0A%7D%0Areturn%20this._classList%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0ADomApi.ClassList%20%3D%20function%20(host)%20%7B%0Athis.domApi%20%3D%20host%3B%0Athis.node%20%3D%20host.node%3B%0A%7D%3B%0ADomApi.ClassList.prototype%20%3D%20%7B%0Aadd%3A%20function%20()%20%7B%0Athis.node.classList.add.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Aremove%3A%20function%20()%20%7B%0Athis.node.classList.remove.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Atoggle%3A%20function%20()%20%7B%0Athis.node.classList.toggle.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0A_distributeParent%3A%20function%20()%20%7B%0Aif%20(!useShadow)%20%7B%0Athis.domApi._maybeDistributeParent()%3B%0A%7D%0A%7D%2C%0Acontains%3A%20function%20()%20%7B%0Areturn%20this.node.classList.contains.apply(this.node.classList%2C%20arguments)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.EffectiveNodesObserver%20%3D%20function%20(domApi)%20%7B%0Athis.domApi%20%3D%20domApi%3B%0Athis.node%20%3D%20this.domApi.node%3B%0Athis._listeners%20%3D%20%5B%5D%3B%0A%7D%3B%0ADomApi.EffectiveNodesObserver.prototype%20%3D%20%7B%0AaddListener%3A%20function%20(callback)%20%7B%0Aif%20(!this._isSetup)%20%7B%0Athis._setup()%3B%0Athis._isSetup%20%3D%20true%3B%0A%7D%0Avar%20listener%20%3D%20%7B%0Afn%3A%20callback%2C%0A_nodes%3A%20%5B%5D%0A%7D%3B%0Athis._listeners.push(listener)%3B%0Athis._scheduleNotify()%3B%0Areturn%20listener%3B%0A%7D%2C%0AremoveListener%3A%20function%20(handle)%20%7B%0Avar%20i%20%3D%20this._listeners.indexOf(handle)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._listeners.splice(i%2C%201)%3B%0Ahandle._nodes%20%3D%20%5B%5D%3B%0A%7D%0Aif%20(!this._hasListeners())%20%7B%0Athis._cleanup()%3B%0Athis._isSetup%20%3D%20false%3B%0A%7D%0A%7D%2C%0A_setup%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._unobserveContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_hasListeners%3A%20function%20()%20%7B%0Areturn%20Boolean(this._listeners.length)%3B%0A%7D%2C%0A_scheduleNotify%3A%20function%20()%20%7B%0Aif%20(this._debouncer)%20%7B%0Athis._debouncer.stop()%3B%0A%7D%0Athis._debouncer%20%3D%20Polymer.Debounce(this._debouncer%2C%20this._notify)%3B%0Athis._debouncer.context%20%3D%20this%3B%0APolymer.dom.addDebouncer(this._debouncer)%3B%0A%7D%2C%0Anotify%3A%20function%20()%20%7B%0Aif%20(this._hasListeners())%20%7B%0Athis._scheduleNotify()%3B%0A%7D%0A%7D%2C%0A_notify%3A%20function%20()%20%7B%0Athis._beforeCallListeners()%3B%0Athis._callListeners()%3B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0Athis._updateContentElements()%3B%0A%7D%2C%0A_updateContentElements%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_observeContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0An.__observeNodesMap%20%3D%20n.__observeNodesMap%20%7C%7C%20new%20WeakMap()%3B%0Aif%20(!n.__observeNodesMap.has(this))%20%7B%0An.__observeNodesMap.set(this%2C%20this._observeContent(n))%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_observeContent%3A%20function%20(content)%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20h%20%3D%20Polymer.dom(content).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Ah._avoidChangeCalculation%20%3D%20true%3B%0Areturn%20h%3B%0A%7D%2C%0A_unobserveContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20h%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0Ah%20%3D%20n.__observeNodesMap.get(this)%3B%0Aif%20(h)%20%7B%0APolymer.dom(n).unobserveNodes(h)%3B%0An.__observeNodesMap.delete(this)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_isContent%3A%20function%20(node)%20%7B%0Areturn%20node.localName%20%3D%3D%3D%20'content'%3B%0A%7D%2C%0A_callListeners%3A%20function%20()%20%7B%0Avar%20o%24%20%3D%20this._listeners%3B%0Avar%20nodes%20%3D%20this._getEffectiveNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20o%24.length%20%26%26%20(o%20%3D%20o%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20info%20%3D%20this._generateListenerInfo(o%2C%20nodes)%3B%0Aif%20(info%20%7C%7C%20o._alwaysNotify)%20%7B%0Athis._callListener(o%2C%20info)%3B%0A%7D%0A%7D%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getEffectiveChildNodes()%3B%0A%7D%2C%0A_generateListenerInfo%3A%20function%20(listener%2C%20newNodes)%20%7B%0Aif%20(listener._avoidChangeCalculation)%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20oldNodes%20%3D%20listener._nodes%3B%0Avar%20info%20%3D%20%7B%0Atarget%3A%20this.node%2C%0AaddedNodes%3A%20%5B%5D%2C%0AremovedNodes%3A%20%5B%5D%0A%7D%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(newNodes%2C%20oldNodes)%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Ainfo.removedNodes.push(n)%3B%0A%7D%0A%7D%0Afor%20(i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%20s.index%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0Ainfo.addedNodes.push(newNodes%5Bj%5D)%3B%0A%7D%0A%7D%0Alistener._nodes%20%3D%20newNodes%3B%0Aif%20(info.addedNodes.length%20%7C%7C%20info.removedNodes.length)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%2C%0A_callListener%3A%20function%20(listener%2C%20info)%20%7B%0Areturn%20listener.fn.call(this.node%2C%20info)%3B%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0A%7D%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0Avar%20baseSetup%20%3D%20DomApi.EffectiveNodesObserver.prototype._setup%3B%0Avar%20baseCleanup%20%3D%20DomApi.EffectiveNodesObserver.prototype._cleanup%3B%0APolymer.Base.extend(DomApi.EffectiveNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._mutationHandler%20%3D%20function%20(mxns)%20%7B%0Aif%20(mxns%20%26%26%20mxns.length)%20%7B%0Aself._scheduleNotify()%3B%0A%7D%0A%7D%3B%0Athis._observer%20%3D%20new%20MutationObserver(this._mutationHandler)%3B%0Athis._boundFlush%20%3D%20function%20()%20%7B%0Aself._flush()%3B%0A%7D%3B%0APolymer.dom.addStaticFlush(this._boundFlush)%3B%0Athis._observer.observe(this.node%2C%20%7B%20childList%3A%20true%20%7D)%3B%0A%7D%0AbaseSetup.call(this)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._observer.disconnect()%3B%0Athis._observer%20%3D%20null%3B%0Athis._mutationHandler%20%3D%20null%3B%0APolymer.dom.removeStaticFlush(this._boundFlush)%3B%0AbaseCleanup.call(this)%3B%0A%7D%2C%0A_flush%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._mutationHandler(this._observer.takeRecords())%3B%0A%7D%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._makeContentListenersAlwaysNotify()%3B%0Athis._observer.disconnect()%3B%0Athis._observer.observe(this.node%2C%20%7B%0AchildList%3A%20true%2C%0Aattributes%3A%20true%2C%0Asubtree%3A%20true%0A%7D)%3B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host%20%26%26%20Polymer.dom(host).observer)%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%2C%0A_makeContentListenersAlwaysNotify%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20this._listeners.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20this._listeners%5Bi%5D%3B%0Ah._alwaysNotify%20%3D%20h._isContentListener%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.DistributedNodesObserver%20%3D%20function%20(domApi)%20%7B%0ADomApi.EffectiveNodesObserver.call(this%2C%20domApi)%3B%0A%7D%3B%0ADomApi.DistributedNodesObserver.prototype%20%3D%20Object.create(DomApi.EffectiveNodesObserver.prototype)%3B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getDistributedNodes()%3B%0A%7D%0A%7D)%3B%0Aif%20(Settings.useShadow)%20%7B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._observer%20%3D%20Polymer.dom(host).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Athis._observer._isContentListener%20%3D%20true%3B%0Aif%20(this._hasAttrSelect())%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_hasAttrSelect%3A%20function%20()%20%7B%0Avar%20select%20%3D%20this.node.getAttribute('select')%3B%0Areturn%20select%20%26%26%20select.match(%2F%5B%5B.%5D%2B%2F)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0APolymer.dom(host).unobserveNodes(this._observer)%3B%0A%7D%0Athis._observer%20%3D%20null%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0APolymer.Base._addFeature(%7B%0A_prepShady%3A%20function%20()%20%7B%0Athis._useContent%20%3D%20this._useContent%20%7C%7C%20Boolean(this._template)%3B%0A%7D%2C%0A_setupShady%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20null%3B%0Aif%20(!this.__domApi)%20%7B%0Athis.__domApi%20%3D%20null%3B%0A%7D%0Aif%20(!this.__dom)%20%7B%0Athis.__dom%20%3D%20null%3B%0A%7D%0Aif%20(!this._ownerShadyRoot)%20%7B%0Athis._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%0A%7D%2C%0A_poolContent%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0ATreeApi.Logical.saveChildNodes(this)%3B%0A%7D%0A%7D%2C%0A_setupRoot%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis._createLocalRoot()%3B%0Aif%20(!this.dataHost)%20%7B%0AupgradeLogicalChildren(TreeApi.Logical.getChildNodes(this))%3B%0A%7D%0A%7D%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20this.root%3B%0Athis.shadyRoot._distributionClean%20%3D%20false%3B%0Athis.shadyRoot._hasDistributed%20%3D%20false%3B%0Athis.shadyRoot._isShadyRoot%20%3D%20true%3B%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0Avar%20i%24%20%3D%20this.shadyRoot._insertionPoints%20%3D%20!this._notes%20%7C%7C%20this._notes._hasContent%20%3F%20this.shadyRoot.querySelectorAll('content')%20%3A%20%5B%5D%3B%0ATreeApi.Logical.saveChildNodes(this.shadyRoot)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(c.parentNode)%3B%0A%7D%0Athis.shadyRoot.host%20%3D%20this%3B%0A%7D%2C%0Aget%20domHost()%20%7B%0Avar%20root%20%3D%20Polymer.dom(this).getOwnerRoot()%3B%0Areturn%20root%20%26%26%20root.host%3B%0A%7D%2C%0AdistributeContent%3A%20function%20(updateInsertionPoints)%20%7B%0Aif%20(this.shadyRoot)%20%7B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20this.shadyRoot._invalidInsertionPoints%20%7C%7C%20updateInsertionPoints%3B%0Avar%20host%20%3D%20getTopDistributingHost(this)%3B%0APolymer.dom(this)._lazyDistribute(host)%3B%0A%7D%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20!this.shadyRoot._distributionClean)%20%7B%0Aif%20(this.shadyRoot._invalidInsertionPoints)%20%7B%0APolymer.dom(this)._updateInsertionPoints(this)%3B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20false%3B%0A%7D%0Athis._beginDistribute()%3B%0Athis._distributeDirtyRoots()%3B%0Athis._finishDistribute()%3B%0A%7D%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._resetDistribution()%3B%0Athis._distributePool(this.shadyRoot%2C%20this._collectPool())%3B%0A%7D%0A%7D%2C%0A_distributeDirtyRoots%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.shadyRoot._dirtyRoots%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._distributeContent()%3B%0A%7D%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis.shadyRoot._distributionClean%20%3D%20true%3B%0Aif%20(DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._composeTree()%3B%0AnotifyContentObservers(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0ATreeApi.Composed.clearChildNodes(this)%3B%0Athis.appendChild(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Avar%20children%20%3D%20this._composeNode(this)%3B%0Athis._updateChildNodes(this%2C%20children)%3B%0A%7D%0A%7D%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0AnotifyInitialDistribution(this)%3B%0A%7D%0Athis.shadyRoot._hasDistributed%20%3D%20true%3B%0A%7D%0A%7D%2C%0AelementMatches%3A%20function%20(selector%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Areturn%20DomApi.matchesSelector.call(node%2C%20selector)%3B%0A%7D%2C%0A_resetDistribution%3A%20function%20()%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(child._destinationInsertionPoints)%20%7B%0Achild._destinationInsertionPoints%20%3D%20undefined%3B%0A%7D%0Aif%20(isInsertionPoint(child))%20%7B%0AclearDistributedDestinationInsertionPoints(child)%3B%0A%7D%0A%7D%0Avar%20root%20%3D%20this.shadyRoot%3B%0Avar%20p%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20p%24.length%3B%20j%2B%2B)%20%7B%0Ap%24%5Bj%5D._distributedNodes%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_collectPool%3A%20function%20()%20%7B%0Avar%20pool%20%3D%20%5B%5D%3B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Apool.push.apply(pool%2C%20child._distributedNodes)%3B%0A%7D%20else%20%7B%0Apool.push(child)%3B%0A%7D%0A%7D%0Areturn%20pool%3B%0A%7D%2C%0A_distributePool%3A%20function%20(node%2C%20pool)%20%7B%0Avar%20p%24%20%3D%20node._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._distributeInsertionPoint(p%2C%20pool)%3B%0AmaybeRedistributeParent(p%2C%20this)%3B%0A%7D%0A%7D%2C%0A_distributeInsertionPoint%3A%20function%20(content%2C%20pool)%20%7B%0Avar%20anyDistributed%20%3D%20false%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20pool.length%2C%20node%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Anode%20%3D%20pool%5Bi%5D%3B%0Aif%20(!node)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(this._matchesContentSelect(node%2C%20content))%20%7B%0AdistributeNodeInto(node%2C%20content)%3B%0Apool%5Bi%5D%20%3D%20undefined%3B%0AanyDistributed%20%3D%20true%3B%0A%7D%0A%7D%0Aif%20(!anyDistributed)%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(content)%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20children.length%3B%20j%2B%2B)%20%7B%0AdistributeNodeInto(children%5Bj%5D%2C%20content)%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeTree%3A%20function%20()%20%7B%0Athis._updateChildNodes(this%2C%20this._composeNode(this))%3B%0Avar%20p%24%20%3D%20this.shadyRoot._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%2C%20parent%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparent%20%3D%20TreeApi.Logical.getParentNode(p)%3B%0Aif%20(!parent._useContent%20%26%26%20parent%20!%3D%3D%20this%20%26%26%20parent%20!%3D%3D%20this.shadyRoot)%20%7B%0Athis._updateChildNodes(parent%2C%20this._composeNode(parent))%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeNode%3A%20function%20(node)%20%7B%0Avar%20children%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node.shadyRoot%20%7C%7C%20node)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20c%24%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Avar%20distributedNodes%20%3D%20child._distributedNodes%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20distributedNodes.length%3B%20j%2B%2B)%20%7B%0Avar%20distributedNode%20%3D%20distributedNodes%5Bj%5D%3B%0Aif%20(isFinalDestination(child%2C%20distributedNode))%20%7B%0Achildren.push(distributedNode)%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Achildren.push(child)%3B%0A%7D%0A%7D%0Areturn%20children%3B%0A%7D%2C%0A_updateChildNodes%3A%20function%20(container%2C%20children)%20%7B%0Avar%20composed%20%3D%20TreeApi.Composed.getChildNodes(container)%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(children%2C%20composed)%3B%0Afor%20(var%20i%20%3D%200%2C%20d%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Aif%20(TreeApi.Composed.getParentNode(n)%20%3D%3D%3D%20container)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20n)%3B%0A%7D%0Acomposed.splice(s.index%20%2B%20d%2C%201)%3B%0A%7D%0Ad%20-%3D%20s.addedCount%3B%0A%7D%0Afor%20(var%20i%20%3D%200%2C%20s%2C%20next%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anext%20%3D%20composed%5Bs.index%5D%3B%0Afor%20(j%20%3D%20s.index%2C%20n%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0An%20%3D%20children%5Bj%5D%3B%0ATreeApi.Composed.insertBefore(container%2C%20n%2C%20next)%3B%0Acomposed.splice(j%2C%200%2C%20n)%3B%0A%7D%0A%7D%0A%7D%2C%0A_matchesContentSelect%3A%20function%20(node%2C%20contentElement)%20%7B%0Avar%20select%20%3D%20contentElement.getAttribute('select')%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aselect%20%3D%20select.trim()%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aif%20(!(node%20instanceof%20Element))%20%7B%0Areturn%20false%3B%0A%7D%0Avar%20validSelectors%20%3D%20%2F%5E(%3Anot%5C()%3F%5B*.%23%5Ba-zA-Z_%7C%5D%2F%3B%0Aif%20(!validSelectors.test(select))%20%7B%0Areturn%20false%3B%0A%7D%0Areturn%20this.elementMatches(select%2C%20node)%3B%0A%7D%2C%0A_elementAdd%3A%20function%20()%20%7B%0A%7D%2C%0A_elementRemove%3A%20function%20()%20%7B%0A%7D%0A%7D)%3B%0Afunction%20distributeNodeInto(child%2C%20insertionPoint)%20%7B%0AinsertionPoint._distributedNodes.push(child)%3B%0Avar%20points%20%3D%20child._destinationInsertionPoints%3B%0Aif%20(!points)%20%7B%0Achild._destinationInsertionPoints%20%3D%20%5BinsertionPoint%5D%3B%0A%7D%20else%20%7B%0Apoints.push(insertionPoint)%3B%0A%7D%0A%7D%0Afunction%20clearDistributedDestinationInsertionPoints(content)%20%7B%0Avar%20e%24%20%3D%20content._distributedNodes%3B%0Aif%20(e%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20e%24.length%3B%20i%2B%2B)%20%7B%0Avar%20d%20%3D%20e%24%5Bi%5D._destinationInsertionPoints%3B%0Aif%20(d)%20%7B%0Ad.splice(d.indexOf(content)%20%2B%201%2C%20d.length)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Afunction%20maybeRedistributeParent(content%2C%20host)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(content)%3B%0Aif%20(parent%20%26%26%20parent.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(parent.shadyRoot)%20%26%26%20parent.shadyRoot._distributionClean)%20%7B%0Aparent.shadyRoot._distributionClean%20%3D%20false%3B%0Ahost.shadyRoot._dirtyRoots.push(parent)%3B%0A%7D%0A%7D%0Afunction%20isFinalDestination(insertionPoint%2C%20node)%20%7B%0Avar%20points%20%3D%20node._destinationInsertionPoints%3B%0Areturn%20points%20%26%26%20points%5Bpoints.length%20-%201%5D%20%3D%3D%3D%20insertionPoint%3B%0A%7D%0Afunction%20isInsertionPoint(node)%20%7B%0Areturn%20node.localName%20%3D%3D%20'content'%3B%0A%7D%0Afunction%20getTopDistributingHost(host)%20%7B%0Awhile%20(host%20%26%26%20hostNeedsRedistribution(host))%20%7B%0Ahost%20%3D%20host.domHost%3B%0A%7D%0Areturn%20host%3B%0A%7D%0Afunction%20hostNeedsRedistribution(host)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(host)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20c%24%5Bi%5D%3B%0Aif%20(c.localName%20%26%26%20c.localName%20%3D%3D%3D%20'content')%20%7B%0Areturn%20host.domHost%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyContentObservers(root)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20root._insertionPoints.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20root._insertionPoints%5Bi%5D%3B%0Aif%20(DomApi.hasApi(c))%20%7B%0APolymer.dom(c).notifyObserver()%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyInitialDistribution(host)%20%7B%0Aif%20(DomApi.hasApi(host))%20%7B%0APolymer.dom(host).notifyObserver()%3B%0A%7D%0A%7D%0Avar%20needsUpgrade%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Afunction%20upgradeLogicalChildren(children)%20%7B%0Aif%20(needsUpgrade%20%26%26%20children)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0ACustomElements.upgrade(children%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0Aif%20(Polymer.Settings.useShadow)%20%7B%0APolymer.Base._addFeature(%7B%0A_poolContent%3A%20function%20()%20%7B%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0A%7D%2C%0AdistributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.createShadowRoot()%3B%0Athis.shadowRoot.appendChild(this.root)%3B%0Athis.root%20%3D%20this.shadowRoot%3B%0A%7D%0A%7D)%3B%0A%7D%0APolymer.Async%20%3D%20%7B%0A_currVal%3A%200%2C%0A_lastVal%3A%200%2C%0A_callbacks%3A%20%5B%5D%2C%0A_twiddleContent%3A%200%2C%0A_twiddle%3A%20document.createTextNode('')%2C%0Arun%3A%20function%20(callback%2C%20waitTime)%20%7B%0Aif%20(waitTime%20%3E%200)%20%7B%0Areturn%20~setTimeout(callback%2C%20waitTime)%3B%0A%7D%20else%20%7B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athis._callbacks.push(callback)%3B%0Areturn%20this._currVal%2B%2B%3B%0A%7D%0A%7D%2C%0Acancel%3A%20function%20(handle)%20%7B%0Aif%20(handle%20%3C%200)%20%7B%0AclearTimeout(~handle)%3B%0A%7D%20else%20%7B%0Avar%20idx%20%3D%20handle%20-%20this._lastVal%3B%0Aif%20(idx%20%3E%3D%200)%20%7B%0Aif%20(!this._callbacks%5Bidx%5D)%20%7B%0Athrow%20'invalid%20async%20handle%3A%20'%20%2B%20handle%3B%0A%7D%0Athis._callbacks%5Bidx%5D%20%3D%20null%3B%0A%7D%0A%7D%0A%7D%2C%0A_atEndOfMicrotask%3A%20function%20()%20%7B%0Avar%20len%20%3D%20this._callbacks.length%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20len%3B%20i%2B%2B)%20%7B%0Avar%20cb%20%3D%20this._callbacks%5Bi%5D%3B%0Aif%20(cb)%20%7B%0Atry%20%7B%0Acb()%3B%0A%7D%20catch%20(e)%20%7B%0Ai%2B%2B%3B%0Athis._callbacks.splice(0%2C%20i)%3B%0Athis._lastVal%20%2B%3D%20i%3B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athrow%20e%3B%0A%7D%0A%7D%0A%7D%0Athis._callbacks.splice(0%2C%20len)%3B%0Athis._lastVal%20%2B%3D%20len%3B%0A%7D%0A%7D%3B%0Anew%20window.MutationObserver(function%20()%20%7B%0APolymer.Async._atEndOfMicrotask()%3B%0A%7D).observe(Polymer.Async._twiddle%2C%20%7B%20characterData%3A%20true%20%7D)%3B%0APolymer.Debounce%20%3D%20function%20()%20%7B%0Avar%20Async%20%3D%20Polymer.Async%3B%0Avar%20Debouncer%20%3D%20function%20(context)%20%7B%0Athis.context%20%3D%20context%3B%0Avar%20self%20%3D%20this%3B%0Athis.boundComplete%20%3D%20function%20()%20%7B%0Aself.complete()%3B%0A%7D%3B%0A%7D%3B%0ADebouncer.prototype%20%3D%20%7B%0Ago%3A%20function%20(callback%2C%20wait)%20%7B%0Avar%20h%3B%0Athis.finish%20%3D%20function%20()%20%7B%0AAsync.cancel(h)%3B%0A%7D%3B%0Ah%20%3D%20Async.run(this.boundComplete%2C%20wait)%3B%0Athis.callback%20%3D%20callback%3B%0A%7D%2C%0Astop%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.finish()%3B%0Athis.finish%20%3D%20null%3B%0A%7D%0A%7D%2C%0Acomplete%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.stop()%3B%0Athis.callback.call(this.context)%3B%0A%7D%0A%7D%0A%7D%3B%0Afunction%20debounce(debouncer%2C%20callback%2C%20wait)%20%7B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%20else%20%7B%0Adebouncer%20%3D%20new%20Debouncer(this)%3B%0A%7D%0Adebouncer.go(callback%2C%20wait)%3B%0Areturn%20debouncer%3B%0A%7D%0Areturn%20debounce%3B%0A%7D()%3B%0APolymer.Base._addFeature(%7B%0A_setupDebouncers%3A%20function%20()%20%7B%0Athis._debouncers%20%3D%20%7B%7D%3B%0A%7D%2C%0Adebounce%3A%20function%20(jobName%2C%20callback%2C%20wait)%20%7B%0Areturn%20this._debouncers%5BjobName%5D%20%3D%20Polymer.Debounce.call(this%2C%20this._debouncers%5BjobName%5D%2C%20callback%2C%20wait)%3B%0A%7D%2C%0AisDebouncerActive%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Areturn%20!!(debouncer%20%26%26%20debouncer.finish)%3B%0A%7D%2C%0AflushDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.complete()%3B%0A%7D%0A%7D%2C%0AcancelDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.DomModule%20%3D%20document.createElement('dom-module')%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepTemplate()%3B%0Athis._prepShady()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._registerHost()%3B%0Aif%20(this._template)%20%7B%0Athis._poolContent()%3B%0Athis._beginHosting()%3B%0Athis._stampTemplate()%3B%0Athis._endHosting()%3B%0A%7D%0Athis._marshalHostAttributes()%3B%0Athis._setupDebouncers()%3B%0Athis._marshalBehaviors()%3B%0Athis._tryReady()%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-mini.html.js%0A:49 in _tryReady data:text/javascript;charset=utf-8,Polymer.nar%20%3D%20%5B%5D%3B%0APolymer.Annotations%20%3D%20%7B%0AparseAnnotations%3A%20function%20(template)%20%7B%0Avar%20list%20%3D%20%5B%5D%3B%0Avar%20content%20%3D%20template._content%20%7C%7C%20template.content%3B%0Athis._parseNodeAnnotations(content%2C%20list%2C%20template.hasAttribute('strip-whitespace'))%3B%0Areturn%20list%3B%0A%7D%2C%0A_parseNodeAnnotations%3A%20function%20(node%2C%20list%2C%20stripWhiteSpace)%20%7B%0Areturn%20node.nodeType%20%3D%3D%3D%20Node.TEXT_NODE%20%3F%20this._parseTextNodeAnnotation(node%2C%20list)%20%3A%20this._parseElementAnnotations(node%2C%20list%2C%20stripWhiteSpace)%3B%0A%7D%2C%0A_bindingRegex%3A%20function%20()%20%7B%0Avar%20IDENT%20%3D%20'(%3F%3A'%20%2B%20'%5Ba-zA-Z_%24%5D%5B%5C%5Cw.%3A%24%5C%5C-*%5D*'%20%2B%20')'%3B%0Avar%20NUMBER%20%3D%20'(%3F%3A'%20%2B%20'%5B-%2B%5D%3F%5B0-9%5D*%5C%5C.%3F%5B0-9%5D%2B(%3F%3A%5BeE%5D%5B-%2B%5D%3F%5B0-9%5D%2B)%3F'%20%2B%20')'%3B%0Avar%20SQUOTE_STRING%20%3D%20'(%3F%3A'%20%2B%20'%5C'(%3F%3A%5B%5E%5C'%5C%5C%5C%5C%5D%7C%5C%5C%5C%5C.)*%5C''%20%2B%20')'%3B%0Avar%20DQUOTE_STRING%20%3D%20'(%3F%3A'%20%2B%20'%22(%3F%3A%5B%5E%22%5C%5C%5C%5C%5D%7C%5C%5C%5C%5C.)*%22'%20%2B%20')'%3B%0Avar%20STRING%20%3D%20'(%3F%3A'%20%2B%20SQUOTE_STRING%20%2B%20'%7C'%20%2B%20DQUOTE_STRING%20%2B%20')'%3B%0Avar%20ARGUMENT%20%3D%20'(%3F%3A'%20%2B%20IDENT%20%2B%20'%7C'%20%2B%20NUMBER%20%2B%20'%7C'%20%2B%20STRING%20%2B%20'%5C%5Cs*'%20%2B%20')'%3B%0Avar%20ARGUMENTS%20%3D%20'(%3F%3A'%20%2B%20ARGUMENT%20%2B%20'(%3F%3A%2C%5C%5Cs*'%20%2B%20ARGUMENT%20%2B%20')*'%20%2B%20')'%3B%0Avar%20ARGUMENT_LIST%20%3D%20'(%3F%3A'%20%2B%20'%5C%5C(%5C%5Cs*'%20%2B%20'(%3F%3A'%20%2B%20ARGUMENTS%20%2B%20'%3F'%20%2B%20')'%20%2B%20'%5C%5C)%5C%5Cs*'%20%2B%20')'%3B%0Avar%20BINDING%20%3D%20'('%20%2B%20IDENT%20%2B%20'%5C%5Cs*'%20%2B%20ARGUMENT_LIST%20%2B%20'%3F'%20%2B%20')'%3B%0Avar%20OPEN_BRACKET%20%3D%20'(%5C%5C%5B%5C%5C%5B%7C%7B%7B)'%20%2B%20'%5C%5Cs*'%3B%0Avar%20CLOSE_BRACKET%20%3D%20'(%3F%3A%5D%5D%7C%7D%7D)'%3B%0Avar%20NEGATE%20%3D%20'(%3F%3A(!)%5C%5Cs*)%3F'%3B%0Avar%20EXPRESSION%20%3D%20OPEN_BRACKET%20%2B%20NEGATE%20%2B%20BINDING%20%2B%20CLOSE_BRACKET%3B%0Areturn%20new%20RegExp(EXPRESSION%2C%20'g')%3B%0A%7D()%2C%0A_parseBindings%3A%20function%20(text)%20%7B%0Avar%20re%20%3D%20this._bindingRegex%3B%0Avar%20parts%20%3D%20%5B%5D%3B%0Avar%20lastIndex%20%3D%200%3B%0Avar%20m%3B%0Awhile%20((m%20%3D%20re.exec(text))%20!%3D%3D%20null)%20%7B%0Aif%20(m.index%20%3E%20lastIndex)%20%7B%0Aparts.push(%7B%20literal%3A%20text.slice(lastIndex%2C%20m.index)%20%7D)%3B%0A%7D%0Avar%20mode%20%3D%20m%5B1%5D%5B0%5D%3B%0Avar%20negate%20%3D%20Boolean(m%5B2%5D)%3B%0Avar%20value%20%3D%20m%5B3%5D.trim()%3B%0Avar%20customEvent%2C%20notifyEvent%2C%20colon%3B%0Aif%20(mode%20%3D%3D%20'%7B'%20%26%26%20(colon%20%3D%20value.indexOf('%3A%3A'))%20%3E%200)%20%7B%0AnotifyEvent%20%3D%20value.substring(colon%20%2B%202)%3B%0Avalue%20%3D%20value.substring(0%2C%20colon)%3B%0AcustomEvent%20%3D%20true%3B%0A%7D%0Aparts.push(%7B%0AcompoundIndex%3A%20parts.length%2C%0Avalue%3A%20value%2C%0Amode%3A%20mode%2C%0Anegate%3A%20negate%2C%0Aevent%3A%20notifyEvent%2C%0AcustomEvent%3A%20customEvent%0A%7D)%3B%0AlastIndex%20%3D%20re.lastIndex%3B%0A%7D%0Aif%20(lastIndex%20%26%26%20lastIndex%20%3C%20text.length)%20%7B%0Avar%20literal%20%3D%20text.substring(lastIndex)%3B%0Aif%20(literal)%20%7B%0Aparts.push(%7B%20literal%3A%20literal%20%7D)%3B%0A%7D%0A%7D%0Aif%20(parts.length)%20%7B%0Areturn%20parts%3B%0A%7D%0A%7D%2C%0A_literalFromParts%3A%20function%20(parts)%20%7B%0Avar%20s%20%3D%20''%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20parts.length%3B%20i%2B%2B)%20%7B%0Avar%20literal%20%3D%20parts%5Bi%5D.literal%3B%0As%20%2B%3D%20literal%20%7C%7C%20''%3B%0A%7D%0Areturn%20s%3B%0A%7D%2C%0A_parseTextNodeAnnotation%3A%20function%20(node%2C%20list)%20%7B%0Avar%20parts%20%3D%20this._parseBindings(node.textContent)%3B%0Aif%20(parts)%20%7B%0Anode.textContent%20%3D%20this._literalFromParts(parts)%20%7C%7C%20'%20'%3B%0Avar%20annote%20%3D%20%7B%0Abindings%3A%20%5B%7B%0Akind%3A%20'text'%2C%0Aname%3A%20'textContent'%2C%0Aparts%3A%20parts%2C%0AisCompound%3A%20parts.length%20!%3D%3D%201%0A%7D%5D%0A%7D%3B%0Alist.push(annote)%3B%0Areturn%20annote%3B%0A%7D%0A%7D%2C%0A_parseElementAnnotations%3A%20function%20(element%2C%20list%2C%20stripWhiteSpace)%20%7B%0Avar%20annote%20%3D%20%7B%0Abindings%3A%20%5B%5D%2C%0Aevents%3A%20%5B%5D%0A%7D%3B%0Aif%20(element.localName%20%3D%3D%3D%20'content')%20%7B%0Alist._hasContent%20%3D%20true%3B%0A%7D%0Athis._parseChildNodesAnnotations(element%2C%20annote%2C%20list%2C%20stripWhiteSpace)%3B%0Aif%20(element.attributes)%20%7B%0Athis._parseNodeAttributeAnnotations(element%2C%20annote%2C%20list)%3B%0Aif%20(this.prepElement)%20%7B%0Athis.prepElement(element)%3B%0A%7D%0A%7D%0Aif%20(annote.bindings.length%20%7C%7C%20annote.events.length%20%7C%7C%20annote.id)%20%7B%0Alist.push(annote)%3B%0A%7D%0Areturn%20annote%3B%0A%7D%2C%0A_parseChildNodesAnnotations%3A%20function%20(root%2C%20annote%2C%20list%2C%20stripWhiteSpace)%20%7B%0Aif%20(root.firstChild)%20%7B%0Avar%20node%20%3D%20root.firstChild%3B%0Avar%20i%20%3D%200%3B%0Awhile%20(node)%20%7B%0Avar%20next%20%3D%20node.nextSibling%3B%0Aif%20(node.localName%20%3D%3D%3D%20'template'%20%26%26%20!node.hasAttribute('preserve-content'))%20%7B%0Athis._parseTemplate(node%2C%20i%2C%20list%2C%20annote)%3B%0A%7D%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.TEXT_NODE)%20%7B%0Avar%20n%20%3D%20next%3B%0Awhile%20(n%20%26%26%20n.nodeType%20%3D%3D%3D%20Node.TEXT_NODE)%20%7B%0Anode.textContent%20%2B%3D%20n.textContent%3B%0Anext%20%3D%20n.nextSibling%3B%0Aroot.removeChild(n)%3B%0An%20%3D%20next%3B%0A%7D%0Aif%20(stripWhiteSpace%20%26%26%20!node.textContent.trim())%20%7B%0Aroot.removeChild(node)%3B%0Ai--%3B%0A%7D%0A%7D%0Aif%20(node.parentNode)%20%7B%0Avar%20childAnnotation%20%3D%20this._parseNodeAnnotations(node%2C%20list%2C%20stripWhiteSpace)%3B%0Aif%20(childAnnotation)%20%7B%0AchildAnnotation.parent%20%3D%20annote%3B%0AchildAnnotation.index%20%3D%20i%3B%0A%7D%0A%7D%0Anode%20%3D%20next%3B%0Ai%2B%2B%3B%0A%7D%0A%7D%0A%7D%2C%0A_parseTemplate%3A%20function%20(node%2C%20index%2C%20list%2C%20parent)%20%7B%0Avar%20content%20%3D%20document.createDocumentFragment()%3B%0Acontent._notes%20%3D%20this.parseAnnotations(node)%3B%0Acontent.appendChild(node.content)%3B%0Alist.push(%7B%0Abindings%3A%20Polymer.nar%2C%0Aevents%3A%20Polymer.nar%2C%0AtemplateContent%3A%20content%2C%0Aparent%3A%20parent%2C%0Aindex%3A%20index%0A%7D)%3B%0A%7D%2C%0A_parseNodeAttributeAnnotations%3A%20function%20(node%2C%20annotation)%20%7B%0Avar%20attrs%20%3D%20Array.prototype.slice.call(node.attributes)%3B%0Afor%20(var%20i%20%3D%20attrs.length%20-%201%2C%20a%3B%20a%20%3D%20attrs%5Bi%5D%3B%20i--)%20%7B%0Avar%20n%20%3D%20a.name%3B%0Avar%20v%20%3D%20a.value%3B%0Avar%20b%3B%0Aif%20(n.slice(0%2C%203)%20%3D%3D%3D%20'on-')%20%7B%0Anode.removeAttribute(n)%3B%0Aannotation.events.push(%7B%0Aname%3A%20n.slice(3)%2C%0Avalue%3A%20v%0A%7D)%3B%0A%7D%20else%20if%20(b%20%3D%20this._parseNodeAttributeAnnotation(node%2C%20n%2C%20v))%20%7B%0Aannotation.bindings.push(b)%3B%0A%7D%20else%20if%20(n%20%3D%3D%3D%20'id')%20%7B%0Aannotation.id%20%3D%20v%3B%0A%7D%0A%7D%0A%7D%2C%0A_parseNodeAttributeAnnotation%3A%20function%20(node%2C%20name%2C%20value)%20%7B%0Avar%20parts%20%3D%20this._parseBindings(value)%3B%0Aif%20(parts)%20%7B%0Avar%20origName%20%3D%20name%3B%0Avar%20kind%20%3D%20'property'%3B%0Aif%20(name%5Bname.length%20-%201%5D%20%3D%3D%20'%24')%20%7B%0Aname%20%3D%20name.slice(0%2C%20-1)%3B%0Akind%20%3D%20'attribute'%3B%0A%7D%0Avar%20literal%20%3D%20this._literalFromParts(parts)%3B%0Aif%20(literal%20%26%26%20kind%20%3D%3D%20'attribute')%20%7B%0Anode.setAttribute(name%2C%20literal)%3B%0A%7D%0Aif%20(node.localName%20%3D%3D%3D%20'input'%20%26%26%20origName%20%3D%3D%3D%20'value')%20%7B%0Anode.setAttribute(origName%2C%20'')%3B%0A%7D%0Anode.removeAttribute(origName)%3B%0Avar%20propertyName%20%3D%20Polymer.CaseMap.dashToCamelCase(name)%3B%0Aif%20(kind%20%3D%3D%3D%20'property')%20%7B%0Aname%20%3D%20propertyName%3B%0A%7D%0Areturn%20%7B%0Akind%3A%20kind%2C%0Aname%3A%20name%2C%0ApropertyName%3A%20propertyName%2C%0Aparts%3A%20parts%2C%0Aliteral%3A%20literal%2C%0AisCompound%3A%20parts.length%20!%3D%3D%201%0A%7D%3B%0A%7D%0A%7D%2C%0AfindAnnotatedNode%3A%20function%20(root%2C%20annote)%20%7B%0Avar%20parent%20%3D%20annote.parent%20%26%26%20Polymer.Annotations.findAnnotatedNode(root%2C%20annote.parent)%3B%0Aif%20(parent)%20%7B%0Afor%20(var%20n%20%3D%20parent.firstChild%2C%20i%20%3D%200%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Aif%20(annote.index%20%3D%3D%3D%20i%2B%2B)%20%7B%0Areturn%20n%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Areturn%20root%3B%0A%7D%0A%7D%0A%7D%3B%0A(function%20()%20%7B%0Afunction%20resolveCss(cssText%2C%20ownerDocument)%20%7B%0Areturn%20cssText.replace(CSS_URL_RX%2C%20function%20(m%2C%20pre%2C%20url%2C%20post)%20%7B%0Areturn%20pre%20%2B%20'%5C''%20%2B%20resolve(url.replace(%2F%5B%22'%5D%2Fg%2C%20'')%2C%20ownerDocument)%20%2B%20'%5C''%20%2B%20post%3B%0A%7D)%3B%0A%7D%0Afunction%20resolveAttrs(element%2C%20ownerDocument)%20%7B%0Afor%20(var%20name%20in%20URL_ATTRS)%20%7B%0Avar%20a%24%20%3D%20URL_ATTRS%5Bname%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20a%24.length%2C%20a%2C%20at%2C%20v%3B%20i%20%3C%20l%20%26%26%20(a%20%3D%20a%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(name%20%3D%3D%3D%20'*'%20%7C%7C%20element.localName%20%3D%3D%3D%20name)%20%7B%0Aat%20%3D%20element.attributes%5Ba%5D%3B%0Av%20%3D%20at%20%26%26%20at.value%3B%0Aif%20(v%20%26%26%20v.search(BINDING_RX)%20%3C%200)%20%7B%0Aat.value%20%3D%20a%20%3D%3D%3D%20'style'%20%3F%20resolveCss(v%2C%20ownerDocument)%20%3A%20resolve(v%2C%20ownerDocument)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0Afunction%20resolve(url%2C%20ownerDocument)%20%7B%0Aif%20(url%20%26%26%20url%5B0%5D%20%3D%3D%3D%20'%23')%20%7B%0Areturn%20url%3B%0A%7D%0Avar%20resolver%20%3D%20getUrlResolver(ownerDocument)%3B%0Aresolver.href%20%3D%20url%3B%0Areturn%20resolver.href%20%7C%7C%20url%3B%0A%7D%0Avar%20tempDoc%3B%0Avar%20tempDocBase%3B%0Afunction%20resolveUrl(url%2C%20baseUri)%20%7B%0Aif%20(!tempDoc)%20%7B%0AtempDoc%20%3D%20document.implementation.createHTMLDocument('temp')%3B%0AtempDocBase%20%3D%20tempDoc.createElement('base')%3B%0AtempDoc.head.appendChild(tempDocBase)%3B%0A%7D%0AtempDocBase.href%20%3D%20baseUri%3B%0Areturn%20resolve(url%2C%20tempDoc)%3B%0A%7D%0Afunction%20getUrlResolver(ownerDocument)%20%7B%0Areturn%20ownerDocument.__urlResolver%20%7C%7C%20(ownerDocument.__urlResolver%20%3D%20ownerDocument.createElement('a'))%3B%0A%7D%0Avar%20CSS_URL_RX%20%3D%20%2F(url%5C()(%5B%5E)%5D*)(%5C))%2Fg%3B%0Avar%20URL_ATTRS%20%3D%20%7B%0A'*'%3A%20%5B%0A'href'%2C%0A'src'%2C%0A'style'%2C%0A'url'%0A%5D%2C%0Aform%3A%20%5B'action'%5D%0A%7D%3B%0Avar%20BINDING_RX%20%3D%20%2F%5C%7B%5C%7B%7C%5C%5B%5C%5B%2F%3B%0APolymer.ResolveUrl%20%3D%20%7B%0AresolveCss%3A%20resolveCss%2C%0AresolveAttrs%3A%20resolveAttrs%2C%0AresolveUrl%3A%20resolveUrl%0A%7D%3B%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A_prepAnnotations%3A%20function%20()%20%7B%0Aif%20(!this._template)%20%7B%0Athis._notes%20%3D%20%5B%5D%3B%0A%7D%20else%20%7B%0Avar%20self%20%3D%20this%3B%0APolymer.Annotations.prepElement%20%3D%20function%20(element)%20%7B%0Aself._prepElement(element)%3B%0A%7D%3B%0Aif%20(this._template._content%20%26%26%20this._template._content._notes)%20%7B%0Athis._notes%20%3D%20this._template._content._notes%3B%0A%7D%20else%20%7B%0Athis._notes%20%3D%20Polymer.Annotations.parseAnnotations(this._template)%3B%0Athis._processAnnotations(this._notes)%3B%0A%7D%0APolymer.Annotations.prepElement%20%3D%20null%3B%0A%7D%0A%7D%2C%0A_processAnnotations%3A%20function%20(notes)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20notes.length%3B%20i%2B%2B)%20%7B%0Avar%20note%20%3D%20notes%5Bi%5D%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20note.bindings.length%3B%20j%2B%2B)%20%7B%0Avar%20b%20%3D%20note.bindings%5Bj%5D%3B%0Afor%20(var%20k%20%3D%200%3B%20k%20%3C%20b.parts.length%3B%20k%2B%2B)%20%7B%0Avar%20p%20%3D%20b.parts%5Bk%5D%3B%0Aif%20(!p.literal)%20%7B%0Avar%20signature%20%3D%20this._parseMethod(p.value)%3B%0Aif%20(signature)%20%7B%0Ap.signature%20%3D%20signature%3B%0A%7D%20else%20%7B%0Ap.model%20%3D%20this._modelForPath(p.value)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Aif%20(note.templateContent)%20%7B%0Athis._processAnnotations(note.templateContent._notes)%3B%0Avar%20pp%20%3D%20note.templateContent._parentProps%20%3D%20this._discoverTemplateParentProps(note.templateContent._notes)%3B%0Avar%20bindings%20%3D%20%5B%5D%3B%0Afor%20(var%20prop%20in%20pp)%20%7B%0Abindings.push(%7B%0Aindex%3A%20note.index%2C%0Akind%3A%20'property'%2C%0Aname%3A%20'_parent_'%20%2B%20prop%2C%0Aparts%3A%20%5B%7B%0Amode%3A%20'%7B'%2C%0Amodel%3A%20prop%2C%0Avalue%3A%20prop%0A%7D%5D%0A%7D)%3B%0A%7D%0Anote.bindings%20%3D%20note.bindings.concat(bindings)%3B%0A%7D%0A%7D%0A%7D%2C%0A_discoverTemplateParentProps%3A%20function%20(notes)%20%7B%0Avar%20pp%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20notes.length%20%26%26%20(n%20%3D%20notes%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20b%24%20%3D%20n.bindings%2C%20b%3B%20j%20%3C%20b%24.length%20%26%26%20(b%20%3D%20b%24%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Afor%20(var%20k%20%3D%200%2C%20p%24%20%3D%20b.parts%2C%20p%3B%20k%20%3C%20p%24.length%20%26%26%20(p%20%3D%20p%24%5Bk%5D)%3B%20k%2B%2B)%20%7B%0Aif%20(p.signature)%20%7B%0Avar%20args%20%3D%20p.signature.args%3B%0Afor%20(var%20kk%20%3D%200%3B%20kk%20%3C%20args.length%3B%20kk%2B%2B)%20%7B%0Avar%20model%20%3D%20args%5Bkk%5D.model%3B%0Aif%20(model)%20%7B%0App%5Bmodel%5D%20%3D%20true%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Aif%20(p.model)%20%7B%0App%5Bp.model%5D%20%3D%20true%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Aif%20(n.templateContent)%20%7B%0Avar%20tpp%20%3D%20n.templateContent._parentProps%3B%0APolymer.Base.mixin(pp%2C%20tpp)%3B%0A%7D%0A%7D%0Areturn%20pp%3B%0A%7D%2C%0A_prepElement%3A%20function%20(element)%20%7B%0APolymer.ResolveUrl.resolveAttrs(element%2C%20this._template.ownerDocument)%3B%0A%7D%2C%0A_findAnnotatedNode%3A%20Polymer.Annotations.findAnnotatedNode%2C%0A_marshalAnnotationReferences%3A%20function%20()%20%7B%0Aif%20(this._template)%20%7B%0Athis._marshalIdNodes()%3B%0Athis._marshalAnnotatedNodes()%3B%0Athis._marshalAnnotatedListeners()%3B%0A%7D%0A%7D%2C%0A_configureAnnotationReferences%3A%20function%20()%20%7B%0Avar%20notes%20%3D%20this._notes%3B%0Avar%20nodes%20%3D%20this._nodes%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20notes.length%3B%20i%2B%2B)%20%7B%0Avar%20note%20%3D%20notes%5Bi%5D%3B%0Avar%20node%20%3D%20nodes%5Bi%5D%3B%0Athis._configureTemplateContent(note%2C%20node)%3B%0Athis._configureCompoundBindings(note%2C%20node)%3B%0A%7D%0A%7D%2C%0A_configureTemplateContent%3A%20function%20(note%2C%20node)%20%7B%0Aif%20(note.templateContent)%20%7B%0Anode._content%20%3D%20note.templateContent%3B%0A%7D%0A%7D%2C%0A_configureCompoundBindings%3A%20function%20(note%2C%20node)%20%7B%0Avar%20bindings%20%3D%20note.bindings%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20bindings.length%3B%20i%2B%2B)%20%7B%0Avar%20binding%20%3D%20bindings%5Bi%5D%3B%0Aif%20(binding.isCompound)%20%7B%0Avar%20storage%20%3D%20node.__compoundStorage__%20%7C%7C%20(node.__compoundStorage__%20%3D%20%7B%7D)%3B%0Avar%20parts%20%3D%20binding.parts%3B%0Avar%20literals%20%3D%20new%20Array(parts.length)%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20parts.length%3B%20j%2B%2B)%20%7B%0Aliterals%5Bj%5D%20%3D%20parts%5Bj%5D.literal%3B%0A%7D%0Avar%20name%20%3D%20binding.name%3B%0Astorage%5Bname%5D%20%3D%20literals%3B%0Aif%20(binding.literal%20%26%26%20binding.kind%20%3D%3D%20'property')%20%7B%0Aif%20(node._configValue)%20%7B%0Anode._configValue(name%2C%20binding.literal)%3B%0A%7D%20else%20%7B%0Anode%5Bname%5D%20%3D%20binding.literal%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_marshalIdNodes%3A%20function%20()%20%7B%0Athis.%24%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20this._notes.length%2C%20a%3B%20i%20%3C%20l%20%26%26%20(a%20%3D%20this._notes%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(a.id)%20%7B%0Athis.%24%5Ba.id%5D%20%3D%20this._findAnnotatedNode(this.root%2C%20a)%3B%0A%7D%0A%7D%0A%7D%2C%0A_marshalAnnotatedNodes%3A%20function%20()%20%7B%0Aif%20(this._notes%20%26%26%20this._notes.length)%20%7B%0Avar%20r%20%3D%20new%20Array(this._notes.length)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._notes.length%3B%20i%2B%2B)%20%7B%0Ar%5Bi%5D%20%3D%20this._findAnnotatedNode(this.root%2C%20this._notes%5Bi%5D)%3B%0A%7D%0Athis._nodes%20%3D%20r%3B%0A%7D%0A%7D%2C%0A_marshalAnnotatedListeners%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20this._notes.length%2C%20a%3B%20i%20%3C%20l%20%26%26%20(a%20%3D%20this._notes%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(a.events%20%26%26%20a.events.length)%20%7B%0Avar%20node%20%3D%20this._findAnnotatedNode(this.root%2C%20a)%3B%0Afor%20(var%20j%20%3D%200%2C%20e%24%20%3D%20a.events%2C%20e%3B%20j%20%3C%20e%24.length%20%26%26%20(e%20%3D%20e%24%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Athis.listen(node%2C%20e.name%2C%20e.value)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0Alisteners%3A%20%7B%7D%2C%0A_listenListeners%3A%20function%20(listeners)%20%7B%0Avar%20node%2C%20name%2C%20eventName%3B%0Afor%20(eventName%20in%20listeners)%20%7B%0Aif%20(eventName.indexOf('.')%20%3C%200)%20%7B%0Anode%20%3D%20this%3B%0Aname%20%3D%20eventName%3B%0A%7D%20else%20%7B%0Aname%20%3D%20eventName.split('.')%3B%0Anode%20%3D%20this.%24%5Bname%5B0%5D%5D%3B%0Aname%20%3D%20name%5B1%5D%3B%0A%7D%0Athis.listen(node%2C%20name%2C%20listeners%5BeventName%5D)%3B%0A%7D%0A%7D%2C%0Alisten%3A%20function%20(node%2C%20eventName%2C%20methodName)%20%7B%0Avar%20handler%20%3D%20this._recallEventHandler(this%2C%20eventName%2C%20node%2C%20methodName)%3B%0Aif%20(!handler)%20%7B%0Ahandler%20%3D%20this._createEventHandler(node%2C%20eventName%2C%20methodName)%3B%0A%7D%0Aif%20(handler._listening)%20%7B%0Areturn%3B%0A%7D%0Athis._listen(node%2C%20eventName%2C%20handler)%3B%0Ahandler._listening%20%3D%20true%3B%0A%7D%2C%0A_boundListenerKey%3A%20function%20(eventName%2C%20methodName)%20%7B%0Areturn%20eventName%20%2B%20'%3A'%20%2B%20methodName%3B%0A%7D%2C%0A_recordEventHandler%3A%20function%20(host%2C%20eventName%2C%20target%2C%20methodName%2C%20handler)%20%7B%0Avar%20hbl%20%3D%20host.__boundListeners%3B%0Aif%20(!hbl)%20%7B%0Ahbl%20%3D%20host.__boundListeners%20%3D%20new%20WeakMap()%3B%0A%7D%0Avar%20bl%20%3D%20hbl.get(target)%3B%0Aif%20(!bl)%20%7B%0Abl%20%3D%20%7B%7D%3B%0Ahbl.set(target%2C%20bl)%3B%0A%7D%0Avar%20key%20%3D%20this._boundListenerKey(eventName%2C%20methodName)%3B%0Abl%5Bkey%5D%20%3D%20handler%3B%0A%7D%2C%0A_recallEventHandler%3A%20function%20(host%2C%20eventName%2C%20target%2C%20methodName)%20%7B%0Avar%20hbl%20%3D%20host.__boundListeners%3B%0Aif%20(!hbl)%20%7B%0Areturn%3B%0A%7D%0Avar%20bl%20%3D%20hbl.get(target)%3B%0Aif%20(!bl)%20%7B%0Areturn%3B%0A%7D%0Avar%20key%20%3D%20this._boundListenerKey(eventName%2C%20methodName)%3B%0Areturn%20bl%5Bkey%5D%3B%0A%7D%2C%0A_createEventHandler%3A%20function%20(node%2C%20eventName%2C%20methodName)%20%7B%0Avar%20host%20%3D%20this%3B%0Avar%20handler%20%3D%20function%20(e)%20%7B%0Aif%20(host%5BmethodName%5D)%20%7B%0Ahost%5BmethodName%5D(e%2C%20e.detail)%3B%0A%7D%20else%20%7B%0Ahost._warn(host._logf('_createEventHandler'%2C%20'listener%20method%20%60'%20%2B%20methodName%20%2B%20'%60%20not%20defined'))%3B%0A%7D%0A%7D%3B%0Ahandler._listening%20%3D%20false%3B%0Athis._recordEventHandler(host%2C%20eventName%2C%20node%2C%20methodName%2C%20handler)%3B%0Areturn%20handler%3B%0A%7D%2C%0Aunlisten%3A%20function%20(node%2C%20eventName%2C%20methodName)%20%7B%0Avar%20handler%20%3D%20this._recallEventHandler(this%2C%20eventName%2C%20node%2C%20methodName)%3B%0Aif%20(handler)%20%7B%0Athis._unlisten(node%2C%20eventName%2C%20handler)%3B%0Ahandler._listening%20%3D%20false%3B%0A%7D%0A%7D%2C%0A_listen%3A%20function%20(node%2C%20eventName%2C%20handler)%20%7B%0Anode.addEventListener(eventName%2C%20handler)%3B%0A%7D%2C%0A_unlisten%3A%20function%20(node%2C%20eventName%2C%20handler)%20%7B%0Anode.removeEventListener(eventName%2C%20handler)%3B%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20wrap%20%3D%20Polymer.DomApi.wrap%3B%0Avar%20HAS_NATIVE_TA%20%3D%20typeof%20document.head.style.touchAction%20%3D%3D%3D%20'string'%3B%0Avar%20GESTURE_KEY%20%3D%20'__polymerGestures'%3B%0Avar%20HANDLED_OBJ%20%3D%20'__polymerGesturesHandled'%3B%0Avar%20TOUCH_ACTION%20%3D%20'__polymerGesturesTouchAction'%3B%0Avar%20TAP_DISTANCE%20%3D%2025%3B%0Avar%20TRACK_DISTANCE%20%3D%205%3B%0Avar%20TRACK_LENGTH%20%3D%202%3B%0Avar%20MOUSE_TIMEOUT%20%3D%202500%3B%0Avar%20MOUSE_EVENTS%20%3D%20%5B%0A'mousedown'%2C%0A'mousemove'%2C%0A'mouseup'%2C%0A'click'%0A%5D%3B%0Avar%20MOUSE_WHICH_TO_BUTTONS%20%3D%20%5B%0A0%2C%0A1%2C%0A4%2C%0A2%0A%5D%3B%0Avar%20MOUSE_HAS_BUTTONS%20%3D%20function%20()%20%7B%0Atry%20%7B%0Areturn%20new%20MouseEvent('test'%2C%20%7B%20buttons%3A%201%20%7D).buttons%20%3D%3D%3D%201%3B%0A%7D%20catch%20(e)%20%7B%0Areturn%20false%3B%0A%7D%0A%7D()%3B%0Avar%20IS_TOUCH_ONLY%20%3D%20navigator.userAgent.match(%2FiP(%3F%3A%5Boa%5Dd%7Chone)%7CAndroid%2F)%3B%0Avar%20mouseCanceller%20%3D%20function%20(mouseEvent)%20%7B%0AmouseEvent%5BHANDLED_OBJ%5D%20%3D%20%7B%20skip%3A%20true%20%7D%3B%0Aif%20(mouseEvent.type%20%3D%3D%3D%20'click')%20%7B%0Avar%20path%20%3D%20Polymer.dom(mouseEvent).path%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20path.length%3B%20i%2B%2B)%20%7B%0Aif%20(path%5Bi%5D%20%3D%3D%3D%20POINTERSTATE.mouse.target)%20%7B%0Areturn%3B%0A%7D%0A%7D%0AmouseEvent.preventDefault()%3B%0AmouseEvent.stopPropagation()%3B%0A%7D%0A%7D%3B%0Afunction%20setupTeardownMouseCanceller(setup)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20en%3B%20i%20%3C%20MOUSE_EVENTS.length%3B%20i%2B%2B)%20%7B%0Aen%20%3D%20MOUSE_EVENTS%5Bi%5D%3B%0Aif%20(setup)%20%7B%0Adocument.addEventListener(en%2C%20mouseCanceller%2C%20true)%3B%0A%7D%20else%20%7B%0Adocument.removeEventListener(en%2C%20mouseCanceller%2C%20true)%3B%0A%7D%0A%7D%0A%7D%0Afunction%20ignoreMouse()%20%7B%0Aif%20(IS_TOUCH_ONLY)%20%7B%0Areturn%3B%0A%7D%0Aif%20(!POINTERSTATE.mouse.mouseIgnoreJob)%20%7B%0AsetupTeardownMouseCanceller(true)%3B%0A%7D%0Avar%20unset%20%3D%20function%20()%20%7B%0AsetupTeardownMouseCanceller()%3B%0APOINTERSTATE.mouse.target%20%3D%20null%3B%0APOINTERSTATE.mouse.mouseIgnoreJob%20%3D%20null%3B%0A%7D%3B%0APOINTERSTATE.mouse.mouseIgnoreJob%20%3D%20Polymer.Debounce(POINTERSTATE.mouse.mouseIgnoreJob%2C%20unset%2C%20MOUSE_TIMEOUT)%3B%0A%7D%0Afunction%20hasLeftMouseButton(ev)%20%7B%0Avar%20type%20%3D%20ev.type%3B%0Aif%20(MOUSE_EVENTS.indexOf(type)%20%3D%3D%3D%20-1)%20%7B%0Areturn%20false%3B%0A%7D%0Aif%20(type%20%3D%3D%3D%20'mousemove')%20%7B%0Avar%20buttons%20%3D%20ev.buttons%20%3D%3D%3D%20undefined%20%3F%201%20%3A%20ev.buttons%3B%0Aif%20(ev%20instanceof%20window.MouseEvent%20%26%26%20!MOUSE_HAS_BUTTONS)%20%7B%0Abuttons%20%3D%20MOUSE_WHICH_TO_BUTTONS%5Bev.which%5D%20%7C%7C%200%3B%0A%7D%0Areturn%20Boolean(buttons%20%26%201)%3B%0A%7D%20else%20%7B%0Avar%20button%20%3D%20ev.button%20%3D%3D%3D%20undefined%20%3F%200%20%3A%20ev.button%3B%0Areturn%20button%20%3D%3D%3D%200%3B%0A%7D%0A%7D%0Afunction%20isSyntheticClick(ev)%20%7B%0Aif%20(ev.type%20%3D%3D%3D%20'click')%20%7B%0Aif%20(ev.detail%20%3D%3D%3D%200)%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20t%20%3D%20Gestures.findOriginalTarget(ev)%3B%0Avar%20bcr%20%3D%20t.getBoundingClientRect()%3B%0Avar%20x%20%3D%20ev.pageX%2C%20y%20%3D%20ev.pageY%3B%0Areturn%20!(x%20%3E%3D%20bcr.left%20%26%26%20x%20%3C%3D%20bcr.right%20%26%26%20(y%20%3E%3D%20bcr.top%20%26%26%20y%20%3C%3D%20bcr.bottom))%3B%0A%7D%0Areturn%20false%3B%0A%7D%0Avar%20POINTERSTATE%20%3D%20%7B%0Amouse%3A%20%7B%0Atarget%3A%20null%2C%0AmouseIgnoreJob%3A%20null%0A%7D%2C%0Atouch%3A%20%7B%0Ax%3A%200%2C%0Ay%3A%200%2C%0Aid%3A%20-1%2C%0AscrollDecided%3A%20false%0A%7D%0A%7D%3B%0Afunction%20firstTouchAction(ev)%20%7B%0Avar%20path%20%3D%20Polymer.dom(ev).path%3B%0Avar%20ta%20%3D%20'auto'%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20path.length%3B%20i%2B%2B)%20%7B%0An%20%3D%20path%5Bi%5D%3B%0Aif%20(n%5BTOUCH_ACTION%5D)%20%7B%0Ata%20%3D%20n%5BTOUCH_ACTION%5D%3B%0Abreak%3B%0A%7D%0A%7D%0Areturn%20ta%3B%0A%7D%0Afunction%20trackDocument(stateObj%2C%20movefn%2C%20upfn)%20%7B%0AstateObj.movefn%20%3D%20movefn%3B%0AstateObj.upfn%20%3D%20upfn%3B%0Adocument.addEventListener('mousemove'%2C%20movefn)%3B%0Adocument.addEventListener('mouseup'%2C%20upfn)%3B%0A%7D%0Afunction%20untrackDocument(stateObj)%20%7B%0Adocument.removeEventListener('mousemove'%2C%20stateObj.movefn)%3B%0Adocument.removeEventListener('mouseup'%2C%20stateObj.upfn)%3B%0AstateObj.movefn%20%3D%20null%3B%0AstateObj.upfn%20%3D%20null%3B%0A%7D%0Avar%20Gestures%20%3D%20%7B%0Agestures%3A%20%7B%7D%2C%0Arecognizers%3A%20%5B%5D%2C%0AdeepTargetFind%3A%20function%20(x%2C%20y)%20%7B%0Avar%20node%20%3D%20document.elementFromPoint(x%2C%20y)%3B%0Avar%20next%20%3D%20node%3B%0Awhile%20(next%20%26%26%20next.shadowRoot)%20%7B%0Anext%20%3D%20next.shadowRoot.elementFromPoint(x%2C%20y)%3B%0Aif%20(next)%20%7B%0Anode%20%3D%20next%3B%0A%7D%0A%7D%0Areturn%20node%3B%0A%7D%2C%0AfindOriginalTarget%3A%20function%20(ev)%20%7B%0Aif%20(ev.path)%20%7B%0Areturn%20ev.path%5B0%5D%3B%0A%7D%0Areturn%20ev.target%3B%0A%7D%2C%0AhandleNative%3A%20function%20(ev)%20%7B%0Avar%20handled%3B%0Avar%20type%20%3D%20ev.type%3B%0Avar%20node%20%3D%20wrap(ev.currentTarget)%3B%0Avar%20gobj%20%3D%20node%5BGESTURE_KEY%5D%3B%0Aif%20(!gobj)%20%7B%0Areturn%3B%0A%7D%0Avar%20gs%20%3D%20gobj%5Btype%5D%3B%0Aif%20(!gs)%20%7B%0Areturn%3B%0A%7D%0Aif%20(!ev%5BHANDLED_OBJ%5D)%20%7B%0Aev%5BHANDLED_OBJ%5D%20%3D%20%7B%7D%3B%0Aif%20(type.slice(0%2C%205)%20%3D%3D%3D%20'touch')%20%7B%0Avar%20t%20%3D%20ev.changedTouches%5B0%5D%3B%0Aif%20(type%20%3D%3D%3D%20'touchstart')%20%7B%0Aif%20(ev.touches.length%20%3D%3D%3D%201)%20%7B%0APOINTERSTATE.touch.id%20%3D%20t.identifier%3B%0A%7D%0A%7D%0Aif%20(POINTERSTATE.touch.id%20!%3D%3D%20t.identifier)%20%7B%0Areturn%3B%0A%7D%0Aif%20(!HAS_NATIVE_TA)%20%7B%0Aif%20(type%20%3D%3D%3D%20'touchstart'%20%7C%7C%20type%20%3D%3D%3D%20'touchmove')%20%7B%0AGestures.handleTouchAction(ev)%3B%0A%7D%0A%7D%0Aif%20(type%20%3D%3D%3D%20'touchend'%20%26%26%20!ev.__polymerSimulatedTouch)%20%7B%0APOINTERSTATE.mouse.target%20%3D%20Polymer.dom(ev).rootTarget%3B%0AignoreMouse(true)%3B%0A%7D%0A%7D%0A%7D%0Ahandled%20%3D%20ev%5BHANDLED_OBJ%5D%3B%0Aif%20(handled.skip)%20%7B%0Areturn%3B%0A%7D%0Avar%20recognizers%20%3D%20Gestures.recognizers%3B%0Afor%20(var%20i%20%3D%200%2C%20r%3B%20i%20%3C%20recognizers.length%3B%20i%2B%2B)%20%7B%0Ar%20%3D%20recognizers%5Bi%5D%3B%0Aif%20(gs%5Br.name%5D%20%26%26%20!handled%5Br.name%5D)%20%7B%0Aif%20(r.flow%20%26%26%20r.flow.start.indexOf(ev.type)%20%3E%20-1%20%26%26%20r.reset)%20%7B%0Ar.reset()%3B%0A%7D%0A%7D%0A%7D%0Afor%20(i%20%3D%200%2C%20r%3B%20i%20%3C%20recognizers.length%3B%20i%2B%2B)%20%7B%0Ar%20%3D%20recognizers%5Bi%5D%3B%0Aif%20(gs%5Br.name%5D%20%26%26%20!handled%5Br.name%5D)%20%7B%0Ahandled%5Br.name%5D%20%3D%20true%3B%0Ar%5Btype%5D(ev)%3B%0A%7D%0A%7D%0A%7D%2C%0AhandleTouchAction%3A%20function%20(ev)%20%7B%0Avar%20t%20%3D%20ev.changedTouches%5B0%5D%3B%0Avar%20type%20%3D%20ev.type%3B%0Aif%20(type%20%3D%3D%3D%20'touchstart')%20%7B%0APOINTERSTATE.touch.x%20%3D%20t.clientX%3B%0APOINTERSTATE.touch.y%20%3D%20t.clientY%3B%0APOINTERSTATE.touch.scrollDecided%20%3D%20false%3B%0A%7D%20else%20if%20(type%20%3D%3D%3D%20'touchmove')%20%7B%0Aif%20(POINTERSTATE.touch.scrollDecided)%20%7B%0Areturn%3B%0A%7D%0APOINTERSTATE.touch.scrollDecided%20%3D%20true%3B%0Avar%20ta%20%3D%20firstTouchAction(ev)%3B%0Avar%20prevent%20%3D%20false%3B%0Avar%20dx%20%3D%20Math.abs(POINTERSTATE.touch.x%20-%20t.clientX)%3B%0Avar%20dy%20%3D%20Math.abs(POINTERSTATE.touch.y%20-%20t.clientY)%3B%0Aif%20(!ev.cancelable)%20%7B%0A%7D%20else%20if%20(ta%20%3D%3D%3D%20'none')%20%7B%0Aprevent%20%3D%20true%3B%0A%7D%20else%20if%20(ta%20%3D%3D%3D%20'pan-x')%20%7B%0Aprevent%20%3D%20dy%20%3E%20dx%3B%0A%7D%20else%20if%20(ta%20%3D%3D%3D%20'pan-y')%20%7B%0Aprevent%20%3D%20dx%20%3E%20dy%3B%0A%7D%0Aif%20(prevent)%20%7B%0Aev.preventDefault()%3B%0A%7D%20else%20%7B%0AGestures.prevent('track')%3B%0A%7D%0A%7D%0A%7D%2C%0Aadd%3A%20function%20(node%2C%20evType%2C%20handler)%20%7B%0Anode%20%3D%20wrap(node)%3B%0Avar%20recognizer%20%3D%20this.gestures%5BevType%5D%3B%0Avar%20deps%20%3D%20recognizer.deps%3B%0Avar%20name%20%3D%20recognizer.name%3B%0Avar%20gobj%20%3D%20node%5BGESTURE_KEY%5D%3B%0Aif%20(!gobj)%20%7B%0Anode%5BGESTURE_KEY%5D%20%3D%20gobj%20%3D%20%7B%7D%3B%0A%7D%0Afor%20(var%20i%20%3D%200%2C%20dep%2C%20gd%3B%20i%20%3C%20deps.length%3B%20i%2B%2B)%20%7B%0Adep%20%3D%20deps%5Bi%5D%3B%0Aif%20(IS_TOUCH_ONLY%20%26%26%20MOUSE_EVENTS.indexOf(dep)%20%3E%20-1)%20%7B%0Acontinue%3B%0A%7D%0Agd%20%3D%20gobj%5Bdep%5D%3B%0Aif%20(!gd)%20%7B%0Agobj%5Bdep%5D%20%3D%20gd%20%3D%20%7B%20_count%3A%200%20%7D%3B%0A%7D%0Aif%20(gd._count%20%3D%3D%3D%200)%20%7B%0Anode.addEventListener(dep%2C%20this.handleNative)%3B%0A%7D%0Agd%5Bname%5D%20%3D%20(gd%5Bname%5D%20%7C%7C%200)%20%2B%201%3B%0Agd._count%20%3D%20(gd._count%20%7C%7C%200)%20%2B%201%3B%0A%7D%0Anode.addEventListener(evType%2C%20handler)%3B%0Aif%20(recognizer.touchAction)%20%7B%0Athis.setTouchAction(node%2C%20recognizer.touchAction)%3B%0A%7D%0A%7D%2C%0Aremove%3A%20function%20(node%2C%20evType%2C%20handler)%20%7B%0Anode%20%3D%20wrap(node)%3B%0Avar%20recognizer%20%3D%20this.gestures%5BevType%5D%3B%0Avar%20deps%20%3D%20recognizer.deps%3B%0Avar%20name%20%3D%20recognizer.name%3B%0Avar%20gobj%20%3D%20node%5BGESTURE_KEY%5D%3B%0Aif%20(gobj)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20dep%2C%20gd%3B%20i%20%3C%20deps.length%3B%20i%2B%2B)%20%7B%0Adep%20%3D%20deps%5Bi%5D%3B%0Agd%20%3D%20gobj%5Bdep%5D%3B%0Aif%20(gd%20%26%26%20gd%5Bname%5D)%20%7B%0Agd%5Bname%5D%20%3D%20(gd%5Bname%5D%20%7C%7C%201)%20-%201%3B%0Agd._count%20%3D%20(gd._count%20%7C%7C%201)%20-%201%3B%0Aif%20(gd._count%20%3D%3D%3D%200)%20%7B%0Anode.removeEventListener(dep%2C%20this.handleNative)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Anode.removeEventListener(evType%2C%20handler)%3B%0A%7D%2C%0Aregister%3A%20function%20(recog)%20%7B%0Athis.recognizers.push(recog)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20recog.emits.length%3B%20i%2B%2B)%20%7B%0Athis.gestures%5Brecog.emits%5Bi%5D%5D%20%3D%20recog%3B%0A%7D%0A%7D%2C%0AfindRecognizerByEvent%3A%20function%20(evName)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20r%3B%20i%20%3C%20this.recognizers.length%3B%20i%2B%2B)%20%7B%0Ar%20%3D%20this.recognizers%5Bi%5D%3B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20r.emits.length%3B%20j%2B%2B)%20%7B%0An%20%3D%20r.emits%5Bj%5D%3B%0Aif%20(n%20%3D%3D%3D%20evName)%20%7B%0Areturn%20r%3B%0A%7D%0A%7D%0A%7D%0Areturn%20null%3B%0A%7D%2C%0AsetTouchAction%3A%20function%20(node%2C%20value)%20%7B%0Aif%20(HAS_NATIVE_TA)%20%7B%0Anode.style.touchAction%20%3D%20value%3B%0A%7D%0Anode%5BTOUCH_ACTION%5D%20%3D%20value%3B%0A%7D%2C%0Afire%3A%20function%20(target%2C%20type%2C%20detail)%20%7B%0Avar%20ev%20%3D%20Polymer.Base.fire(type%2C%20detail%2C%20%7B%0Anode%3A%20target%2C%0Abubbles%3A%20true%2C%0Acancelable%3A%20true%0A%7D)%3B%0Aif%20(ev.defaultPrevented)%20%7B%0Avar%20se%20%3D%20detail.sourceEvent%3B%0Aif%20(se%20%26%26%20se.preventDefault)%20%7B%0Ase.preventDefault()%3B%0A%7D%0A%7D%0A%7D%2C%0Aprevent%3A%20function%20(evName)%20%7B%0Avar%20recognizer%20%3D%20this.findRecognizerByEvent(evName)%3B%0Aif%20(recognizer.info)%20%7B%0Arecognizer.info.prevent%20%3D%20true%3B%0A%7D%0A%7D%0A%7D%3B%0AGestures.register(%7B%0Aname%3A%20'downup'%2C%0Adeps%3A%20%5B%0A'mousedown'%2C%0A'touchstart'%2C%0A'touchend'%0A%5D%2C%0Aflow%3A%20%7B%0Astart%3A%20%5B%0A'mousedown'%2C%0A'touchstart'%0A%5D%2C%0Aend%3A%20%5B%0A'mouseup'%2C%0A'touchend'%0A%5D%0A%7D%2C%0Aemits%3A%20%5B%0A'down'%2C%0A'up'%0A%5D%2C%0Ainfo%3A%20%7B%0Amovefn%3A%20null%2C%0Aupfn%3A%20null%0A%7D%2C%0Areset%3A%20function%20()%20%7B%0AuntrackDocument(this.info)%3B%0A%7D%2C%0Amousedown%3A%20function%20(e)%20%7B%0Aif%20(!hasLeftMouseButton(e))%20%7B%0Areturn%3B%0A%7D%0Avar%20t%20%3D%20Gestures.findOriginalTarget(e)%3B%0Avar%20self%20%3D%20this%3B%0Avar%20movefn%20%3D%20function%20movefn(e)%20%7B%0Aif%20(!hasLeftMouseButton(e))%20%7B%0Aself.fire('up'%2C%20t%2C%20e)%3B%0AuntrackDocument(self.info)%3B%0A%7D%0A%7D%3B%0Avar%20upfn%20%3D%20function%20upfn(e)%20%7B%0Aif%20(hasLeftMouseButton(e))%20%7B%0Aself.fire('up'%2C%20t%2C%20e)%3B%0A%7D%0AuntrackDocument(self.info)%3B%0A%7D%3B%0AtrackDocument(this.info%2C%20movefn%2C%20upfn)%3B%0Athis.fire('down'%2C%20t%2C%20e)%3B%0A%7D%2C%0Atouchstart%3A%20function%20(e)%20%7B%0Athis.fire('down'%2C%20Gestures.findOriginalTarget(e)%2C%20e.changedTouches%5B0%5D)%3B%0A%7D%2C%0Atouchend%3A%20function%20(e)%20%7B%0Athis.fire('up'%2C%20Gestures.findOriginalTarget(e)%2C%20e.changedTouches%5B0%5D)%3B%0A%7D%2C%0Afire%3A%20function%20(type%2C%20target%2C%20event)%20%7B%0AGestures.fire(target%2C%20type%2C%20%7B%0Ax%3A%20event.clientX%2C%0Ay%3A%20event.clientY%2C%0AsourceEvent%3A%20event%2C%0Aprevent%3A%20function%20(e)%20%7B%0Areturn%20Gestures.prevent(e)%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D)%3B%0AGestures.register(%7B%0Aname%3A%20'track'%2C%0AtouchAction%3A%20'none'%2C%0Adeps%3A%20%5B%0A'mousedown'%2C%0A'touchstart'%2C%0A'touchmove'%2C%0A'touchend'%0A%5D%2C%0Aflow%3A%20%7B%0Astart%3A%20%5B%0A'mousedown'%2C%0A'touchstart'%0A%5D%2C%0Aend%3A%20%5B%0A'mouseup'%2C%0A'touchend'%0A%5D%0A%7D%2C%0Aemits%3A%20%5B'track'%5D%2C%0Ainfo%3A%20%7B%0Ax%3A%200%2C%0Ay%3A%200%2C%0Astate%3A%20'start'%2C%0Astarted%3A%20false%2C%0Amoves%3A%20%5B%5D%2C%0AaddMove%3A%20function%20(move)%20%7B%0Aif%20(this.moves.length%20%3E%20TRACK_LENGTH)%20%7B%0Athis.moves.shift()%3B%0A%7D%0Athis.moves.push(move)%3B%0A%7D%2C%0Amovefn%3A%20null%2C%0Aupfn%3A%20null%2C%0Aprevent%3A%20false%0A%7D%2C%0Areset%3A%20function%20()%20%7B%0Athis.info.state%20%3D%20'start'%3B%0Athis.info.started%20%3D%20false%3B%0Athis.info.moves%20%3D%20%5B%5D%3B%0Athis.info.x%20%3D%200%3B%0Athis.info.y%20%3D%200%3B%0Athis.info.prevent%20%3D%20false%3B%0AuntrackDocument(this.info)%3B%0A%7D%2C%0AhasMovedEnough%3A%20function%20(x%2C%20y)%20%7B%0Aif%20(this.info.prevent)%20%7B%0Areturn%20false%3B%0A%7D%0Aif%20(this.info.started)%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20dx%20%3D%20Math.abs(this.info.x%20-%20x)%3B%0Avar%20dy%20%3D%20Math.abs(this.info.y%20-%20y)%3B%0Areturn%20dx%20%3E%3D%20TRACK_DISTANCE%20%7C%7C%20dy%20%3E%3D%20TRACK_DISTANCE%3B%0A%7D%2C%0Amousedown%3A%20function%20(e)%20%7B%0Aif%20(!hasLeftMouseButton(e))%20%7B%0Areturn%3B%0A%7D%0Avar%20t%20%3D%20Gestures.findOriginalTarget(e)%3B%0Avar%20self%20%3D%20this%3B%0Avar%20movefn%20%3D%20function%20movefn(e)%20%7B%0Avar%20x%20%3D%20e.clientX%2C%20y%20%3D%20e.clientY%3B%0Aif%20(self.hasMovedEnough(x%2C%20y))%20%7B%0Aself.info.state%20%3D%20self.info.started%20%3F%20e.type%20%3D%3D%3D%20'mouseup'%20%3F%20'end'%20%3A%20'track'%20%3A%20'start'%3B%0Aif%20(self.info.state%20%3D%3D%3D%20'start')%20%7B%0AGestures.prevent('tap')%3B%0A%7D%0Aself.info.addMove(%7B%0Ax%3A%20x%2C%0Ay%3A%20y%0A%7D)%3B%0Aif%20(!hasLeftMouseButton(e))%20%7B%0Aself.info.state%20%3D%20'end'%3B%0AuntrackDocument(self.info)%3B%0A%7D%0Aself.fire(t%2C%20e)%3B%0Aself.info.started%20%3D%20true%3B%0A%7D%0A%7D%3B%0Avar%20upfn%20%3D%20function%20upfn(e)%20%7B%0Aif%20(self.info.started)%20%7B%0Amovefn(e)%3B%0A%7D%0AuntrackDocument(self.info)%3B%0A%7D%3B%0AtrackDocument(this.info%2C%20movefn%2C%20upfn)%3B%0Athis.info.x%20%3D%20e.clientX%3B%0Athis.info.y%20%3D%20e.clientY%3B%0A%7D%2C%0Atouchstart%3A%20function%20(e)%20%7B%0Avar%20ct%20%3D%20e.changedTouches%5B0%5D%3B%0Athis.info.x%20%3D%20ct.clientX%3B%0Athis.info.y%20%3D%20ct.clientY%3B%0A%7D%2C%0Atouchmove%3A%20function%20(e)%20%7B%0Avar%20t%20%3D%20Gestures.findOriginalTarget(e)%3B%0Avar%20ct%20%3D%20e.changedTouches%5B0%5D%3B%0Avar%20x%20%3D%20ct.clientX%2C%20y%20%3D%20ct.clientY%3B%0Aif%20(this.hasMovedEnough(x%2C%20y))%20%7B%0Aif%20(this.info.state%20%3D%3D%3D%20'start')%20%7B%0AGestures.prevent('tap')%3B%0A%7D%0Athis.info.addMove(%7B%0Ax%3A%20x%2C%0Ay%3A%20y%0A%7D)%3B%0Athis.fire(t%2C%20ct)%3B%0Athis.info.state%20%3D%20'track'%3B%0Athis.info.started%20%3D%20true%3B%0A%7D%0A%7D%2C%0Atouchend%3A%20function%20(e)%20%7B%0Avar%20t%20%3D%20Gestures.findOriginalTarget(e)%3B%0Avar%20ct%20%3D%20e.changedTouches%5B0%5D%3B%0Aif%20(this.info.started)%20%7B%0Athis.info.state%20%3D%20'end'%3B%0Athis.info.addMove(%7B%0Ax%3A%20ct.clientX%2C%0Ay%3A%20ct.clientY%0A%7D)%3B%0Athis.fire(t%2C%20ct)%3B%0A%7D%0A%7D%2C%0Afire%3A%20function%20(target%2C%20touch)%20%7B%0Avar%20secondlast%20%3D%20this.info.moves%5Bthis.info.moves.length%20-%202%5D%3B%0Avar%20lastmove%20%3D%20this.info.moves%5Bthis.info.moves.length%20-%201%5D%3B%0Avar%20dx%20%3D%20lastmove.x%20-%20this.info.x%3B%0Avar%20dy%20%3D%20lastmove.y%20-%20this.info.y%3B%0Avar%20ddx%2C%20ddy%20%3D%200%3B%0Aif%20(secondlast)%20%7B%0Addx%20%3D%20lastmove.x%20-%20secondlast.x%3B%0Addy%20%3D%20lastmove.y%20-%20secondlast.y%3B%0A%7D%0Areturn%20Gestures.fire(target%2C%20'track'%2C%20%7B%0Astate%3A%20this.info.state%2C%0Ax%3A%20touch.clientX%2C%0Ay%3A%20touch.clientY%2C%0Adx%3A%20dx%2C%0Ady%3A%20dy%2C%0Addx%3A%20ddx%2C%0Addy%3A%20ddy%2C%0AsourceEvent%3A%20touch%2C%0Ahover%3A%20function%20()%20%7B%0Areturn%20Gestures.deepTargetFind(touch.clientX%2C%20touch.clientY)%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D)%3B%0AGestures.register(%7B%0Aname%3A%20'tap'%2C%0Adeps%3A%20%5B%0A'mousedown'%2C%0A'click'%2C%0A'touchstart'%2C%0A'touchend'%0A%5D%2C%0Aflow%3A%20%7B%0Astart%3A%20%5B%0A'mousedown'%2C%0A'touchstart'%0A%5D%2C%0Aend%3A%20%5B%0A'click'%2C%0A'touchend'%0A%5D%0A%7D%2C%0Aemits%3A%20%5B'tap'%5D%2C%0Ainfo%3A%20%7B%0Ax%3A%20NaN%2C%0Ay%3A%20NaN%2C%0Aprevent%3A%20false%0A%7D%2C%0Areset%3A%20function%20()%20%7B%0Athis.info.x%20%3D%20NaN%3B%0Athis.info.y%20%3D%20NaN%3B%0Athis.info.prevent%20%3D%20false%3B%0A%7D%2C%0Asave%3A%20function%20(e)%20%7B%0Athis.info.x%20%3D%20e.clientX%3B%0Athis.info.y%20%3D%20e.clientY%3B%0A%7D%2C%0Amousedown%3A%20function%20(e)%20%7B%0Aif%20(hasLeftMouseButton(e))%20%7B%0Athis.save(e)%3B%0A%7D%0A%7D%2C%0Aclick%3A%20function%20(e)%20%7B%0Aif%20(hasLeftMouseButton(e))%20%7B%0Athis.forward(e)%3B%0A%7D%0A%7D%2C%0Atouchstart%3A%20function%20(e)%20%7B%0Athis.save(e.changedTouches%5B0%5D)%3B%0A%7D%2C%0Atouchend%3A%20function%20(e)%20%7B%0Athis.forward(e.changedTouches%5B0%5D)%3B%0A%7D%2C%0Aforward%3A%20function%20(e)%20%7B%0Avar%20dx%20%3D%20Math.abs(e.clientX%20-%20this.info.x)%3B%0Avar%20dy%20%3D%20Math.abs(e.clientY%20-%20this.info.y)%3B%0Avar%20t%20%3D%20Gestures.findOriginalTarget(e)%3B%0Aif%20(isNaN(dx)%20%7C%7C%20isNaN(dy)%20%7C%7C%20dx%20%3C%3D%20TAP_DISTANCE%20%26%26%20dy%20%3C%3D%20TAP_DISTANCE%20%7C%7C%20isSyntheticClick(e))%20%7B%0Aif%20(!this.info.prevent)%20%7B%0AGestures.fire(t%2C%20'tap'%2C%20%7B%0Ax%3A%20e.clientX%2C%0Ay%3A%20e.clientY%2C%0AsourceEvent%3A%20e%0A%7D)%3B%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0Avar%20DIRECTION_MAP%20%3D%20%7B%0Ax%3A%20'pan-x'%2C%0Ay%3A%20'pan-y'%2C%0Anone%3A%20'none'%2C%0Aall%3A%20'auto'%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_setupGestures%3A%20function%20()%20%7B%0Athis.__polymerGestures%20%3D%20null%3B%0A%7D%2C%0A_listen%3A%20function%20(node%2C%20eventName%2C%20handler)%20%7B%0Aif%20(Gestures.gestures%5BeventName%5D)%20%7B%0AGestures.add(node%2C%20eventName%2C%20handler)%3B%0A%7D%20else%20%7B%0Anode.addEventListener(eventName%2C%20handler)%3B%0A%7D%0A%7D%2C%0A_unlisten%3A%20function%20(node%2C%20eventName%2C%20handler)%20%7B%0Aif%20(Gestures.gestures%5BeventName%5D)%20%7B%0AGestures.remove(node%2C%20eventName%2C%20handler)%3B%0A%7D%20else%20%7B%0Anode.removeEventListener(eventName%2C%20handler)%3B%0A%7D%0A%7D%2C%0AsetScrollDirection%3A%20function%20(direction%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0AGestures.setTouchAction(node%2C%20DIRECTION_MAP%5Bdirection%5D%20%7C%7C%20'auto')%3B%0A%7D%0A%7D)%3B%0APolymer.Gestures%20%3D%20Gestures%3B%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A%24%24%3A%20function%20(slctr)%20%7B%0Areturn%20Polymer.dom(this.root).querySelector(slctr)%3B%0A%7D%2C%0AtoggleClass%3A%20function%20(name%2C%20bool%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(arguments.length%20%3D%3D%201)%20%7B%0Abool%20%3D%20!node.classList.contains(name)%3B%0A%7D%0Aif%20(bool)%20%7B%0APolymer.dom(node).classList.add(name)%3B%0A%7D%20else%20%7B%0APolymer.dom(node).classList.remove(name)%3B%0A%7D%0A%7D%2C%0AtoggleAttribute%3A%20function%20(name%2C%20bool%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(arguments.length%20%3D%3D%201)%20%7B%0Abool%20%3D%20!node.hasAttribute(name)%3B%0A%7D%0Aif%20(bool)%20%7B%0APolymer.dom(node).setAttribute(name%2C%20'')%3B%0A%7D%20else%20%7B%0APolymer.dom(node).removeAttribute(name)%3B%0A%7D%0A%7D%2C%0AclassFollows%3A%20function%20(name%2C%20toElement%2C%20fromElement)%20%7B%0Aif%20(fromElement)%20%7B%0APolymer.dom(fromElement).classList.remove(name)%3B%0A%7D%0Aif%20(toElement)%20%7B%0APolymer.dom(toElement).classList.add(name)%3B%0A%7D%0A%7D%2C%0AattributeFollows%3A%20function%20(name%2C%20toElement%2C%20fromElement)%20%7B%0Aif%20(fromElement)%20%7B%0APolymer.dom(fromElement).removeAttribute(name)%3B%0A%7D%0Aif%20(toElement)%20%7B%0APolymer.dom(toElement).setAttribute(name%2C%20'')%3B%0A%7D%0A%7D%2C%0AgetEffectiveChildNodes%3A%20function%20()%20%7B%0Areturn%20Polymer.dom(this).getEffectiveChildNodes()%3B%0A%7D%2C%0AgetEffectiveChildren%3A%20function%20()%20%7B%0Avar%20list%20%3D%20Polymer.dom(this).getEffectiveChildNodes()%3B%0Areturn%20list.filter(function%20(n)%20%7B%0Areturn%20n.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%3B%0A%7D)%3B%0A%7D%2C%0AgetEffectiveTextContent%3A%20function%20()%20%7B%0Avar%20cn%20%3D%20this.getEffectiveChildNodes()%3B%0Avar%20tc%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20c%20%3D%20cn%5Bi%5D%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Atc.push(Polymer.dom(c).textContent)%3B%0A%7D%0A%7D%0Areturn%20tc.join('')%3B%0A%7D%2C%0AqueryEffectiveChildren%3A%20function%20(slctr)%20%7B%0Avar%20e%24%20%3D%20Polymer.dom(this).queryDistributedElements(slctr)%3B%0Areturn%20e%24%20%26%26%20e%24%5B0%5D%3B%0A%7D%2C%0AqueryAllEffectiveChildren%3A%20function%20(slctr)%20%7B%0Areturn%20Polymer.dom(this).queryDistributedElements(slctr)%3B%0A%7D%2C%0AgetContentChildNodes%3A%20function%20(slctr)%20%7B%0Avar%20content%20%3D%20Polymer.dom(this.root).querySelector(slctr%20%7C%7C%20'content')%3B%0Areturn%20content%20%3F%20Polymer.dom(content).getDistributedNodes()%20%3A%20%5B%5D%3B%0A%7D%2C%0AgetContentChildren%3A%20function%20(slctr)%20%7B%0Areturn%20this.getContentChildNodes(slctr).filter(function%20(n)%20%7B%0Areturn%20n.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%3B%0A%7D)%3B%0A%7D%2C%0Afire%3A%20function%20(type%2C%20detail%2C%20options)%20%7B%0Aoptions%20%3D%20options%20%7C%7C%20Polymer.nob%3B%0Avar%20node%20%3D%20options.node%20%7C%7C%20this%3B%0Adetail%20%3D%20detail%20%3D%3D%3D%20null%20%7C%7C%20detail%20%3D%3D%3D%20undefined%20%3F%20%7B%7D%20%3A%20detail%3B%0Avar%20bubbles%20%3D%20options.bubbles%20%3D%3D%3D%20undefined%20%3F%20true%20%3A%20options.bubbles%3B%0Avar%20cancelable%20%3D%20Boolean(options.cancelable)%3B%0Avar%20useCache%20%3D%20options._useCache%3B%0Avar%20event%20%3D%20this._getEvent(type%2C%20bubbles%2C%20cancelable%2C%20useCache)%3B%0Aevent.detail%20%3D%20detail%3B%0Aif%20(useCache)%20%7B%0Athis.__eventCache%5Btype%5D%20%3D%20null%3B%0A%7D%0Anode.dispatchEvent(event)%3B%0Aif%20(useCache)%20%7B%0Athis.__eventCache%5Btype%5D%20%3D%20event%3B%0A%7D%0Areturn%20event%3B%0A%7D%2C%0A__eventCache%3A%20%7B%7D%2C%0A_getEvent%3A%20function%20(type%2C%20bubbles%2C%20cancelable%2C%20useCache)%20%7B%0Avar%20event%20%3D%20useCache%20%26%26%20this.__eventCache%5Btype%5D%3B%0Aif%20(!event%20%7C%7C%20(event.bubbles%20!%3D%20bubbles%20%7C%7C%20event.cancelable%20!%3D%20cancelable))%20%7B%0Aevent%20%3D%20new%20Event(type%2C%20%7B%0Abubbles%3A%20Boolean(bubbles)%2C%0Acancelable%3A%20cancelable%0A%7D)%3B%0A%7D%0Areturn%20event%3B%0A%7D%2C%0Aasync%3A%20function%20(callback%2C%20waitTime)%20%7B%0Avar%20self%20%3D%20this%3B%0Areturn%20Polymer.Async.run(function%20()%20%7B%0Acallback.call(self)%3B%0A%7D%2C%20waitTime)%3B%0A%7D%2C%0AcancelAsync%3A%20function%20(handle)%20%7B%0APolymer.Async.cancel(handle)%3B%0A%7D%2C%0AarrayDelete%3A%20function%20(path%2C%20item)%20%7B%0Avar%20index%3B%0Aif%20(Array.isArray(path))%20%7B%0Aindex%20%3D%20path.indexOf(item)%3B%0Aif%20(index%20%3E%3D%200)%20%7B%0Areturn%20path.splice(index%2C%201)%3B%0A%7D%0A%7D%20else%20%7B%0Avar%20arr%20%3D%20this._get(path)%3B%0Aindex%20%3D%20arr.indexOf(item)%3B%0Aif%20(index%20%3E%3D%200)%20%7B%0Areturn%20this.splice(path%2C%20index%2C%201)%3B%0A%7D%0A%7D%0A%7D%2C%0Atransform%3A%20function%20(transform%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Anode.style.webkitTransform%20%3D%20transform%3B%0Anode.style.transform%20%3D%20transform%3B%0A%7D%2C%0Atranslate3d%3A%20function%20(x%2C%20y%2C%20z%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Athis.transform('translate3d('%20%2B%20x%20%2B%20'%2C'%20%2B%20y%20%2B%20'%2C'%20%2B%20z%20%2B%20')'%2C%20node)%3B%0A%7D%2C%0AimportHref%3A%20function%20(href%2C%20onload%2C%20onerror%2C%20optAsync)%20%7B%0Avar%20l%20%3D%20document.createElement('link')%3B%0Al.rel%20%3D%20'import'%3B%0Al.href%20%3D%20href%3B%0AoptAsync%20%3D%20Boolean(optAsync)%3B%0Aif%20(optAsync)%20%7B%0Al.setAttribute('async'%2C%20'')%3B%0A%7D%0Avar%20self%20%3D%20this%3B%0Aif%20(onload)%20%7B%0Al.onload%20%3D%20function%20(e)%20%7B%0Areturn%20onload.call(self%2C%20e)%3B%0A%7D%3B%0A%7D%0Aif%20(onerror)%20%7B%0Al.onerror%20%3D%20function%20(e)%20%7B%0Areturn%20onerror.call(self%2C%20e)%3B%0A%7D%3B%0A%7D%0Adocument.head.appendChild(l)%3B%0Areturn%20l%3B%0A%7D%2C%0Acreate%3A%20function%20(tag%2C%20props)%20%7B%0Avar%20elt%20%3D%20document.createElement(tag)%3B%0Aif%20(props)%20%7B%0Afor%20(var%20n%20in%20props)%20%7B%0Aelt%5Bn%5D%20%3D%20props%5Bn%5D%3B%0A%7D%0A%7D%0Areturn%20elt%3B%0A%7D%2C%0AisLightDescendant%3A%20function%20(node)%20%7B%0Areturn%20this%20!%3D%3D%20node%20%26%26%20this.contains(node)%20%26%26%20Polymer.dom(this).getOwnerRoot()%20%3D%3D%3D%20Polymer.dom(node).getOwnerRoot()%3B%0A%7D%2C%0AisLocalDescendant%3A%20function%20(node)%20%7B%0Areturn%20this.root%20%3D%3D%3D%20Polymer.dom(node).getOwnerRoot()%3B%0A%7D%0A%7D)%3B%0APolymer.Bind%20%3D%20%7B%0A_dataEventCache%3A%20%7B%7D%2C%0AprepareModel%3A%20function%20(model)%20%7B%0APolymer.Base.mixin(model%2C%20this._modelApi)%3B%0A%7D%2C%0A_modelApi%3A%20%7B%0A_notifyChange%3A%20function%20(source%2C%20event%2C%20value)%20%7B%0Avalue%20%3D%20value%20%3D%3D%3D%20undefined%20%3F%20this%5Bsource%5D%20%3A%20value%3B%0Aevent%20%3D%20event%20%7C%7C%20Polymer.CaseMap.camelToDashCase(source)%20%2B%20'-changed'%3B%0Athis.fire(event%2C%20%7B%20value%3A%20value%20%7D%2C%20%7B%0Abubbles%3A%20false%2C%0Acancelable%3A%20false%2C%0A_useCache%3A%20true%0A%7D)%3B%0A%7D%2C%0A_propertySetter%3A%20function%20(property%2C%20value%2C%20effects%2C%20fromAbove)%20%7B%0Avar%20old%20%3D%20this.__data__%5Bproperty%5D%3B%0Aif%20(old%20!%3D%3D%20value%20%26%26%20(old%20%3D%3D%3D%20old%20%7C%7C%20value%20%3D%3D%3D%20value))%20%7B%0Athis.__data__%5Bproperty%5D%20%3D%20value%3B%0Aif%20(typeof%20value%20%3D%3D%20'object')%20%7B%0Athis._clearPath(property)%3B%0A%7D%0Aif%20(this._propertyChanged)%20%7B%0Athis._propertyChanged(property%2C%20value%2C%20old)%3B%0A%7D%0Aif%20(effects)%20%7B%0Athis._effectEffects(property%2C%20value%2C%20effects%2C%20old%2C%20fromAbove)%3B%0A%7D%0A%7D%0Areturn%20old%3B%0A%7D%2C%0A__setProperty%3A%20function%20(property%2C%20value%2C%20quiet%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Avar%20effects%20%3D%20node._propertyEffects%20%26%26%20node._propertyEffects%5Bproperty%5D%3B%0Aif%20(effects)%20%7B%0Anode._propertySetter(property%2C%20value%2C%20effects%2C%20quiet)%3B%0A%7D%20else%20%7B%0Anode%5Bproperty%5D%20%3D%20value%3B%0A%7D%0A%7D%2C%0A_effectEffects%3A%20function%20(property%2C%20value%2C%20effects%2C%20old%2C%20fromAbove)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20effects.length%2C%20fx%3B%20i%20%3C%20l%20%26%26%20(fx%20%3D%20effects%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afx.fn.call(this%2C%20property%2C%20value%2C%20fx.effect%2C%20old%2C%20fromAbove)%3B%0A%7D%0A%7D%2C%0A_clearPath%3A%20function%20(path)%20%7B%0Afor%20(var%20prop%20in%20this.__data__)%20%7B%0Aif%20(prop.indexOf(path%20%2B%20'.')%20%3D%3D%3D%200)%20%7B%0Athis.__data__%5Bprop%5D%20%3D%20undefined%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0AensurePropertyEffects%3A%20function%20(model%2C%20property)%20%7B%0Aif%20(!model._propertyEffects)%20%7B%0Amodel._propertyEffects%20%3D%20%7B%7D%3B%0A%7D%0Avar%20fx%20%3D%20model._propertyEffects%5Bproperty%5D%3B%0Aif%20(!fx)%20%7B%0Afx%20%3D%20model._propertyEffects%5Bproperty%5D%20%3D%20%5B%5D%3B%0A%7D%0Areturn%20fx%3B%0A%7D%2C%0AaddPropertyEffect%3A%20function%20(model%2C%20property%2C%20kind%2C%20effect)%20%7B%0Avar%20fx%20%3D%20this.ensurePropertyEffects(model%2C%20property)%3B%0Avar%20propEffect%20%3D%20%7B%0Akind%3A%20kind%2C%0Aeffect%3A%20effect%2C%0Afn%3A%20Polymer.Bind%5B'_'%20%2B%20kind%20%2B%20'Effect'%5D%0A%7D%3B%0Afx.push(propEffect)%3B%0Areturn%20propEffect%3B%0A%7D%2C%0AcreateBindings%3A%20function%20(model)%20%7B%0Avar%20fx%24%20%3D%20model._propertyEffects%3B%0Aif%20(fx%24)%20%7B%0Afor%20(var%20n%20in%20fx%24)%20%7B%0Avar%20fx%20%3D%20fx%24%5Bn%5D%3B%0Afx.sort(this._sortPropertyEffects)%3B%0Athis._createAccessors(model%2C%20n%2C%20fx)%3B%0A%7D%0A%7D%0A%7D%2C%0A_sortPropertyEffects%3A%20function%20()%20%7B%0Avar%20EFFECT_ORDER%20%3D%20%7B%0A'compute'%3A%200%2C%0A'annotation'%3A%201%2C%0A'annotatedComputation'%3A%202%2C%0A'reflect'%3A%203%2C%0A'notify'%3A%204%2C%0A'observer'%3A%205%2C%0A'complexObserver'%3A%206%2C%0A'function'%3A%207%0A%7D%3B%0Areturn%20function%20(a%2C%20b)%20%7B%0Areturn%20EFFECT_ORDER%5Ba.kind%5D%20-%20EFFECT_ORDER%5Bb.kind%5D%3B%0A%7D%3B%0A%7D()%2C%0A_createAccessors%3A%20function%20(model%2C%20property%2C%20effects)%20%7B%0Avar%20defun%20%3D%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.__data__%5Bproperty%5D%3B%0A%7D%0A%7D%3B%0Avar%20setter%20%3D%20function%20(value)%20%7B%0Athis._propertySetter(property%2C%20value%2C%20effects)%3B%0A%7D%3B%0Avar%20info%20%3D%20model.getPropertyInfo%20%26%26%20model.getPropertyInfo(property)%3B%0Aif%20(info%20%26%26%20info.readOnly)%20%7B%0Aif%20(!info.computed)%20%7B%0Amodel%5B'_set'%20%2B%20this.upper(property)%5D%20%3D%20setter%3B%0A%7D%0A%7D%20else%20%7B%0Adefun.set%20%3D%20setter%3B%0A%7D%0AObject.defineProperty(model%2C%20property%2C%20defun)%3B%0A%7D%2C%0Aupper%3A%20function%20(name)%20%7B%0Areturn%20name%5B0%5D.toUpperCase()%20%2B%20name.substring(1)%3B%0A%7D%2C%0A_addAnnotatedListener%3A%20function%20(model%2C%20index%2C%20property%2C%20path%2C%20event%2C%20negated)%20%7B%0Aif%20(!model._bindListeners)%20%7B%0Amodel._bindListeners%20%3D%20%5B%5D%3B%0A%7D%0Avar%20fn%20%3D%20this._notedListenerFactory(property%2C%20path%2C%20this._isStructured(path)%2C%20negated)%3B%0Avar%20eventName%20%3D%20event%20%7C%7C%20Polymer.CaseMap.camelToDashCase(property)%20%2B%20'-changed'%3B%0Amodel._bindListeners.push(%7B%0Aindex%3A%20index%2C%0Aproperty%3A%20property%2C%0Apath%3A%20path%2C%0AchangedFn%3A%20fn%2C%0Aevent%3A%20eventName%0A%7D)%3B%0A%7D%2C%0A_isStructured%3A%20function%20(path)%20%7B%0Areturn%20path.indexOf('.')%20%3E%200%3B%0A%7D%2C%0A_isEventBogus%3A%20function%20(e%2C%20target)%20%7B%0Areturn%20e.path%20%26%26%20e.path%5B0%5D%20!%3D%3D%20target%3B%0A%7D%2C%0A_notedListenerFactory%3A%20function%20(property%2C%20path%2C%20isStructured%2C%20negated)%20%7B%0Areturn%20function%20(target%2C%20value%2C%20targetPath)%20%7B%0Aif%20(targetPath)%20%7B%0Athis._notifyPath(this._fixPath(path%2C%20property%2C%20targetPath)%2C%20value)%3B%0A%7D%20else%20%7B%0Avalue%20%3D%20target%5Bproperty%5D%3B%0Aif%20(negated)%20%7B%0Avalue%20%3D%20!value%3B%0A%7D%0Aif%20(!isStructured)%20%7B%0Athis%5Bpath%5D%20%3D%20value%3B%0A%7D%20else%20%7B%0Aif%20(this.__data__%5Bpath%5D%20!%3D%20value)%20%7B%0Athis.set(path%2C%20value)%3B%0A%7D%0A%7D%0A%7D%0A%7D%3B%0A%7D%2C%0AprepareInstance%3A%20function%20(inst)%20%7B%0Ainst.__data__%20%3D%20Object.create(null)%3B%0A%7D%2C%0AsetupBindListeners%3A%20function%20(inst)%20%7B%0Avar%20b%24%20%3D%20inst._bindListeners%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20b%24.length%2C%20info%3B%20i%20%3C%20l%20%26%26%20(info%20%3D%20b%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20node%20%3D%20inst._nodes%5Binfo.index%5D%3B%0Athis._addNotifyListener(node%2C%20inst%2C%20info.event%2C%20info.changedFn)%3B%0A%7D%0A%7D%2C%0A_addNotifyListener%3A%20function%20(element%2C%20context%2C%20event%2C%20changedFn)%20%7B%0Aelement.addEventListener(event%2C%20function%20(e)%20%7B%0Areturn%20context._notifyListener(changedFn%2C%20e)%3B%0A%7D)%3B%0A%7D%0A%7D%3B%0APolymer.Base.extend(Polymer.Bind%2C%20%7B%0A_shouldAddListener%3A%20function%20(effect)%20%7B%0Areturn%20effect.name%20%26%26%20effect.kind%20!%3D%20'attribute'%20%26%26%20effect.kind%20!%3D%20'text'%20%26%26%20!effect.isCompound%20%26%26%20effect.parts%5B0%5D.mode%20%3D%3D%3D%20'%7B'%3B%0A%7D%2C%0A_annotationEffect%3A%20function%20(source%2C%20value%2C%20effect)%20%7B%0Aif%20(source%20!%3D%20effect.value)%20%7B%0Avalue%20%3D%20this._get(effect.value)%3B%0Athis.__data__%5Beffect.value%5D%20%3D%20value%3B%0A%7D%0Avar%20calc%20%3D%20effect.negate%20%3F%20!value%20%3A%20value%3B%0Aif%20(!effect.customEvent%20%7C%7C%20this._nodes%5Beffect.index%5D%5Beffect.name%5D%20!%3D%3D%20calc)%20%7B%0Areturn%20this._applyEffectValue(effect%2C%20calc)%3B%0A%7D%0A%7D%2C%0A_reflectEffect%3A%20function%20(source%2C%20value%2C%20effect)%20%7B%0Athis.reflectPropertyToAttribute(source%2C%20effect.attribute%2C%20value)%3B%0A%7D%2C%0A_notifyEffect%3A%20function%20(source%2C%20value%2C%20effect%2C%20old%2C%20fromAbove)%20%7B%0Aif%20(!fromAbove)%20%7B%0Athis._notifyChange(source%2C%20effect.event%2C%20value)%3B%0A%7D%0A%7D%2C%0A_functionEffect%3A%20function%20(source%2C%20value%2C%20fn%2C%20old%2C%20fromAbove)%20%7B%0Afn.call(this%2C%20source%2C%20value%2C%20old%2C%20fromAbove)%3B%0A%7D%2C%0A_observerEffect%3A%20function%20(source%2C%20value%2C%20effect%2C%20old)%20%7B%0Avar%20fn%20%3D%20this%5Beffect.method%5D%3B%0Aif%20(fn)%20%7B%0Afn.call(this%2C%20value%2C%20old)%3B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_observerEffect'%2C%20'observer%20method%20%60'%20%2B%20effect.method%20%2B%20'%60%20not%20defined'))%3B%0A%7D%0A%7D%2C%0A_complexObserverEffect%3A%20function%20(source%2C%20value%2C%20effect)%20%7B%0Avar%20fn%20%3D%20this%5Beffect.method%5D%3B%0Aif%20(fn)%20%7B%0Avar%20args%20%3D%20Polymer.Bind._marshalArgs(this.__data__%2C%20effect%2C%20source%2C%20value)%3B%0Aif%20(args)%20%7B%0Afn.apply(this%2C%20args)%3B%0A%7D%0A%7D%20else%20if%20(effect.dynamicFn)%20%7B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_complexObserverEffect'%2C%20'observer%20method%20%60'%20%2B%20effect.method%20%2B%20'%60%20not%20defined'))%3B%0A%7D%0A%7D%2C%0A_computeEffect%3A%20function%20(source%2C%20value%2C%20effect)%20%7B%0Avar%20fn%20%3D%20this%5Beffect.method%5D%3B%0Aif%20(fn)%20%7B%0Avar%20args%20%3D%20Polymer.Bind._marshalArgs(this.__data__%2C%20effect%2C%20source%2C%20value)%3B%0Aif%20(args)%20%7B%0Avar%20computedvalue%20%3D%20fn.apply(this%2C%20args)%3B%0Athis.__setProperty(effect.name%2C%20computedvalue)%3B%0A%7D%0A%7D%20else%20if%20(effect.dynamicFn)%20%7B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_computeEffect'%2C%20'compute%20method%20%60'%20%2B%20effect.method%20%2B%20'%60%20not%20defined'))%3B%0A%7D%0A%7D%2C%0A_annotatedComputationEffect%3A%20function%20(source%2C%20value%2C%20effect)%20%7B%0Avar%20computedHost%20%3D%20this._rootDataHost%20%7C%7C%20this%3B%0Avar%20fn%20%3D%20computedHost%5Beffect.method%5D%3B%0Aif%20(fn)%20%7B%0Avar%20args%20%3D%20Polymer.Bind._marshalArgs(this.__data__%2C%20effect%2C%20source%2C%20value)%3B%0Aif%20(args)%20%7B%0Avar%20computedvalue%20%3D%20fn.apply(computedHost%2C%20args)%3B%0Aif%20(effect.negate)%20%7B%0Acomputedvalue%20%3D%20!computedvalue%3B%0A%7D%0Athis._applyEffectValue(effect%2C%20computedvalue)%3B%0A%7D%0A%7D%20else%20if%20(effect.dynamicFn)%20%7B%0A%7D%20else%20%7B%0AcomputedHost._warn(computedHost._logf('_annotatedComputationEffect'%2C%20'compute%20method%20%60'%20%2B%20effect.method%20%2B%20'%60%20not%20defined'))%3B%0A%7D%0A%7D%2C%0A_marshalArgs%3A%20function%20(model%2C%20effect%2C%20path%2C%20value)%20%7B%0Avar%20values%20%3D%20%5B%5D%3B%0Avar%20args%20%3D%20effect.args%3B%0Avar%20bailoutEarly%20%3D%20args.length%20%3E%201%20%7C%7C%20effect.dynamicFn%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20args.length%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Avar%20arg%20%3D%20args%5Bi%5D%3B%0Avar%20name%20%3D%20arg.name%3B%0Avar%20v%3B%0Aif%20(arg.literal)%20%7B%0Av%20%3D%20arg.value%3B%0A%7D%20else%20if%20(arg.structured)%20%7B%0Av%20%3D%20Polymer.Base._get(name%2C%20model)%3B%0A%7D%20else%20%7B%0Av%20%3D%20model%5Bname%5D%3B%0A%7D%0Aif%20(bailoutEarly%20%26%26%20v%20%3D%3D%3D%20undefined)%20%7B%0Areturn%3B%0A%7D%0Aif%20(arg.wildcard)%20%7B%0Avar%20baseChanged%20%3D%20name.indexOf(path%20%2B%20'.')%20%3D%3D%3D%200%3B%0Avar%20matches%20%3D%20effect.trigger.name.indexOf(name)%20%3D%3D%3D%200%20%26%26%20!baseChanged%3B%0Avalues%5Bi%5D%20%3D%20%7B%0Apath%3A%20matches%20%3F%20path%20%3A%20name%2C%0Avalue%3A%20matches%20%3F%20value%20%3A%20v%2C%0Abase%3A%20v%0A%7D%3B%0A%7D%20else%20%7B%0Avalues%5Bi%5D%20%3D%20v%3B%0A%7D%0A%7D%0Areturn%20values%3B%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0A_addPropertyEffect%3A%20function%20(property%2C%20kind%2C%20effect)%20%7B%0Avar%20prop%20%3D%20Polymer.Bind.addPropertyEffect(this%2C%20property%2C%20kind%2C%20effect)%3B%0Aprop.pathFn%20%3D%20this%5B'_'%20%2B%20prop.kind%20%2B%20'PathEffect'%5D%3B%0A%7D%2C%0A_prepEffects%3A%20function%20()%20%7B%0APolymer.Bind.prepareModel(this)%3B%0Athis._addAnnotationEffects(this._notes)%3B%0A%7D%2C%0A_prepBindings%3A%20function%20()%20%7B%0APolymer.Bind.createBindings(this)%3B%0A%7D%2C%0A_addPropertyEffects%3A%20function%20(properties)%20%7B%0Aif%20(properties)%20%7B%0Afor%20(var%20p%20in%20properties)%20%7B%0Avar%20prop%20%3D%20properties%5Bp%5D%3B%0Aif%20(prop.observer)%20%7B%0Athis._addObserverEffect(p%2C%20prop.observer)%3B%0A%7D%0Aif%20(prop.computed)%20%7B%0Aprop.readOnly%20%3D%20true%3B%0Athis._addComputedEffect(p%2C%20prop.computed)%3B%0A%7D%0Aif%20(prop.notify)%20%7B%0Athis._addPropertyEffect(p%2C%20'notify'%2C%20%7B%20event%3A%20Polymer.CaseMap.camelToDashCase(p)%20%2B%20'-changed'%20%7D)%3B%0A%7D%0Aif%20(prop.reflectToAttribute)%20%7B%0Athis._addPropertyEffect(p%2C%20'reflect'%2C%20%7B%20attribute%3A%20Polymer.CaseMap.camelToDashCase(p)%20%7D)%3B%0A%7D%0Aif%20(prop.readOnly)%20%7B%0APolymer.Bind.ensurePropertyEffects(this%2C%20p)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_addComputedEffect%3A%20function%20(name%2C%20expression)%20%7B%0Avar%20sig%20%3D%20this._parseMethod(expression)%3B%0Avar%20dynamicFn%20%3D%20sig.dynamicFn%3B%0Afor%20(var%20i%20%3D%200%2C%20arg%3B%20i%20%3C%20sig.args.length%20%26%26%20(arg%20%3D%20sig.args%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._addPropertyEffect(arg.model%2C%20'compute'%2C%20%7B%0Amethod%3A%20sig.method%2C%0Aargs%3A%20sig.args%2C%0Atrigger%3A%20arg%2C%0Aname%3A%20name%2C%0AdynamicFn%3A%20dynamicFn%0A%7D)%3B%0A%7D%0Aif%20(dynamicFn)%20%7B%0Athis._addPropertyEffect(sig.method%2C%20'compute'%2C%20%7B%0Amethod%3A%20sig.method%2C%0Aargs%3A%20sig.args%2C%0Atrigger%3A%20null%2C%0Aname%3A%20name%2C%0AdynamicFn%3A%20dynamicFn%0A%7D)%3B%0A%7D%0A%7D%2C%0A_addObserverEffect%3A%20function%20(property%2C%20observer)%20%7B%0Athis._addPropertyEffect(property%2C%20'observer'%2C%20%7B%0Amethod%3A%20observer%2C%0Aproperty%3A%20property%0A%7D)%3B%0A%7D%2C%0A_addComplexObserverEffects%3A%20function%20(observers)%20%7B%0Aif%20(observers)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20observers.length%20%26%26%20(o%20%3D%20observers%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._addComplexObserverEffect(o)%3B%0A%7D%0A%7D%0A%7D%2C%0A_addComplexObserverEffect%3A%20function%20(observer)%20%7B%0Avar%20sig%20%3D%20this._parseMethod(observer)%3B%0Aif%20(!sig)%20%7B%0Athrow%20new%20Error('Malformed%20observer%20expression%20%5C''%20%2B%20observer%20%2B%20'%5C'')%3B%0A%7D%0Avar%20dynamicFn%20%3D%20sig.dynamicFn%3B%0Afor%20(var%20i%20%3D%200%2C%20arg%3B%20i%20%3C%20sig.args.length%20%26%26%20(arg%20%3D%20sig.args%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._addPropertyEffect(arg.model%2C%20'complexObserver'%2C%20%7B%0Amethod%3A%20sig.method%2C%0Aargs%3A%20sig.args%2C%0Atrigger%3A%20arg%2C%0AdynamicFn%3A%20dynamicFn%0A%7D)%3B%0A%7D%0Aif%20(dynamicFn)%20%7B%0Athis._addPropertyEffect(sig.method%2C%20'complexObserver'%2C%20%7B%0Amethod%3A%20sig.method%2C%0Aargs%3A%20sig.args%2C%0Atrigger%3A%20null%2C%0AdynamicFn%3A%20dynamicFn%0A%7D)%3B%0A%7D%0A%7D%2C%0A_addAnnotationEffects%3A%20function%20(notes)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20note%3B%20i%20%3C%20notes.length%20%26%26%20(note%20%3D%20notes%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20b%24%20%3D%20note.bindings%3B%0Afor%20(var%20j%20%3D%200%2C%20binding%3B%20j%20%3C%20b%24.length%20%26%26%20(binding%20%3D%20b%24%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Athis._addAnnotationEffect(binding%2C%20i)%3B%0A%7D%0A%7D%0A%7D%2C%0A_addAnnotationEffect%3A%20function%20(note%2C%20index)%20%7B%0Aif%20(Polymer.Bind._shouldAddListener(note))%20%7B%0APolymer.Bind._addAnnotatedListener(this%2C%20index%2C%20note.name%2C%20note.parts%5B0%5D.value%2C%20note.parts%5B0%5D.event%2C%20note.parts%5B0%5D.negate)%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20note.parts.length%3B%20i%2B%2B)%20%7B%0Avar%20part%20%3D%20note.parts%5Bi%5D%3B%0Aif%20(part.signature)%20%7B%0Athis._addAnnotatedComputationEffect(note%2C%20part%2C%20index)%3B%0A%7D%20else%20if%20(!part.literal)%20%7B%0Athis._addPropertyEffect(part.model%2C%20'annotation'%2C%20%7B%0Akind%3A%20note.kind%2C%0Aindex%3A%20index%2C%0Aname%3A%20note.name%2C%0ApropertyName%3A%20note.propertyName%2C%0Avalue%3A%20part.value%2C%0AisCompound%3A%20note.isCompound%2C%0AcompoundIndex%3A%20part.compoundIndex%2C%0Aevent%3A%20part.event%2C%0AcustomEvent%3A%20part.customEvent%2C%0Anegate%3A%20part.negate%0A%7D)%3B%0A%7D%0A%7D%0A%7D%2C%0A_addAnnotatedComputationEffect%3A%20function%20(note%2C%20part%2C%20index)%20%7B%0Avar%20sig%20%3D%20part.signature%3B%0Aif%20(sig.static)%20%7B%0Athis.__addAnnotatedComputationEffect('__static__'%2C%20index%2C%20note%2C%20part%2C%20null)%3B%0A%7D%20else%20%7B%0Afor%20(var%20i%20%3D%200%2C%20arg%3B%20i%20%3C%20sig.args.length%20%26%26%20(arg%20%3D%20sig.args%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!arg.literal)%20%7B%0Athis.__addAnnotatedComputationEffect(arg.model%2C%20index%2C%20note%2C%20part%2C%20arg)%3B%0A%7D%0A%7D%0Aif%20(sig.dynamicFn)%20%7B%0Athis.__addAnnotatedComputationEffect(sig.method%2C%20index%2C%20note%2C%20part%2C%20null)%3B%0A%7D%0A%7D%0A%7D%2C%0A__addAnnotatedComputationEffect%3A%20function%20(property%2C%20index%2C%20note%2C%20part%2C%20trigger)%20%7B%0Athis._addPropertyEffect(property%2C%20'annotatedComputation'%2C%20%7B%0Aindex%3A%20index%2C%0AisCompound%3A%20note.isCompound%2C%0AcompoundIndex%3A%20part.compoundIndex%2C%0Akind%3A%20note.kind%2C%0Aname%3A%20note.name%2C%0Anegate%3A%20part.negate%2C%0Amethod%3A%20part.signature.method%2C%0Aargs%3A%20part.signature.args%2C%0Atrigger%3A%20trigger%2C%0AdynamicFn%3A%20part.signature.dynamicFn%0A%7D)%3B%0A%7D%2C%0A_parseMethod%3A%20function%20(expression)%20%7B%0Avar%20m%20%3D%20expression.match(%2F(%5B%5E%5Cs%5D%2B%3F)%5C((%5B%5Cs%5CS%5D*)%5C)%2F)%3B%0Aif%20(m)%20%7B%0Avar%20sig%20%3D%20%7B%0Amethod%3A%20m%5B1%5D%2C%0Astatic%3A%20true%0A%7D%3B%0Aif%20(this.getPropertyInfo(sig.method)%20!%3D%3D%20Polymer.nob)%20%7B%0Asig.static%20%3D%20false%3B%0Asig.dynamicFn%20%3D%20true%3B%0A%7D%0Aif%20(m%5B2%5D.trim())%20%7B%0Avar%20args%20%3D%20m%5B2%5D.replace(%2F%5C%5C%2C%2Fg%2C%20'%26comma%3B').split('%2C')%3B%0Areturn%20this._parseArgs(args%2C%20sig)%3B%0A%7D%20else%20%7B%0Asig.args%20%3D%20Polymer.nar%3B%0Areturn%20sig%3B%0A%7D%0A%7D%0A%7D%2C%0A_parseArgs%3A%20function%20(argList%2C%20sig)%20%7B%0Asig.args%20%3D%20argList.map(function%20(rawArg)%20%7B%0Avar%20arg%20%3D%20this._parseArg(rawArg)%3B%0Aif%20(!arg.literal)%20%7B%0Asig.static%20%3D%20false%3B%0A%7D%0Areturn%20arg%3B%0A%7D%2C%20this)%3B%0Areturn%20sig%3B%0A%7D%2C%0A_parseArg%3A%20function%20(rawArg)%20%7B%0Avar%20arg%20%3D%20rawArg.trim().replace(%2F%26comma%3B%2Fg%2C%20'%2C').replace(%2F%5C%5C(.)%2Fg%2C%20'%241')%3B%0Avar%20a%20%3D%20%7B%20name%3A%20arg%20%7D%3B%0Avar%20fc%20%3D%20arg%5B0%5D%3B%0Aif%20(fc%20%3D%3D%3D%20'-')%20%7B%0Afc%20%3D%20arg%5B1%5D%3B%0A%7D%0Aif%20(fc%20%3E%3D%20'0'%20%26%26%20fc%20%3C%3D%20'9')%20%7B%0Afc%20%3D%20'%23'%3B%0A%7D%0Aswitch%20(fc)%20%7B%0Acase%20'%5C''%3A%0Acase%20'%22'%3A%0Aa.value%20%3D%20arg.slice(1%2C%20-1)%3B%0Aa.literal%20%3D%20true%3B%0Abreak%3B%0Acase%20'%23'%3A%0Aa.value%20%3D%20Number(arg)%3B%0Aa.literal%20%3D%20true%3B%0Abreak%3B%0A%7D%0Aif%20(!a.literal)%20%7B%0Aa.model%20%3D%20this._modelForPath(arg)%3B%0Aa.structured%20%3D%20arg.indexOf('.')%20%3E%200%3B%0Aif%20(a.structured)%20%7B%0Aa.wildcard%20%3D%20arg.slice(-2)%20%3D%3D%20'.*'%3B%0Aif%20(a.wildcard)%20%7B%0Aa.name%20%3D%20arg.slice(0%2C%20-2)%3B%0A%7D%0A%7D%0A%7D%0Areturn%20a%3B%0A%7D%2C%0A_marshalInstanceEffects%3A%20function%20()%20%7B%0APolymer.Bind.prepareInstance(this)%3B%0Aif%20(this._bindListeners)%20%7B%0APolymer.Bind.setupBindListeners(this)%3B%0A%7D%0A%7D%2C%0A_applyEffectValue%3A%20function%20(info%2C%20value)%20%7B%0Avar%20node%20%3D%20this._nodes%5Binfo.index%5D%3B%0Avar%20property%20%3D%20info.name%3B%0Aif%20(info.isCompound)%20%7B%0Avar%20storage%20%3D%20node.__compoundStorage__%5Bproperty%5D%3B%0Astorage%5Binfo.compoundIndex%5D%20%3D%20value%3B%0Avalue%20%3D%20storage.join('')%3B%0A%7D%0Aif%20(info.kind%20%3D%3D%20'attribute')%20%7B%0Athis.serializeValueToAttribute(value%2C%20property%2C%20node)%3B%0A%7D%20else%20%7B%0Aif%20(property%20%3D%3D%3D%20'className')%20%7B%0Avalue%20%3D%20this._scopeElementClass(node%2C%20value)%3B%0A%7D%0Aif%20(property%20%3D%3D%3D%20'textContent'%20%7C%7C%20node.localName%20%3D%3D%20'input'%20%26%26%20property%20%3D%3D%20'value')%20%7B%0Avalue%20%3D%20value%20%3D%3D%20undefined%20%3F%20''%20%3A%20value%3B%0A%7D%0Avar%20pinfo%3B%0Aif%20(!node._propertyInfo%20%7C%7C%20!(pinfo%20%3D%20node._propertyInfo%5Bproperty%5D)%20%7C%7C%20!pinfo.readOnly)%20%7B%0Athis.__setProperty(property%2C%20value%2C%20false%2C%20node)%3B%0A%7D%0A%7D%0A%7D%2C%0A_executeStaticEffects%3A%20function%20()%20%7B%0Aif%20(this._propertyEffects%20%26%26%20this._propertyEffects.__static__)%20%7B%0Athis._effectEffects('__static__'%2C%20null%2C%20this._propertyEffects.__static__)%3B%0A%7D%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0Avar%20usePolyfillProto%20%3D%20Polymer.Settings.usePolyfillProto%3B%0APolymer.Base._addFeature(%7B%0A_setupConfigure%3A%20function%20(initialConfig)%20%7B%0Athis._config%20%3D%20%7B%7D%3B%0Athis._handlers%20%3D%20%5B%5D%3B%0Athis._aboveConfig%20%3D%20null%3B%0Aif%20(initialConfig)%20%7B%0Afor%20(var%20i%20in%20initialConfig)%20%7B%0Aif%20(initialConfig%5Bi%5D%20!%3D%3D%20undefined)%20%7B%0Athis._config%5Bi%5D%20%3D%20initialConfig%5Bi%5D%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_marshalAttributes%3A%20function%20()%20%7B%0Athis._takeAttributesToModel(this._config)%3B%0A%7D%2C%0A_attributeChangedImpl%3A%20function%20(name)%20%7B%0Avar%20model%20%3D%20this._clientsReadied%20%3F%20this%20%3A%20this._config%3B%0Athis._setAttributeToProperty(model%2C%20name)%3B%0A%7D%2C%0A_configValue%3A%20function%20(name%2C%20value)%20%7B%0Avar%20info%20%3D%20this._propertyInfo%5Bname%5D%3B%0Aif%20(!info%20%7C%7C%20!info.readOnly)%20%7B%0Athis._config%5Bname%5D%20%3D%20value%3B%0A%7D%0A%7D%2C%0A_beforeClientsReady%3A%20function%20()%20%7B%0Athis._configure()%3B%0A%7D%2C%0A_configure%3A%20function%20()%20%7B%0Athis._configureAnnotationReferences()%3B%0Athis._aboveConfig%20%3D%20this.mixin(%7B%7D%2C%20this._config)%3B%0Avar%20config%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._configureProperties(this.behaviors%5Bi%5D.properties%2C%20config)%3B%0A%7D%0Athis._configureProperties(this.properties%2C%20config)%3B%0Athis.mixin(config%2C%20this._aboveConfig)%3B%0Athis._config%20%3D%20config%3B%0Aif%20(this._clients%20%26%26%20this._clients.length)%20%7B%0Athis._distributeConfig(this._config)%3B%0A%7D%0A%7D%2C%0A_configureProperties%3A%20function%20(properties%2C%20config)%20%7B%0Afor%20(var%20i%20in%20properties)%20%7B%0Avar%20c%20%3D%20properties%5Bi%5D%3B%0Aif%20(!usePolyfillProto%20%26%26%20this.hasOwnProperty(i)%20%26%26%20this._propertyEffects%20%26%26%20this._propertyEffects%5Bi%5D)%20%7B%0Aconfig%5Bi%5D%20%3D%20this%5Bi%5D%3B%0Adelete%20this%5Bi%5D%3B%0A%7D%20else%20if%20(c.value%20!%3D%3D%20undefined)%20%7B%0Avar%20value%20%3D%20c.value%3B%0Aif%20(typeof%20value%20%3D%3D%20'function')%20%7B%0Avalue%20%3D%20value.call(this%2C%20this._config)%3B%0A%7D%0Aconfig%5Bi%5D%20%3D%20value%3B%0A%7D%0A%7D%0A%7D%2C%0A_distributeConfig%3A%20function%20(config)%20%7B%0Avar%20fx%24%20%3D%20this._propertyEffects%3B%0Aif%20(fx%24)%20%7B%0Afor%20(var%20p%20in%20config)%20%7B%0Avar%20fx%20%3D%20fx%24%5Bp%5D%3B%0Aif%20(fx)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20fx.length%2C%20x%3B%20i%20%3C%20l%20%26%26%20(x%20%3D%20fx%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(x.kind%20%3D%3D%3D%20'annotation'%20%26%26%20!x.isCompound)%20%7B%0Avar%20node%20%3D%20this._nodes%5Bx.effect.index%5D%3B%0Avar%20name%20%3D%20x.effect.propertyName%3B%0Avar%20isAttr%20%3D%20x.effect.kind%20%3D%3D%20'attribute'%3B%0Avar%20hasEffect%20%3D%20node._propertyEffects%20%26%26%20node._propertyEffects%5Bname%5D%3B%0Aif%20(node._configValue%20%26%26%20(hasEffect%20%7C%7C%20!isAttr))%20%7B%0Avar%20value%20%3D%20p%20%3D%3D%3D%20x.effect.value%20%3F%20config%5Bp%5D%20%3A%20this._get(x.effect.value%2C%20config)%3B%0Aif%20(isAttr)%20%7B%0Avalue%20%3D%20node.deserialize(this.serialize(value)%2C%20node._propertyInfo%5Bname%5D.type)%3B%0A%7D%0Anode._configValue(name%2C%20value)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_afterClientsReady%3A%20function%20()%20%7B%0Athis._executeStaticEffects()%3B%0Athis._applyConfig(this._config%2C%20this._aboveConfig)%3B%0Athis._flushHandlers()%3B%0A%7D%2C%0A_applyConfig%3A%20function%20(config%2C%20aboveConfig)%20%7B%0Afor%20(var%20n%20in%20config)%20%7B%0Aif%20(this%5Bn%5D%20%3D%3D%3D%20undefined)%20%7B%0Athis.__setProperty(n%2C%20config%5Bn%5D%2C%20n%20in%20aboveConfig)%3B%0A%7D%0A%7D%0A%7D%2C%0A_notifyListener%3A%20function%20(fn%2C%20e)%20%7B%0Aif%20(!Polymer.Bind._isEventBogus(e%2C%20e.target))%20%7B%0Avar%20value%2C%20path%3B%0Aif%20(e.detail)%20%7B%0Avalue%20%3D%20e.detail.value%3B%0Apath%20%3D%20e.detail.path%3B%0A%7D%0Aif%20(!this._clientsReadied)%20%7B%0Athis._queueHandler(%5B%0Afn%2C%0Ae.target%2C%0Avalue%2C%0Apath%0A%5D)%3B%0A%7D%20else%20%7B%0Areturn%20fn.call(this%2C%20e.target%2C%20value%2C%20path)%3B%0A%7D%0A%7D%0A%7D%2C%0A_queueHandler%3A%20function%20(args)%20%7B%0Athis._handlers.push(args)%3B%0A%7D%2C%0A_flushHandlers%3A%20function%20()%20%7B%0Avar%20h%24%20%3D%20this._handlers%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20h%24.length%2C%20h%3B%20i%20%3C%20l%20%26%26%20(h%20%3D%20h%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ah%5B0%5D.call(this%2C%20h%5B1%5D%2C%20h%5B2%5D%2C%20h%5B3%5D)%3B%0A%7D%0Athis._handlers%20%3D%20%5B%5D%3B%0A%7D%0A%7D)%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0APolymer.Base._addFeature(%7B%0AnotifyPath%3A%20function%20(path%2C%20value%2C%20fromAbove)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Athis._get(path%2C%20this%2C%20info)%3B%0Aif%20(info.path)%20%7B%0Athis._notifyPath(info.path%2C%20value%2C%20fromAbove)%3B%0A%7D%0A%7D%2C%0A_notifyPath%3A%20function%20(path%2C%20value%2C%20fromAbove)%20%7B%0Avar%20old%20%3D%20this._propertySetter(path%2C%20value)%3B%0Aif%20(old%20!%3D%3D%20value%20%26%26%20(old%20%3D%3D%3D%20old%20%7C%7C%20value%20%3D%3D%3D%20value))%20%7B%0Athis._pathEffector(path%2C%20value)%3B%0Aif%20(!fromAbove)%20%7B%0Athis._notifyPathUp(path%2C%20value)%3B%0A%7D%0Areturn%20true%3B%0A%7D%0A%7D%2C%0A_getPathParts%3A%20function%20(path)%20%7B%0Aif%20(Array.isArray(path))%20%7B%0Avar%20parts%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20path.length%3B%20i%2B%2B)%20%7B%0Avar%20args%20%3D%20path%5Bi%5D.toString().split('.')%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20args.length%3B%20j%2B%2B)%20%7B%0Aparts.push(args%5Bj%5D)%3B%0A%7D%0A%7D%0Areturn%20parts%3B%0A%7D%20else%20%7B%0Areturn%20path.toString().split('.')%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(path%2C%20value%2C%20root)%20%7B%0Avar%20prop%20%3D%20root%20%7C%7C%20this%3B%0Avar%20parts%20%3D%20this._getPathParts(path)%3B%0Avar%20array%3B%0Avar%20last%20%3D%20parts%5Bparts.length%20-%201%5D%3B%0Aif%20(parts.length%20%3E%201)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20parts.length%20-%201%3B%20i%2B%2B)%20%7B%0Avar%20part%20%3D%20parts%5Bi%5D%3B%0Aif%20(array%20%26%26%20part%5B0%5D%20%3D%3D%20'%23')%20%7B%0Aprop%20%3D%20Polymer.Collection.get(array).getItem(part)%3B%0A%7D%20else%20%7B%0Aprop%20%3D%20prop%5Bpart%5D%3B%0Aif%20(array%20%26%26%20parseInt(part%2C%2010)%20%3D%3D%20part)%20%7B%0Aparts%5Bi%5D%20%3D%20Polymer.Collection.get(array).getKey(prop)%3B%0A%7D%0A%7D%0Aif%20(!prop)%20%7B%0Areturn%3B%0A%7D%0Aarray%20%3D%20Array.isArray(prop)%20%3F%20prop%20%3A%20null%3B%0A%7D%0Aif%20(array)%20%7B%0Avar%20coll%20%3D%20Polymer.Collection.get(array)%3B%0Avar%20old%2C%20key%3B%0Aif%20(last%5B0%5D%20%3D%3D%20'%23')%20%7B%0Akey%20%3D%20last%3B%0Aold%20%3D%20coll.getItem(key)%3B%0Alast%20%3D%20array.indexOf(old)%3B%0Acoll.setItem(key%2C%20value)%3B%0A%7D%20else%20if%20(parseInt(last%2C%2010)%20%3D%3D%20last)%20%7B%0Aold%20%3D%20prop%5Blast%5D%3B%0Akey%20%3D%20coll.getKey(old)%3B%0Aparts%5Bi%5D%20%3D%20key%3B%0Acoll.setItem(key%2C%20value)%3B%0A%7D%0A%7D%0Aprop%5Blast%5D%20%3D%20value%3B%0Aif%20(!root)%20%7B%0Athis._notifyPath(parts.join('.')%2C%20value)%3B%0A%7D%0A%7D%20else%20%7B%0Aprop%5Bpath%5D%20%3D%20value%3B%0A%7D%0A%7D%2C%0Aget%3A%20function%20(path%2C%20root)%20%7B%0Areturn%20this._get(path%2C%20root)%3B%0A%7D%2C%0A_get%3A%20function%20(path%2C%20root%2C%20info)%20%7B%0Avar%20prop%20%3D%20root%20%7C%7C%20this%3B%0Avar%20parts%20%3D%20this._getPathParts(path)%3B%0Avar%20array%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20parts.length%3B%20i%2B%2B)%20%7B%0Aif%20(!prop)%20%7B%0Areturn%3B%0A%7D%0Avar%20part%20%3D%20parts%5Bi%5D%3B%0Aif%20(array%20%26%26%20part%5B0%5D%20%3D%3D%20'%23')%20%7B%0Aprop%20%3D%20Polymer.Collection.get(array).getItem(part)%3B%0A%7D%20else%20%7B%0Aprop%20%3D%20prop%5Bpart%5D%3B%0Aif%20(info%20%26%26%20array%20%26%26%20parseInt(part%2C%2010)%20%3D%3D%20part)%20%7B%0Aparts%5Bi%5D%20%3D%20Polymer.Collection.get(array).getKey(prop)%3B%0A%7D%0A%7D%0Aarray%20%3D%20Array.isArray(prop)%20%3F%20prop%20%3A%20null%3B%0A%7D%0Aif%20(info)%20%7B%0Ainfo.path%20%3D%20parts.join('.')%3B%0A%7D%0Areturn%20prop%3B%0A%7D%2C%0A_pathEffector%3A%20function%20(path%2C%20value)%20%7B%0Avar%20model%20%3D%20this._modelForPath(path)%3B%0Avar%20fx%24%20%3D%20this._propertyEffects%20%26%26%20this._propertyEffects%5Bmodel%5D%3B%0Aif%20(fx%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20fx%3B%20i%20%3C%20fx%24.length%20%26%26%20(fx%20%3D%20fx%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20fxFn%20%3D%20fx.pathFn%3B%0Aif%20(fxFn)%20%7B%0AfxFn.call(this%2C%20path%2C%20value%2C%20fx.effect)%3B%0A%7D%0A%7D%0A%7D%0Aif%20(this._boundPaths)%20%7B%0Athis._notifyBoundPaths(path%2C%20value)%3B%0A%7D%0A%7D%2C%0A_annotationPathEffect%3A%20function%20(path%2C%20value%2C%20effect)%20%7B%0Aif%20(effect.value%20%3D%3D%3D%20path%20%7C%7C%20effect.value.indexOf(path%20%2B%20'.')%20%3D%3D%3D%200)%20%7B%0APolymer.Bind._annotationEffect.call(this%2C%20path%2C%20value%2C%20effect)%3B%0A%7D%20else%20if%20(path.indexOf(effect.value%20%2B%20'.')%20%3D%3D%3D%200%20%26%26%20!effect.negate)%20%7B%0Avar%20node%20%3D%20this._nodes%5Beffect.index%5D%3B%0Aif%20(node%20%26%26%20node._notifyPath)%20%7B%0Avar%20p%20%3D%20this._fixPath(effect.name%2C%20effect.value%2C%20path)%3B%0Anode._notifyPath(p%2C%20value%2C%20true)%3B%0A%7D%0A%7D%0A%7D%2C%0A_complexObserverPathEffect%3A%20function%20(path%2C%20value%2C%20effect)%20%7B%0Aif%20(this._pathMatchesEffect(path%2C%20effect))%20%7B%0APolymer.Bind._complexObserverEffect.call(this%2C%20path%2C%20value%2C%20effect)%3B%0A%7D%0A%7D%2C%0A_computePathEffect%3A%20function%20(path%2C%20value%2C%20effect)%20%7B%0Aif%20(this._pathMatchesEffect(path%2C%20effect))%20%7B%0APolymer.Bind._computeEffect.call(this%2C%20path%2C%20value%2C%20effect)%3B%0A%7D%0A%7D%2C%0A_annotatedComputationPathEffect%3A%20function%20(path%2C%20value%2C%20effect)%20%7B%0Aif%20(this._pathMatchesEffect(path%2C%20effect))%20%7B%0APolymer.Bind._annotatedComputationEffect.call(this%2C%20path%2C%20value%2C%20effect)%3B%0A%7D%0A%7D%2C%0A_pathMatchesEffect%3A%20function%20(path%2C%20effect)%20%7B%0Avar%20effectArg%20%3D%20effect.trigger.name%3B%0Areturn%20effectArg%20%3D%3D%20path%20%7C%7C%20effectArg.indexOf(path%20%2B%20'.')%20%3D%3D%3D%200%20%7C%7C%20effect.trigger.wildcard%20%26%26%20path.indexOf(effectArg)%20%3D%3D%3D%200%3B%0A%7D%2C%0AlinkPaths%3A%20function%20(to%2C%20from)%20%7B%0Athis._boundPaths%20%3D%20this._boundPaths%20%7C%7C%20%7B%7D%3B%0Aif%20(from)%20%7B%0Athis._boundPaths%5Bto%5D%20%3D%20from%3B%0A%7D%20else%20%7B%0Athis.unlinkPaths(to)%3B%0A%7D%0A%7D%2C%0AunlinkPaths%3A%20function%20(path)%20%7B%0Aif%20(this._boundPaths)%20%7B%0Adelete%20this._boundPaths%5Bpath%5D%3B%0A%7D%0A%7D%2C%0A_notifyBoundPaths%3A%20function%20(path%2C%20value)%20%7B%0Afor%20(var%20a%20in%20this._boundPaths)%20%7B%0Avar%20b%20%3D%20this._boundPaths%5Ba%5D%3B%0Aif%20(path.indexOf(a%20%2B%20'.')%20%3D%3D%200)%20%7B%0Athis._notifyPath(this._fixPath(b%2C%20a%2C%20path)%2C%20value)%3B%0A%7D%20else%20if%20(path.indexOf(b%20%2B%20'.')%20%3D%3D%200)%20%7B%0Athis._notifyPath(this._fixPath(a%2C%20b%2C%20path)%2C%20value)%3B%0A%7D%0A%7D%0A%7D%2C%0A_fixPath%3A%20function%20(property%2C%20root%2C%20path)%20%7B%0Areturn%20property%20%2B%20path.slice(root.length)%3B%0A%7D%2C%0A_notifyPathUp%3A%20function%20(path%2C%20value)%20%7B%0Avar%20rootName%20%3D%20this._modelForPath(path)%3B%0Avar%20dashCaseName%20%3D%20Polymer.CaseMap.camelToDashCase(rootName)%3B%0Avar%20eventName%20%3D%20dashCaseName%20%2B%20this._EVENT_CHANGED%3B%0Athis.fire(eventName%2C%20%7B%0Apath%3A%20path%2C%0Avalue%3A%20value%0A%7D%2C%20%7B%0Abubbles%3A%20false%2C%0A_useCache%3A%20true%0A%7D)%3B%0A%7D%2C%0A_modelForPath%3A%20function%20(path)%20%7B%0Avar%20dot%20%3D%20path.indexOf('.')%3B%0Areturn%20dot%20%3C%200%20%3F%20path%20%3A%20path.slice(0%2C%20dot)%3B%0A%7D%2C%0A_EVENT_CHANGED%3A%20'-changed'%2C%0AnotifySplices%3A%20function%20(path%2C%20splices)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Athis._notifySplices(array%2C%20info.path%2C%20splices)%3B%0A%7D%2C%0A_notifySplices%3A%20function%20(array%2C%20path%2C%20splices)%20%7B%0Avar%20change%20%3D%20%7B%0AkeySplices%3A%20Polymer.Collection.applySplices(array%2C%20splices)%2C%0AindexSplices%3A%20splices%0A%7D%3B%0Aif%20(!array.hasOwnProperty('splices'))%20%7B%0AObject.defineProperty(array%2C%20'splices'%2C%20%7B%0Aconfigurable%3A%20true%2C%0Awritable%3A%20true%0A%7D)%3B%0A%7D%0Aarray.splices%20%3D%20change%3B%0Athis._notifyPath(path%20%2B%20'.splices'%2C%20change)%3B%0Athis._notifyPath(path%20%2B%20'.length'%2C%20array.length)%3B%0Achange.keySplices%20%3D%20null%3B%0Achange.indexSplices%20%3D%20null%3B%0A%7D%2C%0A_notifySplice%3A%20function%20(array%2C%20path%2C%20index%2C%20added%2C%20removed)%20%7B%0Athis._notifySplices(array%2C%20path%2C%20%5B%7B%0Aindex%3A%20index%2C%0AaddedCount%3A%20added%2C%0Aremoved%3A%20removed%2C%0Aobject%3A%20array%2C%0Atype%3A%20'splice'%0A%7D%5D)%3B%0A%7D%2C%0Apush%3A%20function%20(path)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Avar%20args%20%3D%20Array.prototype.slice.call(arguments%2C%201)%3B%0Avar%20len%20%3D%20array.length%3B%0Avar%20ret%20%3D%20array.push.apply(array%2C%20args)%3B%0Aif%20(args.length)%20%7B%0Athis._notifySplice(array%2C%20info.path%2C%20len%2C%20args.length%2C%20%5B%5D)%3B%0A%7D%0Areturn%20ret%3B%0A%7D%2C%0Apop%3A%20function%20(path)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Avar%20hadLength%20%3D%20Boolean(array.length)%3B%0Avar%20args%20%3D%20Array.prototype.slice.call(arguments%2C%201)%3B%0Avar%20ret%20%3D%20array.pop.apply(array%2C%20args)%3B%0Aif%20(hadLength)%20%7B%0Athis._notifySplice(array%2C%20info.path%2C%20array.length%2C%200%2C%20%5Bret%5D)%3B%0A%7D%0Areturn%20ret%3B%0A%7D%2C%0Asplice%3A%20function%20(path%2C%20start)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Aif%20(start%20%3C%200)%20%7B%0Astart%20%3D%20array.length%20-%20Math.floor(-start)%3B%0A%7D%20else%20%7B%0Astart%20%3D%20Math.floor(start)%3B%0A%7D%0Aif%20(!start)%20%7B%0Astart%20%3D%200%3B%0A%7D%0Avar%20args%20%3D%20Array.prototype.slice.call(arguments%2C%201)%3B%0Avar%20ret%20%3D%20array.splice.apply(array%2C%20args)%3B%0Avar%20addedCount%20%3D%20Math.max(args.length%20-%202%2C%200)%3B%0Aif%20(addedCount%20%7C%7C%20ret.length)%20%7B%0Athis._notifySplice(array%2C%20info.path%2C%20start%2C%20addedCount%2C%20ret)%3B%0A%7D%0Areturn%20ret%3B%0A%7D%2C%0Ashift%3A%20function%20(path)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Avar%20hadLength%20%3D%20Boolean(array.length)%3B%0Avar%20args%20%3D%20Array.prototype.slice.call(arguments%2C%201)%3B%0Avar%20ret%20%3D%20array.shift.apply(array%2C%20args)%3B%0Aif%20(hadLength)%20%7B%0Athis._notifySplice(array%2C%20info.path%2C%200%2C%200%2C%20%5Bret%5D)%3B%0A%7D%0Areturn%20ret%3B%0A%7D%2C%0Aunshift%3A%20function%20(path)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Avar%20args%20%3D%20Array.prototype.slice.call(arguments%2C%201)%3B%0Avar%20ret%20%3D%20array.unshift.apply(array%2C%20args)%3B%0Aif%20(args.length)%20%7B%0Athis._notifySplice(array%2C%20info.path%2C%200%2C%20args.length%2C%20%5B%5D)%3B%0A%7D%0Areturn%20ret%3B%0A%7D%2C%0AprepareModelNotifyPath%3A%20function%20(model)%20%7B%0Athis.mixin(model%2C%20%7B%0Afire%3A%20Polymer.Base.fire%2C%0A_getEvent%3A%20Polymer.Base._getEvent%2C%0A__eventCache%3A%20Polymer.Base.__eventCache%2C%0AnotifyPath%3A%20Polymer.Base.notifyPath%2C%0A_get%3A%20Polymer.Base._get%2C%0A_EVENT_CHANGED%3A%20Polymer.Base._EVENT_CHANGED%2C%0A_notifyPath%3A%20Polymer.Base._notifyPath%2C%0A_notifyPathUp%3A%20Polymer.Base._notifyPathUp%2C%0A_pathEffector%3A%20Polymer.Base._pathEffector%2C%0A_annotationPathEffect%3A%20Polymer.Base._annotationPathEffect%2C%0A_complexObserverPathEffect%3A%20Polymer.Base._complexObserverPathEffect%2C%0A_annotatedComputationPathEffect%3A%20Polymer.Base._annotatedComputationPathEffect%2C%0A_computePathEffect%3A%20Polymer.Base._computePathEffect%2C%0A_modelForPath%3A%20Polymer.Base._modelForPath%2C%0A_pathMatchesEffect%3A%20Polymer.Base._pathMatchesEffect%2C%0A_notifyBoundPaths%3A%20Polymer.Base._notifyBoundPaths%2C%0A_getPathParts%3A%20Polymer.Base._getPathParts%0A%7D)%3B%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0AresolveUrl%3A%20function%20(url)%20%7B%0Avar%20module%20%3D%20Polymer.DomModule.import(this.is)%3B%0Avar%20root%20%3D%20''%3B%0Aif%20(module)%20%7B%0Avar%20assetPath%20%3D%20module.getAttribute('assetpath')%20%7C%7C%20''%3B%0Aroot%20%3D%20Polymer.ResolveUrl.resolveUrl(assetPath%2C%20module.ownerDocument.baseURI)%3B%0A%7D%0Areturn%20Polymer.ResolveUrl.resolveUrl(url%2C%20root)%3B%0A%7D%0A%7D)%3B%0APolymer.CssParse%20%3D%20function%20()%20%7B%0Areturn%20%7B%0Aparse%3A%20function%20(text)%20%7B%0Atext%20%3D%20this._clean(text)%3B%0Areturn%20this._parseCss(this._lex(text)%2C%20text)%3B%0A%7D%2C%0A_clean%3A%20function%20(cssText)%20%7B%0Areturn%20cssText.replace(this._rx.comments%2C%20'').replace(this._rx.port%2C%20'')%3B%0A%7D%2C%0A_lex%3A%20function%20(text)%20%7B%0Avar%20root%20%3D%20%7B%0Astart%3A%200%2C%0Aend%3A%20text.length%0A%7D%3B%0Avar%20n%20%3D%20root%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20text.length%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Aswitch%20(text%5Bi%5D)%20%7B%0Acase%20this.OPEN_BRACE%3A%0Aif%20(!n.rules)%20%7B%0An.rules%20%3D%20%5B%5D%3B%0A%7D%0Avar%20p%20%3D%20n%3B%0Avar%20previous%20%3D%20p.rules%5Bp.rules.length%20-%201%5D%3B%0An%20%3D%20%7B%0Astart%3A%20i%20%2B%201%2C%0Aparent%3A%20p%2C%0Aprevious%3A%20previous%0A%7D%3B%0Ap.rules.push(n)%3B%0Abreak%3B%0Acase%20this.CLOSE_BRACE%3A%0An.end%20%3D%20i%20%2B%201%3B%0An%20%3D%20n.parent%20%7C%7C%20root%3B%0Abreak%3B%0A%7D%0A%7D%0Areturn%20root%3B%0A%7D%2C%0A_parseCss%3A%20function%20(node%2C%20text)%20%7B%0Avar%20t%20%3D%20text.substring(node.start%2C%20node.end%20-%201)%3B%0Anode.parsedCssText%20%3D%20node.cssText%20%3D%20t.trim()%3B%0Aif%20(node.parent)%20%7B%0Avar%20ss%20%3D%20node.previous%20%3F%20node.previous.end%20%3A%20node.parent.start%3B%0At%20%3D%20text.substring(ss%2C%20node.start%20-%201)%3B%0At%20%3D%20this._expandUnicodeEscapes(t)%3B%0At%20%3D%20t.replace(this._rx.multipleSpaces%2C%20'%20')%3B%0At%20%3D%20t.substring(t.lastIndexOf('%3B')%20%2B%201)%3B%0Avar%20s%20%3D%20node.parsedSelector%20%3D%20node.selector%20%3D%20t.trim()%3B%0Anode.atRule%20%3D%20s.indexOf(this.AT_START)%20%3D%3D%3D%200%3B%0Aif%20(node.atRule)%20%7B%0Aif%20(s.indexOf(this.MEDIA_START)%20%3D%3D%3D%200)%20%7B%0Anode.type%20%3D%20this.types.MEDIA_RULE%3B%0A%7D%20else%20if%20(s.match(this._rx.keyframesRule))%20%7B%0Anode.type%20%3D%20this.types.KEYFRAMES_RULE%3B%0Anode.keyframesName%20%3D%20node.selector.split(this._rx.multipleSpaces).pop()%3B%0A%7D%0A%7D%20else%20%7B%0Aif%20(s.indexOf(this.VAR_START)%20%3D%3D%3D%200)%20%7B%0Anode.type%20%3D%20this.types.MIXIN_RULE%3B%0A%7D%20else%20%7B%0Anode.type%20%3D%20this.types.STYLE_RULE%3B%0A%7D%0A%7D%0A%7D%0Avar%20r%24%20%3D%20node.rules%3B%0Aif%20(r%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20r%24.length%2C%20r%3B%20i%20%3C%20l%20%26%26%20(r%20%3D%20r%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._parseCss(r%2C%20text)%3B%0A%7D%0A%7D%0Areturn%20node%3B%0A%7D%2C%0A_expandUnicodeEscapes%3A%20function%20(s)%20%7B%0Areturn%20s.replace(%2F%5C%5C(%5B0-9a-f%5D%7B1%2C6%7D)%5Cs%2Fgi%2C%20function%20()%20%7B%0Avar%20code%20%3D%20arguments%5B1%5D%2C%20repeat%20%3D%206%20-%20code.length%3B%0Awhile%20(repeat--)%20%7B%0Acode%20%3D%20'0'%20%2B%20code%3B%0A%7D%0Areturn%20'%5C%5C'%20%2B%20code%3B%0A%7D)%3B%0A%7D%2C%0Astringify%3A%20function%20(node%2C%20preserveProperties%2C%20text)%20%7B%0Atext%20%3D%20text%20%7C%7C%20''%3B%0Avar%20cssText%20%3D%20''%3B%0Aif%20(node.cssText%20%7C%7C%20node.rules)%20%7B%0Avar%20r%24%20%3D%20node.rules%3B%0Aif%20(r%24%20%26%26%20(preserveProperties%20%7C%7C%20!this._hasMixinRules(r%24)))%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20r%24.length%2C%20r%3B%20i%20%3C%20l%20%26%26%20(r%20%3D%20r%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0AcssText%20%3D%20this.stringify(r%2C%20preserveProperties%2C%20cssText)%3B%0A%7D%0A%7D%20else%20%7B%0AcssText%20%3D%20preserveProperties%20%3F%20node.cssText%20%3A%20this.removeCustomProps(node.cssText)%3B%0AcssText%20%3D%20cssText.trim()%3B%0Aif%20(cssText)%20%7B%0AcssText%20%3D%20'%20%20'%20%2B%20cssText%20%2B%20'%5Cn'%3B%0A%7D%0A%7D%0A%7D%0Aif%20(cssText)%20%7B%0Aif%20(node.selector)%20%7B%0Atext%20%2B%3D%20node.selector%20%2B%20'%20'%20%2B%20this.OPEN_BRACE%20%2B%20'%5Cn'%3B%0A%7D%0Atext%20%2B%3D%20cssText%3B%0Aif%20(node.selector)%20%7B%0Atext%20%2B%3D%20this.CLOSE_BRACE%20%2B%20'%5Cn%5Cn'%3B%0A%7D%0A%7D%0Areturn%20text%3B%0A%7D%2C%0A_hasMixinRules%3A%20function%20(rules)%20%7B%0Areturn%20rules%5B0%5D.selector.indexOf(this.VAR_START)%20%3D%3D%3D%200%3B%0A%7D%2C%0AremoveCustomProps%3A%20function%20(cssText)%20%7B%0AcssText%20%3D%20this.removeCustomPropAssignment(cssText)%3B%0Areturn%20this.removeCustomPropApply(cssText)%3B%0A%7D%2C%0AremoveCustomPropAssignment%3A%20function%20(cssText)%20%7B%0Areturn%20cssText.replace(this._rx.customProp%2C%20'').replace(this._rx.mixinProp%2C%20'')%3B%0A%7D%2C%0AremoveCustomPropApply%3A%20function%20(cssText)%20%7B%0Areturn%20cssText.replace(this._rx.mixinApply%2C%20'').replace(this._rx.varApply%2C%20'')%3B%0A%7D%2C%0Atypes%3A%20%7B%0ASTYLE_RULE%3A%201%2C%0AKEYFRAMES_RULE%3A%207%2C%0AMEDIA_RULE%3A%204%2C%0AMIXIN_RULE%3A%201000%0A%7D%2C%0AOPEN_BRACE%3A%20'%7B'%2C%0ACLOSE_BRACE%3A%20'%7D'%2C%0A_rx%3A%20%7B%0Acomments%3A%20%2F%5C%2F%5C*%5B%5E*%5D*%5C*%2B(%5B%5E%5C%2F*%5D%5B%5E*%5D*%5C*%2B)*%5C%2F%2Fgim%2C%0Aport%3A%20%2F%40import%5B%5E%3B%5D*%3B%2Fgim%2C%0AcustomProp%3A%20%2F(%3F%3A%5E%5B%5E%3B%5C-%5Cs%7D%5D%2B)%3F--%5B%5E%3B%7B%7D%5D*%3F%3A%5B%5E%7B%7D%3B%5D*%3F(%3F%3A%5B%3B%5Cn%5D%7C%24)%2Fgim%2C%0AmixinProp%3A%20%2F(%3F%3A%5E%5B%5E%3B%5C-%5Cs%7D%5D%2B)%3F--%5B%5E%3B%7B%7D%5D*%3F%3A%5B%5E%7B%7D%3B%5D*%3F%7B%5B%5E%7D%5D*%3F%7D(%3F%3A%5B%3B%5Cn%5D%7C%24)%3F%2Fgim%2C%0AmixinApply%3A%20%2F%40apply%5B%5Cs%5D*%5C(%5B%5E)%5D*%3F%5C)%5B%5Cs%5D*(%3F%3A%5B%3B%5Cn%5D%7C%24)%3F%2Fgim%2C%0AvarApply%3A%20%2F%5B%5E%3B%3A%5D*%3F%3A%5B%5E%3B%5D*%3Fvar%5C(%5B%5E%3B%5D*%5C)(%3F%3A%5B%3B%5Cn%5D%7C%24)%3F%2Fgim%2C%0AkeyframesRule%3A%20%2F%5E%40%5B%5E%5Cs%5D*keyframes%2F%2C%0AmultipleSpaces%3A%20%2F%5Cs%2B%2Fg%0A%7D%2C%0AVAR_START%3A%20'--'%2C%0AMEDIA_START%3A%20'%40media'%2C%0AAT_START%3A%20'%40'%0A%7D%3B%0A%7D()%3B%0APolymer.StyleUtil%20%3D%20function%20()%20%7B%0Areturn%20%7B%0AMODULE_STYLES_SELECTOR%3A%20'style%2C%20link%5Brel%3Dimport%5D%5Btype~%3Dcss%5D%2C%20template'%2C%0AINCLUDE_ATTR%3A%20'include'%2C%0AtoCssText%3A%20function%20(rules%2C%20callback%2C%20preserveProperties)%20%7B%0Aif%20(typeof%20rules%20%3D%3D%3D%20'string')%20%7B%0Arules%20%3D%20this.parser.parse(rules)%3B%0A%7D%0Aif%20(callback)%20%7B%0Athis.forEachRule(rules%2C%20callback)%3B%0A%7D%0Areturn%20this.parser.stringify(rules%2C%20preserveProperties)%3B%0A%7D%2C%0AforRulesInStyles%3A%20function%20(styles%2C%20styleRuleCallback%2C%20keyframesRuleCallback)%20%7B%0Aif%20(styles)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20styles.length%2C%20s%3B%20i%20%3C%20l%20%26%26%20(s%20%3D%20styles%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis.forEachRule(this.rulesForStyle(s)%2C%20styleRuleCallback%2C%20keyframesRuleCallback)%3B%0A%7D%0A%7D%0A%7D%2C%0ArulesForStyle%3A%20function%20(style)%20%7B%0Aif%20(!style.__cssRules%20%26%26%20style.textContent)%20%7B%0Astyle.__cssRules%20%3D%20this.parser.parse(style.textContent)%3B%0A%7D%0Areturn%20style.__cssRules%3B%0A%7D%2C%0AisKeyframesSelector%3A%20function%20(rule)%20%7B%0Areturn%20rule.parent%20%26%26%20rule.parent.type%20%3D%3D%3D%20this.ruleTypes.KEYFRAMES_RULE%3B%0A%7D%2C%0AforEachRule%3A%20function%20(node%2C%20styleRuleCallback%2C%20keyframesRuleCallback)%20%7B%0Aif%20(!node)%20%7B%0Areturn%3B%0A%7D%0Avar%20skipRules%20%3D%20false%3B%0Aif%20(node.type%20%3D%3D%3D%20this.ruleTypes.STYLE_RULE)%20%7B%0AstyleRuleCallback(node)%3B%0A%7D%20else%20if%20(keyframesRuleCallback%20%26%26%20node.type%20%3D%3D%3D%20this.ruleTypes.KEYFRAMES_RULE)%20%7B%0AkeyframesRuleCallback(node)%3B%0A%7D%20else%20if%20(node.type%20%3D%3D%3D%20this.ruleTypes.MIXIN_RULE)%20%7B%0AskipRules%20%3D%20true%3B%0A%7D%0Avar%20r%24%20%3D%20node.rules%3B%0Aif%20(r%24%20%26%26%20!skipRules)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20r%24.length%2C%20r%3B%20i%20%3C%20l%20%26%26%20(r%20%3D%20r%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis.forEachRule(r%2C%20styleRuleCallback%2C%20keyframesRuleCallback)%3B%0A%7D%0A%7D%0A%7D%2C%0AapplyCss%3A%20function%20(cssText%2C%20moniker%2C%20target%2C%20afterNode)%20%7B%0Avar%20style%20%3D%20document.createElement('style')%3B%0Aif%20(moniker)%20%7B%0Astyle.setAttribute('scope'%2C%20moniker)%3B%0A%7D%0Astyle.textContent%20%3D%20cssText%3B%0Atarget%20%3D%20target%20%7C%7C%20document.head%3B%0Aif%20(!afterNode)%20%7B%0Avar%20n%24%20%3D%20target.querySelectorAll('style%5Bscope%5D')%3B%0AafterNode%20%3D%20n%24%5Bn%24.length%20-%201%5D%3B%0A%7D%0Atarget.insertBefore(style%2C%20afterNode%20%26%26%20afterNode.nextSibling%20%7C%7C%20target.firstChild)%3B%0Areturn%20style%3B%0A%7D%2C%0AcssFromModules%3A%20function%20(moduleIds%2C%20warnIfNotFound)%20%7B%0Avar%20modules%20%3D%20moduleIds.trim().split('%20')%3B%0Avar%20cssText%20%3D%20''%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20modules.length%3B%20i%2B%2B)%20%7B%0AcssText%20%2B%3D%20this.cssFromModule(modules%5Bi%5D%2C%20warnIfNotFound)%3B%0A%7D%0Areturn%20cssText%3B%0A%7D%2C%0AcssFromModule%3A%20function%20(moduleId%2C%20warnIfNotFound)%20%7B%0Avar%20m%20%3D%20Polymer.DomModule.import(moduleId)%3B%0Aif%20(m%20%26%26%20!m._cssText)%20%7B%0Am._cssText%20%3D%20this.cssFromElement(m)%3B%0A%7D%0Aif%20(!m%20%26%26%20warnIfNotFound)%20%7B%0Aconsole.warn('Could%20not%20find%20style%20data%20in%20module%20named'%2C%20moduleId)%3B%0A%7D%0Areturn%20m%20%26%26%20m._cssText%20%7C%7C%20''%3B%0A%7D%2C%0AcssFromElement%3A%20function%20(element)%20%7B%0Avar%20cssText%20%3D%20''%3B%0Avar%20content%20%3D%20element.content%20%7C%7C%20element%3B%0Avar%20e%24%20%3D%20Polymer.TreeApi.arrayCopy(content.querySelectorAll(this.MODULE_STYLES_SELECTOR))%3B%0Afor%20(var%20i%20%3D%200%2C%20e%3B%20i%20%3C%20e%24.length%3B%20i%2B%2B)%20%7B%0Ae%20%3D%20e%24%5Bi%5D%3B%0Aif%20(e.localName%20%3D%3D%3D%20'template')%20%7B%0AcssText%20%2B%3D%20this.cssFromElement(e)%3B%0A%7D%20else%20%7B%0Aif%20(e.localName%20%3D%3D%3D%20'style')%20%7B%0Avar%20include%20%3D%20e.getAttribute(this.INCLUDE_ATTR)%3B%0Aif%20(include)%20%7B%0AcssText%20%2B%3D%20this.cssFromModules(include%2C%20true)%3B%0A%7D%0Ae%20%3D%20e.__appliedElement%20%7C%7C%20e%3B%0Ae.parentNode.removeChild(e)%3B%0AcssText%20%2B%3D%20this.resolveCss(e.textContent%2C%20element.ownerDocument)%3B%0A%7D%20else%20if%20(e.import%20%26%26%20e.import.body)%20%7B%0AcssText%20%2B%3D%20this.resolveCss(e.import.body.textContent%2C%20e.import)%3B%0A%7D%0A%7D%0A%7D%0Areturn%20cssText%3B%0A%7D%2C%0AresolveCss%3A%20Polymer.ResolveUrl.resolveCss%2C%0Aparser%3A%20Polymer.CssParse%2C%0AruleTypes%3A%20Polymer.CssParse.types%0A%7D%3B%0A%7D()%3B%0APolymer.StyleTransformer%20%3D%20function%20()%20%7B%0Avar%20nativeShadow%20%3D%20Polymer.Settings.useNativeShadow%3B%0Avar%20styleUtil%20%3D%20Polymer.StyleUtil%3B%0Avar%20api%20%3D%20%7B%0Adom%3A%20function%20(node%2C%20scope%2C%20useAttr%2C%20shouldRemoveScope)%20%7B%0Athis._transformDom(node%2C%20scope%20%7C%7C%20''%2C%20useAttr%2C%20shouldRemoveScope)%3B%0A%7D%2C%0A_transformDom%3A%20function%20(node%2C%20selector%2C%20useAttr%2C%20shouldRemoveScope)%20%7B%0Aif%20(node.setAttribute)%20%7B%0Athis.element(node%2C%20selector%2C%20useAttr%2C%20shouldRemoveScope)%3B%0A%7D%0Avar%20c%24%20%3D%20Polymer.dom(node).childNodes%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Athis._transformDom(c%24%5Bi%5D%2C%20selector%2C%20useAttr%2C%20shouldRemoveScope)%3B%0A%7D%0A%7D%2C%0Aelement%3A%20function%20(element%2C%20scope%2C%20useAttr%2C%20shouldRemoveScope)%20%7B%0Aif%20(useAttr)%20%7B%0Aif%20(shouldRemoveScope)%20%7B%0Aelement.removeAttribute(SCOPE_NAME)%3B%0A%7D%20else%20%7B%0Aelement.setAttribute(SCOPE_NAME%2C%20scope)%3B%0A%7D%0A%7D%20else%20%7B%0Aif%20(scope)%20%7B%0Aif%20(element.classList)%20%7B%0Aif%20(shouldRemoveScope)%20%7B%0Aelement.classList.remove(SCOPE_NAME)%3B%0Aelement.classList.remove(scope)%3B%0A%7D%20else%20%7B%0Aelement.classList.add(SCOPE_NAME)%3B%0Aelement.classList.add(scope)%3B%0A%7D%0A%7D%20else%20if%20(element.getAttribute)%20%7B%0Avar%20c%20%3D%20element.getAttribute(CLASS)%3B%0Aif%20(shouldRemoveScope)%20%7B%0Aif%20(c)%20%7B%0Aelement.setAttribute(CLASS%2C%20c.replace(SCOPE_NAME%2C%20'').replace(scope%2C%20''))%3B%0A%7D%0A%7D%20else%20%7B%0Aelement.setAttribute(CLASS%2C%20(c%20%3F%20c%20%2B%20'%20'%20%3A%20'')%20%2B%20SCOPE_NAME%20%2B%20'%20'%20%2B%20scope)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%2C%0AelementStyles%3A%20function%20(element%2C%20callback)%20%7B%0Avar%20styles%20%3D%20element._styles%3B%0Avar%20cssText%20%3D%20''%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20styles.length%2C%20s%3B%20i%20%3C%20l%20%26%26%20(s%20%3D%20styles%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20rules%20%3D%20styleUtil.rulesForStyle(s)%3B%0AcssText%20%2B%3D%20nativeShadow%20%3F%20styleUtil.toCssText(rules%2C%20callback)%20%3A%20this.css(rules%2C%20element.is%2C%20element.extends%2C%20callback%2C%20element._scopeCssViaAttr)%20%2B%20'%5Cn%5Cn'%3B%0A%7D%0Areturn%20cssText.trim()%3B%0A%7D%2C%0Acss%3A%20function%20(rules%2C%20scope%2C%20ext%2C%20callback%2C%20useAttr)%20%7B%0Avar%20hostScope%20%3D%20this._calcHostScope(scope%2C%20ext)%3B%0Ascope%20%3D%20this._calcElementScope(scope%2C%20useAttr)%3B%0Avar%20self%20%3D%20this%3B%0Areturn%20styleUtil.toCssText(rules%2C%20function%20(rule)%20%7B%0Aif%20(!rule.isScoped)%20%7B%0Aself.rule(rule%2C%20scope%2C%20hostScope)%3B%0Arule.isScoped%20%3D%20true%3B%0A%7D%0Aif%20(callback)%20%7B%0Acallback(rule%2C%20scope%2C%20hostScope)%3B%0A%7D%0A%7D)%3B%0A%7D%2C%0A_calcElementScope%3A%20function%20(scope%2C%20useAttr)%20%7B%0Aif%20(scope)%20%7B%0Areturn%20useAttr%20%3F%20CSS_ATTR_PREFIX%20%2B%20scope%20%2B%20CSS_ATTR_SUFFIX%20%3A%20CSS_CLASS_PREFIX%20%2B%20scope%3B%0A%7D%20else%20%7B%0Areturn%20''%3B%0A%7D%0A%7D%2C%0A_calcHostScope%3A%20function%20(scope%2C%20ext)%20%7B%0Areturn%20ext%20%3F%20'%5Bis%3D'%20%2B%20scope%20%2B%20'%5D'%20%3A%20scope%3B%0A%7D%2C%0Arule%3A%20function%20(rule%2C%20scope%2C%20hostScope)%20%7B%0Athis._transformRule(rule%2C%20this._transformComplexSelector%2C%20scope%2C%20hostScope)%3B%0A%7D%2C%0A_transformRule%3A%20function%20(rule%2C%20transformer%2C%20scope%2C%20hostScope)%20%7B%0Avar%20p%24%20%3D%20rule.selector.split(COMPLEX_SELECTOR_SEP)%3B%0Aif%20(!styleUtil.isKeyframesSelector(rule))%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ap%24%5Bi%5D%20%3D%20transformer.call(this%2C%20p%2C%20scope%2C%20hostScope)%3B%0A%7D%0A%7D%0Arule.selector%20%3D%20rule.transformedSelector%20%3D%20p%24.join(COMPLEX_SELECTOR_SEP)%3B%0A%7D%2C%0A_transformComplexSelector%3A%20function%20(selector%2C%20scope%2C%20hostScope)%20%7B%0Avar%20stop%20%3D%20false%3B%0Avar%20hostContext%20%3D%20false%3B%0Avar%20self%20%3D%20this%3B%0Aselector%20%3D%20selector.replace(CONTENT_START%2C%20HOST%20%2B%20'%20%241')%3B%0Aselector%20%3D%20selector.replace(SIMPLE_SELECTOR_SEP%2C%20function%20(m%2C%20c%2C%20s)%20%7B%0Aif%20(!stop)%20%7B%0Avar%20info%20%3D%20self._transformCompoundSelector(s%2C%20c%2C%20scope%2C%20hostScope)%3B%0Astop%20%3D%20stop%20%7C%7C%20info.stop%3B%0AhostContext%20%3D%20hostContext%20%7C%7C%20info.hostContext%3B%0Ac%20%3D%20info.combinator%3B%0As%20%3D%20info.value%3B%0A%7D%20else%20%7B%0As%20%3D%20s.replace(SCOPE_JUMP%2C%20'%20')%3B%0A%7D%0Areturn%20c%20%2B%20s%3B%0A%7D)%3B%0Aif%20(hostContext)%20%7B%0Aselector%20%3D%20selector.replace(HOST_CONTEXT_PAREN%2C%20function%20(m%2C%20pre%2C%20paren%2C%20post)%20%7B%0Areturn%20pre%20%2B%20paren%20%2B%20'%20'%20%2B%20hostScope%20%2B%20post%20%2B%20COMPLEX_SELECTOR_SEP%20%2B%20'%20'%20%2B%20pre%20%2B%20hostScope%20%2B%20paren%20%2B%20post%3B%0A%7D)%3B%0A%7D%0Areturn%20selector%3B%0A%7D%2C%0A_transformCompoundSelector%3A%20function%20(selector%2C%20combinator%2C%20scope%2C%20hostScope)%20%7B%0Avar%20jumpIndex%20%3D%20selector.search(SCOPE_JUMP)%3B%0Avar%20hostContext%20%3D%20false%3B%0Aif%20(selector.indexOf(HOST_CONTEXT)%20%3E%3D%200)%20%7B%0AhostContext%20%3D%20true%3B%0A%7D%20else%20if%20(selector.indexOf(HOST)%20%3E%3D%200)%20%7B%0Aselector%20%3D%20selector.replace(HOST_PAREN%2C%20function%20(m%2C%20host%2C%20paren)%20%7B%0Areturn%20hostScope%20%2B%20paren%3B%0A%7D)%3B%0Aselector%20%3D%20selector.replace(HOST%2C%20hostScope)%3B%0A%7D%20else%20if%20(jumpIndex%20!%3D%3D%200)%20%7B%0Aselector%20%3D%20scope%20%3F%20this._transformSimpleSelector(selector%2C%20scope)%20%3A%20selector%3B%0A%7D%0Aif%20(selector.indexOf(CONTENT)%20%3E%3D%200)%20%7B%0Acombinator%20%3D%20''%3B%0A%7D%0Avar%20stop%3B%0Aif%20(jumpIndex%20%3E%3D%200)%20%7B%0Aselector%20%3D%20selector.replace(SCOPE_JUMP%2C%20'%20')%3B%0Astop%20%3D%20true%3B%0A%7D%0Areturn%20%7B%0Avalue%3A%20selector%2C%0Acombinator%3A%20combinator%2C%0Astop%3A%20stop%2C%0AhostContext%3A%20hostContext%0A%7D%3B%0A%7D%2C%0A_transformSimpleSelector%3A%20function%20(selector%2C%20scope)%20%7B%0Avar%20p%24%20%3D%20selector.split(PSEUDO_PREFIX)%3B%0Ap%24%5B0%5D%20%2B%3D%20scope%3B%0Areturn%20p%24.join(PSEUDO_PREFIX)%3B%0A%7D%2C%0AdocumentRule%3A%20function%20(rule)%20%7B%0Arule.selector%20%3D%20rule.parsedSelector%3B%0Athis.normalizeRootSelector(rule)%3B%0Aif%20(!nativeShadow)%20%7B%0Athis._transformRule(rule%2C%20this._transformDocumentSelector)%3B%0A%7D%0A%7D%2C%0AnormalizeRootSelector%3A%20function%20(rule)%20%7B%0Aif%20(rule.selector%20%3D%3D%3D%20ROOT)%20%7B%0Arule.selector%20%3D%20'body'%3B%0A%7D%0A%7D%2C%0A_transformDocumentSelector%3A%20function%20(selector)%20%7B%0Areturn%20selector.match(SCOPE_JUMP)%20%3F%20this._transformComplexSelector(selector%2C%20SCOPE_DOC_SELECTOR)%20%3A%20this._transformSimpleSelector(selector.trim()%2C%20SCOPE_DOC_SELECTOR)%3B%0A%7D%2C%0ASCOPE_NAME%3A%20'style-scope'%0A%7D%3B%0Avar%20SCOPE_NAME%20%3D%20api.SCOPE_NAME%3B%0Avar%20SCOPE_DOC_SELECTOR%20%3D%20'%3Anot(%5B'%20%2B%20SCOPE_NAME%20%2B%20'%5D)'%20%2B%20'%3Anot(.'%20%2B%20SCOPE_NAME%20%2B%20')'%3B%0Avar%20COMPLEX_SELECTOR_SEP%20%3D%20'%2C'%3B%0Avar%20SIMPLE_SELECTOR_SEP%20%3D%20%2F(%5E%7C%5B%5Cs%3E%2B~%5D%2B)((%3F%3A%5C%5B.%2B%3F%5C%5D%7C%5B%5E%5Cs%3E%2B~%3D%5C%5B%5D)%2B)%2Fg%3B%0Avar%20HOST%20%3D%20'%3Ahost'%3B%0Avar%20ROOT%20%3D%20'%3Aroot'%3B%0Avar%20HOST_PAREN%20%3D%20%2F(%3Ahost)(%3F%3A%5C(((%3F%3A%5C(%5B%5E)(%5D*%5C)%7C%5B%5E)(%5D*)%2B%3F)%5C))%2Fg%3B%0Avar%20HOST_CONTEXT%20%3D%20'%3Ahost-context'%3B%0Avar%20HOST_CONTEXT_PAREN%20%3D%20%2F(.*)(%3F%3A%3Ahost-context)(%3F%3A%5C(((%3F%3A%5C(%5B%5E)(%5D*%5C)%7C%5B%5E)(%5D*)%2B%3F)%5C))(.*)%2F%3B%0Avar%20CONTENT%20%3D%20'%3A%3Acontent'%3B%0Avar%20SCOPE_JUMP%20%3D%20%2F%3A%3Acontent%7C%3A%3Ashadow%7C%5C%2Fdeep%5C%2F%2F%3B%0Avar%20CSS_CLASS_PREFIX%20%3D%20'.'%3B%0Avar%20CSS_ATTR_PREFIX%20%3D%20'%5B'%20%2B%20SCOPE_NAME%20%2B%20'~%3D'%3B%0Avar%20CSS_ATTR_SUFFIX%20%3D%20'%5D'%3B%0Avar%20PSEUDO_PREFIX%20%3D%20'%3A'%3B%0Avar%20CLASS%20%3D%20'class'%3B%0Avar%20CONTENT_START%20%3D%20new%20RegExp('%5E('%20%2B%20CONTENT%20%2B%20')')%3B%0Areturn%20api%3B%0A%7D()%3B%0APolymer.StyleExtends%20%3D%20function%20()%20%7B%0Avar%20styleUtil%20%3D%20Polymer.StyleUtil%3B%0Areturn%20%7B%0AhasExtends%3A%20function%20(cssText)%20%7B%0Areturn%20Boolean(cssText.match(this.rx.EXTEND))%3B%0A%7D%2C%0Atransform%3A%20function%20(style)%20%7B%0Avar%20rules%20%3D%20styleUtil.rulesForStyle(style)%3B%0Avar%20self%20%3D%20this%3B%0AstyleUtil.forEachRule(rules%2C%20function%20(rule)%20%7B%0Aself._mapRuleOntoParent(rule)%3B%0Aif%20(rule.parent)%20%7B%0Avar%20m%3B%0Awhile%20(m%20%3D%20self.rx.EXTEND.exec(rule.cssText))%20%7B%0Avar%20extend%20%3D%20m%5B1%5D%3B%0Avar%20extendor%20%3D%20self._findExtendor(extend%2C%20rule)%3B%0Aif%20(extendor)%20%7B%0Aself._extendRule(rule%2C%20extendor)%3B%0A%7D%0A%7D%0A%7D%0Arule.cssText%20%3D%20rule.cssText.replace(self.rx.EXTEND%2C%20'')%3B%0A%7D)%3B%0Areturn%20styleUtil.toCssText(rules%2C%20function%20(rule)%20%7B%0Aif%20(rule.selector.match(self.rx.STRIP))%20%7B%0Arule.cssText%20%3D%20''%3B%0A%7D%0A%7D%2C%20true)%3B%0A%7D%2C%0A_mapRuleOntoParent%3A%20function%20(rule)%20%7B%0Aif%20(rule.parent)%20%7B%0Avar%20map%20%3D%20rule.parent.map%20%7C%7C%20(rule.parent.map%20%3D%20%7B%7D)%3B%0Avar%20parts%20%3D%20rule.selector.split('%2C')%3B%0Afor%20(var%20i%20%3D%200%2C%20p%3B%20i%20%3C%20parts.length%3B%20i%2B%2B)%20%7B%0Ap%20%3D%20parts%5Bi%5D%3B%0Amap%5Bp.trim()%5D%20%3D%20rule%3B%0A%7D%0Areturn%20map%3B%0A%7D%0A%7D%2C%0A_findExtendor%3A%20function%20(extend%2C%20rule)%20%7B%0Areturn%20rule.parent%20%26%26%20rule.parent.map%20%26%26%20rule.parent.map%5Bextend%5D%20%7C%7C%20this._findExtendor(extend%2C%20rule.parent)%3B%0A%7D%2C%0A_extendRule%3A%20function%20(target%2C%20source)%20%7B%0Aif%20(target.parent%20!%3D%3D%20source.parent)%20%7B%0Athis._cloneAndAddRuleToParent(source%2C%20target.parent)%3B%0A%7D%0Atarget.extends%20%3D%20target.extends%20%7C%7C%20%5B%5D%3B%0Atarget.extends.push(source)%3B%0Asource.selector%20%3D%20source.selector.replace(this.rx.STRIP%2C%20'')%3B%0Asource.selector%20%3D%20(source.selector%20%26%26%20source.selector%20%2B%20'%2C%5Cn')%20%2B%20target.selector%3B%0Aif%20(source.extends)%20%7B%0Asource.extends.forEach(function%20(e)%20%7B%0Athis._extendRule(target%2C%20e)%3B%0A%7D%2C%20this)%3B%0A%7D%0A%7D%2C%0A_cloneAndAddRuleToParent%3A%20function%20(rule%2C%20parent)%20%7B%0Arule%20%3D%20Object.create(rule)%3B%0Arule.parent%20%3D%20parent%3B%0Aif%20(rule.extends)%20%7B%0Arule.extends%20%3D%20rule.extends.slice()%3B%0A%7D%0Aparent.rules.push(rule)%3B%0A%7D%2C%0Arx%3A%20%7B%0AEXTEND%3A%20%2F%40extends%5C((%5B%5E)%5D*)%5C)%5Cs*%3F%3B%2Fgim%2C%0ASTRIP%3A%20%2F%25%5B%5E%2C%5D*%24%2F%0A%7D%0A%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0Avar%20prepElement%20%3D%20Polymer.Base._prepElement%3B%0Avar%20nativeShadow%20%3D%20Polymer.Settings.useNativeShadow%3B%0Avar%20styleUtil%20%3D%20Polymer.StyleUtil%3B%0Avar%20styleTransformer%20%3D%20Polymer.StyleTransformer%3B%0Avar%20styleExtends%20%3D%20Polymer.StyleExtends%3B%0APolymer.Base._addFeature(%7B%0A_prepElement%3A%20function%20(element)%20%7B%0Aif%20(this._encapsulateStyle)%20%7B%0AstyleTransformer.element(element%2C%20this.is%2C%20this._scopeCssViaAttr)%3B%0A%7D%0AprepElement.call(this%2C%20element)%3B%0A%7D%2C%0A_prepStyles%3A%20function%20()%20%7B%0Aif%20(this._encapsulateStyle%20%3D%3D%3D%20undefined)%20%7B%0Athis._encapsulateStyle%20%3D%20!nativeShadow%20%26%26%20Boolean(this._template)%3B%0A%7D%0Aif%20(this._template)%20%7B%0Athis._styles%20%3D%20this._collectStyles()%3B%0Avar%20cssText%20%3D%20styleTransformer.elementStyles(this)%3B%0Athis._prepStyleProperties()%3B%0Avar%20needsStatic%20%3D%20this._styles.length%20%26%26%20!this._needsStyleProperties()%3B%0Aif%20(needsStatic%20%7C%7C%20!nativeShadow)%20%7B%0AcssText%20%3D%20needsStatic%20%3F%20cssText%20%3A%20'%20'%3B%0Avar%20style%20%3D%20styleUtil.applyCss(cssText%2C%20this.is%2C%20nativeShadow%20%3F%20this._template.content%20%3A%20null)%3B%0Aif%20(!nativeShadow)%20%7B%0Athis._scopeStyle%20%3D%20style%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Athis._styles%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_collectStyles%3A%20function%20()%20%7B%0Avar%20styles%20%3D%20%5B%5D%3B%0Avar%20cssText%20%3D%20''%2C%20m%24%20%3D%20this.styleModules%3B%0Aif%20(m%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20m%24.length%2C%20m%3B%20i%20%3C%20l%20%26%26%20(m%20%3D%20m%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0AcssText%20%2B%3D%20styleUtil.cssFromModule(m)%3B%0A%7D%0A%7D%0AcssText%20%2B%3D%20styleUtil.cssFromModule(this.is)%3B%0Avar%20p%20%3D%20this._template%20%26%26%20this._template.parentNode%3B%0Aif%20(this._template%20%26%26%20(!p%20%7C%7C%20p.id.toLowerCase()%20!%3D%3D%20this.is))%20%7B%0AcssText%20%2B%3D%20styleUtil.cssFromElement(this._template)%3B%0A%7D%0Aif%20(cssText)%20%7B%0Avar%20style%20%3D%20document.createElement('style')%3B%0Astyle.textContent%20%3D%20cssText%3B%0Aif%20(styleExtends.hasExtends(style.textContent))%20%7B%0AcssText%20%3D%20styleExtends.transform(style)%3B%0A%7D%0Astyles.push(style)%3B%0A%7D%0Areturn%20styles%3B%0A%7D%2C%0A_elementAdd%3A%20function%20(node)%20%7B%0Aif%20(this._encapsulateStyle)%20%7B%0Aif%20(node.__styleScoped)%20%7B%0Anode.__styleScoped%20%3D%20false%3B%0A%7D%20else%20%7B%0AstyleTransformer.dom(node%2C%20this.is%2C%20this._scopeCssViaAttr)%3B%0A%7D%0A%7D%0A%7D%2C%0A_elementRemove%3A%20function%20(node)%20%7B%0Aif%20(this._encapsulateStyle)%20%7B%0AstyleTransformer.dom(node%2C%20this.is%2C%20this._scopeCssViaAttr%2C%20true)%3B%0A%7D%0A%7D%2C%0AscopeSubtree%3A%20function%20(container%2C%20shouldObserve)%20%7B%0Aif%20(nativeShadow)%20%7B%0Areturn%3B%0A%7D%0Avar%20self%20%3D%20this%3B%0Avar%20scopify%20%3D%20function%20(node)%20%7B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE)%20%7B%0Avar%20className%20%3D%20node.getAttribute('class')%3B%0Anode.setAttribute('class'%2C%20self._scopeElementClass(node%2C%20className))%3B%0Avar%20n%24%20%3D%20node.querySelectorAll('*')%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0AclassName%20%3D%20n.getAttribute('class')%3B%0An.setAttribute('class'%2C%20self._scopeElementClass(n%2C%20className))%3B%0A%7D%0A%7D%0A%7D%3B%0Ascopify(container)%3B%0Aif%20(shouldObserve)%20%7B%0Avar%20mo%20%3D%20new%20MutationObserver(function%20(mxns)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20m%3B%20i%20%3C%20mxns.length%20%26%26%20(m%20%3D%20mxns%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(m.addedNodes)%20%7B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20m.addedNodes.length%3B%20j%2B%2B)%20%7B%0Ascopify(m.addedNodes%5Bj%5D)%3B%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0Amo.observe(container%2C%20%7B%0AchildList%3A%20true%2C%0Asubtree%3A%20true%0A%7D)%3B%0Areturn%20mo%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.StyleProperties%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20nativeShadow%20%3D%20Polymer.Settings.useNativeShadow%3B%0Avar%20matchesSelector%20%3D%20Polymer.DomApi.matchesSelector%3B%0Avar%20styleUtil%20%3D%20Polymer.StyleUtil%3B%0Avar%20styleTransformer%20%3D%20Polymer.StyleTransformer%3B%0Areturn%20%7B%0AdecorateStyles%3A%20function%20(styles)%20%7B%0Avar%20self%20%3D%20this%2C%20props%20%3D%20%7B%7D%2C%20keyframes%20%3D%20%5B%5D%3B%0AstyleUtil.forRulesInStyles(styles%2C%20function%20(rule)%20%7B%0Aself.decorateRule(rule)%3B%0Aself.collectPropertiesInCssText(rule.propertyInfo.cssText%2C%20props)%3B%0A%7D%2C%20function%20onKeyframesRule(rule)%20%7B%0Akeyframes.push(rule)%3B%0A%7D)%3B%0Astyles._keyframes%20%3D%20keyframes%3B%0Avar%20names%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20in%20props)%20%7B%0Anames.push(i)%3B%0A%7D%0Areturn%20names%3B%0A%7D%2C%0AdecorateRule%3A%20function%20(rule)%20%7B%0Aif%20(rule.propertyInfo)%20%7B%0Areturn%20rule.propertyInfo%3B%0A%7D%0Avar%20info%20%3D%20%7B%7D%2C%20properties%20%3D%20%7B%7D%3B%0Avar%20hasProperties%20%3D%20this.collectProperties(rule%2C%20properties)%3B%0Aif%20(hasProperties)%20%7B%0Ainfo.properties%20%3D%20properties%3B%0Arule.rules%20%3D%20null%3B%0A%7D%0Ainfo.cssText%20%3D%20this.collectCssText(rule)%3B%0Arule.propertyInfo%20%3D%20info%3B%0Areturn%20info%3B%0A%7D%2C%0AcollectProperties%3A%20function%20(rule%2C%20properties)%20%7B%0Avar%20info%20%3D%20rule.propertyInfo%3B%0Aif%20(info)%20%7B%0Aif%20(info.properties)%20%7B%0APolymer.Base.mixin(properties%2C%20info.properties)%3B%0Areturn%20true%3B%0A%7D%0A%7D%20else%20%7B%0Avar%20m%2C%20rx%20%3D%20this.rx.VAR_ASSIGN%3B%0Avar%20cssText%20%3D%20rule.parsedCssText%3B%0Avar%20any%3B%0Awhile%20(m%20%3D%20rx.exec(cssText))%20%7B%0Aproperties%5Bm%5B1%5D%5D%20%3D%20(m%5B2%5D%20%7C%7C%20m%5B3%5D).trim()%3B%0Aany%20%3D%20true%3B%0A%7D%0Areturn%20any%3B%0A%7D%0A%7D%2C%0AcollectCssText%3A%20function%20(rule)%20%7B%0Areturn%20this.collectConsumingCssText(rule.parsedCssText)%3B%0A%7D%2C%0AcollectConsumingCssText%3A%20function%20(cssText)%20%7B%0Areturn%20cssText.replace(this.rx.BRACKETED%2C%20'').replace(this.rx.VAR_ASSIGN%2C%20'')%3B%0A%7D%2C%0AcollectPropertiesInCssText%3A%20function%20(cssText%2C%20props)%20%7B%0Avar%20m%3B%0Awhile%20(m%20%3D%20this.rx.VAR_CAPTURE.exec(cssText))%20%7B%0Aprops%5Bm%5B1%5D%5D%20%3D%20true%3B%0Avar%20def%20%3D%20m%5B2%5D%3B%0Aif%20(def%20%26%26%20def.match(this.rx.IS_VAR))%20%7B%0Aprops%5Bdef%5D%20%3D%20true%3B%0A%7D%0A%7D%0A%7D%2C%0Areify%3A%20function%20(props)%20%7B%0Avar%20names%20%3D%20Object.getOwnPropertyNames(props)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20names.length%3B%20i%2B%2B)%20%7B%0An%20%3D%20names%5Bi%5D%3B%0Aprops%5Bn%5D%20%3D%20this.valueForProperty(props%5Bn%5D%2C%20props)%3B%0A%7D%0A%7D%2C%0AvalueForProperty%3A%20function%20(property%2C%20props)%20%7B%0Aif%20(property)%20%7B%0Aif%20(property.indexOf('%3B')%20%3E%3D%200)%20%7B%0Aproperty%20%3D%20this.valueForProperties(property%2C%20props)%3B%0A%7D%20else%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20fn%20%3D%20function%20(all%2C%20prefix%2C%20value%2C%20fallback)%20%7B%0Avar%20propertyValue%20%3D%20self.valueForProperty(props%5Bvalue%5D%2C%20props)%20%7C%7C%20(props%5Bfallback%5D%20%3F%20self.valueForProperty(props%5Bfallback%5D%2C%20props)%20%3A%20fallback)%3B%0Areturn%20prefix%20%2B%20(propertyValue%20%7C%7C%20'')%3B%0A%7D%3B%0Aproperty%20%3D%20property.replace(this.rx.VAR_MATCH%2C%20fn)%3B%0A%7D%0A%7D%0Areturn%20property%20%26%26%20property.trim()%20%7C%7C%20''%3B%0A%7D%2C%0AvalueForProperties%3A%20function%20(property%2C%20props)%20%7B%0Avar%20parts%20%3D%20property.split('%3B')%3B%0Afor%20(var%20i%20%3D%200%2C%20p%2C%20m%3B%20i%20%3C%20parts.length%3B%20i%2B%2B)%20%7B%0Aif%20(p%20%3D%20parts%5Bi%5D)%20%7B%0Am%20%3D%20p.match(this.rx.MIXIN_MATCH)%3B%0Aif%20(m)%20%7B%0Ap%20%3D%20this.valueForProperty(props%5Bm%5B1%5D%5D%2C%20props)%3B%0A%7D%20else%20%7B%0Avar%20colon%20%3D%20p.indexOf('%3A')%3B%0Aif%20(colon%20!%3D%3D%20-1)%20%7B%0Avar%20pp%20%3D%20p.substring(colon)%3B%0App%20%3D%20pp.trim()%3B%0App%20%3D%20this.valueForProperty(pp%2C%20props)%20%7C%7C%20pp%3B%0Ap%20%3D%20p.substring(0%2C%20colon)%20%2B%20pp%3B%0A%7D%0A%7D%0Aparts%5Bi%5D%20%3D%20p%20%26%26%20p.lastIndexOf('%3B')%20%3D%3D%3D%20p.length%20-%201%20%3F%20p.slice(0%2C%20-1)%20%3A%20p%20%7C%7C%20''%3B%0A%7D%0A%7D%0Areturn%20parts.join('%3B')%3B%0A%7D%2C%0AapplyProperties%3A%20function%20(rule%2C%20props)%20%7B%0Avar%20output%20%3D%20''%3B%0Aif%20(!rule.propertyInfo)%20%7B%0Athis.decorateRule(rule)%3B%0A%7D%0Aif%20(rule.propertyInfo.cssText)%20%7B%0Aoutput%20%3D%20this.valueForProperties(rule.propertyInfo.cssText%2C%20props)%3B%0A%7D%0Arule.cssText%20%3D%20output%3B%0A%7D%2C%0AapplyKeyframeTransforms%3A%20function%20(rule%2C%20keyframeTransforms)%20%7B%0Avar%20input%20%3D%20rule.cssText%3B%0Avar%20output%20%3D%20rule.cssText%3B%0Aif%20(rule.hasAnimations%20%3D%3D%20null)%20%7B%0Arule.hasAnimations%20%3D%20this.rx.ANIMATION_MATCH.test(input)%3B%0A%7D%0Aif%20(rule.hasAnimations)%20%7B%0Avar%20transform%3B%0Aif%20(rule.keyframeNamesToTransform%20%3D%3D%20null)%20%7B%0Arule.keyframeNamesToTransform%20%3D%20%5B%5D%3B%0Afor%20(var%20keyframe%20in%20keyframeTransforms)%20%7B%0Atransform%20%3D%20keyframeTransforms%5Bkeyframe%5D%3B%0Aoutput%20%3D%20transform(input)%3B%0Aif%20(input%20!%3D%3D%20output)%20%7B%0Ainput%20%3D%20output%3B%0Arule.keyframeNamesToTransform.push(keyframe)%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20rule.keyframeNamesToTransform.length%3B%20%2B%2Bi)%20%7B%0Atransform%20%3D%20keyframeTransforms%5Brule.keyframeNamesToTransform%5Bi%5D%5D%3B%0Ainput%20%3D%20transform(input)%3B%0A%7D%0Aoutput%20%3D%20input%3B%0A%7D%0A%7D%0Arule.cssText%20%3D%20output%3B%0A%7D%2C%0ApropertyDataFromStyles%3A%20function%20(styles%2C%20element)%20%7B%0Avar%20props%20%3D%20%7B%7D%2C%20self%20%3D%20this%3B%0Avar%20o%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0AstyleUtil.forRulesInStyles(styles%2C%20function%20(rule)%20%7B%0Aif%20(!rule.propertyInfo)%20%7B%0Aself.decorateRule(rule)%3B%0A%7D%0Aif%20(element%20%26%26%20rule.propertyInfo.properties%20%26%26%20matchesSelector.call(element%2C%20rule.transformedSelector%20%7C%7C%20rule.parsedSelector))%20%7B%0Aself.collectProperties(rule%2C%20props)%3B%0AaddToBitMask(i%2C%20o)%3B%0A%7D%0Ai%2B%2B%3B%0A%7D)%3B%0Areturn%20%7B%0Aproperties%3A%20props%2C%0Akey%3A%20o%0A%7D%3B%0A%7D%2C%0AscopePropertiesFromStyles%3A%20function%20(styles)%20%7B%0Aif%20(!styles._scopeStyleProperties)%20%7B%0Astyles._scopeStyleProperties%20%3D%20this.selectedPropertiesFromStyles(styles%2C%20this.SCOPE_SELECTORS)%3B%0A%7D%0Areturn%20styles._scopeStyleProperties%3B%0A%7D%2C%0AhostPropertiesFromStyles%3A%20function%20(styles)%20%7B%0Aif%20(!styles._hostStyleProperties)%20%7B%0Astyles._hostStyleProperties%20%3D%20this.selectedPropertiesFromStyles(styles%2C%20this.HOST_SELECTORS)%3B%0A%7D%0Areturn%20styles._hostStyleProperties%3B%0A%7D%2C%0AselectedPropertiesFromStyles%3A%20function%20(styles%2C%20selectors)%20%7B%0Avar%20props%20%3D%20%7B%7D%2C%20self%20%3D%20this%3B%0AstyleUtil.forRulesInStyles(styles%2C%20function%20(rule)%20%7B%0Aif%20(!rule.propertyInfo)%20%7B%0Aself.decorateRule(rule)%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20selectors.length%3B%20i%2B%2B)%20%7B%0Aif%20(rule.parsedSelector%20%3D%3D%3D%20selectors%5Bi%5D)%20%7B%0Aself.collectProperties(rule%2C%20props)%3B%0Areturn%3B%0A%7D%0A%7D%0A%7D)%3B%0Areturn%20props%3B%0A%7D%2C%0AtransformStyles%3A%20function%20(element%2C%20properties%2C%20scopeSelector)%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20hostSelector%20%3D%20styleTransformer._calcHostScope(element.is%2C%20element.extends)%3B%0Avar%20rxHostSelector%20%3D%20element.extends%20%3F%20'%5C%5C'%20%2B%20hostSelector.slice(0%2C%20-1)%20%2B%20'%5C%5C%5D'%20%3A%20hostSelector%3B%0Avar%20hostRx%20%3D%20new%20RegExp(this.rx.HOST_PREFIX%20%2B%20rxHostSelector%20%2B%20this.rx.HOST_SUFFIX)%3B%0Avar%20keyframeTransforms%20%3D%20this._elementKeyframeTransforms(element%2C%20scopeSelector)%3B%0Areturn%20styleTransformer.elementStyles(element%2C%20function%20(rule)%20%7B%0Aself.applyProperties(rule%2C%20properties)%3B%0Aif%20(!nativeShadow%20%26%26%20!Polymer.StyleUtil.isKeyframesSelector(rule)%20%26%26%20rule.cssText)%20%7B%0Aself.applyKeyframeTransforms(rule%2C%20keyframeTransforms)%3B%0Aself._scopeSelector(rule%2C%20hostRx%2C%20hostSelector%2C%20element._scopeCssViaAttr%2C%20scopeSelector)%3B%0A%7D%0A%7D)%3B%0A%7D%2C%0A_elementKeyframeTransforms%3A%20function%20(element%2C%20scopeSelector)%20%7B%0Avar%20keyframesRules%20%3D%20element._styles._keyframes%3B%0Avar%20keyframeTransforms%20%3D%20%7B%7D%3B%0Aif%20(!nativeShadow%20%26%26%20keyframesRules)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20keyframesRule%20%3D%20keyframesRules%5Bi%5D%3B%20i%20%3C%20keyframesRules.length%3B%20keyframesRule%20%3D%20keyframesRules%5B%2B%2Bi%5D)%20%7B%0Athis._scopeKeyframes(keyframesRule%2C%20scopeSelector)%3B%0AkeyframeTransforms%5BkeyframesRule.keyframesName%5D%20%3D%20this._keyframesRuleTransformer(keyframesRule)%3B%0A%7D%0A%7D%0Areturn%20keyframeTransforms%3B%0A%7D%2C%0A_keyframesRuleTransformer%3A%20function%20(keyframesRule)%20%7B%0Areturn%20function%20(cssText)%20%7B%0Areturn%20cssText.replace(keyframesRule.keyframesNameRx%2C%20keyframesRule.transformedKeyframesName)%3B%0A%7D%3B%0A%7D%2C%0A_scopeKeyframes%3A%20function%20(rule%2C%20scopeId)%20%7B%0Arule.keyframesNameRx%20%3D%20new%20RegExp(rule.keyframesName%2C%20'g')%3B%0Arule.transformedKeyframesName%20%3D%20rule.keyframesName%20%2B%20'-'%20%2B%20scopeId%3B%0Arule.transformedSelector%20%3D%20rule.transformedSelector%20%7C%7C%20rule.selector%3B%0Arule.selector%20%3D%20rule.transformedSelector.replace(rule.keyframesName%2C%20rule.transformedKeyframesName)%3B%0A%7D%2C%0A_scopeSelector%3A%20function%20(rule%2C%20hostRx%2C%20hostSelector%2C%20viaAttr%2C%20scopeId)%20%7B%0Arule.transformedSelector%20%3D%20rule.transformedSelector%20%7C%7C%20rule.selector%3B%0Avar%20selector%20%3D%20rule.transformedSelector%3B%0Avar%20scope%20%3D%20viaAttr%20%3F%20'%5B'%20%2B%20styleTransformer.SCOPE_NAME%20%2B%20'~%3D'%20%2B%20scopeId%20%2B%20'%5D'%20%3A%20'.'%20%2B%20scopeId%3B%0Avar%20parts%20%3D%20selector.split('%2C')%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20parts.length%2C%20p%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20parts%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparts%5Bi%5D%20%3D%20p.match(hostRx)%20%3F%20p.replace(hostSelector%2C%20scope)%20%3A%20scope%20%2B%20'%20'%20%2B%20p%3B%0A%7D%0Arule.selector%20%3D%20parts.join('%2C')%3B%0A%7D%2C%0AapplyElementScopeSelector%3A%20function%20(element%2C%20selector%2C%20old%2C%20viaAttr)%20%7B%0Avar%20c%20%3D%20viaAttr%20%3F%20element.getAttribute(styleTransformer.SCOPE_NAME)%20%3A%20element.getAttribute('class')%20%7C%7C%20''%3B%0Avar%20v%20%3D%20old%20%3F%20c.replace(old%2C%20selector)%20%3A%20(c%20%3F%20c%20%2B%20'%20'%20%3A%20'')%20%2B%20this.XSCOPE_NAME%20%2B%20'%20'%20%2B%20selector%3B%0Aif%20(c%20!%3D%3D%20v)%20%7B%0Aif%20(viaAttr)%20%7B%0Aelement.setAttribute(styleTransformer.SCOPE_NAME%2C%20v)%3B%0A%7D%20else%20%7B%0Aelement.setAttribute('class'%2C%20v)%3B%0A%7D%0A%7D%0A%7D%2C%0AapplyElementStyle%3A%20function%20(element%2C%20properties%2C%20selector%2C%20style)%20%7B%0Avar%20cssText%20%3D%20style%20%3F%20style.textContent%20%7C%7C%20''%20%3A%20this.transformStyles(element%2C%20properties%2C%20selector)%3B%0Avar%20s%20%3D%20element._customStyle%3B%0Aif%20(s%20%26%26%20!nativeShadow%20%26%26%20s%20!%3D%3D%20style)%20%7B%0As._useCount--%3B%0Aif%20(s._useCount%20%3C%3D%200%20%26%26%20s.parentNode)%20%7B%0As.parentNode.removeChild(s)%3B%0A%7D%0A%7D%0Aif%20(nativeShadow%20%7C%7C%20(!style%20%7C%7C%20!style.parentNode))%20%7B%0Aif%20(nativeShadow%20%26%26%20element._customStyle)%20%7B%0Aelement._customStyle.textContent%20%3D%20cssText%3B%0Astyle%20%3D%20element._customStyle%3B%0A%7D%20else%20if%20(cssText)%20%7B%0Astyle%20%3D%20styleUtil.applyCss(cssText%2C%20selector%2C%20nativeShadow%20%3F%20element.root%20%3A%20null%2C%20element._scopeStyle)%3B%0A%7D%0A%7D%0Aif%20(style)%20%7B%0Astyle._useCount%20%3D%20style._useCount%20%7C%7C%200%3B%0Aif%20(element._customStyle%20!%3D%20style)%20%7B%0Astyle._useCount%2B%2B%3B%0A%7D%0Aelement._customStyle%20%3D%20style%3B%0A%7D%0Areturn%20style%3B%0A%7D%2C%0AmixinCustomStyle%3A%20function%20(props%2C%20customStyle)%20%7B%0Avar%20v%3B%0Afor%20(var%20i%20in%20customStyle)%20%7B%0Av%20%3D%20customStyle%5Bi%5D%3B%0Aif%20(v%20%7C%7C%20v%20%3D%3D%3D%200)%20%7B%0Aprops%5Bi%5D%20%3D%20v%3B%0A%7D%0A%7D%0A%7D%2C%0Arx%3A%20%7B%0AVAR_ASSIGN%3A%20%2F(%3F%3A%5E%7C%5B%3B%5Cs%7B%5D%5Cs*)(--%5B%5Cw-%5D*%3F)%5Cs*%3A%5Cs*(%3F%3A(%5B%5E%3B%7B%5D*)%7C%7B(%5B%5E%7D%5D*)%7D)(%3F%3A(%3F%3D%5B%3B%5Cs%7D%5D)%7C%24)%2Fgi%2C%0AMIXIN_MATCH%3A%20%2F(%3F%3A%5E%7C%5CW%2B)%40apply%5B%5Cs%5D*%5C((%5B%5E)%5D*)%5C)%2Fi%2C%0AVAR_MATCH%3A%20%2F(%5E%7C%5CW%2B)var%5C(%5B%5Cs%5D*(%5B%5E%2C)%5D*)%5B%5Cs%5D*%2C%3F%5B%5Cs%5D*((%3F%3A%5B%5E%2C()%5D*)%7C(%3F%3A%5B%5E%3B()%5D*%5C(%5B%5E%3B)%5D*%5C)))%5B%5Cs%5D*%3F%5C)%2Fgi%2C%0AVAR_CAPTURE%3A%20%2F%5C(%5B%5Cs%5D*(--%5B%5E%2C%5Cs)%5D*)(%3F%3A%2C%5B%5Cs%5D*(--%5B%5E%2C%5Cs)%5D*))%3F(%3F%3A%5C)%7C%2C)%2Fgi%2C%0AANIMATION_MATCH%3A%20%2F(animation%5Cs*%3A)%7C(animation-name%5Cs*%3A)%2F%2C%0AIS_VAR%3A%20%2F%5E--%2F%2C%0ABRACKETED%3A%20%2F%5C%7B%5B%5E%7D%5D*%5C%7D%2Fg%2C%0AHOST_PREFIX%3A%20'(%3F%3A%5E%7C%5B%5E.%23%5B%3A%5D)'%2C%0AHOST_SUFFIX%3A%20'(%24%7C%5B.%3A%5B%5C%5Cs%3E%2B~%5D)'%0A%7D%2C%0AHOST_SELECTORS%3A%20%5B'%3Ahost'%5D%2C%0ASCOPE_SELECTORS%3A%20%5B'%3Aroot'%5D%2C%0AXSCOPE_NAME%3A%20'x-scope'%0A%7D%3B%0Afunction%20addToBitMask(n%2C%20bits)%20%7B%0Avar%20o%20%3D%20parseInt(n%20%2F%2032)%3B%0Avar%20v%20%3D%201%20%3C%3C%20n%20%25%2032%3B%0Abits%5Bo%5D%20%3D%20(bits%5Bo%5D%20%7C%7C%200)%20%7C%20v%3B%0A%7D%0A%7D()%3B%0A(function%20()%20%7B%0APolymer.StyleCache%20%3D%20function%20()%20%7B%0Athis.cache%20%3D%20%7B%7D%3B%0A%7D%3B%0APolymer.StyleCache.prototype%20%3D%20%7B%0AMAX%3A%20100%2C%0Astore%3A%20function%20(is%2C%20data%2C%20keyValues%2C%20keyStyles)%20%7B%0Adata.keyValues%20%3D%20keyValues%3B%0Adata.styles%20%3D%20keyStyles%3B%0Avar%20s%24%20%3D%20this.cache%5Bis%5D%20%3D%20this.cache%5Bis%5D%20%7C%7C%20%5B%5D%3B%0As%24.push(data)%3B%0Aif%20(s%24.length%20%3E%20this.MAX)%20%7B%0As%24.shift()%3B%0A%7D%0A%7D%2C%0Aretrieve%3A%20function%20(is%2C%20keyValues%2C%20keyStyles)%20%7B%0Avar%20cache%20%3D%20this.cache%5Bis%5D%3B%0Aif%20(cache)%20%7B%0Afor%20(var%20i%20%3D%20cache.length%20-%201%2C%20data%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Adata%20%3D%20cache%5Bi%5D%3B%0Aif%20(keyStyles%20%3D%3D%3D%20data.styles%20%26%26%20this._objectsEqual(keyValues%2C%20data.keyValues))%20%7B%0Areturn%20data%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0Aclear%3A%20function%20()%20%7B%0Athis.cache%20%3D%20%7B%7D%3B%0A%7D%2C%0A_objectsEqual%3A%20function%20(target%2C%20source)%20%7B%0Avar%20t%2C%20s%3B%0Afor%20(var%20i%20in%20target)%20%7B%0At%20%3D%20target%5Bi%5D%2C%20s%20%3D%20source%5Bi%5D%3B%0Aif%20(!(typeof%20t%20%3D%3D%3D%20'object'%20%26%26%20t%20%3F%20this._objectsStrictlyEqual(t%2C%20s)%20%3A%20t%20%3D%3D%3D%20s))%20%7B%0Areturn%20false%3B%0A%7D%0A%7D%0Aif%20(Array.isArray(target))%20%7B%0Areturn%20target.length%20%3D%3D%3D%20source.length%3B%0A%7D%0Areturn%20true%3B%0A%7D%2C%0A_objectsStrictlyEqual%3A%20function%20(target%2C%20source)%20%7B%0Areturn%20this._objectsEqual(target%2C%20source)%20%26%26%20this._objectsEqual(source%2C%20target)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0APolymer.StyleDefaults%20%3D%20function%20()%20%7B%0Avar%20styleProperties%20%3D%20Polymer.StyleProperties%3B%0Avar%20StyleCache%20%3D%20Polymer.StyleCache%3B%0Avar%20api%20%3D%20%7B%0A_styles%3A%20%5B%5D%2C%0A_properties%3A%20null%2C%0AcustomStyle%3A%20%7B%7D%2C%0A_styleCache%3A%20new%20StyleCache()%2C%0AaddStyle%3A%20function%20(style)%20%7B%0Athis._styles.push(style)%3B%0Athis._properties%20%3D%20null%3B%0A%7D%2C%0Aget%20_styleProperties()%20%7B%0Aif%20(!this._properties)%20%7B%0AstyleProperties.decorateStyles(this._styles)%3B%0Athis._styles._scopeStyleProperties%20%3D%20null%3B%0Athis._properties%20%3D%20styleProperties.scopePropertiesFromStyles(this._styles)%3B%0AstyleProperties.mixinCustomStyle(this._properties%2C%20this.customStyle)%3B%0AstyleProperties.reify(this._properties)%3B%0A%7D%0Areturn%20this._properties%3B%0A%7D%2C%0A_needsStyleProperties%3A%20function%20()%20%7B%0A%7D%2C%0A_computeStyleProperties%3A%20function%20()%20%7B%0Areturn%20this._styleProperties%3B%0A%7D%2C%0AupdateStyles%3A%20function%20(properties)%20%7B%0Athis._properties%20%3D%20null%3B%0Aif%20(properties)%20%7B%0APolymer.Base.mixin(this.customStyle%2C%20properties)%3B%0A%7D%0Athis._styleCache.clear()%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20this._styles.length%3B%20i%2B%2B)%20%7B%0As%20%3D%20this._styles%5Bi%5D%3B%0As%20%3D%20s.__importElement%20%7C%7C%20s%3B%0As._apply()%3B%0A%7D%0A%7D%0A%7D%3B%0Areturn%20api%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20serializeValueToAttribute%20%3D%20Polymer.Base.serializeValueToAttribute%3B%0Avar%20propertyUtils%20%3D%20Polymer.StyleProperties%3B%0Avar%20styleTransformer%20%3D%20Polymer.StyleTransformer%3B%0Avar%20styleDefaults%20%3D%20Polymer.StyleDefaults%3B%0Avar%20nativeShadow%20%3D%20Polymer.Settings.useNativeShadow%3B%0APolymer.Base._addFeature(%7B%0A_prepStyleProperties%3A%20function%20()%20%7B%0Athis._ownStylePropertyNames%20%3D%20this._styles%20%26%26%20this._styles.length%20%3F%20propertyUtils.decorateStyles(this._styles)%20%3A%20null%3B%0A%7D%2C%0AcustomStyle%3A%20null%2C%0AgetComputedStyleValue%3A%20function%20(property)%20%7B%0Areturn%20this._styleProperties%20%26%26%20this._styleProperties%5Bproperty%5D%20%7C%7C%20getComputedStyle(this).getPropertyValue(property)%3B%0A%7D%2C%0A_setupStyleProperties%3A%20function%20()%20%7B%0Athis.customStyle%20%3D%20%7B%7D%3B%0Athis._styleCache%20%3D%20null%3B%0Athis._styleProperties%20%3D%20null%3B%0Athis._scopeSelector%20%3D%20null%3B%0Athis._ownStyleProperties%20%3D%20null%3B%0Athis._customStyle%20%3D%20null%3B%0A%7D%2C%0A_needsStyleProperties%3A%20function%20()%20%7B%0Areturn%20Boolean(this._ownStylePropertyNames%20%26%26%20this._ownStylePropertyNames.length)%3B%0A%7D%2C%0A_beforeAttached%3A%20function%20()%20%7B%0Aif%20(!this._scopeSelector%20%26%26%20this._needsStyleProperties())%20%7B%0Athis._updateStyleProperties()%3B%0A%7D%0A%7D%2C%0A_findStyleHost%3A%20function%20()%20%7B%0Avar%20e%20%3D%20this%2C%20root%3B%0Awhile%20(root%20%3D%20Polymer.dom(e).getOwnerRoot())%20%7B%0Aif%20(Polymer.isInstance(root.host))%20%7B%0Areturn%20root.host%3B%0A%7D%0Ae%20%3D%20root.host%3B%0A%7D%0Areturn%20styleDefaults%3B%0A%7D%2C%0A_updateStyleProperties%3A%20function%20()%20%7B%0Avar%20info%2C%20scope%20%3D%20this._findStyleHost()%3B%0Aif%20(!scope._styleCache)%20%7B%0Ascope._styleCache%20%3D%20new%20Polymer.StyleCache()%3B%0A%7D%0Avar%20scopeData%20%3D%20propertyUtils.propertyDataFromStyles(scope._styles%2C%20this)%3B%0AscopeData.key.customStyle%20%3D%20this.customStyle%3B%0Ainfo%20%3D%20scope._styleCache.retrieve(this.is%2C%20scopeData.key%2C%20this._styles)%3B%0Avar%20scopeCached%20%3D%20Boolean(info)%3B%0Aif%20(scopeCached)%20%7B%0Athis._styleProperties%20%3D%20info._styleProperties%3B%0A%7D%20else%20%7B%0Athis._computeStyleProperties(scopeData.properties)%3B%0A%7D%0Athis._computeOwnStyleProperties()%3B%0Aif%20(!scopeCached)%20%7B%0Ainfo%20%3D%20styleCache.retrieve(this.is%2C%20this._ownStyleProperties%2C%20this._styles)%3B%0A%7D%0Avar%20globalCached%20%3D%20Boolean(info)%20%26%26%20!scopeCached%3B%0Avar%20style%20%3D%20this._applyStyleProperties(info)%3B%0Aif%20(!scopeCached)%20%7B%0Astyle%20%3D%20style%20%26%26%20nativeShadow%20%3F%20style.cloneNode(true)%20%3A%20style%3B%0Ainfo%20%3D%20%7B%0Astyle%3A%20style%2C%0A_scopeSelector%3A%20this._scopeSelector%2C%0A_styleProperties%3A%20this._styleProperties%0A%7D%3B%0AscopeData.key.customStyle%20%3D%20%7B%7D%3B%0Athis.mixin(scopeData.key.customStyle%2C%20this.customStyle)%3B%0Ascope._styleCache.store(this.is%2C%20info%2C%20scopeData.key%2C%20this._styles)%3B%0Aif%20(!globalCached)%20%7B%0AstyleCache.store(this.is%2C%20Object.create(info)%2C%20this._ownStyleProperties%2C%20this._styles)%3B%0A%7D%0A%7D%0A%7D%2C%0A_computeStyleProperties%3A%20function%20(scopeProps)%20%7B%0Avar%20scope%20%3D%20this._findStyleHost()%3B%0Aif%20(!scope._styleProperties)%20%7B%0Ascope._computeStyleProperties()%3B%0A%7D%0Avar%20props%20%3D%20Object.create(scope._styleProperties)%3B%0Athis.mixin(props%2C%20propertyUtils.hostPropertiesFromStyles(this._styles))%3B%0AscopeProps%20%3D%20scopeProps%20%7C%7C%20propertyUtils.propertyDataFromStyles(scope._styles%2C%20this).properties%3B%0Athis.mixin(props%2C%20scopeProps)%3B%0Athis.mixin(props%2C%20propertyUtils.scopePropertiesFromStyles(this._styles))%3B%0ApropertyUtils.mixinCustomStyle(props%2C%20this.customStyle)%3B%0ApropertyUtils.reify(props)%3B%0Athis._styleProperties%20%3D%20props%3B%0A%7D%2C%0A_computeOwnStyleProperties%3A%20function%20()%20%7B%0Avar%20props%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20this._ownStylePropertyNames.length%3B%20i%2B%2B)%20%7B%0An%20%3D%20this._ownStylePropertyNames%5Bi%5D%3B%0Aprops%5Bn%5D%20%3D%20this._styleProperties%5Bn%5D%3B%0A%7D%0Athis._ownStyleProperties%20%3D%20props%3B%0A%7D%2C%0A_scopeCount%3A%200%2C%0A_applyStyleProperties%3A%20function%20(info)%20%7B%0Avar%20oldScopeSelector%20%3D%20this._scopeSelector%3B%0Athis._scopeSelector%20%3D%20info%20%3F%20info._scopeSelector%20%3A%20this.is%20%2B%20'-'%20%2B%20this.__proto__._scopeCount%2B%2B%3B%0Avar%20style%20%3D%20propertyUtils.applyElementStyle(this%2C%20this._styleProperties%2C%20this._scopeSelector%2C%20info%20%26%26%20info.style)%3B%0Aif%20(!nativeShadow)%20%7B%0ApropertyUtils.applyElementScopeSelector(this%2C%20this._scopeSelector%2C%20oldScopeSelector%2C%20this._scopeCssViaAttr)%3B%0A%7D%0Areturn%20style%3B%0A%7D%2C%0AserializeValueToAttribute%3A%20function%20(value%2C%20attribute%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(attribute%20%3D%3D%3D%20'class'%20%26%26%20!nativeShadow)%20%7B%0Avar%20host%20%3D%20node%20%3D%3D%3D%20this%20%3F%20this.domHost%20%7C%7C%20this.dataHost%20%3A%20this%3B%0Aif%20(host)%20%7B%0Avalue%20%3D%20host._scopeElementClass(node%2C%20value)%3B%0A%7D%0A%7D%0Anode%20%3D%20this.shadyRoot%20%26%26%20this.shadyRoot._hasDistributed%20%3F%20Polymer.dom(node)%20%3A%20node%3B%0AserializeValueToAttribute.call(this%2C%20value%2C%20attribute%2C%20node)%3B%0A%7D%2C%0A_scopeElementClass%3A%20function%20(element%2C%20selector)%20%7B%0Aif%20(!nativeShadow%20%26%26%20!this._scopeCssViaAttr)%20%7B%0Aselector%20%3D%20(selector%20%3F%20selector%20%2B%20'%20'%20%3A%20'')%20%2B%20SCOPE_NAME%20%2B%20'%20'%20%2B%20this.is%20%2B%20(element._scopeSelector%20%3F%20'%20'%20%2B%20XSCOPE_NAME%20%2B%20'%20'%20%2B%20element._scopeSelector%20%3A%20'')%3B%0A%7D%0Areturn%20selector%3B%0A%7D%2C%0AupdateStyles%3A%20function%20(properties)%20%7B%0Aif%20(this.isAttached)%20%7B%0Aif%20(properties)%20%7B%0Athis.mixin(this.customStyle%2C%20properties)%3B%0A%7D%0Aif%20(this._needsStyleProperties())%20%7B%0Athis._updateStyleProperties()%3B%0A%7D%20else%20%7B%0Athis._styleProperties%20%3D%20null%3B%0A%7D%0Aif%20(this._styleCache)%20%7B%0Athis._styleCache.clear()%3B%0A%7D%0Athis._updateRootStyles()%3B%0A%7D%0A%7D%2C%0A_updateRootStyles%3A%20function%20(root)%20%7B%0Aroot%20%3D%20root%20%7C%7C%20this.root%3B%0Avar%20c%24%20%3D%20Polymer.dom(root)._query(function%20(e)%20%7B%0Areturn%20e.shadyRoot%20%7C%7C%20e.shadowRoot%3B%0A%7D)%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.updateStyles)%20%7B%0Ac.updateStyles()%3B%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer.updateStyles%20%3D%20function%20(properties)%20%7B%0AstyleDefaults.updateStyles(properties)%3B%0APolymer.Base._updateRootStyles(document)%3B%0A%7D%3B%0Avar%20styleCache%20%3D%20new%20Polymer.StyleCache()%3B%0APolymer.customStyleCache%20%3D%20styleCache%3B%0Avar%20SCOPE_NAME%20%3D%20styleTransformer.SCOPE_NAME%3B%0Avar%20XSCOPE_NAME%20%3D%20propertyUtils.XSCOPE_NAME%3B%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepConstructor()%3B%0Athis._prepTemplate()%3B%0Athis._prepStyles()%3B%0Athis._prepAnnotations()%3B%0Athis._prepEffects()%3B%0Athis._prepBehaviors()%3B%0Athis._prepPropertyInfo()%3B%0Athis._prepBindings()%3B%0Athis._prepShady()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addPropertyEffects(b.properties)%3B%0Athis._addComplexObserverEffects(b.observers)%3B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._setupGestures()%3B%0Athis._setupConfigure()%3B%0Athis._setupStyleProperties()%3B%0Athis._setupDebouncers()%3B%0Athis._setupShady()%3B%0Athis._registerHost()%3B%0Aif%20(this._template)%20%7B%0Athis._poolContent()%3B%0Athis._beginHosting()%3B%0Athis._stampTemplate()%3B%0Athis._endHosting()%3B%0Athis._marshalAnnotationReferences()%3B%0A%7D%0Athis._marshalInstanceEffects()%3B%0Athis._marshalBehaviors()%3B%0Athis._marshalHostAttributes()%3B%0Athis._marshalAttributes()%3B%0Athis._tryReady()%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0Aif%20(b.listeners)%20%7B%0Athis._listenListeners(b.listeners)%3B%0A%7D%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0Avar%20propertyUtils%20%3D%20Polymer.StyleProperties%3B%0Avar%20styleUtil%20%3D%20Polymer.StyleUtil%3B%0Avar%20cssParse%20%3D%20Polymer.CssParse%3B%0Avar%20styleDefaults%20%3D%20Polymer.StyleDefaults%3B%0Avar%20styleTransformer%20%3D%20Polymer.StyleTransformer%3B%0APolymer(%7B%0Ais%3A%20'custom-style'%2C%0Aextends%3A%20'style'%2C%0A_template%3A%20null%2C%0Aproperties%3A%20%7B%20include%3A%20String%20%7D%2C%0Aready%3A%20function%20()%20%7B%0Athis._tryApply()%3B%0A%7D%2C%0Aattached%3A%20function%20()%20%7B%0Athis._tryApply()%3B%0A%7D%2C%0A_tryApply%3A%20function%20()%20%7B%0Aif%20(!this._appliesToDocument)%20%7B%0Aif%20(this.parentNode%20%26%26%20this.parentNode.localName%20!%3D%3D%20'dom-module')%20%7B%0Athis._appliesToDocument%20%3D%20true%3B%0Avar%20e%20%3D%20this.__appliedElement%20%7C%7C%20this%3B%0AstyleDefaults.addStyle(e)%3B%0Aif%20(e.textContent%20%7C%7C%20this.include)%20%7B%0Athis._apply(true)%3B%0A%7D%20else%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20observer%20%3D%20new%20MutationObserver(function%20()%20%7B%0Aobserver.disconnect()%3B%0Aself._apply(true)%3B%0A%7D)%3B%0Aobserver.observe(e%2C%20%7B%20childList%3A%20true%20%7D)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_apply%3A%20function%20(deferProperties)%20%7B%0Avar%20e%20%3D%20this.__appliedElement%20%7C%7C%20this%3B%0Aif%20(this.include)%20%7B%0Ae.textContent%20%3D%20styleUtil.cssFromModules(this.include%2C%20true)%20%2B%20e.textContent%3B%0A%7D%0Aif%20(e.textContent)%20%7B%0AstyleUtil.forEachRule(styleUtil.rulesForStyle(e)%2C%20function%20(rule)%20%7B%0AstyleTransformer.documentRule(rule)%3B%0A%7D)%3B%0Avar%20self%20%3D%20this%3B%0Avar%20fn%20%3D%20function%20fn()%20%7B%0Aself._applyCustomProperties(e)%3B%0A%7D%3B%0Aif%20(this._pendingApplyProperties)%20%7B%0AcancelAnimationFrame(this._pendingApplyProperties)%3B%0Athis._pendingApplyProperties%20%3D%20null%3B%0A%7D%0Aif%20(deferProperties)%20%7B%0Athis._pendingApplyProperties%20%3D%20requestAnimationFrame(fn)%3B%0A%7D%20else%20%7B%0Afn()%3B%0A%7D%0A%7D%0A%7D%2C%0A_applyCustomProperties%3A%20function%20(element)%20%7B%0Athis._computeStyleProperties()%3B%0Avar%20props%20%3D%20this._styleProperties%3B%0Avar%20rules%20%3D%20styleUtil.rulesForStyle(element)%3B%0Aelement.textContent%20%3D%20styleUtil.toCssText(rules%2C%20function%20(rule)%20%7B%0Avar%20css%20%3D%20rule.cssText%20%3D%20rule.parsedCssText%3B%0Aif%20(rule.propertyInfo%20%26%26%20rule.propertyInfo.cssText)%20%7B%0Acss%20%3D%20cssParse.removeCustomPropAssignment(css)%3B%0Arule.cssText%20%3D%20propertyUtils.valueForProperties(css%2C%20props)%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.Templatizer%20%3D%20%7B%0Aproperties%3A%20%7B%20__hideTemplateChildren__%3A%20%7B%20observer%3A%20'_showHideChildren'%20%7D%20%7D%2C%0A_instanceProps%3A%20Polymer.nob%2C%0A_parentPropPrefix%3A%20'_parent_'%2C%0Atemplatize%3A%20function%20(template)%20%7B%0Athis._templatized%20%3D%20template%3B%0Aif%20(!template._content)%20%7B%0Atemplate._content%20%3D%20template.content%3B%0A%7D%0Aif%20(template._content._ctor)%20%7B%0Athis.ctor%20%3D%20template._content._ctor%3B%0Athis._prepParentProperties(this.ctor.prototype%2C%20template)%3B%0Areturn%3B%0A%7D%0Avar%20archetype%20%3D%20Object.create(Polymer.Base)%3B%0Athis._customPrepAnnotations(archetype%2C%20template)%3B%0Athis._prepParentProperties(archetype%2C%20template)%3B%0Aarchetype._prepEffects()%3B%0Athis._customPrepEffects(archetype)%3B%0Aarchetype._prepBehaviors()%3B%0Aarchetype._prepPropertyInfo()%3B%0Aarchetype._prepBindings()%3B%0Aarchetype._notifyPathUp%20%3D%20this._notifyPathUpImpl%3B%0Aarchetype._scopeElementClass%20%3D%20this._scopeElementClassImpl%3B%0Aarchetype.listen%20%3D%20this._listenImpl%3B%0Aarchetype._showHideChildren%20%3D%20this._showHideChildrenImpl%3B%0Aarchetype.__setPropertyOrig%20%3D%20this.__setProperty%3B%0Aarchetype.__setProperty%20%3D%20this.__setPropertyImpl%3B%0Avar%20_constructor%20%3D%20this._constructorImpl%3B%0Avar%20ctor%20%3D%20function%20TemplateInstance(model%2C%20host)%20%7B%0A_constructor.call(this%2C%20model%2C%20host)%3B%0A%7D%3B%0Actor.prototype%20%3D%20archetype%3B%0Aarchetype.constructor%20%3D%20ctor%3B%0Atemplate._content._ctor%20%3D%20ctor%3B%0Athis.ctor%20%3D%20ctor%3B%0A%7D%2C%0A_getRootDataHost%3A%20function%20()%20%7B%0Areturn%20this.dataHost%20%26%26%20this.dataHost._rootDataHost%20%7C%7C%20this.dataHost%3B%0A%7D%2C%0A_showHideChildrenImpl%3A%20function%20(hide)%20%7B%0Avar%20c%20%3D%20this._children%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c.length%3B%20i%2B%2B)%20%7B%0Avar%20n%20%3D%20c%5Bi%5D%3B%0Aif%20(Boolean(hide)%20!%3D%20Boolean(n.__hideTemplateChildren__))%20%7B%0Aif%20(n.nodeType%20%3D%3D%3D%20Node.TEXT_NODE)%20%7B%0Aif%20(hide)%20%7B%0An.__polymerTextContent__%20%3D%20n.textContent%3B%0An.textContent%20%3D%20''%3B%0A%7D%20else%20%7B%0An.textContent%20%3D%20n.__polymerTextContent__%3B%0A%7D%0A%7D%20else%20if%20(n.style)%20%7B%0Aif%20(hide)%20%7B%0An.__polymerDisplay__%20%3D%20n.style.display%3B%0An.style.display%20%3D%20'none'%3B%0A%7D%20else%20%7B%0An.style.display%20%3D%20n.__polymerDisplay__%3B%0A%7D%0A%7D%0A%7D%0An.__hideTemplateChildren__%20%3D%20hide%3B%0A%7D%0A%7D%2C%0A__setPropertyImpl%3A%20function%20(property%2C%20value%2C%20fromAbove%2C%20node)%20%7B%0Aif%20(node%20%26%26%20node.__hideTemplateChildren__%20%26%26%20property%20%3D%3D%20'textContent')%20%7B%0Aproperty%20%3D%20'__polymerTextContent__'%3B%0A%7D%0Athis.__setPropertyOrig(property%2C%20value%2C%20fromAbove%2C%20node)%3B%0A%7D%2C%0A_debounceTemplate%3A%20function%20(fn)%20%7B%0APolymer.dom.addDebouncer(this.debounce('_debounceTemplate'%2C%20fn))%3B%0A%7D%2C%0A_flushTemplates%3A%20function%20()%20%7B%0APolymer.dom.flush()%3B%0A%7D%2C%0A_customPrepEffects%3A%20function%20(archetype)%20%7B%0Avar%20parentProps%20%3D%20archetype._parentProps%3B%0Afor%20(var%20prop%20in%20parentProps)%20%7B%0Aarchetype._addPropertyEffect(prop%2C%20'function'%2C%20this._createHostPropEffector(prop))%3B%0A%7D%0Afor%20(prop%20in%20this._instanceProps)%20%7B%0Aarchetype._addPropertyEffect(prop%2C%20'function'%2C%20this._createInstancePropEffector(prop))%3B%0A%7D%0A%7D%2C%0A_customPrepAnnotations%3A%20function%20(archetype%2C%20template)%20%7B%0Aarchetype._template%20%3D%20template%3B%0Avar%20c%20%3D%20template._content%3B%0Aif%20(!c._notes)%20%7B%0Avar%20rootDataHost%20%3D%20archetype._rootDataHost%3B%0Aif%20(rootDataHost)%20%7B%0APolymer.Annotations.prepElement%20%3D%20function%20()%20%7B%0ArootDataHost._prepElement()%3B%0A%7D%3B%0A%7D%0Ac._notes%20%3D%20Polymer.Annotations.parseAnnotations(template)%3B%0APolymer.Annotations.prepElement%20%3D%20null%3B%0Athis._processAnnotations(c._notes)%3B%0A%7D%0Aarchetype._notes%20%3D%20c._notes%3B%0Aarchetype._parentProps%20%3D%20c._parentProps%3B%0A%7D%2C%0A_prepParentProperties%3A%20function%20(archetype%2C%20template)%20%7B%0Avar%20parentProps%20%3D%20this._parentProps%20%3D%20archetype._parentProps%3B%0Aif%20(this._forwardParentProp%20%26%26%20parentProps)%20%7B%0Avar%20proto%20%3D%20archetype._parentPropProto%3B%0Avar%20prop%3B%0Aif%20(!proto)%20%7B%0Afor%20(prop%20in%20this._instanceProps)%20%7B%0Adelete%20parentProps%5Bprop%5D%3B%0A%7D%0Aproto%20%3D%20archetype._parentPropProto%20%3D%20Object.create(null)%3B%0Aif%20(template%20!%3D%20this)%20%7B%0APolymer.Bind.prepareModel(proto)%3B%0APolymer.Base.prepareModelNotifyPath(proto)%3B%0A%7D%0Afor%20(prop%20in%20parentProps)%20%7B%0Avar%20parentProp%20%3D%20this._parentPropPrefix%20%2B%20prop%3B%0Avar%20effects%20%3D%20%5B%0A%7B%0Akind%3A%20'function'%2C%0Aeffect%3A%20this._createForwardPropEffector(prop)%2C%0Afn%3A%20Polymer.Bind._functionEffect%0A%7D%2C%0A%7B%0Akind%3A%20'notify'%2C%0Afn%3A%20Polymer.Bind._notifyEffect%2C%0Aeffect%3A%20%7B%20event%3A%20Polymer.CaseMap.camelToDashCase(parentProp)%20%2B%20'-changed'%20%7D%0A%7D%0A%5D%3B%0APolymer.Bind._createAccessors(proto%2C%20parentProp%2C%20effects)%3B%0A%7D%0A%7D%0Avar%20self%20%3D%20this%3B%0Aif%20(template%20!%3D%20this)%20%7B%0APolymer.Bind.prepareInstance(template)%3B%0Atemplate._forwardParentProp%20%3D%20function%20(source%2C%20value)%20%7B%0Aself._forwardParentProp(source%2C%20value)%3B%0A%7D%3B%0A%7D%0Athis._extendTemplate(template%2C%20proto)%3B%0Atemplate._pathEffector%20%3D%20function%20(path%2C%20value%2C%20fromAbove)%20%7B%0Areturn%20self._pathEffectorImpl(path%2C%20value%2C%20fromAbove)%3B%0A%7D%3B%0A%7D%0A%7D%2C%0A_createForwardPropEffector%3A%20function%20(prop)%20%7B%0Areturn%20function%20(source%2C%20value)%20%7B%0Athis._forwardParentProp(prop%2C%20value)%3B%0A%7D%3B%0A%7D%2C%0A_createHostPropEffector%3A%20function%20(prop)%20%7B%0Avar%20prefix%20%3D%20this._parentPropPrefix%3B%0Areturn%20function%20(source%2C%20value)%20%7B%0Athis.dataHost._templatized%5Bprefix%20%2B%20prop%5D%20%3D%20value%3B%0A%7D%3B%0A%7D%2C%0A_createInstancePropEffector%3A%20function%20(prop)%20%7B%0Areturn%20function%20(source%2C%20value%2C%20old%2C%20fromAbove)%20%7B%0Aif%20(!fromAbove)%20%7B%0Athis.dataHost._forwardInstanceProp(this%2C%20prop%2C%20value)%3B%0A%7D%0A%7D%3B%0A%7D%2C%0A_extendTemplate%3A%20function%20(template%2C%20proto)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(proto)%3B%0Aif%20(proto._propertySetter)%20%7B%0Atemplate._propertySetter%20%3D%20proto._propertySetter%3B%0A%7D%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20val%20%3D%20template%5Bn%5D%3B%0Avar%20pd%20%3D%20Object.getOwnPropertyDescriptor(proto%2C%20n)%3B%0AObject.defineProperty(template%2C%20n%2C%20pd)%3B%0Aif%20(val%20!%3D%3D%20undefined)%20%7B%0Atemplate._propertySetter(n%2C%20val)%3B%0A%7D%0A%7D%0A%7D%2C%0A_showHideChildren%3A%20function%20(hidden)%20%7B%0A%7D%2C%0A_forwardInstancePath%3A%20function%20(inst%2C%20path%2C%20value)%20%7B%0A%7D%2C%0A_forwardInstanceProp%3A%20function%20(inst%2C%20prop%2C%20value)%20%7B%0A%7D%2C%0A_notifyPathUpImpl%3A%20function%20(path%2C%20value)%20%7B%0Avar%20dataHost%20%3D%20this.dataHost%3B%0Avar%20dot%20%3D%20path.indexOf('.')%3B%0Avar%20root%20%3D%20dot%20%3C%200%20%3F%20path%20%3A%20path.slice(0%2C%20dot)%3B%0AdataHost._forwardInstancePath.call(dataHost%2C%20this%2C%20path%2C%20value)%3B%0Aif%20(root%20in%20dataHost._parentProps)%20%7B%0AdataHost._templatized.notifyPath(dataHost._parentPropPrefix%20%2B%20path%2C%20value)%3B%0A%7D%0A%7D%2C%0A_pathEffectorImpl%3A%20function%20(path%2C%20value%2C%20fromAbove)%20%7B%0Aif%20(this._forwardParentPath)%20%7B%0Aif%20(path.indexOf(this._parentPropPrefix)%20%3D%3D%3D%200)%20%7B%0Avar%20subPath%20%3D%20path.substring(this._parentPropPrefix.length)%3B%0Avar%20model%20%3D%20this._modelForPath(subPath)%3B%0Aif%20(model%20in%20this._parentProps)%20%7B%0Athis._forwardParentPath(subPath%2C%20value)%3B%0A%7D%0A%7D%0A%7D%0APolymer.Base._pathEffector.call(this._templatized%2C%20path%2C%20value%2C%20fromAbove)%3B%0A%7D%2C%0A_constructorImpl%3A%20function%20(model%2C%20host)%20%7B%0Athis._rootDataHost%20%3D%20host._getRootDataHost()%3B%0Athis._setupConfigure(model)%3B%0Athis._registerHost(host)%3B%0Athis._beginHosting()%3B%0Athis.root%20%3D%20this.instanceTemplate(this._template)%3B%0Athis.root.__noContent%20%3D%20!this._notes._hasContent%3B%0Athis.root.__styleScoped%20%3D%20true%3B%0Athis._endHosting()%3B%0Athis._marshalAnnotatedNodes()%3B%0Athis._marshalInstanceEffects()%3B%0Athis._marshalAnnotatedListeners()%3B%0Avar%20children%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20this.root.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Achildren.push(n)%3B%0An._templateInstance%20%3D%20this%3B%0A%7D%0Athis._children%20%3D%20children%3B%0Aif%20(host.__hideTemplateChildren__)%20%7B%0Athis._showHideChildren(true)%3B%0A%7D%0Athis._tryReady()%3B%0A%7D%2C%0A_listenImpl%3A%20function%20(node%2C%20eventName%2C%20methodName)%20%7B%0Avar%20model%20%3D%20this%3B%0Avar%20host%20%3D%20this._rootDataHost%3B%0Avar%20handler%20%3D%20host._createEventHandler(node%2C%20eventName%2C%20methodName)%3B%0Avar%20decorated%20%3D%20function%20(e)%20%7B%0Ae.model%20%3D%20model%3B%0Ahandler(e)%3B%0A%7D%3B%0Ahost._listen(node%2C%20eventName%2C%20decorated)%3B%0A%7D%2C%0A_scopeElementClassImpl%3A%20function%20(node%2C%20value)%20%7B%0Avar%20host%20%3D%20this._rootDataHost%3B%0Aif%20(host)%20%7B%0Areturn%20host._scopeElementClass(node%2C%20value)%3B%0A%7D%0A%7D%2C%0Astamp%3A%20function%20(model)%20%7B%0Amodel%20%3D%20model%20%7C%7C%20%7B%7D%3B%0Aif%20(this._parentProps)%20%7B%0Avar%20templatized%20%3D%20this._templatized%3B%0Afor%20(var%20prop%20in%20this._parentProps)%20%7B%0Aif%20(model%5Bprop%5D%20%3D%3D%3D%20undefined)%20%7B%0Amodel%5Bprop%5D%20%3D%20templatized%5Bthis._parentPropPrefix%20%2B%20prop%5D%3B%0A%7D%0A%7D%0A%7D%0Areturn%20new%20this.ctor(model%2C%20this)%3B%0A%7D%2C%0AmodelForElement%3A%20function%20(el)%20%7B%0Avar%20model%3B%0Awhile%20(el)%20%7B%0Aif%20(model%20%3D%20el._templateInstance)%20%7B%0Aif%20(model.dataHost%20!%3D%20this)%20%7B%0Ael%20%3D%20model.dataHost%3B%0A%7D%20else%20%7B%0Areturn%20model%3B%0A%7D%0A%7D%20else%20%7B%0Ael%20%3D%20el.parentNode%3B%0A%7D%0A%7D%0A%7D%0A%7D%3B%0APolymer(%7B%0Ais%3A%20'dom-template'%2C%0Aextends%3A%20'template'%2C%0A_template%3A%20null%2C%0Abehaviors%3A%20%5BPolymer.Templatizer%5D%2C%0Aready%3A%20function%20()%20%7B%0Athis.templatize(this)%3B%0A%7D%0A%7D)%3B%0APolymer._collections%20%3D%20new%20WeakMap()%3B%0APolymer.Collection%20%3D%20function%20(userArray)%20%7B%0APolymer._collections.set(userArray%2C%20this)%3B%0Athis.userArray%20%3D%20userArray%3B%0Athis.store%20%3D%20userArray.slice()%3B%0Athis.initMap()%3B%0A%7D%3B%0APolymer.Collection.prototype%20%3D%20%7B%0Aconstructor%3A%20Polymer.Collection%2C%0AinitMap%3A%20function%20()%20%7B%0Avar%20omap%20%3D%20this.omap%20%3D%20new%20WeakMap()%3B%0Avar%20pmap%20%3D%20this.pmap%20%3D%20%7B%7D%3B%0Avar%20s%20%3D%20this.store%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20s.length%3B%20i%2B%2B)%20%7B%0Avar%20item%20%3D%20s%5Bi%5D%3B%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Aomap.set(item%2C%20i)%3B%0A%7D%20else%20%7B%0Apmap%5Bitem%5D%20%3D%20i%3B%0A%7D%0A%7D%0A%7D%2C%0Aadd%3A%20function%20(item)%20%7B%0Avar%20key%20%3D%20this.store.push(item)%20-%201%3B%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Athis.omap.set(item%2C%20key)%3B%0A%7D%20else%20%7B%0Athis.pmap%5Bitem%5D%20%3D%20key%3B%0A%7D%0Areturn%20'%23'%20%2B%20key%3B%0A%7D%2C%0AremoveKey%3A%20function%20(key)%20%7B%0Aif%20(key%20%3D%20this._parseKey(key))%20%7B%0Athis._removeFromMap(this.store%5Bkey%5D)%3B%0Adelete%20this.store%5Bkey%5D%3B%0A%7D%0A%7D%2C%0A_removeFromMap%3A%20function%20(item)%20%7B%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Athis.omap.delete(item)%3B%0A%7D%20else%20%7B%0Adelete%20this.pmap%5Bitem%5D%3B%0A%7D%0A%7D%2C%0Aremove%3A%20function%20(item)%20%7B%0Avar%20key%20%3D%20this.getKey(item)%3B%0Athis.removeKey(key)%3B%0Areturn%20key%3B%0A%7D%2C%0AgetKey%3A%20function%20(item)%20%7B%0Avar%20key%3B%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Akey%20%3D%20this.omap.get(item)%3B%0A%7D%20else%20%7B%0Akey%20%3D%20this.pmap%5Bitem%5D%3B%0A%7D%0Aif%20(key%20!%3D%20undefined)%20%7B%0Areturn%20'%23'%20%2B%20key%3B%0A%7D%0A%7D%2C%0AgetKeys%3A%20function%20()%20%7B%0Areturn%20Object.keys(this.store).map(function%20(key)%20%7B%0Areturn%20'%23'%20%2B%20key%3B%0A%7D)%3B%0A%7D%2C%0A_parseKey%3A%20function%20(key)%20%7B%0Aif%20(key%20%26%26%20key%5B0%5D%20%3D%3D%20'%23')%20%7B%0Areturn%20key.slice(1)%3B%0A%7D%0A%7D%2C%0AsetItem%3A%20function%20(key%2C%20item)%20%7B%0Aif%20(key%20%3D%20this._parseKey(key))%20%7B%0Avar%20old%20%3D%20this.store%5Bkey%5D%3B%0Aif%20(old)%20%7B%0Athis._removeFromMap(old)%3B%0A%7D%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Athis.omap.set(item%2C%20key)%3B%0A%7D%20else%20%7B%0Athis.pmap%5Bitem%5D%20%3D%20key%3B%0A%7D%0Athis.store%5Bkey%5D%20%3D%20item%3B%0A%7D%0A%7D%2C%0AgetItem%3A%20function%20(key)%20%7B%0Aif%20(key%20%3D%20this._parseKey(key))%20%7B%0Areturn%20this.store%5Bkey%5D%3B%0A%7D%0A%7D%2C%0AgetItems%3A%20function%20()%20%7B%0Avar%20items%20%3D%20%5B%5D%2C%20store%20%3D%20this.store%3B%0Afor%20(var%20key%20in%20store)%20%7B%0Aitems.push(store%5Bkey%5D)%3B%0A%7D%0Areturn%20items%3B%0A%7D%2C%0A_applySplices%3A%20function%20(splices)%20%7B%0Avar%20keyMap%20%3D%20%7B%7D%2C%20key%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0As.addedKeys%20%3D%20%5B%5D%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20s.removed.length%3B%20j%2B%2B)%20%7B%0Akey%20%3D%20this.getKey(s.removed%5Bj%5D)%3B%0AkeyMap%5Bkey%5D%20%3D%20keyMap%5Bkey%5D%20%3F%20null%20%3A%20-1%3B%0A%7D%0Afor%20(j%20%3D%200%3B%20j%20%3C%20s.addedCount%3B%20j%2B%2B)%20%7B%0Avar%20item%20%3D%20this.userArray%5Bs.index%20%2B%20j%5D%3B%0Akey%20%3D%20this.getKey(item)%3B%0Akey%20%3D%20key%20%3D%3D%3D%20undefined%20%3F%20this.add(item)%20%3A%20key%3B%0AkeyMap%5Bkey%5D%20%3D%20keyMap%5Bkey%5D%20%3F%20null%20%3A%201%3B%0As.addedKeys.push(key)%3B%0A%7D%0A%7D%0Avar%20removed%20%3D%20%5B%5D%3B%0Avar%20added%20%3D%20%5B%5D%3B%0Afor%20(key%20in%20keyMap)%20%7B%0Aif%20(keyMap%5Bkey%5D%20%3C%200)%20%7B%0Athis.removeKey(key)%3B%0Aremoved.push(key)%3B%0A%7D%0Aif%20(keyMap%5Bkey%5D%20%3E%200)%20%7B%0Aadded.push(key)%3B%0A%7D%0A%7D%0Areturn%20%5B%7B%0Aremoved%3A%20removed%2C%0Aadded%3A%20added%0A%7D%5D%3B%0A%7D%0A%7D%3B%0APolymer.Collection.get%20%3D%20function%20(userArray)%20%7B%0Areturn%20Polymer._collections.get(userArray)%20%7C%7C%20new%20Polymer.Collection(userArray)%3B%0A%7D%3B%0APolymer.Collection.applySplices%20%3D%20function%20(userArray%2C%20splices)%20%7B%0Avar%20coll%20%3D%20Polymer._collections.get(userArray)%3B%0Areturn%20coll%20%3F%20coll._applySplices(splices)%20%3A%20null%3B%0A%7D%3B%0APolymer(%7B%0Ais%3A%20'dom-repeat'%2C%0Aextends%3A%20'template'%2C%0A_template%3A%20null%2C%0Aproperties%3A%20%7B%0Aitems%3A%20%7B%20type%3A%20Array%20%7D%2C%0Aas%3A%20%7B%0Atype%3A%20String%2C%0Avalue%3A%20'item'%0A%7D%2C%0AindexAs%3A%20%7B%0Atype%3A%20String%2C%0Avalue%3A%20'index'%0A%7D%2C%0Asort%3A%20%7B%0Atype%3A%20Function%2C%0Aobserver%3A%20'_sortChanged'%0A%7D%2C%0Afilter%3A%20%7B%0Atype%3A%20Function%2C%0Aobserver%3A%20'_filterChanged'%0A%7D%2C%0Aobserve%3A%20%7B%0Atype%3A%20String%2C%0Aobserver%3A%20'_observeChanged'%0A%7D%2C%0Adelay%3A%20Number%2C%0ArenderedItemCount%3A%20%7B%0Atype%3A%20Number%2C%0Anotify%3A%20true%2C%0AreadOnly%3A%20true%0A%7D%2C%0AinitialCount%3A%20%7B%0Atype%3A%20Number%2C%0Aobserver%3A%20'_initializeChunking'%0A%7D%2C%0AtargetFramerate%3A%20%7B%0Atype%3A%20Number%2C%0Avalue%3A%2020%0A%7D%2C%0A_targetFrameTime%3A%20%7B%0Atype%3A%20Number%2C%0Acomputed%3A%20'_computeFrameTime(targetFramerate)'%0A%7D%0A%7D%2C%0Abehaviors%3A%20%5BPolymer.Templatizer%5D%2C%0Aobservers%3A%20%5B'_itemsChanged(items.*)'%5D%2C%0Acreated%3A%20function%20()%20%7B%0Athis._instances%20%3D%20%5B%5D%3B%0Athis._pool%20%3D%20%5B%5D%3B%0Athis._limit%20%3D%20Infinity%3B%0Avar%20self%20%3D%20this%3B%0Athis._boundRenderChunk%20%3D%20function%20()%20%7B%0Aself._renderChunk()%3B%0A%7D%3B%0A%7D%2C%0Adetached%3A%20function%20()%20%7B%0Athis.__isDetached%20%3D%20true%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._instances.length%3B%20i%2B%2B)%20%7B%0Athis._detachInstance(i)%3B%0A%7D%0A%7D%2C%0Aattached%3A%20function%20()%20%7B%0Aif%20(this.__isDetached)%20%7B%0Athis.__isDetached%20%3D%20false%3B%0Avar%20parent%20%3D%20Polymer.dom(Polymer.dom(this).parentNode)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._instances.length%3B%20i%2B%2B)%20%7B%0Athis._attachInstance(i%2C%20parent)%3B%0A%7D%0A%7D%0A%7D%2C%0Aready%3A%20function%20()%20%7B%0Athis._instanceProps%20%3D%20%7B%20__key__%3A%20true%20%7D%3B%0Athis._instanceProps%5Bthis.as%5D%20%3D%20true%3B%0Athis._instanceProps%5Bthis.indexAs%5D%20%3D%20true%3B%0Aif%20(!this.ctor)%20%7B%0Athis.templatize(this)%3B%0A%7D%0A%7D%2C%0A_sortChanged%3A%20function%20(sort)%20%7B%0Avar%20dataHost%20%3D%20this._getRootDataHost()%3B%0Athis._sortFn%20%3D%20sort%20%26%26%20(typeof%20sort%20%3D%3D%20'function'%20%3F%20sort%20%3A%20function%20()%20%7B%0Areturn%20dataHost%5Bsort%5D.apply(dataHost%2C%20arguments)%3B%0A%7D)%3B%0Athis._needFullRefresh%20%3D%20true%3B%0Aif%20(this.items)%20%7B%0Athis._debounceTemplate(this._render)%3B%0A%7D%0A%7D%2C%0A_filterChanged%3A%20function%20(filter)%20%7B%0Avar%20dataHost%20%3D%20this._getRootDataHost()%3B%0Athis._filterFn%20%3D%20filter%20%26%26%20(typeof%20filter%20%3D%3D%20'function'%20%3F%20filter%20%3A%20function%20()%20%7B%0Areturn%20dataHost%5Bfilter%5D.apply(dataHost%2C%20arguments)%3B%0A%7D)%3B%0Athis._needFullRefresh%20%3D%20true%3B%0Aif%20(this.items)%20%7B%0Athis._debounceTemplate(this._render)%3B%0A%7D%0A%7D%2C%0A_computeFrameTime%3A%20function%20(rate)%20%7B%0Areturn%20Math.ceil(1000%20%2F%20rate)%3B%0A%7D%2C%0A_initializeChunking%3A%20function%20()%20%7B%0Aif%20(this.initialCount)%20%7B%0Athis._limit%20%3D%20this.initialCount%3B%0Athis._chunkCount%20%3D%20this.initialCount%3B%0Athis._lastChunkTime%20%3D%20performance.now()%3B%0A%7D%0A%7D%2C%0A_tryRenderChunk%3A%20function%20()%20%7B%0Aif%20(this.items%20%26%26%20this._limit%20%3C%20this.items.length)%20%7B%0Athis.debounce('renderChunk'%2C%20this._requestRenderChunk)%3B%0A%7D%0A%7D%2C%0A_requestRenderChunk%3A%20function%20()%20%7B%0ArequestAnimationFrame(this._boundRenderChunk)%3B%0A%7D%2C%0A_renderChunk%3A%20function%20()%20%7B%0Avar%20currChunkTime%20%3D%20performance.now()%3B%0Avar%20ratio%20%3D%20this._targetFrameTime%20%2F%20(currChunkTime%20-%20this._lastChunkTime)%3B%0Athis._chunkCount%20%3D%20Math.round(this._chunkCount%20*%20ratio)%20%7C%7C%201%3B%0Athis._limit%20%2B%3D%20this._chunkCount%3B%0Athis._lastChunkTime%20%3D%20currChunkTime%3B%0Athis._debounceTemplate(this._render)%3B%0A%7D%2C%0A_observeChanged%3A%20function%20()%20%7B%0Athis._observePaths%20%3D%20this.observe%20%26%26%20this.observe.replace('.*'%2C%20'.').split('%20')%3B%0A%7D%2C%0A_itemsChanged%3A%20function%20(change)%20%7B%0Aif%20(change.path%20%3D%3D%20'items')%20%7B%0Aif%20(Array.isArray(this.items))%20%7B%0Athis.collection%20%3D%20Polymer.Collection.get(this.items)%3B%0A%7D%20else%20if%20(!this.items)%20%7B%0Athis.collection%20%3D%20null%3B%0A%7D%20else%20%7B%0Athis._error(this._logf('dom-repeat'%2C%20'expected%20array%20for%20%60items%60%2C'%20%2B%20'%20found'%2C%20this.items))%3B%0A%7D%0Athis._keySplices%20%3D%20%5B%5D%3B%0Athis._indexSplices%20%3D%20%5B%5D%3B%0Athis._needFullRefresh%20%3D%20true%3B%0Athis._initializeChunking()%3B%0Athis._debounceTemplate(this._render)%3B%0A%7D%20else%20if%20(change.path%20%3D%3D%20'items.splices')%20%7B%0Athis._keySplices%20%3D%20this._keySplices.concat(change.value.keySplices)%3B%0Athis._indexSplices%20%3D%20this._indexSplices.concat(change.value.indexSplices)%3B%0Athis._debounceTemplate(this._render)%3B%0A%7D%20else%20%7B%0Avar%20subpath%20%3D%20change.path.slice(6)%3B%0Athis._forwardItemPath(subpath%2C%20change.value)%3B%0Athis._checkObservedPaths(subpath)%3B%0A%7D%0A%7D%2C%0A_checkObservedPaths%3A%20function%20(path)%20%7B%0Aif%20(this._observePaths)%20%7B%0Apath%20%3D%20path.substring(path.indexOf('.')%20%2B%201)%3B%0Avar%20paths%20%3D%20this._observePaths%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20paths.length%3B%20i%2B%2B)%20%7B%0Aif%20(path.indexOf(paths%5Bi%5D)%20%3D%3D%3D%200)%20%7B%0Athis._needFullRefresh%20%3D%20true%3B%0Aif%20(this.delay)%20%7B%0Athis.debounce('render'%2C%20this._render%2C%20this.delay)%3B%0A%7D%20else%20%7B%0Athis._debounceTemplate(this._render)%3B%0A%7D%0Areturn%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0Arender%3A%20function%20()%20%7B%0Athis._needFullRefresh%20%3D%20true%3B%0Athis._debounceTemplate(this._render)%3B%0Athis._flushTemplates()%3B%0A%7D%2C%0A_render%3A%20function%20()%20%7B%0Aif%20(this._needFullRefresh)%20%7B%0Athis._applyFullRefresh()%3B%0Athis._needFullRefresh%20%3D%20false%3B%0A%7D%20else%20if%20(this._keySplices.length)%20%7B%0Aif%20(this._sortFn)%20%7B%0Athis._applySplicesUserSort(this._keySplices)%3B%0A%7D%20else%20%7B%0Aif%20(this._filterFn)%20%7B%0Athis._applyFullRefresh()%3B%0A%7D%20else%20%7B%0Athis._applySplicesArrayOrder(this._indexSplices)%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0A%7D%0Athis._keySplices%20%3D%20%5B%5D%3B%0Athis._indexSplices%20%3D%20%5B%5D%3B%0Avar%20keyToIdx%20%3D%20this._keyToInstIdx%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%20this._instances.length%20-%201%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Avar%20inst%20%3D%20this._instances%5Bi%5D%3B%0Aif%20(inst.isPlaceholder%20%26%26%20i%20%3C%20this._limit)%20%7B%0Ainst%20%3D%20this._insertInstance(i%2C%20inst.__key__)%3B%0A%7D%20else%20if%20(!inst.isPlaceholder%20%26%26%20i%20%3E%3D%20this._limit)%20%7B%0Ainst%20%3D%20this._downgradeInstance(i%2C%20inst.__key__)%3B%0A%7D%0AkeyToIdx%5Binst.__key__%5D%20%3D%20i%3B%0Aif%20(!inst.isPlaceholder)%20%7B%0Ainst.__setProperty(this.indexAs%2C%20i%2C%20true)%3B%0A%7D%0A%7D%0Athis._pool.length%20%3D%200%3B%0Athis._setRenderedItemCount(this._instances.length)%3B%0Athis.fire('dom-change')%3B%0Athis._tryRenderChunk()%3B%0A%7D%2C%0A_applyFullRefresh%3A%20function%20()%20%7B%0Avar%20c%20%3D%20this.collection%3B%0Avar%20keys%3B%0Aif%20(this._sortFn)%20%7B%0Akeys%20%3D%20c%20%3F%20c.getKeys()%20%3A%20%5B%5D%3B%0A%7D%20else%20%7B%0Akeys%20%3D%20%5B%5D%3B%0Avar%20items%20%3D%20this.items%3B%0Aif%20(items)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20items.length%3B%20i%2B%2B)%20%7B%0Akeys.push(c.getKey(items%5Bi%5D))%3B%0A%7D%0A%7D%0A%7D%0Avar%20self%20%3D%20this%3B%0Aif%20(this._filterFn)%20%7B%0Akeys%20%3D%20keys.filter(function%20(a)%20%7B%0Areturn%20self._filterFn(c.getItem(a))%3B%0A%7D)%3B%0A%7D%0Aif%20(this._sortFn)%20%7B%0Akeys.sort(function%20(a%2C%20b)%20%7B%0Areturn%20self._sortFn(c.getItem(a)%2C%20c.getItem(b))%3B%0A%7D)%3B%0A%7D%0Afor%20(i%20%3D%200%3B%20i%20%3C%20keys.length%3B%20i%2B%2B)%20%7B%0Avar%20key%20%3D%20keys%5Bi%5D%3B%0Avar%20inst%20%3D%20this._instances%5Bi%5D%3B%0Aif%20(inst)%20%7B%0Ainst.__key__%20%3D%20key%3B%0Aif%20(!inst.isPlaceholder%20%26%26%20i%20%3C%20this._limit)%20%7B%0Ainst.__setProperty(this.as%2C%20c.getItem(key)%2C%20true)%3B%0A%7D%0A%7D%20else%20if%20(i%20%3C%20this._limit)%20%7B%0Athis._insertInstance(i%2C%20key)%3B%0A%7D%20else%20%7B%0Athis._insertPlaceholder(i%2C%20key)%3B%0A%7D%0A%7D%0Afor%20(var%20j%20%3D%20this._instances.length%20-%201%3B%20j%20%3E%3D%20i%3B%20j--)%20%7B%0Athis._detachAndRemoveInstance(j)%3B%0A%7D%0A%7D%2C%0A_numericSort%3A%20function%20(a%2C%20b)%20%7B%0Areturn%20a%20-%20b%3B%0A%7D%2C%0A_applySplicesUserSort%3A%20function%20(splices)%20%7B%0Avar%20c%20%3D%20this.collection%3B%0Avar%20keyMap%20%3D%20%7B%7D%3B%0Avar%20key%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20s.removed.length%3B%20j%2B%2B)%20%7B%0Akey%20%3D%20s.removed%5Bj%5D%3B%0AkeyMap%5Bkey%5D%20%3D%20keyMap%5Bkey%5D%20%3F%20null%20%3A%20-1%3B%0A%7D%0Afor%20(j%20%3D%200%3B%20j%20%3C%20s.added.length%3B%20j%2B%2B)%20%7B%0Akey%20%3D%20s.added%5Bj%5D%3B%0AkeyMap%5Bkey%5D%20%3D%20keyMap%5Bkey%5D%20%3F%20null%20%3A%201%3B%0A%7D%0A%7D%0Avar%20removedIdxs%20%3D%20%5B%5D%3B%0Avar%20addedKeys%20%3D%20%5B%5D%3B%0Afor%20(key%20in%20keyMap)%20%7B%0Aif%20(keyMap%5Bkey%5D%20%3D%3D%3D%20-1)%20%7B%0AremovedIdxs.push(this._keyToInstIdx%5Bkey%5D)%3B%0A%7D%0Aif%20(keyMap%5Bkey%5D%20%3D%3D%3D%201)%20%7B%0AaddedKeys.push(key)%3B%0A%7D%0A%7D%0Aif%20(removedIdxs.length)%20%7B%0AremovedIdxs.sort(this._numericSort)%3B%0Afor%20(i%20%3D%20removedIdxs.length%20-%201%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Avar%20idx%20%3D%20removedIdxs%5Bi%5D%3B%0Aif%20(idx%20!%3D%3D%20undefined)%20%7B%0Athis._detachAndRemoveInstance(idx)%3B%0A%7D%0A%7D%0A%7D%0Avar%20self%20%3D%20this%3B%0Aif%20(addedKeys.length)%20%7B%0Aif%20(this._filterFn)%20%7B%0AaddedKeys%20%3D%20addedKeys.filter(function%20(a)%20%7B%0Areturn%20self._filterFn(c.getItem(a))%3B%0A%7D)%3B%0A%7D%0AaddedKeys.sort(function%20(a%2C%20b)%20%7B%0Areturn%20self._sortFn(c.getItem(a)%2C%20c.getItem(b))%3B%0A%7D)%3B%0Avar%20start%20%3D%200%3B%0Afor%20(i%20%3D%200%3B%20i%20%3C%20addedKeys.length%3B%20i%2B%2B)%20%7B%0Astart%20%3D%20this._insertRowUserSort(start%2C%20addedKeys%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0A_insertRowUserSort%3A%20function%20(start%2C%20key)%20%7B%0Avar%20c%20%3D%20this.collection%3B%0Avar%20item%20%3D%20c.getItem(key)%3B%0Avar%20end%20%3D%20this._instances.length%20-%201%3B%0Avar%20idx%20%3D%20-1%3B%0Awhile%20(start%20%3C%3D%20end)%20%7B%0Avar%20mid%20%3D%20start%20%2B%20end%20%3E%3E%201%3B%0Avar%20midKey%20%3D%20this._instances%5Bmid%5D.__key__%3B%0Avar%20cmp%20%3D%20this._sortFn(c.getItem(midKey)%2C%20item)%3B%0Aif%20(cmp%20%3C%200)%20%7B%0Astart%20%3D%20mid%20%2B%201%3B%0A%7D%20else%20if%20(cmp%20%3E%200)%20%7B%0Aend%20%3D%20mid%20-%201%3B%0A%7D%20else%20%7B%0Aidx%20%3D%20mid%3B%0Abreak%3B%0A%7D%0A%7D%0Aif%20(idx%20%3C%200)%20%7B%0Aidx%20%3D%20end%20%2B%201%3B%0A%7D%0Athis._insertPlaceholder(idx%2C%20key)%3B%0Areturn%20idx%3B%0A%7D%2C%0A_applySplicesArrayOrder%3A%20function%20(splices)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20s.removed.length%3B%20j%2B%2B)%20%7B%0Athis._detachAndRemoveInstance(s.index)%3B%0A%7D%0Afor%20(j%20%3D%200%3B%20j%20%3C%20s.addedKeys.length%3B%20j%2B%2B)%20%7B%0Athis._insertPlaceholder(s.index%20%2B%20j%2C%20s.addedKeys%5Bj%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0A_detachInstance%3A%20function%20(idx)%20%7B%0Avar%20inst%20%3D%20this._instances%5Bidx%5D%3B%0Aif%20(!inst.isPlaceholder)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20inst._children.length%3B%20i%2B%2B)%20%7B%0Avar%20el%20%3D%20inst._children%5Bi%5D%3B%0APolymer.dom(inst.root).appendChild(el)%3B%0A%7D%0Areturn%20inst%3B%0A%7D%0A%7D%2C%0A_attachInstance%3A%20function%20(idx%2C%20parent)%20%7B%0Avar%20inst%20%3D%20this._instances%5Bidx%5D%3B%0Aif%20(!inst.isPlaceholder)%20%7B%0Aparent.insertBefore(inst.root%2C%20this)%3B%0A%7D%0A%7D%2C%0A_detachAndRemoveInstance%3A%20function%20(idx)%20%7B%0Avar%20inst%20%3D%20this._detachInstance(idx)%3B%0Aif%20(inst)%20%7B%0Athis._pool.push(inst)%3B%0A%7D%0Athis._instances.splice(idx%2C%201)%3B%0A%7D%2C%0A_insertPlaceholder%3A%20function%20(idx%2C%20key)%20%7B%0Athis._instances.splice(idx%2C%200%2C%20%7B%0AisPlaceholder%3A%20true%2C%0A__key__%3A%20key%0A%7D)%3B%0A%7D%2C%0A_stampInstance%3A%20function%20(idx%2C%20key)%20%7B%0Avar%20model%20%3D%20%7B%20__key__%3A%20key%20%7D%3B%0Amodel%5Bthis.as%5D%20%3D%20this.collection.getItem(key)%3B%0Amodel%5Bthis.indexAs%5D%20%3D%20idx%3B%0Areturn%20this.stamp(model)%3B%0A%7D%2C%0A_insertInstance%3A%20function%20(idx%2C%20key)%20%7B%0Avar%20inst%20%3D%20this._pool.pop()%3B%0Aif%20(inst)%20%7B%0Ainst.__setProperty(this.as%2C%20this.collection.getItem(key)%2C%20true)%3B%0Ainst.__setProperty('__key__'%2C%20key%2C%20true)%3B%0A%7D%20else%20%7B%0Ainst%20%3D%20this._stampInstance(idx%2C%20key)%3B%0A%7D%0Avar%20beforeRow%20%3D%20this._instances%5Bidx%20%2B%201%5D%3B%0Avar%20beforeNode%20%3D%20beforeRow%20%26%26%20!beforeRow.isPlaceholder%20%3F%20beforeRow._children%5B0%5D%20%3A%20this%3B%0Avar%20parentNode%20%3D%20Polymer.dom(this).parentNode%3B%0APolymer.dom(parentNode).insertBefore(inst.root%2C%20beforeNode)%3B%0Athis._instances%5Bidx%5D%20%3D%20inst%3B%0Areturn%20inst%3B%0A%7D%2C%0A_downgradeInstance%3A%20function%20(idx%2C%20key)%20%7B%0Avar%20inst%20%3D%20this._detachInstance(idx)%3B%0Aif%20(inst)%20%7B%0Athis._pool.push(inst)%3B%0A%7D%0Ainst%20%3D%20%7B%0AisPlaceholder%3A%20true%2C%0A__key__%3A%20key%0A%7D%3B%0Athis._instances%5Bidx%5D%20%3D%20inst%3B%0Areturn%20inst%3B%0A%7D%2C%0A_showHideChildren%3A%20function%20(hidden)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._instances.length%3B%20i%2B%2B)%20%7B%0Athis._instances%5Bi%5D._showHideChildren(hidden)%3B%0A%7D%0A%7D%2C%0A_forwardInstanceProp%3A%20function%20(inst%2C%20prop%2C%20value)%20%7B%0Aif%20(prop%20%3D%3D%20this.as)%20%7B%0Avar%20idx%3B%0Aif%20(this._sortFn%20%7C%7C%20this._filterFn)%20%7B%0Aidx%20%3D%20this.items.indexOf(this.collection.getItem(inst.__key__))%3B%0A%7D%20else%20%7B%0Aidx%20%3D%20inst%5Bthis.indexAs%5D%3B%0A%7D%0Athis.set('items.'%20%2B%20idx%2C%20value)%3B%0A%7D%0A%7D%2C%0A_forwardInstancePath%3A%20function%20(inst%2C%20path%2C%20value)%20%7B%0Aif%20(path.indexOf(this.as%20%2B%20'.')%20%3D%3D%3D%200)%20%7B%0Athis._notifyPath('items.'%20%2B%20inst.__key__%20%2B%20'.'%20%2B%20path.slice(this.as.length%20%2B%201)%2C%20value)%3B%0A%7D%0A%7D%2C%0A_forwardParentProp%3A%20function%20(prop%2C%20value)%20%7B%0Avar%20i%24%20%3D%20this._instances%3B%0Afor%20(var%20i%20%3D%200%2C%20inst%3B%20i%20%3C%20i%24.length%20%26%26%20(inst%20%3D%20i%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!inst.isPlaceholder)%20%7B%0Ainst.__setProperty(prop%2C%20value%2C%20true)%3B%0A%7D%0A%7D%0A%7D%2C%0A_forwardParentPath%3A%20function%20(path%2C%20value)%20%7B%0Avar%20i%24%20%3D%20this._instances%3B%0Afor%20(var%20i%20%3D%200%2C%20inst%3B%20i%20%3C%20i%24.length%20%26%26%20(inst%20%3D%20i%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!inst.isPlaceholder)%20%7B%0Ainst._notifyPath(path%2C%20value%2C%20true)%3B%0A%7D%0A%7D%0A%7D%2C%0A_forwardItemPath%3A%20function%20(path%2C%20value)%20%7B%0Aif%20(this._keyToInstIdx)%20%7B%0Avar%20dot%20%3D%20path.indexOf('.')%3B%0Avar%20key%20%3D%20path.substring(0%2C%20dot%20%3C%200%20%3F%20path.length%20%3A%20dot)%3B%0Avar%20idx%20%3D%20this._keyToInstIdx%5Bkey%5D%3B%0Avar%20inst%20%3D%20this._instances%5Bidx%5D%3B%0Aif%20(inst%20%26%26%20!inst.isPlaceholder)%20%7B%0Aif%20(dot%20%3E%3D%200)%20%7B%0Apath%20%3D%20this.as%20%2B%20'.'%20%2B%20path.substring(dot%20%2B%201)%3B%0Ainst._notifyPath(path%2C%20value%2C%20true)%3B%0A%7D%20else%20%7B%0Ainst.__setProperty(this.as%2C%20value%2C%20true)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0AitemForElement%3A%20function%20(el)%20%7B%0Avar%20instance%20%3D%20this.modelForElement(el)%3B%0Areturn%20instance%20%26%26%20instance%5Bthis.as%5D%3B%0A%7D%2C%0AkeyForElement%3A%20function%20(el)%20%7B%0Avar%20instance%20%3D%20this.modelForElement(el)%3B%0Areturn%20instance%20%26%26%20instance.__key__%3B%0A%7D%2C%0AindexForElement%3A%20function%20(el)%20%7B%0Avar%20instance%20%3D%20this.modelForElement(el)%3B%0Areturn%20instance%20%26%26%20instance%5Bthis.indexAs%5D%3B%0A%7D%0A%7D)%3B%0APolymer(%7B%0Ais%3A%20'array-selector'%2C%0A_template%3A%20null%2C%0Aproperties%3A%20%7B%0Aitems%3A%20%7B%0Atype%3A%20Array%2C%0Aobserver%3A%20'clearSelection'%0A%7D%2C%0Amulti%3A%20%7B%0Atype%3A%20Boolean%2C%0Avalue%3A%20false%2C%0Aobserver%3A%20'clearSelection'%0A%7D%2C%0Aselected%3A%20%7B%0Atype%3A%20Object%2C%0Anotify%3A%20true%0A%7D%2C%0AselectedItem%3A%20%7B%0Atype%3A%20Object%2C%0Anotify%3A%20true%0A%7D%2C%0Atoggle%3A%20%7B%0Atype%3A%20Boolean%2C%0Avalue%3A%20false%0A%7D%0A%7D%2C%0AclearSelection%3A%20function%20()%20%7B%0Aif%20(Array.isArray(this.selected))%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.selected.length%3B%20i%2B%2B)%20%7B%0Athis.unlinkPaths('selected.'%20%2B%20i)%3B%0A%7D%0A%7D%20else%20%7B%0Athis.unlinkPaths('selected')%3B%0Athis.unlinkPaths('selectedItem')%3B%0A%7D%0Aif%20(this.multi)%20%7B%0Aif%20(!this.selected%20%7C%7C%20this.selected.length)%20%7B%0Athis.selected%20%3D%20%5B%5D%3B%0Athis._selectedColl%20%3D%20Polymer.Collection.get(this.selected)%3B%0A%7D%0A%7D%20else%20%7B%0Athis.selected%20%3D%20null%3B%0Athis._selectedColl%20%3D%20null%3B%0A%7D%0Athis.selectedItem%20%3D%20null%3B%0A%7D%2C%0AisSelected%3A%20function%20(item)%20%7B%0Aif%20(this.multi)%20%7B%0Areturn%20this._selectedColl.getKey(item)%20!%3D%3D%20undefined%3B%0A%7D%20else%20%7B%0Areturn%20this.selected%20%3D%3D%20item%3B%0A%7D%0A%7D%2C%0Adeselect%3A%20function%20(item)%20%7B%0Aif%20(this.multi)%20%7B%0Aif%20(this.isSelected(item))%20%7B%0Avar%20skey%20%3D%20this._selectedColl.getKey(item)%3B%0Athis.arrayDelete('selected'%2C%20item)%3B%0Athis.unlinkPaths('selected.'%20%2B%20skey)%3B%0A%7D%0A%7D%20else%20%7B%0Athis.selected%20%3D%20null%3B%0Athis.selectedItem%20%3D%20null%3B%0Athis.unlinkPaths('selected')%3B%0Athis.unlinkPaths('selectedItem')%3B%0A%7D%0A%7D%2C%0Aselect%3A%20function%20(item)%20%7B%0Avar%20icol%20%3D%20Polymer.Collection.get(this.items)%3B%0Avar%20key%20%3D%20icol.getKey(item)%3B%0Aif%20(this.multi)%20%7B%0Aif%20(this.isSelected(item))%20%7B%0Aif%20(this.toggle)%20%7B%0Athis.deselect(item)%3B%0A%7D%0A%7D%20else%20%7B%0Athis.push('selected'%2C%20item)%3B%0Avar%20skey%20%3D%20this._selectedColl.getKey(item)%3B%0Athis.linkPaths('selected.'%20%2B%20skey%2C%20'items.'%20%2B%20key)%3B%0A%7D%0A%7D%20else%20%7B%0Aif%20(this.toggle%20%26%26%20item%20%3D%3D%20this.selected)%20%7B%0Athis.deselect()%3B%0A%7D%20else%20%7B%0Athis.selected%20%3D%20item%3B%0Athis.selectedItem%20%3D%20item%3B%0Athis.linkPaths('selected'%2C%20'items.'%20%2B%20key)%3B%0Athis.linkPaths('selectedItem'%2C%20'items.'%20%2B%20key)%3B%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer(%7B%0Ais%3A%20'dom-if'%2C%0Aextends%3A%20'template'%2C%0A_template%3A%20null%2C%0Aproperties%3A%20%7B%0A'if'%3A%20%7B%0Atype%3A%20Boolean%2C%0Avalue%3A%20false%2C%0Aobserver%3A%20'_queueRender'%0A%7D%2C%0Arestamp%3A%20%7B%0Atype%3A%20Boolean%2C%0Avalue%3A%20false%2C%0Aobserver%3A%20'_queueRender'%0A%7D%0A%7D%2C%0Abehaviors%3A%20%5BPolymer.Templatizer%5D%2C%0A_queueRender%3A%20function%20()%20%7B%0Athis._debounceTemplate(this._render)%3B%0A%7D%2C%0Adetached%3A%20function%20()%20%7B%0Aif%20(!this.parentNode%20%7C%7C%20this.parentNode.nodeType%20%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20(!Polymer.Settings.hasShadow%20%7C%7C%20!(this.parentNode%20instanceof%20ShadowRoot)))%20%7B%0Athis._teardownInstance()%3B%0A%7D%0A%7D%2C%0Aattached%3A%20function%20()%20%7B%0Aif%20(this.if%20%26%26%20this.ctor)%20%7B%0Athis.async(this._ensureInstance)%3B%0A%7D%0A%7D%2C%0Arender%3A%20function%20()%20%7B%0Athis._flushTemplates()%3B%0A%7D%2C%0A_render%3A%20function%20()%20%7B%0Aif%20(this.if)%20%7B%0Aif%20(!this.ctor)%20%7B%0Athis.templatize(this)%3B%0A%7D%0Athis._ensureInstance()%3B%0Athis._showHideChildren()%3B%0A%7D%20else%20if%20(this.restamp)%20%7B%0Athis._teardownInstance()%3B%0A%7D%0Aif%20(!this.restamp%20%26%26%20this._instance)%20%7B%0Athis._showHideChildren()%3B%0A%7D%0Aif%20(this.if%20!%3D%20this._lastIf)%20%7B%0Athis.fire('dom-change')%3B%0Athis._lastIf%20%3D%20this.if%3B%0A%7D%0A%7D%2C%0A_ensureInstance%3A%20function%20()%20%7B%0Avar%20parentNode%20%3D%20Polymer.dom(this).parentNode%3B%0Aif%20(parentNode)%20%7B%0Avar%20parent%20%3D%20Polymer.dom(parentNode)%3B%0Aif%20(!this._instance)%20%7B%0Athis._instance%20%3D%20this.stamp()%3B%0Avar%20root%20%3D%20this._instance.root%3B%0Aparent.insertBefore(root%2C%20this)%3B%0A%7D%20else%20%7B%0Avar%20c%24%20%3D%20this._instance._children%3B%0Aif%20(c%24%20%26%26%20c%24.length)%20%7B%0Avar%20lastChild%20%3D%20Polymer.dom(this).previousSibling%3B%0Aif%20(lastChild%20!%3D%3D%20c%24%5Bc%24.length%20-%201%5D)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20c%24.length%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparent.insertBefore(n%2C%20this)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_teardownInstance%3A%20function%20()%20%7B%0Aif%20(this._instance)%20%7B%0Avar%20c%24%20%3D%20this._instance._children%3B%0Aif%20(c%24%20%26%26%20c%24.length)%20%7B%0Avar%20parent%20%3D%20Polymer.dom(Polymer.dom(c%24%5B0%5D).parentNode)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20c%24.length%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparent.removeChild(n)%3B%0A%7D%0A%7D%0Athis._instance%20%3D%20null%3B%0A%7D%0A%7D%2C%0A_showHideChildren%3A%20function%20()%20%7B%0Avar%20hidden%20%3D%20this.__hideTemplateChildren__%20%7C%7C%20!this.if%3B%0Aif%20(this._instance)%20%7B%0Athis._instance._showHideChildren(hidden)%3B%0A%7D%0A%7D%2C%0A_forwardParentProp%3A%20function%20(prop%2C%20value)%20%7B%0Aif%20(this._instance)%20%7B%0Athis._instance%5Bprop%5D%20%3D%20value%3B%0A%7D%0A%7D%2C%0A_forwardParentPath%3A%20function%20(path%2C%20value)%20%7B%0Aif%20(this._instance)%20%7B%0Athis._instance._notifyPath(path%2C%20value%2C%20true)%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer(%7B%0Ais%3A%20'dom-bind'%2C%0Aextends%3A%20'template'%2C%0A_template%3A%20null%2C%0Acreated%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0APolymer.RenderStatus.whenReady(function%20()%20%7B%0Aif%20(document.readyState%20%3D%3D%20'loading')%20%7B%0Adocument.addEventListener('DOMContentLoaded'%2C%20function%20()%20%7B%0Aself._markImportsReady()%3B%0A%7D)%3B%0A%7D%20else%20%7B%0Aself._markImportsReady()%3B%0A%7D%0A%7D)%3B%0A%7D%2C%0A_ensureReady%3A%20function%20()%20%7B%0Aif%20(!this._readied)%20%7B%0Athis._readySelf()%3B%0A%7D%0A%7D%2C%0A_markImportsReady%3A%20function%20()%20%7B%0Athis._importsReady%20%3D%20true%3B%0Athis._ensureReady()%3B%0A%7D%2C%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepConstructor()%3B%0A%7D%2C%0A_insertChildren%3A%20function%20()%20%7B%0Avar%20parentDom%20%3D%20Polymer.dom(Polymer.dom(this).parentNode)%3B%0AparentDom.insertBefore(this.root%2C%20this)%3B%0A%7D%2C%0A_removeChildren%3A%20function%20()%20%7B%0Aif%20(this._children)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._children.length%3B%20i%2B%2B)%20%7B%0Athis.root.appendChild(this._children%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0A%7D%2C%0A_scopeElementClass%3A%20function%20(element%2C%20selector)%20%7B%0Aif%20(this.dataHost)%20%7B%0Areturn%20this.dataHost._scopeElementClass(element%2C%20selector)%3B%0A%7D%20else%20%7B%0Areturn%20selector%3B%0A%7D%0A%7D%2C%0A_prepConfigure%3A%20function%20()%20%7B%0Avar%20config%20%3D%20%7B%7D%3B%0Afor%20(var%20prop%20in%20this._propertyEffects)%20%7B%0Aconfig%5Bprop%5D%20%3D%20this%5Bprop%5D%3B%0A%7D%0Avar%20setupConfigure%20%3D%20this._setupConfigure%3B%0Athis._setupConfigure%20%3D%20function%20()%20%7B%0AsetupConfigure.call(this%2C%20config)%3B%0A%7D%3B%0A%7D%2C%0Aattached%3A%20function%20()%20%7B%0Aif%20(this._importsReady)%20%7B%0Athis.render()%3B%0A%7D%0A%7D%2C%0Adetached%3A%20function%20()%20%7B%0Athis._removeChildren()%3B%0A%7D%2C%0Arender%3A%20function%20()%20%7B%0Athis._ensureReady()%3B%0Aif%20(!this._children)%20%7B%0Athis._template%20%3D%20this%3B%0Athis._prepAnnotations()%3B%0Athis._prepEffects()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConfigure()%3B%0Athis._prepBindings()%3B%0Athis._prepPropertyInfo()%3B%0APolymer.Base._initFeatures.call(this)%3B%0Athis._children%20%3D%20Polymer.TreeApi.arrayCopyChildNodes(this.root)%3B%0A%7D%0Athis._insertChildren()%3B%0Athis.fire('dom-change')%3B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer.html.js%0A:3534 in _initFeatures data:text/javascript;charset=utf-8,(function%20()%20%7B%0Afunction%20resolve()%20%7B%0Adocument.body.removeAttribute('unresolved')%3B%0A%7D%0Aif%20(window.WebComponents)%20%7B%0AaddEventListener('WebComponentsReady'%2C%20resolve)%3B%0A%7D%20else%20%7B%0Aif%20(document.readyState%20%3D%3D%3D%20'interactive'%20%7C%7C%20document.readyState%20%3D%3D%3D%20'complete')%20%7B%0Aresolve()%3B%0A%7D%20else%20%7B%0AaddEventListener('DOMContentLoaded'%2C%20resolve)%3B%0A%7D%0A%7D%0A%7D())%3B%0Awindow.Polymer%20%3D%20%7B%0ASettings%3A%20function%20()%20%7B%0Avar%20user%20%3D%20window.Polymer%20%7C%7C%20%7B%7D%3B%0Avar%20parts%20%3D%20location.search.slice(1).split('%26')%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20parts.length%20%26%26%20(o%20%3D%20parts%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ao%20%3D%20o.split('%3D')%3B%0Ao%5B0%5D%20%26%26%20(user%5Bo%5B0%5D%5D%20%3D%20o%5B1%5D%20%7C%7C%20true)%3B%0A%7D%0Avar%20wantShadow%20%3D%20user.dom%20%3D%3D%3D%20'shadow'%3B%0Avar%20hasShadow%20%3D%20Boolean(Element.prototype.createShadowRoot)%3B%0Avar%20nativeShadow%20%3D%20hasShadow%20%26%26%20!window.ShadowDOMPolyfill%3B%0Avar%20useShadow%20%3D%20wantShadow%20%26%26%20hasShadow%3B%0Avar%20hasNativeImports%20%3D%20Boolean('import'%20in%20document.createElement('link'))%3B%0Avar%20useNativeImports%20%3D%20hasNativeImports%3B%0Avar%20useNativeCustomElements%20%3D%20!window.CustomElements%20%7C%7C%20window.CustomElements.useNative%3B%0Avar%20usePolyfillProto%20%3D%20!useNativeCustomElements%20%26%26%20!Object.__proto__%3B%0Areturn%20%7B%0AwantShadow%3A%20wantShadow%2C%0AhasShadow%3A%20hasShadow%2C%0AnativeShadow%3A%20nativeShadow%2C%0AuseShadow%3A%20useShadow%2C%0AuseNativeShadow%3A%20useShadow%20%26%26%20nativeShadow%2C%0AuseNativeImports%3A%20useNativeImports%2C%0AuseNativeCustomElements%3A%20useNativeCustomElements%2C%0AusePolyfillProto%3A%20usePolyfillProto%0A%7D%3B%0A%7D()%0A%7D%3B%0A(function%20()%20%7B%0Avar%20userPolymer%20%3D%20window.Polymer%3B%0Awindow.Polymer%20%3D%20function%20(prototype)%20%7B%0Aif%20(typeof%20prototype%20%3D%3D%3D%20'function')%20%7B%0Aprototype%20%3D%20prototype.prototype%3B%0A%7D%0Aif%20(!prototype)%20%7B%0Aprototype%20%3D%20%7B%7D%3B%0A%7D%0Avar%20factory%20%3D%20desugar(prototype)%3B%0Aprototype%20%3D%20factory.prototype%3B%0Avar%20options%20%3D%20%7B%20prototype%3A%20prototype%20%7D%3B%0Aif%20(prototype.extends)%20%7B%0Aoptions.extends%20%3D%20prototype.extends%3B%0A%7D%0APolymer.telemetry._registrate(prototype)%3B%0Adocument.registerElement(prototype.is%2C%20options)%3B%0Areturn%20factory%3B%0A%7D%3B%0Avar%20desugar%20%3D%20function%20(prototype)%20%7B%0Avar%20base%20%3D%20Polymer.Base%3B%0Aif%20(prototype.extends)%20%7B%0Abase%20%3D%20Polymer.Base._getExtendedPrototype(prototype.extends)%3B%0A%7D%0Aprototype%20%3D%20Polymer.Base.chainObject(prototype%2C%20base)%3B%0Aprototype.registerCallback()%3B%0Areturn%20prototype.constructor%3B%0A%7D%3B%0Aif%20(userPolymer)%20%7B%0Afor%20(var%20i%20in%20userPolymer)%20%7B%0APolymer%5Bi%5D%20%3D%20userPolymer%5Bi%5D%3B%0A%7D%0A%7D%0APolymer.Class%20%3D%20desugar%3B%0A%7D())%3B%0APolymer.telemetry%20%3D%20%7B%0Aregistrations%3A%20%5B%5D%2C%0A_regLog%3A%20function%20(prototype)%20%7B%0Aconsole.log('%5B'%20%2B%20prototype.is%20%2B%20'%5D%3A%20registered')%3B%0A%7D%2C%0A_registrate%3A%20function%20(prototype)%20%7B%0Athis.registrations.push(prototype)%3B%0APolymer.log%20%26%26%20this._regLog(prototype)%3B%0A%7D%2C%0AdumpRegistrations%3A%20function%20()%20%7B%0Athis.registrations.forEach(this._regLog)%3B%0A%7D%0A%7D%3B%0AObject.defineProperty(window%2C%20'currentImport'%2C%20%7B%0Aenumerable%3A%20true%2C%0Aconfigurable%3A%20true%2C%0Aget%3A%20function%20()%20%7B%0Areturn%20(document._currentScript%20%7C%7C%20document.currentScript).ownerDocument%3B%0A%7D%0A%7D)%3B%0APolymer.RenderStatus%20%3D%20%7B%0A_ready%3A%20false%2C%0A_callbacks%3A%20%5B%5D%2C%0AwhenReady%3A%20function%20(cb)%20%7B%0Aif%20(this._ready)%20%7B%0Acb()%3B%0A%7D%20else%20%7B%0Athis._callbacks.push(cb)%3B%0A%7D%0A%7D%2C%0A_makeReady%3A%20function%20()%20%7B%0Athis._ready%20%3D%20true%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._callbacks.length%3B%20i%2B%2B)%20%7B%0Athis._callbacks%5Bi%5D()%3B%0A%7D%0Athis._callbacks%20%3D%20%5B%5D%3B%0A%7D%2C%0A_catchFirstRender%3A%20function%20()%20%7B%0ArequestAnimationFrame(function%20()%20%7B%0APolymer.RenderStatus._makeReady()%3B%0A%7D)%3B%0A%7D%2C%0A_afterNextRenderQueue%3A%20%5B%5D%2C%0A_waitingNextRender%3A%20false%2C%0AafterNextRender%3A%20function%20(element%2C%20fn%2C%20args)%20%7B%0Athis._watchNextRender()%3B%0Athis._afterNextRenderQueue.push(%5B%0Aelement%2C%0Afn%2C%0Aargs%0A%5D)%3B%0A%7D%2C%0A_watchNextRender%3A%20function%20()%20%7B%0Aif%20(!this._waitingNextRender)%20%7B%0Athis._waitingNextRender%20%3D%20true%3B%0Avar%20fn%20%3D%20function%20()%20%7B%0APolymer.RenderStatus._flushNextRender()%3B%0A%7D%3B%0Aif%20(!this._ready)%20%7B%0Athis.whenReady(fn)%3B%0A%7D%20else%20%7B%0ArequestAnimationFrame(fn)%3B%0A%7D%0A%7D%0A%7D%2C%0A_flushNextRender%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0AsetTimeout(function%20()%20%7B%0Aself._flushRenderCallbacks(self._afterNextRenderQueue)%3B%0Aself._afterNextRenderQueue%20%3D%20%5B%5D%3B%0Aself._waitingNextRender%20%3D%20false%3B%0A%7D)%3B%0A%7D%2C%0A_flushRenderCallbacks%3A%20function%20(callbacks)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20callbacks.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20callbacks%5Bi%5D%3B%0Ah%5B1%5D.apply(h%5B0%5D%2C%20h%5B2%5D%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%0A%7D%3B%0Aif%20(window.HTMLImports)%20%7B%0AHTMLImports.whenReady(function%20()%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D)%3B%0A%7D%20else%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D%0APolymer.ImportStatus%20%3D%20Polymer.RenderStatus%3B%0APolymer.ImportStatus.whenLoaded%20%3D%20Polymer.ImportStatus.whenReady%3B%0APolymer.Base%20%3D%20%7B%0A__isPolymerInstance__%3A%20true%2C%0A_addFeature%3A%20function%20(feature)%20%7B%0Athis.extend(this%2C%20feature)%3B%0A%7D%2C%0AregisterCallback%3A%20function%20()%20%7B%0Athis._desugarBehaviors()%3B%0Athis._doBehavior('beforeRegister')%3B%0Athis._registerFeatures()%3B%0Athis._doBehavior('registered')%3B%0A%7D%2C%0AcreatedCallback%3A%20function%20()%20%7B%0APolymer.telemetry.instanceCount%2B%2B%3B%0Athis.root%20%3D%20this%3B%0Athis._doBehavior('created')%3B%0Athis._initFeatures()%3B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0APolymer.RenderStatus.whenReady(function%20()%20%7B%0Aself.isAttached%20%3D%20true%3B%0Aself._doBehavior('attached')%3B%0A%7D)%3B%0A%7D%2C%0AdetachedCallback%3A%20function%20()%20%7B%0Athis.isAttached%20%3D%20false%3B%0Athis._doBehavior('detached')%3B%0A%7D%2C%0AattributeChangedCallback%3A%20function%20(name%2C%20oldValue%2C%20newValue)%20%7B%0Athis._attributeChangedImpl(name)%3B%0Athis._doBehavior('attributeChanged'%2C%20%5B%0Aname%2C%0AoldValue%2C%0AnewValue%0A%5D)%3B%0A%7D%2C%0A_attributeChangedImpl%3A%20function%20(name)%20%7B%0Athis._setAttributeToProperty(this%2C%20name)%3B%0A%7D%2C%0Aextend%3A%20function%20(prototype%2C%20api)%20%7B%0Aif%20(prototype%20%26%26%20api)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(api)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis.copyOwnProperty(n%2C%20api%2C%20prototype)%3B%0A%7D%0A%7D%0Areturn%20prototype%20%7C%7C%20api%3B%0A%7D%2C%0Amixin%3A%20function%20(target%2C%20source)%20%7B%0Afor%20(var%20i%20in%20source)%20%7B%0Atarget%5Bi%5D%20%3D%20source%5Bi%5D%3B%0A%7D%0Areturn%20target%3B%0A%7D%2C%0AcopyOwnProperty%3A%20function%20(name%2C%20source%2C%20target)%20%7B%0Avar%20pd%20%3D%20Object.getOwnPropertyDescriptor(source%2C%20name)%3B%0Aif%20(pd)%20%7B%0AObject.defineProperty(target%2C%20name%2C%20pd)%3B%0A%7D%0A%7D%2C%0A_log%3A%20console.log.apply.bind(console.log%2C%20console)%2C%0A_warn%3A%20console.warn.apply.bind(console.warn%2C%20console)%2C%0A_error%3A%20console.error.apply.bind(console.error%2C%20console)%2C%0A_logf%3A%20function%20()%20%7B%0Areturn%20this._logPrefix.concat(%5Bthis.is%5D).concat(Array.prototype.slice.call(arguments%2C%200))%3B%0A%7D%0A%7D%3B%0APolymer.Base._logPrefix%20%3D%20function%20()%20%7B%0Avar%20color%20%3D%20window.chrome%20%7C%7C%20%2Ffirefox%2Fi.test(navigator.userAgent)%3B%0Areturn%20color%20%3F%20%5B%0A'%25c%5B%25s%3A%3A%25s%5D%3A'%2C%0A'font-weight%3A%20bold%3B%20background-color%3A%23EEEE00%3B'%0A%5D%20%3A%20%5B'%5B%25s%3A%3A%25s%5D%3A'%5D%3B%0A%7D()%3B%0APolymer.Base.chainObject%20%3D%20function%20(object%2C%20inherited)%20%7B%0Aif%20(object%20%26%26%20inherited%20%26%26%20object%20!%3D%3D%20inherited)%20%7B%0Aif%20(!Object.__proto__)%20%7B%0Aobject%20%3D%20Polymer.Base.extend(Object.create(inherited)%2C%20object)%3B%0A%7D%0Aobject.__proto__%20%3D%20inherited%3B%0A%7D%0Areturn%20object%3B%0A%7D%3B%0APolymer.Base%20%3D%20Polymer.Base.chainObject(Polymer.Base%2C%20HTMLElement.prototype)%3B%0Aif%20(window.CustomElements)%20%7B%0APolymer.instanceof%20%3D%20CustomElements.instanceof%3B%0A%7D%20else%20%7B%0APolymer.instanceof%20%3D%20function%20(obj%2C%20ctor)%20%7B%0Areturn%20obj%20instanceof%20ctor%3B%0A%7D%3B%0A%7D%0APolymer.isInstance%20%3D%20function%20(obj)%20%7B%0Areturn%20Boolean(obj%20%26%26%20obj.__isPolymerInstance__)%3B%0A%7D%3B%0APolymer.telemetry.instanceCount%20%3D%200%3B%0A(function%20()%20%7B%0Avar%20modules%20%3D%20%7B%7D%3B%0Avar%20lcModules%20%3D%20%7B%7D%3B%0Avar%20findModule%20%3D%20function%20(id)%20%7B%0Areturn%20modules%5Bid%5D%20%7C%7C%20lcModules%5Bid.toLowerCase()%5D%3B%0A%7D%3B%0Avar%20DomModule%20%3D%20function%20()%20%7B%0Areturn%20document.createElement('dom-module')%3B%0A%7D%3B%0ADomModule.prototype%20%3D%20Object.create(HTMLElement.prototype)%3B%0APolymer.Base.extend(DomModule.prototype%2C%20%7B%0Aconstructor%3A%20DomModule%2C%0AcreatedCallback%3A%20function%20()%20%7B%0Athis.register()%3B%0A%7D%2C%0Aregister%3A%20function%20(id)%20%7B%0Aid%20%3D%20id%20%7C%7C%20this.id%20%7C%7C%20this.getAttribute('name')%20%7C%7C%20this.getAttribute('is')%3B%0Aif%20(id)%20%7B%0Athis.id%20%3D%20id%3B%0Amodules%5Bid%5D%20%3D%20this%3B%0AlcModules%5Bid.toLowerCase()%5D%20%3D%20this%3B%0A%7D%0A%7D%2C%0Aimport%3A%20function%20(id%2C%20selector)%20%7B%0Aif%20(id)%20%7B%0Avar%20m%20%3D%20findModule(id)%3B%0Aif%20(!m)%20%7B%0AforceDomModulesUpgrade()%3B%0Am%20%3D%20findModule(id)%3B%0A%7D%0Aif%20(m%20%26%26%20selector)%20%7B%0Am%20%3D%20m.querySelector(selector)%3B%0A%7D%0Areturn%20m%3B%0A%7D%0A%7D%0A%7D)%3B%0Avar%20cePolyfill%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Adocument.registerElement('dom-module'%2C%20DomModule)%3B%0Afunction%20forceDomModulesUpgrade()%20%7B%0Aif%20(cePolyfill)%20%7B%0Avar%20script%20%3D%20document._currentScript%20%7C%7C%20document.currentScript%3B%0Avar%20doc%20%3D%20script%20%26%26%20script.ownerDocument%20%7C%7C%20document%3B%0Avar%20modules%20%3D%20doc.querySelectorAll('dom-module')%3B%0Afor%20(var%20i%20%3D%20modules.length%20-%201%2C%20m%3B%20i%20%3E%3D%200%20%26%26%20(m%20%3D%20modules%5Bi%5D)%3B%20i--)%20%7B%0Aif%20(m.__upgraded__)%20%7B%0Areturn%3B%0A%7D%20else%20%7B%0ACustomElements.upgrade(m)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A_prepIs%3A%20function%20()%20%7B%0Aif%20(!this.is)%20%7B%0Avar%20module%20%3D%20(document._currentScript%20%7C%7C%20document.currentScript).parentNode%3B%0Aif%20(module.localName%20%3D%3D%3D%20'dom-module')%20%7B%0Avar%20id%20%3D%20module.id%20%7C%7C%20module.getAttribute('name')%20%7C%7C%20module.getAttribute('is')%3B%0Athis.is%20%3D%20id%3B%0A%7D%0A%7D%0Aif%20(this.is)%20%7B%0Athis.is%20%3D%20this.is.toLowerCase()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0Abehaviors%3A%20%5B%5D%2C%0A_desugarBehaviors%3A%20function%20()%20%7B%0Aif%20(this.behaviors.length)%20%7B%0Athis.behaviors%20%3D%20this._desugarSomeBehaviors(this.behaviors)%3B%0A%7D%0A%7D%2C%0A_desugarSomeBehaviors%3A%20function%20(behaviors)%20%7B%0Avar%20behaviorSet%20%3D%20%5B%5D%3B%0Abehaviors%20%3D%20this._flattenBehaviorsList(behaviors)%3B%0Afor%20(var%20i%20%3D%20behaviors.length%20-%201%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(behaviorSet.indexOf(b)%20%3D%3D%3D%20-1)%20%7B%0Athis._mixinBehavior(b)%3B%0AbehaviorSet.unshift(b)%3B%0A%7D%0A%7D%0Areturn%20behaviorSet%3B%0A%7D%2C%0A_flattenBehaviorsList%3A%20function%20(behaviors)%20%7B%0Avar%20flat%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20behaviors.length%3B%20i%2B%2B)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(b%20instanceof%20Array)%20%7B%0Aflat%20%3D%20flat.concat(this._flattenBehaviorsList(b))%3B%0A%7D%20else%20if%20(b)%20%7B%0Aflat.push(b)%3B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_flattenBehaviorsList'%2C%20'behavior%20is%20null%2C%20check%20for%20missing%20or%20404%20import'))%3B%0A%7D%0A%7D%0Areturn%20flat%3B%0A%7D%2C%0A_mixinBehavior%3A%20function%20(b)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(b)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!Polymer.Base._behaviorProperties%5Bn%5D%20%26%26%20!this.hasOwnProperty(n))%20%7B%0Athis.copyOwnProperty(n%2C%20b%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_prepBehaviors%3A%20function%20()%20%7B%0Athis._prepFlattenedBehaviors(this.behaviors)%3B%0A%7D%2C%0A_prepFlattenedBehaviors%3A%20function%20(behaviors)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20behaviors.length%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Athis._prepBehavior(behaviors%5Bi%5D)%3B%0A%7D%0Athis._prepBehavior(this)%3B%0A%7D%2C%0A_doBehavior%3A%20function%20(name%2C%20args)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._invokeBehavior(this.behaviors%5Bi%5D%2C%20name%2C%20args)%3B%0A%7D%0Athis._invokeBehavior(this%2C%20name%2C%20args)%3B%0A%7D%2C%0A_invokeBehavior%3A%20function%20(b%2C%20name%2C%20args)%20%7B%0Avar%20fn%20%3D%20b%5Bname%5D%3B%0Aif%20(fn)%20%7B%0Afn.apply(this%2C%20args%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%2C%0A_marshalBehaviors%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._marshalBehavior(this.behaviors%5Bi%5D)%3B%0A%7D%0Athis._marshalBehavior(this)%3B%0A%7D%0A%7D)%3B%0APolymer.Base._behaviorProperties%20%3D%20%7B%0AhostAttributes%3A%20true%2C%0AbeforeRegister%3A%20true%2C%0Aregistered%3A%20true%2C%0Aproperties%3A%20true%2C%0Aobservers%3A%20true%2C%0Alisteners%3A%20true%2C%0Acreated%3A%20true%2C%0Aattached%3A%20true%2C%0Adetached%3A%20true%2C%0AattributeChanged%3A%20true%2C%0Aready%3A%20true%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_getExtendedPrototype%3A%20function%20(tag)%20%7B%0Areturn%20this._getExtendedNativePrototype(tag)%3B%0A%7D%2C%0A_nativePrototypes%3A%20%7B%7D%2C%0A_getExtendedNativePrototype%3A%20function%20(tag)%20%7B%0Avar%20p%20%3D%20this._nativePrototypes%5Btag%5D%3B%0Aif%20(!p)%20%7B%0Avar%20np%20%3D%20this.getNativePrototype(tag)%3B%0Ap%20%3D%20this.extend(Object.create(np)%2C%20Polymer.Base)%3B%0Athis._nativePrototypes%5Btag%5D%20%3D%20p%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0AgetNativePrototype%3A%20function%20(tag)%20%7B%0Areturn%20Object.getPrototypeOf(document.createElement(tag))%3B%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0A_prepConstructor%3A%20function%20()%20%7B%0Athis._factoryArgs%20%3D%20this.extends%20%3F%20%5B%0Athis.extends%2C%0Athis.is%0A%5D%20%3A%20%5Bthis.is%5D%3B%0Avar%20ctor%20%3D%20function%20()%20%7B%0Areturn%20this._factory(arguments)%3B%0A%7D%3B%0Aif%20(this.hasOwnProperty('extends'))%20%7B%0Actor.extends%20%3D%20this.extends%3B%0A%7D%0AObject.defineProperty(this%2C%20'constructor'%2C%20%7B%0Avalue%3A%20ctor%2C%0Awritable%3A%20true%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0Actor.prototype%20%3D%20this%3B%0A%7D%2C%0A_factory%3A%20function%20(args)%20%7B%0Avar%20elt%20%3D%20document.createElement.apply(document%2C%20this._factoryArgs)%3B%0Aif%20(this.factoryImpl)%20%7B%0Athis.factoryImpl.apply(elt%2C%20args)%3B%0A%7D%0Areturn%20elt%3B%0A%7D%0A%7D)%3B%0APolymer.nob%20%3D%20Object.create(null)%3B%0APolymer.Base._addFeature(%7B%0Aproperties%3A%20%7B%7D%2C%0AgetPropertyInfo%3A%20function%20(property)%20%7B%0Avar%20info%20%3D%20this._getPropertyInfo(property%2C%20this.properties)%3B%0Aif%20(!info)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Ainfo%20%3D%20this._getPropertyInfo(property%2C%20this.behaviors%5Bi%5D.properties)%3B%0Aif%20(info)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%0A%7D%0Areturn%20info%20%7C%7C%20Polymer.nob%3B%0A%7D%2C%0A_getPropertyInfo%3A%20function%20(property%2C%20properties)%20%7B%0Avar%20p%20%3D%20properties%20%26%26%20properties%5Bproperty%5D%3B%0Aif%20(typeof%20p%20%3D%3D%3D%20'function')%20%7B%0Ap%20%3D%20properties%5Bproperty%5D%20%3D%20%7B%20type%3A%20p%20%7D%3B%0A%7D%0Aif%20(p)%20%7B%0Ap.defined%20%3D%20true%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0A_prepPropertyInfo%3A%20function%20()%20%7B%0Athis._propertyInfo%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.behaviors%5Bi%5D.properties)%3B%0A%7D%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.properties)%3B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this._propertyEffects)%3B%0A%7D%2C%0A_addPropertyInfo%3A%20function%20(target%2C%20source)%20%7B%0Aif%20(source)%20%7B%0Avar%20t%2C%20s%3B%0Afor%20(var%20i%20in%20source)%20%7B%0At%20%3D%20target%5Bi%5D%3B%0As%20%3D%20source%5Bi%5D%3B%0Aif%20(i%5B0%5D%20%3D%3D%3D%20'_'%20%26%26%20!s.readOnly)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(!target%5Bi%5D)%20%7B%0Atarget%5Bi%5D%20%3D%20%7B%0Atype%3A%20typeof%20s%20%3D%3D%3D%20'function'%20%3F%20s%20%3A%20s.type%2C%0AreadOnly%3A%20s.readOnly%2C%0Aattribute%3A%20Polymer.CaseMap.camelToDashCase(i)%0A%7D%3B%0A%7D%20else%20%7B%0Aif%20(!t.type)%20%7B%0At.type%20%3D%20s.type%3B%0A%7D%0Aif%20(!t.readOnly)%20%7B%0At.readOnly%20%3D%20s.readOnly%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer.CaseMap%20%3D%20%7B%0A_caseMap%3A%20%7B%7D%2C%0A_rx%3A%20%7B%0AdashToCamel%3A%20%2F-%5Ba-z%5D%2Fg%2C%0AcamelToDash%3A%20%2F(%5BA-Z%5D)%2Fg%0A%7D%2C%0AdashToCamelCase%3A%20function%20(dash)%20%7B%0Areturn%20this._caseMap%5Bdash%5D%20%7C%7C%20(this._caseMap%5Bdash%5D%20%3D%20dash.indexOf('-')%20%3C%200%20%3F%20dash%20%3A%20dash.replace(this._rx.dashToCamel%2C%20function%20(m)%20%7B%0Areturn%20m%5B1%5D.toUpperCase()%3B%0A%7D))%3B%0A%7D%2C%0AcamelToDashCase%3A%20function%20(camel)%20%7B%0Areturn%20this._caseMap%5Bcamel%5D%20%7C%7C%20(this._caseMap%5Bcamel%5D%20%3D%20camel.replace(this._rx.camelToDash%2C%20'-%241').toLowerCase())%3B%0A%7D%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_addHostAttributes%3A%20function%20(attributes)%20%7B%0Aif%20(!this._aggregatedAttributes)%20%7B%0Athis._aggregatedAttributes%20%3D%20%7B%7D%3B%0A%7D%0Aif%20(attributes)%20%7B%0Athis.mixin(this._aggregatedAttributes%2C%20attributes)%3B%0A%7D%0A%7D%2C%0A_marshalHostAttributes%3A%20function%20()%20%7B%0Aif%20(this._aggregatedAttributes)%20%7B%0Athis._applyAttributes(this%2C%20this._aggregatedAttributes)%3B%0A%7D%0A%7D%2C%0A_applyAttributes%3A%20function%20(node%2C%20attr%24)%20%7B%0Afor%20(var%20n%20in%20attr%24)%20%7B%0Aif%20(!this.hasAttribute(n)%20%26%26%20n%20!%3D%3D%20'class')%20%7B%0Avar%20v%20%3D%20attr%24%5Bn%5D%3B%0Athis.serializeValueToAttribute(v%2C%20n%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_marshalAttributes%3A%20function%20()%20%7B%0Athis._takeAttributesToModel(this)%3B%0A%7D%2C%0A_takeAttributesToModel%3A%20function%20(model)%20%7B%0Aif%20(this.hasAttributes())%20%7B%0Afor%20(var%20i%20in%20this._propertyInfo)%20%7B%0Avar%20info%20%3D%20this._propertyInfo%5Bi%5D%3B%0Aif%20(this.hasAttribute(info.attribute))%20%7B%0Athis._setAttributeToProperty(model%2C%20info.attribute%2C%20i%2C%20info)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_setAttributeToProperty%3A%20function%20(model%2C%20attribute%2C%20property%2C%20info)%20%7B%0Aif%20(!this._serializing)%20%7B%0Aproperty%20%3D%20property%20%7C%7C%20Polymer.CaseMap.dashToCamelCase(attribute)%3B%0Ainfo%20%3D%20info%20%7C%7C%20this._propertyInfo%20%26%26%20this._propertyInfo%5Bproperty%5D%3B%0Aif%20(info%20%26%26%20!info.readOnly)%20%7B%0Avar%20v%20%3D%20this.getAttribute(attribute)%3B%0Amodel%5Bproperty%5D%20%3D%20this.deserialize(v%2C%20info.type)%3B%0A%7D%0A%7D%0A%7D%2C%0A_serializing%3A%20false%2C%0AreflectPropertyToAttribute%3A%20function%20(property%2C%20attribute%2C%20value)%20%7B%0Athis._serializing%20%3D%20true%3B%0Avalue%20%3D%20value%20%3D%3D%3D%20undefined%20%3F%20this%5Bproperty%5D%20%3A%20value%3B%0Athis.serializeValueToAttribute(value%2C%20attribute%20%7C%7C%20Polymer.CaseMap.camelToDashCase(property))%3B%0Athis._serializing%20%3D%20false%3B%0A%7D%2C%0AserializeValueToAttribute%3A%20function%20(value%2C%20attribute%2C%20node)%20%7B%0Avar%20str%20%3D%20this.serialize(value)%3B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(str%20%3D%3D%3D%20undefined)%20%7B%0Anode.removeAttribute(attribute)%3B%0A%7D%20else%20%7B%0Anode.setAttribute(attribute%2C%20str)%3B%0A%7D%0A%7D%2C%0Adeserialize%3A%20function%20(value%2C%20type)%20%7B%0Aswitch%20(type)%20%7B%0Acase%20Number%3A%0Avalue%20%3D%20Number(value)%3B%0Abreak%3B%0Acase%20Boolean%3A%0Avalue%20%3D%20value%20!%3D%20null%3B%0Abreak%3B%0Acase%20Object%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0A%7D%0Abreak%3B%0Acase%20Array%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0Avalue%20%3D%20null%3B%0Aconsole.warn('Polymer%3A%3AAttributes%3A%20couldn%60t%20decode%20Array%20as%20JSON')%3B%0A%7D%0Abreak%3B%0Acase%20Date%3A%0Avalue%20%3D%20new%20Date(value)%3B%0Abreak%3B%0Acase%20String%3A%0Adefault%3A%0Abreak%3B%0A%7D%0Areturn%20value%3B%0A%7D%2C%0Aserialize%3A%20function%20(value)%20%7B%0Aswitch%20(typeof%20value)%20%7B%0Acase%20'boolean'%3A%0Areturn%20value%20%3F%20''%20%3A%20undefined%3B%0Acase%20'object'%3A%0Aif%20(value%20instanceof%20Date)%20%7B%0Areturn%20value.toString()%3B%0A%7D%20else%20if%20(value)%20%7B%0Atry%20%7B%0Areturn%20JSON.stringify(value)%3B%0A%7D%20catch%20(x)%20%7B%0Areturn%20''%3B%0A%7D%0A%7D%0Adefault%3A%0Areturn%20value%20!%3D%20null%20%3F%20value%20%3A%20undefined%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.version%20%3D%20'1.3.1'%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._marshalHostAttributes()%3B%0Athis._marshalBehaviors()%3B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-micro.html.js%0A:182 in createdCallback https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in i https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in n https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in t data:text/javascript;charset=utf-8,Polymer.Base._addFeature(%7B%0A_prepTemplate%3A%20function%20()%20%7B%0Aif%20(this._template%20%3D%3D%3D%20undefined)%20%7B%0Athis._template%20%3D%20Polymer.DomModule.import(this.is%2C%20'template')%3B%0A%7D%0Aif%20(this._template%20%26%26%20this._template.hasAttribute('is'))%20%7B%0Athis._warn(this._logf('_prepTemplate'%2C%20'top-level%20Polymer%20template%20'%20%2B%20'must%20not%20be%20a%20type-extension%2C%20found'%2C%20this._template%2C%20'Move%20inside%20simple%20%3Ctemplate%3E.'))%3B%0A%7D%0Aif%20(this._template%20%26%26%20!this._template.content%20%26%26%20window.HTMLTemplateElement%20%26%26%20HTMLTemplateElement.decorate)%20%7B%0AHTMLTemplateElement.decorate(this._template)%3B%0A%7D%0A%7D%2C%0A_stampTemplate%3A%20function%20()%20%7B%0Aif%20(this._template)%20%7B%0Athis.root%20%3D%20this.instanceTemplate(this._template)%3B%0A%7D%0A%7D%2C%0AinstanceTemplate%3A%20function%20(template)%20%7B%0Avar%20dom%20%3D%20document.importNode(template._content%20%7C%7C%20template.content%2C%20true)%3B%0Areturn%20dom%3B%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0Avar%20baseAttachedCallback%20%3D%20Polymer.Base.attachedCallback%3B%0APolymer.Base._addFeature(%7B%0A_hostStack%3A%20%5B%5D%2C%0Aready%3A%20function%20()%20%7B%0A%7D%2C%0A_registerHost%3A%20function%20(host)%20%7B%0Athis.dataHost%20%3D%20host%20%3D%20host%20%7C%7C%20Polymer.Base._hostStack%5BPolymer.Base._hostStack.length%20-%201%5D%3B%0Aif%20(host%20%26%26%20host._clients)%20%7B%0Ahost._clients.push(this)%3B%0A%7D%0Athis._clients%20%3D%20null%3B%0Athis._clientsReadied%20%3D%20false%3B%0A%7D%2C%0A_beginHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.push(this)%3B%0Aif%20(!this._clients)%20%7B%0Athis._clients%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_endHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.pop()%3B%0A%7D%2C%0A_tryReady%3A%20function%20()%20%7B%0Athis._readied%20%3D%20false%3B%0Aif%20(this._canReady())%20%7B%0Athis._ready()%3B%0A%7D%0A%7D%2C%0A_canReady%3A%20function%20()%20%7B%0Areturn%20!this.dataHost%20%7C%7C%20this.dataHost._clientsReadied%3B%0A%7D%2C%0A_ready%3A%20function%20()%20%7B%0Athis._beforeClientsReady()%3B%0Aif%20(this._template)%20%7B%0Athis._setupRoot()%3B%0Athis._readyClients()%3B%0A%7D%0Athis._clientsReadied%20%3D%20true%3B%0Athis._clients%20%3D%20null%3B%0Athis._afterClientsReady()%3B%0Athis._readySelf()%3B%0A%7D%2C%0A_readyClients%3A%20function%20()%20%7B%0Athis._beginDistribute()%3B%0Avar%20c%24%20%3D%20this._clients%3B%0Aif%20(c%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._ready()%3B%0A%7D%0A%7D%0Athis._finishDistribute()%3B%0A%7D%2C%0A_readySelf%3A%20function%20()%20%7B%0Athis._doBehavior('ready')%3B%0Athis._readied%20%3D%20true%3B%0Aif%20(this._attachedPending)%20%7B%0Athis._attachedPending%20%3D%20false%3B%0Athis.attachedCallback()%3B%0A%7D%0A%7D%2C%0A_beforeClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_afterClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeAttached%3A%20function%20()%20%7B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Aif%20(this._readied)%20%7B%0Athis._beforeAttached()%3B%0AbaseAttachedCallback.call(this)%3B%0A%7D%20else%20%7B%0Athis._attachedPending%20%3D%20true%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.ArraySplice%20%3D%20function%20()%20%7B%0Afunction%20newSplice(index%2C%20removed%2C%20addedCount)%20%7B%0Areturn%20%7B%0Aindex%3A%20index%2C%0Aremoved%3A%20removed%2C%0AaddedCount%3A%20addedCount%0A%7D%3B%0A%7D%0Avar%20EDIT_LEAVE%20%3D%200%3B%0Avar%20EDIT_UPDATE%20%3D%201%3B%0Avar%20EDIT_ADD%20%3D%202%3B%0Avar%20EDIT_DELETE%20%3D%203%3B%0Afunction%20ArraySplice()%20%7B%0A%7D%0AArraySplice.prototype%20%3D%20%7B%0AcalcEditDistances%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20rowCount%20%3D%20oldEnd%20-%20oldStart%20%2B%201%3B%0Avar%20columnCount%20%3D%20currentEnd%20-%20currentStart%20%2B%201%3B%0Avar%20distances%20%3D%20new%20Array(rowCount)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Adistances%5Bi%5D%20%3D%20new%20Array(columnCount)%3B%0Adistances%5Bi%5D%5B0%5D%20%3D%20i%3B%0A%7D%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%0Adistances%5B0%5D%5Bj%5D%20%3D%20j%3B%0Afor%20(i%20%3D%201%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%201%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%20%7B%0Aif%20(this.equals(current%5BcurrentStart%20%2B%20j%20-%201%5D%2C%20old%5BoldStart%20%2B%20i%20-%201%5D))%0Adistances%5Bi%5D%5Bj%5D%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Aelse%20%7B%0Avar%20north%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%20%2B%201%3B%0Avar%20west%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%20%2B%201%3B%0Adistances%5Bi%5D%5Bj%5D%20%3D%20north%20%3C%20west%20%3F%20north%20%3A%20west%3B%0A%7D%0A%7D%0A%7D%0Areturn%20distances%3B%0A%7D%2C%0AspliceOperationsFromEditDistances%3A%20function%20(distances)%20%7B%0Avar%20i%20%3D%20distances.length%20-%201%3B%0Avar%20j%20%3D%20distances%5B0%5D.length%20-%201%3B%0Avar%20current%20%3D%20distances%5Bi%5D%5Bj%5D%3B%0Avar%20edits%20%3D%20%5B%5D%3B%0Awhile%20(i%20%3E%200%20%7C%7C%20j%20%3E%200)%20%7B%0Aif%20(i%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acontinue%3B%0A%7D%0Aif%20(j%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acontinue%3B%0A%7D%0Avar%20northWest%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Avar%20west%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%3B%0Avar%20north%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%3B%0Avar%20min%3B%0Aif%20(west%20%3C%20north)%0Amin%20%3D%20west%20%3C%20northWest%20%3F%20west%20%3A%20northWest%3B%0Aelse%0Amin%20%3D%20north%20%3C%20northWest%20%3F%20north%20%3A%20northWest%3B%0Aif%20(min%20%3D%3D%20northWest)%20%7B%0Aif%20(northWest%20%3D%3D%20current)%20%7B%0Aedits.push(EDIT_LEAVE)%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_UPDATE)%3B%0Acurrent%20%3D%20northWest%3B%0A%7D%0Ai--%3B%0Aj--%3B%0A%7D%20else%20if%20(min%20%3D%3D%20west)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acurrent%20%3D%20west%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acurrent%20%3D%20north%3B%0A%7D%0A%7D%0Aedits.reverse()%3B%0Areturn%20edits%3B%0A%7D%2C%0AcalcSplices%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20prefixCount%20%3D%200%3B%0Avar%20suffixCount%20%3D%200%3B%0Avar%20minLength%20%3D%20Math.min(currentEnd%20-%20currentStart%2C%20oldEnd%20-%20oldStart)%3B%0Aif%20(currentStart%20%3D%3D%200%20%26%26%20oldStart%20%3D%3D%200)%0AprefixCount%20%3D%20this.sharedPrefix(current%2C%20old%2C%20minLength)%3B%0Aif%20(currentEnd%20%3D%3D%20current.length%20%26%26%20oldEnd%20%3D%3D%20old.length)%0AsuffixCount%20%3D%20this.sharedSuffix(current%2C%20old%2C%20minLength%20-%20prefixCount)%3B%0AcurrentStart%20%2B%3D%20prefixCount%3B%0AoldStart%20%2B%3D%20prefixCount%3B%0AcurrentEnd%20-%3D%20suffixCount%3B%0AoldEnd%20-%3D%20suffixCount%3B%0Aif%20(currentEnd%20-%20currentStart%20%3D%3D%200%20%26%26%20oldEnd%20-%20oldStart%20%3D%3D%200)%0Areturn%20%5B%5D%3B%0Aif%20(currentStart%20%3D%3D%20currentEnd)%20%7B%0Avar%20splice%20%3D%20newSplice(currentStart%2C%20%5B%5D%2C%200)%3B%0Awhile%20(oldStart%20%3C%20oldEnd)%0Asplice.removed.push(old%5BoldStart%2B%2B%5D)%3B%0Areturn%20%5Bsplice%5D%3B%0A%7D%20else%20if%20(oldStart%20%3D%3D%20oldEnd)%0Areturn%20%5BnewSplice(currentStart%2C%20%5B%5D%2C%20currentEnd%20-%20currentStart)%5D%3B%0Avar%20ops%20%3D%20this.spliceOperationsFromEditDistances(this.calcEditDistances(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd))%3B%0Asplice%20%3D%20undefined%3B%0Avar%20splices%20%3D%20%5B%5D%3B%0Avar%20index%20%3D%20currentStart%3B%0Avar%20oldIndex%20%3D%20oldStart%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ops.length%3B%20i%2B%2B)%20%7B%0Aswitch%20(ops%5Bi%5D)%20%7B%0Acase%20EDIT_LEAVE%3A%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0Asplice%20%3D%20undefined%3B%0A%7D%0Aindex%2B%2B%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_UPDATE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_ADD%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_DELETE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0A%7D%0A%7D%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0A%7D%0Areturn%20splices%3B%0A%7D%2C%0AsharedPrefix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20searchLength%3B%20i%2B%2B)%0Aif%20(!this.equals(current%5Bi%5D%2C%20old%5Bi%5D))%0Areturn%20i%3B%0Areturn%20searchLength%3B%0A%7D%2C%0AsharedSuffix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Avar%20index1%20%3D%20current.length%3B%0Avar%20index2%20%3D%20old.length%3B%0Avar%20count%20%3D%200%3B%0Awhile%20(count%20%3C%20searchLength%20%26%26%20this.equals(current%5B--index1%5D%2C%20old%5B--index2%5D))%0Acount%2B%2B%3B%0Areturn%20count%3B%0A%7D%2C%0AcalculateSplices%3A%20function%20(current%2C%20previous)%20%7B%0Areturn%20this.calcSplices(current%2C%200%2C%20current.length%2C%20previous%2C%200%2C%20previous.length)%3B%0A%7D%2C%0Aequals%3A%20function%20(currentValue%2C%20previousValue)%20%7B%0Areturn%20currentValue%20%3D%3D%3D%20previousValue%3B%0A%7D%0A%7D%3B%0Areturn%20new%20ArraySplice()%3B%0A%7D()%3B%0APolymer.domInnerHTML%20%3D%20function%20()%20%7B%0Avar%20escapeAttrRegExp%20%3D%20%2F%5B%26%5Cu00A0%22%5D%2Fg%3B%0Avar%20escapeDataRegExp%20%3D%20%2F%5B%26%5Cu00A0%3C%3E%5D%2Fg%3B%0Afunction%20escapeReplace(c)%20%7B%0Aswitch%20(c)%20%7B%0Acase%20'%26'%3A%0Areturn%20'%26amp%3B'%3B%0Acase%20'%3C'%3A%0Areturn%20'%26lt%3B'%3B%0Acase%20'%3E'%3A%0Areturn%20'%26gt%3B'%3B%0Acase%20'%22'%3A%0Areturn%20'%26quot%3B'%3B%0Acase%20'%5CxA0'%3A%0Areturn%20'%26nbsp%3B'%3B%0A%7D%0A%7D%0Afunction%20escapeAttr(s)%20%7B%0Areturn%20s.replace(escapeAttrRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20escapeData(s)%20%7B%0Areturn%20s.replace(escapeDataRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20makeSet(arr)%20%7B%0Avar%20set%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20arr.length%3B%20i%2B%2B)%20%7B%0Aset%5Barr%5Bi%5D%5D%20%3D%20true%3B%0A%7D%0Areturn%20set%3B%0A%7D%0Avar%20voidElements%20%3D%20makeSet(%5B%0A'area'%2C%0A'base'%2C%0A'br'%2C%0A'col'%2C%0A'command'%2C%0A'embed'%2C%0A'hr'%2C%0A'img'%2C%0A'input'%2C%0A'keygen'%2C%0A'link'%2C%0A'meta'%2C%0A'param'%2C%0A'source'%2C%0A'track'%2C%0A'wbr'%0A%5D)%3B%0Avar%20plaintextParents%20%3D%20makeSet(%5B%0A'style'%2C%0A'script'%2C%0A'xmp'%2C%0A'iframe'%2C%0A'noembed'%2C%0A'noframes'%2C%0A'plaintext'%2C%0A'noscript'%0A%5D)%3B%0Afunction%20getOuterHTML(node%2C%20parentNode%2C%20composed)%20%7B%0Aswitch%20(node.nodeType)%20%7B%0Acase%20Node.ELEMENT_NODE%3A%0Avar%20tagName%20%3D%20node.localName%3B%0Avar%20s%20%3D%20'%3C'%20%2B%20tagName%3B%0Avar%20attrs%20%3D%20node.attributes%3B%0Afor%20(var%20i%20%3D%200%2C%20attr%3B%20attr%20%3D%20attrs%5Bi%5D%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20'%20'%20%2B%20attr.name%20%2B%20'%3D%22'%20%2B%20escapeAttr(attr.value)%20%2B%20'%22'%3B%0A%7D%0As%20%2B%3D%20'%3E'%3B%0Aif%20(voidElements%5BtagName%5D)%20%7B%0Areturn%20s%3B%0A%7D%0Areturn%20s%20%2B%20getInnerHTML(node%2C%20composed)%20%2B%20'%3C%2F'%20%2B%20tagName%20%2B%20'%3E'%3B%0Acase%20Node.TEXT_NODE%3A%0Avar%20data%20%3D%20node.data%3B%0Aif%20(parentNode%20%26%26%20plaintextParents%5BparentNode.localName%5D)%20%7B%0Areturn%20data%3B%0A%7D%0Areturn%20escapeData(data)%3B%0Acase%20Node.COMMENT_NODE%3A%0Areturn%20'%3C!--'%20%2B%20node.data%20%2B%20'--%3E'%3B%0Adefault%3A%0Aconsole.error(node)%3B%0Athrow%20new%20Error('not%20implemented')%3B%0A%7D%0A%7D%0Afunction%20getInnerHTML(node%2C%20composed)%20%7B%0Aif%20(node%20instanceof%20HTMLTemplateElement)%0Anode%20%3D%20node.content%3B%0Avar%20s%20%3D%20''%3B%0Avar%20c%24%20%3D%20Polymer.dom(node).childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20child%3B%20i%20%3C%20l%20%26%26%20(child%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20getOuterHTML(child%2C%20node%2C%20composed)%3B%0A%7D%0Areturn%20s%3B%0A%7D%0Areturn%20%7B%20getInnerHTML%3A%20getInnerHTML%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20nativeInsertBefore%20%3D%20Element.prototype.insertBefore%3B%0Avar%20nativeAppendChild%20%3D%20Element.prototype.appendChild%3B%0Avar%20nativeRemoveChild%20%3D%20Element.prototype.removeChild%3B%0APolymer.TreeApi%20%3D%20%7B%0AarrayCopyChildNodes%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopyChildren%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstElementChild%3B%20n%3B%20n%20%3D%20n.nextElementSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopy%3A%20function%20(a%24)%20%7B%0Avar%20l%20%3D%20a%24.length%3B%0Avar%20copy%20%3D%20new%20Array(l)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Acopy%5Bi%5D%20%3D%20a%24%5Bi%5D%3B%0A%7D%0Areturn%20copy%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Logical%20%3D%20%7B%0AhasParentNode%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.parentNode)%3B%0A%7D%2C%0AhasChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.childNodes%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20this.hasChildNodes(node)%20%3F%20this._getChildNodes(node)%20%3A%20node.childNodes%3B%0A%7D%2C%0A_getChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!node.__dom.childNodes)%20%7B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.__dom.firstChild%3B%20n%3B%20n%20%3D%20n.__dom.nextSibling)%20%7B%0Anode.__dom.childNodes.push(n)%3B%0A%7D%0A%7D%0Areturn%20node.__dom.childNodes%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.parentNode%20!%3D%3D%20undefined%20%3F%20node.__dom.parentNode%20%3A%20node.parentNode%3B%0A%7D%2C%0AgetFirstChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20node.__dom.firstChild%20%3A%20node.firstChild%3B%0A%7D%2C%0AgetLastChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20node.__dom.lastChild%20%3A%20node.lastChild%3B%0A%7D%2C%0AgetNextSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.nextSibling%20%3A%20node.nextSibling%3B%0A%7D%2C%0AgetPreviousSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.previousSibling%20%3A%20node.previousSibling%3B%0A%7D%2C%0AgetFirstElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20this._getFirstElementChild(node)%20%3A%20node.firstElementChild%3B%0A%7D%2C%0A_getFirstElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.firstChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetLastElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20this._getLastElementChild(node)%20%3A%20node.lastElementChild%3B%0A%7D%2C%0A_getLastElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.lastChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetNextElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20this._getNextElementSibling(node)%20%3A%20node.nextElementSibling%3B%0A%7D%2C%0A_getNextElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetPreviousElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20this._getPreviousElementSibling(node)%20%3A%20node.previousElementSibling%3B%0A%7D%2C%0A_getPreviousElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.previousSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AsaveChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!this.hasChildNodes(node))%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Anode.__dom.firstChild%20%3D%20node.firstChild%3B%0Anode.__dom.lastChild%20%3D%20node.lastChild%3B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0An.__dom%20%3D%20n.__dom%20%7C%7C%20%7B%7D%3B%0An.__dom.parentNode%20%3D%20node%3B%0Anode.__dom.childNodes.push(n)%3B%0An.__dom.nextSibling%20%3D%20n.nextSibling%3B%0An.__dom.previousSibling%20%3D%20n.previousSibling%3B%0A%7D%0A%7D%0A%7D%2C%0ArecordInsertBefore%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Athis._linkNode(n%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%20else%20%7B%0Athis._linkNode(node%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%2C%0A_linkNode%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(ref_node)%20%7B%0Aref_node.__dom%20%3D%20ref_node.__dom%20%7C%7C%20%7B%7D%3B%0A%7D%0Anode.__dom.previousSibling%20%3D%20ref_node%20%3F%20ref_node.__dom.previousSibling%20%3A%20container.__dom.lastChild%3B%0Aif%20(node.__dom.previousSibling)%20%7B%0Anode.__dom.previousSibling.__dom.nextSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.nextSibling%20%3D%20ref_node%3B%0Aif%20(node.__dom.nextSibling)%20%7B%0Anode.__dom.nextSibling.__dom.previousSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20container%3B%0Aif%20(ref_node)%20%7B%0Aif%20(ref_node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%20else%20%7B%0Acontainer.__dom.lastChild%20%3D%20node%3B%0Aif%20(!container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%2C%0ArecordRemoveChild%3A%20function%20(node%2C%20container)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node.__dom.nextSibling%3B%0A%7D%0Aif%20(node%20%3D%3D%3D%20container.__dom.lastChild)%20%7B%0Acontainer.__dom.lastChild%20%3D%20node.__dom.previousSibling%3B%0A%7D%0Avar%20p%20%3D%20node.__dom.previousSibling%3B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Aif%20(p)%20%7B%0Ap.__dom.nextSibling%20%3D%20n%3B%0A%7D%0Aif%20(n)%20%7B%0An.__dom.previousSibling%20%3D%20p%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20node.__dom.previousSibling%20%3D%20node.__dom.nextSibling%20%3D%20undefined%3B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Composed%20%3D%20%7B%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Polymer.TreeApi.arrayCopyChildNodes(node)%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.parentNode%3B%0A%7D%2C%0AclearChildNodes%3A%20function%20(node)%20%7B%0Anode.textContent%20%3D%20''%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(parentNode%2C%20newChild%2C%20refChild)%20%7B%0Areturn%20nativeInsertBefore.call(parentNode%2C%20newChild%2C%20refChild%20%7C%7C%20null)%3B%0A%7D%2C%0AappendChild%3A%20function%20(parentNode%2C%20newChild)%20%7B%0Areturn%20nativeAppendChild.call(parentNode%2C%20newChild)%3B%0A%7D%2C%0AremoveChild%3A%20function%20(parentNode%2C%20node)%20%7B%0Areturn%20nativeRemoveChild.call(parentNode%2C%20node)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0APolymer.DomApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20function%20(node)%20%7B%0Athis.node%20%3D%20needsToWrap%20%3F%20DomApi.wrap(node)%20%3A%20node%3B%0A%7D%3B%0Avar%20needsToWrap%20%3D%20Settings.hasShadow%20%26%26%20!Settings.nativeShadow%3B%0ADomApi.wrap%20%3D%20window.wrap%20%3F%20window.wrap%20%3A%20function%20(node)%20%7B%0Areturn%20node%3B%0A%7D%3B%0ADomApi.prototype%20%3D%20%7B%0Aflush%3A%20function%20()%20%7B%0APolymer.dom.flush()%3B%0A%7D%2C%0AdeepContains%3A%20function%20(node)%20%7B%0Aif%20(this.node.contains(node))%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20n%20%3D%20node%3B%0Avar%20doc%20%3D%20node.ownerDocument%3B%0Awhile%20(n%20%26%26%20n%20!%3D%3D%20doc%20%26%26%20n%20!%3D%3D%20this.node)%20%7B%0An%20%3D%20Polymer.dom(n).parentNode%20%7C%7C%20n.host%3B%0A%7D%0Areturn%20n%20%3D%3D%3D%20this.node%3B%0A%7D%2C%0AqueryDistributedElements%3A%20function%20(selector)%20%7B%0Avar%20c%24%20%3D%20this.getEffectiveChildNodes()%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%20%26%26%20DomApi.matchesSelector.call(c%2C%20selector))%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AgetEffectiveChildNodes%3A%20function%20()%20%7B%0Avar%20list%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.localName%20%3D%3D%3D%20CONTENT)%20%7B%0Avar%20d%24%20%3D%20dom(c).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20d%24.length%3B%20j%2B%2B)%20%7B%0Alist.push(d%24%5Bj%5D)%3B%0A%7D%0A%7D%20else%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AobserveNodes%3A%20function%20(callback)%20%7B%0Aif%20(callback)%20%7B%0Aif%20(!this.observer)%20%7B%0Athis.observer%20%3D%20this.node.localName%20%3D%3D%3D%20CONTENT%20%3F%20new%20DomApi.DistributedNodesObserver(this)%20%3A%20new%20DomApi.EffectiveNodesObserver(this)%3B%0A%7D%0Areturn%20this.observer.addListener(callback)%3B%0A%7D%0A%7D%2C%0AunobserveNodes%3A%20function%20(handle)%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.removeListener(handle)%3B%0A%7D%0A%7D%2C%0AnotifyObserver%3A%20function%20()%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.notify()%3B%0A%7D%0A%7D%2C%0A_query%3A%20function%20(matcher%2C%20node%2C%20halter)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this.node%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0Areturn%20list%3B%0A%7D%2C%0A_queryElements%3A%20function%20(elements%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20elements.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE)%20%7B%0Aif%20(this._queryElement(c%2C%20matcher%2C%20halter%2C%20list))%20%7B%0Areturn%20true%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_queryElement%3A%20function%20(node%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Avar%20result%20%3D%20matcher(node)%3B%0Aif%20(result)%20%7B%0Alist.push(node)%3B%0A%7D%0Aif%20(halter%20%26%26%20halter(result))%20%7B%0Areturn%20result%3B%0A%7D%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0A%7D%0A%7D%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%20%3D%20'content'%3B%0Avar%20dom%20%3D%20DomApi.factory%20%3D%20function%20(node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20document%3B%0Aif%20(!node.__domApi)%20%7B%0Anode.__domApi%20%3D%20new%20DomApi.ctor(node)%3B%0A%7D%0Areturn%20node.__domApi%3B%0A%7D%3B%0ADomApi.hasApi%20%3D%20function%20(node)%20%7B%0Areturn%20Boolean(node.__domApi)%3B%0A%7D%3B%0ADomApi.ctor%20%3D%20DomApi%3B%0APolymer.dom%20%3D%20function%20(obj%2C%20patch)%20%7B%0Aif%20(obj%20instanceof%20Event)%20%7B%0Areturn%20Polymer.EventApi.factory(obj)%3B%0A%7D%20else%20%7B%0Areturn%20DomApi.factory(obj%2C%20patch)%3B%0A%7D%0A%7D%3B%0Avar%20p%20%3D%20Element.prototype%3B%0ADomApi.matchesSelector%20%3D%20p.matches%20%7C%7C%20p.matchesSelector%20%7C%7C%20p.mozMatchesSelector%20%7C%7C%20p.msMatchesSelector%20%7C%7C%20p.oMatchesSelector%20%7C%7C%20p.webkitMatchesSelector%3B%0Areturn%20DomApi%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20dom%20%3D%20DomApi.factory%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20getInnerHTML%20%3D%20Polymer.domInnerHTML.getInnerHTML%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%3B%0Aif%20(Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0Avar%20nativeCloneNode%20%3D%20Element.prototype.cloneNode%3B%0Avar%20nativeImportNode%20%3D%20Document.prototype.importNode%3B%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0A_lazyDistribute%3A%20function%20(host)%20%7B%0Aif%20(host.shadyRoot%20%26%26%20host.shadyRoot._distributionClean)%20%7B%0Ahost.shadyRoot._distributionClean%20%3D%20false%3B%0APolymer.dom.addDebouncer(host.debounce('_distribute'%2C%20host._distributeContent))%3B%0A%7D%0A%7D%2C%0AappendChild%3A%20function%20(node)%20%7B%0Areturn%20this.insertBefore(node)%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(node%2C%20ref_node)%20%7B%0Aif%20(ref_node%20%26%26%20TreeApi.Logical.getParentNode(ref_node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20ref_node%20to%20be%20inserted%20before%20is%20not%20a%20child%20'%20%2B%20'of%20this%20node')%3B%0A%7D%0Aif%20(node.nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aif%20(DomApi.hasApi(parent))%20%7B%0Adom(parent).notifyObserver()%3B%0A%7D%0Athis._removeNode(node)%3B%0A%7D%20else%20%7B%0Athis._removeOwnerShadyRoot(node)%3B%0A%7D%0A%7D%0Aif%20(!this._addNode(node%2C%20ref_node))%20%7B%0Aif%20(ref_node)%20%7B%0Aref_node%20%3D%20ref_node.localName%20%3D%3D%3D%20CONTENT%20%3F%20this._firstComposedNode(ref_node)%20%3A%20ref_node%3B%0A%7D%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Aif%20(ref_node)%20%7B%0ATreeApi.Composed.insertBefore(container%2C%20node%2C%20ref_node)%3B%0A%7D%20else%20%7B%0ATreeApi.Composed.appendChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_addNode%3A%20function%20(node%2C%20ref_node)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Avar%20ipAdded%20%3D%20this._maybeAddInsertionPoint(node%2C%20this.node)%3B%0Aif%20(!root._invalidInsertionPoints)%20%7B%0Aroot._invalidInsertionPoints%20%3D%20ipAdded%3B%0A%7D%0Athis._addNodeToHost(root.host%2C%20node)%3B%0A%7D%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0ATreeApi.Logical.recordInsertBefore(node%2C%20this.node%2C%20ref_node)%3B%0A%7D%0Avar%20handled%20%3D%20this._maybeDistribute(node)%20%7C%7C%20this.node.shadyRoot%3B%0Aif%20(handled)%20%7B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Awhile%20(node.firstChild)%20%7B%0ATreeApi.Composed.removeChild(node%2C%20node.firstChild)%3B%0A%7D%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0Areturn%20handled%3B%0A%7D%2C%0AremoveChild%3A%20function%20(node)%20%7B%0Aif%20(TreeApi.Logical.getParentNode(node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20node%20to%20be%20removed%20is%20not%20a%20child%20of%20this%20node%3A%20'%20%2B%20node)%3B%0A%7D%0Aif%20(!this._removeNode(node))%20%7B%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(container%20%3D%3D%3D%20parent)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_removeNode%3A%20function%20(node)%20%7B%0Avar%20logicalParent%20%3D%20TreeApi.Logical.hasParentNode(node)%20%26%26%20TreeApi.Logical.getParentNode(node)%3B%0Avar%20distributed%3B%0Avar%20root%20%3D%20this._ownerShadyRootForNode(node)%3B%0Aif%20(logicalParent)%20%7B%0Adistributed%20%3D%20dom(node)._maybeDistributeParent()%3B%0ATreeApi.Logical.recordRemoveChild(node%2C%20logicalParent)%3B%0Aif%20(root%20%26%26%20this._removeDistributedChildren(root%2C%20node))%20%7B%0Aroot._invalidInsertionPoints%20%3D%20true%3B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Athis._removeOwnerShadyRoot(node)%3B%0Aif%20(root)%20%7B%0Athis._removeNodeFromHost(root.host%2C%20node)%3B%0A%7D%0Areturn%20distributed%3B%0A%7D%2C%0AreplaceChild%3A%20function%20(node%2C%20ref_node)%20%7B%0Athis.insertBefore(node%2C%20ref_node)%3B%0Athis.removeChild(ref_node)%3B%0Areturn%20node%3B%0A%7D%2C%0A_hasCachedOwnerRoot%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node._ownerShadyRoot%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Areturn%20this._ownerShadyRootForNode(this.node)%3B%0A%7D%2C%0A_ownerShadyRootForNode%3A%20function%20(node)%20%7B%0Aif%20(!node)%20%7B%0Areturn%3B%0A%7D%0Avar%20root%20%3D%20node._ownerShadyRoot%3B%0Aif%20(root%20%3D%3D%3D%20undefined)%20%7B%0Aif%20(node._isShadyRoot)%20%7B%0Aroot%20%3D%20node%3B%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aroot%20%3D%20parent._isShadyRoot%20%3F%20parent%20%3A%20this._ownerShadyRootForNode(parent)%3B%0A%7D%20else%20%7B%0Aroot%20%3D%20null%3B%0A%7D%0A%7D%0Aif%20(root%20%7C%7C%20document.documentElement.contains(node))%20%7B%0Anode._ownerShadyRoot%20%3D%20root%3B%0A%7D%0A%7D%0Areturn%20root%3B%0A%7D%2C%0A_maybeDistribute%3A%20function%20(node)%20%7B%0Avar%20fragContent%20%3D%20node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent%20%26%26%20dom(node).querySelector(CONTENT)%3B%0Avar%20wrappedContent%20%3D%20fragContent%20%26%26%20TreeApi.Logical.getParentNode(fragContent).nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%3B%0Avar%20hasContent%20%3D%20fragContent%20%7C%7C%20node.localName%20%3D%3D%3D%20CONTENT%3B%0Aif%20(hasContent)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Avar%20needsDist%20%3D%20this._nodeNeedsDistribution(this.node)%3B%0Aif%20(needsDist)%20%7B%0Athis._lazyDistribute(this.node)%3B%0A%7D%0Areturn%20needsDist%20%7C%7C%20hasContent%20%26%26%20!wrappedContent%3B%0A%7D%2C%0A_maybeAddInsertionPoint%3A%20function%20(node%2C%20parent)%20%7B%0Avar%20added%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent)%20%7B%0Avar%20c%24%20%3D%20dom(node).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20np%2C%20na%3B%20i%20%3C%20c%24.length%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anp%20%3D%20TreeApi.Logical.getParentNode(n)%3B%0Aif%20(np%20%3D%3D%3D%20node)%20%7B%0Anp%20%3D%20parent%3B%0A%7D%0Ana%20%3D%20this._maybeAddInsertionPoint(n%2C%20np)%3B%0Aadded%20%3D%20added%20%7C%7C%20na%3B%0A%7D%0A%7D%20else%20if%20(node.localName%20%3D%3D%3D%20CONTENT)%20%7B%0ATreeApi.Logical.saveChildNodes(parent)%3B%0ATreeApi.Logical.saveChildNodes(node)%3B%0Aadded%20%3D%20true%3B%0A%7D%0Areturn%20added%3B%0A%7D%2C%0A_updateInsertionPoints%3A%20function%20(host)%20%7B%0Avar%20i%24%20%3D%20host.shadyRoot._insertionPoints%20%3D%20dom(host.shadyRoot).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(TreeApi.Logical.getParentNode(c))%3B%0A%7D%0A%7D%2C%0A_nodeNeedsDistribution%3A%20function%20(node)%20%7B%0Areturn%20node%20%26%26%20node.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(node.shadyRoot)%3B%0A%7D%2C%0A_addNodeToHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementAdd)%20%7B%0Ahost._elementAdd(node)%3B%0A%7D%0A%7D%2C%0A_removeNodeFromHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementRemove)%20%7B%0Ahost._elementRemove(node)%3B%0A%7D%0A%7D%2C%0A_removeDistributedChildren%3A%20function%20(root%2C%20container)%20%7B%0Avar%20hostNeedsDist%3B%0Avar%20ip%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ip%24.length%3B%20i%2B%2B)%20%7B%0Avar%20content%20%3D%20ip%24%5Bi%5D%3B%0Aif%20(this._contains(container%2C%20content))%20%7B%0Avar%20dc%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20dc%24.length%3B%20j%2B%2B)%20%7B%0AhostNeedsDist%20%3D%20true%3B%0Avar%20node%20%3D%20dc%24%5Bj%5D%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Areturn%20hostNeedsDist%3B%0A%7D%2C%0A_contains%3A%20function%20(container%2C%20node)%20%7B%0Awhile%20(node)%20%7B%0Aif%20(node%20%3D%3D%20container)%20%7B%0Areturn%20true%3B%0A%7D%0Anode%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0A%7D%0A%7D%2C%0A_removeOwnerShadyRoot%3A%20function%20(node)%20%7B%0Aif%20(this._hasCachedOwnerRoot(node))%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node)%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20n%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._removeOwnerShadyRoot(n)%3B%0A%7D%0A%7D%0Anode._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%2C%0A_firstComposedNode%3A%20function%20(content)%20%7B%0Avar%20n%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20n%24.length%2C%20n%2C%20p%24%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ap%24%20%3D%20dom(n).getDestinationInsertionPoints()%3B%0Aif%20(p%24%5Bp%24.length%20-%201%5D%20%3D%3D%3D%20content)%20%7B%0Areturn%20n%3B%0A%7D%0A%7D%0A%7D%2C%0AquerySelector%3A%20function%20(selector)%20%7B%0Avar%20result%20%3D%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node%2C%20function%20(n)%20%7B%0Areturn%20Boolean(n)%3B%0A%7D)%5B0%5D%3B%0Areturn%20result%20%7C%7C%20null%3B%0A%7D%2C%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Areturn%20this.node._destinationInsertionPoints%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Areturn%20this.node._distributedNodes%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0A_clear%3A%20function%20()%20%7B%0Awhile%20(this.childNodes.length)%20%7B%0Athis.removeChild(this.childNodes%5B0%5D)%3B%0A%7D%0A%7D%2C%0AsetAttribute%3A%20function%20(name%2C%20value)%20%7B%0Athis.node.setAttribute(name%2C%20value)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0AremoveAttribute%3A%20function%20(name)%20%7B%0Athis.node.removeAttribute(name)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0A_maybeDistributeParent%3A%20function%20()%20%7B%0Aif%20(this._nodeNeedsDistribution(this.parentNode))%20%7B%0Athis._lazyDistribute(this.parentNode)%3B%0Areturn%20true%3B%0A%7D%0A%7D%2C%0AcloneNode%3A%20function%20(deep)%20%7B%0Avar%20n%20%3D%20nativeCloneNode.call(this.node%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(c%24%5Bi%5D).cloneNode(true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Avar%20n%20%3D%20nativeImportNode.call(doc%2C%20externalNode%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(externalNode)%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(doc).importNode(c%24%5Bi%5D%2C%20true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0A_getComposedInnerHTML%3A%20function%20()%20%7B%0Areturn%20getInnerHTML(this.node%2C%20true)%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20active%20%3D%20document.activeElement%3B%0Aif%20(!active)%20%7B%0Areturn%20null%3B%0A%7D%0Avar%20isShadyRoot%20%3D%20!!this.node._isShadyRoot%3B%0Aif%20(this.node%20!%3D%3D%20document)%20%7B%0Aif%20(!isShadyRoot)%20%7B%0Areturn%20null%3B%0A%7D%0Aif%20(this.node.host%20%3D%3D%3D%20active%20%7C%7C%20!this.node.host.contains(active))%20%7B%0Areturn%20null%3B%0A%7D%0A%7D%0Avar%20activeRoot%20%3D%20dom(active).getOwnerRoot()%3B%0Awhile%20(activeRoot%20%26%26%20activeRoot%20!%3D%3D%20this.node)%20%7B%0Aactive%20%3D%20activeRoot.host%3B%0AactiveRoot%20%3D%20dom(active).getOwnerRoot()%3B%0A%7D%0Aif%20(this.node%20%3D%3D%3D%20document)%20%7B%0Areturn%20activeRoot%20%3F%20null%20%3A%20active%3B%0A%7D%20else%20%7B%0Areturn%20activeRoot%20%3D%3D%3D%20this.node%20%3F%20active%20%3A%20null%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(this.node)%3B%0Areturn%20Array.isArray(c%24)%20%3F%20c%24%20%3A%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0Areturn%20Array.prototype.filter.call(this.childNodes%2C%20function%20(n)%20%7B%0Areturn%20n.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%3B%0A%7D)%3B%0A%7D%20else%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AparentNode%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getParentNode(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%20else%20%7B%0Avar%20tc%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20cn%20%3D%20this.childNodes%2C%20c%3B%20c%20%3D%20cn%5Bi%5D%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Atc.push(c.textContent)%3B%0A%7D%0A%7D%0Areturn%20tc.join('')%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis.node.textContent%20%3D%20text%3B%0A%7D%20else%20%7B%0Athis._clear()%3B%0Aif%20(text)%20%7B%0Athis.appendChild(document.createTextNode(text))%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20null%3B%0A%7D%20else%20%7B%0Areturn%20getInnerHTML(this.node)%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20!%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis._clear()%3B%0Avar%20d%20%3D%20document.createElement('div')%3B%0Ad.innerHTML%20%3D%20text%3B%0Avar%20c%24%20%3D%20TreeApi.arrayCopyChildNodes(d)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Athis.appendChild(c%24%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0ADomApi.hasInsertionPoint%20%3D%20function%20(root)%20%7B%0Areturn%20Boolean(root%20%26%26%20root._insertionPoints.length)%3B%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Aif%20(!Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20TreeApi.arrayCopy(this.node.querySelectorAll(selector))%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Avar%20n%20%3D%20this.node%3B%0Awhile%20(n)%20%7B%0Aif%20(n.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20n.host)%20%7B%0Areturn%20n%3B%0A%7D%0An%20%3D%20n.parentNode%3B%0A%7D%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Areturn%20doc.importNode(externalNode%2C%20deep)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDestinationInsertionPoints%20%26%26%20this.node.getDestinationInsertionPoints()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDistributedNodes%20%26%26%20this.node.getDistributedNodes()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20node%20%3D%20DomApi.wrap(this.node)%3B%0Avar%20activeElement%20%3D%20node.activeElement%3B%0Areturn%20node.contains(activeElement)%20%3F%20activeElement%20%3A%20null%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.textContent%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.innerHTML%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.innerHTML%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0Avar%20forwardMethods%20%3D%20function%20(m%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20m%24.length%3B%20i%2B%2B)%20%7B%0AforwardMethod(m%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardMethod%20%3D%20function%20(method)%20%7B%0ADomApi.prototype%5Bmethod%5D%20%3D%20function%20()%20%7B%0Areturn%20this.node%5Bmethod%5D.apply(this.node%2C%20arguments)%3B%0A%7D%3B%0A%7D%3B%0AforwardMethods(%5B%0A'cloneNode'%2C%0A'appendChild'%2C%0A'insertBefore'%2C%0A'removeChild'%2C%0A'replaceChild'%2C%0A'setAttribute'%2C%0A'removeAttribute'%2C%0A'querySelector'%0A%5D)%3B%0Avar%20forwardProperties%20%3D%20function%20(f%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20f%24.length%3B%20i%2B%2B)%20%7B%0AforwardProperty(f%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardProperty%20%3D%20function%20(name)%20%7B%0AObject.defineProperty(DomApi.prototype%2C%20name%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node%5Bname%5D%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0A%7D%3B%0AforwardProperties(%5B%0A'parentNode'%2C%0A'firstChild'%2C%0A'lastChild'%2C%0A'nextSibling'%2C%0A'previousSibling'%2C%0A'firstElementChild'%2C%0A'lastElementChild'%2C%0A'nextElementSibling'%2C%0A'previousElementSibling'%0A%5D)%3B%0A%7D())%3B%0APolymer.Base.extend(Polymer.dom%2C%20%7B%0A_flushGuard%3A%200%2C%0A_FLUSH_MAX%3A%20100%2C%0A_needsTakeRecords%3A%20!Polymer.Settings.useNativeCustomElements%2C%0A_debouncers%3A%20%5B%5D%2C%0A_staticFlushList%3A%20%5B%5D%2C%0A_finishDebouncer%3A%20null%2C%0Aflush%3A%20function%20()%20%7B%0Athis._flushGuard%20%3D%200%3B%0Athis._prepareFlush()%3B%0Awhile%20(this._debouncers.length%20%26%26%20this._flushGuard%20%3C%20this._FLUSH_MAX)%20%7B%0Awhile%20(this._debouncers.length)%20%7B%0Athis._debouncers.shift().complete()%3B%0A%7D%0Aif%20(this._finishDebouncer)%20%7B%0Athis._finishDebouncer.complete()%3B%0A%7D%0Athis._prepareFlush()%3B%0Athis._flushGuard%2B%2B%3B%0A%7D%0Aif%20(this._flushGuard%20%3E%3D%20this._FLUSH_MAX)%20%7B%0Aconsole.warn('Polymer.dom.flush%20aborted.%20Flush%20may%20not%20be%20complete.')%3B%0A%7D%0A%7D%2C%0A_prepareFlush%3A%20function%20()%20%7B%0Aif%20(this._needsTakeRecords)%20%7B%0ACustomElements.takeRecords()%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._staticFlushList.length%3B%20i%2B%2B)%20%7B%0Athis._staticFlushList%5Bi%5D()%3B%0A%7D%0A%7D%2C%0AaddStaticFlush%3A%20function%20(fn)%20%7B%0Athis._staticFlushList.push(fn)%3B%0A%7D%2C%0AremoveStaticFlush%3A%20function%20(fn)%20%7B%0Avar%20i%20%3D%20this._staticFlushList.indexOf(fn)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._staticFlushList.splice(i%2C%201)%3B%0A%7D%0A%7D%2C%0AaddDebouncer%3A%20function%20(debouncer)%20%7B%0Athis._debouncers.push(debouncer)%3B%0Athis._finishDebouncer%20%3D%20Polymer.Debounce(this._finishDebouncer%2C%20this._finishFlush)%3B%0A%7D%2C%0A_finishFlush%3A%20function%20()%20%7B%0APolymer.dom._debouncers%20%3D%20%5B%5D%3B%0A%7D%0A%7D)%3B%0APolymer.EventApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.Event%20%3D%20function%20(event)%20%7B%0Athis.event%20%3D%20event%3B%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.path%5B0%5D%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20path()%20%7B%0Areturn%20this.event.path%3B%0A%7D%0A%7D%3B%0A%7D%20else%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Avar%20current%20%3D%20this.event.currentTarget%3B%0Avar%20currentRoot%20%3D%20current%20%26%26%20Polymer.dom(current).getOwnerRoot()%3B%0Avar%20p%24%20%3D%20this.path%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20p%24.length%3B%20i%2B%2B)%20%7B%0Aif%20(Polymer.dom(p%24%5Bi%5D).getOwnerRoot()%20%3D%3D%3D%20currentRoot)%20%7B%0Areturn%20p%24%5Bi%5D%3B%0A%7D%0A%7D%0A%7D%2C%0Aget%20path()%20%7B%0Aif%20(!this.event._path)%20%7B%0Avar%20path%20%3D%20%5B%5D%3B%0Avar%20current%20%3D%20this.rootTarget%3B%0Awhile%20(current)%20%7B%0Apath.push(current)%3B%0Avar%20insertionPoints%20%3D%20Polymer.dom(current).getDestinationInsertionPoints()%3B%0Aif%20(insertionPoints.length)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20insertionPoints.length%20-%201%3B%20i%2B%2B)%20%7B%0Apath.push(insertionPoints%5Bi%5D)%3B%0A%7D%0Acurrent%20%3D%20insertionPoints%5BinsertionPoints.length%20-%201%5D%3B%0A%7D%20else%20%7B%0Acurrent%20%3D%20Polymer.dom(current).parentNode%20%7C%7C%20current.host%3B%0A%7D%0A%7D%0Apath.push(window)%3B%0Athis.event._path%20%3D%20path%3B%0A%7D%0Areturn%20this.event._path%3B%0A%7D%0A%7D%3B%0A%7D%0Avar%20factory%20%3D%20function%20(event)%20%7B%0Aif%20(!event.__eventApi)%20%7B%0Aevent.__eventApi%20%3D%20new%20DomApi.Event(event)%3B%0A%7D%0Areturn%20event.__eventApi%3B%0A%7D%3B%0Areturn%20%7B%20factory%3A%20factory%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20useShadow%20%3D%20Polymer.Settings.useShadow%3B%0AObject.defineProperty(DomApi.prototype%2C%20'classList'%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(!this._classList)%20%7B%0Athis._classList%20%3D%20new%20DomApi.ClassList(this)%3B%0A%7D%0Areturn%20this._classList%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0ADomApi.ClassList%20%3D%20function%20(host)%20%7B%0Athis.domApi%20%3D%20host%3B%0Athis.node%20%3D%20host.node%3B%0A%7D%3B%0ADomApi.ClassList.prototype%20%3D%20%7B%0Aadd%3A%20function%20()%20%7B%0Athis.node.classList.add.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Aremove%3A%20function%20()%20%7B%0Athis.node.classList.remove.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Atoggle%3A%20function%20()%20%7B%0Athis.node.classList.toggle.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0A_distributeParent%3A%20function%20()%20%7B%0Aif%20(!useShadow)%20%7B%0Athis.domApi._maybeDistributeParent()%3B%0A%7D%0A%7D%2C%0Acontains%3A%20function%20()%20%7B%0Areturn%20this.node.classList.contains.apply(this.node.classList%2C%20arguments)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.EffectiveNodesObserver%20%3D%20function%20(domApi)%20%7B%0Athis.domApi%20%3D%20domApi%3B%0Athis.node%20%3D%20this.domApi.node%3B%0Athis._listeners%20%3D%20%5B%5D%3B%0A%7D%3B%0ADomApi.EffectiveNodesObserver.prototype%20%3D%20%7B%0AaddListener%3A%20function%20(callback)%20%7B%0Aif%20(!this._isSetup)%20%7B%0Athis._setup()%3B%0Athis._isSetup%20%3D%20true%3B%0A%7D%0Avar%20listener%20%3D%20%7B%0Afn%3A%20callback%2C%0A_nodes%3A%20%5B%5D%0A%7D%3B%0Athis._listeners.push(listener)%3B%0Athis._scheduleNotify()%3B%0Areturn%20listener%3B%0A%7D%2C%0AremoveListener%3A%20function%20(handle)%20%7B%0Avar%20i%20%3D%20this._listeners.indexOf(handle)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._listeners.splice(i%2C%201)%3B%0Ahandle._nodes%20%3D%20%5B%5D%3B%0A%7D%0Aif%20(!this._hasListeners())%20%7B%0Athis._cleanup()%3B%0Athis._isSetup%20%3D%20false%3B%0A%7D%0A%7D%2C%0A_setup%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._unobserveContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_hasListeners%3A%20function%20()%20%7B%0Areturn%20Boolean(this._listeners.length)%3B%0A%7D%2C%0A_scheduleNotify%3A%20function%20()%20%7B%0Aif%20(this._debouncer)%20%7B%0Athis._debouncer.stop()%3B%0A%7D%0Athis._debouncer%20%3D%20Polymer.Debounce(this._debouncer%2C%20this._notify)%3B%0Athis._debouncer.context%20%3D%20this%3B%0APolymer.dom.addDebouncer(this._debouncer)%3B%0A%7D%2C%0Anotify%3A%20function%20()%20%7B%0Aif%20(this._hasListeners())%20%7B%0Athis._scheduleNotify()%3B%0A%7D%0A%7D%2C%0A_notify%3A%20function%20()%20%7B%0Athis._beforeCallListeners()%3B%0Athis._callListeners()%3B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0Athis._updateContentElements()%3B%0A%7D%2C%0A_updateContentElements%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_observeContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0An.__observeNodesMap%20%3D%20n.__observeNodesMap%20%7C%7C%20new%20WeakMap()%3B%0Aif%20(!n.__observeNodesMap.has(this))%20%7B%0An.__observeNodesMap.set(this%2C%20this._observeContent(n))%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_observeContent%3A%20function%20(content)%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20h%20%3D%20Polymer.dom(content).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Ah._avoidChangeCalculation%20%3D%20true%3B%0Areturn%20h%3B%0A%7D%2C%0A_unobserveContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20h%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0Ah%20%3D%20n.__observeNodesMap.get(this)%3B%0Aif%20(h)%20%7B%0APolymer.dom(n).unobserveNodes(h)%3B%0An.__observeNodesMap.delete(this)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_isContent%3A%20function%20(node)%20%7B%0Areturn%20node.localName%20%3D%3D%3D%20'content'%3B%0A%7D%2C%0A_callListeners%3A%20function%20()%20%7B%0Avar%20o%24%20%3D%20this._listeners%3B%0Avar%20nodes%20%3D%20this._getEffectiveNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20o%24.length%20%26%26%20(o%20%3D%20o%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20info%20%3D%20this._generateListenerInfo(o%2C%20nodes)%3B%0Aif%20(info%20%7C%7C%20o._alwaysNotify)%20%7B%0Athis._callListener(o%2C%20info)%3B%0A%7D%0A%7D%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getEffectiveChildNodes()%3B%0A%7D%2C%0A_generateListenerInfo%3A%20function%20(listener%2C%20newNodes)%20%7B%0Aif%20(listener._avoidChangeCalculation)%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20oldNodes%20%3D%20listener._nodes%3B%0Avar%20info%20%3D%20%7B%0Atarget%3A%20this.node%2C%0AaddedNodes%3A%20%5B%5D%2C%0AremovedNodes%3A%20%5B%5D%0A%7D%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(newNodes%2C%20oldNodes)%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Ainfo.removedNodes.push(n)%3B%0A%7D%0A%7D%0Afor%20(i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%20s.index%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0Ainfo.addedNodes.push(newNodes%5Bj%5D)%3B%0A%7D%0A%7D%0Alistener._nodes%20%3D%20newNodes%3B%0Aif%20(info.addedNodes.length%20%7C%7C%20info.removedNodes.length)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%2C%0A_callListener%3A%20function%20(listener%2C%20info)%20%7B%0Areturn%20listener.fn.call(this.node%2C%20info)%3B%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0A%7D%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0Avar%20baseSetup%20%3D%20DomApi.EffectiveNodesObserver.prototype._setup%3B%0Avar%20baseCleanup%20%3D%20DomApi.EffectiveNodesObserver.prototype._cleanup%3B%0APolymer.Base.extend(DomApi.EffectiveNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._mutationHandler%20%3D%20function%20(mxns)%20%7B%0Aif%20(mxns%20%26%26%20mxns.length)%20%7B%0Aself._scheduleNotify()%3B%0A%7D%0A%7D%3B%0Athis._observer%20%3D%20new%20MutationObserver(this._mutationHandler)%3B%0Athis._boundFlush%20%3D%20function%20()%20%7B%0Aself._flush()%3B%0A%7D%3B%0APolymer.dom.addStaticFlush(this._boundFlush)%3B%0Athis._observer.observe(this.node%2C%20%7B%20childList%3A%20true%20%7D)%3B%0A%7D%0AbaseSetup.call(this)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._observer.disconnect()%3B%0Athis._observer%20%3D%20null%3B%0Athis._mutationHandler%20%3D%20null%3B%0APolymer.dom.removeStaticFlush(this._boundFlush)%3B%0AbaseCleanup.call(this)%3B%0A%7D%2C%0A_flush%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._mutationHandler(this._observer.takeRecords())%3B%0A%7D%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._makeContentListenersAlwaysNotify()%3B%0Athis._observer.disconnect()%3B%0Athis._observer.observe(this.node%2C%20%7B%0AchildList%3A%20true%2C%0Aattributes%3A%20true%2C%0Asubtree%3A%20true%0A%7D)%3B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host%20%26%26%20Polymer.dom(host).observer)%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%2C%0A_makeContentListenersAlwaysNotify%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20this._listeners.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20this._listeners%5Bi%5D%3B%0Ah._alwaysNotify%20%3D%20h._isContentListener%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.DistributedNodesObserver%20%3D%20function%20(domApi)%20%7B%0ADomApi.EffectiveNodesObserver.call(this%2C%20domApi)%3B%0A%7D%3B%0ADomApi.DistributedNodesObserver.prototype%20%3D%20Object.create(DomApi.EffectiveNodesObserver.prototype)%3B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getDistributedNodes()%3B%0A%7D%0A%7D)%3B%0Aif%20(Settings.useShadow)%20%7B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._observer%20%3D%20Polymer.dom(host).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Athis._observer._isContentListener%20%3D%20true%3B%0Aif%20(this._hasAttrSelect())%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_hasAttrSelect%3A%20function%20()%20%7B%0Avar%20select%20%3D%20this.node.getAttribute('select')%3B%0Areturn%20select%20%26%26%20select.match(%2F%5B%5B.%5D%2B%2F)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0APolymer.dom(host).unobserveNodes(this._observer)%3B%0A%7D%0Athis._observer%20%3D%20null%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0APolymer.Base._addFeature(%7B%0A_prepShady%3A%20function%20()%20%7B%0Athis._useContent%20%3D%20this._useContent%20%7C%7C%20Boolean(this._template)%3B%0A%7D%2C%0A_setupShady%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20null%3B%0Aif%20(!this.__domApi)%20%7B%0Athis.__domApi%20%3D%20null%3B%0A%7D%0Aif%20(!this.__dom)%20%7B%0Athis.__dom%20%3D%20null%3B%0A%7D%0Aif%20(!this._ownerShadyRoot)%20%7B%0Athis._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%0A%7D%2C%0A_poolContent%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0ATreeApi.Logical.saveChildNodes(this)%3B%0A%7D%0A%7D%2C%0A_setupRoot%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis._createLocalRoot()%3B%0Aif%20(!this.dataHost)%20%7B%0AupgradeLogicalChildren(TreeApi.Logical.getChildNodes(this))%3B%0A%7D%0A%7D%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20this.root%3B%0Athis.shadyRoot._distributionClean%20%3D%20false%3B%0Athis.shadyRoot._hasDistributed%20%3D%20false%3B%0Athis.shadyRoot._isShadyRoot%20%3D%20true%3B%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0Avar%20i%24%20%3D%20this.shadyRoot._insertionPoints%20%3D%20!this._notes%20%7C%7C%20this._notes._hasContent%20%3F%20this.shadyRoot.querySelectorAll('content')%20%3A%20%5B%5D%3B%0ATreeApi.Logical.saveChildNodes(this.shadyRoot)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(c.parentNode)%3B%0A%7D%0Athis.shadyRoot.host%20%3D%20this%3B%0A%7D%2C%0Aget%20domHost()%20%7B%0Avar%20root%20%3D%20Polymer.dom(this).getOwnerRoot()%3B%0Areturn%20root%20%26%26%20root.host%3B%0A%7D%2C%0AdistributeContent%3A%20function%20(updateInsertionPoints)%20%7B%0Aif%20(this.shadyRoot)%20%7B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20this.shadyRoot._invalidInsertionPoints%20%7C%7C%20updateInsertionPoints%3B%0Avar%20host%20%3D%20getTopDistributingHost(this)%3B%0APolymer.dom(this)._lazyDistribute(host)%3B%0A%7D%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20!this.shadyRoot._distributionClean)%20%7B%0Aif%20(this.shadyRoot._invalidInsertionPoints)%20%7B%0APolymer.dom(this)._updateInsertionPoints(this)%3B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20false%3B%0A%7D%0Athis._beginDistribute()%3B%0Athis._distributeDirtyRoots()%3B%0Athis._finishDistribute()%3B%0A%7D%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._resetDistribution()%3B%0Athis._distributePool(this.shadyRoot%2C%20this._collectPool())%3B%0A%7D%0A%7D%2C%0A_distributeDirtyRoots%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.shadyRoot._dirtyRoots%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._distributeContent()%3B%0A%7D%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis.shadyRoot._distributionClean%20%3D%20true%3B%0Aif%20(DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._composeTree()%3B%0AnotifyContentObservers(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0ATreeApi.Composed.clearChildNodes(this)%3B%0Athis.appendChild(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Avar%20children%20%3D%20this._composeNode(this)%3B%0Athis._updateChildNodes(this%2C%20children)%3B%0A%7D%0A%7D%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0AnotifyInitialDistribution(this)%3B%0A%7D%0Athis.shadyRoot._hasDistributed%20%3D%20true%3B%0A%7D%0A%7D%2C%0AelementMatches%3A%20function%20(selector%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Areturn%20DomApi.matchesSelector.call(node%2C%20selector)%3B%0A%7D%2C%0A_resetDistribution%3A%20function%20()%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(child._destinationInsertionPoints)%20%7B%0Achild._destinationInsertionPoints%20%3D%20undefined%3B%0A%7D%0Aif%20(isInsertionPoint(child))%20%7B%0AclearDistributedDestinationInsertionPoints(child)%3B%0A%7D%0A%7D%0Avar%20root%20%3D%20this.shadyRoot%3B%0Avar%20p%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20p%24.length%3B%20j%2B%2B)%20%7B%0Ap%24%5Bj%5D._distributedNodes%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_collectPool%3A%20function%20()%20%7B%0Avar%20pool%20%3D%20%5B%5D%3B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Apool.push.apply(pool%2C%20child._distributedNodes)%3B%0A%7D%20else%20%7B%0Apool.push(child)%3B%0A%7D%0A%7D%0Areturn%20pool%3B%0A%7D%2C%0A_distributePool%3A%20function%20(node%2C%20pool)%20%7B%0Avar%20p%24%20%3D%20node._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._distributeInsertionPoint(p%2C%20pool)%3B%0AmaybeRedistributeParent(p%2C%20this)%3B%0A%7D%0A%7D%2C%0A_distributeInsertionPoint%3A%20function%20(content%2C%20pool)%20%7B%0Avar%20anyDistributed%20%3D%20false%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20pool.length%2C%20node%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Anode%20%3D%20pool%5Bi%5D%3B%0Aif%20(!node)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(this._matchesContentSelect(node%2C%20content))%20%7B%0AdistributeNodeInto(node%2C%20content)%3B%0Apool%5Bi%5D%20%3D%20undefined%3B%0AanyDistributed%20%3D%20true%3B%0A%7D%0A%7D%0Aif%20(!anyDistributed)%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(content)%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20children.length%3B%20j%2B%2B)%20%7B%0AdistributeNodeInto(children%5Bj%5D%2C%20content)%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeTree%3A%20function%20()%20%7B%0Athis._updateChildNodes(this%2C%20this._composeNode(this))%3B%0Avar%20p%24%20%3D%20this.shadyRoot._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%2C%20parent%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparent%20%3D%20TreeApi.Logical.getParentNode(p)%3B%0Aif%20(!parent._useContent%20%26%26%20parent%20!%3D%3D%20this%20%26%26%20parent%20!%3D%3D%20this.shadyRoot)%20%7B%0Athis._updateChildNodes(parent%2C%20this._composeNode(parent))%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeNode%3A%20function%20(node)%20%7B%0Avar%20children%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node.shadyRoot%20%7C%7C%20node)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20c%24%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Avar%20distributedNodes%20%3D%20child._distributedNodes%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20distributedNodes.length%3B%20j%2B%2B)%20%7B%0Avar%20distributedNode%20%3D%20distributedNodes%5Bj%5D%3B%0Aif%20(isFinalDestination(child%2C%20distributedNode))%20%7B%0Achildren.push(distributedNode)%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Achildren.push(child)%3B%0A%7D%0A%7D%0Areturn%20children%3B%0A%7D%2C%0A_updateChildNodes%3A%20function%20(container%2C%20children)%20%7B%0Avar%20composed%20%3D%20TreeApi.Composed.getChildNodes(container)%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(children%2C%20composed)%3B%0Afor%20(var%20i%20%3D%200%2C%20d%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Aif%20(TreeApi.Composed.getParentNode(n)%20%3D%3D%3D%20container)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20n)%3B%0A%7D%0Acomposed.splice(s.index%20%2B%20d%2C%201)%3B%0A%7D%0Ad%20-%3D%20s.addedCount%3B%0A%7D%0Afor%20(var%20i%20%3D%200%2C%20s%2C%20next%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anext%20%3D%20composed%5Bs.index%5D%3B%0Afor%20(j%20%3D%20s.index%2C%20n%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0An%20%3D%20children%5Bj%5D%3B%0ATreeApi.Composed.insertBefore(container%2C%20n%2C%20next)%3B%0Acomposed.splice(j%2C%200%2C%20n)%3B%0A%7D%0A%7D%0A%7D%2C%0A_matchesContentSelect%3A%20function%20(node%2C%20contentElement)%20%7B%0Avar%20select%20%3D%20contentElement.getAttribute('select')%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aselect%20%3D%20select.trim()%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aif%20(!(node%20instanceof%20Element))%20%7B%0Areturn%20false%3B%0A%7D%0Avar%20validSelectors%20%3D%20%2F%5E(%3Anot%5C()%3F%5B*.%23%5Ba-zA-Z_%7C%5D%2F%3B%0Aif%20(!validSelectors.test(select))%20%7B%0Areturn%20false%3B%0A%7D%0Areturn%20this.elementMatches(select%2C%20node)%3B%0A%7D%2C%0A_elementAdd%3A%20function%20()%20%7B%0A%7D%2C%0A_elementRemove%3A%20function%20()%20%7B%0A%7D%0A%7D)%3B%0Afunction%20distributeNodeInto(child%2C%20insertionPoint)%20%7B%0AinsertionPoint._distributedNodes.push(child)%3B%0Avar%20points%20%3D%20child._destinationInsertionPoints%3B%0Aif%20(!points)%20%7B%0Achild._destinationInsertionPoints%20%3D%20%5BinsertionPoint%5D%3B%0A%7D%20else%20%7B%0Apoints.push(insertionPoint)%3B%0A%7D%0A%7D%0Afunction%20clearDistributedDestinationInsertionPoints(content)%20%7B%0Avar%20e%24%20%3D%20content._distributedNodes%3B%0Aif%20(e%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20e%24.length%3B%20i%2B%2B)%20%7B%0Avar%20d%20%3D%20e%24%5Bi%5D._destinationInsertionPoints%3B%0Aif%20(d)%20%7B%0Ad.splice(d.indexOf(content)%20%2B%201%2C%20d.length)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Afunction%20maybeRedistributeParent(content%2C%20host)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(content)%3B%0Aif%20(parent%20%26%26%20parent.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(parent.shadyRoot)%20%26%26%20parent.shadyRoot._distributionClean)%20%7B%0Aparent.shadyRoot._distributionClean%20%3D%20false%3B%0Ahost.shadyRoot._dirtyRoots.push(parent)%3B%0A%7D%0A%7D%0Afunction%20isFinalDestination(insertionPoint%2C%20node)%20%7B%0Avar%20points%20%3D%20node._destinationInsertionPoints%3B%0Areturn%20points%20%26%26%20points%5Bpoints.length%20-%201%5D%20%3D%3D%3D%20insertionPoint%3B%0A%7D%0Afunction%20isInsertionPoint(node)%20%7B%0Areturn%20node.localName%20%3D%3D%20'content'%3B%0A%7D%0Afunction%20getTopDistributingHost(host)%20%7B%0Awhile%20(host%20%26%26%20hostNeedsRedistribution(host))%20%7B%0Ahost%20%3D%20host.domHost%3B%0A%7D%0Areturn%20host%3B%0A%7D%0Afunction%20hostNeedsRedistribution(host)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(host)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20c%24%5Bi%5D%3B%0Aif%20(c.localName%20%26%26%20c.localName%20%3D%3D%3D%20'content')%20%7B%0Areturn%20host.domHost%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyContentObservers(root)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20root._insertionPoints.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20root._insertionPoints%5Bi%5D%3B%0Aif%20(DomApi.hasApi(c))%20%7B%0APolymer.dom(c).notifyObserver()%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyInitialDistribution(host)%20%7B%0Aif%20(DomApi.hasApi(host))%20%7B%0APolymer.dom(host).notifyObserver()%3B%0A%7D%0A%7D%0Avar%20needsUpgrade%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Afunction%20upgradeLogicalChildren(children)%20%7B%0Aif%20(needsUpgrade%20%26%26%20children)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0ACustomElements.upgrade(children%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0Aif%20(Polymer.Settings.useShadow)%20%7B%0APolymer.Base._addFeature(%7B%0A_poolContent%3A%20function%20()%20%7B%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0A%7D%2C%0AdistributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.createShadowRoot()%3B%0Athis.shadowRoot.appendChild(this.root)%3B%0Athis.root%20%3D%20this.shadowRoot%3B%0A%7D%0A%7D)%3B%0A%7D%0APolymer.Async%20%3D%20%7B%0A_currVal%3A%200%2C%0A_lastVal%3A%200%2C%0A_callbacks%3A%20%5B%5D%2C%0A_twiddleContent%3A%200%2C%0A_twiddle%3A%20document.createTextNode('')%2C%0Arun%3A%20function%20(callback%2C%20waitTime)%20%7B%0Aif%20(waitTime%20%3E%200)%20%7B%0Areturn%20~setTimeout(callback%2C%20waitTime)%3B%0A%7D%20else%20%7B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athis._callbacks.push(callback)%3B%0Areturn%20this._currVal%2B%2B%3B%0A%7D%0A%7D%2C%0Acancel%3A%20function%20(handle)%20%7B%0Aif%20(handle%20%3C%200)%20%7B%0AclearTimeout(~handle)%3B%0A%7D%20else%20%7B%0Avar%20idx%20%3D%20handle%20-%20this._lastVal%3B%0Aif%20(idx%20%3E%3D%200)%20%7B%0Aif%20(!this._callbacks%5Bidx%5D)%20%7B%0Athrow%20'invalid%20async%20handle%3A%20'%20%2B%20handle%3B%0A%7D%0Athis._callbacks%5Bidx%5D%20%3D%20null%3B%0A%7D%0A%7D%0A%7D%2C%0A_atEndOfMicrotask%3A%20function%20()%20%7B%0Avar%20len%20%3D%20this._callbacks.length%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20len%3B%20i%2B%2B)%20%7B%0Avar%20cb%20%3D%20this._callbacks%5Bi%5D%3B%0Aif%20(cb)%20%7B%0Atry%20%7B%0Acb()%3B%0A%7D%20catch%20(e)%20%7B%0Ai%2B%2B%3B%0Athis._callbacks.splice(0%2C%20i)%3B%0Athis._lastVal%20%2B%3D%20i%3B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athrow%20e%3B%0A%7D%0A%7D%0A%7D%0Athis._callbacks.splice(0%2C%20len)%3B%0Athis._lastVal%20%2B%3D%20len%3B%0A%7D%0A%7D%3B%0Anew%20window.MutationObserver(function%20()%20%7B%0APolymer.Async._atEndOfMicrotask()%3B%0A%7D).observe(Polymer.Async._twiddle%2C%20%7B%20characterData%3A%20true%20%7D)%3B%0APolymer.Debounce%20%3D%20function%20()%20%7B%0Avar%20Async%20%3D%20Polymer.Async%3B%0Avar%20Debouncer%20%3D%20function%20(context)%20%7B%0Athis.context%20%3D%20context%3B%0Avar%20self%20%3D%20this%3B%0Athis.boundComplete%20%3D%20function%20()%20%7B%0Aself.complete()%3B%0A%7D%3B%0A%7D%3B%0ADebouncer.prototype%20%3D%20%7B%0Ago%3A%20function%20(callback%2C%20wait)%20%7B%0Avar%20h%3B%0Athis.finish%20%3D%20function%20()%20%7B%0AAsync.cancel(h)%3B%0A%7D%3B%0Ah%20%3D%20Async.run(this.boundComplete%2C%20wait)%3B%0Athis.callback%20%3D%20callback%3B%0A%7D%2C%0Astop%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.finish()%3B%0Athis.finish%20%3D%20null%3B%0A%7D%0A%7D%2C%0Acomplete%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.stop()%3B%0Athis.callback.call(this.context)%3B%0A%7D%0A%7D%0A%7D%3B%0Afunction%20debounce(debouncer%2C%20callback%2C%20wait)%20%7B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%20else%20%7B%0Adebouncer%20%3D%20new%20Debouncer(this)%3B%0A%7D%0Adebouncer.go(callback%2C%20wait)%3B%0Areturn%20debouncer%3B%0A%7D%0Areturn%20debounce%3B%0A%7D()%3B%0APolymer.Base._addFeature(%7B%0A_setupDebouncers%3A%20function%20()%20%7B%0Athis._debouncers%20%3D%20%7B%7D%3B%0A%7D%2C%0Adebounce%3A%20function%20(jobName%2C%20callback%2C%20wait)%20%7B%0Areturn%20this._debouncers%5BjobName%5D%20%3D%20Polymer.Debounce.call(this%2C%20this._debouncers%5BjobName%5D%2C%20callback%2C%20wait)%3B%0A%7D%2C%0AisDebouncerActive%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Areturn%20!!(debouncer%20%26%26%20debouncer.finish)%3B%0A%7D%2C%0AflushDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.complete()%3B%0A%7D%0A%7D%2C%0AcancelDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.DomModule%20%3D%20document.createElement('dom-module')%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepTemplate()%3B%0Athis._prepShady()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._registerHost()%3B%0Aif%20(this._template)%20%7B%0Athis._poolContent()%3B%0Athis._beginHosting()%3B%0Athis._stampTemplate()%3B%0Athis._endHosting()%3B%0A%7D%0Athis._marshalHostAttributes()%3B%0Athis._setupDebouncers()%3B%0Athis._marshalBehaviors()%3B%0Athis._tryReady()%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-mini.html.js%0A:1981 in upgradeLogicalChildren data:text/javascript;charset=utf-8,Polymer.Base._addFeature(%7B%0A_prepTemplate%3A%20function%20()%20%7B%0Aif%20(this._template%20%3D%3D%3D%20undefined)%20%7B%0Athis._template%20%3D%20Polymer.DomModule.import(this.is%2C%20'template')%3B%0A%7D%0Aif%20(this._template%20%26%26%20this._template.hasAttribute('is'))%20%7B%0Athis._warn(this._logf('_prepTemplate'%2C%20'top-level%20Polymer%20template%20'%20%2B%20'must%20not%20be%20a%20type-extension%2C%20found'%2C%20this._template%2C%20'Move%20inside%20simple%20%3Ctemplate%3E.'))%3B%0A%7D%0Aif%20(this._template%20%26%26%20!this._template.content%20%26%26%20window.HTMLTemplateElement%20%26%26%20HTMLTemplateElement.decorate)%20%7B%0AHTMLTemplateElement.decorate(this._template)%3B%0A%7D%0A%7D%2C%0A_stampTemplate%3A%20function%20()%20%7B%0Aif%20(this._template)%20%7B%0Athis.root%20%3D%20this.instanceTemplate(this._template)%3B%0A%7D%0A%7D%2C%0AinstanceTemplate%3A%20function%20(template)%20%7B%0Avar%20dom%20%3D%20document.importNode(template._content%20%7C%7C%20template.content%2C%20true)%3B%0Areturn%20dom%3B%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0Avar%20baseAttachedCallback%20%3D%20Polymer.Base.attachedCallback%3B%0APolymer.Base._addFeature(%7B%0A_hostStack%3A%20%5B%5D%2C%0Aready%3A%20function%20()%20%7B%0A%7D%2C%0A_registerHost%3A%20function%20(host)%20%7B%0Athis.dataHost%20%3D%20host%20%3D%20host%20%7C%7C%20Polymer.Base._hostStack%5BPolymer.Base._hostStack.length%20-%201%5D%3B%0Aif%20(host%20%26%26%20host._clients)%20%7B%0Ahost._clients.push(this)%3B%0A%7D%0Athis._clients%20%3D%20null%3B%0Athis._clientsReadied%20%3D%20false%3B%0A%7D%2C%0A_beginHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.push(this)%3B%0Aif%20(!this._clients)%20%7B%0Athis._clients%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_endHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.pop()%3B%0A%7D%2C%0A_tryReady%3A%20function%20()%20%7B%0Athis._readied%20%3D%20false%3B%0Aif%20(this._canReady())%20%7B%0Athis._ready()%3B%0A%7D%0A%7D%2C%0A_canReady%3A%20function%20()%20%7B%0Areturn%20!this.dataHost%20%7C%7C%20this.dataHost._clientsReadied%3B%0A%7D%2C%0A_ready%3A%20function%20()%20%7B%0Athis._beforeClientsReady()%3B%0Aif%20(this._template)%20%7B%0Athis._setupRoot()%3B%0Athis._readyClients()%3B%0A%7D%0Athis._clientsReadied%20%3D%20true%3B%0Athis._clients%20%3D%20null%3B%0Athis._afterClientsReady()%3B%0Athis._readySelf()%3B%0A%7D%2C%0A_readyClients%3A%20function%20()%20%7B%0Athis._beginDistribute()%3B%0Avar%20c%24%20%3D%20this._clients%3B%0Aif%20(c%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._ready()%3B%0A%7D%0A%7D%0Athis._finishDistribute()%3B%0A%7D%2C%0A_readySelf%3A%20function%20()%20%7B%0Athis._doBehavior('ready')%3B%0Athis._readied%20%3D%20true%3B%0Aif%20(this._attachedPending)%20%7B%0Athis._attachedPending%20%3D%20false%3B%0Athis.attachedCallback()%3B%0A%7D%0A%7D%2C%0A_beforeClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_afterClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeAttached%3A%20function%20()%20%7B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Aif%20(this._readied)%20%7B%0Athis._beforeAttached()%3B%0AbaseAttachedCallback.call(this)%3B%0A%7D%20else%20%7B%0Athis._attachedPending%20%3D%20true%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.ArraySplice%20%3D%20function%20()%20%7B%0Afunction%20newSplice(index%2C%20removed%2C%20addedCount)%20%7B%0Areturn%20%7B%0Aindex%3A%20index%2C%0Aremoved%3A%20removed%2C%0AaddedCount%3A%20addedCount%0A%7D%3B%0A%7D%0Avar%20EDIT_LEAVE%20%3D%200%3B%0Avar%20EDIT_UPDATE%20%3D%201%3B%0Avar%20EDIT_ADD%20%3D%202%3B%0Avar%20EDIT_DELETE%20%3D%203%3B%0Afunction%20ArraySplice()%20%7B%0A%7D%0AArraySplice.prototype%20%3D%20%7B%0AcalcEditDistances%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20rowCount%20%3D%20oldEnd%20-%20oldStart%20%2B%201%3B%0Avar%20columnCount%20%3D%20currentEnd%20-%20currentStart%20%2B%201%3B%0Avar%20distances%20%3D%20new%20Array(rowCount)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Adistances%5Bi%5D%20%3D%20new%20Array(columnCount)%3B%0Adistances%5Bi%5D%5B0%5D%20%3D%20i%3B%0A%7D%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%0Adistances%5B0%5D%5Bj%5D%20%3D%20j%3B%0Afor%20(i%20%3D%201%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%201%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%20%7B%0Aif%20(this.equals(current%5BcurrentStart%20%2B%20j%20-%201%5D%2C%20old%5BoldStart%20%2B%20i%20-%201%5D))%0Adistances%5Bi%5D%5Bj%5D%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Aelse%20%7B%0Avar%20north%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%20%2B%201%3B%0Avar%20west%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%20%2B%201%3B%0Adistances%5Bi%5D%5Bj%5D%20%3D%20north%20%3C%20west%20%3F%20north%20%3A%20west%3B%0A%7D%0A%7D%0A%7D%0Areturn%20distances%3B%0A%7D%2C%0AspliceOperationsFromEditDistances%3A%20function%20(distances)%20%7B%0Avar%20i%20%3D%20distances.length%20-%201%3B%0Avar%20j%20%3D%20distances%5B0%5D.length%20-%201%3B%0Avar%20current%20%3D%20distances%5Bi%5D%5Bj%5D%3B%0Avar%20edits%20%3D%20%5B%5D%3B%0Awhile%20(i%20%3E%200%20%7C%7C%20j%20%3E%200)%20%7B%0Aif%20(i%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acontinue%3B%0A%7D%0Aif%20(j%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acontinue%3B%0A%7D%0Avar%20northWest%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Avar%20west%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%3B%0Avar%20north%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%3B%0Avar%20min%3B%0Aif%20(west%20%3C%20north)%0Amin%20%3D%20west%20%3C%20northWest%20%3F%20west%20%3A%20northWest%3B%0Aelse%0Amin%20%3D%20north%20%3C%20northWest%20%3F%20north%20%3A%20northWest%3B%0Aif%20(min%20%3D%3D%20northWest)%20%7B%0Aif%20(northWest%20%3D%3D%20current)%20%7B%0Aedits.push(EDIT_LEAVE)%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_UPDATE)%3B%0Acurrent%20%3D%20northWest%3B%0A%7D%0Ai--%3B%0Aj--%3B%0A%7D%20else%20if%20(min%20%3D%3D%20west)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acurrent%20%3D%20west%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acurrent%20%3D%20north%3B%0A%7D%0A%7D%0Aedits.reverse()%3B%0Areturn%20edits%3B%0A%7D%2C%0AcalcSplices%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20prefixCount%20%3D%200%3B%0Avar%20suffixCount%20%3D%200%3B%0Avar%20minLength%20%3D%20Math.min(currentEnd%20-%20currentStart%2C%20oldEnd%20-%20oldStart)%3B%0Aif%20(currentStart%20%3D%3D%200%20%26%26%20oldStart%20%3D%3D%200)%0AprefixCount%20%3D%20this.sharedPrefix(current%2C%20old%2C%20minLength)%3B%0Aif%20(currentEnd%20%3D%3D%20current.length%20%26%26%20oldEnd%20%3D%3D%20old.length)%0AsuffixCount%20%3D%20this.sharedSuffix(current%2C%20old%2C%20minLength%20-%20prefixCount)%3B%0AcurrentStart%20%2B%3D%20prefixCount%3B%0AoldStart%20%2B%3D%20prefixCount%3B%0AcurrentEnd%20-%3D%20suffixCount%3B%0AoldEnd%20-%3D%20suffixCount%3B%0Aif%20(currentEnd%20-%20currentStart%20%3D%3D%200%20%26%26%20oldEnd%20-%20oldStart%20%3D%3D%200)%0Areturn%20%5B%5D%3B%0Aif%20(currentStart%20%3D%3D%20currentEnd)%20%7B%0Avar%20splice%20%3D%20newSplice(currentStart%2C%20%5B%5D%2C%200)%3B%0Awhile%20(oldStart%20%3C%20oldEnd)%0Asplice.removed.push(old%5BoldStart%2B%2B%5D)%3B%0Areturn%20%5Bsplice%5D%3B%0A%7D%20else%20if%20(oldStart%20%3D%3D%20oldEnd)%0Areturn%20%5BnewSplice(currentStart%2C%20%5B%5D%2C%20currentEnd%20-%20currentStart)%5D%3B%0Avar%20ops%20%3D%20this.spliceOperationsFromEditDistances(this.calcEditDistances(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd))%3B%0Asplice%20%3D%20undefined%3B%0Avar%20splices%20%3D%20%5B%5D%3B%0Avar%20index%20%3D%20currentStart%3B%0Avar%20oldIndex%20%3D%20oldStart%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ops.length%3B%20i%2B%2B)%20%7B%0Aswitch%20(ops%5Bi%5D)%20%7B%0Acase%20EDIT_LEAVE%3A%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0Asplice%20%3D%20undefined%3B%0A%7D%0Aindex%2B%2B%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_UPDATE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_ADD%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_DELETE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0A%7D%0A%7D%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0A%7D%0Areturn%20splices%3B%0A%7D%2C%0AsharedPrefix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20searchLength%3B%20i%2B%2B)%0Aif%20(!this.equals(current%5Bi%5D%2C%20old%5Bi%5D))%0Areturn%20i%3B%0Areturn%20searchLength%3B%0A%7D%2C%0AsharedSuffix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Avar%20index1%20%3D%20current.length%3B%0Avar%20index2%20%3D%20old.length%3B%0Avar%20count%20%3D%200%3B%0Awhile%20(count%20%3C%20searchLength%20%26%26%20this.equals(current%5B--index1%5D%2C%20old%5B--index2%5D))%0Acount%2B%2B%3B%0Areturn%20count%3B%0A%7D%2C%0AcalculateSplices%3A%20function%20(current%2C%20previous)%20%7B%0Areturn%20this.calcSplices(current%2C%200%2C%20current.length%2C%20previous%2C%200%2C%20previous.length)%3B%0A%7D%2C%0Aequals%3A%20function%20(currentValue%2C%20previousValue)%20%7B%0Areturn%20currentValue%20%3D%3D%3D%20previousValue%3B%0A%7D%0A%7D%3B%0Areturn%20new%20ArraySplice()%3B%0A%7D()%3B%0APolymer.domInnerHTML%20%3D%20function%20()%20%7B%0Avar%20escapeAttrRegExp%20%3D%20%2F%5B%26%5Cu00A0%22%5D%2Fg%3B%0Avar%20escapeDataRegExp%20%3D%20%2F%5B%26%5Cu00A0%3C%3E%5D%2Fg%3B%0Afunction%20escapeReplace(c)%20%7B%0Aswitch%20(c)%20%7B%0Acase%20'%26'%3A%0Areturn%20'%26amp%3B'%3B%0Acase%20'%3C'%3A%0Areturn%20'%26lt%3B'%3B%0Acase%20'%3E'%3A%0Areturn%20'%26gt%3B'%3B%0Acase%20'%22'%3A%0Areturn%20'%26quot%3B'%3B%0Acase%20'%5CxA0'%3A%0Areturn%20'%26nbsp%3B'%3B%0A%7D%0A%7D%0Afunction%20escapeAttr(s)%20%7B%0Areturn%20s.replace(escapeAttrRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20escapeData(s)%20%7B%0Areturn%20s.replace(escapeDataRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20makeSet(arr)%20%7B%0Avar%20set%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20arr.length%3B%20i%2B%2B)%20%7B%0Aset%5Barr%5Bi%5D%5D%20%3D%20true%3B%0A%7D%0Areturn%20set%3B%0A%7D%0Avar%20voidElements%20%3D%20makeSet(%5B%0A'area'%2C%0A'base'%2C%0A'br'%2C%0A'col'%2C%0A'command'%2C%0A'embed'%2C%0A'hr'%2C%0A'img'%2C%0A'input'%2C%0A'keygen'%2C%0A'link'%2C%0A'meta'%2C%0A'param'%2C%0A'source'%2C%0A'track'%2C%0A'wbr'%0A%5D)%3B%0Avar%20plaintextParents%20%3D%20makeSet(%5B%0A'style'%2C%0A'script'%2C%0A'xmp'%2C%0A'iframe'%2C%0A'noembed'%2C%0A'noframes'%2C%0A'plaintext'%2C%0A'noscript'%0A%5D)%3B%0Afunction%20getOuterHTML(node%2C%20parentNode%2C%20composed)%20%7B%0Aswitch%20(node.nodeType)%20%7B%0Acase%20Node.ELEMENT_NODE%3A%0Avar%20tagName%20%3D%20node.localName%3B%0Avar%20s%20%3D%20'%3C'%20%2B%20tagName%3B%0Avar%20attrs%20%3D%20node.attributes%3B%0Afor%20(var%20i%20%3D%200%2C%20attr%3B%20attr%20%3D%20attrs%5Bi%5D%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20'%20'%20%2B%20attr.name%20%2B%20'%3D%22'%20%2B%20escapeAttr(attr.value)%20%2B%20'%22'%3B%0A%7D%0As%20%2B%3D%20'%3E'%3B%0Aif%20(voidElements%5BtagName%5D)%20%7B%0Areturn%20s%3B%0A%7D%0Areturn%20s%20%2B%20getInnerHTML(node%2C%20composed)%20%2B%20'%3C%2F'%20%2B%20tagName%20%2B%20'%3E'%3B%0Acase%20Node.TEXT_NODE%3A%0Avar%20data%20%3D%20node.data%3B%0Aif%20(parentNode%20%26%26%20plaintextParents%5BparentNode.localName%5D)%20%7B%0Areturn%20data%3B%0A%7D%0Areturn%20escapeData(data)%3B%0Acase%20Node.COMMENT_NODE%3A%0Areturn%20'%3C!--'%20%2B%20node.data%20%2B%20'--%3E'%3B%0Adefault%3A%0Aconsole.error(node)%3B%0Athrow%20new%20Error('not%20implemented')%3B%0A%7D%0A%7D%0Afunction%20getInnerHTML(node%2C%20composed)%20%7B%0Aif%20(node%20instanceof%20HTMLTemplateElement)%0Anode%20%3D%20node.content%3B%0Avar%20s%20%3D%20''%3B%0Avar%20c%24%20%3D%20Polymer.dom(node).childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20child%3B%20i%20%3C%20l%20%26%26%20(child%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20getOuterHTML(child%2C%20node%2C%20composed)%3B%0A%7D%0Areturn%20s%3B%0A%7D%0Areturn%20%7B%20getInnerHTML%3A%20getInnerHTML%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20nativeInsertBefore%20%3D%20Element.prototype.insertBefore%3B%0Avar%20nativeAppendChild%20%3D%20Element.prototype.appendChild%3B%0Avar%20nativeRemoveChild%20%3D%20Element.prototype.removeChild%3B%0APolymer.TreeApi%20%3D%20%7B%0AarrayCopyChildNodes%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopyChildren%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstElementChild%3B%20n%3B%20n%20%3D%20n.nextElementSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopy%3A%20function%20(a%24)%20%7B%0Avar%20l%20%3D%20a%24.length%3B%0Avar%20copy%20%3D%20new%20Array(l)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Acopy%5Bi%5D%20%3D%20a%24%5Bi%5D%3B%0A%7D%0Areturn%20copy%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Logical%20%3D%20%7B%0AhasParentNode%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.parentNode)%3B%0A%7D%2C%0AhasChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.childNodes%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20this.hasChildNodes(node)%20%3F%20this._getChildNodes(node)%20%3A%20node.childNodes%3B%0A%7D%2C%0A_getChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!node.__dom.childNodes)%20%7B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.__dom.firstChild%3B%20n%3B%20n%20%3D%20n.__dom.nextSibling)%20%7B%0Anode.__dom.childNodes.push(n)%3B%0A%7D%0A%7D%0Areturn%20node.__dom.childNodes%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.parentNode%20!%3D%3D%20undefined%20%3F%20node.__dom.parentNode%20%3A%20node.parentNode%3B%0A%7D%2C%0AgetFirstChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20node.__dom.firstChild%20%3A%20node.firstChild%3B%0A%7D%2C%0AgetLastChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20node.__dom.lastChild%20%3A%20node.lastChild%3B%0A%7D%2C%0AgetNextSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.nextSibling%20%3A%20node.nextSibling%3B%0A%7D%2C%0AgetPreviousSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.previousSibling%20%3A%20node.previousSibling%3B%0A%7D%2C%0AgetFirstElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20this._getFirstElementChild(node)%20%3A%20node.firstElementChild%3B%0A%7D%2C%0A_getFirstElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.firstChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetLastElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20this._getLastElementChild(node)%20%3A%20node.lastElementChild%3B%0A%7D%2C%0A_getLastElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.lastChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetNextElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20this._getNextElementSibling(node)%20%3A%20node.nextElementSibling%3B%0A%7D%2C%0A_getNextElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetPreviousElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20this._getPreviousElementSibling(node)%20%3A%20node.previousElementSibling%3B%0A%7D%2C%0A_getPreviousElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.previousSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AsaveChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!this.hasChildNodes(node))%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Anode.__dom.firstChild%20%3D%20node.firstChild%3B%0Anode.__dom.lastChild%20%3D%20node.lastChild%3B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0An.__dom%20%3D%20n.__dom%20%7C%7C%20%7B%7D%3B%0An.__dom.parentNode%20%3D%20node%3B%0Anode.__dom.childNodes.push(n)%3B%0An.__dom.nextSibling%20%3D%20n.nextSibling%3B%0An.__dom.previousSibling%20%3D%20n.previousSibling%3B%0A%7D%0A%7D%0A%7D%2C%0ArecordInsertBefore%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Athis._linkNode(n%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%20else%20%7B%0Athis._linkNode(node%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%2C%0A_linkNode%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(ref_node)%20%7B%0Aref_node.__dom%20%3D%20ref_node.__dom%20%7C%7C%20%7B%7D%3B%0A%7D%0Anode.__dom.previousSibling%20%3D%20ref_node%20%3F%20ref_node.__dom.previousSibling%20%3A%20container.__dom.lastChild%3B%0Aif%20(node.__dom.previousSibling)%20%7B%0Anode.__dom.previousSibling.__dom.nextSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.nextSibling%20%3D%20ref_node%3B%0Aif%20(node.__dom.nextSibling)%20%7B%0Anode.__dom.nextSibling.__dom.previousSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20container%3B%0Aif%20(ref_node)%20%7B%0Aif%20(ref_node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%20else%20%7B%0Acontainer.__dom.lastChild%20%3D%20node%3B%0Aif%20(!container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%2C%0ArecordRemoveChild%3A%20function%20(node%2C%20container)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node.__dom.nextSibling%3B%0A%7D%0Aif%20(node%20%3D%3D%3D%20container.__dom.lastChild)%20%7B%0Acontainer.__dom.lastChild%20%3D%20node.__dom.previousSibling%3B%0A%7D%0Avar%20p%20%3D%20node.__dom.previousSibling%3B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Aif%20(p)%20%7B%0Ap.__dom.nextSibling%20%3D%20n%3B%0A%7D%0Aif%20(n)%20%7B%0An.__dom.previousSibling%20%3D%20p%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20node.__dom.previousSibling%20%3D%20node.__dom.nextSibling%20%3D%20undefined%3B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Composed%20%3D%20%7B%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Polymer.TreeApi.arrayCopyChildNodes(node)%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.parentNode%3B%0A%7D%2C%0AclearChildNodes%3A%20function%20(node)%20%7B%0Anode.textContent%20%3D%20''%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(parentNode%2C%20newChild%2C%20refChild)%20%7B%0Areturn%20nativeInsertBefore.call(parentNode%2C%20newChild%2C%20refChild%20%7C%7C%20null)%3B%0A%7D%2C%0AappendChild%3A%20function%20(parentNode%2C%20newChild)%20%7B%0Areturn%20nativeAppendChild.call(parentNode%2C%20newChild)%3B%0A%7D%2C%0AremoveChild%3A%20function%20(parentNode%2C%20node)%20%7B%0Areturn%20nativeRemoveChild.call(parentNode%2C%20node)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0APolymer.DomApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20function%20(node)%20%7B%0Athis.node%20%3D%20needsToWrap%20%3F%20DomApi.wrap(node)%20%3A%20node%3B%0A%7D%3B%0Avar%20needsToWrap%20%3D%20Settings.hasShadow%20%26%26%20!Settings.nativeShadow%3B%0ADomApi.wrap%20%3D%20window.wrap%20%3F%20window.wrap%20%3A%20function%20(node)%20%7B%0Areturn%20node%3B%0A%7D%3B%0ADomApi.prototype%20%3D%20%7B%0Aflush%3A%20function%20()%20%7B%0APolymer.dom.flush()%3B%0A%7D%2C%0AdeepContains%3A%20function%20(node)%20%7B%0Aif%20(this.node.contains(node))%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20n%20%3D%20node%3B%0Avar%20doc%20%3D%20node.ownerDocument%3B%0Awhile%20(n%20%26%26%20n%20!%3D%3D%20doc%20%26%26%20n%20!%3D%3D%20this.node)%20%7B%0An%20%3D%20Polymer.dom(n).parentNode%20%7C%7C%20n.host%3B%0A%7D%0Areturn%20n%20%3D%3D%3D%20this.node%3B%0A%7D%2C%0AqueryDistributedElements%3A%20function%20(selector)%20%7B%0Avar%20c%24%20%3D%20this.getEffectiveChildNodes()%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%20%26%26%20DomApi.matchesSelector.call(c%2C%20selector))%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AgetEffectiveChildNodes%3A%20function%20()%20%7B%0Avar%20list%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.localName%20%3D%3D%3D%20CONTENT)%20%7B%0Avar%20d%24%20%3D%20dom(c).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20d%24.length%3B%20j%2B%2B)%20%7B%0Alist.push(d%24%5Bj%5D)%3B%0A%7D%0A%7D%20else%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AobserveNodes%3A%20function%20(callback)%20%7B%0Aif%20(callback)%20%7B%0Aif%20(!this.observer)%20%7B%0Athis.observer%20%3D%20this.node.localName%20%3D%3D%3D%20CONTENT%20%3F%20new%20DomApi.DistributedNodesObserver(this)%20%3A%20new%20DomApi.EffectiveNodesObserver(this)%3B%0A%7D%0Areturn%20this.observer.addListener(callback)%3B%0A%7D%0A%7D%2C%0AunobserveNodes%3A%20function%20(handle)%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.removeListener(handle)%3B%0A%7D%0A%7D%2C%0AnotifyObserver%3A%20function%20()%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.notify()%3B%0A%7D%0A%7D%2C%0A_query%3A%20function%20(matcher%2C%20node%2C%20halter)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this.node%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0Areturn%20list%3B%0A%7D%2C%0A_queryElements%3A%20function%20(elements%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20elements.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE)%20%7B%0Aif%20(this._queryElement(c%2C%20matcher%2C%20halter%2C%20list))%20%7B%0Areturn%20true%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_queryElement%3A%20function%20(node%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Avar%20result%20%3D%20matcher(node)%3B%0Aif%20(result)%20%7B%0Alist.push(node)%3B%0A%7D%0Aif%20(halter%20%26%26%20halter(result))%20%7B%0Areturn%20result%3B%0A%7D%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0A%7D%0A%7D%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%20%3D%20'content'%3B%0Avar%20dom%20%3D%20DomApi.factory%20%3D%20function%20(node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20document%3B%0Aif%20(!node.__domApi)%20%7B%0Anode.__domApi%20%3D%20new%20DomApi.ctor(node)%3B%0A%7D%0Areturn%20node.__domApi%3B%0A%7D%3B%0ADomApi.hasApi%20%3D%20function%20(node)%20%7B%0Areturn%20Boolean(node.__domApi)%3B%0A%7D%3B%0ADomApi.ctor%20%3D%20DomApi%3B%0APolymer.dom%20%3D%20function%20(obj%2C%20patch)%20%7B%0Aif%20(obj%20instanceof%20Event)%20%7B%0Areturn%20Polymer.EventApi.factory(obj)%3B%0A%7D%20else%20%7B%0Areturn%20DomApi.factory(obj%2C%20patch)%3B%0A%7D%0A%7D%3B%0Avar%20p%20%3D%20Element.prototype%3B%0ADomApi.matchesSelector%20%3D%20p.matches%20%7C%7C%20p.matchesSelector%20%7C%7C%20p.mozMatchesSelector%20%7C%7C%20p.msMatchesSelector%20%7C%7C%20p.oMatchesSelector%20%7C%7C%20p.webkitMatchesSelector%3B%0Areturn%20DomApi%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20dom%20%3D%20DomApi.factory%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20getInnerHTML%20%3D%20Polymer.domInnerHTML.getInnerHTML%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%3B%0Aif%20(Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0Avar%20nativeCloneNode%20%3D%20Element.prototype.cloneNode%3B%0Avar%20nativeImportNode%20%3D%20Document.prototype.importNode%3B%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0A_lazyDistribute%3A%20function%20(host)%20%7B%0Aif%20(host.shadyRoot%20%26%26%20host.shadyRoot._distributionClean)%20%7B%0Ahost.shadyRoot._distributionClean%20%3D%20false%3B%0APolymer.dom.addDebouncer(host.debounce('_distribute'%2C%20host._distributeContent))%3B%0A%7D%0A%7D%2C%0AappendChild%3A%20function%20(node)%20%7B%0Areturn%20this.insertBefore(node)%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(node%2C%20ref_node)%20%7B%0Aif%20(ref_node%20%26%26%20TreeApi.Logical.getParentNode(ref_node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20ref_node%20to%20be%20inserted%20before%20is%20not%20a%20child%20'%20%2B%20'of%20this%20node')%3B%0A%7D%0Aif%20(node.nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aif%20(DomApi.hasApi(parent))%20%7B%0Adom(parent).notifyObserver()%3B%0A%7D%0Athis._removeNode(node)%3B%0A%7D%20else%20%7B%0Athis._removeOwnerShadyRoot(node)%3B%0A%7D%0A%7D%0Aif%20(!this._addNode(node%2C%20ref_node))%20%7B%0Aif%20(ref_node)%20%7B%0Aref_node%20%3D%20ref_node.localName%20%3D%3D%3D%20CONTENT%20%3F%20this._firstComposedNode(ref_node)%20%3A%20ref_node%3B%0A%7D%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Aif%20(ref_node)%20%7B%0ATreeApi.Composed.insertBefore(container%2C%20node%2C%20ref_node)%3B%0A%7D%20else%20%7B%0ATreeApi.Composed.appendChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_addNode%3A%20function%20(node%2C%20ref_node)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Avar%20ipAdded%20%3D%20this._maybeAddInsertionPoint(node%2C%20this.node)%3B%0Aif%20(!root._invalidInsertionPoints)%20%7B%0Aroot._invalidInsertionPoints%20%3D%20ipAdded%3B%0A%7D%0Athis._addNodeToHost(root.host%2C%20node)%3B%0A%7D%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0ATreeApi.Logical.recordInsertBefore(node%2C%20this.node%2C%20ref_node)%3B%0A%7D%0Avar%20handled%20%3D%20this._maybeDistribute(node)%20%7C%7C%20this.node.shadyRoot%3B%0Aif%20(handled)%20%7B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Awhile%20(node.firstChild)%20%7B%0ATreeApi.Composed.removeChild(node%2C%20node.firstChild)%3B%0A%7D%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0Areturn%20handled%3B%0A%7D%2C%0AremoveChild%3A%20function%20(node)%20%7B%0Aif%20(TreeApi.Logical.getParentNode(node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20node%20to%20be%20removed%20is%20not%20a%20child%20of%20this%20node%3A%20'%20%2B%20node)%3B%0A%7D%0Aif%20(!this._removeNode(node))%20%7B%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(container%20%3D%3D%3D%20parent)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_removeNode%3A%20function%20(node)%20%7B%0Avar%20logicalParent%20%3D%20TreeApi.Logical.hasParentNode(node)%20%26%26%20TreeApi.Logical.getParentNode(node)%3B%0Avar%20distributed%3B%0Avar%20root%20%3D%20this._ownerShadyRootForNode(node)%3B%0Aif%20(logicalParent)%20%7B%0Adistributed%20%3D%20dom(node)._maybeDistributeParent()%3B%0ATreeApi.Logical.recordRemoveChild(node%2C%20logicalParent)%3B%0Aif%20(root%20%26%26%20this._removeDistributedChildren(root%2C%20node))%20%7B%0Aroot._invalidInsertionPoints%20%3D%20true%3B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Athis._removeOwnerShadyRoot(node)%3B%0Aif%20(root)%20%7B%0Athis._removeNodeFromHost(root.host%2C%20node)%3B%0A%7D%0Areturn%20distributed%3B%0A%7D%2C%0AreplaceChild%3A%20function%20(node%2C%20ref_node)%20%7B%0Athis.insertBefore(node%2C%20ref_node)%3B%0Athis.removeChild(ref_node)%3B%0Areturn%20node%3B%0A%7D%2C%0A_hasCachedOwnerRoot%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node._ownerShadyRoot%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Areturn%20this._ownerShadyRootForNode(this.node)%3B%0A%7D%2C%0A_ownerShadyRootForNode%3A%20function%20(node)%20%7B%0Aif%20(!node)%20%7B%0Areturn%3B%0A%7D%0Avar%20root%20%3D%20node._ownerShadyRoot%3B%0Aif%20(root%20%3D%3D%3D%20undefined)%20%7B%0Aif%20(node._isShadyRoot)%20%7B%0Aroot%20%3D%20node%3B%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aroot%20%3D%20parent._isShadyRoot%20%3F%20parent%20%3A%20this._ownerShadyRootForNode(parent)%3B%0A%7D%20else%20%7B%0Aroot%20%3D%20null%3B%0A%7D%0A%7D%0Aif%20(root%20%7C%7C%20document.documentElement.contains(node))%20%7B%0Anode._ownerShadyRoot%20%3D%20root%3B%0A%7D%0A%7D%0Areturn%20root%3B%0A%7D%2C%0A_maybeDistribute%3A%20function%20(node)%20%7B%0Avar%20fragContent%20%3D%20node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent%20%26%26%20dom(node).querySelector(CONTENT)%3B%0Avar%20wrappedContent%20%3D%20fragContent%20%26%26%20TreeApi.Logical.getParentNode(fragContent).nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%3B%0Avar%20hasContent%20%3D%20fragContent%20%7C%7C%20node.localName%20%3D%3D%3D%20CONTENT%3B%0Aif%20(hasContent)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Avar%20needsDist%20%3D%20this._nodeNeedsDistribution(this.node)%3B%0Aif%20(needsDist)%20%7B%0Athis._lazyDistribute(this.node)%3B%0A%7D%0Areturn%20needsDist%20%7C%7C%20hasContent%20%26%26%20!wrappedContent%3B%0A%7D%2C%0A_maybeAddInsertionPoint%3A%20function%20(node%2C%20parent)%20%7B%0Avar%20added%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent)%20%7B%0Avar%20c%24%20%3D%20dom(node).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20np%2C%20na%3B%20i%20%3C%20c%24.length%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anp%20%3D%20TreeApi.Logical.getParentNode(n)%3B%0Aif%20(np%20%3D%3D%3D%20node)%20%7B%0Anp%20%3D%20parent%3B%0A%7D%0Ana%20%3D%20this._maybeAddInsertionPoint(n%2C%20np)%3B%0Aadded%20%3D%20added%20%7C%7C%20na%3B%0A%7D%0A%7D%20else%20if%20(node.localName%20%3D%3D%3D%20CONTENT)%20%7B%0ATreeApi.Logical.saveChildNodes(parent)%3B%0ATreeApi.Logical.saveChildNodes(node)%3B%0Aadded%20%3D%20true%3B%0A%7D%0Areturn%20added%3B%0A%7D%2C%0A_updateInsertionPoints%3A%20function%20(host)%20%7B%0Avar%20i%24%20%3D%20host.shadyRoot._insertionPoints%20%3D%20dom(host.shadyRoot).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(TreeApi.Logical.getParentNode(c))%3B%0A%7D%0A%7D%2C%0A_nodeNeedsDistribution%3A%20function%20(node)%20%7B%0Areturn%20node%20%26%26%20node.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(node.shadyRoot)%3B%0A%7D%2C%0A_addNodeToHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementAdd)%20%7B%0Ahost._elementAdd(node)%3B%0A%7D%0A%7D%2C%0A_removeNodeFromHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementRemove)%20%7B%0Ahost._elementRemove(node)%3B%0A%7D%0A%7D%2C%0A_removeDistributedChildren%3A%20function%20(root%2C%20container)%20%7B%0Avar%20hostNeedsDist%3B%0Avar%20ip%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ip%24.length%3B%20i%2B%2B)%20%7B%0Avar%20content%20%3D%20ip%24%5Bi%5D%3B%0Aif%20(this._contains(container%2C%20content))%20%7B%0Avar%20dc%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20dc%24.length%3B%20j%2B%2B)%20%7B%0AhostNeedsDist%20%3D%20true%3B%0Avar%20node%20%3D%20dc%24%5Bj%5D%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Areturn%20hostNeedsDist%3B%0A%7D%2C%0A_contains%3A%20function%20(container%2C%20node)%20%7B%0Awhile%20(node)%20%7B%0Aif%20(node%20%3D%3D%20container)%20%7B%0Areturn%20true%3B%0A%7D%0Anode%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0A%7D%0A%7D%2C%0A_removeOwnerShadyRoot%3A%20function%20(node)%20%7B%0Aif%20(this._hasCachedOwnerRoot(node))%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node)%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20n%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._removeOwnerShadyRoot(n)%3B%0A%7D%0A%7D%0Anode._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%2C%0A_firstComposedNode%3A%20function%20(content)%20%7B%0Avar%20n%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20n%24.length%2C%20n%2C%20p%24%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ap%24%20%3D%20dom(n).getDestinationInsertionPoints()%3B%0Aif%20(p%24%5Bp%24.length%20-%201%5D%20%3D%3D%3D%20content)%20%7B%0Areturn%20n%3B%0A%7D%0A%7D%0A%7D%2C%0AquerySelector%3A%20function%20(selector)%20%7B%0Avar%20result%20%3D%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node%2C%20function%20(n)%20%7B%0Areturn%20Boolean(n)%3B%0A%7D)%5B0%5D%3B%0Areturn%20result%20%7C%7C%20null%3B%0A%7D%2C%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Areturn%20this.node._destinationInsertionPoints%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Areturn%20this.node._distributedNodes%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0A_clear%3A%20function%20()%20%7B%0Awhile%20(this.childNodes.length)%20%7B%0Athis.removeChild(this.childNodes%5B0%5D)%3B%0A%7D%0A%7D%2C%0AsetAttribute%3A%20function%20(name%2C%20value)%20%7B%0Athis.node.setAttribute(name%2C%20value)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0AremoveAttribute%3A%20function%20(name)%20%7B%0Athis.node.removeAttribute(name)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0A_maybeDistributeParent%3A%20function%20()%20%7B%0Aif%20(this._nodeNeedsDistribution(this.parentNode))%20%7B%0Athis._lazyDistribute(this.parentNode)%3B%0Areturn%20true%3B%0A%7D%0A%7D%2C%0AcloneNode%3A%20function%20(deep)%20%7B%0Avar%20n%20%3D%20nativeCloneNode.call(this.node%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(c%24%5Bi%5D).cloneNode(true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Avar%20n%20%3D%20nativeImportNode.call(doc%2C%20externalNode%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(externalNode)%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(doc).importNode(c%24%5Bi%5D%2C%20true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0A_getComposedInnerHTML%3A%20function%20()%20%7B%0Areturn%20getInnerHTML(this.node%2C%20true)%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20active%20%3D%20document.activeElement%3B%0Aif%20(!active)%20%7B%0Areturn%20null%3B%0A%7D%0Avar%20isShadyRoot%20%3D%20!!this.node._isShadyRoot%3B%0Aif%20(this.node%20!%3D%3D%20document)%20%7B%0Aif%20(!isShadyRoot)%20%7B%0Areturn%20null%3B%0A%7D%0Aif%20(this.node.host%20%3D%3D%3D%20active%20%7C%7C%20!this.node.host.contains(active))%20%7B%0Areturn%20null%3B%0A%7D%0A%7D%0Avar%20activeRoot%20%3D%20dom(active).getOwnerRoot()%3B%0Awhile%20(activeRoot%20%26%26%20activeRoot%20!%3D%3D%20this.node)%20%7B%0Aactive%20%3D%20activeRoot.host%3B%0AactiveRoot%20%3D%20dom(active).getOwnerRoot()%3B%0A%7D%0Aif%20(this.node%20%3D%3D%3D%20document)%20%7B%0Areturn%20activeRoot%20%3F%20null%20%3A%20active%3B%0A%7D%20else%20%7B%0Areturn%20activeRoot%20%3D%3D%3D%20this.node%20%3F%20active%20%3A%20null%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(this.node)%3B%0Areturn%20Array.isArray(c%24)%20%3F%20c%24%20%3A%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0Areturn%20Array.prototype.filter.call(this.childNodes%2C%20function%20(n)%20%7B%0Areturn%20n.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%3B%0A%7D)%3B%0A%7D%20else%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AparentNode%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getParentNode(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%20else%20%7B%0Avar%20tc%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20cn%20%3D%20this.childNodes%2C%20c%3B%20c%20%3D%20cn%5Bi%5D%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Atc.push(c.textContent)%3B%0A%7D%0A%7D%0Areturn%20tc.join('')%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis.node.textContent%20%3D%20text%3B%0A%7D%20else%20%7B%0Athis._clear()%3B%0Aif%20(text)%20%7B%0Athis.appendChild(document.createTextNode(text))%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20null%3B%0A%7D%20else%20%7B%0Areturn%20getInnerHTML(this.node)%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20!%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis._clear()%3B%0Avar%20d%20%3D%20document.createElement('div')%3B%0Ad.innerHTML%20%3D%20text%3B%0Avar%20c%24%20%3D%20TreeApi.arrayCopyChildNodes(d)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Athis.appendChild(c%24%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0ADomApi.hasInsertionPoint%20%3D%20function%20(root)%20%7B%0Areturn%20Boolean(root%20%26%26%20root._insertionPoints.length)%3B%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Aif%20(!Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20TreeApi.arrayCopy(this.node.querySelectorAll(selector))%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Avar%20n%20%3D%20this.node%3B%0Awhile%20(n)%20%7B%0Aif%20(n.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20n.host)%20%7B%0Areturn%20n%3B%0A%7D%0An%20%3D%20n.parentNode%3B%0A%7D%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Areturn%20doc.importNode(externalNode%2C%20deep)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDestinationInsertionPoints%20%26%26%20this.node.getDestinationInsertionPoints()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDistributedNodes%20%26%26%20this.node.getDistributedNodes()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20node%20%3D%20DomApi.wrap(this.node)%3B%0Avar%20activeElement%20%3D%20node.activeElement%3B%0Areturn%20node.contains(activeElement)%20%3F%20activeElement%20%3A%20null%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.textContent%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.innerHTML%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.innerHTML%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0Avar%20forwardMethods%20%3D%20function%20(m%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20m%24.length%3B%20i%2B%2B)%20%7B%0AforwardMethod(m%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardMethod%20%3D%20function%20(method)%20%7B%0ADomApi.prototype%5Bmethod%5D%20%3D%20function%20()%20%7B%0Areturn%20this.node%5Bmethod%5D.apply(this.node%2C%20arguments)%3B%0A%7D%3B%0A%7D%3B%0AforwardMethods(%5B%0A'cloneNode'%2C%0A'appendChild'%2C%0A'insertBefore'%2C%0A'removeChild'%2C%0A'replaceChild'%2C%0A'setAttribute'%2C%0A'removeAttribute'%2C%0A'querySelector'%0A%5D)%3B%0Avar%20forwardProperties%20%3D%20function%20(f%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20f%24.length%3B%20i%2B%2B)%20%7B%0AforwardProperty(f%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardProperty%20%3D%20function%20(name)%20%7B%0AObject.defineProperty(DomApi.prototype%2C%20name%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node%5Bname%5D%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0A%7D%3B%0AforwardProperties(%5B%0A'parentNode'%2C%0A'firstChild'%2C%0A'lastChild'%2C%0A'nextSibling'%2C%0A'previousSibling'%2C%0A'firstElementChild'%2C%0A'lastElementChild'%2C%0A'nextElementSibling'%2C%0A'previousElementSibling'%0A%5D)%3B%0A%7D())%3B%0APolymer.Base.extend(Polymer.dom%2C%20%7B%0A_flushGuard%3A%200%2C%0A_FLUSH_MAX%3A%20100%2C%0A_needsTakeRecords%3A%20!Polymer.Settings.useNativeCustomElements%2C%0A_debouncers%3A%20%5B%5D%2C%0A_staticFlushList%3A%20%5B%5D%2C%0A_finishDebouncer%3A%20null%2C%0Aflush%3A%20function%20()%20%7B%0Athis._flushGuard%20%3D%200%3B%0Athis._prepareFlush()%3B%0Awhile%20(this._debouncers.length%20%26%26%20this._flushGuard%20%3C%20this._FLUSH_MAX)%20%7B%0Awhile%20(this._debouncers.length)%20%7B%0Athis._debouncers.shift().complete()%3B%0A%7D%0Aif%20(this._finishDebouncer)%20%7B%0Athis._finishDebouncer.complete()%3B%0A%7D%0Athis._prepareFlush()%3B%0Athis._flushGuard%2B%2B%3B%0A%7D%0Aif%20(this._flushGuard%20%3E%3D%20this._FLUSH_MAX)%20%7B%0Aconsole.warn('Polymer.dom.flush%20aborted.%20Flush%20may%20not%20be%20complete.')%3B%0A%7D%0A%7D%2C%0A_prepareFlush%3A%20function%20()%20%7B%0Aif%20(this._needsTakeRecords)%20%7B%0ACustomElements.takeRecords()%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._staticFlushList.length%3B%20i%2B%2B)%20%7B%0Athis._staticFlushList%5Bi%5D()%3B%0A%7D%0A%7D%2C%0AaddStaticFlush%3A%20function%20(fn)%20%7B%0Athis._staticFlushList.push(fn)%3B%0A%7D%2C%0AremoveStaticFlush%3A%20function%20(fn)%20%7B%0Avar%20i%20%3D%20this._staticFlushList.indexOf(fn)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._staticFlushList.splice(i%2C%201)%3B%0A%7D%0A%7D%2C%0AaddDebouncer%3A%20function%20(debouncer)%20%7B%0Athis._debouncers.push(debouncer)%3B%0Athis._finishDebouncer%20%3D%20Polymer.Debounce(this._finishDebouncer%2C%20this._finishFlush)%3B%0A%7D%2C%0A_finishFlush%3A%20function%20()%20%7B%0APolymer.dom._debouncers%20%3D%20%5B%5D%3B%0A%7D%0A%7D)%3B%0APolymer.EventApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.Event%20%3D%20function%20(event)%20%7B%0Athis.event%20%3D%20event%3B%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.path%5B0%5D%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20path()%20%7B%0Areturn%20this.event.path%3B%0A%7D%0A%7D%3B%0A%7D%20else%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Avar%20current%20%3D%20this.event.currentTarget%3B%0Avar%20currentRoot%20%3D%20current%20%26%26%20Polymer.dom(current).getOwnerRoot()%3B%0Avar%20p%24%20%3D%20this.path%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20p%24.length%3B%20i%2B%2B)%20%7B%0Aif%20(Polymer.dom(p%24%5Bi%5D).getOwnerRoot()%20%3D%3D%3D%20currentRoot)%20%7B%0Areturn%20p%24%5Bi%5D%3B%0A%7D%0A%7D%0A%7D%2C%0Aget%20path()%20%7B%0Aif%20(!this.event._path)%20%7B%0Avar%20path%20%3D%20%5B%5D%3B%0Avar%20current%20%3D%20this.rootTarget%3B%0Awhile%20(current)%20%7B%0Apath.push(current)%3B%0Avar%20insertionPoints%20%3D%20Polymer.dom(current).getDestinationInsertionPoints()%3B%0Aif%20(insertionPoints.length)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20insertionPoints.length%20-%201%3B%20i%2B%2B)%20%7B%0Apath.push(insertionPoints%5Bi%5D)%3B%0A%7D%0Acurrent%20%3D%20insertionPoints%5BinsertionPoints.length%20-%201%5D%3B%0A%7D%20else%20%7B%0Acurrent%20%3D%20Polymer.dom(current).parentNode%20%7C%7C%20current.host%3B%0A%7D%0A%7D%0Apath.push(window)%3B%0Athis.event._path%20%3D%20path%3B%0A%7D%0Areturn%20this.event._path%3B%0A%7D%0A%7D%3B%0A%7D%0Avar%20factory%20%3D%20function%20(event)%20%7B%0Aif%20(!event.__eventApi)%20%7B%0Aevent.__eventApi%20%3D%20new%20DomApi.Event(event)%3B%0A%7D%0Areturn%20event.__eventApi%3B%0A%7D%3B%0Areturn%20%7B%20factory%3A%20factory%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20useShadow%20%3D%20Polymer.Settings.useShadow%3B%0AObject.defineProperty(DomApi.prototype%2C%20'classList'%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(!this._classList)%20%7B%0Athis._classList%20%3D%20new%20DomApi.ClassList(this)%3B%0A%7D%0Areturn%20this._classList%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0ADomApi.ClassList%20%3D%20function%20(host)%20%7B%0Athis.domApi%20%3D%20host%3B%0Athis.node%20%3D%20host.node%3B%0A%7D%3B%0ADomApi.ClassList.prototype%20%3D%20%7B%0Aadd%3A%20function%20()%20%7B%0Athis.node.classList.add.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Aremove%3A%20function%20()%20%7B%0Athis.node.classList.remove.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Atoggle%3A%20function%20()%20%7B%0Athis.node.classList.toggle.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0A_distributeParent%3A%20function%20()%20%7B%0Aif%20(!useShadow)%20%7B%0Athis.domApi._maybeDistributeParent()%3B%0A%7D%0A%7D%2C%0Acontains%3A%20function%20()%20%7B%0Areturn%20this.node.classList.contains.apply(this.node.classList%2C%20arguments)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.EffectiveNodesObserver%20%3D%20function%20(domApi)%20%7B%0Athis.domApi%20%3D%20domApi%3B%0Athis.node%20%3D%20this.domApi.node%3B%0Athis._listeners%20%3D%20%5B%5D%3B%0A%7D%3B%0ADomApi.EffectiveNodesObserver.prototype%20%3D%20%7B%0AaddListener%3A%20function%20(callback)%20%7B%0Aif%20(!this._isSetup)%20%7B%0Athis._setup()%3B%0Athis._isSetup%20%3D%20true%3B%0A%7D%0Avar%20listener%20%3D%20%7B%0Afn%3A%20callback%2C%0A_nodes%3A%20%5B%5D%0A%7D%3B%0Athis._listeners.push(listener)%3B%0Athis._scheduleNotify()%3B%0Areturn%20listener%3B%0A%7D%2C%0AremoveListener%3A%20function%20(handle)%20%7B%0Avar%20i%20%3D%20this._listeners.indexOf(handle)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._listeners.splice(i%2C%201)%3B%0Ahandle._nodes%20%3D%20%5B%5D%3B%0A%7D%0Aif%20(!this._hasListeners())%20%7B%0Athis._cleanup()%3B%0Athis._isSetup%20%3D%20false%3B%0A%7D%0A%7D%2C%0A_setup%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._unobserveContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_hasListeners%3A%20function%20()%20%7B%0Areturn%20Boolean(this._listeners.length)%3B%0A%7D%2C%0A_scheduleNotify%3A%20function%20()%20%7B%0Aif%20(this._debouncer)%20%7B%0Athis._debouncer.stop()%3B%0A%7D%0Athis._debouncer%20%3D%20Polymer.Debounce(this._debouncer%2C%20this._notify)%3B%0Athis._debouncer.context%20%3D%20this%3B%0APolymer.dom.addDebouncer(this._debouncer)%3B%0A%7D%2C%0Anotify%3A%20function%20()%20%7B%0Aif%20(this._hasListeners())%20%7B%0Athis._scheduleNotify()%3B%0A%7D%0A%7D%2C%0A_notify%3A%20function%20()%20%7B%0Athis._beforeCallListeners()%3B%0Athis._callListeners()%3B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0Athis._updateContentElements()%3B%0A%7D%2C%0A_updateContentElements%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_observeContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0An.__observeNodesMap%20%3D%20n.__observeNodesMap%20%7C%7C%20new%20WeakMap()%3B%0Aif%20(!n.__observeNodesMap.has(this))%20%7B%0An.__observeNodesMap.set(this%2C%20this._observeContent(n))%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_observeContent%3A%20function%20(content)%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20h%20%3D%20Polymer.dom(content).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Ah._avoidChangeCalculation%20%3D%20true%3B%0Areturn%20h%3B%0A%7D%2C%0A_unobserveContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20h%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0Ah%20%3D%20n.__observeNodesMap.get(this)%3B%0Aif%20(h)%20%7B%0APolymer.dom(n).unobserveNodes(h)%3B%0An.__observeNodesMap.delete(this)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_isContent%3A%20function%20(node)%20%7B%0Areturn%20node.localName%20%3D%3D%3D%20'content'%3B%0A%7D%2C%0A_callListeners%3A%20function%20()%20%7B%0Avar%20o%24%20%3D%20this._listeners%3B%0Avar%20nodes%20%3D%20this._getEffectiveNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20o%24.length%20%26%26%20(o%20%3D%20o%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20info%20%3D%20this._generateListenerInfo(o%2C%20nodes)%3B%0Aif%20(info%20%7C%7C%20o._alwaysNotify)%20%7B%0Athis._callListener(o%2C%20info)%3B%0A%7D%0A%7D%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getEffectiveChildNodes()%3B%0A%7D%2C%0A_generateListenerInfo%3A%20function%20(listener%2C%20newNodes)%20%7B%0Aif%20(listener._avoidChangeCalculation)%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20oldNodes%20%3D%20listener._nodes%3B%0Avar%20info%20%3D%20%7B%0Atarget%3A%20this.node%2C%0AaddedNodes%3A%20%5B%5D%2C%0AremovedNodes%3A%20%5B%5D%0A%7D%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(newNodes%2C%20oldNodes)%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Ainfo.removedNodes.push(n)%3B%0A%7D%0A%7D%0Afor%20(i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%20s.index%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0Ainfo.addedNodes.push(newNodes%5Bj%5D)%3B%0A%7D%0A%7D%0Alistener._nodes%20%3D%20newNodes%3B%0Aif%20(info.addedNodes.length%20%7C%7C%20info.removedNodes.length)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%2C%0A_callListener%3A%20function%20(listener%2C%20info)%20%7B%0Areturn%20listener.fn.call(this.node%2C%20info)%3B%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0A%7D%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0Avar%20baseSetup%20%3D%20DomApi.EffectiveNodesObserver.prototype._setup%3B%0Avar%20baseCleanup%20%3D%20DomApi.EffectiveNodesObserver.prototype._cleanup%3B%0APolymer.Base.extend(DomApi.EffectiveNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._mutationHandler%20%3D%20function%20(mxns)%20%7B%0Aif%20(mxns%20%26%26%20mxns.length)%20%7B%0Aself._scheduleNotify()%3B%0A%7D%0A%7D%3B%0Athis._observer%20%3D%20new%20MutationObserver(this._mutationHandler)%3B%0Athis._boundFlush%20%3D%20function%20()%20%7B%0Aself._flush()%3B%0A%7D%3B%0APolymer.dom.addStaticFlush(this._boundFlush)%3B%0Athis._observer.observe(this.node%2C%20%7B%20childList%3A%20true%20%7D)%3B%0A%7D%0AbaseSetup.call(this)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._observer.disconnect()%3B%0Athis._observer%20%3D%20null%3B%0Athis._mutationHandler%20%3D%20null%3B%0APolymer.dom.removeStaticFlush(this._boundFlush)%3B%0AbaseCleanup.call(this)%3B%0A%7D%2C%0A_flush%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._mutationHandler(this._observer.takeRecords())%3B%0A%7D%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._makeContentListenersAlwaysNotify()%3B%0Athis._observer.disconnect()%3B%0Athis._observer.observe(this.node%2C%20%7B%0AchildList%3A%20true%2C%0Aattributes%3A%20true%2C%0Asubtree%3A%20true%0A%7D)%3B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host%20%26%26%20Polymer.dom(host).observer)%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%2C%0A_makeContentListenersAlwaysNotify%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20this._listeners.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20this._listeners%5Bi%5D%3B%0Ah._alwaysNotify%20%3D%20h._isContentListener%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.DistributedNodesObserver%20%3D%20function%20(domApi)%20%7B%0ADomApi.EffectiveNodesObserver.call(this%2C%20domApi)%3B%0A%7D%3B%0ADomApi.DistributedNodesObserver.prototype%20%3D%20Object.create(DomApi.EffectiveNodesObserver.prototype)%3B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getDistributedNodes()%3B%0A%7D%0A%7D)%3B%0Aif%20(Settings.useShadow)%20%7B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._observer%20%3D%20Polymer.dom(host).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Athis._observer._isContentListener%20%3D%20true%3B%0Aif%20(this._hasAttrSelect())%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_hasAttrSelect%3A%20function%20()%20%7B%0Avar%20select%20%3D%20this.node.getAttribute('select')%3B%0Areturn%20select%20%26%26%20select.match(%2F%5B%5B.%5D%2B%2F)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0APolymer.dom(host).unobserveNodes(this._observer)%3B%0A%7D%0Athis._observer%20%3D%20null%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0APolymer.Base._addFeature(%7B%0A_prepShady%3A%20function%20()%20%7B%0Athis._useContent%20%3D%20this._useContent%20%7C%7C%20Boolean(this._template)%3B%0A%7D%2C%0A_setupShady%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20null%3B%0Aif%20(!this.__domApi)%20%7B%0Athis.__domApi%20%3D%20null%3B%0A%7D%0Aif%20(!this.__dom)%20%7B%0Athis.__dom%20%3D%20null%3B%0A%7D%0Aif%20(!this._ownerShadyRoot)%20%7B%0Athis._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%0A%7D%2C%0A_poolContent%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0ATreeApi.Logical.saveChildNodes(this)%3B%0A%7D%0A%7D%2C%0A_setupRoot%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis._createLocalRoot()%3B%0Aif%20(!this.dataHost)%20%7B%0AupgradeLogicalChildren(TreeApi.Logical.getChildNodes(this))%3B%0A%7D%0A%7D%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20this.root%3B%0Athis.shadyRoot._distributionClean%20%3D%20false%3B%0Athis.shadyRoot._hasDistributed%20%3D%20false%3B%0Athis.shadyRoot._isShadyRoot%20%3D%20true%3B%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0Avar%20i%24%20%3D%20this.shadyRoot._insertionPoints%20%3D%20!this._notes%20%7C%7C%20this._notes._hasContent%20%3F%20this.shadyRoot.querySelectorAll('content')%20%3A%20%5B%5D%3B%0ATreeApi.Logical.saveChildNodes(this.shadyRoot)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(c.parentNode)%3B%0A%7D%0Athis.shadyRoot.host%20%3D%20this%3B%0A%7D%2C%0Aget%20domHost()%20%7B%0Avar%20root%20%3D%20Polymer.dom(this).getOwnerRoot()%3B%0Areturn%20root%20%26%26%20root.host%3B%0A%7D%2C%0AdistributeContent%3A%20function%20(updateInsertionPoints)%20%7B%0Aif%20(this.shadyRoot)%20%7B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20this.shadyRoot._invalidInsertionPoints%20%7C%7C%20updateInsertionPoints%3B%0Avar%20host%20%3D%20getTopDistributingHost(this)%3B%0APolymer.dom(this)._lazyDistribute(host)%3B%0A%7D%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20!this.shadyRoot._distributionClean)%20%7B%0Aif%20(this.shadyRoot._invalidInsertionPoints)%20%7B%0APolymer.dom(this)._updateInsertionPoints(this)%3B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20false%3B%0A%7D%0Athis._beginDistribute()%3B%0Athis._distributeDirtyRoots()%3B%0Athis._finishDistribute()%3B%0A%7D%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._resetDistribution()%3B%0Athis._distributePool(this.shadyRoot%2C%20this._collectPool())%3B%0A%7D%0A%7D%2C%0A_distributeDirtyRoots%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.shadyRoot._dirtyRoots%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._distributeContent()%3B%0A%7D%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis.shadyRoot._distributionClean%20%3D%20true%3B%0Aif%20(DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._composeTree()%3B%0AnotifyContentObservers(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0ATreeApi.Composed.clearChildNodes(this)%3B%0Athis.appendChild(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Avar%20children%20%3D%20this._composeNode(this)%3B%0Athis._updateChildNodes(this%2C%20children)%3B%0A%7D%0A%7D%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0AnotifyInitialDistribution(this)%3B%0A%7D%0Athis.shadyRoot._hasDistributed%20%3D%20true%3B%0A%7D%0A%7D%2C%0AelementMatches%3A%20function%20(selector%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Areturn%20DomApi.matchesSelector.call(node%2C%20selector)%3B%0A%7D%2C%0A_resetDistribution%3A%20function%20()%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(child._destinationInsertionPoints)%20%7B%0Achild._destinationInsertionPoints%20%3D%20undefined%3B%0A%7D%0Aif%20(isInsertionPoint(child))%20%7B%0AclearDistributedDestinationInsertionPoints(child)%3B%0A%7D%0A%7D%0Avar%20root%20%3D%20this.shadyRoot%3B%0Avar%20p%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20p%24.length%3B%20j%2B%2B)%20%7B%0Ap%24%5Bj%5D._distributedNodes%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_collectPool%3A%20function%20()%20%7B%0Avar%20pool%20%3D%20%5B%5D%3B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Apool.push.apply(pool%2C%20child._distributedNodes)%3B%0A%7D%20else%20%7B%0Apool.push(child)%3B%0A%7D%0A%7D%0Areturn%20pool%3B%0A%7D%2C%0A_distributePool%3A%20function%20(node%2C%20pool)%20%7B%0Avar%20p%24%20%3D%20node._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._distributeInsertionPoint(p%2C%20pool)%3B%0AmaybeRedistributeParent(p%2C%20this)%3B%0A%7D%0A%7D%2C%0A_distributeInsertionPoint%3A%20function%20(content%2C%20pool)%20%7B%0Avar%20anyDistributed%20%3D%20false%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20pool.length%2C%20node%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Anode%20%3D%20pool%5Bi%5D%3B%0Aif%20(!node)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(this._matchesContentSelect(node%2C%20content))%20%7B%0AdistributeNodeInto(node%2C%20content)%3B%0Apool%5Bi%5D%20%3D%20undefined%3B%0AanyDistributed%20%3D%20true%3B%0A%7D%0A%7D%0Aif%20(!anyDistributed)%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(content)%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20children.length%3B%20j%2B%2B)%20%7B%0AdistributeNodeInto(children%5Bj%5D%2C%20content)%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeTree%3A%20function%20()%20%7B%0Athis._updateChildNodes(this%2C%20this._composeNode(this))%3B%0Avar%20p%24%20%3D%20this.shadyRoot._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%2C%20parent%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparent%20%3D%20TreeApi.Logical.getParentNode(p)%3B%0Aif%20(!parent._useContent%20%26%26%20parent%20!%3D%3D%20this%20%26%26%20parent%20!%3D%3D%20this.shadyRoot)%20%7B%0Athis._updateChildNodes(parent%2C%20this._composeNode(parent))%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeNode%3A%20function%20(node)%20%7B%0Avar%20children%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node.shadyRoot%20%7C%7C%20node)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20c%24%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Avar%20distributedNodes%20%3D%20child._distributedNodes%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20distributedNodes.length%3B%20j%2B%2B)%20%7B%0Avar%20distributedNode%20%3D%20distributedNodes%5Bj%5D%3B%0Aif%20(isFinalDestination(child%2C%20distributedNode))%20%7B%0Achildren.push(distributedNode)%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Achildren.push(child)%3B%0A%7D%0A%7D%0Areturn%20children%3B%0A%7D%2C%0A_updateChildNodes%3A%20function%20(container%2C%20children)%20%7B%0Avar%20composed%20%3D%20TreeApi.Composed.getChildNodes(container)%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(children%2C%20composed)%3B%0Afor%20(var%20i%20%3D%200%2C%20d%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Aif%20(TreeApi.Composed.getParentNode(n)%20%3D%3D%3D%20container)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20n)%3B%0A%7D%0Acomposed.splice(s.index%20%2B%20d%2C%201)%3B%0A%7D%0Ad%20-%3D%20s.addedCount%3B%0A%7D%0Afor%20(var%20i%20%3D%200%2C%20s%2C%20next%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anext%20%3D%20composed%5Bs.index%5D%3B%0Afor%20(j%20%3D%20s.index%2C%20n%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0An%20%3D%20children%5Bj%5D%3B%0ATreeApi.Composed.insertBefore(container%2C%20n%2C%20next)%3B%0Acomposed.splice(j%2C%200%2C%20n)%3B%0A%7D%0A%7D%0A%7D%2C%0A_matchesContentSelect%3A%20function%20(node%2C%20contentElement)%20%7B%0Avar%20select%20%3D%20contentElement.getAttribute('select')%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aselect%20%3D%20select.trim()%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aif%20(!(node%20instanceof%20Element))%20%7B%0Areturn%20false%3B%0A%7D%0Avar%20validSelectors%20%3D%20%2F%5E(%3Anot%5C()%3F%5B*.%23%5Ba-zA-Z_%7C%5D%2F%3B%0Aif%20(!validSelectors.test(select))%20%7B%0Areturn%20false%3B%0A%7D%0Areturn%20this.elementMatches(select%2C%20node)%3B%0A%7D%2C%0A_elementAdd%3A%20function%20()%20%7B%0A%7D%2C%0A_elementRemove%3A%20function%20()%20%7B%0A%7D%0A%7D)%3B%0Afunction%20distributeNodeInto(child%2C%20insertionPoint)%20%7B%0AinsertionPoint._distributedNodes.push(child)%3B%0Avar%20points%20%3D%20child._destinationInsertionPoints%3B%0Aif%20(!points)%20%7B%0Achild._destinationInsertionPoints%20%3D%20%5BinsertionPoint%5D%3B%0A%7D%20else%20%7B%0Apoints.push(insertionPoint)%3B%0A%7D%0A%7D%0Afunction%20clearDistributedDestinationInsertionPoints(content)%20%7B%0Avar%20e%24%20%3D%20content._distributedNodes%3B%0Aif%20(e%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20e%24.length%3B%20i%2B%2B)%20%7B%0Avar%20d%20%3D%20e%24%5Bi%5D._destinationInsertionPoints%3B%0Aif%20(d)%20%7B%0Ad.splice(d.indexOf(content)%20%2B%201%2C%20d.length)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Afunction%20maybeRedistributeParent(content%2C%20host)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(content)%3B%0Aif%20(parent%20%26%26%20parent.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(parent.shadyRoot)%20%26%26%20parent.shadyRoot._distributionClean)%20%7B%0Aparent.shadyRoot._distributionClean%20%3D%20false%3B%0Ahost.shadyRoot._dirtyRoots.push(parent)%3B%0A%7D%0A%7D%0Afunction%20isFinalDestination(insertionPoint%2C%20node)%20%7B%0Avar%20points%20%3D%20node._destinationInsertionPoints%3B%0Areturn%20points%20%26%26%20points%5Bpoints.length%20-%201%5D%20%3D%3D%3D%20insertionPoint%3B%0A%7D%0Afunction%20isInsertionPoint(node)%20%7B%0Areturn%20node.localName%20%3D%3D%20'content'%3B%0A%7D%0Afunction%20getTopDistributingHost(host)%20%7B%0Awhile%20(host%20%26%26%20hostNeedsRedistribution(host))%20%7B%0Ahost%20%3D%20host.domHost%3B%0A%7D%0Areturn%20host%3B%0A%7D%0Afunction%20hostNeedsRedistribution(host)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(host)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20c%24%5Bi%5D%3B%0Aif%20(c.localName%20%26%26%20c.localName%20%3D%3D%3D%20'content')%20%7B%0Areturn%20host.domHost%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyContentObservers(root)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20root._insertionPoints.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20root._insertionPoints%5Bi%5D%3B%0Aif%20(DomApi.hasApi(c))%20%7B%0APolymer.dom(c).notifyObserver()%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyInitialDistribution(host)%20%7B%0Aif%20(DomApi.hasApi(host))%20%7B%0APolymer.dom(host).notifyObserver()%3B%0A%7D%0A%7D%0Avar%20needsUpgrade%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Afunction%20upgradeLogicalChildren(children)%20%7B%0Aif%20(needsUpgrade%20%26%26%20children)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0ACustomElements.upgrade(children%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0Aif%20(Polymer.Settings.useShadow)%20%7B%0APolymer.Base._addFeature(%7B%0A_poolContent%3A%20function%20()%20%7B%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0A%7D%2C%0AdistributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.createShadowRoot()%3B%0Athis.shadowRoot.appendChild(this.root)%3B%0Athis.root%20%3D%20this.shadowRoot%3B%0A%7D%0A%7D)%3B%0A%7D%0APolymer.Async%20%3D%20%7B%0A_currVal%3A%200%2C%0A_lastVal%3A%200%2C%0A_callbacks%3A%20%5B%5D%2C%0A_twiddleContent%3A%200%2C%0A_twiddle%3A%20document.createTextNode('')%2C%0Arun%3A%20function%20(callback%2C%20waitTime)%20%7B%0Aif%20(waitTime%20%3E%200)%20%7B%0Areturn%20~setTimeout(callback%2C%20waitTime)%3B%0A%7D%20else%20%7B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athis._callbacks.push(callback)%3B%0Areturn%20this._currVal%2B%2B%3B%0A%7D%0A%7D%2C%0Acancel%3A%20function%20(handle)%20%7B%0Aif%20(handle%20%3C%200)%20%7B%0AclearTimeout(~handle)%3B%0A%7D%20else%20%7B%0Avar%20idx%20%3D%20handle%20-%20this._lastVal%3B%0Aif%20(idx%20%3E%3D%200)%20%7B%0Aif%20(!this._callbacks%5Bidx%5D)%20%7B%0Athrow%20'invalid%20async%20handle%3A%20'%20%2B%20handle%3B%0A%7D%0Athis._callbacks%5Bidx%5D%20%3D%20null%3B%0A%7D%0A%7D%0A%7D%2C%0A_atEndOfMicrotask%3A%20function%20()%20%7B%0Avar%20len%20%3D%20this._callbacks.length%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20len%3B%20i%2B%2B)%20%7B%0Avar%20cb%20%3D%20this._callbacks%5Bi%5D%3B%0Aif%20(cb)%20%7B%0Atry%20%7B%0Acb()%3B%0A%7D%20catch%20(e)%20%7B%0Ai%2B%2B%3B%0Athis._callbacks.splice(0%2C%20i)%3B%0Athis._lastVal%20%2B%3D%20i%3B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athrow%20e%3B%0A%7D%0A%7D%0A%7D%0Athis._callbacks.splice(0%2C%20len)%3B%0Athis._lastVal%20%2B%3D%20len%3B%0A%7D%0A%7D%3B%0Anew%20window.MutationObserver(function%20()%20%7B%0APolymer.Async._atEndOfMicrotask()%3B%0A%7D).observe(Polymer.Async._twiddle%2C%20%7B%20characterData%3A%20true%20%7D)%3B%0APolymer.Debounce%20%3D%20function%20()%20%7B%0Avar%20Async%20%3D%20Polymer.Async%3B%0Avar%20Debouncer%20%3D%20function%20(context)%20%7B%0Athis.context%20%3D%20context%3B%0Avar%20self%20%3D%20this%3B%0Athis.boundComplete%20%3D%20function%20()%20%7B%0Aself.complete()%3B%0A%7D%3B%0A%7D%3B%0ADebouncer.prototype%20%3D%20%7B%0Ago%3A%20function%20(callback%2C%20wait)%20%7B%0Avar%20h%3B%0Athis.finish%20%3D%20function%20()%20%7B%0AAsync.cancel(h)%3B%0A%7D%3B%0Ah%20%3D%20Async.run(this.boundComplete%2C%20wait)%3B%0Athis.callback%20%3D%20callback%3B%0A%7D%2C%0Astop%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.finish()%3B%0Athis.finish%20%3D%20null%3B%0A%7D%0A%7D%2C%0Acomplete%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.stop()%3B%0Athis.callback.call(this.context)%3B%0A%7D%0A%7D%0A%7D%3B%0Afunction%20debounce(debouncer%2C%20callback%2C%20wait)%20%7B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%20else%20%7B%0Adebouncer%20%3D%20new%20Debouncer(this)%3B%0A%7D%0Adebouncer.go(callback%2C%20wait)%3B%0Areturn%20debouncer%3B%0A%7D%0Areturn%20debounce%3B%0A%7D()%3B%0APolymer.Base._addFeature(%7B%0A_setupDebouncers%3A%20function%20()%20%7B%0Athis._debouncers%20%3D%20%7B%7D%3B%0A%7D%2C%0Adebounce%3A%20function%20(jobName%2C%20callback%2C%20wait)%20%7B%0Areturn%20this._debouncers%5BjobName%5D%20%3D%20Polymer.Debounce.call(this%2C%20this._debouncers%5BjobName%5D%2C%20callback%2C%20wait)%3B%0A%7D%2C%0AisDebouncerActive%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Areturn%20!!(debouncer%20%26%26%20debouncer.finish)%3B%0A%7D%2C%0AflushDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.complete()%3B%0A%7D%0A%7D%2C%0AcancelDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.DomModule%20%3D%20document.createElement('dom-module')%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepTemplate()%3B%0Athis._prepShady()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._registerHost()%3B%0Aif%20(this._template)%20%7B%0Athis._poolContent()%3B%0Athis._beginHosting()%3B%0Athis._stampTemplate()%3B%0Athis._endHosting()%3B%0A%7D%0Athis._marshalHostAttributes()%3B%0Athis._setupDebouncers()%3B%0Athis._marshalBehaviors()%3B%0Athis._tryReady()%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-mini.html.js%0A:1706 in _setupRoot data:text/javascript;charset=utf-8,Polymer.Base._addFeature(%7B%0A_prepTemplate%3A%20function%20()%20%7B%0Aif%20(this._template%20%3D%3D%3D%20undefined)%20%7B%0Athis._template%20%3D%20Polymer.DomModule.import(this.is%2C%20'template')%3B%0A%7D%0Aif%20(this._template%20%26%26%20this._template.hasAttribute('is'))%20%7B%0Athis._warn(this._logf('_prepTemplate'%2C%20'top-level%20Polymer%20template%20'%20%2B%20'must%20not%20be%20a%20type-extension%2C%20found'%2C%20this._template%2C%20'Move%20inside%20simple%20%3Ctemplate%3E.'))%3B%0A%7D%0Aif%20(this._template%20%26%26%20!this._template.content%20%26%26%20window.HTMLTemplateElement%20%26%26%20HTMLTemplateElement.decorate)%20%7B%0AHTMLTemplateElement.decorate(this._template)%3B%0A%7D%0A%7D%2C%0A_stampTemplate%3A%20function%20()%20%7B%0Aif%20(this._template)%20%7B%0Athis.root%20%3D%20this.instanceTemplate(this._template)%3B%0A%7D%0A%7D%2C%0AinstanceTemplate%3A%20function%20(template)%20%7B%0Avar%20dom%20%3D%20document.importNode(template._content%20%7C%7C%20template.content%2C%20true)%3B%0Areturn%20dom%3B%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0Avar%20baseAttachedCallback%20%3D%20Polymer.Base.attachedCallback%3B%0APolymer.Base._addFeature(%7B%0A_hostStack%3A%20%5B%5D%2C%0Aready%3A%20function%20()%20%7B%0A%7D%2C%0A_registerHost%3A%20function%20(host)%20%7B%0Athis.dataHost%20%3D%20host%20%3D%20host%20%7C%7C%20Polymer.Base._hostStack%5BPolymer.Base._hostStack.length%20-%201%5D%3B%0Aif%20(host%20%26%26%20host._clients)%20%7B%0Ahost._clients.push(this)%3B%0A%7D%0Athis._clients%20%3D%20null%3B%0Athis._clientsReadied%20%3D%20false%3B%0A%7D%2C%0A_beginHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.push(this)%3B%0Aif%20(!this._clients)%20%7B%0Athis._clients%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_endHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.pop()%3B%0A%7D%2C%0A_tryReady%3A%20function%20()%20%7B%0Athis._readied%20%3D%20false%3B%0Aif%20(this._canReady())%20%7B%0Athis._ready()%3B%0A%7D%0A%7D%2C%0A_canReady%3A%20function%20()%20%7B%0Areturn%20!this.dataHost%20%7C%7C%20this.dataHost._clientsReadied%3B%0A%7D%2C%0A_ready%3A%20function%20()%20%7B%0Athis._beforeClientsReady()%3B%0Aif%20(this._template)%20%7B%0Athis._setupRoot()%3B%0Athis._readyClients()%3B%0A%7D%0Athis._clientsReadied%20%3D%20true%3B%0Athis._clients%20%3D%20null%3B%0Athis._afterClientsReady()%3B%0Athis._readySelf()%3B%0A%7D%2C%0A_readyClients%3A%20function%20()%20%7B%0Athis._beginDistribute()%3B%0Avar%20c%24%20%3D%20this._clients%3B%0Aif%20(c%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._ready()%3B%0A%7D%0A%7D%0Athis._finishDistribute()%3B%0A%7D%2C%0A_readySelf%3A%20function%20()%20%7B%0Athis._doBehavior('ready')%3B%0Athis._readied%20%3D%20true%3B%0Aif%20(this._attachedPending)%20%7B%0Athis._attachedPending%20%3D%20false%3B%0Athis.attachedCallback()%3B%0A%7D%0A%7D%2C%0A_beforeClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_afterClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeAttached%3A%20function%20()%20%7B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Aif%20(this._readied)%20%7B%0Athis._beforeAttached()%3B%0AbaseAttachedCallback.call(this)%3B%0A%7D%20else%20%7B%0Athis._attachedPending%20%3D%20true%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.ArraySplice%20%3D%20function%20()%20%7B%0Afunction%20newSplice(index%2C%20removed%2C%20addedCount)%20%7B%0Areturn%20%7B%0Aindex%3A%20index%2C%0Aremoved%3A%20removed%2C%0AaddedCount%3A%20addedCount%0A%7D%3B%0A%7D%0Avar%20EDIT_LEAVE%20%3D%200%3B%0Avar%20EDIT_UPDATE%20%3D%201%3B%0Avar%20EDIT_ADD%20%3D%202%3B%0Avar%20EDIT_DELETE%20%3D%203%3B%0Afunction%20ArraySplice()%20%7B%0A%7D%0AArraySplice.prototype%20%3D%20%7B%0AcalcEditDistances%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20rowCount%20%3D%20oldEnd%20-%20oldStart%20%2B%201%3B%0Avar%20columnCount%20%3D%20currentEnd%20-%20currentStart%20%2B%201%3B%0Avar%20distances%20%3D%20new%20Array(rowCount)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Adistances%5Bi%5D%20%3D%20new%20Array(columnCount)%3B%0Adistances%5Bi%5D%5B0%5D%20%3D%20i%3B%0A%7D%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%0Adistances%5B0%5D%5Bj%5D%20%3D%20j%3B%0Afor%20(i%20%3D%201%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%201%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%20%7B%0Aif%20(this.equals(current%5BcurrentStart%20%2B%20j%20-%201%5D%2C%20old%5BoldStart%20%2B%20i%20-%201%5D))%0Adistances%5Bi%5D%5Bj%5D%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Aelse%20%7B%0Avar%20north%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%20%2B%201%3B%0Avar%20west%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%20%2B%201%3B%0Adistances%5Bi%5D%5Bj%5D%20%3D%20north%20%3C%20west%20%3F%20north%20%3A%20west%3B%0A%7D%0A%7D%0A%7D%0Areturn%20distances%3B%0A%7D%2C%0AspliceOperationsFromEditDistances%3A%20function%20(distances)%20%7B%0Avar%20i%20%3D%20distances.length%20-%201%3B%0Avar%20j%20%3D%20distances%5B0%5D.length%20-%201%3B%0Avar%20current%20%3D%20distances%5Bi%5D%5Bj%5D%3B%0Avar%20edits%20%3D%20%5B%5D%3B%0Awhile%20(i%20%3E%200%20%7C%7C%20j%20%3E%200)%20%7B%0Aif%20(i%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acontinue%3B%0A%7D%0Aif%20(j%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acontinue%3B%0A%7D%0Avar%20northWest%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Avar%20west%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%3B%0Avar%20north%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%3B%0Avar%20min%3B%0Aif%20(west%20%3C%20north)%0Amin%20%3D%20west%20%3C%20northWest%20%3F%20west%20%3A%20northWest%3B%0Aelse%0Amin%20%3D%20north%20%3C%20northWest%20%3F%20north%20%3A%20northWest%3B%0Aif%20(min%20%3D%3D%20northWest)%20%7B%0Aif%20(northWest%20%3D%3D%20current)%20%7B%0Aedits.push(EDIT_LEAVE)%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_UPDATE)%3B%0Acurrent%20%3D%20northWest%3B%0A%7D%0Ai--%3B%0Aj--%3B%0A%7D%20else%20if%20(min%20%3D%3D%20west)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acurrent%20%3D%20west%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acurrent%20%3D%20north%3B%0A%7D%0A%7D%0Aedits.reverse()%3B%0Areturn%20edits%3B%0A%7D%2C%0AcalcSplices%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20prefixCount%20%3D%200%3B%0Avar%20suffixCount%20%3D%200%3B%0Avar%20minLength%20%3D%20Math.min(currentEnd%20-%20currentStart%2C%20oldEnd%20-%20oldStart)%3B%0Aif%20(currentStart%20%3D%3D%200%20%26%26%20oldStart%20%3D%3D%200)%0AprefixCount%20%3D%20this.sharedPrefix(current%2C%20old%2C%20minLength)%3B%0Aif%20(currentEnd%20%3D%3D%20current.length%20%26%26%20oldEnd%20%3D%3D%20old.length)%0AsuffixCount%20%3D%20this.sharedSuffix(current%2C%20old%2C%20minLength%20-%20prefixCount)%3B%0AcurrentStart%20%2B%3D%20prefixCount%3B%0AoldStart%20%2B%3D%20prefixCount%3B%0AcurrentEnd%20-%3D%20suffixCount%3B%0AoldEnd%20-%3D%20suffixCount%3B%0Aif%20(currentEnd%20-%20currentStart%20%3D%3D%200%20%26%26%20oldEnd%20-%20oldStart%20%3D%3D%200)%0Areturn%20%5B%5D%3B%0Aif%20(currentStart%20%3D%3D%20currentEnd)%20%7B%0Avar%20splice%20%3D%20newSplice(currentStart%2C%20%5B%5D%2C%200)%3B%0Awhile%20(oldStart%20%3C%20oldEnd)%0Asplice.removed.push(old%5BoldStart%2B%2B%5D)%3B%0Areturn%20%5Bsplice%5D%3B%0A%7D%20else%20if%20(oldStart%20%3D%3D%20oldEnd)%0Areturn%20%5BnewSplice(currentStart%2C%20%5B%5D%2C%20currentEnd%20-%20currentStart)%5D%3B%0Avar%20ops%20%3D%20this.spliceOperationsFromEditDistances(this.calcEditDistances(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd))%3B%0Asplice%20%3D%20undefined%3B%0Avar%20splices%20%3D%20%5B%5D%3B%0Avar%20index%20%3D%20currentStart%3B%0Avar%20oldIndex%20%3D%20oldStart%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ops.length%3B%20i%2B%2B)%20%7B%0Aswitch%20(ops%5Bi%5D)%20%7B%0Acase%20EDIT_LEAVE%3A%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0Asplice%20%3D%20undefined%3B%0A%7D%0Aindex%2B%2B%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_UPDATE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_ADD%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_DELETE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0A%7D%0A%7D%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0A%7D%0Areturn%20splices%3B%0A%7D%2C%0AsharedPrefix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20searchLength%3B%20i%2B%2B)%0Aif%20(!this.equals(current%5Bi%5D%2C%20old%5Bi%5D))%0Areturn%20i%3B%0Areturn%20searchLength%3B%0A%7D%2C%0AsharedSuffix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Avar%20index1%20%3D%20current.length%3B%0Avar%20index2%20%3D%20old.length%3B%0Avar%20count%20%3D%200%3B%0Awhile%20(count%20%3C%20searchLength%20%26%26%20this.equals(current%5B--index1%5D%2C%20old%5B--index2%5D))%0Acount%2B%2B%3B%0Areturn%20count%3B%0A%7D%2C%0AcalculateSplices%3A%20function%20(current%2C%20previous)%20%7B%0Areturn%20this.calcSplices(current%2C%200%2C%20current.length%2C%20previous%2C%200%2C%20previous.length)%3B%0A%7D%2C%0Aequals%3A%20function%20(currentValue%2C%20previousValue)%20%7B%0Areturn%20currentValue%20%3D%3D%3D%20previousValue%3B%0A%7D%0A%7D%3B%0Areturn%20new%20ArraySplice()%3B%0A%7D()%3B%0APolymer.domInnerHTML%20%3D%20function%20()%20%7B%0Avar%20escapeAttrRegExp%20%3D%20%2F%5B%26%5Cu00A0%22%5D%2Fg%3B%0Avar%20escapeDataRegExp%20%3D%20%2F%5B%26%5Cu00A0%3C%3E%5D%2Fg%3B%0Afunction%20escapeReplace(c)%20%7B%0Aswitch%20(c)%20%7B%0Acase%20'%26'%3A%0Areturn%20'%26amp%3B'%3B%0Acase%20'%3C'%3A%0Areturn%20'%26lt%3B'%3B%0Acase%20'%3E'%3A%0Areturn%20'%26gt%3B'%3B%0Acase%20'%22'%3A%0Areturn%20'%26quot%3B'%3B%0Acase%20'%5CxA0'%3A%0Areturn%20'%26nbsp%3B'%3B%0A%7D%0A%7D%0Afunction%20escapeAttr(s)%20%7B%0Areturn%20s.replace(escapeAttrRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20escapeData(s)%20%7B%0Areturn%20s.replace(escapeDataRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20makeSet(arr)%20%7B%0Avar%20set%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20arr.length%3B%20i%2B%2B)%20%7B%0Aset%5Barr%5Bi%5D%5D%20%3D%20true%3B%0A%7D%0Areturn%20set%3B%0A%7D%0Avar%20voidElements%20%3D%20makeSet(%5B%0A'area'%2C%0A'base'%2C%0A'br'%2C%0A'col'%2C%0A'command'%2C%0A'embed'%2C%0A'hr'%2C%0A'img'%2C%0A'input'%2C%0A'keygen'%2C%0A'link'%2C%0A'meta'%2C%0A'param'%2C%0A'source'%2C%0A'track'%2C%0A'wbr'%0A%5D)%3B%0Avar%20plaintextParents%20%3D%20makeSet(%5B%0A'style'%2C%0A'script'%2C%0A'xmp'%2C%0A'iframe'%2C%0A'noembed'%2C%0A'noframes'%2C%0A'plaintext'%2C%0A'noscript'%0A%5D)%3B%0Afunction%20getOuterHTML(node%2C%20parentNode%2C%20composed)%20%7B%0Aswitch%20(node.nodeType)%20%7B%0Acase%20Node.ELEMENT_NODE%3A%0Avar%20tagName%20%3D%20node.localName%3B%0Avar%20s%20%3D%20'%3C'%20%2B%20tagName%3B%0Avar%20attrs%20%3D%20node.attributes%3B%0Afor%20(var%20i%20%3D%200%2C%20attr%3B%20attr%20%3D%20attrs%5Bi%5D%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20'%20'%20%2B%20attr.name%20%2B%20'%3D%22'%20%2B%20escapeAttr(attr.value)%20%2B%20'%22'%3B%0A%7D%0As%20%2B%3D%20'%3E'%3B%0Aif%20(voidElements%5BtagName%5D)%20%7B%0Areturn%20s%3B%0A%7D%0Areturn%20s%20%2B%20getInnerHTML(node%2C%20composed)%20%2B%20'%3C%2F'%20%2B%20tagName%20%2B%20'%3E'%3B%0Acase%20Node.TEXT_NODE%3A%0Avar%20data%20%3D%20node.data%3B%0Aif%20(parentNode%20%26%26%20plaintextParents%5BparentNode.localName%5D)%20%7B%0Areturn%20data%3B%0A%7D%0Areturn%20escapeData(data)%3B%0Acase%20Node.COMMENT_NODE%3A%0Areturn%20'%3C!--'%20%2B%20node.data%20%2B%20'--%3E'%3B%0Adefault%3A%0Aconsole.error(node)%3B%0Athrow%20new%20Error('not%20implemented')%3B%0A%7D%0A%7D%0Afunction%20getInnerHTML(node%2C%20composed)%20%7B%0Aif%20(node%20instanceof%20HTMLTemplateElement)%0Anode%20%3D%20node.content%3B%0Avar%20s%20%3D%20''%3B%0Avar%20c%24%20%3D%20Polymer.dom(node).childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20child%3B%20i%20%3C%20l%20%26%26%20(child%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20getOuterHTML(child%2C%20node%2C%20composed)%3B%0A%7D%0Areturn%20s%3B%0A%7D%0Areturn%20%7B%20getInnerHTML%3A%20getInnerHTML%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20nativeInsertBefore%20%3D%20Element.prototype.insertBefore%3B%0Avar%20nativeAppendChild%20%3D%20Element.prototype.appendChild%3B%0Avar%20nativeRemoveChild%20%3D%20Element.prototype.removeChild%3B%0APolymer.TreeApi%20%3D%20%7B%0AarrayCopyChildNodes%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopyChildren%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstElementChild%3B%20n%3B%20n%20%3D%20n.nextElementSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopy%3A%20function%20(a%24)%20%7B%0Avar%20l%20%3D%20a%24.length%3B%0Avar%20copy%20%3D%20new%20Array(l)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Acopy%5Bi%5D%20%3D%20a%24%5Bi%5D%3B%0A%7D%0Areturn%20copy%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Logical%20%3D%20%7B%0AhasParentNode%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.parentNode)%3B%0A%7D%2C%0AhasChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.childNodes%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20this.hasChildNodes(node)%20%3F%20this._getChildNodes(node)%20%3A%20node.childNodes%3B%0A%7D%2C%0A_getChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!node.__dom.childNodes)%20%7B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.__dom.firstChild%3B%20n%3B%20n%20%3D%20n.__dom.nextSibling)%20%7B%0Anode.__dom.childNodes.push(n)%3B%0A%7D%0A%7D%0Areturn%20node.__dom.childNodes%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.parentNode%20!%3D%3D%20undefined%20%3F%20node.__dom.parentNode%20%3A%20node.parentNode%3B%0A%7D%2C%0AgetFirstChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20node.__dom.firstChild%20%3A%20node.firstChild%3B%0A%7D%2C%0AgetLastChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20node.__dom.lastChild%20%3A%20node.lastChild%3B%0A%7D%2C%0AgetNextSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.nextSibling%20%3A%20node.nextSibling%3B%0A%7D%2C%0AgetPreviousSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.previousSibling%20%3A%20node.previousSibling%3B%0A%7D%2C%0AgetFirstElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20this._getFirstElementChild(node)%20%3A%20node.firstElementChild%3B%0A%7D%2C%0A_getFirstElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.firstChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetLastElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20this._getLastElementChild(node)%20%3A%20node.lastElementChild%3B%0A%7D%2C%0A_getLastElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.lastChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetNextElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20this._getNextElementSibling(node)%20%3A%20node.nextElementSibling%3B%0A%7D%2C%0A_getNextElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetPreviousElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20this._getPreviousElementSibling(node)%20%3A%20node.previousElementSibling%3B%0A%7D%2C%0A_getPreviousElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.previousSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AsaveChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!this.hasChildNodes(node))%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Anode.__dom.firstChild%20%3D%20node.firstChild%3B%0Anode.__dom.lastChild%20%3D%20node.lastChild%3B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0An.__dom%20%3D%20n.__dom%20%7C%7C%20%7B%7D%3B%0An.__dom.parentNode%20%3D%20node%3B%0Anode.__dom.childNodes.push(n)%3B%0An.__dom.nextSibling%20%3D%20n.nextSibling%3B%0An.__dom.previousSibling%20%3D%20n.previousSibling%3B%0A%7D%0A%7D%0A%7D%2C%0ArecordInsertBefore%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Athis._linkNode(n%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%20else%20%7B%0Athis._linkNode(node%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%2C%0A_linkNode%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(ref_node)%20%7B%0Aref_node.__dom%20%3D%20ref_node.__dom%20%7C%7C%20%7B%7D%3B%0A%7D%0Anode.__dom.previousSibling%20%3D%20ref_node%20%3F%20ref_node.__dom.previousSibling%20%3A%20container.__dom.lastChild%3B%0Aif%20(node.__dom.previousSibling)%20%7B%0Anode.__dom.previousSibling.__dom.nextSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.nextSibling%20%3D%20ref_node%3B%0Aif%20(node.__dom.nextSibling)%20%7B%0Anode.__dom.nextSibling.__dom.previousSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20container%3B%0Aif%20(ref_node)%20%7B%0Aif%20(ref_node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%20else%20%7B%0Acontainer.__dom.lastChild%20%3D%20node%3B%0Aif%20(!container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%2C%0ArecordRemoveChild%3A%20function%20(node%2C%20container)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node.__dom.nextSibling%3B%0A%7D%0Aif%20(node%20%3D%3D%3D%20container.__dom.lastChild)%20%7B%0Acontainer.__dom.lastChild%20%3D%20node.__dom.previousSibling%3B%0A%7D%0Avar%20p%20%3D%20node.__dom.previousSibling%3B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Aif%20(p)%20%7B%0Ap.__dom.nextSibling%20%3D%20n%3B%0A%7D%0Aif%20(n)%20%7B%0An.__dom.previousSibling%20%3D%20p%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20node.__dom.previousSibling%20%3D%20node.__dom.nextSibling%20%3D%20undefined%3B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Composed%20%3D%20%7B%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Polymer.TreeApi.arrayCopyChildNodes(node)%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.parentNode%3B%0A%7D%2C%0AclearChildNodes%3A%20function%20(node)%20%7B%0Anode.textContent%20%3D%20''%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(parentNode%2C%20newChild%2C%20refChild)%20%7B%0Areturn%20nativeInsertBefore.call(parentNode%2C%20newChild%2C%20refChild%20%7C%7C%20null)%3B%0A%7D%2C%0AappendChild%3A%20function%20(parentNode%2C%20newChild)%20%7B%0Areturn%20nativeAppendChild.call(parentNode%2C%20newChild)%3B%0A%7D%2C%0AremoveChild%3A%20function%20(parentNode%2C%20node)%20%7B%0Areturn%20nativeRemoveChild.call(parentNode%2C%20node)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0APolymer.DomApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20function%20(node)%20%7B%0Athis.node%20%3D%20needsToWrap%20%3F%20DomApi.wrap(node)%20%3A%20node%3B%0A%7D%3B%0Avar%20needsToWrap%20%3D%20Settings.hasShadow%20%26%26%20!Settings.nativeShadow%3B%0ADomApi.wrap%20%3D%20window.wrap%20%3F%20window.wrap%20%3A%20function%20(node)%20%7B%0Areturn%20node%3B%0A%7D%3B%0ADomApi.prototype%20%3D%20%7B%0Aflush%3A%20function%20()%20%7B%0APolymer.dom.flush()%3B%0A%7D%2C%0AdeepContains%3A%20function%20(node)%20%7B%0Aif%20(this.node.contains(node))%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20n%20%3D%20node%3B%0Avar%20doc%20%3D%20node.ownerDocument%3B%0Awhile%20(n%20%26%26%20n%20!%3D%3D%20doc%20%26%26%20n%20!%3D%3D%20this.node)%20%7B%0An%20%3D%20Polymer.dom(n).parentNode%20%7C%7C%20n.host%3B%0A%7D%0Areturn%20n%20%3D%3D%3D%20this.node%3B%0A%7D%2C%0AqueryDistributedElements%3A%20function%20(selector)%20%7B%0Avar%20c%24%20%3D%20this.getEffectiveChildNodes()%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%20%26%26%20DomApi.matchesSelector.call(c%2C%20selector))%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AgetEffectiveChildNodes%3A%20function%20()%20%7B%0Avar%20list%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.localName%20%3D%3D%3D%20CONTENT)%20%7B%0Avar%20d%24%20%3D%20dom(c).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20d%24.length%3B%20j%2B%2B)%20%7B%0Alist.push(d%24%5Bj%5D)%3B%0A%7D%0A%7D%20else%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AobserveNodes%3A%20function%20(callback)%20%7B%0Aif%20(callback)%20%7B%0Aif%20(!this.observer)%20%7B%0Athis.observer%20%3D%20this.node.localName%20%3D%3D%3D%20CONTENT%20%3F%20new%20DomApi.DistributedNodesObserver(this)%20%3A%20new%20DomApi.EffectiveNodesObserver(this)%3B%0A%7D%0Areturn%20this.observer.addListener(callback)%3B%0A%7D%0A%7D%2C%0AunobserveNodes%3A%20function%20(handle)%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.removeListener(handle)%3B%0A%7D%0A%7D%2C%0AnotifyObserver%3A%20function%20()%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.notify()%3B%0A%7D%0A%7D%2C%0A_query%3A%20function%20(matcher%2C%20node%2C%20halter)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this.node%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0Areturn%20list%3B%0A%7D%2C%0A_queryElements%3A%20function%20(elements%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20elements.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE)%20%7B%0Aif%20(this._queryElement(c%2C%20matcher%2C%20halter%2C%20list))%20%7B%0Areturn%20true%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_queryElement%3A%20function%20(node%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Avar%20result%20%3D%20matcher(node)%3B%0Aif%20(result)%20%7B%0Alist.push(node)%3B%0A%7D%0Aif%20(halter%20%26%26%20halter(result))%20%7B%0Areturn%20result%3B%0A%7D%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0A%7D%0A%7D%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%20%3D%20'content'%3B%0Avar%20dom%20%3D%20DomApi.factory%20%3D%20function%20(node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20document%3B%0Aif%20(!node.__domApi)%20%7B%0Anode.__domApi%20%3D%20new%20DomApi.ctor(node)%3B%0A%7D%0Areturn%20node.__domApi%3B%0A%7D%3B%0ADomApi.hasApi%20%3D%20function%20(node)%20%7B%0Areturn%20Boolean(node.__domApi)%3B%0A%7D%3B%0ADomApi.ctor%20%3D%20DomApi%3B%0APolymer.dom%20%3D%20function%20(obj%2C%20patch)%20%7B%0Aif%20(obj%20instanceof%20Event)%20%7B%0Areturn%20Polymer.EventApi.factory(obj)%3B%0A%7D%20else%20%7B%0Areturn%20DomApi.factory(obj%2C%20patch)%3B%0A%7D%0A%7D%3B%0Avar%20p%20%3D%20Element.prototype%3B%0ADomApi.matchesSelector%20%3D%20p.matches%20%7C%7C%20p.matchesSelector%20%7C%7C%20p.mozMatchesSelector%20%7C%7C%20p.msMatchesSelector%20%7C%7C%20p.oMatchesSelector%20%7C%7C%20p.webkitMatchesSelector%3B%0Areturn%20DomApi%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20dom%20%3D%20DomApi.factory%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20getInnerHTML%20%3D%20Polymer.domInnerHTML.getInnerHTML%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%3B%0Aif%20(Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0Avar%20nativeCloneNode%20%3D%20Element.prototype.cloneNode%3B%0Avar%20nativeImportNode%20%3D%20Document.prototype.importNode%3B%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0A_lazyDistribute%3A%20function%20(host)%20%7B%0Aif%20(host.shadyRoot%20%26%26%20host.shadyRoot._distributionClean)%20%7B%0Ahost.shadyRoot._distributionClean%20%3D%20false%3B%0APolymer.dom.addDebouncer(host.debounce('_distribute'%2C%20host._distributeContent))%3B%0A%7D%0A%7D%2C%0AappendChild%3A%20function%20(node)%20%7B%0Areturn%20this.insertBefore(node)%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(node%2C%20ref_node)%20%7B%0Aif%20(ref_node%20%26%26%20TreeApi.Logical.getParentNode(ref_node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20ref_node%20to%20be%20inserted%20before%20is%20not%20a%20child%20'%20%2B%20'of%20this%20node')%3B%0A%7D%0Aif%20(node.nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aif%20(DomApi.hasApi(parent))%20%7B%0Adom(parent).notifyObserver()%3B%0A%7D%0Athis._removeNode(node)%3B%0A%7D%20else%20%7B%0Athis._removeOwnerShadyRoot(node)%3B%0A%7D%0A%7D%0Aif%20(!this._addNode(node%2C%20ref_node))%20%7B%0Aif%20(ref_node)%20%7B%0Aref_node%20%3D%20ref_node.localName%20%3D%3D%3D%20CONTENT%20%3F%20this._firstComposedNode(ref_node)%20%3A%20ref_node%3B%0A%7D%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Aif%20(ref_node)%20%7B%0ATreeApi.Composed.insertBefore(container%2C%20node%2C%20ref_node)%3B%0A%7D%20else%20%7B%0ATreeApi.Composed.appendChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_addNode%3A%20function%20(node%2C%20ref_node)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Avar%20ipAdded%20%3D%20this._maybeAddInsertionPoint(node%2C%20this.node)%3B%0Aif%20(!root._invalidInsertionPoints)%20%7B%0Aroot._invalidInsertionPoints%20%3D%20ipAdded%3B%0A%7D%0Athis._addNodeToHost(root.host%2C%20node)%3B%0A%7D%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0ATreeApi.Logical.recordInsertBefore(node%2C%20this.node%2C%20ref_node)%3B%0A%7D%0Avar%20handled%20%3D%20this._maybeDistribute(node)%20%7C%7C%20this.node.shadyRoot%3B%0Aif%20(handled)%20%7B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Awhile%20(node.firstChild)%20%7B%0ATreeApi.Composed.removeChild(node%2C%20node.firstChild)%3B%0A%7D%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0Areturn%20handled%3B%0A%7D%2C%0AremoveChild%3A%20function%20(node)%20%7B%0Aif%20(TreeApi.Logical.getParentNode(node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20node%20to%20be%20removed%20is%20not%20a%20child%20of%20this%20node%3A%20'%20%2B%20node)%3B%0A%7D%0Aif%20(!this._removeNode(node))%20%7B%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(container%20%3D%3D%3D%20parent)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_removeNode%3A%20function%20(node)%20%7B%0Avar%20logicalParent%20%3D%20TreeApi.Logical.hasParentNode(node)%20%26%26%20TreeApi.Logical.getParentNode(node)%3B%0Avar%20distributed%3B%0Avar%20root%20%3D%20this._ownerShadyRootForNode(node)%3B%0Aif%20(logicalParent)%20%7B%0Adistributed%20%3D%20dom(node)._maybeDistributeParent()%3B%0ATreeApi.Logical.recordRemoveChild(node%2C%20logicalParent)%3B%0Aif%20(root%20%26%26%20this._removeDistributedChildren(root%2C%20node))%20%7B%0Aroot._invalidInsertionPoints%20%3D%20true%3B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Athis._removeOwnerShadyRoot(node)%3B%0Aif%20(root)%20%7B%0Athis._removeNodeFromHost(root.host%2C%20node)%3B%0A%7D%0Areturn%20distributed%3B%0A%7D%2C%0AreplaceChild%3A%20function%20(node%2C%20ref_node)%20%7B%0Athis.insertBefore(node%2C%20ref_node)%3B%0Athis.removeChild(ref_node)%3B%0Areturn%20node%3B%0A%7D%2C%0A_hasCachedOwnerRoot%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node._ownerShadyRoot%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Areturn%20this._ownerShadyRootForNode(this.node)%3B%0A%7D%2C%0A_ownerShadyRootForNode%3A%20function%20(node)%20%7B%0Aif%20(!node)%20%7B%0Areturn%3B%0A%7D%0Avar%20root%20%3D%20node._ownerShadyRoot%3B%0Aif%20(root%20%3D%3D%3D%20undefined)%20%7B%0Aif%20(node._isShadyRoot)%20%7B%0Aroot%20%3D%20node%3B%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aroot%20%3D%20parent._isShadyRoot%20%3F%20parent%20%3A%20this._ownerShadyRootForNode(parent)%3B%0A%7D%20else%20%7B%0Aroot%20%3D%20null%3B%0A%7D%0A%7D%0Aif%20(root%20%7C%7C%20document.documentElement.contains(node))%20%7B%0Anode._ownerShadyRoot%20%3D%20root%3B%0A%7D%0A%7D%0Areturn%20root%3B%0A%7D%2C%0A_maybeDistribute%3A%20function%20(node)%20%7B%0Avar%20fragContent%20%3D%20node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent%20%26%26%20dom(node).querySelector(CONTENT)%3B%0Avar%20wrappedContent%20%3D%20fragContent%20%26%26%20TreeApi.Logical.getParentNode(fragContent).nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%3B%0Avar%20hasContent%20%3D%20fragContent%20%7C%7C%20node.localName%20%3D%3D%3D%20CONTENT%3B%0Aif%20(hasContent)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Avar%20needsDist%20%3D%20this._nodeNeedsDistribution(this.node)%3B%0Aif%20(needsDist)%20%7B%0Athis._lazyDistribute(this.node)%3B%0A%7D%0Areturn%20needsDist%20%7C%7C%20hasContent%20%26%26%20!wrappedContent%3B%0A%7D%2C%0A_maybeAddInsertionPoint%3A%20function%20(node%2C%20parent)%20%7B%0Avar%20added%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent)%20%7B%0Avar%20c%24%20%3D%20dom(node).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20np%2C%20na%3B%20i%20%3C%20c%24.length%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anp%20%3D%20TreeApi.Logical.getParentNode(n)%3B%0Aif%20(np%20%3D%3D%3D%20node)%20%7B%0Anp%20%3D%20parent%3B%0A%7D%0Ana%20%3D%20this._maybeAddInsertionPoint(n%2C%20np)%3B%0Aadded%20%3D%20added%20%7C%7C%20na%3B%0A%7D%0A%7D%20else%20if%20(node.localName%20%3D%3D%3D%20CONTENT)%20%7B%0ATreeApi.Logical.saveChildNodes(parent)%3B%0ATreeApi.Logical.saveChildNodes(node)%3B%0Aadded%20%3D%20true%3B%0A%7D%0Areturn%20added%3B%0A%7D%2C%0A_updateInsertionPoints%3A%20function%20(host)%20%7B%0Avar%20i%24%20%3D%20host.shadyRoot._insertionPoints%20%3D%20dom(host.shadyRoot).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(TreeApi.Logical.getParentNode(c))%3B%0A%7D%0A%7D%2C%0A_nodeNeedsDistribution%3A%20function%20(node)%20%7B%0Areturn%20node%20%26%26%20node.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(node.shadyRoot)%3B%0A%7D%2C%0A_addNodeToHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementAdd)%20%7B%0Ahost._elementAdd(node)%3B%0A%7D%0A%7D%2C%0A_removeNodeFromHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementRemove)%20%7B%0Ahost._elementRemove(node)%3B%0A%7D%0A%7D%2C%0A_removeDistributedChildren%3A%20function%20(root%2C%20container)%20%7B%0Avar%20hostNeedsDist%3B%0Avar%20ip%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ip%24.length%3B%20i%2B%2B)%20%7B%0Avar%20content%20%3D%20ip%24%5Bi%5D%3B%0Aif%20(this._contains(container%2C%20content))%20%7B%0Avar%20dc%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20dc%24.length%3B%20j%2B%2B)%20%7B%0AhostNeedsDist%20%3D%20true%3B%0Avar%20node%20%3D%20dc%24%5Bj%5D%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Areturn%20hostNeedsDist%3B%0A%7D%2C%0A_contains%3A%20function%20(container%2C%20node)%20%7B%0Awhile%20(node)%20%7B%0Aif%20(node%20%3D%3D%20container)%20%7B%0Areturn%20true%3B%0A%7D%0Anode%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0A%7D%0A%7D%2C%0A_removeOwnerShadyRoot%3A%20function%20(node)%20%7B%0Aif%20(this._hasCachedOwnerRoot(node))%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node)%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20n%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._removeOwnerShadyRoot(n)%3B%0A%7D%0A%7D%0Anode._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%2C%0A_firstComposedNode%3A%20function%20(content)%20%7B%0Avar%20n%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20n%24.length%2C%20n%2C%20p%24%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ap%24%20%3D%20dom(n).getDestinationInsertionPoints()%3B%0Aif%20(p%24%5Bp%24.length%20-%201%5D%20%3D%3D%3D%20content)%20%7B%0Areturn%20n%3B%0A%7D%0A%7D%0A%7D%2C%0AquerySelector%3A%20function%20(selector)%20%7B%0Avar%20result%20%3D%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node%2C%20function%20(n)%20%7B%0Areturn%20Boolean(n)%3B%0A%7D)%5B0%5D%3B%0Areturn%20result%20%7C%7C%20null%3B%0A%7D%2C%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Areturn%20this.node._destinationInsertionPoints%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Areturn%20this.node._distributedNodes%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0A_clear%3A%20function%20()%20%7B%0Awhile%20(this.childNodes.length)%20%7B%0Athis.removeChild(this.childNodes%5B0%5D)%3B%0A%7D%0A%7D%2C%0AsetAttribute%3A%20function%20(name%2C%20value)%20%7B%0Athis.node.setAttribute(name%2C%20value)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0AremoveAttribute%3A%20function%20(name)%20%7B%0Athis.node.removeAttribute(name)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0A_maybeDistributeParent%3A%20function%20()%20%7B%0Aif%20(this._nodeNeedsDistribution(this.parentNode))%20%7B%0Athis._lazyDistribute(this.parentNode)%3B%0Areturn%20true%3B%0A%7D%0A%7D%2C%0AcloneNode%3A%20function%20(deep)%20%7B%0Avar%20n%20%3D%20nativeCloneNode.call(this.node%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(c%24%5Bi%5D).cloneNode(true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Avar%20n%20%3D%20nativeImportNode.call(doc%2C%20externalNode%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(externalNode)%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(doc).importNode(c%24%5Bi%5D%2C%20true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0A_getComposedInnerHTML%3A%20function%20()%20%7B%0Areturn%20getInnerHTML(this.node%2C%20true)%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20active%20%3D%20document.activeElement%3B%0Aif%20(!active)%20%7B%0Areturn%20null%3B%0A%7D%0Avar%20isShadyRoot%20%3D%20!!this.node._isShadyRoot%3B%0Aif%20(this.node%20!%3D%3D%20document)%20%7B%0Aif%20(!isShadyRoot)%20%7B%0Areturn%20null%3B%0A%7D%0Aif%20(this.node.host%20%3D%3D%3D%20active%20%7C%7C%20!this.node.host.contains(active))%20%7B%0Areturn%20null%3B%0A%7D%0A%7D%0Avar%20activeRoot%20%3D%20dom(active).getOwnerRoot()%3B%0Awhile%20(activeRoot%20%26%26%20activeRoot%20!%3D%3D%20this.node)%20%7B%0Aactive%20%3D%20activeRoot.host%3B%0AactiveRoot%20%3D%20dom(active).getOwnerRoot()%3B%0A%7D%0Aif%20(this.node%20%3D%3D%3D%20document)%20%7B%0Areturn%20activeRoot%20%3F%20null%20%3A%20active%3B%0A%7D%20else%20%7B%0Areturn%20activeRoot%20%3D%3D%3D%20this.node%20%3F%20active%20%3A%20null%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(this.node)%3B%0Areturn%20Array.isArray(c%24)%20%3F%20c%24%20%3A%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0Areturn%20Array.prototype.filter.call(this.childNodes%2C%20function%20(n)%20%7B%0Areturn%20n.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%3B%0A%7D)%3B%0A%7D%20else%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AparentNode%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getParentNode(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%20else%20%7B%0Avar%20tc%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20cn%20%3D%20this.childNodes%2C%20c%3B%20c%20%3D%20cn%5Bi%5D%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Atc.push(c.textContent)%3B%0A%7D%0A%7D%0Areturn%20tc.join('')%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis.node.textContent%20%3D%20text%3B%0A%7D%20else%20%7B%0Athis._clear()%3B%0Aif%20(text)%20%7B%0Athis.appendChild(document.createTextNode(text))%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20null%3B%0A%7D%20else%20%7B%0Areturn%20getInnerHTML(this.node)%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20!%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis._clear()%3B%0Avar%20d%20%3D%20document.createElement('div')%3B%0Ad.innerHTML%20%3D%20text%3B%0Avar%20c%24%20%3D%20TreeApi.arrayCopyChildNodes(d)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Athis.appendChild(c%24%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0ADomApi.hasInsertionPoint%20%3D%20function%20(root)%20%7B%0Areturn%20Boolean(root%20%26%26%20root._insertionPoints.length)%3B%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Aif%20(!Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20TreeApi.arrayCopy(this.node.querySelectorAll(selector))%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Avar%20n%20%3D%20this.node%3B%0Awhile%20(n)%20%7B%0Aif%20(n.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20n.host)%20%7B%0Areturn%20n%3B%0A%7D%0An%20%3D%20n.parentNode%3B%0A%7D%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Areturn%20doc.importNode(externalNode%2C%20deep)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDestinationInsertionPoints%20%26%26%20this.node.getDestinationInsertionPoints()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDistributedNodes%20%26%26%20this.node.getDistributedNodes()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20node%20%3D%20DomApi.wrap(this.node)%3B%0Avar%20activeElement%20%3D%20node.activeElement%3B%0Areturn%20node.contains(activeElement)%20%3F%20activeElement%20%3A%20null%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.textContent%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.innerHTML%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.innerHTML%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0Avar%20forwardMethods%20%3D%20function%20(m%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20m%24.length%3B%20i%2B%2B)%20%7B%0AforwardMethod(m%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardMethod%20%3D%20function%20(method)%20%7B%0ADomApi.prototype%5Bmethod%5D%20%3D%20function%20()%20%7B%0Areturn%20this.node%5Bmethod%5D.apply(this.node%2C%20arguments)%3B%0A%7D%3B%0A%7D%3B%0AforwardMethods(%5B%0A'cloneNode'%2C%0A'appendChild'%2C%0A'insertBefore'%2C%0A'removeChild'%2C%0A'replaceChild'%2C%0A'setAttribute'%2C%0A'removeAttribute'%2C%0A'querySelector'%0A%5D)%3B%0Avar%20forwardProperties%20%3D%20function%20(f%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20f%24.length%3B%20i%2B%2B)%20%7B%0AforwardProperty(f%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardProperty%20%3D%20function%20(name)%20%7B%0AObject.defineProperty(DomApi.prototype%2C%20name%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node%5Bname%5D%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0A%7D%3B%0AforwardProperties(%5B%0A'parentNode'%2C%0A'firstChild'%2C%0A'lastChild'%2C%0A'nextSibling'%2C%0A'previousSibling'%2C%0A'firstElementChild'%2C%0A'lastElementChild'%2C%0A'nextElementSibling'%2C%0A'previousElementSibling'%0A%5D)%3B%0A%7D())%3B%0APolymer.Base.extend(Polymer.dom%2C%20%7B%0A_flushGuard%3A%200%2C%0A_FLUSH_MAX%3A%20100%2C%0A_needsTakeRecords%3A%20!Polymer.Settings.useNativeCustomElements%2C%0A_debouncers%3A%20%5B%5D%2C%0A_staticFlushList%3A%20%5B%5D%2C%0A_finishDebouncer%3A%20null%2C%0Aflush%3A%20function%20()%20%7B%0Athis._flushGuard%20%3D%200%3B%0Athis._prepareFlush()%3B%0Awhile%20(this._debouncers.length%20%26%26%20this._flushGuard%20%3C%20this._FLUSH_MAX)%20%7B%0Awhile%20(this._debouncers.length)%20%7B%0Athis._debouncers.shift().complete()%3B%0A%7D%0Aif%20(this._finishDebouncer)%20%7B%0Athis._finishDebouncer.complete()%3B%0A%7D%0Athis._prepareFlush()%3B%0Athis._flushGuard%2B%2B%3B%0A%7D%0Aif%20(this._flushGuard%20%3E%3D%20this._FLUSH_MAX)%20%7B%0Aconsole.warn('Polymer.dom.flush%20aborted.%20Flush%20may%20not%20be%20complete.')%3B%0A%7D%0A%7D%2C%0A_prepareFlush%3A%20function%20()%20%7B%0Aif%20(this._needsTakeRecords)%20%7B%0ACustomElements.takeRecords()%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._staticFlushList.length%3B%20i%2B%2B)%20%7B%0Athis._staticFlushList%5Bi%5D()%3B%0A%7D%0A%7D%2C%0AaddStaticFlush%3A%20function%20(fn)%20%7B%0Athis._staticFlushList.push(fn)%3B%0A%7D%2C%0AremoveStaticFlush%3A%20function%20(fn)%20%7B%0Avar%20i%20%3D%20this._staticFlushList.indexOf(fn)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._staticFlushList.splice(i%2C%201)%3B%0A%7D%0A%7D%2C%0AaddDebouncer%3A%20function%20(debouncer)%20%7B%0Athis._debouncers.push(debouncer)%3B%0Athis._finishDebouncer%20%3D%20Polymer.Debounce(this._finishDebouncer%2C%20this._finishFlush)%3B%0A%7D%2C%0A_finishFlush%3A%20function%20()%20%7B%0APolymer.dom._debouncers%20%3D%20%5B%5D%3B%0A%7D%0A%7D)%3B%0APolymer.EventApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.Event%20%3D%20function%20(event)%20%7B%0Athis.event%20%3D%20event%3B%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.path%5B0%5D%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20path()%20%7B%0Areturn%20this.event.path%3B%0A%7D%0A%7D%3B%0A%7D%20else%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Avar%20current%20%3D%20this.event.currentTarget%3B%0Avar%20currentRoot%20%3D%20current%20%26%26%20Polymer.dom(current).getOwnerRoot()%3B%0Avar%20p%24%20%3D%20this.path%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20p%24.length%3B%20i%2B%2B)%20%7B%0Aif%20(Polymer.dom(p%24%5Bi%5D).getOwnerRoot()%20%3D%3D%3D%20currentRoot)%20%7B%0Areturn%20p%24%5Bi%5D%3B%0A%7D%0A%7D%0A%7D%2C%0Aget%20path()%20%7B%0Aif%20(!this.event._path)%20%7B%0Avar%20path%20%3D%20%5B%5D%3B%0Avar%20current%20%3D%20this.rootTarget%3B%0Awhile%20(current)%20%7B%0Apath.push(current)%3B%0Avar%20insertionPoints%20%3D%20Polymer.dom(current).getDestinationInsertionPoints()%3B%0Aif%20(insertionPoints.length)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20insertionPoints.length%20-%201%3B%20i%2B%2B)%20%7B%0Apath.push(insertionPoints%5Bi%5D)%3B%0A%7D%0Acurrent%20%3D%20insertionPoints%5BinsertionPoints.length%20-%201%5D%3B%0A%7D%20else%20%7B%0Acurrent%20%3D%20Polymer.dom(current).parentNode%20%7C%7C%20current.host%3B%0A%7D%0A%7D%0Apath.push(window)%3B%0Athis.event._path%20%3D%20path%3B%0A%7D%0Areturn%20this.event._path%3B%0A%7D%0A%7D%3B%0A%7D%0Avar%20factory%20%3D%20function%20(event)%20%7B%0Aif%20(!event.__eventApi)%20%7B%0Aevent.__eventApi%20%3D%20new%20DomApi.Event(event)%3B%0A%7D%0Areturn%20event.__eventApi%3B%0A%7D%3B%0Areturn%20%7B%20factory%3A%20factory%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20useShadow%20%3D%20Polymer.Settings.useShadow%3B%0AObject.defineProperty(DomApi.prototype%2C%20'classList'%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(!this._classList)%20%7B%0Athis._classList%20%3D%20new%20DomApi.ClassList(this)%3B%0A%7D%0Areturn%20this._classList%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0ADomApi.ClassList%20%3D%20function%20(host)%20%7B%0Athis.domApi%20%3D%20host%3B%0Athis.node%20%3D%20host.node%3B%0A%7D%3B%0ADomApi.ClassList.prototype%20%3D%20%7B%0Aadd%3A%20function%20()%20%7B%0Athis.node.classList.add.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Aremove%3A%20function%20()%20%7B%0Athis.node.classList.remove.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Atoggle%3A%20function%20()%20%7B%0Athis.node.classList.toggle.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0A_distributeParent%3A%20function%20()%20%7B%0Aif%20(!useShadow)%20%7B%0Athis.domApi._maybeDistributeParent()%3B%0A%7D%0A%7D%2C%0Acontains%3A%20function%20()%20%7B%0Areturn%20this.node.classList.contains.apply(this.node.classList%2C%20arguments)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.EffectiveNodesObserver%20%3D%20function%20(domApi)%20%7B%0Athis.domApi%20%3D%20domApi%3B%0Athis.node%20%3D%20this.domApi.node%3B%0Athis._listeners%20%3D%20%5B%5D%3B%0A%7D%3B%0ADomApi.EffectiveNodesObserver.prototype%20%3D%20%7B%0AaddListener%3A%20function%20(callback)%20%7B%0Aif%20(!this._isSetup)%20%7B%0Athis._setup()%3B%0Athis._isSetup%20%3D%20true%3B%0A%7D%0Avar%20listener%20%3D%20%7B%0Afn%3A%20callback%2C%0A_nodes%3A%20%5B%5D%0A%7D%3B%0Athis._listeners.push(listener)%3B%0Athis._scheduleNotify()%3B%0Areturn%20listener%3B%0A%7D%2C%0AremoveListener%3A%20function%20(handle)%20%7B%0Avar%20i%20%3D%20this._listeners.indexOf(handle)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._listeners.splice(i%2C%201)%3B%0Ahandle._nodes%20%3D%20%5B%5D%3B%0A%7D%0Aif%20(!this._hasListeners())%20%7B%0Athis._cleanup()%3B%0Athis._isSetup%20%3D%20false%3B%0A%7D%0A%7D%2C%0A_setup%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._unobserveContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_hasListeners%3A%20function%20()%20%7B%0Areturn%20Boolean(this._listeners.length)%3B%0A%7D%2C%0A_scheduleNotify%3A%20function%20()%20%7B%0Aif%20(this._debouncer)%20%7B%0Athis._debouncer.stop()%3B%0A%7D%0Athis._debouncer%20%3D%20Polymer.Debounce(this._debouncer%2C%20this._notify)%3B%0Athis._debouncer.context%20%3D%20this%3B%0APolymer.dom.addDebouncer(this._debouncer)%3B%0A%7D%2C%0Anotify%3A%20function%20()%20%7B%0Aif%20(this._hasListeners())%20%7B%0Athis._scheduleNotify()%3B%0A%7D%0A%7D%2C%0A_notify%3A%20function%20()%20%7B%0Athis._beforeCallListeners()%3B%0Athis._callListeners()%3B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0Athis._updateContentElements()%3B%0A%7D%2C%0A_updateContentElements%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_observeContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0An.__observeNodesMap%20%3D%20n.__observeNodesMap%20%7C%7C%20new%20WeakMap()%3B%0Aif%20(!n.__observeNodesMap.has(this))%20%7B%0An.__observeNodesMap.set(this%2C%20this._observeContent(n))%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_observeContent%3A%20function%20(content)%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20h%20%3D%20Polymer.dom(content).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Ah._avoidChangeCalculation%20%3D%20true%3B%0Areturn%20h%3B%0A%7D%2C%0A_unobserveContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20h%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0Ah%20%3D%20n.__observeNodesMap.get(this)%3B%0Aif%20(h)%20%7B%0APolymer.dom(n).unobserveNodes(h)%3B%0An.__observeNodesMap.delete(this)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_isContent%3A%20function%20(node)%20%7B%0Areturn%20node.localName%20%3D%3D%3D%20'content'%3B%0A%7D%2C%0A_callListeners%3A%20function%20()%20%7B%0Avar%20o%24%20%3D%20this._listeners%3B%0Avar%20nodes%20%3D%20this._getEffectiveNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20o%24.length%20%26%26%20(o%20%3D%20o%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20info%20%3D%20this._generateListenerInfo(o%2C%20nodes)%3B%0Aif%20(info%20%7C%7C%20o._alwaysNotify)%20%7B%0Athis._callListener(o%2C%20info)%3B%0A%7D%0A%7D%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getEffectiveChildNodes()%3B%0A%7D%2C%0A_generateListenerInfo%3A%20function%20(listener%2C%20newNodes)%20%7B%0Aif%20(listener._avoidChangeCalculation)%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20oldNodes%20%3D%20listener._nodes%3B%0Avar%20info%20%3D%20%7B%0Atarget%3A%20this.node%2C%0AaddedNodes%3A%20%5B%5D%2C%0AremovedNodes%3A%20%5B%5D%0A%7D%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(newNodes%2C%20oldNodes)%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Ainfo.removedNodes.push(n)%3B%0A%7D%0A%7D%0Afor%20(i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%20s.index%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0Ainfo.addedNodes.push(newNodes%5Bj%5D)%3B%0A%7D%0A%7D%0Alistener._nodes%20%3D%20newNodes%3B%0Aif%20(info.addedNodes.length%20%7C%7C%20info.removedNodes.length)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%2C%0A_callListener%3A%20function%20(listener%2C%20info)%20%7B%0Areturn%20listener.fn.call(this.node%2C%20info)%3B%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0A%7D%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0Avar%20baseSetup%20%3D%20DomApi.EffectiveNodesObserver.prototype._setup%3B%0Avar%20baseCleanup%20%3D%20DomApi.EffectiveNodesObserver.prototype._cleanup%3B%0APolymer.Base.extend(DomApi.EffectiveNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._mutationHandler%20%3D%20function%20(mxns)%20%7B%0Aif%20(mxns%20%26%26%20mxns.length)%20%7B%0Aself._scheduleNotify()%3B%0A%7D%0A%7D%3B%0Athis._observer%20%3D%20new%20MutationObserver(this._mutationHandler)%3B%0Athis._boundFlush%20%3D%20function%20()%20%7B%0Aself._flush()%3B%0A%7D%3B%0APolymer.dom.addStaticFlush(this._boundFlush)%3B%0Athis._observer.observe(this.node%2C%20%7B%20childList%3A%20true%20%7D)%3B%0A%7D%0AbaseSetup.call(this)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._observer.disconnect()%3B%0Athis._observer%20%3D%20null%3B%0Athis._mutationHandler%20%3D%20null%3B%0APolymer.dom.removeStaticFlush(this._boundFlush)%3B%0AbaseCleanup.call(this)%3B%0A%7D%2C%0A_flush%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._mutationHandler(this._observer.takeRecords())%3B%0A%7D%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._makeContentListenersAlwaysNotify()%3B%0Athis._observer.disconnect()%3B%0Athis._observer.observe(this.node%2C%20%7B%0AchildList%3A%20true%2C%0Aattributes%3A%20true%2C%0Asubtree%3A%20true%0A%7D)%3B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host%20%26%26%20Polymer.dom(host).observer)%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%2C%0A_makeContentListenersAlwaysNotify%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20this._listeners.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20this._listeners%5Bi%5D%3B%0Ah._alwaysNotify%20%3D%20h._isContentListener%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.DistributedNodesObserver%20%3D%20function%20(domApi)%20%7B%0ADomApi.EffectiveNodesObserver.call(this%2C%20domApi)%3B%0A%7D%3B%0ADomApi.DistributedNodesObserver.prototype%20%3D%20Object.create(DomApi.EffectiveNodesObserver.prototype)%3B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getDistributedNodes()%3B%0A%7D%0A%7D)%3B%0Aif%20(Settings.useShadow)%20%7B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._observer%20%3D%20Polymer.dom(host).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Athis._observer._isContentListener%20%3D%20true%3B%0Aif%20(this._hasAttrSelect())%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_hasAttrSelect%3A%20function%20()%20%7B%0Avar%20select%20%3D%20this.node.getAttribute('select')%3B%0Areturn%20select%20%26%26%20select.match(%2F%5B%5B.%5D%2B%2F)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0APolymer.dom(host).unobserveNodes(this._observer)%3B%0A%7D%0Athis._observer%20%3D%20null%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0APolymer.Base._addFeature(%7B%0A_prepShady%3A%20function%20()%20%7B%0Athis._useContent%20%3D%20this._useContent%20%7C%7C%20Boolean(this._template)%3B%0A%7D%2C%0A_setupShady%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20null%3B%0Aif%20(!this.__domApi)%20%7B%0Athis.__domApi%20%3D%20null%3B%0A%7D%0Aif%20(!this.__dom)%20%7B%0Athis.__dom%20%3D%20null%3B%0A%7D%0Aif%20(!this._ownerShadyRoot)%20%7B%0Athis._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%0A%7D%2C%0A_poolContent%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0ATreeApi.Logical.saveChildNodes(this)%3B%0A%7D%0A%7D%2C%0A_setupRoot%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis._createLocalRoot()%3B%0Aif%20(!this.dataHost)%20%7B%0AupgradeLogicalChildren(TreeApi.Logical.getChildNodes(this))%3B%0A%7D%0A%7D%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20this.root%3B%0Athis.shadyRoot._distributionClean%20%3D%20false%3B%0Athis.shadyRoot._hasDistributed%20%3D%20false%3B%0Athis.shadyRoot._isShadyRoot%20%3D%20true%3B%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0Avar%20i%24%20%3D%20this.shadyRoot._insertionPoints%20%3D%20!this._notes%20%7C%7C%20this._notes._hasContent%20%3F%20this.shadyRoot.querySelectorAll('content')%20%3A%20%5B%5D%3B%0ATreeApi.Logical.saveChildNodes(this.shadyRoot)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(c.parentNode)%3B%0A%7D%0Athis.shadyRoot.host%20%3D%20this%3B%0A%7D%2C%0Aget%20domHost()%20%7B%0Avar%20root%20%3D%20Polymer.dom(this).getOwnerRoot()%3B%0Areturn%20root%20%26%26%20root.host%3B%0A%7D%2C%0AdistributeContent%3A%20function%20(updateInsertionPoints)%20%7B%0Aif%20(this.shadyRoot)%20%7B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20this.shadyRoot._invalidInsertionPoints%20%7C%7C%20updateInsertionPoints%3B%0Avar%20host%20%3D%20getTopDistributingHost(this)%3B%0APolymer.dom(this)._lazyDistribute(host)%3B%0A%7D%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20!this.shadyRoot._distributionClean)%20%7B%0Aif%20(this.shadyRoot._invalidInsertionPoints)%20%7B%0APolymer.dom(this)._updateInsertionPoints(this)%3B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20false%3B%0A%7D%0Athis._beginDistribute()%3B%0Athis._distributeDirtyRoots()%3B%0Athis._finishDistribute()%3B%0A%7D%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._resetDistribution()%3B%0Athis._distributePool(this.shadyRoot%2C%20this._collectPool())%3B%0A%7D%0A%7D%2C%0A_distributeDirtyRoots%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.shadyRoot._dirtyRoots%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._distributeContent()%3B%0A%7D%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis.shadyRoot._distributionClean%20%3D%20true%3B%0Aif%20(DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._composeTree()%3B%0AnotifyContentObservers(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0ATreeApi.Composed.clearChildNodes(this)%3B%0Athis.appendChild(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Avar%20children%20%3D%20this._composeNode(this)%3B%0Athis._updateChildNodes(this%2C%20children)%3B%0A%7D%0A%7D%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0AnotifyInitialDistribution(this)%3B%0A%7D%0Athis.shadyRoot._hasDistributed%20%3D%20true%3B%0A%7D%0A%7D%2C%0AelementMatches%3A%20function%20(selector%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Areturn%20DomApi.matchesSelector.call(node%2C%20selector)%3B%0A%7D%2C%0A_resetDistribution%3A%20function%20()%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(child._destinationInsertionPoints)%20%7B%0Achild._destinationInsertionPoints%20%3D%20undefined%3B%0A%7D%0Aif%20(isInsertionPoint(child))%20%7B%0AclearDistributedDestinationInsertionPoints(child)%3B%0A%7D%0A%7D%0Avar%20root%20%3D%20this.shadyRoot%3B%0Avar%20p%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20p%24.length%3B%20j%2B%2B)%20%7B%0Ap%24%5Bj%5D._distributedNodes%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_collectPool%3A%20function%20()%20%7B%0Avar%20pool%20%3D%20%5B%5D%3B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Apool.push.apply(pool%2C%20child._distributedNodes)%3B%0A%7D%20else%20%7B%0Apool.push(child)%3B%0A%7D%0A%7D%0Areturn%20pool%3B%0A%7D%2C%0A_distributePool%3A%20function%20(node%2C%20pool)%20%7B%0Avar%20p%24%20%3D%20node._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._distributeInsertionPoint(p%2C%20pool)%3B%0AmaybeRedistributeParent(p%2C%20this)%3B%0A%7D%0A%7D%2C%0A_distributeInsertionPoint%3A%20function%20(content%2C%20pool)%20%7B%0Avar%20anyDistributed%20%3D%20false%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20pool.length%2C%20node%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Anode%20%3D%20pool%5Bi%5D%3B%0Aif%20(!node)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(this._matchesContentSelect(node%2C%20content))%20%7B%0AdistributeNodeInto(node%2C%20content)%3B%0Apool%5Bi%5D%20%3D%20undefined%3B%0AanyDistributed%20%3D%20true%3B%0A%7D%0A%7D%0Aif%20(!anyDistributed)%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(content)%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20children.length%3B%20j%2B%2B)%20%7B%0AdistributeNodeInto(children%5Bj%5D%2C%20content)%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeTree%3A%20function%20()%20%7B%0Athis._updateChildNodes(this%2C%20this._composeNode(this))%3B%0Avar%20p%24%20%3D%20this.shadyRoot._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%2C%20parent%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparent%20%3D%20TreeApi.Logical.getParentNode(p)%3B%0Aif%20(!parent._useContent%20%26%26%20parent%20!%3D%3D%20this%20%26%26%20parent%20!%3D%3D%20this.shadyRoot)%20%7B%0Athis._updateChildNodes(parent%2C%20this._composeNode(parent))%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeNode%3A%20function%20(node)%20%7B%0Avar%20children%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node.shadyRoot%20%7C%7C%20node)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20c%24%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Avar%20distributedNodes%20%3D%20child._distributedNodes%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20distributedNodes.length%3B%20j%2B%2B)%20%7B%0Avar%20distributedNode%20%3D%20distributedNodes%5Bj%5D%3B%0Aif%20(isFinalDestination(child%2C%20distributedNode))%20%7B%0Achildren.push(distributedNode)%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Achildren.push(child)%3B%0A%7D%0A%7D%0Areturn%20children%3B%0A%7D%2C%0A_updateChildNodes%3A%20function%20(container%2C%20children)%20%7B%0Avar%20composed%20%3D%20TreeApi.Composed.getChildNodes(container)%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(children%2C%20composed)%3B%0Afor%20(var%20i%20%3D%200%2C%20d%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Aif%20(TreeApi.Composed.getParentNode(n)%20%3D%3D%3D%20container)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20n)%3B%0A%7D%0Acomposed.splice(s.index%20%2B%20d%2C%201)%3B%0A%7D%0Ad%20-%3D%20s.addedCount%3B%0A%7D%0Afor%20(var%20i%20%3D%200%2C%20s%2C%20next%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anext%20%3D%20composed%5Bs.index%5D%3B%0Afor%20(j%20%3D%20s.index%2C%20n%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0An%20%3D%20children%5Bj%5D%3B%0ATreeApi.Composed.insertBefore(container%2C%20n%2C%20next)%3B%0Acomposed.splice(j%2C%200%2C%20n)%3B%0A%7D%0A%7D%0A%7D%2C%0A_matchesContentSelect%3A%20function%20(node%2C%20contentElement)%20%7B%0Avar%20select%20%3D%20contentElement.getAttribute('select')%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aselect%20%3D%20select.trim()%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aif%20(!(node%20instanceof%20Element))%20%7B%0Areturn%20false%3B%0A%7D%0Avar%20validSelectors%20%3D%20%2F%5E(%3Anot%5C()%3F%5B*.%23%5Ba-zA-Z_%7C%5D%2F%3B%0Aif%20(!validSelectors.test(select))%20%7B%0Areturn%20false%3B%0A%7D%0Areturn%20this.elementMatches(select%2C%20node)%3B%0A%7D%2C%0A_elementAdd%3A%20function%20()%20%7B%0A%7D%2C%0A_elementRemove%3A%20function%20()%20%7B%0A%7D%0A%7D)%3B%0Afunction%20distributeNodeInto(child%2C%20insertionPoint)%20%7B%0AinsertionPoint._distributedNodes.push(child)%3B%0Avar%20points%20%3D%20child._destinationInsertionPoints%3B%0Aif%20(!points)%20%7B%0Achild._destinationInsertionPoints%20%3D%20%5BinsertionPoint%5D%3B%0A%7D%20else%20%7B%0Apoints.push(insertionPoint)%3B%0A%7D%0A%7D%0Afunction%20clearDistributedDestinationInsertionPoints(content)%20%7B%0Avar%20e%24%20%3D%20content._distributedNodes%3B%0Aif%20(e%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20e%24.length%3B%20i%2B%2B)%20%7B%0Avar%20d%20%3D%20e%24%5Bi%5D._destinationInsertionPoints%3B%0Aif%20(d)%20%7B%0Ad.splice(d.indexOf(content)%20%2B%201%2C%20d.length)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Afunction%20maybeRedistributeParent(content%2C%20host)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(content)%3B%0Aif%20(parent%20%26%26%20parent.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(parent.shadyRoot)%20%26%26%20parent.shadyRoot._distributionClean)%20%7B%0Aparent.shadyRoot._distributionClean%20%3D%20false%3B%0Ahost.shadyRoot._dirtyRoots.push(parent)%3B%0A%7D%0A%7D%0Afunction%20isFinalDestination(insertionPoint%2C%20node)%20%7B%0Avar%20points%20%3D%20node._destinationInsertionPoints%3B%0Areturn%20points%20%26%26%20points%5Bpoints.length%20-%201%5D%20%3D%3D%3D%20insertionPoint%3B%0A%7D%0Afunction%20isInsertionPoint(node)%20%7B%0Areturn%20node.localName%20%3D%3D%20'content'%3B%0A%7D%0Afunction%20getTopDistributingHost(host)%20%7B%0Awhile%20(host%20%26%26%20hostNeedsRedistribution(host))%20%7B%0Ahost%20%3D%20host.domHost%3B%0A%7D%0Areturn%20host%3B%0A%7D%0Afunction%20hostNeedsRedistribution(host)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(host)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20c%24%5Bi%5D%3B%0Aif%20(c.localName%20%26%26%20c.localName%20%3D%3D%3D%20'content')%20%7B%0Areturn%20host.domHost%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyContentObservers(root)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20root._insertionPoints.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20root._insertionPoints%5Bi%5D%3B%0Aif%20(DomApi.hasApi(c))%20%7B%0APolymer.dom(c).notifyObserver()%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyInitialDistribution(host)%20%7B%0Aif%20(DomApi.hasApi(host))%20%7B%0APolymer.dom(host).notifyObserver()%3B%0A%7D%0A%7D%0Avar%20needsUpgrade%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Afunction%20upgradeLogicalChildren(children)%20%7B%0Aif%20(needsUpgrade%20%26%26%20children)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0ACustomElements.upgrade(children%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0Aif%20(Polymer.Settings.useShadow)%20%7B%0APolymer.Base._addFeature(%7B%0A_poolContent%3A%20function%20()%20%7B%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0A%7D%2C%0AdistributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.createShadowRoot()%3B%0Athis.shadowRoot.appendChild(this.root)%3B%0Athis.root%20%3D%20this.shadowRoot%3B%0A%7D%0A%7D)%3B%0A%7D%0APolymer.Async%20%3D%20%7B%0A_currVal%3A%200%2C%0A_lastVal%3A%200%2C%0A_callbacks%3A%20%5B%5D%2C%0A_twiddleContent%3A%200%2C%0A_twiddle%3A%20document.createTextNode('')%2C%0Arun%3A%20function%20(callback%2C%20waitTime)%20%7B%0Aif%20(waitTime%20%3E%200)%20%7B%0Areturn%20~setTimeout(callback%2C%20waitTime)%3B%0A%7D%20else%20%7B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athis._callbacks.push(callback)%3B%0Areturn%20this._currVal%2B%2B%3B%0A%7D%0A%7D%2C%0Acancel%3A%20function%20(handle)%20%7B%0Aif%20(handle%20%3C%200)%20%7B%0AclearTimeout(~handle)%3B%0A%7D%20else%20%7B%0Avar%20idx%20%3D%20handle%20-%20this._lastVal%3B%0Aif%20(idx%20%3E%3D%200)%20%7B%0Aif%20(!this._callbacks%5Bidx%5D)%20%7B%0Athrow%20'invalid%20async%20handle%3A%20'%20%2B%20handle%3B%0A%7D%0Athis._callbacks%5Bidx%5D%20%3D%20null%3B%0A%7D%0A%7D%0A%7D%2C%0A_atEndOfMicrotask%3A%20function%20()%20%7B%0Avar%20len%20%3D%20this._callbacks.length%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20len%3B%20i%2B%2B)%20%7B%0Avar%20cb%20%3D%20this._callbacks%5Bi%5D%3B%0Aif%20(cb)%20%7B%0Atry%20%7B%0Acb()%3B%0A%7D%20catch%20(e)%20%7B%0Ai%2B%2B%3B%0Athis._callbacks.splice(0%2C%20i)%3B%0Athis._lastVal%20%2B%3D%20i%3B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athrow%20e%3B%0A%7D%0A%7D%0A%7D%0Athis._callbacks.splice(0%2C%20len)%3B%0Athis._lastVal%20%2B%3D%20len%3B%0A%7D%0A%7D%3B%0Anew%20window.MutationObserver(function%20()%20%7B%0APolymer.Async._atEndOfMicrotask()%3B%0A%7D).observe(Polymer.Async._twiddle%2C%20%7B%20characterData%3A%20true%20%7D)%3B%0APolymer.Debounce%20%3D%20function%20()%20%7B%0Avar%20Async%20%3D%20Polymer.Async%3B%0Avar%20Debouncer%20%3D%20function%20(context)%20%7B%0Athis.context%20%3D%20context%3B%0Avar%20self%20%3D%20this%3B%0Athis.boundComplete%20%3D%20function%20()%20%7B%0Aself.complete()%3B%0A%7D%3B%0A%7D%3B%0ADebouncer.prototype%20%3D%20%7B%0Ago%3A%20function%20(callback%2C%20wait)%20%7B%0Avar%20h%3B%0Athis.finish%20%3D%20function%20()%20%7B%0AAsync.cancel(h)%3B%0A%7D%3B%0Ah%20%3D%20Async.run(this.boundComplete%2C%20wait)%3B%0Athis.callback%20%3D%20callback%3B%0A%7D%2C%0Astop%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.finish()%3B%0Athis.finish%20%3D%20null%3B%0A%7D%0A%7D%2C%0Acomplete%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.stop()%3B%0Athis.callback.call(this.context)%3B%0A%7D%0A%7D%0A%7D%3B%0Afunction%20debounce(debouncer%2C%20callback%2C%20wait)%20%7B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%20else%20%7B%0Adebouncer%20%3D%20new%20Debouncer(this)%3B%0A%7D%0Adebouncer.go(callback%2C%20wait)%3B%0Areturn%20debouncer%3B%0A%7D%0Areturn%20debounce%3B%0A%7D()%3B%0APolymer.Base._addFeature(%7B%0A_setupDebouncers%3A%20function%20()%20%7B%0Athis._debouncers%20%3D%20%7B%7D%3B%0A%7D%2C%0Adebounce%3A%20function%20(jobName%2C%20callback%2C%20wait)%20%7B%0Areturn%20this._debouncers%5BjobName%5D%20%3D%20Polymer.Debounce.call(this%2C%20this._debouncers%5BjobName%5D%2C%20callback%2C%20wait)%3B%0A%7D%2C%0AisDebouncerActive%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Areturn%20!!(debouncer%20%26%26%20debouncer.finish)%3B%0A%7D%2C%0AflushDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.complete()%3B%0A%7D%0A%7D%2C%0AcancelDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.DomModule%20%3D%20document.createElement('dom-module')%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepTemplate()%3B%0Athis._prepShady()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._registerHost()%3B%0Aif%20(this._template)%20%7B%0Athis._poolContent()%3B%0Athis._beginHosting()%3B%0Athis._stampTemplate()%3B%0Athis._endHosting()%3B%0A%7D%0Athis._marshalHostAttributes()%3B%0Athis._setupDebouncers()%3B%0Athis._marshalBehaviors()%3B%0Athis._tryReady()%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-mini.html.js%0A:58 in _ready data:text/javascript;charset=utf-8,Polymer.Base._addFeature(%7B%0A_prepTemplate%3A%20function%20()%20%7B%0Aif%20(this._template%20%3D%3D%3D%20undefined)%20%7B%0Athis._template%20%3D%20Polymer.DomModule.import(this.is%2C%20'template')%3B%0A%7D%0Aif%20(this._template%20%26%26%20this._template.hasAttribute('is'))%20%7B%0Athis._warn(this._logf('_prepTemplate'%2C%20'top-level%20Polymer%20template%20'%20%2B%20'must%20not%20be%20a%20type-extension%2C%20found'%2C%20this._template%2C%20'Move%20inside%20simple%20%3Ctemplate%3E.'))%3B%0A%7D%0Aif%20(this._template%20%26%26%20!this._template.content%20%26%26%20window.HTMLTemplateElement%20%26%26%20HTMLTemplateElement.decorate)%20%7B%0AHTMLTemplateElement.decorate(this._template)%3B%0A%7D%0A%7D%2C%0A_stampTemplate%3A%20function%20()%20%7B%0Aif%20(this._template)%20%7B%0Athis.root%20%3D%20this.instanceTemplate(this._template)%3B%0A%7D%0A%7D%2C%0AinstanceTemplate%3A%20function%20(template)%20%7B%0Avar%20dom%20%3D%20document.importNode(template._content%20%7C%7C%20template.content%2C%20true)%3B%0Areturn%20dom%3B%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0Avar%20baseAttachedCallback%20%3D%20Polymer.Base.attachedCallback%3B%0APolymer.Base._addFeature(%7B%0A_hostStack%3A%20%5B%5D%2C%0Aready%3A%20function%20()%20%7B%0A%7D%2C%0A_registerHost%3A%20function%20(host)%20%7B%0Athis.dataHost%20%3D%20host%20%3D%20host%20%7C%7C%20Polymer.Base._hostStack%5BPolymer.Base._hostStack.length%20-%201%5D%3B%0Aif%20(host%20%26%26%20host._clients)%20%7B%0Ahost._clients.push(this)%3B%0A%7D%0Athis._clients%20%3D%20null%3B%0Athis._clientsReadied%20%3D%20false%3B%0A%7D%2C%0A_beginHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.push(this)%3B%0Aif%20(!this._clients)%20%7B%0Athis._clients%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_endHosting%3A%20function%20()%20%7B%0APolymer.Base._hostStack.pop()%3B%0A%7D%2C%0A_tryReady%3A%20function%20()%20%7B%0Athis._readied%20%3D%20false%3B%0Aif%20(this._canReady())%20%7B%0Athis._ready()%3B%0A%7D%0A%7D%2C%0A_canReady%3A%20function%20()%20%7B%0Areturn%20!this.dataHost%20%7C%7C%20this.dataHost._clientsReadied%3B%0A%7D%2C%0A_ready%3A%20function%20()%20%7B%0Athis._beforeClientsReady()%3B%0Aif%20(this._template)%20%7B%0Athis._setupRoot()%3B%0Athis._readyClients()%3B%0A%7D%0Athis._clientsReadied%20%3D%20true%3B%0Athis._clients%20%3D%20null%3B%0Athis._afterClientsReady()%3B%0Athis._readySelf()%3B%0A%7D%2C%0A_readyClients%3A%20function%20()%20%7B%0Athis._beginDistribute()%3B%0Avar%20c%24%20%3D%20this._clients%3B%0Aif%20(c%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._ready()%3B%0A%7D%0A%7D%0Athis._finishDistribute()%3B%0A%7D%2C%0A_readySelf%3A%20function%20()%20%7B%0Athis._doBehavior('ready')%3B%0Athis._readied%20%3D%20true%3B%0Aif%20(this._attachedPending)%20%7B%0Athis._attachedPending%20%3D%20false%3B%0Athis.attachedCallback()%3B%0A%7D%0A%7D%2C%0A_beforeClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_afterClientsReady%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeAttached%3A%20function%20()%20%7B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Aif%20(this._readied)%20%7B%0Athis._beforeAttached()%3B%0AbaseAttachedCallback.call(this)%3B%0A%7D%20else%20%7B%0Athis._attachedPending%20%3D%20true%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.ArraySplice%20%3D%20function%20()%20%7B%0Afunction%20newSplice(index%2C%20removed%2C%20addedCount)%20%7B%0Areturn%20%7B%0Aindex%3A%20index%2C%0Aremoved%3A%20removed%2C%0AaddedCount%3A%20addedCount%0A%7D%3B%0A%7D%0Avar%20EDIT_LEAVE%20%3D%200%3B%0Avar%20EDIT_UPDATE%20%3D%201%3B%0Avar%20EDIT_ADD%20%3D%202%3B%0Avar%20EDIT_DELETE%20%3D%203%3B%0Afunction%20ArraySplice()%20%7B%0A%7D%0AArraySplice.prototype%20%3D%20%7B%0AcalcEditDistances%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20rowCount%20%3D%20oldEnd%20-%20oldStart%20%2B%201%3B%0Avar%20columnCount%20%3D%20currentEnd%20-%20currentStart%20%2B%201%3B%0Avar%20distances%20%3D%20new%20Array(rowCount)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Adistances%5Bi%5D%20%3D%20new%20Array(columnCount)%3B%0Adistances%5Bi%5D%5B0%5D%20%3D%20i%3B%0A%7D%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%0Adistances%5B0%5D%5Bj%5D%20%3D%20j%3B%0Afor%20(i%20%3D%201%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%201%3B%20j%20%3C%20columnCount%3B%20j%2B%2B)%20%7B%0Aif%20(this.equals(current%5BcurrentStart%20%2B%20j%20-%201%5D%2C%20old%5BoldStart%20%2B%20i%20-%201%5D))%0Adistances%5Bi%5D%5Bj%5D%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Aelse%20%7B%0Avar%20north%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%20%2B%201%3B%0Avar%20west%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%20%2B%201%3B%0Adistances%5Bi%5D%5Bj%5D%20%3D%20north%20%3C%20west%20%3F%20north%20%3A%20west%3B%0A%7D%0A%7D%0A%7D%0Areturn%20distances%3B%0A%7D%2C%0AspliceOperationsFromEditDistances%3A%20function%20(distances)%20%7B%0Avar%20i%20%3D%20distances.length%20-%201%3B%0Avar%20j%20%3D%20distances%5B0%5D.length%20-%201%3B%0Avar%20current%20%3D%20distances%5Bi%5D%5Bj%5D%3B%0Avar%20edits%20%3D%20%5B%5D%3B%0Awhile%20(i%20%3E%200%20%7C%7C%20j%20%3E%200)%20%7B%0Aif%20(i%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acontinue%3B%0A%7D%0Aif%20(j%20%3D%3D%200)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acontinue%3B%0A%7D%0Avar%20northWest%20%3D%20distances%5Bi%20-%201%5D%5Bj%20-%201%5D%3B%0Avar%20west%20%3D%20distances%5Bi%20-%201%5D%5Bj%5D%3B%0Avar%20north%20%3D%20distances%5Bi%5D%5Bj%20-%201%5D%3B%0Avar%20min%3B%0Aif%20(west%20%3C%20north)%0Amin%20%3D%20west%20%3C%20northWest%20%3F%20west%20%3A%20northWest%3B%0Aelse%0Amin%20%3D%20north%20%3C%20northWest%20%3F%20north%20%3A%20northWest%3B%0Aif%20(min%20%3D%3D%20northWest)%20%7B%0Aif%20(northWest%20%3D%3D%20current)%20%7B%0Aedits.push(EDIT_LEAVE)%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_UPDATE)%3B%0Acurrent%20%3D%20northWest%3B%0A%7D%0Ai--%3B%0Aj--%3B%0A%7D%20else%20if%20(min%20%3D%3D%20west)%20%7B%0Aedits.push(EDIT_DELETE)%3B%0Ai--%3B%0Acurrent%20%3D%20west%3B%0A%7D%20else%20%7B%0Aedits.push(EDIT_ADD)%3B%0Aj--%3B%0Acurrent%20%3D%20north%3B%0A%7D%0A%7D%0Aedits.reverse()%3B%0Areturn%20edits%3B%0A%7D%2C%0AcalcSplices%3A%20function%20(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd)%20%7B%0Avar%20prefixCount%20%3D%200%3B%0Avar%20suffixCount%20%3D%200%3B%0Avar%20minLength%20%3D%20Math.min(currentEnd%20-%20currentStart%2C%20oldEnd%20-%20oldStart)%3B%0Aif%20(currentStart%20%3D%3D%200%20%26%26%20oldStart%20%3D%3D%200)%0AprefixCount%20%3D%20this.sharedPrefix(current%2C%20old%2C%20minLength)%3B%0Aif%20(currentEnd%20%3D%3D%20current.length%20%26%26%20oldEnd%20%3D%3D%20old.length)%0AsuffixCount%20%3D%20this.sharedSuffix(current%2C%20old%2C%20minLength%20-%20prefixCount)%3B%0AcurrentStart%20%2B%3D%20prefixCount%3B%0AoldStart%20%2B%3D%20prefixCount%3B%0AcurrentEnd%20-%3D%20suffixCount%3B%0AoldEnd%20-%3D%20suffixCount%3B%0Aif%20(currentEnd%20-%20currentStart%20%3D%3D%200%20%26%26%20oldEnd%20-%20oldStart%20%3D%3D%200)%0Areturn%20%5B%5D%3B%0Aif%20(currentStart%20%3D%3D%20currentEnd)%20%7B%0Avar%20splice%20%3D%20newSplice(currentStart%2C%20%5B%5D%2C%200)%3B%0Awhile%20(oldStart%20%3C%20oldEnd)%0Asplice.removed.push(old%5BoldStart%2B%2B%5D)%3B%0Areturn%20%5Bsplice%5D%3B%0A%7D%20else%20if%20(oldStart%20%3D%3D%20oldEnd)%0Areturn%20%5BnewSplice(currentStart%2C%20%5B%5D%2C%20currentEnd%20-%20currentStart)%5D%3B%0Avar%20ops%20%3D%20this.spliceOperationsFromEditDistances(this.calcEditDistances(current%2C%20currentStart%2C%20currentEnd%2C%20old%2C%20oldStart%2C%20oldEnd))%3B%0Asplice%20%3D%20undefined%3B%0Avar%20splices%20%3D%20%5B%5D%3B%0Avar%20index%20%3D%20currentStart%3B%0Avar%20oldIndex%20%3D%20oldStart%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ops.length%3B%20i%2B%2B)%20%7B%0Aswitch%20(ops%5Bi%5D)%20%7B%0Acase%20EDIT_LEAVE%3A%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0Asplice%20%3D%20undefined%3B%0A%7D%0Aindex%2B%2B%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_UPDATE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_ADD%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.addedCount%2B%2B%3B%0Aindex%2B%2B%3B%0Abreak%3B%0Acase%20EDIT_DELETE%3A%0Aif%20(!splice)%0Asplice%20%3D%20newSplice(index%2C%20%5B%5D%2C%200)%3B%0Asplice.removed.push(old%5BoldIndex%5D)%3B%0AoldIndex%2B%2B%3B%0Abreak%3B%0A%7D%0A%7D%0Aif%20(splice)%20%7B%0Asplices.push(splice)%3B%0A%7D%0Areturn%20splices%3B%0A%7D%2C%0AsharedPrefix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20searchLength%3B%20i%2B%2B)%0Aif%20(!this.equals(current%5Bi%5D%2C%20old%5Bi%5D))%0Areturn%20i%3B%0Areturn%20searchLength%3B%0A%7D%2C%0AsharedSuffix%3A%20function%20(current%2C%20old%2C%20searchLength)%20%7B%0Avar%20index1%20%3D%20current.length%3B%0Avar%20index2%20%3D%20old.length%3B%0Avar%20count%20%3D%200%3B%0Awhile%20(count%20%3C%20searchLength%20%26%26%20this.equals(current%5B--index1%5D%2C%20old%5B--index2%5D))%0Acount%2B%2B%3B%0Areturn%20count%3B%0A%7D%2C%0AcalculateSplices%3A%20function%20(current%2C%20previous)%20%7B%0Areturn%20this.calcSplices(current%2C%200%2C%20current.length%2C%20previous%2C%200%2C%20previous.length)%3B%0A%7D%2C%0Aequals%3A%20function%20(currentValue%2C%20previousValue)%20%7B%0Areturn%20currentValue%20%3D%3D%3D%20previousValue%3B%0A%7D%0A%7D%3B%0Areturn%20new%20ArraySplice()%3B%0A%7D()%3B%0APolymer.domInnerHTML%20%3D%20function%20()%20%7B%0Avar%20escapeAttrRegExp%20%3D%20%2F%5B%26%5Cu00A0%22%5D%2Fg%3B%0Avar%20escapeDataRegExp%20%3D%20%2F%5B%26%5Cu00A0%3C%3E%5D%2Fg%3B%0Afunction%20escapeReplace(c)%20%7B%0Aswitch%20(c)%20%7B%0Acase%20'%26'%3A%0Areturn%20'%26amp%3B'%3B%0Acase%20'%3C'%3A%0Areturn%20'%26lt%3B'%3B%0Acase%20'%3E'%3A%0Areturn%20'%26gt%3B'%3B%0Acase%20'%22'%3A%0Areturn%20'%26quot%3B'%3B%0Acase%20'%5CxA0'%3A%0Areturn%20'%26nbsp%3B'%3B%0A%7D%0A%7D%0Afunction%20escapeAttr(s)%20%7B%0Areturn%20s.replace(escapeAttrRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20escapeData(s)%20%7B%0Areturn%20s.replace(escapeDataRegExp%2C%20escapeReplace)%3B%0A%7D%0Afunction%20makeSet(arr)%20%7B%0Avar%20set%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20arr.length%3B%20i%2B%2B)%20%7B%0Aset%5Barr%5Bi%5D%5D%20%3D%20true%3B%0A%7D%0Areturn%20set%3B%0A%7D%0Avar%20voidElements%20%3D%20makeSet(%5B%0A'area'%2C%0A'base'%2C%0A'br'%2C%0A'col'%2C%0A'command'%2C%0A'embed'%2C%0A'hr'%2C%0A'img'%2C%0A'input'%2C%0A'keygen'%2C%0A'link'%2C%0A'meta'%2C%0A'param'%2C%0A'source'%2C%0A'track'%2C%0A'wbr'%0A%5D)%3B%0Avar%20plaintextParents%20%3D%20makeSet(%5B%0A'style'%2C%0A'script'%2C%0A'xmp'%2C%0A'iframe'%2C%0A'noembed'%2C%0A'noframes'%2C%0A'plaintext'%2C%0A'noscript'%0A%5D)%3B%0Afunction%20getOuterHTML(node%2C%20parentNode%2C%20composed)%20%7B%0Aswitch%20(node.nodeType)%20%7B%0Acase%20Node.ELEMENT_NODE%3A%0Avar%20tagName%20%3D%20node.localName%3B%0Avar%20s%20%3D%20'%3C'%20%2B%20tagName%3B%0Avar%20attrs%20%3D%20node.attributes%3B%0Afor%20(var%20i%20%3D%200%2C%20attr%3B%20attr%20%3D%20attrs%5Bi%5D%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20'%20'%20%2B%20attr.name%20%2B%20'%3D%22'%20%2B%20escapeAttr(attr.value)%20%2B%20'%22'%3B%0A%7D%0As%20%2B%3D%20'%3E'%3B%0Aif%20(voidElements%5BtagName%5D)%20%7B%0Areturn%20s%3B%0A%7D%0Areturn%20s%20%2B%20getInnerHTML(node%2C%20composed)%20%2B%20'%3C%2F'%20%2B%20tagName%20%2B%20'%3E'%3B%0Acase%20Node.TEXT_NODE%3A%0Avar%20data%20%3D%20node.data%3B%0Aif%20(parentNode%20%26%26%20plaintextParents%5BparentNode.localName%5D)%20%7B%0Areturn%20data%3B%0A%7D%0Areturn%20escapeData(data)%3B%0Acase%20Node.COMMENT_NODE%3A%0Areturn%20'%3C!--'%20%2B%20node.data%20%2B%20'--%3E'%3B%0Adefault%3A%0Aconsole.error(node)%3B%0Athrow%20new%20Error('not%20implemented')%3B%0A%7D%0A%7D%0Afunction%20getInnerHTML(node%2C%20composed)%20%7B%0Aif%20(node%20instanceof%20HTMLTemplateElement)%0Anode%20%3D%20node.content%3B%0Avar%20s%20%3D%20''%3B%0Avar%20c%24%20%3D%20Polymer.dom(node).childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20child%3B%20i%20%3C%20l%20%26%26%20(child%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0As%20%2B%3D%20getOuterHTML(child%2C%20node%2C%20composed)%3B%0A%7D%0Areturn%20s%3B%0A%7D%0Areturn%20%7B%20getInnerHTML%3A%20getInnerHTML%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20nativeInsertBefore%20%3D%20Element.prototype.insertBefore%3B%0Avar%20nativeAppendChild%20%3D%20Element.prototype.appendChild%3B%0Avar%20nativeRemoveChild%20%3D%20Element.prototype.removeChild%3B%0APolymer.TreeApi%20%3D%20%7B%0AarrayCopyChildNodes%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopyChildren%3A%20function%20(parent)%20%7B%0Avar%20copy%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0Afor%20(var%20n%20%3D%20parent.firstElementChild%3B%20n%3B%20n%20%3D%20n.nextElementSibling)%20%7B%0Acopy%5Bi%2B%2B%5D%20%3D%20n%3B%0A%7D%0Areturn%20copy%3B%0A%7D%2C%0AarrayCopy%3A%20function%20(a%24)%20%7B%0Avar%20l%20%3D%20a%24.length%3B%0Avar%20copy%20%3D%20new%20Array(l)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Acopy%5Bi%5D%20%3D%20a%24%5Bi%5D%3B%0A%7D%0Areturn%20copy%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Logical%20%3D%20%7B%0AhasParentNode%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.parentNode)%3B%0A%7D%2C%0AhasChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node.__dom%20%26%26%20node.__dom.childNodes%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20this.hasChildNodes(node)%20%3F%20this._getChildNodes(node)%20%3A%20node.childNodes%3B%0A%7D%2C%0A_getChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!node.__dom.childNodes)%20%7B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.__dom.firstChild%3B%20n%3B%20n%20%3D%20n.__dom.nextSibling)%20%7B%0Anode.__dom.childNodes.push(n)%3B%0A%7D%0A%7D%0Areturn%20node.__dom.childNodes%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.parentNode%20!%3D%3D%20undefined%20%3F%20node.__dom.parentNode%20%3A%20node.parentNode%3B%0A%7D%2C%0AgetFirstChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20node.__dom.firstChild%20%3A%20node.firstChild%3B%0A%7D%2C%0AgetLastChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20node.__dom.lastChild%20%3A%20node.lastChild%3B%0A%7D%2C%0AgetNextSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.nextSibling%20%3A%20node.nextSibling%3B%0A%7D%2C%0AgetPreviousSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20node.__dom.previousSibling%20%3A%20node.previousSibling%3B%0A%7D%2C%0AgetFirstElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.firstChild%20!%3D%3D%20undefined%20%3F%20this._getFirstElementChild(node)%20%3A%20node.firstElementChild%3B%0A%7D%2C%0A_getFirstElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.firstChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetLastElementChild%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.lastChild%20!%3D%3D%20undefined%20%3F%20this._getLastElementChild(node)%20%3A%20node.lastElementChild%3B%0A%7D%2C%0A_getLastElementChild%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.lastChild%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetNextElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.nextSibling%20!%3D%3D%20undefined%20%3F%20this._getNextElementSibling(node)%20%3A%20node.nextElementSibling%3B%0A%7D%2C%0A_getNextElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.nextSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AgetPreviousElementSibling%3A%20function%20(node)%20%7B%0Areturn%20node.__dom%20%26%26%20node.__dom.previousSibling%20!%3D%3D%20undefined%20%3F%20this._getPreviousElementSibling(node)%20%3A%20node.previousElementSibling%3B%0A%7D%2C%0A_getPreviousElementSibling%3A%20function%20(node)%20%7B%0Avar%20n%20%3D%20node.__dom.previousSibling%3B%0Awhile%20(n%20%26%26%20n.nodeType%20!%3D%3D%20Node.ELEMENT_NODE)%20%7B%0An%20%3D%20n.__dom.previousSibling%3B%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AsaveChildNodes%3A%20function%20(node)%20%7B%0Aif%20(!this.hasChildNodes(node))%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Anode.__dom.firstChild%20%3D%20node.firstChild%3B%0Anode.__dom.lastChild%20%3D%20node.lastChild%3B%0Anode.__dom.childNodes%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0An.__dom%20%3D%20n.__dom%20%7C%7C%20%7B%7D%3B%0An.__dom.parentNode%20%3D%20node%3B%0Anode.__dom.childNodes.push(n)%3B%0An.__dom.nextSibling%20%3D%20n.nextSibling%3B%0An.__dom.previousSibling%20%3D%20n.previousSibling%3B%0A%7D%0A%7D%0A%7D%2C%0ArecordInsertBefore%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Afor%20(var%20n%20%3D%20node.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Athis._linkNode(n%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%20else%20%7B%0Athis._linkNode(node%2C%20container%2C%20ref_node)%3B%0A%7D%0A%7D%2C%0A_linkNode%3A%20function%20(node%2C%20container%2C%20ref_node)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(ref_node)%20%7B%0Aref_node.__dom%20%3D%20ref_node.__dom%20%7C%7C%20%7B%7D%3B%0A%7D%0Anode.__dom.previousSibling%20%3D%20ref_node%20%3F%20ref_node.__dom.previousSibling%20%3A%20container.__dom.lastChild%3B%0Aif%20(node.__dom.previousSibling)%20%7B%0Anode.__dom.previousSibling.__dom.nextSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.nextSibling%20%3D%20ref_node%3B%0Aif%20(node.__dom.nextSibling)%20%7B%0Anode.__dom.nextSibling.__dom.previousSibling%20%3D%20node%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20container%3B%0Aif%20(ref_node)%20%7B%0Aif%20(ref_node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%20else%20%7B%0Acontainer.__dom.lastChild%20%3D%20node%3B%0Aif%20(!container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node%3B%0A%7D%0A%7D%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%2C%0ArecordRemoveChild%3A%20function%20(node%2C%20container)%20%7B%0Anode.__dom%20%3D%20node.__dom%20%7C%7C%20%7B%7D%3B%0Acontainer.__dom%20%3D%20container.__dom%20%7C%7C%20%7B%7D%3B%0Aif%20(node%20%3D%3D%3D%20container.__dom.firstChild)%20%7B%0Acontainer.__dom.firstChild%20%3D%20node.__dom.nextSibling%3B%0A%7D%0Aif%20(node%20%3D%3D%3D%20container.__dom.lastChild)%20%7B%0Acontainer.__dom.lastChild%20%3D%20node.__dom.previousSibling%3B%0A%7D%0Avar%20p%20%3D%20node.__dom.previousSibling%3B%0Avar%20n%20%3D%20node.__dom.nextSibling%3B%0Aif%20(p)%20%7B%0Ap.__dom.nextSibling%20%3D%20n%3B%0A%7D%0Aif%20(n)%20%7B%0An.__dom.previousSibling%20%3D%20p%3B%0A%7D%0Anode.__dom.parentNode%20%3D%20node.__dom.previousSibling%20%3D%20node.__dom.nextSibling%20%3D%20undefined%3B%0Acontainer.__dom.childNodes%20%3D%20null%3B%0A%7D%0A%7D%3B%0APolymer.TreeApi.Composed%20%3D%20%7B%0AgetChildNodes%3A%20function%20(node)%20%7B%0Areturn%20Polymer.TreeApi.arrayCopyChildNodes(node)%3B%0A%7D%2C%0AgetParentNode%3A%20function%20(node)%20%7B%0Areturn%20node.parentNode%3B%0A%7D%2C%0AclearChildNodes%3A%20function%20(node)%20%7B%0Anode.textContent%20%3D%20''%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(parentNode%2C%20newChild%2C%20refChild)%20%7B%0Areturn%20nativeInsertBefore.call(parentNode%2C%20newChild%2C%20refChild%20%7C%7C%20null)%3B%0A%7D%2C%0AappendChild%3A%20function%20(parentNode%2C%20newChild)%20%7B%0Areturn%20nativeAppendChild.call(parentNode%2C%20newChild)%3B%0A%7D%2C%0AremoveChild%3A%20function%20(parentNode%2C%20node)%20%7B%0Areturn%20nativeRemoveChild.call(parentNode%2C%20node)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0APolymer.DomApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20function%20(node)%20%7B%0Athis.node%20%3D%20needsToWrap%20%3F%20DomApi.wrap(node)%20%3A%20node%3B%0A%7D%3B%0Avar%20needsToWrap%20%3D%20Settings.hasShadow%20%26%26%20!Settings.nativeShadow%3B%0ADomApi.wrap%20%3D%20window.wrap%20%3F%20window.wrap%20%3A%20function%20(node)%20%7B%0Areturn%20node%3B%0A%7D%3B%0ADomApi.prototype%20%3D%20%7B%0Aflush%3A%20function%20()%20%7B%0APolymer.dom.flush()%3B%0A%7D%2C%0AdeepContains%3A%20function%20(node)%20%7B%0Aif%20(this.node.contains(node))%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20n%20%3D%20node%3B%0Avar%20doc%20%3D%20node.ownerDocument%3B%0Awhile%20(n%20%26%26%20n%20!%3D%3D%20doc%20%26%26%20n%20!%3D%3D%20this.node)%20%7B%0An%20%3D%20Polymer.dom(n).parentNode%20%7C%7C%20n.host%3B%0A%7D%0Areturn%20n%20%3D%3D%3D%20this.node%3B%0A%7D%2C%0AqueryDistributedElements%3A%20function%20(selector)%20%7B%0Avar%20c%24%20%3D%20this.getEffectiveChildNodes()%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%20%26%26%20DomApi.matchesSelector.call(c%2C%20selector))%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AgetEffectiveChildNodes%3A%20function%20()%20%7B%0Avar%20list%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.localName%20%3D%3D%3D%20CONTENT)%20%7B%0Avar%20d%24%20%3D%20dom(c).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20d%24.length%3B%20j%2B%2B)%20%7B%0Alist.push(d%24%5Bj%5D)%3B%0A%7D%0A%7D%20else%20%7B%0Alist.push(c)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0AobserveNodes%3A%20function%20(callback)%20%7B%0Aif%20(callback)%20%7B%0Aif%20(!this.observer)%20%7B%0Athis.observer%20%3D%20this.node.localName%20%3D%3D%3D%20CONTENT%20%3F%20new%20DomApi.DistributedNodesObserver(this)%20%3A%20new%20DomApi.EffectiveNodesObserver(this)%3B%0A%7D%0Areturn%20this.observer.addListener(callback)%3B%0A%7D%0A%7D%2C%0AunobserveNodes%3A%20function%20(handle)%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.removeListener(handle)%3B%0A%7D%0A%7D%2C%0AnotifyObserver%3A%20function%20()%20%7B%0Aif%20(this.observer)%20%7B%0Athis.observer.notify()%3B%0A%7D%0A%7D%2C%0A_query%3A%20function%20(matcher%2C%20node%2C%20halter)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this.node%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0Areturn%20list%3B%0A%7D%2C%0A_queryElements%3A%20function%20(elements%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20elements.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE)%20%7B%0Aif%20(this._queryElement(c%2C%20matcher%2C%20halter%2C%20list))%20%7B%0Areturn%20true%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_queryElement%3A%20function%20(node%2C%20matcher%2C%20halter%2C%20list)%20%7B%0Avar%20result%20%3D%20matcher(node)%3B%0Aif%20(result)%20%7B%0Alist.push(node)%3B%0A%7D%0Aif%20(halter%20%26%26%20halter(result))%20%7B%0Areturn%20result%3B%0A%7D%0Athis._queryElements(TreeApi.Logical.getChildNodes(node)%2C%20matcher%2C%20halter%2C%20list)%3B%0A%7D%0A%7D%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%20%3D%20'content'%3B%0Avar%20dom%20%3D%20DomApi.factory%20%3D%20function%20(node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20document%3B%0Aif%20(!node.__domApi)%20%7B%0Anode.__domApi%20%3D%20new%20DomApi.ctor(node)%3B%0A%7D%0Areturn%20node.__domApi%3B%0A%7D%3B%0ADomApi.hasApi%20%3D%20function%20(node)%20%7B%0Areturn%20Boolean(node.__domApi)%3B%0A%7D%3B%0ADomApi.ctor%20%3D%20DomApi%3B%0APolymer.dom%20%3D%20function%20(obj%2C%20patch)%20%7B%0Aif%20(obj%20instanceof%20Event)%20%7B%0Areturn%20Polymer.EventApi.factory(obj)%3B%0A%7D%20else%20%7B%0Areturn%20DomApi.factory(obj%2C%20patch)%3B%0A%7D%0A%7D%3B%0Avar%20p%20%3D%20Element.prototype%3B%0ADomApi.matchesSelector%20%3D%20p.matches%20%7C%7C%20p.matchesSelector%20%7C%7C%20p.mozMatchesSelector%20%7C%7C%20p.msMatchesSelector%20%7C%7C%20p.oMatchesSelector%20%7C%7C%20p.webkitMatchesSelector%3B%0Areturn%20DomApi%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20dom%20%3D%20DomApi.factory%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20getInnerHTML%20%3D%20Polymer.domInnerHTML.getInnerHTML%3B%0Avar%20CONTENT%20%3D%20DomApi.CONTENT%3B%0Aif%20(Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0Avar%20nativeCloneNode%20%3D%20Element.prototype.cloneNode%3B%0Avar%20nativeImportNode%20%3D%20Document.prototype.importNode%3B%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0A_lazyDistribute%3A%20function%20(host)%20%7B%0Aif%20(host.shadyRoot%20%26%26%20host.shadyRoot._distributionClean)%20%7B%0Ahost.shadyRoot._distributionClean%20%3D%20false%3B%0APolymer.dom.addDebouncer(host.debounce('_distribute'%2C%20host._distributeContent))%3B%0A%7D%0A%7D%2C%0AappendChild%3A%20function%20(node)%20%7B%0Areturn%20this.insertBefore(node)%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(node%2C%20ref_node)%20%7B%0Aif%20(ref_node%20%26%26%20TreeApi.Logical.getParentNode(ref_node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20ref_node%20to%20be%20inserted%20before%20is%20not%20a%20child%20'%20%2B%20'of%20this%20node')%3B%0A%7D%0Aif%20(node.nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aif%20(DomApi.hasApi(parent))%20%7B%0Adom(parent).notifyObserver()%3B%0A%7D%0Athis._removeNode(node)%3B%0A%7D%20else%20%7B%0Athis._removeOwnerShadyRoot(node)%3B%0A%7D%0A%7D%0Aif%20(!this._addNode(node%2C%20ref_node))%20%7B%0Aif%20(ref_node)%20%7B%0Aref_node%20%3D%20ref_node.localName%20%3D%3D%3D%20CONTENT%20%3F%20this._firstComposedNode(ref_node)%20%3A%20ref_node%3B%0A%7D%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Aif%20(ref_node)%20%7B%0ATreeApi.Composed.insertBefore(container%2C%20node%2C%20ref_node)%3B%0A%7D%20else%20%7B%0ATreeApi.Composed.appendChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_addNode%3A%20function%20(node%2C%20ref_node)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Avar%20ipAdded%20%3D%20this._maybeAddInsertionPoint(node%2C%20this.node)%3B%0Aif%20(!root._invalidInsertionPoints)%20%7B%0Aroot._invalidInsertionPoints%20%3D%20ipAdded%3B%0A%7D%0Athis._addNodeToHost(root.host%2C%20node)%3B%0A%7D%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0ATreeApi.Logical.recordInsertBefore(node%2C%20this.node%2C%20ref_node)%3B%0A%7D%0Avar%20handled%20%3D%20this._maybeDistribute(node)%20%7C%7C%20this.node.shadyRoot%3B%0Aif%20(handled)%20%7B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Awhile%20(node.firstChild)%20%7B%0ATreeApi.Composed.removeChild(node%2C%20node.firstChild)%3B%0A%7D%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0Areturn%20handled%3B%0A%7D%2C%0AremoveChild%3A%20function%20(node)%20%7B%0Aif%20(TreeApi.Logical.getParentNode(node)%20!%3D%3D%20this.node)%20%7B%0Athrow%20Error('The%20node%20to%20be%20removed%20is%20not%20a%20child%20of%20this%20node%3A%20'%20%2B%20node)%3B%0A%7D%0Aif%20(!this._removeNode(node))%20%7B%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(container%20%3D%3D%3D%20parent)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0A_removeNode%3A%20function%20(node)%20%7B%0Avar%20logicalParent%20%3D%20TreeApi.Logical.hasParentNode(node)%20%26%26%20TreeApi.Logical.getParentNode(node)%3B%0Avar%20distributed%3B%0Avar%20root%20%3D%20this._ownerShadyRootForNode(node)%3B%0Aif%20(logicalParent)%20%7B%0Adistributed%20%3D%20dom(node)._maybeDistributeParent()%3B%0ATreeApi.Logical.recordRemoveChild(node%2C%20logicalParent)%3B%0Aif%20(root%20%26%26%20this._removeDistributedChildren(root%2C%20node))%20%7B%0Aroot._invalidInsertionPoints%20%3D%20true%3B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Athis._removeOwnerShadyRoot(node)%3B%0Aif%20(root)%20%7B%0Athis._removeNodeFromHost(root.host%2C%20node)%3B%0A%7D%0Areturn%20distributed%3B%0A%7D%2C%0AreplaceChild%3A%20function%20(node%2C%20ref_node)%20%7B%0Athis.insertBefore(node%2C%20ref_node)%3B%0Athis.removeChild(ref_node)%3B%0Areturn%20node%3B%0A%7D%2C%0A_hasCachedOwnerRoot%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node._ownerShadyRoot%20!%3D%3D%20undefined)%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Areturn%20this._ownerShadyRootForNode(this.node)%3B%0A%7D%2C%0A_ownerShadyRootForNode%3A%20function%20(node)%20%7B%0Aif%20(!node)%20%7B%0Areturn%3B%0A%7D%0Avar%20root%20%3D%20node._ownerShadyRoot%3B%0Aif%20(root%20%3D%3D%3D%20undefined)%20%7B%0Aif%20(node._isShadyRoot)%20%7B%0Aroot%20%3D%20node%3B%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0Aroot%20%3D%20parent._isShadyRoot%20%3F%20parent%20%3A%20this._ownerShadyRootForNode(parent)%3B%0A%7D%20else%20%7B%0Aroot%20%3D%20null%3B%0A%7D%0A%7D%0Aif%20(root%20%7C%7C%20document.documentElement.contains(node))%20%7B%0Anode._ownerShadyRoot%20%3D%20root%3B%0A%7D%0A%7D%0Areturn%20root%3B%0A%7D%2C%0A_maybeDistribute%3A%20function%20(node)%20%7B%0Avar%20fragContent%20%3D%20node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent%20%26%26%20dom(node).querySelector(CONTENT)%3B%0Avar%20wrappedContent%20%3D%20fragContent%20%26%26%20TreeApi.Logical.getParentNode(fragContent).nodeType%20!%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%3B%0Avar%20hasContent%20%3D%20fragContent%20%7C%7C%20node.localName%20%3D%3D%3D%20CONTENT%3B%0Aif%20(hasContent)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Athis._lazyDistribute(root.host)%3B%0A%7D%0A%7D%0Avar%20needsDist%20%3D%20this._nodeNeedsDistribution(this.node)%3B%0Aif%20(needsDist)%20%7B%0Athis._lazyDistribute(this.node)%3B%0A%7D%0Areturn%20needsDist%20%7C%7C%20hasContent%20%26%26%20!wrappedContent%3B%0A%7D%2C%0A_maybeAddInsertionPoint%3A%20function%20(node%2C%20parent)%20%7B%0Avar%20added%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20!node.__noContent)%20%7B%0Avar%20c%24%20%3D%20dom(node).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20np%2C%20na%3B%20i%20%3C%20c%24.length%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anp%20%3D%20TreeApi.Logical.getParentNode(n)%3B%0Aif%20(np%20%3D%3D%3D%20node)%20%7B%0Anp%20%3D%20parent%3B%0A%7D%0Ana%20%3D%20this._maybeAddInsertionPoint(n%2C%20np)%3B%0Aadded%20%3D%20added%20%7C%7C%20na%3B%0A%7D%0A%7D%20else%20if%20(node.localName%20%3D%3D%3D%20CONTENT)%20%7B%0ATreeApi.Logical.saveChildNodes(parent)%3B%0ATreeApi.Logical.saveChildNodes(node)%3B%0Aadded%20%3D%20true%3B%0A%7D%0Areturn%20added%3B%0A%7D%2C%0A_updateInsertionPoints%3A%20function%20(host)%20%7B%0Avar%20i%24%20%3D%20host.shadyRoot._insertionPoints%20%3D%20dom(host.shadyRoot).querySelectorAll(CONTENT)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(TreeApi.Logical.getParentNode(c))%3B%0A%7D%0A%7D%2C%0A_nodeNeedsDistribution%3A%20function%20(node)%20%7B%0Areturn%20node%20%26%26%20node.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(node.shadyRoot)%3B%0A%7D%2C%0A_addNodeToHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementAdd)%20%7B%0Ahost._elementAdd(node)%3B%0A%7D%0A%7D%2C%0A_removeNodeFromHost%3A%20function%20(host%2C%20node)%20%7B%0Aif%20(host._elementRemove)%20%7B%0Ahost._elementRemove(node)%3B%0A%7D%0A%7D%2C%0A_removeDistributedChildren%3A%20function%20(root%2C%20container)%20%7B%0Avar%20hostNeedsDist%3B%0Avar%20ip%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20ip%24.length%3B%20i%2B%2B)%20%7B%0Avar%20content%20%3D%20ip%24%5Bi%5D%3B%0Aif%20(this._contains(container%2C%20content))%20%7B%0Avar%20dc%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20dc%24.length%3B%20j%2B%2B)%20%7B%0AhostNeedsDist%20%3D%20true%3B%0Avar%20node%20%3D%20dc%24%5Bj%5D%3B%0Avar%20parent%20%3D%20TreeApi.Composed.getParentNode(node)%3B%0Aif%20(parent)%20%7B%0ATreeApi.Composed.removeChild(parent%2C%20node)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Areturn%20hostNeedsDist%3B%0A%7D%2C%0A_contains%3A%20function%20(container%2C%20node)%20%7B%0Awhile%20(node)%20%7B%0Aif%20(node%20%3D%3D%20container)%20%7B%0Areturn%20true%3B%0A%7D%0Anode%20%3D%20TreeApi.Logical.getParentNode(node)%3B%0A%7D%0A%7D%2C%0A_removeOwnerShadyRoot%3A%20function%20(node)%20%7B%0Aif%20(this._hasCachedOwnerRoot(node))%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node)%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20n%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._removeOwnerShadyRoot(n)%3B%0A%7D%0A%7D%0Anode._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%2C%0A_firstComposedNode%3A%20function%20(content)%20%7B%0Avar%20n%24%20%3D%20dom(content).getDistributedNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20n%24.length%2C%20n%2C%20p%24%3B%20i%20%3C%20l%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ap%24%20%3D%20dom(n).getDestinationInsertionPoints()%3B%0Aif%20(p%24%5Bp%24.length%20-%201%5D%20%3D%3D%3D%20content)%20%7B%0Areturn%20n%3B%0A%7D%0A%7D%0A%7D%2C%0AquerySelector%3A%20function%20(selector)%20%7B%0Avar%20result%20%3D%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node%2C%20function%20(n)%20%7B%0Areturn%20Boolean(n)%3B%0A%7D)%5B0%5D%3B%0Areturn%20result%20%7C%7C%20null%3B%0A%7D%2C%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20this._query(function%20(n)%20%7B%0Areturn%20DomApi.matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Areturn%20this.node._destinationInsertionPoints%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Areturn%20this.node._distributedNodes%20%7C%7C%20%5B%5D%3B%0A%7D%2C%0A_clear%3A%20function%20()%20%7B%0Awhile%20(this.childNodes.length)%20%7B%0Athis.removeChild(this.childNodes%5B0%5D)%3B%0A%7D%0A%7D%2C%0AsetAttribute%3A%20function%20(name%2C%20value)%20%7B%0Athis.node.setAttribute(name%2C%20value)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0AremoveAttribute%3A%20function%20(name)%20%7B%0Athis.node.removeAttribute(name)%3B%0Athis._maybeDistributeParent()%3B%0A%7D%2C%0A_maybeDistributeParent%3A%20function%20()%20%7B%0Aif%20(this._nodeNeedsDistribution(this.parentNode))%20%7B%0Athis._lazyDistribute(this.parentNode)%3B%0Areturn%20true%3B%0A%7D%0A%7D%2C%0AcloneNode%3A%20function%20(deep)%20%7B%0Avar%20n%20%3D%20nativeCloneNode.call(this.node%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(c%24%5Bi%5D).cloneNode(true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Avar%20n%20%3D%20nativeImportNode.call(doc%2C%20externalNode%2C%20false)%3B%0Aif%20(deep)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(externalNode)%3B%0Avar%20d%20%3D%20dom(n)%3B%0Afor%20(var%20i%20%3D%200%2C%20nc%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Anc%20%3D%20dom(doc).importNode(c%24%5Bi%5D%2C%20true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%3B%0A%7D%2C%0A_getComposedInnerHTML%3A%20function%20()%20%7B%0Areturn%20getInnerHTML(this.node%2C%20true)%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20active%20%3D%20document.activeElement%3B%0Aif%20(!active)%20%7B%0Areturn%20null%3B%0A%7D%0Avar%20isShadyRoot%20%3D%20!!this.node._isShadyRoot%3B%0Aif%20(this.node%20!%3D%3D%20document)%20%7B%0Aif%20(!isShadyRoot)%20%7B%0Areturn%20null%3B%0A%7D%0Aif%20(this.node.host%20%3D%3D%3D%20active%20%7C%7C%20!this.node.host.contains(active))%20%7B%0Areturn%20null%3B%0A%7D%0A%7D%0Avar%20activeRoot%20%3D%20dom(active).getOwnerRoot()%3B%0Awhile%20(activeRoot%20%26%26%20activeRoot%20!%3D%3D%20this.node)%20%7B%0Aactive%20%3D%20activeRoot.host%3B%0AactiveRoot%20%3D%20dom(active).getOwnerRoot()%3B%0A%7D%0Aif%20(this.node%20%3D%3D%3D%20document)%20%7B%0Areturn%20activeRoot%20%3F%20null%20%3A%20active%3B%0A%7D%20else%20%7B%0Areturn%20activeRoot%20%3D%3D%3D%20this.node%20%3F%20active%20%3A%20null%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(this.node)%3B%0Areturn%20Array.isArray(c%24)%20%3F%20c%24%20%3A%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(TreeApi.Logical.hasChildNodes(this.node))%20%7B%0Areturn%20Array.prototype.filter.call(this.childNodes%2C%20function%20(n)%20%7B%0Areturn%20n.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%3B%0A%7D)%3B%0A%7D%20else%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AparentNode%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getParentNode(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getFirstElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getLastElementChild(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getNextElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.Logical.getPreviousElementSibling(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%20else%20%7B%0Avar%20tc%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20cn%20%3D%20this.childNodes%2C%20c%3B%20c%20%3D%20cn%5Bi%5D%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Atc.push(c.textContent)%3B%0A%7D%0A%7D%0Areturn%20tc.join('')%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis.node.textContent%20%3D%20text%3B%0A%7D%20else%20%7B%0Athis._clear()%3B%0Aif%20(text)%20%7B%0Athis.appendChild(document.createTextNode(text))%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20%3D%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20%3D%3D%3D%20Node.COMMENT_NODE)%20%7B%0Areturn%20null%3B%0A%7D%20else%20%7B%0Areturn%20getInnerHTML(this.node)%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(text)%20%7B%0Avar%20nt%20%3D%20this.node.nodeType%3B%0Aif%20(nt%20!%3D%3D%20Node.TEXT_NODE%20%7C%7C%20nt%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Athis._clear()%3B%0Avar%20d%20%3D%20document.createElement('div')%3B%0Ad.innerHTML%20%3D%20text%3B%0Avar%20c%24%20%3D%20TreeApi.arrayCopyChildNodes(d)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Athis.appendChild(c%24%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0ADomApi.hasInsertionPoint%20%3D%20function%20(root)%20%7B%0Areturn%20Boolean(root%20%26%26%20root._insertionPoints.length)%3B%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Aif%20(!Settings.useShadow)%20%7B%0Areturn%3B%0A%7D%0APolymer.Base.extend(DomApi.prototype%2C%20%7B%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20TreeApi.arrayCopy(this.node.querySelectorAll(selector))%3B%0A%7D%2C%0AgetOwnerRoot%3A%20function%20()%20%7B%0Avar%20n%20%3D%20this.node%3B%0Awhile%20(n)%20%7B%0Aif%20(n.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20n.host)%20%7B%0Areturn%20n%3B%0A%7D%0An%20%3D%20n.parentNode%3B%0A%7D%0A%7D%2C%0AimportNode%3A%20function%20(externalNode%2C%20deep)%20%7B%0Avar%20doc%20%3D%20this.node%20instanceof%20Document%20%3F%20this.node%20%3A%20this.node.ownerDocument%3B%0Areturn%20doc.importNode(externalNode%2C%20deep)%3B%0A%7D%2C%0AgetDestinationInsertionPoints%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDestinationInsertionPoints%20%26%26%20this.node.getDestinationInsertionPoints()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%2C%0AgetDistributedNodes%3A%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDistributedNodes%20%26%26%20this.node.getDistributedNodes()%3B%0Areturn%20n%24%20%3F%20TreeApi.arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%0A%7D)%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AactiveElement%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20node%20%3D%20DomApi.wrap(this.node)%3B%0Avar%20activeElement%20%3D%20node.activeElement%3B%0Areturn%20node.contains(activeElement)%20%3F%20activeElement%20%3A%20null%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20TreeApi.arrayCopyChildren(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AtextContent%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.textContent%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.textContent%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AinnerHTML%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node.innerHTML%3B%0A%7D%2C%0Aset%3A%20function%20(value)%20%7B%0Areturn%20this.node.innerHTML%20%3D%20value%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%0A%7D)%3B%0Avar%20forwardMethods%20%3D%20function%20(m%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20m%24.length%3B%20i%2B%2B)%20%7B%0AforwardMethod(m%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardMethod%20%3D%20function%20(method)%20%7B%0ADomApi.prototype%5Bmethod%5D%20%3D%20function%20()%20%7B%0Areturn%20this.node%5Bmethod%5D.apply(this.node%2C%20arguments)%3B%0A%7D%3B%0A%7D%3B%0AforwardMethods(%5B%0A'cloneNode'%2C%0A'appendChild'%2C%0A'insertBefore'%2C%0A'removeChild'%2C%0A'replaceChild'%2C%0A'setAttribute'%2C%0A'removeAttribute'%2C%0A'querySelector'%0A%5D)%3B%0Avar%20forwardProperties%20%3D%20function%20(f%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20f%24.length%3B%20i%2B%2B)%20%7B%0AforwardProperty(f%24%5Bi%5D)%3B%0A%7D%0A%7D%3B%0Avar%20forwardProperty%20%3D%20function%20(name)%20%7B%0AObject.defineProperty(DomApi.prototype%2C%20name%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node%5Bname%5D%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0A%7D%3B%0AforwardProperties(%5B%0A'parentNode'%2C%0A'firstChild'%2C%0A'lastChild'%2C%0A'nextSibling'%2C%0A'previousSibling'%2C%0A'firstElementChild'%2C%0A'lastElementChild'%2C%0A'nextElementSibling'%2C%0A'previousElementSibling'%0A%5D)%3B%0A%7D())%3B%0APolymer.Base.extend(Polymer.dom%2C%20%7B%0A_flushGuard%3A%200%2C%0A_FLUSH_MAX%3A%20100%2C%0A_needsTakeRecords%3A%20!Polymer.Settings.useNativeCustomElements%2C%0A_debouncers%3A%20%5B%5D%2C%0A_staticFlushList%3A%20%5B%5D%2C%0A_finishDebouncer%3A%20null%2C%0Aflush%3A%20function%20()%20%7B%0Athis._flushGuard%20%3D%200%3B%0Athis._prepareFlush()%3B%0Awhile%20(this._debouncers.length%20%26%26%20this._flushGuard%20%3C%20this._FLUSH_MAX)%20%7B%0Awhile%20(this._debouncers.length)%20%7B%0Athis._debouncers.shift().complete()%3B%0A%7D%0Aif%20(this._finishDebouncer)%20%7B%0Athis._finishDebouncer.complete()%3B%0A%7D%0Athis._prepareFlush()%3B%0Athis._flushGuard%2B%2B%3B%0A%7D%0Aif%20(this._flushGuard%20%3E%3D%20this._FLUSH_MAX)%20%7B%0Aconsole.warn('Polymer.dom.flush%20aborted.%20Flush%20may%20not%20be%20complete.')%3B%0A%7D%0A%7D%2C%0A_prepareFlush%3A%20function%20()%20%7B%0Aif%20(this._needsTakeRecords)%20%7B%0ACustomElements.takeRecords()%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._staticFlushList.length%3B%20i%2B%2B)%20%7B%0Athis._staticFlushList%5Bi%5D()%3B%0A%7D%0A%7D%2C%0AaddStaticFlush%3A%20function%20(fn)%20%7B%0Athis._staticFlushList.push(fn)%3B%0A%7D%2C%0AremoveStaticFlush%3A%20function%20(fn)%20%7B%0Avar%20i%20%3D%20this._staticFlushList.indexOf(fn)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._staticFlushList.splice(i%2C%201)%3B%0A%7D%0A%7D%2C%0AaddDebouncer%3A%20function%20(debouncer)%20%7B%0Athis._debouncers.push(debouncer)%3B%0Athis._finishDebouncer%20%3D%20Polymer.Debounce(this._finishDebouncer%2C%20this._finishFlush)%3B%0A%7D%2C%0A_finishFlush%3A%20function%20()%20%7B%0APolymer.dom._debouncers%20%3D%20%5B%5D%3B%0A%7D%0A%7D)%3B%0APolymer.EventApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.Event%20%3D%20function%20(event)%20%7B%0Athis.event%20%3D%20event%3B%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.path%5B0%5D%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20path()%20%7B%0Areturn%20this.event.path%3B%0A%7D%0A%7D%3B%0A%7D%20else%20%7B%0ADomApi.Event.prototype%20%3D%20%7B%0Aget%20rootTarget()%20%7B%0Areturn%20this.event.target%3B%0A%7D%2C%0Aget%20localTarget()%20%7B%0Avar%20current%20%3D%20this.event.currentTarget%3B%0Avar%20currentRoot%20%3D%20current%20%26%26%20Polymer.dom(current).getOwnerRoot()%3B%0Avar%20p%24%20%3D%20this.path%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20p%24.length%3B%20i%2B%2B)%20%7B%0Aif%20(Polymer.dom(p%24%5Bi%5D).getOwnerRoot()%20%3D%3D%3D%20currentRoot)%20%7B%0Areturn%20p%24%5Bi%5D%3B%0A%7D%0A%7D%0A%7D%2C%0Aget%20path()%20%7B%0Aif%20(!this.event._path)%20%7B%0Avar%20path%20%3D%20%5B%5D%3B%0Avar%20current%20%3D%20this.rootTarget%3B%0Awhile%20(current)%20%7B%0Apath.push(current)%3B%0Avar%20insertionPoints%20%3D%20Polymer.dom(current).getDestinationInsertionPoints()%3B%0Aif%20(insertionPoints.length)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20insertionPoints.length%20-%201%3B%20i%2B%2B)%20%7B%0Apath.push(insertionPoints%5Bi%5D)%3B%0A%7D%0Acurrent%20%3D%20insertionPoints%5BinsertionPoints.length%20-%201%5D%3B%0A%7D%20else%20%7B%0Acurrent%20%3D%20Polymer.dom(current).parentNode%20%7C%7C%20current.host%3B%0A%7D%0A%7D%0Apath.push(window)%3B%0Athis.event._path%20%3D%20path%3B%0A%7D%0Areturn%20this.event._path%3B%0A%7D%0A%7D%3B%0A%7D%0Avar%20factory%20%3D%20function%20(event)%20%7B%0Aif%20(!event.__eventApi)%20%7B%0Aevent.__eventApi%20%3D%20new%20DomApi.Event(event)%3B%0A%7D%0Areturn%20event.__eventApi%3B%0A%7D%3B%0Areturn%20%7B%20factory%3A%20factory%20%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20useShadow%20%3D%20Polymer.Settings.useShadow%3B%0AObject.defineProperty(DomApi.prototype%2C%20'classList'%2C%20%7B%0Aget%3A%20function%20()%20%7B%0Aif%20(!this._classList)%20%7B%0Athis._classList%20%3D%20new%20DomApi.ClassList(this)%3B%0A%7D%0Areturn%20this._classList%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0ADomApi.ClassList%20%3D%20function%20(host)%20%7B%0Athis.domApi%20%3D%20host%3B%0Athis.node%20%3D%20host.node%3B%0A%7D%3B%0ADomApi.ClassList.prototype%20%3D%20%7B%0Aadd%3A%20function%20()%20%7B%0Athis.node.classList.add.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Aremove%3A%20function%20()%20%7B%0Athis.node.classList.remove.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0Atoggle%3A%20function%20()%20%7B%0Athis.node.classList.toggle.apply(this.node.classList%2C%20arguments)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0A_distributeParent%3A%20function%20()%20%7B%0Aif%20(!useShadow)%20%7B%0Athis.domApi._maybeDistributeParent()%3B%0A%7D%0A%7D%2C%0Acontains%3A%20function%20()%20%7B%0Areturn%20this.node.classList.contains.apply(this.node.classList%2C%20arguments)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.EffectiveNodesObserver%20%3D%20function%20(domApi)%20%7B%0Athis.domApi%20%3D%20domApi%3B%0Athis.node%20%3D%20this.domApi.node%3B%0Athis._listeners%20%3D%20%5B%5D%3B%0A%7D%3B%0ADomApi.EffectiveNodesObserver.prototype%20%3D%20%7B%0AaddListener%3A%20function%20(callback)%20%7B%0Aif%20(!this._isSetup)%20%7B%0Athis._setup()%3B%0Athis._isSetup%20%3D%20true%3B%0A%7D%0Avar%20listener%20%3D%20%7B%0Afn%3A%20callback%2C%0A_nodes%3A%20%5B%5D%0A%7D%3B%0Athis._listeners.push(listener)%3B%0Athis._scheduleNotify()%3B%0Areturn%20listener%3B%0A%7D%2C%0AremoveListener%3A%20function%20(handle)%20%7B%0Avar%20i%20%3D%20this._listeners.indexOf(handle)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Athis._listeners.splice(i%2C%201)%3B%0Ahandle._nodes%20%3D%20%5B%5D%3B%0A%7D%0Aif%20(!this._hasListeners())%20%7B%0Athis._cleanup()%3B%0Athis._isSetup%20%3D%20false%3B%0A%7D%0A%7D%2C%0A_setup%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._unobserveContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_hasListeners%3A%20function%20()%20%7B%0Areturn%20Boolean(this._listeners.length)%3B%0A%7D%2C%0A_scheduleNotify%3A%20function%20()%20%7B%0Aif%20(this._debouncer)%20%7B%0Athis._debouncer.stop()%3B%0A%7D%0Athis._debouncer%20%3D%20Polymer.Debounce(this._debouncer%2C%20this._notify)%3B%0Athis._debouncer.context%20%3D%20this%3B%0APolymer.dom.addDebouncer(this._debouncer)%3B%0A%7D%2C%0Anotify%3A%20function%20()%20%7B%0Aif%20(this._hasListeners())%20%7B%0Athis._scheduleNotify()%3B%0A%7D%0A%7D%2C%0A_notify%3A%20function%20()%20%7B%0Athis._beforeCallListeners()%3B%0Athis._callListeners()%3B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0Athis._updateContentElements()%3B%0A%7D%2C%0A_updateContentElements%3A%20function%20()%20%7B%0Athis._observeContentElements(this.domApi.childNodes)%3B%0A%7D%2C%0A_observeContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0An.__observeNodesMap%20%3D%20n.__observeNodesMap%20%7C%7C%20new%20WeakMap()%3B%0Aif%20(!n.__observeNodesMap.has(this))%20%7B%0An.__observeNodesMap.set(this%2C%20this._observeContent(n))%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_observeContent%3A%20function%20(content)%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20h%20%3D%20Polymer.dom(content).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Ah._avoidChangeCalculation%20%3D%20true%3B%0Areturn%20h%3B%0A%7D%2C%0A_unobserveContentElements%3A%20function%20(elements)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%2C%20h%3B%20i%20%3C%20elements.length%20%26%26%20(n%20%3D%20elements%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(this._isContent(n))%20%7B%0Ah%20%3D%20n.__observeNodesMap.get(this)%3B%0Aif%20(h)%20%7B%0APolymer.dom(n).unobserveNodes(h)%3B%0An.__observeNodesMap.delete(this)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_isContent%3A%20function%20(node)%20%7B%0Areturn%20node.localName%20%3D%3D%3D%20'content'%3B%0A%7D%2C%0A_callListeners%3A%20function%20()%20%7B%0Avar%20o%24%20%3D%20this._listeners%3B%0Avar%20nodes%20%3D%20this._getEffectiveNodes()%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20o%24.length%20%26%26%20(o%20%3D%20o%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20info%20%3D%20this._generateListenerInfo(o%2C%20nodes)%3B%0Aif%20(info%20%7C%7C%20o._alwaysNotify)%20%7B%0Athis._callListener(o%2C%20info)%3B%0A%7D%0A%7D%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getEffectiveChildNodes()%3B%0A%7D%2C%0A_generateListenerInfo%3A%20function%20(listener%2C%20newNodes)%20%7B%0Aif%20(listener._avoidChangeCalculation)%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20oldNodes%20%3D%20listener._nodes%3B%0Avar%20info%20%3D%20%7B%0Atarget%3A%20this.node%2C%0AaddedNodes%3A%20%5B%5D%2C%0AremovedNodes%3A%20%5B%5D%0A%7D%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(newNodes%2C%20oldNodes)%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Ainfo.removedNodes.push(n)%3B%0A%7D%0A%7D%0Afor%20(i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(j%20%3D%20s.index%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0Ainfo.addedNodes.push(newNodes%5Bj%5D)%3B%0A%7D%0A%7D%0Alistener._nodes%20%3D%20newNodes%3B%0Aif%20(info.addedNodes.length%20%7C%7C%20info.removedNodes.length)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%2C%0A_callListener%3A%20function%20(listener%2C%20info)%20%7B%0Areturn%20listener.fn.call(this.node%2C%20info)%3B%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0A%7D%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0Avar%20baseSetup%20%3D%20DomApi.EffectiveNodesObserver.prototype._setup%3B%0Avar%20baseCleanup%20%3D%20DomApi.EffectiveNodesObserver.prototype._cleanup%3B%0APolymer.Base.extend(DomApi.EffectiveNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._mutationHandler%20%3D%20function%20(mxns)%20%7B%0Aif%20(mxns%20%26%26%20mxns.length)%20%7B%0Aself._scheduleNotify()%3B%0A%7D%0A%7D%3B%0Athis._observer%20%3D%20new%20MutationObserver(this._mutationHandler)%3B%0Athis._boundFlush%20%3D%20function%20()%20%7B%0Aself._flush()%3B%0A%7D%3B%0APolymer.dom.addStaticFlush(this._boundFlush)%3B%0Athis._observer.observe(this.node%2C%20%7B%20childList%3A%20true%20%7D)%3B%0A%7D%0AbaseSetup.call(this)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Athis._observer.disconnect()%3B%0Athis._observer%20%3D%20null%3B%0Athis._mutationHandler%20%3D%20null%3B%0APolymer.dom.removeStaticFlush(this._boundFlush)%3B%0AbaseCleanup.call(this)%3B%0A%7D%2C%0A_flush%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._mutationHandler(this._observer.takeRecords())%3B%0A%7D%0A%7D%2C%0AenableShadowAttributeTracking%3A%20function%20()%20%7B%0Aif%20(this._observer)%20%7B%0Athis._makeContentListenersAlwaysNotify()%3B%0Athis._observer.disconnect()%3B%0Athis._observer.observe(this.node%2C%20%7B%0AchildList%3A%20true%2C%0Aattributes%3A%20true%2C%0Asubtree%3A%20true%0A%7D)%3B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host%20%26%26%20Polymer.dom(host).observer)%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%2C%0A_makeContentListenersAlwaysNotify%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20this._listeners.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20this._listeners%5Bi%5D%3B%0Ah._alwaysNotify%20%3D%20h._isContentListener%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20DomApi%20%3D%20Polymer.DomApi.ctor%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0ADomApi.DistributedNodesObserver%20%3D%20function%20(domApi)%20%7B%0ADomApi.EffectiveNodesObserver.call(this%2C%20domApi)%3B%0A%7D%3B%0ADomApi.DistributedNodesObserver.prototype%20%3D%20Object.create(DomApi.EffectiveNodesObserver.prototype)%3B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0A%7D%2C%0A_beforeCallListeners%3A%20function%20()%20%7B%0A%7D%2C%0A_getEffectiveNodes%3A%20function%20()%20%7B%0Areturn%20this.domApi.getDistributedNodes()%3B%0A%7D%0A%7D)%3B%0Aif%20(Settings.useShadow)%20%7B%0APolymer.Base.extend(DomApi.DistributedNodesObserver.prototype%2C%20%7B%0A_setup%3A%20function%20()%20%7B%0Aif%20(!this._observer)%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0Avar%20self%20%3D%20this%3B%0Athis._observer%20%3D%20Polymer.dom(host).observeNodes(function%20()%20%7B%0Aself._scheduleNotify()%3B%0A%7D)%3B%0Athis._observer._isContentListener%20%3D%20true%3B%0Aif%20(this._hasAttrSelect())%20%7B%0APolymer.dom(host).observer.enableShadowAttributeTracking()%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_hasAttrSelect%3A%20function%20()%20%7B%0Avar%20select%20%3D%20this.node.getAttribute('select')%3B%0Areturn%20select%20%26%26%20select.match(%2F%5B%5B.%5D%2B%2F)%3B%0A%7D%2C%0A_cleanup%3A%20function%20()%20%7B%0Avar%20root%20%3D%20this.domApi.getOwnerRoot()%3B%0Avar%20host%20%3D%20root%20%26%26%20root.host%3B%0Aif%20(host)%20%7B%0APolymer.dom(host).unobserveNodes(this._observer)%3B%0A%7D%0Athis._observer%20%3D%20null%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D())%3B%0A(function%20()%20%7B%0Avar%20DomApi%20%3D%20Polymer.DomApi%3B%0Avar%20TreeApi%20%3D%20Polymer.TreeApi%3B%0APolymer.Base._addFeature(%7B%0A_prepShady%3A%20function%20()%20%7B%0Athis._useContent%20%3D%20this._useContent%20%7C%7C%20Boolean(this._template)%3B%0A%7D%2C%0A_setupShady%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20null%3B%0Aif%20(!this.__domApi)%20%7B%0Athis.__domApi%20%3D%20null%3B%0A%7D%0Aif%20(!this.__dom)%20%7B%0Athis.__dom%20%3D%20null%3B%0A%7D%0Aif%20(!this._ownerShadyRoot)%20%7B%0Athis._ownerShadyRoot%20%3D%20undefined%3B%0A%7D%0A%7D%2C%0A_poolContent%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0ATreeApi.Logical.saveChildNodes(this)%3B%0A%7D%0A%7D%2C%0A_setupRoot%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis._createLocalRoot()%3B%0Aif%20(!this.dataHost)%20%7B%0AupgradeLogicalChildren(TreeApi.Logical.getChildNodes(this))%3B%0A%7D%0A%7D%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.shadyRoot%20%3D%20this.root%3B%0Athis.shadyRoot._distributionClean%20%3D%20false%3B%0Athis.shadyRoot._hasDistributed%20%3D%20false%3B%0Athis.shadyRoot._isShadyRoot%20%3D%20true%3B%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0Avar%20i%24%20%3D%20this.shadyRoot._insertionPoints%20%3D%20!this._notes%20%7C%7C%20this._notes._hasContent%20%3F%20this.shadyRoot.querySelectorAll('content')%20%3A%20%5B%5D%3B%0ATreeApi.Logical.saveChildNodes(this.shadyRoot)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20i%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20i%24%5Bi%5D%3B%0ATreeApi.Logical.saveChildNodes(c)%3B%0ATreeApi.Logical.saveChildNodes(c.parentNode)%3B%0A%7D%0Athis.shadyRoot.host%20%3D%20this%3B%0A%7D%2C%0Aget%20domHost()%20%7B%0Avar%20root%20%3D%20Polymer.dom(this).getOwnerRoot()%3B%0Areturn%20root%20%26%26%20root.host%3B%0A%7D%2C%0AdistributeContent%3A%20function%20(updateInsertionPoints)%20%7B%0Aif%20(this.shadyRoot)%20%7B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20this.shadyRoot._invalidInsertionPoints%20%7C%7C%20updateInsertionPoints%3B%0Avar%20host%20%3D%20getTopDistributingHost(this)%3B%0APolymer.dom(this)._lazyDistribute(host)%3B%0A%7D%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20!this.shadyRoot._distributionClean)%20%7B%0Aif%20(this.shadyRoot._invalidInsertionPoints)%20%7B%0APolymer.dom(this)._updateInsertionPoints(this)%3B%0Athis.shadyRoot._invalidInsertionPoints%20%3D%20false%3B%0A%7D%0Athis._beginDistribute()%3B%0Athis._distributeDirtyRoots()%3B%0Athis._finishDistribute()%3B%0A%7D%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent%20%26%26%20DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._resetDistribution()%3B%0Athis._distributePool(this.shadyRoot%2C%20this._collectPool())%3B%0A%7D%0A%7D%2C%0A_distributeDirtyRoots%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.shadyRoot._dirtyRoots%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ac._distributeContent()%3B%0A%7D%0Athis.shadyRoot._dirtyRoots%20%3D%20%5B%5D%3B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0Athis.shadyRoot._distributionClean%20%3D%20true%3B%0Aif%20(DomApi.hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._composeTree()%3B%0AnotifyContentObservers(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0ATreeApi.Composed.clearChildNodes(this)%3B%0Athis.appendChild(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Avar%20children%20%3D%20this._composeNode(this)%3B%0Athis._updateChildNodes(this%2C%20children)%3B%0A%7D%0A%7D%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0AnotifyInitialDistribution(this)%3B%0A%7D%0Athis.shadyRoot._hasDistributed%20%3D%20true%3B%0A%7D%0A%7D%2C%0AelementMatches%3A%20function%20(selector%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Areturn%20DomApi.matchesSelector.call(node%2C%20selector)%3B%0A%7D%2C%0A_resetDistribution%3A%20function%20()%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(child._destinationInsertionPoints)%20%7B%0Achild._destinationInsertionPoints%20%3D%20undefined%3B%0A%7D%0Aif%20(isInsertionPoint(child))%20%7B%0AclearDistributedDestinationInsertionPoints(child)%3B%0A%7D%0A%7D%0Avar%20root%20%3D%20this.shadyRoot%3B%0Avar%20p%24%20%3D%20root._insertionPoints%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20p%24.length%3B%20j%2B%2B)%20%7B%0Ap%24%5Bj%5D._distributedNodes%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_collectPool%3A%20function%20()%20%7B%0Avar%20pool%20%3D%20%5B%5D%3B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(this)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20children%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Apool.push.apply(pool%2C%20child._distributedNodes)%3B%0A%7D%20else%20%7B%0Apool.push(child)%3B%0A%7D%0A%7D%0Areturn%20pool%3B%0A%7D%2C%0A_distributePool%3A%20function%20(node%2C%20pool)%20%7B%0Avar%20p%24%20%3D%20node._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._distributeInsertionPoint(p%2C%20pool)%3B%0AmaybeRedistributeParent(p%2C%20this)%3B%0A%7D%0A%7D%2C%0A_distributeInsertionPoint%3A%20function%20(content%2C%20pool)%20%7B%0Avar%20anyDistributed%20%3D%20false%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20pool.length%2C%20node%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Anode%20%3D%20pool%5Bi%5D%3B%0Aif%20(!node)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(this._matchesContentSelect(node%2C%20content))%20%7B%0AdistributeNodeInto(node%2C%20content)%3B%0Apool%5Bi%5D%20%3D%20undefined%3B%0AanyDistributed%20%3D%20true%3B%0A%7D%0A%7D%0Aif%20(!anyDistributed)%20%7B%0Avar%20children%20%3D%20TreeApi.Logical.getChildNodes(content)%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20children.length%3B%20j%2B%2B)%20%7B%0AdistributeNodeInto(children%5Bj%5D%2C%20content)%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeTree%3A%20function%20()%20%7B%0Athis._updateChildNodes(this%2C%20this._composeNode(this))%3B%0Avar%20p%24%20%3D%20this.shadyRoot._insertionPoints%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%2C%20parent%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparent%20%3D%20TreeApi.Logical.getParentNode(p)%3B%0Aif%20(!parent._useContent%20%26%26%20parent%20!%3D%3D%20this%20%26%26%20parent%20!%3D%3D%20this.shadyRoot)%20%7B%0Athis._updateChildNodes(parent%2C%20this._composeNode(parent))%3B%0A%7D%0A%7D%0A%7D%2C%0A_composeNode%3A%20function%20(node)%20%7B%0Avar%20children%20%3D%20%5B%5D%3B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(node.shadyRoot%20%7C%7C%20node)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Avar%20child%20%3D%20c%24%5Bi%5D%3B%0Aif%20(isInsertionPoint(child))%20%7B%0Avar%20distributedNodes%20%3D%20child._distributedNodes%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20distributedNodes.length%3B%20j%2B%2B)%20%7B%0Avar%20distributedNode%20%3D%20distributedNodes%5Bj%5D%3B%0Aif%20(isFinalDestination(child%2C%20distributedNode))%20%7B%0Achildren.push(distributedNode)%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Achildren.push(child)%3B%0A%7D%0A%7D%0Areturn%20children%3B%0A%7D%2C%0A_updateChildNodes%3A%20function%20(container%2C%20children)%20%7B%0Avar%20composed%20%3D%20TreeApi.Composed.getChildNodes(container)%3B%0Avar%20splices%20%3D%20Polymer.ArraySplice.calculateSplices(children%2C%20composed)%3B%0Afor%20(var%20i%20%3D%200%2C%20d%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20s.removed.length%20%26%26%20(n%20%3D%20s.removed%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Aif%20(TreeApi.Composed.getParentNode(n)%20%3D%3D%3D%20container)%20%7B%0ATreeApi.Composed.removeChild(container%2C%20n)%3B%0A%7D%0Acomposed.splice(s.index%20%2B%20d%2C%201)%3B%0A%7D%0Ad%20-%3D%20s.addedCount%3B%0A%7D%0Afor%20(var%20i%20%3D%200%2C%20s%2C%20next%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Anext%20%3D%20composed%5Bs.index%5D%3B%0Afor%20(j%20%3D%20s.index%2C%20n%3B%20j%20%3C%20s.index%20%2B%20s.addedCount%3B%20j%2B%2B)%20%7B%0An%20%3D%20children%5Bj%5D%3B%0ATreeApi.Composed.insertBefore(container%2C%20n%2C%20next)%3B%0Acomposed.splice(j%2C%200%2C%20n)%3B%0A%7D%0A%7D%0A%7D%2C%0A_matchesContentSelect%3A%20function%20(node%2C%20contentElement)%20%7B%0Avar%20select%20%3D%20contentElement.getAttribute('select')%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aselect%20%3D%20select.trim()%3B%0Aif%20(!select)%20%7B%0Areturn%20true%3B%0A%7D%0Aif%20(!(node%20instanceof%20Element))%20%7B%0Areturn%20false%3B%0A%7D%0Avar%20validSelectors%20%3D%20%2F%5E(%3Anot%5C()%3F%5B*.%23%5Ba-zA-Z_%7C%5D%2F%3B%0Aif%20(!validSelectors.test(select))%20%7B%0Areturn%20false%3B%0A%7D%0Areturn%20this.elementMatches(select%2C%20node)%3B%0A%7D%2C%0A_elementAdd%3A%20function%20()%20%7B%0A%7D%2C%0A_elementRemove%3A%20function%20()%20%7B%0A%7D%0A%7D)%3B%0Afunction%20distributeNodeInto(child%2C%20insertionPoint)%20%7B%0AinsertionPoint._distributedNodes.push(child)%3B%0Avar%20points%20%3D%20child._destinationInsertionPoints%3B%0Aif%20(!points)%20%7B%0Achild._destinationInsertionPoints%20%3D%20%5BinsertionPoint%5D%3B%0A%7D%20else%20%7B%0Apoints.push(insertionPoint)%3B%0A%7D%0A%7D%0Afunction%20clearDistributedDestinationInsertionPoints(content)%20%7B%0Avar%20e%24%20%3D%20content._distributedNodes%3B%0Aif%20(e%24)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20e%24.length%3B%20i%2B%2B)%20%7B%0Avar%20d%20%3D%20e%24%5Bi%5D._destinationInsertionPoints%3B%0Aif%20(d)%20%7B%0Ad.splice(d.indexOf(content)%20%2B%201%2C%20d.length)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Afunction%20maybeRedistributeParent(content%2C%20host)%20%7B%0Avar%20parent%20%3D%20TreeApi.Logical.getParentNode(content)%3B%0Aif%20(parent%20%26%26%20parent.shadyRoot%20%26%26%20DomApi.hasInsertionPoint(parent.shadyRoot)%20%26%26%20parent.shadyRoot._distributionClean)%20%7B%0Aparent.shadyRoot._distributionClean%20%3D%20false%3B%0Ahost.shadyRoot._dirtyRoots.push(parent)%3B%0A%7D%0A%7D%0Afunction%20isFinalDestination(insertionPoint%2C%20node)%20%7B%0Avar%20points%20%3D%20node._destinationInsertionPoints%3B%0Areturn%20points%20%26%26%20points%5Bpoints.length%20-%201%5D%20%3D%3D%3D%20insertionPoint%3B%0A%7D%0Afunction%20isInsertionPoint(node)%20%7B%0Areturn%20node.localName%20%3D%3D%20'content'%3B%0A%7D%0Afunction%20getTopDistributingHost(host)%20%7B%0Awhile%20(host%20%26%26%20hostNeedsRedistribution(host))%20%7B%0Ahost%20%3D%20host.domHost%3B%0A%7D%0Areturn%20host%3B%0A%7D%0Afunction%20hostNeedsRedistribution(host)%20%7B%0Avar%20c%24%20%3D%20TreeApi.Logical.getChildNodes(host)%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20c%24%5Bi%5D%3B%0Aif%20(c.localName%20%26%26%20c.localName%20%3D%3D%3D%20'content')%20%7B%0Areturn%20host.domHost%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyContentObservers(root)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20i%20%3C%20root._insertionPoints.length%3B%20i%2B%2B)%20%7B%0Ac%20%3D%20root._insertionPoints%5Bi%5D%3B%0Aif%20(DomApi.hasApi(c))%20%7B%0APolymer.dom(c).notifyObserver()%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyInitialDistribution(host)%20%7B%0Aif%20(DomApi.hasApi(host))%20%7B%0APolymer.dom(host).notifyObserver()%3B%0A%7D%0A%7D%0Avar%20needsUpgrade%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Afunction%20upgradeLogicalChildren(children)%20%7B%0Aif%20(needsUpgrade%20%26%26%20children)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0ACustomElements.upgrade(children%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0Aif%20(Polymer.Settings.useShadow)%20%7B%0APolymer.Base._addFeature(%7B%0A_poolContent%3A%20function%20()%20%7B%0A%7D%2C%0A_beginDistribute%3A%20function%20()%20%7B%0A%7D%2C%0AdistributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_distributeContent%3A%20function%20()%20%7B%0A%7D%2C%0A_finishDistribute%3A%20function%20()%20%7B%0A%7D%2C%0A_createLocalRoot%3A%20function%20()%20%7B%0Athis.createShadowRoot()%3B%0Athis.shadowRoot.appendChild(this.root)%3B%0Athis.root%20%3D%20this.shadowRoot%3B%0A%7D%0A%7D)%3B%0A%7D%0APolymer.Async%20%3D%20%7B%0A_currVal%3A%200%2C%0A_lastVal%3A%200%2C%0A_callbacks%3A%20%5B%5D%2C%0A_twiddleContent%3A%200%2C%0A_twiddle%3A%20document.createTextNode('')%2C%0Arun%3A%20function%20(callback%2C%20waitTime)%20%7B%0Aif%20(waitTime%20%3E%200)%20%7B%0Areturn%20~setTimeout(callback%2C%20waitTime)%3B%0A%7D%20else%20%7B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athis._callbacks.push(callback)%3B%0Areturn%20this._currVal%2B%2B%3B%0A%7D%0A%7D%2C%0Acancel%3A%20function%20(handle)%20%7B%0Aif%20(handle%20%3C%200)%20%7B%0AclearTimeout(~handle)%3B%0A%7D%20else%20%7B%0Avar%20idx%20%3D%20handle%20-%20this._lastVal%3B%0Aif%20(idx%20%3E%3D%200)%20%7B%0Aif%20(!this._callbacks%5Bidx%5D)%20%7B%0Athrow%20'invalid%20async%20handle%3A%20'%20%2B%20handle%3B%0A%7D%0Athis._callbacks%5Bidx%5D%20%3D%20null%3B%0A%7D%0A%7D%0A%7D%2C%0A_atEndOfMicrotask%3A%20function%20()%20%7B%0Avar%20len%20%3D%20this._callbacks.length%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20len%3B%20i%2B%2B)%20%7B%0Avar%20cb%20%3D%20this._callbacks%5Bi%5D%3B%0Aif%20(cb)%20%7B%0Atry%20%7B%0Acb()%3B%0A%7D%20catch%20(e)%20%7B%0Ai%2B%2B%3B%0Athis._callbacks.splice(0%2C%20i)%3B%0Athis._lastVal%20%2B%3D%20i%3B%0Athis._twiddle.textContent%20%3D%20this._twiddleContent%2B%2B%3B%0Athrow%20e%3B%0A%7D%0A%7D%0A%7D%0Athis._callbacks.splice(0%2C%20len)%3B%0Athis._lastVal%20%2B%3D%20len%3B%0A%7D%0A%7D%3B%0Anew%20window.MutationObserver(function%20()%20%7B%0APolymer.Async._atEndOfMicrotask()%3B%0A%7D).observe(Polymer.Async._twiddle%2C%20%7B%20characterData%3A%20true%20%7D)%3B%0APolymer.Debounce%20%3D%20function%20()%20%7B%0Avar%20Async%20%3D%20Polymer.Async%3B%0Avar%20Debouncer%20%3D%20function%20(context)%20%7B%0Athis.context%20%3D%20context%3B%0Avar%20self%20%3D%20this%3B%0Athis.boundComplete%20%3D%20function%20()%20%7B%0Aself.complete()%3B%0A%7D%3B%0A%7D%3B%0ADebouncer.prototype%20%3D%20%7B%0Ago%3A%20function%20(callback%2C%20wait)%20%7B%0Avar%20h%3B%0Athis.finish%20%3D%20function%20()%20%7B%0AAsync.cancel(h)%3B%0A%7D%3B%0Ah%20%3D%20Async.run(this.boundComplete%2C%20wait)%3B%0Athis.callback%20%3D%20callback%3B%0A%7D%2C%0Astop%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.finish()%3B%0Athis.finish%20%3D%20null%3B%0A%7D%0A%7D%2C%0Acomplete%3A%20function%20()%20%7B%0Aif%20(this.finish)%20%7B%0Athis.stop()%3B%0Athis.callback.call(this.context)%3B%0A%7D%0A%7D%0A%7D%3B%0Afunction%20debounce(debouncer%2C%20callback%2C%20wait)%20%7B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%20else%20%7B%0Adebouncer%20%3D%20new%20Debouncer(this)%3B%0A%7D%0Adebouncer.go(callback%2C%20wait)%3B%0Areturn%20debouncer%3B%0A%7D%0Areturn%20debounce%3B%0A%7D()%3B%0APolymer.Base._addFeature(%7B%0A_setupDebouncers%3A%20function%20()%20%7B%0Athis._debouncers%20%3D%20%7B%7D%3B%0A%7D%2C%0Adebounce%3A%20function%20(jobName%2C%20callback%2C%20wait)%20%7B%0Areturn%20this._debouncers%5BjobName%5D%20%3D%20Polymer.Debounce.call(this%2C%20this._debouncers%5BjobName%5D%2C%20callback%2C%20wait)%3B%0A%7D%2C%0AisDebouncerActive%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Areturn%20!!(debouncer%20%26%26%20debouncer.finish)%3B%0A%7D%2C%0AflushDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.complete()%3B%0A%7D%0A%7D%2C%0AcancelDebouncer%3A%20function%20(jobName)%20%7B%0Avar%20debouncer%20%3D%20this._debouncers%5BjobName%5D%3B%0Aif%20(debouncer)%20%7B%0Adebouncer.stop()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.DomModule%20%3D%20document.createElement('dom-module')%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepTemplate()%3B%0Athis._prepShady()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._registerHost()%3B%0Aif%20(this._template)%20%7B%0Athis._poolContent()%3B%0Athis._beginHosting()%3B%0Athis._stampTemplate()%3B%0Athis._endHosting()%3B%0A%7D%0Athis._marshalHostAttributes()%3B%0Athis._setupDebouncers()%3B%0Athis._marshalBehaviors()%3B%0Athis._tryReady()%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-mini.html.js%0A:49 in _tryReady data:text/javascript;charset=utf-8,Polymer.nar%20%3D%20%5B%5D%3B%0APolymer.Annotations%20%3D%20%7B%0AparseAnnotations%3A%20function%20(template)%20%7B%0Avar%20list%20%3D%20%5B%5D%3B%0Avar%20content%20%3D%20template._content%20%7C%7C%20template.content%3B%0Athis._parseNodeAnnotations(content%2C%20list%2C%20template.hasAttribute('strip-whitespace'))%3B%0Areturn%20list%3B%0A%7D%2C%0A_parseNodeAnnotations%3A%20function%20(node%2C%20list%2C%20stripWhiteSpace)%20%7B%0Areturn%20node.nodeType%20%3D%3D%3D%20Node.TEXT_NODE%20%3F%20this._parseTextNodeAnnotation(node%2C%20list)%20%3A%20this._parseElementAnnotations(node%2C%20list%2C%20stripWhiteSpace)%3B%0A%7D%2C%0A_bindingRegex%3A%20function%20()%20%7B%0Avar%20IDENT%20%3D%20'(%3F%3A'%20%2B%20'%5Ba-zA-Z_%24%5D%5B%5C%5Cw.%3A%24%5C%5C-*%5D*'%20%2B%20')'%3B%0Avar%20NUMBER%20%3D%20'(%3F%3A'%20%2B%20'%5B-%2B%5D%3F%5B0-9%5D*%5C%5C.%3F%5B0-9%5D%2B(%3F%3A%5BeE%5D%5B-%2B%5D%3F%5B0-9%5D%2B)%3F'%20%2B%20')'%3B%0Avar%20SQUOTE_STRING%20%3D%20'(%3F%3A'%20%2B%20'%5C'(%3F%3A%5B%5E%5C'%5C%5C%5C%5C%5D%7C%5C%5C%5C%5C.)*%5C''%20%2B%20')'%3B%0Avar%20DQUOTE_STRING%20%3D%20'(%3F%3A'%20%2B%20'%22(%3F%3A%5B%5E%22%5C%5C%5C%5C%5D%7C%5C%5C%5C%5C.)*%22'%20%2B%20')'%3B%0Avar%20STRING%20%3D%20'(%3F%3A'%20%2B%20SQUOTE_STRING%20%2B%20'%7C'%20%2B%20DQUOTE_STRING%20%2B%20')'%3B%0Avar%20ARGUMENT%20%3D%20'(%3F%3A'%20%2B%20IDENT%20%2B%20'%7C'%20%2B%20NUMBER%20%2B%20'%7C'%20%2B%20STRING%20%2B%20'%5C%5Cs*'%20%2B%20')'%3B%0Avar%20ARGUMENTS%20%3D%20'(%3F%3A'%20%2B%20ARGUMENT%20%2B%20'(%3F%3A%2C%5C%5Cs*'%20%2B%20ARGUMENT%20%2B%20')*'%20%2B%20')'%3B%0Avar%20ARGUMENT_LIST%20%3D%20'(%3F%3A'%20%2B%20'%5C%5C(%5C%5Cs*'%20%2B%20'(%3F%3A'%20%2B%20ARGUMENTS%20%2B%20'%3F'%20%2B%20')'%20%2B%20'%5C%5C)%5C%5Cs*'%20%2B%20')'%3B%0Avar%20BINDING%20%3D%20'('%20%2B%20IDENT%20%2B%20'%5C%5Cs*'%20%2B%20ARGUMENT_LIST%20%2B%20'%3F'%20%2B%20')'%3B%0Avar%20OPEN_BRACKET%20%3D%20'(%5C%5C%5B%5C%5C%5B%7C%7B%7B)'%20%2B%20'%5C%5Cs*'%3B%0Avar%20CLOSE_BRACKET%20%3D%20'(%3F%3A%5D%5D%7C%7D%7D)'%3B%0Avar%20NEGATE%20%3D%20'(%3F%3A(!)%5C%5Cs*)%3F'%3B%0Avar%20EXPRESSION%20%3D%20OPEN_BRACKET%20%2B%20NEGATE%20%2B%20BINDING%20%2B%20CLOSE_BRACKET%3B%0Areturn%20new%20RegExp(EXPRESSION%2C%20'g')%3B%0A%7D()%2C%0A_parseBindings%3A%20function%20(text)%20%7B%0Avar%20re%20%3D%20this._bindingRegex%3B%0Avar%20parts%20%3D%20%5B%5D%3B%0Avar%20lastIndex%20%3D%200%3B%0Avar%20m%3B%0Awhile%20((m%20%3D%20re.exec(text))%20!%3D%3D%20null)%20%7B%0Aif%20(m.index%20%3E%20lastIndex)%20%7B%0Aparts.push(%7B%20literal%3A%20text.slice(lastIndex%2C%20m.index)%20%7D)%3B%0A%7D%0Avar%20mode%20%3D%20m%5B1%5D%5B0%5D%3B%0Avar%20negate%20%3D%20Boolean(m%5B2%5D)%3B%0Avar%20value%20%3D%20m%5B3%5D.trim()%3B%0Avar%20customEvent%2C%20notifyEvent%2C%20colon%3B%0Aif%20(mode%20%3D%3D%20'%7B'%20%26%26%20(colon%20%3D%20value.indexOf('%3A%3A'))%20%3E%200)%20%7B%0AnotifyEvent%20%3D%20value.substring(colon%20%2B%202)%3B%0Avalue%20%3D%20value.substring(0%2C%20colon)%3B%0AcustomEvent%20%3D%20true%3B%0A%7D%0Aparts.push(%7B%0AcompoundIndex%3A%20parts.length%2C%0Avalue%3A%20value%2C%0Amode%3A%20mode%2C%0Anegate%3A%20negate%2C%0Aevent%3A%20notifyEvent%2C%0AcustomEvent%3A%20customEvent%0A%7D)%3B%0AlastIndex%20%3D%20re.lastIndex%3B%0A%7D%0Aif%20(lastIndex%20%26%26%20lastIndex%20%3C%20text.length)%20%7B%0Avar%20literal%20%3D%20text.substring(lastIndex)%3B%0Aif%20(literal)%20%7B%0Aparts.push(%7B%20literal%3A%20literal%20%7D)%3B%0A%7D%0A%7D%0Aif%20(parts.length)%20%7B%0Areturn%20parts%3B%0A%7D%0A%7D%2C%0A_literalFromParts%3A%20function%20(parts)%20%7B%0Avar%20s%20%3D%20''%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20parts.length%3B%20i%2B%2B)%20%7B%0Avar%20literal%20%3D%20parts%5Bi%5D.literal%3B%0As%20%2B%3D%20literal%20%7C%7C%20''%3B%0A%7D%0Areturn%20s%3B%0A%7D%2C%0A_parseTextNodeAnnotation%3A%20function%20(node%2C%20list)%20%7B%0Avar%20parts%20%3D%20this._parseBindings(node.textContent)%3B%0Aif%20(parts)%20%7B%0Anode.textContent%20%3D%20this._literalFromParts(parts)%20%7C%7C%20'%20'%3B%0Avar%20annote%20%3D%20%7B%0Abindings%3A%20%5B%7B%0Akind%3A%20'text'%2C%0Aname%3A%20'textContent'%2C%0Aparts%3A%20parts%2C%0AisCompound%3A%20parts.length%20!%3D%3D%201%0A%7D%5D%0A%7D%3B%0Alist.push(annote)%3B%0Areturn%20annote%3B%0A%7D%0A%7D%2C%0A_parseElementAnnotations%3A%20function%20(element%2C%20list%2C%20stripWhiteSpace)%20%7B%0Avar%20annote%20%3D%20%7B%0Abindings%3A%20%5B%5D%2C%0Aevents%3A%20%5B%5D%0A%7D%3B%0Aif%20(element.localName%20%3D%3D%3D%20'content')%20%7B%0Alist._hasContent%20%3D%20true%3B%0A%7D%0Athis._parseChildNodesAnnotations(element%2C%20annote%2C%20list%2C%20stripWhiteSpace)%3B%0Aif%20(element.attributes)%20%7B%0Athis._parseNodeAttributeAnnotations(element%2C%20annote%2C%20list)%3B%0Aif%20(this.prepElement)%20%7B%0Athis.prepElement(element)%3B%0A%7D%0A%7D%0Aif%20(annote.bindings.length%20%7C%7C%20annote.events.length%20%7C%7C%20annote.id)%20%7B%0Alist.push(annote)%3B%0A%7D%0Areturn%20annote%3B%0A%7D%2C%0A_parseChildNodesAnnotations%3A%20function%20(root%2C%20annote%2C%20list%2C%20stripWhiteSpace)%20%7B%0Aif%20(root.firstChild)%20%7B%0Avar%20node%20%3D%20root.firstChild%3B%0Avar%20i%20%3D%200%3B%0Awhile%20(node)%20%7B%0Avar%20next%20%3D%20node.nextSibling%3B%0Aif%20(node.localName%20%3D%3D%3D%20'template'%20%26%26%20!node.hasAttribute('preserve-content'))%20%7B%0Athis._parseTemplate(node%2C%20i%2C%20list%2C%20annote)%3B%0A%7D%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.TEXT_NODE)%20%7B%0Avar%20n%20%3D%20next%3B%0Awhile%20(n%20%26%26%20n.nodeType%20%3D%3D%3D%20Node.TEXT_NODE)%20%7B%0Anode.textContent%20%2B%3D%20n.textContent%3B%0Anext%20%3D%20n.nextSibling%3B%0Aroot.removeChild(n)%3B%0An%20%3D%20next%3B%0A%7D%0Aif%20(stripWhiteSpace%20%26%26%20!node.textContent.trim())%20%7B%0Aroot.removeChild(node)%3B%0Ai--%3B%0A%7D%0A%7D%0Aif%20(node.parentNode)%20%7B%0Avar%20childAnnotation%20%3D%20this._parseNodeAnnotations(node%2C%20list%2C%20stripWhiteSpace)%3B%0Aif%20(childAnnotation)%20%7B%0AchildAnnotation.parent%20%3D%20annote%3B%0AchildAnnotation.index%20%3D%20i%3B%0A%7D%0A%7D%0Anode%20%3D%20next%3B%0Ai%2B%2B%3B%0A%7D%0A%7D%0A%7D%2C%0A_parseTemplate%3A%20function%20(node%2C%20index%2C%20list%2C%20parent)%20%7B%0Avar%20content%20%3D%20document.createDocumentFragment()%3B%0Acontent._notes%20%3D%20this.parseAnnotations(node)%3B%0Acontent.appendChild(node.content)%3B%0Alist.push(%7B%0Abindings%3A%20Polymer.nar%2C%0Aevents%3A%20Polymer.nar%2C%0AtemplateContent%3A%20content%2C%0Aparent%3A%20parent%2C%0Aindex%3A%20index%0A%7D)%3B%0A%7D%2C%0A_parseNodeAttributeAnnotations%3A%20function%20(node%2C%20annotation)%20%7B%0Avar%20attrs%20%3D%20Array.prototype.slice.call(node.attributes)%3B%0Afor%20(var%20i%20%3D%20attrs.length%20-%201%2C%20a%3B%20a%20%3D%20attrs%5Bi%5D%3B%20i--)%20%7B%0Avar%20n%20%3D%20a.name%3B%0Avar%20v%20%3D%20a.value%3B%0Avar%20b%3B%0Aif%20(n.slice(0%2C%203)%20%3D%3D%3D%20'on-')%20%7B%0Anode.removeAttribute(n)%3B%0Aannotation.events.push(%7B%0Aname%3A%20n.slice(3)%2C%0Avalue%3A%20v%0A%7D)%3B%0A%7D%20else%20if%20(b%20%3D%20this._parseNodeAttributeAnnotation(node%2C%20n%2C%20v))%20%7B%0Aannotation.bindings.push(b)%3B%0A%7D%20else%20if%20(n%20%3D%3D%3D%20'id')%20%7B%0Aannotation.id%20%3D%20v%3B%0A%7D%0A%7D%0A%7D%2C%0A_parseNodeAttributeAnnotation%3A%20function%20(node%2C%20name%2C%20value)%20%7B%0Avar%20parts%20%3D%20this._parseBindings(value)%3B%0Aif%20(parts)%20%7B%0Avar%20origName%20%3D%20name%3B%0Avar%20kind%20%3D%20'property'%3B%0Aif%20(name%5Bname.length%20-%201%5D%20%3D%3D%20'%24')%20%7B%0Aname%20%3D%20name.slice(0%2C%20-1)%3B%0Akind%20%3D%20'attribute'%3B%0A%7D%0Avar%20literal%20%3D%20this._literalFromParts(parts)%3B%0Aif%20(literal%20%26%26%20kind%20%3D%3D%20'attribute')%20%7B%0Anode.setAttribute(name%2C%20literal)%3B%0A%7D%0Aif%20(node.localName%20%3D%3D%3D%20'input'%20%26%26%20origName%20%3D%3D%3D%20'value')%20%7B%0Anode.setAttribute(origName%2C%20'')%3B%0A%7D%0Anode.removeAttribute(origName)%3B%0Avar%20propertyName%20%3D%20Polymer.CaseMap.dashToCamelCase(name)%3B%0Aif%20(kind%20%3D%3D%3D%20'property')%20%7B%0Aname%20%3D%20propertyName%3B%0A%7D%0Areturn%20%7B%0Akind%3A%20kind%2C%0Aname%3A%20name%2C%0ApropertyName%3A%20propertyName%2C%0Aparts%3A%20parts%2C%0Aliteral%3A%20literal%2C%0AisCompound%3A%20parts.length%20!%3D%3D%201%0A%7D%3B%0A%7D%0A%7D%2C%0AfindAnnotatedNode%3A%20function%20(root%2C%20annote)%20%7B%0Avar%20parent%20%3D%20annote.parent%20%26%26%20Polymer.Annotations.findAnnotatedNode(root%2C%20annote.parent)%3B%0Aif%20(parent)%20%7B%0Afor%20(var%20n%20%3D%20parent.firstChild%2C%20i%20%3D%200%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Aif%20(annote.index%20%3D%3D%3D%20i%2B%2B)%20%7B%0Areturn%20n%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Areturn%20root%3B%0A%7D%0A%7D%0A%7D%3B%0A(function%20()%20%7B%0Afunction%20resolveCss(cssText%2C%20ownerDocument)%20%7B%0Areturn%20cssText.replace(CSS_URL_RX%2C%20function%20(m%2C%20pre%2C%20url%2C%20post)%20%7B%0Areturn%20pre%20%2B%20'%5C''%20%2B%20resolve(url.replace(%2F%5B%22'%5D%2Fg%2C%20'')%2C%20ownerDocument)%20%2B%20'%5C''%20%2B%20post%3B%0A%7D)%3B%0A%7D%0Afunction%20resolveAttrs(element%2C%20ownerDocument)%20%7B%0Afor%20(var%20name%20in%20URL_ATTRS)%20%7B%0Avar%20a%24%20%3D%20URL_ATTRS%5Bname%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20a%24.length%2C%20a%2C%20at%2C%20v%3B%20i%20%3C%20l%20%26%26%20(a%20%3D%20a%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(name%20%3D%3D%3D%20'*'%20%7C%7C%20element.localName%20%3D%3D%3D%20name)%20%7B%0Aat%20%3D%20element.attributes%5Ba%5D%3B%0Av%20%3D%20at%20%26%26%20at.value%3B%0Aif%20(v%20%26%26%20v.search(BINDING_RX)%20%3C%200)%20%7B%0Aat.value%20%3D%20a%20%3D%3D%3D%20'style'%20%3F%20resolveCss(v%2C%20ownerDocument)%20%3A%20resolve(v%2C%20ownerDocument)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0Afunction%20resolve(url%2C%20ownerDocument)%20%7B%0Aif%20(url%20%26%26%20url%5B0%5D%20%3D%3D%3D%20'%23')%20%7B%0Areturn%20url%3B%0A%7D%0Avar%20resolver%20%3D%20getUrlResolver(ownerDocument)%3B%0Aresolver.href%20%3D%20url%3B%0Areturn%20resolver.href%20%7C%7C%20url%3B%0A%7D%0Avar%20tempDoc%3B%0Avar%20tempDocBase%3B%0Afunction%20resolveUrl(url%2C%20baseUri)%20%7B%0Aif%20(!tempDoc)%20%7B%0AtempDoc%20%3D%20document.implementation.createHTMLDocument('temp')%3B%0AtempDocBase%20%3D%20tempDoc.createElement('base')%3B%0AtempDoc.head.appendChild(tempDocBase)%3B%0A%7D%0AtempDocBase.href%20%3D%20baseUri%3B%0Areturn%20resolve(url%2C%20tempDoc)%3B%0A%7D%0Afunction%20getUrlResolver(ownerDocument)%20%7B%0Areturn%20ownerDocument.__urlResolver%20%7C%7C%20(ownerDocument.__urlResolver%20%3D%20ownerDocument.createElement('a'))%3B%0A%7D%0Avar%20CSS_URL_RX%20%3D%20%2F(url%5C()(%5B%5E)%5D*)(%5C))%2Fg%3B%0Avar%20URL_ATTRS%20%3D%20%7B%0A'*'%3A%20%5B%0A'href'%2C%0A'src'%2C%0A'style'%2C%0A'url'%0A%5D%2C%0Aform%3A%20%5B'action'%5D%0A%7D%3B%0Avar%20BINDING_RX%20%3D%20%2F%5C%7B%5C%7B%7C%5C%5B%5C%5B%2F%3B%0APolymer.ResolveUrl%20%3D%20%7B%0AresolveCss%3A%20resolveCss%2C%0AresolveAttrs%3A%20resolveAttrs%2C%0AresolveUrl%3A%20resolveUrl%0A%7D%3B%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A_prepAnnotations%3A%20function%20()%20%7B%0Aif%20(!this._template)%20%7B%0Athis._notes%20%3D%20%5B%5D%3B%0A%7D%20else%20%7B%0Avar%20self%20%3D%20this%3B%0APolymer.Annotations.prepElement%20%3D%20function%20(element)%20%7B%0Aself._prepElement(element)%3B%0A%7D%3B%0Aif%20(this._template._content%20%26%26%20this._template._content._notes)%20%7B%0Athis._notes%20%3D%20this._template._content._notes%3B%0A%7D%20else%20%7B%0Athis._notes%20%3D%20Polymer.Annotations.parseAnnotations(this._template)%3B%0Athis._processAnnotations(this._notes)%3B%0A%7D%0APolymer.Annotations.prepElement%20%3D%20null%3B%0A%7D%0A%7D%2C%0A_processAnnotations%3A%20function%20(notes)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20notes.length%3B%20i%2B%2B)%20%7B%0Avar%20note%20%3D%20notes%5Bi%5D%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20note.bindings.length%3B%20j%2B%2B)%20%7B%0Avar%20b%20%3D%20note.bindings%5Bj%5D%3B%0Afor%20(var%20k%20%3D%200%3B%20k%20%3C%20b.parts.length%3B%20k%2B%2B)%20%7B%0Avar%20p%20%3D%20b.parts%5Bk%5D%3B%0Aif%20(!p.literal)%20%7B%0Avar%20signature%20%3D%20this._parseMethod(p.value)%3B%0Aif%20(signature)%20%7B%0Ap.signature%20%3D%20signature%3B%0A%7D%20else%20%7B%0Ap.model%20%3D%20this._modelForPath(p.value)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Aif%20(note.templateContent)%20%7B%0Athis._processAnnotations(note.templateContent._notes)%3B%0Avar%20pp%20%3D%20note.templateContent._parentProps%20%3D%20this._discoverTemplateParentProps(note.templateContent._notes)%3B%0Avar%20bindings%20%3D%20%5B%5D%3B%0Afor%20(var%20prop%20in%20pp)%20%7B%0Abindings.push(%7B%0Aindex%3A%20note.index%2C%0Akind%3A%20'property'%2C%0Aname%3A%20'_parent_'%20%2B%20prop%2C%0Aparts%3A%20%5B%7B%0Amode%3A%20'%7B'%2C%0Amodel%3A%20prop%2C%0Avalue%3A%20prop%0A%7D%5D%0A%7D)%3B%0A%7D%0Anote.bindings%20%3D%20note.bindings.concat(bindings)%3B%0A%7D%0A%7D%0A%7D%2C%0A_discoverTemplateParentProps%3A%20function%20(notes)%20%7B%0Avar%20pp%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20notes.length%20%26%26%20(n%20%3D%20notes%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%2C%20b%24%20%3D%20n.bindings%2C%20b%3B%20j%20%3C%20b%24.length%20%26%26%20(b%20%3D%20b%24%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Afor%20(var%20k%20%3D%200%2C%20p%24%20%3D%20b.parts%2C%20p%3B%20k%20%3C%20p%24.length%20%26%26%20(p%20%3D%20p%24%5Bk%5D)%3B%20k%2B%2B)%20%7B%0Aif%20(p.signature)%20%7B%0Avar%20args%20%3D%20p.signature.args%3B%0Afor%20(var%20kk%20%3D%200%3B%20kk%20%3C%20args.length%3B%20kk%2B%2B)%20%7B%0Avar%20model%20%3D%20args%5Bkk%5D.model%3B%0Aif%20(model)%20%7B%0App%5Bmodel%5D%20%3D%20true%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Aif%20(p.model)%20%7B%0App%5Bp.model%5D%20%3D%20true%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Aif%20(n.templateContent)%20%7B%0Avar%20tpp%20%3D%20n.templateContent._parentProps%3B%0APolymer.Base.mixin(pp%2C%20tpp)%3B%0A%7D%0A%7D%0Areturn%20pp%3B%0A%7D%2C%0A_prepElement%3A%20function%20(element)%20%7B%0APolymer.ResolveUrl.resolveAttrs(element%2C%20this._template.ownerDocument)%3B%0A%7D%2C%0A_findAnnotatedNode%3A%20Polymer.Annotations.findAnnotatedNode%2C%0A_marshalAnnotationReferences%3A%20function%20()%20%7B%0Aif%20(this._template)%20%7B%0Athis._marshalIdNodes()%3B%0Athis._marshalAnnotatedNodes()%3B%0Athis._marshalAnnotatedListeners()%3B%0A%7D%0A%7D%2C%0A_configureAnnotationReferences%3A%20function%20()%20%7B%0Avar%20notes%20%3D%20this._notes%3B%0Avar%20nodes%20%3D%20this._nodes%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20notes.length%3B%20i%2B%2B)%20%7B%0Avar%20note%20%3D%20notes%5Bi%5D%3B%0Avar%20node%20%3D%20nodes%5Bi%5D%3B%0Athis._configureTemplateContent(note%2C%20node)%3B%0Athis._configureCompoundBindings(note%2C%20node)%3B%0A%7D%0A%7D%2C%0A_configureTemplateContent%3A%20function%20(note%2C%20node)%20%7B%0Aif%20(note.templateContent)%20%7B%0Anode._content%20%3D%20note.templateContent%3B%0A%7D%0A%7D%2C%0A_configureCompoundBindings%3A%20function%20(note%2C%20node)%20%7B%0Avar%20bindings%20%3D%20note.bindings%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20bindings.length%3B%20i%2B%2B)%20%7B%0Avar%20binding%20%3D%20bindings%5Bi%5D%3B%0Aif%20(binding.isCompound)%20%7B%0Avar%20storage%20%3D%20node.__compoundStorage__%20%7C%7C%20(node.__compoundStorage__%20%3D%20%7B%7D)%3B%0Avar%20parts%20%3D%20binding.parts%3B%0Avar%20literals%20%3D%20new%20Array(parts.length)%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20parts.length%3B%20j%2B%2B)%20%7B%0Aliterals%5Bj%5D%20%3D%20parts%5Bj%5D.literal%3B%0A%7D%0Avar%20name%20%3D%20binding.name%3B%0Astorage%5Bname%5D%20%3D%20literals%3B%0Aif%20(binding.literal%20%26%26%20binding.kind%20%3D%3D%20'property')%20%7B%0Aif%20(node._configValue)%20%7B%0Anode._configValue(name%2C%20binding.literal)%3B%0A%7D%20else%20%7B%0Anode%5Bname%5D%20%3D%20binding.literal%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_marshalIdNodes%3A%20function%20()%20%7B%0Athis.%24%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20this._notes.length%2C%20a%3B%20i%20%3C%20l%20%26%26%20(a%20%3D%20this._notes%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(a.id)%20%7B%0Athis.%24%5Ba.id%5D%20%3D%20this._findAnnotatedNode(this.root%2C%20a)%3B%0A%7D%0A%7D%0A%7D%2C%0A_marshalAnnotatedNodes%3A%20function%20()%20%7B%0Aif%20(this._notes%20%26%26%20this._notes.length)%20%7B%0Avar%20r%20%3D%20new%20Array(this._notes.length)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._notes.length%3B%20i%2B%2B)%20%7B%0Ar%5Bi%5D%20%3D%20this._findAnnotatedNode(this.root%2C%20this._notes%5Bi%5D)%3B%0A%7D%0Athis._nodes%20%3D%20r%3B%0A%7D%0A%7D%2C%0A_marshalAnnotatedListeners%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20this._notes.length%2C%20a%3B%20i%20%3C%20l%20%26%26%20(a%20%3D%20this._notes%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(a.events%20%26%26%20a.events.length)%20%7B%0Avar%20node%20%3D%20this._findAnnotatedNode(this.root%2C%20a)%3B%0Afor%20(var%20j%20%3D%200%2C%20e%24%20%3D%20a.events%2C%20e%3B%20j%20%3C%20e%24.length%20%26%26%20(e%20%3D%20e%24%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Athis.listen(node%2C%20e.name%2C%20e.value)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0Alisteners%3A%20%7B%7D%2C%0A_listenListeners%3A%20function%20(listeners)%20%7B%0Avar%20node%2C%20name%2C%20eventName%3B%0Afor%20(eventName%20in%20listeners)%20%7B%0Aif%20(eventName.indexOf('.')%20%3C%200)%20%7B%0Anode%20%3D%20this%3B%0Aname%20%3D%20eventName%3B%0A%7D%20else%20%7B%0Aname%20%3D%20eventName.split('.')%3B%0Anode%20%3D%20this.%24%5Bname%5B0%5D%5D%3B%0Aname%20%3D%20name%5B1%5D%3B%0A%7D%0Athis.listen(node%2C%20name%2C%20listeners%5BeventName%5D)%3B%0A%7D%0A%7D%2C%0Alisten%3A%20function%20(node%2C%20eventName%2C%20methodName)%20%7B%0Avar%20handler%20%3D%20this._recallEventHandler(this%2C%20eventName%2C%20node%2C%20methodName)%3B%0Aif%20(!handler)%20%7B%0Ahandler%20%3D%20this._createEventHandler(node%2C%20eventName%2C%20methodName)%3B%0A%7D%0Aif%20(handler._listening)%20%7B%0Areturn%3B%0A%7D%0Athis._listen(node%2C%20eventName%2C%20handler)%3B%0Ahandler._listening%20%3D%20true%3B%0A%7D%2C%0A_boundListenerKey%3A%20function%20(eventName%2C%20methodName)%20%7B%0Areturn%20eventName%20%2B%20'%3A'%20%2B%20methodName%3B%0A%7D%2C%0A_recordEventHandler%3A%20function%20(host%2C%20eventName%2C%20target%2C%20methodName%2C%20handler)%20%7B%0Avar%20hbl%20%3D%20host.__boundListeners%3B%0Aif%20(!hbl)%20%7B%0Ahbl%20%3D%20host.__boundListeners%20%3D%20new%20WeakMap()%3B%0A%7D%0Avar%20bl%20%3D%20hbl.get(target)%3B%0Aif%20(!bl)%20%7B%0Abl%20%3D%20%7B%7D%3B%0Ahbl.set(target%2C%20bl)%3B%0A%7D%0Avar%20key%20%3D%20this._boundListenerKey(eventName%2C%20methodName)%3B%0Abl%5Bkey%5D%20%3D%20handler%3B%0A%7D%2C%0A_recallEventHandler%3A%20function%20(host%2C%20eventName%2C%20target%2C%20methodName)%20%7B%0Avar%20hbl%20%3D%20host.__boundListeners%3B%0Aif%20(!hbl)%20%7B%0Areturn%3B%0A%7D%0Avar%20bl%20%3D%20hbl.get(target)%3B%0Aif%20(!bl)%20%7B%0Areturn%3B%0A%7D%0Avar%20key%20%3D%20this._boundListenerKey(eventName%2C%20methodName)%3B%0Areturn%20bl%5Bkey%5D%3B%0A%7D%2C%0A_createEventHandler%3A%20function%20(node%2C%20eventName%2C%20methodName)%20%7B%0Avar%20host%20%3D%20this%3B%0Avar%20handler%20%3D%20function%20(e)%20%7B%0Aif%20(host%5BmethodName%5D)%20%7B%0Ahost%5BmethodName%5D(e%2C%20e.detail)%3B%0A%7D%20else%20%7B%0Ahost._warn(host._logf('_createEventHandler'%2C%20'listener%20method%20%60'%20%2B%20methodName%20%2B%20'%60%20not%20defined'))%3B%0A%7D%0A%7D%3B%0Ahandler._listening%20%3D%20false%3B%0Athis._recordEventHandler(host%2C%20eventName%2C%20node%2C%20methodName%2C%20handler)%3B%0Areturn%20handler%3B%0A%7D%2C%0Aunlisten%3A%20function%20(node%2C%20eventName%2C%20methodName)%20%7B%0Avar%20handler%20%3D%20this._recallEventHandler(this%2C%20eventName%2C%20node%2C%20methodName)%3B%0Aif%20(handler)%20%7B%0Athis._unlisten(node%2C%20eventName%2C%20handler)%3B%0Ahandler._listening%20%3D%20false%3B%0A%7D%0A%7D%2C%0A_listen%3A%20function%20(node%2C%20eventName%2C%20handler)%20%7B%0Anode.addEventListener(eventName%2C%20handler)%3B%0A%7D%2C%0A_unlisten%3A%20function%20(node%2C%20eventName%2C%20handler)%20%7B%0Anode.removeEventListener(eventName%2C%20handler)%3B%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20wrap%20%3D%20Polymer.DomApi.wrap%3B%0Avar%20HAS_NATIVE_TA%20%3D%20typeof%20document.head.style.touchAction%20%3D%3D%3D%20'string'%3B%0Avar%20GESTURE_KEY%20%3D%20'__polymerGestures'%3B%0Avar%20HANDLED_OBJ%20%3D%20'__polymerGesturesHandled'%3B%0Avar%20TOUCH_ACTION%20%3D%20'__polymerGesturesTouchAction'%3B%0Avar%20TAP_DISTANCE%20%3D%2025%3B%0Avar%20TRACK_DISTANCE%20%3D%205%3B%0Avar%20TRACK_LENGTH%20%3D%202%3B%0Avar%20MOUSE_TIMEOUT%20%3D%202500%3B%0Avar%20MOUSE_EVENTS%20%3D%20%5B%0A'mousedown'%2C%0A'mousemove'%2C%0A'mouseup'%2C%0A'click'%0A%5D%3B%0Avar%20MOUSE_WHICH_TO_BUTTONS%20%3D%20%5B%0A0%2C%0A1%2C%0A4%2C%0A2%0A%5D%3B%0Avar%20MOUSE_HAS_BUTTONS%20%3D%20function%20()%20%7B%0Atry%20%7B%0Areturn%20new%20MouseEvent('test'%2C%20%7B%20buttons%3A%201%20%7D).buttons%20%3D%3D%3D%201%3B%0A%7D%20catch%20(e)%20%7B%0Areturn%20false%3B%0A%7D%0A%7D()%3B%0Avar%20IS_TOUCH_ONLY%20%3D%20navigator.userAgent.match(%2FiP(%3F%3A%5Boa%5Dd%7Chone)%7CAndroid%2F)%3B%0Avar%20mouseCanceller%20%3D%20function%20(mouseEvent)%20%7B%0AmouseEvent%5BHANDLED_OBJ%5D%20%3D%20%7B%20skip%3A%20true%20%7D%3B%0Aif%20(mouseEvent.type%20%3D%3D%3D%20'click')%20%7B%0Avar%20path%20%3D%20Polymer.dom(mouseEvent).path%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20path.length%3B%20i%2B%2B)%20%7B%0Aif%20(path%5Bi%5D%20%3D%3D%3D%20POINTERSTATE.mouse.target)%20%7B%0Areturn%3B%0A%7D%0A%7D%0AmouseEvent.preventDefault()%3B%0AmouseEvent.stopPropagation()%3B%0A%7D%0A%7D%3B%0Afunction%20setupTeardownMouseCanceller(setup)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20en%3B%20i%20%3C%20MOUSE_EVENTS.length%3B%20i%2B%2B)%20%7B%0Aen%20%3D%20MOUSE_EVENTS%5Bi%5D%3B%0Aif%20(setup)%20%7B%0Adocument.addEventListener(en%2C%20mouseCanceller%2C%20true)%3B%0A%7D%20else%20%7B%0Adocument.removeEventListener(en%2C%20mouseCanceller%2C%20true)%3B%0A%7D%0A%7D%0A%7D%0Afunction%20ignoreMouse()%20%7B%0Aif%20(IS_TOUCH_ONLY)%20%7B%0Areturn%3B%0A%7D%0Aif%20(!POINTERSTATE.mouse.mouseIgnoreJob)%20%7B%0AsetupTeardownMouseCanceller(true)%3B%0A%7D%0Avar%20unset%20%3D%20function%20()%20%7B%0AsetupTeardownMouseCanceller()%3B%0APOINTERSTATE.mouse.target%20%3D%20null%3B%0APOINTERSTATE.mouse.mouseIgnoreJob%20%3D%20null%3B%0A%7D%3B%0APOINTERSTATE.mouse.mouseIgnoreJob%20%3D%20Polymer.Debounce(POINTERSTATE.mouse.mouseIgnoreJob%2C%20unset%2C%20MOUSE_TIMEOUT)%3B%0A%7D%0Afunction%20hasLeftMouseButton(ev)%20%7B%0Avar%20type%20%3D%20ev.type%3B%0Aif%20(MOUSE_EVENTS.indexOf(type)%20%3D%3D%3D%20-1)%20%7B%0Areturn%20false%3B%0A%7D%0Aif%20(type%20%3D%3D%3D%20'mousemove')%20%7B%0Avar%20buttons%20%3D%20ev.buttons%20%3D%3D%3D%20undefined%20%3F%201%20%3A%20ev.buttons%3B%0Aif%20(ev%20instanceof%20window.MouseEvent%20%26%26%20!MOUSE_HAS_BUTTONS)%20%7B%0Abuttons%20%3D%20MOUSE_WHICH_TO_BUTTONS%5Bev.which%5D%20%7C%7C%200%3B%0A%7D%0Areturn%20Boolean(buttons%20%26%201)%3B%0A%7D%20else%20%7B%0Avar%20button%20%3D%20ev.button%20%3D%3D%3D%20undefined%20%3F%200%20%3A%20ev.button%3B%0Areturn%20button%20%3D%3D%3D%200%3B%0A%7D%0A%7D%0Afunction%20isSyntheticClick(ev)%20%7B%0Aif%20(ev.type%20%3D%3D%3D%20'click')%20%7B%0Aif%20(ev.detail%20%3D%3D%3D%200)%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20t%20%3D%20Gestures.findOriginalTarget(ev)%3B%0Avar%20bcr%20%3D%20t.getBoundingClientRect()%3B%0Avar%20x%20%3D%20ev.pageX%2C%20y%20%3D%20ev.pageY%3B%0Areturn%20!(x%20%3E%3D%20bcr.left%20%26%26%20x%20%3C%3D%20bcr.right%20%26%26%20(y%20%3E%3D%20bcr.top%20%26%26%20y%20%3C%3D%20bcr.bottom))%3B%0A%7D%0Areturn%20false%3B%0A%7D%0Avar%20POINTERSTATE%20%3D%20%7B%0Amouse%3A%20%7B%0Atarget%3A%20null%2C%0AmouseIgnoreJob%3A%20null%0A%7D%2C%0Atouch%3A%20%7B%0Ax%3A%200%2C%0Ay%3A%200%2C%0Aid%3A%20-1%2C%0AscrollDecided%3A%20false%0A%7D%0A%7D%3B%0Afunction%20firstTouchAction(ev)%20%7B%0Avar%20path%20%3D%20Polymer.dom(ev).path%3B%0Avar%20ta%20%3D%20'auto'%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20path.length%3B%20i%2B%2B)%20%7B%0An%20%3D%20path%5Bi%5D%3B%0Aif%20(n%5BTOUCH_ACTION%5D)%20%7B%0Ata%20%3D%20n%5BTOUCH_ACTION%5D%3B%0Abreak%3B%0A%7D%0A%7D%0Areturn%20ta%3B%0A%7D%0Afunction%20trackDocument(stateObj%2C%20movefn%2C%20upfn)%20%7B%0AstateObj.movefn%20%3D%20movefn%3B%0AstateObj.upfn%20%3D%20upfn%3B%0Adocument.addEventListener('mousemove'%2C%20movefn)%3B%0Adocument.addEventListener('mouseup'%2C%20upfn)%3B%0A%7D%0Afunction%20untrackDocument(stateObj)%20%7B%0Adocument.removeEventListener('mousemove'%2C%20stateObj.movefn)%3B%0Adocument.removeEventListener('mouseup'%2C%20stateObj.upfn)%3B%0AstateObj.movefn%20%3D%20null%3B%0AstateObj.upfn%20%3D%20null%3B%0A%7D%0Avar%20Gestures%20%3D%20%7B%0Agestures%3A%20%7B%7D%2C%0Arecognizers%3A%20%5B%5D%2C%0AdeepTargetFind%3A%20function%20(x%2C%20y)%20%7B%0Avar%20node%20%3D%20document.elementFromPoint(x%2C%20y)%3B%0Avar%20next%20%3D%20node%3B%0Awhile%20(next%20%26%26%20next.shadowRoot)%20%7B%0Anext%20%3D%20next.shadowRoot.elementFromPoint(x%2C%20y)%3B%0Aif%20(next)%20%7B%0Anode%20%3D%20next%3B%0A%7D%0A%7D%0Areturn%20node%3B%0A%7D%2C%0AfindOriginalTarget%3A%20function%20(ev)%20%7B%0Aif%20(ev.path)%20%7B%0Areturn%20ev.path%5B0%5D%3B%0A%7D%0Areturn%20ev.target%3B%0A%7D%2C%0AhandleNative%3A%20function%20(ev)%20%7B%0Avar%20handled%3B%0Avar%20type%20%3D%20ev.type%3B%0Avar%20node%20%3D%20wrap(ev.currentTarget)%3B%0Avar%20gobj%20%3D%20node%5BGESTURE_KEY%5D%3B%0Aif%20(!gobj)%20%7B%0Areturn%3B%0A%7D%0Avar%20gs%20%3D%20gobj%5Btype%5D%3B%0Aif%20(!gs)%20%7B%0Areturn%3B%0A%7D%0Aif%20(!ev%5BHANDLED_OBJ%5D)%20%7B%0Aev%5BHANDLED_OBJ%5D%20%3D%20%7B%7D%3B%0Aif%20(type.slice(0%2C%205)%20%3D%3D%3D%20'touch')%20%7B%0Avar%20t%20%3D%20ev.changedTouches%5B0%5D%3B%0Aif%20(type%20%3D%3D%3D%20'touchstart')%20%7B%0Aif%20(ev.touches.length%20%3D%3D%3D%201)%20%7B%0APOINTERSTATE.touch.id%20%3D%20t.identifier%3B%0A%7D%0A%7D%0Aif%20(POINTERSTATE.touch.id%20!%3D%3D%20t.identifier)%20%7B%0Areturn%3B%0A%7D%0Aif%20(!HAS_NATIVE_TA)%20%7B%0Aif%20(type%20%3D%3D%3D%20'touchstart'%20%7C%7C%20type%20%3D%3D%3D%20'touchmove')%20%7B%0AGestures.handleTouchAction(ev)%3B%0A%7D%0A%7D%0Aif%20(type%20%3D%3D%3D%20'touchend'%20%26%26%20!ev.__polymerSimulatedTouch)%20%7B%0APOINTERSTATE.mouse.target%20%3D%20Polymer.dom(ev).rootTarget%3B%0AignoreMouse(true)%3B%0A%7D%0A%7D%0A%7D%0Ahandled%20%3D%20ev%5BHANDLED_OBJ%5D%3B%0Aif%20(handled.skip)%20%7B%0Areturn%3B%0A%7D%0Avar%20recognizers%20%3D%20Gestures.recognizers%3B%0Afor%20(var%20i%20%3D%200%2C%20r%3B%20i%20%3C%20recognizers.length%3B%20i%2B%2B)%20%7B%0Ar%20%3D%20recognizers%5Bi%5D%3B%0Aif%20(gs%5Br.name%5D%20%26%26%20!handled%5Br.name%5D)%20%7B%0Aif%20(r.flow%20%26%26%20r.flow.start.indexOf(ev.type)%20%3E%20-1%20%26%26%20r.reset)%20%7B%0Ar.reset()%3B%0A%7D%0A%7D%0A%7D%0Afor%20(i%20%3D%200%2C%20r%3B%20i%20%3C%20recognizers.length%3B%20i%2B%2B)%20%7B%0Ar%20%3D%20recognizers%5Bi%5D%3B%0Aif%20(gs%5Br.name%5D%20%26%26%20!handled%5Br.name%5D)%20%7B%0Ahandled%5Br.name%5D%20%3D%20true%3B%0Ar%5Btype%5D(ev)%3B%0A%7D%0A%7D%0A%7D%2C%0AhandleTouchAction%3A%20function%20(ev)%20%7B%0Avar%20t%20%3D%20ev.changedTouches%5B0%5D%3B%0Avar%20type%20%3D%20ev.type%3B%0Aif%20(type%20%3D%3D%3D%20'touchstart')%20%7B%0APOINTERSTATE.touch.x%20%3D%20t.clientX%3B%0APOINTERSTATE.touch.y%20%3D%20t.clientY%3B%0APOINTERSTATE.touch.scrollDecided%20%3D%20false%3B%0A%7D%20else%20if%20(type%20%3D%3D%3D%20'touchmove')%20%7B%0Aif%20(POINTERSTATE.touch.scrollDecided)%20%7B%0Areturn%3B%0A%7D%0APOINTERSTATE.touch.scrollDecided%20%3D%20true%3B%0Avar%20ta%20%3D%20firstTouchAction(ev)%3B%0Avar%20prevent%20%3D%20false%3B%0Avar%20dx%20%3D%20Math.abs(POINTERSTATE.touch.x%20-%20t.clientX)%3B%0Avar%20dy%20%3D%20Math.abs(POINTERSTATE.touch.y%20-%20t.clientY)%3B%0Aif%20(!ev.cancelable)%20%7B%0A%7D%20else%20if%20(ta%20%3D%3D%3D%20'none')%20%7B%0Aprevent%20%3D%20true%3B%0A%7D%20else%20if%20(ta%20%3D%3D%3D%20'pan-x')%20%7B%0Aprevent%20%3D%20dy%20%3E%20dx%3B%0A%7D%20else%20if%20(ta%20%3D%3D%3D%20'pan-y')%20%7B%0Aprevent%20%3D%20dx%20%3E%20dy%3B%0A%7D%0Aif%20(prevent)%20%7B%0Aev.preventDefault()%3B%0A%7D%20else%20%7B%0AGestures.prevent('track')%3B%0A%7D%0A%7D%0A%7D%2C%0Aadd%3A%20function%20(node%2C%20evType%2C%20handler)%20%7B%0Anode%20%3D%20wrap(node)%3B%0Avar%20recognizer%20%3D%20this.gestures%5BevType%5D%3B%0Avar%20deps%20%3D%20recognizer.deps%3B%0Avar%20name%20%3D%20recognizer.name%3B%0Avar%20gobj%20%3D%20node%5BGESTURE_KEY%5D%3B%0Aif%20(!gobj)%20%7B%0Anode%5BGESTURE_KEY%5D%20%3D%20gobj%20%3D%20%7B%7D%3B%0A%7D%0Afor%20(var%20i%20%3D%200%2C%20dep%2C%20gd%3B%20i%20%3C%20deps.length%3B%20i%2B%2B)%20%7B%0Adep%20%3D%20deps%5Bi%5D%3B%0Aif%20(IS_TOUCH_ONLY%20%26%26%20MOUSE_EVENTS.indexOf(dep)%20%3E%20-1)%20%7B%0Acontinue%3B%0A%7D%0Agd%20%3D%20gobj%5Bdep%5D%3B%0Aif%20(!gd)%20%7B%0Agobj%5Bdep%5D%20%3D%20gd%20%3D%20%7B%20_count%3A%200%20%7D%3B%0A%7D%0Aif%20(gd._count%20%3D%3D%3D%200)%20%7B%0Anode.addEventListener(dep%2C%20this.handleNative)%3B%0A%7D%0Agd%5Bname%5D%20%3D%20(gd%5Bname%5D%20%7C%7C%200)%20%2B%201%3B%0Agd._count%20%3D%20(gd._count%20%7C%7C%200)%20%2B%201%3B%0A%7D%0Anode.addEventListener(evType%2C%20handler)%3B%0Aif%20(recognizer.touchAction)%20%7B%0Athis.setTouchAction(node%2C%20recognizer.touchAction)%3B%0A%7D%0A%7D%2C%0Aremove%3A%20function%20(node%2C%20evType%2C%20handler)%20%7B%0Anode%20%3D%20wrap(node)%3B%0Avar%20recognizer%20%3D%20this.gestures%5BevType%5D%3B%0Avar%20deps%20%3D%20recognizer.deps%3B%0Avar%20name%20%3D%20recognizer.name%3B%0Avar%20gobj%20%3D%20node%5BGESTURE_KEY%5D%3B%0Aif%20(gobj)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20dep%2C%20gd%3B%20i%20%3C%20deps.length%3B%20i%2B%2B)%20%7B%0Adep%20%3D%20deps%5Bi%5D%3B%0Agd%20%3D%20gobj%5Bdep%5D%3B%0Aif%20(gd%20%26%26%20gd%5Bname%5D)%20%7B%0Agd%5Bname%5D%20%3D%20(gd%5Bname%5D%20%7C%7C%201)%20-%201%3B%0Agd._count%20%3D%20(gd._count%20%7C%7C%201)%20-%201%3B%0Aif%20(gd._count%20%3D%3D%3D%200)%20%7B%0Anode.removeEventListener(dep%2C%20this.handleNative)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0Anode.removeEventListener(evType%2C%20handler)%3B%0A%7D%2C%0Aregister%3A%20function%20(recog)%20%7B%0Athis.recognizers.push(recog)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20recog.emits.length%3B%20i%2B%2B)%20%7B%0Athis.gestures%5Brecog.emits%5Bi%5D%5D%20%3D%20recog%3B%0A%7D%0A%7D%2C%0AfindRecognizerByEvent%3A%20function%20(evName)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20r%3B%20i%20%3C%20this.recognizers.length%3B%20i%2B%2B)%20%7B%0Ar%20%3D%20this.recognizers%5Bi%5D%3B%0Afor%20(var%20j%20%3D%200%2C%20n%3B%20j%20%3C%20r.emits.length%3B%20j%2B%2B)%20%7B%0An%20%3D%20r.emits%5Bj%5D%3B%0Aif%20(n%20%3D%3D%3D%20evName)%20%7B%0Areturn%20r%3B%0A%7D%0A%7D%0A%7D%0Areturn%20null%3B%0A%7D%2C%0AsetTouchAction%3A%20function%20(node%2C%20value)%20%7B%0Aif%20(HAS_NATIVE_TA)%20%7B%0Anode.style.touchAction%20%3D%20value%3B%0A%7D%0Anode%5BTOUCH_ACTION%5D%20%3D%20value%3B%0A%7D%2C%0Afire%3A%20function%20(target%2C%20type%2C%20detail)%20%7B%0Avar%20ev%20%3D%20Polymer.Base.fire(type%2C%20detail%2C%20%7B%0Anode%3A%20target%2C%0Abubbles%3A%20true%2C%0Acancelable%3A%20true%0A%7D)%3B%0Aif%20(ev.defaultPrevented)%20%7B%0Avar%20se%20%3D%20detail.sourceEvent%3B%0Aif%20(se%20%26%26%20se.preventDefault)%20%7B%0Ase.preventDefault()%3B%0A%7D%0A%7D%0A%7D%2C%0Aprevent%3A%20function%20(evName)%20%7B%0Avar%20recognizer%20%3D%20this.findRecognizerByEvent(evName)%3B%0Aif%20(recognizer.info)%20%7B%0Arecognizer.info.prevent%20%3D%20true%3B%0A%7D%0A%7D%0A%7D%3B%0AGestures.register(%7B%0Aname%3A%20'downup'%2C%0Adeps%3A%20%5B%0A'mousedown'%2C%0A'touchstart'%2C%0A'touchend'%0A%5D%2C%0Aflow%3A%20%7B%0Astart%3A%20%5B%0A'mousedown'%2C%0A'touchstart'%0A%5D%2C%0Aend%3A%20%5B%0A'mouseup'%2C%0A'touchend'%0A%5D%0A%7D%2C%0Aemits%3A%20%5B%0A'down'%2C%0A'up'%0A%5D%2C%0Ainfo%3A%20%7B%0Amovefn%3A%20null%2C%0Aupfn%3A%20null%0A%7D%2C%0Areset%3A%20function%20()%20%7B%0AuntrackDocument(this.info)%3B%0A%7D%2C%0Amousedown%3A%20function%20(e)%20%7B%0Aif%20(!hasLeftMouseButton(e))%20%7B%0Areturn%3B%0A%7D%0Avar%20t%20%3D%20Gestures.findOriginalTarget(e)%3B%0Avar%20self%20%3D%20this%3B%0Avar%20movefn%20%3D%20function%20movefn(e)%20%7B%0Aif%20(!hasLeftMouseButton(e))%20%7B%0Aself.fire('up'%2C%20t%2C%20e)%3B%0AuntrackDocument(self.info)%3B%0A%7D%0A%7D%3B%0Avar%20upfn%20%3D%20function%20upfn(e)%20%7B%0Aif%20(hasLeftMouseButton(e))%20%7B%0Aself.fire('up'%2C%20t%2C%20e)%3B%0A%7D%0AuntrackDocument(self.info)%3B%0A%7D%3B%0AtrackDocument(this.info%2C%20movefn%2C%20upfn)%3B%0Athis.fire('down'%2C%20t%2C%20e)%3B%0A%7D%2C%0Atouchstart%3A%20function%20(e)%20%7B%0Athis.fire('down'%2C%20Gestures.findOriginalTarget(e)%2C%20e.changedTouches%5B0%5D)%3B%0A%7D%2C%0Atouchend%3A%20function%20(e)%20%7B%0Athis.fire('up'%2C%20Gestures.findOriginalTarget(e)%2C%20e.changedTouches%5B0%5D)%3B%0A%7D%2C%0Afire%3A%20function%20(type%2C%20target%2C%20event)%20%7B%0AGestures.fire(target%2C%20type%2C%20%7B%0Ax%3A%20event.clientX%2C%0Ay%3A%20event.clientY%2C%0AsourceEvent%3A%20event%2C%0Aprevent%3A%20function%20(e)%20%7B%0Areturn%20Gestures.prevent(e)%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D)%3B%0AGestures.register(%7B%0Aname%3A%20'track'%2C%0AtouchAction%3A%20'none'%2C%0Adeps%3A%20%5B%0A'mousedown'%2C%0A'touchstart'%2C%0A'touchmove'%2C%0A'touchend'%0A%5D%2C%0Aflow%3A%20%7B%0Astart%3A%20%5B%0A'mousedown'%2C%0A'touchstart'%0A%5D%2C%0Aend%3A%20%5B%0A'mouseup'%2C%0A'touchend'%0A%5D%0A%7D%2C%0Aemits%3A%20%5B'track'%5D%2C%0Ainfo%3A%20%7B%0Ax%3A%200%2C%0Ay%3A%200%2C%0Astate%3A%20'start'%2C%0Astarted%3A%20false%2C%0Amoves%3A%20%5B%5D%2C%0AaddMove%3A%20function%20(move)%20%7B%0Aif%20(this.moves.length%20%3E%20TRACK_LENGTH)%20%7B%0Athis.moves.shift()%3B%0A%7D%0Athis.moves.push(move)%3B%0A%7D%2C%0Amovefn%3A%20null%2C%0Aupfn%3A%20null%2C%0Aprevent%3A%20false%0A%7D%2C%0Areset%3A%20function%20()%20%7B%0Athis.info.state%20%3D%20'start'%3B%0Athis.info.started%20%3D%20false%3B%0Athis.info.moves%20%3D%20%5B%5D%3B%0Athis.info.x%20%3D%200%3B%0Athis.info.y%20%3D%200%3B%0Athis.info.prevent%20%3D%20false%3B%0AuntrackDocument(this.info)%3B%0A%7D%2C%0AhasMovedEnough%3A%20function%20(x%2C%20y)%20%7B%0Aif%20(this.info.prevent)%20%7B%0Areturn%20false%3B%0A%7D%0Aif%20(this.info.started)%20%7B%0Areturn%20true%3B%0A%7D%0Avar%20dx%20%3D%20Math.abs(this.info.x%20-%20x)%3B%0Avar%20dy%20%3D%20Math.abs(this.info.y%20-%20y)%3B%0Areturn%20dx%20%3E%3D%20TRACK_DISTANCE%20%7C%7C%20dy%20%3E%3D%20TRACK_DISTANCE%3B%0A%7D%2C%0Amousedown%3A%20function%20(e)%20%7B%0Aif%20(!hasLeftMouseButton(e))%20%7B%0Areturn%3B%0A%7D%0Avar%20t%20%3D%20Gestures.findOriginalTarget(e)%3B%0Avar%20self%20%3D%20this%3B%0Avar%20movefn%20%3D%20function%20movefn(e)%20%7B%0Avar%20x%20%3D%20e.clientX%2C%20y%20%3D%20e.clientY%3B%0Aif%20(self.hasMovedEnough(x%2C%20y))%20%7B%0Aself.info.state%20%3D%20self.info.started%20%3F%20e.type%20%3D%3D%3D%20'mouseup'%20%3F%20'end'%20%3A%20'track'%20%3A%20'start'%3B%0Aif%20(self.info.state%20%3D%3D%3D%20'start')%20%7B%0AGestures.prevent('tap')%3B%0A%7D%0Aself.info.addMove(%7B%0Ax%3A%20x%2C%0Ay%3A%20y%0A%7D)%3B%0Aif%20(!hasLeftMouseButton(e))%20%7B%0Aself.info.state%20%3D%20'end'%3B%0AuntrackDocument(self.info)%3B%0A%7D%0Aself.fire(t%2C%20e)%3B%0Aself.info.started%20%3D%20true%3B%0A%7D%0A%7D%3B%0Avar%20upfn%20%3D%20function%20upfn(e)%20%7B%0Aif%20(self.info.started)%20%7B%0Amovefn(e)%3B%0A%7D%0AuntrackDocument(self.info)%3B%0A%7D%3B%0AtrackDocument(this.info%2C%20movefn%2C%20upfn)%3B%0Athis.info.x%20%3D%20e.clientX%3B%0Athis.info.y%20%3D%20e.clientY%3B%0A%7D%2C%0Atouchstart%3A%20function%20(e)%20%7B%0Avar%20ct%20%3D%20e.changedTouches%5B0%5D%3B%0Athis.info.x%20%3D%20ct.clientX%3B%0Athis.info.y%20%3D%20ct.clientY%3B%0A%7D%2C%0Atouchmove%3A%20function%20(e)%20%7B%0Avar%20t%20%3D%20Gestures.findOriginalTarget(e)%3B%0Avar%20ct%20%3D%20e.changedTouches%5B0%5D%3B%0Avar%20x%20%3D%20ct.clientX%2C%20y%20%3D%20ct.clientY%3B%0Aif%20(this.hasMovedEnough(x%2C%20y))%20%7B%0Aif%20(this.info.state%20%3D%3D%3D%20'start')%20%7B%0AGestures.prevent('tap')%3B%0A%7D%0Athis.info.addMove(%7B%0Ax%3A%20x%2C%0Ay%3A%20y%0A%7D)%3B%0Athis.fire(t%2C%20ct)%3B%0Athis.info.state%20%3D%20'track'%3B%0Athis.info.started%20%3D%20true%3B%0A%7D%0A%7D%2C%0Atouchend%3A%20function%20(e)%20%7B%0Avar%20t%20%3D%20Gestures.findOriginalTarget(e)%3B%0Avar%20ct%20%3D%20e.changedTouches%5B0%5D%3B%0Aif%20(this.info.started)%20%7B%0Athis.info.state%20%3D%20'end'%3B%0Athis.info.addMove(%7B%0Ax%3A%20ct.clientX%2C%0Ay%3A%20ct.clientY%0A%7D)%3B%0Athis.fire(t%2C%20ct)%3B%0A%7D%0A%7D%2C%0Afire%3A%20function%20(target%2C%20touch)%20%7B%0Avar%20secondlast%20%3D%20this.info.moves%5Bthis.info.moves.length%20-%202%5D%3B%0Avar%20lastmove%20%3D%20this.info.moves%5Bthis.info.moves.length%20-%201%5D%3B%0Avar%20dx%20%3D%20lastmove.x%20-%20this.info.x%3B%0Avar%20dy%20%3D%20lastmove.y%20-%20this.info.y%3B%0Avar%20ddx%2C%20ddy%20%3D%200%3B%0Aif%20(secondlast)%20%7B%0Addx%20%3D%20lastmove.x%20-%20secondlast.x%3B%0Addy%20%3D%20lastmove.y%20-%20secondlast.y%3B%0A%7D%0Areturn%20Gestures.fire(target%2C%20'track'%2C%20%7B%0Astate%3A%20this.info.state%2C%0Ax%3A%20touch.clientX%2C%0Ay%3A%20touch.clientY%2C%0Adx%3A%20dx%2C%0Ady%3A%20dy%2C%0Addx%3A%20ddx%2C%0Addy%3A%20ddy%2C%0AsourceEvent%3A%20touch%2C%0Ahover%3A%20function%20()%20%7B%0Areturn%20Gestures.deepTargetFind(touch.clientX%2C%20touch.clientY)%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D)%3B%0AGestures.register(%7B%0Aname%3A%20'tap'%2C%0Adeps%3A%20%5B%0A'mousedown'%2C%0A'click'%2C%0A'touchstart'%2C%0A'touchend'%0A%5D%2C%0Aflow%3A%20%7B%0Astart%3A%20%5B%0A'mousedown'%2C%0A'touchstart'%0A%5D%2C%0Aend%3A%20%5B%0A'click'%2C%0A'touchend'%0A%5D%0A%7D%2C%0Aemits%3A%20%5B'tap'%5D%2C%0Ainfo%3A%20%7B%0Ax%3A%20NaN%2C%0Ay%3A%20NaN%2C%0Aprevent%3A%20false%0A%7D%2C%0Areset%3A%20function%20()%20%7B%0Athis.info.x%20%3D%20NaN%3B%0Athis.info.y%20%3D%20NaN%3B%0Athis.info.prevent%20%3D%20false%3B%0A%7D%2C%0Asave%3A%20function%20(e)%20%7B%0Athis.info.x%20%3D%20e.clientX%3B%0Athis.info.y%20%3D%20e.clientY%3B%0A%7D%2C%0Amousedown%3A%20function%20(e)%20%7B%0Aif%20(hasLeftMouseButton(e))%20%7B%0Athis.save(e)%3B%0A%7D%0A%7D%2C%0Aclick%3A%20function%20(e)%20%7B%0Aif%20(hasLeftMouseButton(e))%20%7B%0Athis.forward(e)%3B%0A%7D%0A%7D%2C%0Atouchstart%3A%20function%20(e)%20%7B%0Athis.save(e.changedTouches%5B0%5D)%3B%0A%7D%2C%0Atouchend%3A%20function%20(e)%20%7B%0Athis.forward(e.changedTouches%5B0%5D)%3B%0A%7D%2C%0Aforward%3A%20function%20(e)%20%7B%0Avar%20dx%20%3D%20Math.abs(e.clientX%20-%20this.info.x)%3B%0Avar%20dy%20%3D%20Math.abs(e.clientY%20-%20this.info.y)%3B%0Avar%20t%20%3D%20Gestures.findOriginalTarget(e)%3B%0Aif%20(isNaN(dx)%20%7C%7C%20isNaN(dy)%20%7C%7C%20dx%20%3C%3D%20TAP_DISTANCE%20%26%26%20dy%20%3C%3D%20TAP_DISTANCE%20%7C%7C%20isSyntheticClick(e))%20%7B%0Aif%20(!this.info.prevent)%20%7B%0AGestures.fire(t%2C%20'tap'%2C%20%7B%0Ax%3A%20e.clientX%2C%0Ay%3A%20e.clientY%2C%0AsourceEvent%3A%20e%0A%7D)%3B%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0Avar%20DIRECTION_MAP%20%3D%20%7B%0Ax%3A%20'pan-x'%2C%0Ay%3A%20'pan-y'%2C%0Anone%3A%20'none'%2C%0Aall%3A%20'auto'%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_setupGestures%3A%20function%20()%20%7B%0Athis.__polymerGestures%20%3D%20null%3B%0A%7D%2C%0A_listen%3A%20function%20(node%2C%20eventName%2C%20handler)%20%7B%0Aif%20(Gestures.gestures%5BeventName%5D)%20%7B%0AGestures.add(node%2C%20eventName%2C%20handler)%3B%0A%7D%20else%20%7B%0Anode.addEventListener(eventName%2C%20handler)%3B%0A%7D%0A%7D%2C%0A_unlisten%3A%20function%20(node%2C%20eventName%2C%20handler)%20%7B%0Aif%20(Gestures.gestures%5BeventName%5D)%20%7B%0AGestures.remove(node%2C%20eventName%2C%20handler)%3B%0A%7D%20else%20%7B%0Anode.removeEventListener(eventName%2C%20handler)%3B%0A%7D%0A%7D%2C%0AsetScrollDirection%3A%20function%20(direction%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0AGestures.setTouchAction(node%2C%20DIRECTION_MAP%5Bdirection%5D%20%7C%7C%20'auto')%3B%0A%7D%0A%7D)%3B%0APolymer.Gestures%20%3D%20Gestures%3B%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A%24%24%3A%20function%20(slctr)%20%7B%0Areturn%20Polymer.dom(this.root).querySelector(slctr)%3B%0A%7D%2C%0AtoggleClass%3A%20function%20(name%2C%20bool%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(arguments.length%20%3D%3D%201)%20%7B%0Abool%20%3D%20!node.classList.contains(name)%3B%0A%7D%0Aif%20(bool)%20%7B%0APolymer.dom(node).classList.add(name)%3B%0A%7D%20else%20%7B%0APolymer.dom(node).classList.remove(name)%3B%0A%7D%0A%7D%2C%0AtoggleAttribute%3A%20function%20(name%2C%20bool%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(arguments.length%20%3D%3D%201)%20%7B%0Abool%20%3D%20!node.hasAttribute(name)%3B%0A%7D%0Aif%20(bool)%20%7B%0APolymer.dom(node).setAttribute(name%2C%20'')%3B%0A%7D%20else%20%7B%0APolymer.dom(node).removeAttribute(name)%3B%0A%7D%0A%7D%2C%0AclassFollows%3A%20function%20(name%2C%20toElement%2C%20fromElement)%20%7B%0Aif%20(fromElement)%20%7B%0APolymer.dom(fromElement).classList.remove(name)%3B%0A%7D%0Aif%20(toElement)%20%7B%0APolymer.dom(toElement).classList.add(name)%3B%0A%7D%0A%7D%2C%0AattributeFollows%3A%20function%20(name%2C%20toElement%2C%20fromElement)%20%7B%0Aif%20(fromElement)%20%7B%0APolymer.dom(fromElement).removeAttribute(name)%3B%0A%7D%0Aif%20(toElement)%20%7B%0APolymer.dom(toElement).setAttribute(name%2C%20'')%3B%0A%7D%0A%7D%2C%0AgetEffectiveChildNodes%3A%20function%20()%20%7B%0Areturn%20Polymer.dom(this).getEffectiveChildNodes()%3B%0A%7D%2C%0AgetEffectiveChildren%3A%20function%20()%20%7B%0Avar%20list%20%3D%20Polymer.dom(this).getEffectiveChildNodes()%3B%0Areturn%20list.filter(function%20(n)%20%7B%0Areturn%20n.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%3B%0A%7D)%3B%0A%7D%2C%0AgetEffectiveTextContent%3A%20function%20()%20%7B%0Avar%20cn%20%3D%20this.getEffectiveChildNodes()%3B%0Avar%20tc%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20c%3B%20c%20%3D%20cn%5Bi%5D%3B%20i%2B%2B)%20%7B%0Aif%20(c.nodeType%20!%3D%3D%20Node.COMMENT_NODE)%20%7B%0Atc.push(Polymer.dom(c).textContent)%3B%0A%7D%0A%7D%0Areturn%20tc.join('')%3B%0A%7D%2C%0AqueryEffectiveChildren%3A%20function%20(slctr)%20%7B%0Avar%20e%24%20%3D%20Polymer.dom(this).queryDistributedElements(slctr)%3B%0Areturn%20e%24%20%26%26%20e%24%5B0%5D%3B%0A%7D%2C%0AqueryAllEffectiveChildren%3A%20function%20(slctr)%20%7B%0Areturn%20Polymer.dom(this).queryDistributedElements(slctr)%3B%0A%7D%2C%0AgetContentChildNodes%3A%20function%20(slctr)%20%7B%0Avar%20content%20%3D%20Polymer.dom(this.root).querySelector(slctr%20%7C%7C%20'content')%3B%0Areturn%20content%20%3F%20Polymer.dom(content).getDistributedNodes()%20%3A%20%5B%5D%3B%0A%7D%2C%0AgetContentChildren%3A%20function%20(slctr)%20%7B%0Areturn%20this.getContentChildNodes(slctr).filter(function%20(n)%20%7B%0Areturn%20n.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%3B%0A%7D)%3B%0A%7D%2C%0Afire%3A%20function%20(type%2C%20detail%2C%20options)%20%7B%0Aoptions%20%3D%20options%20%7C%7C%20Polymer.nob%3B%0Avar%20node%20%3D%20options.node%20%7C%7C%20this%3B%0Adetail%20%3D%20detail%20%3D%3D%3D%20null%20%7C%7C%20detail%20%3D%3D%3D%20undefined%20%3F%20%7B%7D%20%3A%20detail%3B%0Avar%20bubbles%20%3D%20options.bubbles%20%3D%3D%3D%20undefined%20%3F%20true%20%3A%20options.bubbles%3B%0Avar%20cancelable%20%3D%20Boolean(options.cancelable)%3B%0Avar%20useCache%20%3D%20options._useCache%3B%0Avar%20event%20%3D%20this._getEvent(type%2C%20bubbles%2C%20cancelable%2C%20useCache)%3B%0Aevent.detail%20%3D%20detail%3B%0Aif%20(useCache)%20%7B%0Athis.__eventCache%5Btype%5D%20%3D%20null%3B%0A%7D%0Anode.dispatchEvent(event)%3B%0Aif%20(useCache)%20%7B%0Athis.__eventCache%5Btype%5D%20%3D%20event%3B%0A%7D%0Areturn%20event%3B%0A%7D%2C%0A__eventCache%3A%20%7B%7D%2C%0A_getEvent%3A%20function%20(type%2C%20bubbles%2C%20cancelable%2C%20useCache)%20%7B%0Avar%20event%20%3D%20useCache%20%26%26%20this.__eventCache%5Btype%5D%3B%0Aif%20(!event%20%7C%7C%20(event.bubbles%20!%3D%20bubbles%20%7C%7C%20event.cancelable%20!%3D%20cancelable))%20%7B%0Aevent%20%3D%20new%20Event(type%2C%20%7B%0Abubbles%3A%20Boolean(bubbles)%2C%0Acancelable%3A%20cancelable%0A%7D)%3B%0A%7D%0Areturn%20event%3B%0A%7D%2C%0Aasync%3A%20function%20(callback%2C%20waitTime)%20%7B%0Avar%20self%20%3D%20this%3B%0Areturn%20Polymer.Async.run(function%20()%20%7B%0Acallback.call(self)%3B%0A%7D%2C%20waitTime)%3B%0A%7D%2C%0AcancelAsync%3A%20function%20(handle)%20%7B%0APolymer.Async.cancel(handle)%3B%0A%7D%2C%0AarrayDelete%3A%20function%20(path%2C%20item)%20%7B%0Avar%20index%3B%0Aif%20(Array.isArray(path))%20%7B%0Aindex%20%3D%20path.indexOf(item)%3B%0Aif%20(index%20%3E%3D%200)%20%7B%0Areturn%20path.splice(index%2C%201)%3B%0A%7D%0A%7D%20else%20%7B%0Avar%20arr%20%3D%20this._get(path)%3B%0Aindex%20%3D%20arr.indexOf(item)%3B%0Aif%20(index%20%3E%3D%200)%20%7B%0Areturn%20this.splice(path%2C%20index%2C%201)%3B%0A%7D%0A%7D%0A%7D%2C%0Atransform%3A%20function%20(transform%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Anode.style.webkitTransform%20%3D%20transform%3B%0Anode.style.transform%20%3D%20transform%3B%0A%7D%2C%0Atranslate3d%3A%20function%20(x%2C%20y%2C%20z%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Athis.transform('translate3d('%20%2B%20x%20%2B%20'%2C'%20%2B%20y%20%2B%20'%2C'%20%2B%20z%20%2B%20')'%2C%20node)%3B%0A%7D%2C%0AimportHref%3A%20function%20(href%2C%20onload%2C%20onerror%2C%20optAsync)%20%7B%0Avar%20l%20%3D%20document.createElement('link')%3B%0Al.rel%20%3D%20'import'%3B%0Al.href%20%3D%20href%3B%0AoptAsync%20%3D%20Boolean(optAsync)%3B%0Aif%20(optAsync)%20%7B%0Al.setAttribute('async'%2C%20'')%3B%0A%7D%0Avar%20self%20%3D%20this%3B%0Aif%20(onload)%20%7B%0Al.onload%20%3D%20function%20(e)%20%7B%0Areturn%20onload.call(self%2C%20e)%3B%0A%7D%3B%0A%7D%0Aif%20(onerror)%20%7B%0Al.onerror%20%3D%20function%20(e)%20%7B%0Areturn%20onerror.call(self%2C%20e)%3B%0A%7D%3B%0A%7D%0Adocument.head.appendChild(l)%3B%0Areturn%20l%3B%0A%7D%2C%0Acreate%3A%20function%20(tag%2C%20props)%20%7B%0Avar%20elt%20%3D%20document.createElement(tag)%3B%0Aif%20(props)%20%7B%0Afor%20(var%20n%20in%20props)%20%7B%0Aelt%5Bn%5D%20%3D%20props%5Bn%5D%3B%0A%7D%0A%7D%0Areturn%20elt%3B%0A%7D%2C%0AisLightDescendant%3A%20function%20(node)%20%7B%0Areturn%20this%20!%3D%3D%20node%20%26%26%20this.contains(node)%20%26%26%20Polymer.dom(this).getOwnerRoot()%20%3D%3D%3D%20Polymer.dom(node).getOwnerRoot()%3B%0A%7D%2C%0AisLocalDescendant%3A%20function%20(node)%20%7B%0Areturn%20this.root%20%3D%3D%3D%20Polymer.dom(node).getOwnerRoot()%3B%0A%7D%0A%7D)%3B%0APolymer.Bind%20%3D%20%7B%0A_dataEventCache%3A%20%7B%7D%2C%0AprepareModel%3A%20function%20(model)%20%7B%0APolymer.Base.mixin(model%2C%20this._modelApi)%3B%0A%7D%2C%0A_modelApi%3A%20%7B%0A_notifyChange%3A%20function%20(source%2C%20event%2C%20value)%20%7B%0Avalue%20%3D%20value%20%3D%3D%3D%20undefined%20%3F%20this%5Bsource%5D%20%3A%20value%3B%0Aevent%20%3D%20event%20%7C%7C%20Polymer.CaseMap.camelToDashCase(source)%20%2B%20'-changed'%3B%0Athis.fire(event%2C%20%7B%20value%3A%20value%20%7D%2C%20%7B%0Abubbles%3A%20false%2C%0Acancelable%3A%20false%2C%0A_useCache%3A%20true%0A%7D)%3B%0A%7D%2C%0A_propertySetter%3A%20function%20(property%2C%20value%2C%20effects%2C%20fromAbove)%20%7B%0Avar%20old%20%3D%20this.__data__%5Bproperty%5D%3B%0Aif%20(old%20!%3D%3D%20value%20%26%26%20(old%20%3D%3D%3D%20old%20%7C%7C%20value%20%3D%3D%3D%20value))%20%7B%0Athis.__data__%5Bproperty%5D%20%3D%20value%3B%0Aif%20(typeof%20value%20%3D%3D%20'object')%20%7B%0Athis._clearPath(property)%3B%0A%7D%0Aif%20(this._propertyChanged)%20%7B%0Athis._propertyChanged(property%2C%20value%2C%20old)%3B%0A%7D%0Aif%20(effects)%20%7B%0Athis._effectEffects(property%2C%20value%2C%20effects%2C%20old%2C%20fromAbove)%3B%0A%7D%0A%7D%0Areturn%20old%3B%0A%7D%2C%0A__setProperty%3A%20function%20(property%2C%20value%2C%20quiet%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Avar%20effects%20%3D%20node._propertyEffects%20%26%26%20node._propertyEffects%5Bproperty%5D%3B%0Aif%20(effects)%20%7B%0Anode._propertySetter(property%2C%20value%2C%20effects%2C%20quiet)%3B%0A%7D%20else%20%7B%0Anode%5Bproperty%5D%20%3D%20value%3B%0A%7D%0A%7D%2C%0A_effectEffects%3A%20function%20(property%2C%20value%2C%20effects%2C%20old%2C%20fromAbove)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20effects.length%2C%20fx%3B%20i%20%3C%20l%20%26%26%20(fx%20%3D%20effects%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afx.fn.call(this%2C%20property%2C%20value%2C%20fx.effect%2C%20old%2C%20fromAbove)%3B%0A%7D%0A%7D%2C%0A_clearPath%3A%20function%20(path)%20%7B%0Afor%20(var%20prop%20in%20this.__data__)%20%7B%0Aif%20(prop.indexOf(path%20%2B%20'.')%20%3D%3D%3D%200)%20%7B%0Athis.__data__%5Bprop%5D%20%3D%20undefined%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0AensurePropertyEffects%3A%20function%20(model%2C%20property)%20%7B%0Aif%20(!model._propertyEffects)%20%7B%0Amodel._propertyEffects%20%3D%20%7B%7D%3B%0A%7D%0Avar%20fx%20%3D%20model._propertyEffects%5Bproperty%5D%3B%0Aif%20(!fx)%20%7B%0Afx%20%3D%20model._propertyEffects%5Bproperty%5D%20%3D%20%5B%5D%3B%0A%7D%0Areturn%20fx%3B%0A%7D%2C%0AaddPropertyEffect%3A%20function%20(model%2C%20property%2C%20kind%2C%20effect)%20%7B%0Avar%20fx%20%3D%20this.ensurePropertyEffects(model%2C%20property)%3B%0Avar%20propEffect%20%3D%20%7B%0Akind%3A%20kind%2C%0Aeffect%3A%20effect%2C%0Afn%3A%20Polymer.Bind%5B'_'%20%2B%20kind%20%2B%20'Effect'%5D%0A%7D%3B%0Afx.push(propEffect)%3B%0Areturn%20propEffect%3B%0A%7D%2C%0AcreateBindings%3A%20function%20(model)%20%7B%0Avar%20fx%24%20%3D%20model._propertyEffects%3B%0Aif%20(fx%24)%20%7B%0Afor%20(var%20n%20in%20fx%24)%20%7B%0Avar%20fx%20%3D%20fx%24%5Bn%5D%3B%0Afx.sort(this._sortPropertyEffects)%3B%0Athis._createAccessors(model%2C%20n%2C%20fx)%3B%0A%7D%0A%7D%0A%7D%2C%0A_sortPropertyEffects%3A%20function%20()%20%7B%0Avar%20EFFECT_ORDER%20%3D%20%7B%0A'compute'%3A%200%2C%0A'annotation'%3A%201%2C%0A'annotatedComputation'%3A%202%2C%0A'reflect'%3A%203%2C%0A'notify'%3A%204%2C%0A'observer'%3A%205%2C%0A'complexObserver'%3A%206%2C%0A'function'%3A%207%0A%7D%3B%0Areturn%20function%20(a%2C%20b)%20%7B%0Areturn%20EFFECT_ORDER%5Ba.kind%5D%20-%20EFFECT_ORDER%5Bb.kind%5D%3B%0A%7D%3B%0A%7D()%2C%0A_createAccessors%3A%20function%20(model%2C%20property%2C%20effects)%20%7B%0Avar%20defun%20%3D%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.__data__%5Bproperty%5D%3B%0A%7D%0A%7D%3B%0Avar%20setter%20%3D%20function%20(value)%20%7B%0Athis._propertySetter(property%2C%20value%2C%20effects)%3B%0A%7D%3B%0Avar%20info%20%3D%20model.getPropertyInfo%20%26%26%20model.getPropertyInfo(property)%3B%0Aif%20(info%20%26%26%20info.readOnly)%20%7B%0Aif%20(!info.computed)%20%7B%0Amodel%5B'_set'%20%2B%20this.upper(property)%5D%20%3D%20setter%3B%0A%7D%0A%7D%20else%20%7B%0Adefun.set%20%3D%20setter%3B%0A%7D%0AObject.defineProperty(model%2C%20property%2C%20defun)%3B%0A%7D%2C%0Aupper%3A%20function%20(name)%20%7B%0Areturn%20name%5B0%5D.toUpperCase()%20%2B%20name.substring(1)%3B%0A%7D%2C%0A_addAnnotatedListener%3A%20function%20(model%2C%20index%2C%20property%2C%20path%2C%20event%2C%20negated)%20%7B%0Aif%20(!model._bindListeners)%20%7B%0Amodel._bindListeners%20%3D%20%5B%5D%3B%0A%7D%0Avar%20fn%20%3D%20this._notedListenerFactory(property%2C%20path%2C%20this._isStructured(path)%2C%20negated)%3B%0Avar%20eventName%20%3D%20event%20%7C%7C%20Polymer.CaseMap.camelToDashCase(property)%20%2B%20'-changed'%3B%0Amodel._bindListeners.push(%7B%0Aindex%3A%20index%2C%0Aproperty%3A%20property%2C%0Apath%3A%20path%2C%0AchangedFn%3A%20fn%2C%0Aevent%3A%20eventName%0A%7D)%3B%0A%7D%2C%0A_isStructured%3A%20function%20(path)%20%7B%0Areturn%20path.indexOf('.')%20%3E%200%3B%0A%7D%2C%0A_isEventBogus%3A%20function%20(e%2C%20target)%20%7B%0Areturn%20e.path%20%26%26%20e.path%5B0%5D%20!%3D%3D%20target%3B%0A%7D%2C%0A_notedListenerFactory%3A%20function%20(property%2C%20path%2C%20isStructured%2C%20negated)%20%7B%0Areturn%20function%20(target%2C%20value%2C%20targetPath)%20%7B%0Aif%20(targetPath)%20%7B%0Athis._notifyPath(this._fixPath(path%2C%20property%2C%20targetPath)%2C%20value)%3B%0A%7D%20else%20%7B%0Avalue%20%3D%20target%5Bproperty%5D%3B%0Aif%20(negated)%20%7B%0Avalue%20%3D%20!value%3B%0A%7D%0Aif%20(!isStructured)%20%7B%0Athis%5Bpath%5D%20%3D%20value%3B%0A%7D%20else%20%7B%0Aif%20(this.__data__%5Bpath%5D%20!%3D%20value)%20%7B%0Athis.set(path%2C%20value)%3B%0A%7D%0A%7D%0A%7D%0A%7D%3B%0A%7D%2C%0AprepareInstance%3A%20function%20(inst)%20%7B%0Ainst.__data__%20%3D%20Object.create(null)%3B%0A%7D%2C%0AsetupBindListeners%3A%20function%20(inst)%20%7B%0Avar%20b%24%20%3D%20inst._bindListeners%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20b%24.length%2C%20info%3B%20i%20%3C%20l%20%26%26%20(info%20%3D%20b%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20node%20%3D%20inst._nodes%5Binfo.index%5D%3B%0Athis._addNotifyListener(node%2C%20inst%2C%20info.event%2C%20info.changedFn)%3B%0A%7D%0A%7D%2C%0A_addNotifyListener%3A%20function%20(element%2C%20context%2C%20event%2C%20changedFn)%20%7B%0Aelement.addEventListener(event%2C%20function%20(e)%20%7B%0Areturn%20context._notifyListener(changedFn%2C%20e)%3B%0A%7D)%3B%0A%7D%0A%7D%3B%0APolymer.Base.extend(Polymer.Bind%2C%20%7B%0A_shouldAddListener%3A%20function%20(effect)%20%7B%0Areturn%20effect.name%20%26%26%20effect.kind%20!%3D%20'attribute'%20%26%26%20effect.kind%20!%3D%20'text'%20%26%26%20!effect.isCompound%20%26%26%20effect.parts%5B0%5D.mode%20%3D%3D%3D%20'%7B'%3B%0A%7D%2C%0A_annotationEffect%3A%20function%20(source%2C%20value%2C%20effect)%20%7B%0Aif%20(source%20!%3D%20effect.value)%20%7B%0Avalue%20%3D%20this._get(effect.value)%3B%0Athis.__data__%5Beffect.value%5D%20%3D%20value%3B%0A%7D%0Avar%20calc%20%3D%20effect.negate%20%3F%20!value%20%3A%20value%3B%0Aif%20(!effect.customEvent%20%7C%7C%20this._nodes%5Beffect.index%5D%5Beffect.name%5D%20!%3D%3D%20calc)%20%7B%0Areturn%20this._applyEffectValue(effect%2C%20calc)%3B%0A%7D%0A%7D%2C%0A_reflectEffect%3A%20function%20(source%2C%20value%2C%20effect)%20%7B%0Athis.reflectPropertyToAttribute(source%2C%20effect.attribute%2C%20value)%3B%0A%7D%2C%0A_notifyEffect%3A%20function%20(source%2C%20value%2C%20effect%2C%20old%2C%20fromAbove)%20%7B%0Aif%20(!fromAbove)%20%7B%0Athis._notifyChange(source%2C%20effect.event%2C%20value)%3B%0A%7D%0A%7D%2C%0A_functionEffect%3A%20function%20(source%2C%20value%2C%20fn%2C%20old%2C%20fromAbove)%20%7B%0Afn.call(this%2C%20source%2C%20value%2C%20old%2C%20fromAbove)%3B%0A%7D%2C%0A_observerEffect%3A%20function%20(source%2C%20value%2C%20effect%2C%20old)%20%7B%0Avar%20fn%20%3D%20this%5Beffect.method%5D%3B%0Aif%20(fn)%20%7B%0Afn.call(this%2C%20value%2C%20old)%3B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_observerEffect'%2C%20'observer%20method%20%60'%20%2B%20effect.method%20%2B%20'%60%20not%20defined'))%3B%0A%7D%0A%7D%2C%0A_complexObserverEffect%3A%20function%20(source%2C%20value%2C%20effect)%20%7B%0Avar%20fn%20%3D%20this%5Beffect.method%5D%3B%0Aif%20(fn)%20%7B%0Avar%20args%20%3D%20Polymer.Bind._marshalArgs(this.__data__%2C%20effect%2C%20source%2C%20value)%3B%0Aif%20(args)%20%7B%0Afn.apply(this%2C%20args)%3B%0A%7D%0A%7D%20else%20if%20(effect.dynamicFn)%20%7B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_complexObserverEffect'%2C%20'observer%20method%20%60'%20%2B%20effect.method%20%2B%20'%60%20not%20defined'))%3B%0A%7D%0A%7D%2C%0A_computeEffect%3A%20function%20(source%2C%20value%2C%20effect)%20%7B%0Avar%20fn%20%3D%20this%5Beffect.method%5D%3B%0Aif%20(fn)%20%7B%0Avar%20args%20%3D%20Polymer.Bind._marshalArgs(this.__data__%2C%20effect%2C%20source%2C%20value)%3B%0Aif%20(args)%20%7B%0Avar%20computedvalue%20%3D%20fn.apply(this%2C%20args)%3B%0Athis.__setProperty(effect.name%2C%20computedvalue)%3B%0A%7D%0A%7D%20else%20if%20(effect.dynamicFn)%20%7B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_computeEffect'%2C%20'compute%20method%20%60'%20%2B%20effect.method%20%2B%20'%60%20not%20defined'))%3B%0A%7D%0A%7D%2C%0A_annotatedComputationEffect%3A%20function%20(source%2C%20value%2C%20effect)%20%7B%0Avar%20computedHost%20%3D%20this._rootDataHost%20%7C%7C%20this%3B%0Avar%20fn%20%3D%20computedHost%5Beffect.method%5D%3B%0Aif%20(fn)%20%7B%0Avar%20args%20%3D%20Polymer.Bind._marshalArgs(this.__data__%2C%20effect%2C%20source%2C%20value)%3B%0Aif%20(args)%20%7B%0Avar%20computedvalue%20%3D%20fn.apply(computedHost%2C%20args)%3B%0Aif%20(effect.negate)%20%7B%0Acomputedvalue%20%3D%20!computedvalue%3B%0A%7D%0Athis._applyEffectValue(effect%2C%20computedvalue)%3B%0A%7D%0A%7D%20else%20if%20(effect.dynamicFn)%20%7B%0A%7D%20else%20%7B%0AcomputedHost._warn(computedHost._logf('_annotatedComputationEffect'%2C%20'compute%20method%20%60'%20%2B%20effect.method%20%2B%20'%60%20not%20defined'))%3B%0A%7D%0A%7D%2C%0A_marshalArgs%3A%20function%20(model%2C%20effect%2C%20path%2C%20value)%20%7B%0Avar%20values%20%3D%20%5B%5D%3B%0Avar%20args%20%3D%20effect.args%3B%0Avar%20bailoutEarly%20%3D%20args.length%20%3E%201%20%7C%7C%20effect.dynamicFn%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20args.length%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Avar%20arg%20%3D%20args%5Bi%5D%3B%0Avar%20name%20%3D%20arg.name%3B%0Avar%20v%3B%0Aif%20(arg.literal)%20%7B%0Av%20%3D%20arg.value%3B%0A%7D%20else%20if%20(arg.structured)%20%7B%0Av%20%3D%20Polymer.Base._get(name%2C%20model)%3B%0A%7D%20else%20%7B%0Av%20%3D%20model%5Bname%5D%3B%0A%7D%0Aif%20(bailoutEarly%20%26%26%20v%20%3D%3D%3D%20undefined)%20%7B%0Areturn%3B%0A%7D%0Aif%20(arg.wildcard)%20%7B%0Avar%20baseChanged%20%3D%20name.indexOf(path%20%2B%20'.')%20%3D%3D%3D%200%3B%0Avar%20matches%20%3D%20effect.trigger.name.indexOf(name)%20%3D%3D%3D%200%20%26%26%20!baseChanged%3B%0Avalues%5Bi%5D%20%3D%20%7B%0Apath%3A%20matches%20%3F%20path%20%3A%20name%2C%0Avalue%3A%20matches%20%3F%20value%20%3A%20v%2C%0Abase%3A%20v%0A%7D%3B%0A%7D%20else%20%7B%0Avalues%5Bi%5D%20%3D%20v%3B%0A%7D%0A%7D%0Areturn%20values%3B%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0A_addPropertyEffect%3A%20function%20(property%2C%20kind%2C%20effect)%20%7B%0Avar%20prop%20%3D%20Polymer.Bind.addPropertyEffect(this%2C%20property%2C%20kind%2C%20effect)%3B%0Aprop.pathFn%20%3D%20this%5B'_'%20%2B%20prop.kind%20%2B%20'PathEffect'%5D%3B%0A%7D%2C%0A_prepEffects%3A%20function%20()%20%7B%0APolymer.Bind.prepareModel(this)%3B%0Athis._addAnnotationEffects(this._notes)%3B%0A%7D%2C%0A_prepBindings%3A%20function%20()%20%7B%0APolymer.Bind.createBindings(this)%3B%0A%7D%2C%0A_addPropertyEffects%3A%20function%20(properties)%20%7B%0Aif%20(properties)%20%7B%0Afor%20(var%20p%20in%20properties)%20%7B%0Avar%20prop%20%3D%20properties%5Bp%5D%3B%0Aif%20(prop.observer)%20%7B%0Athis._addObserverEffect(p%2C%20prop.observer)%3B%0A%7D%0Aif%20(prop.computed)%20%7B%0Aprop.readOnly%20%3D%20true%3B%0Athis._addComputedEffect(p%2C%20prop.computed)%3B%0A%7D%0Aif%20(prop.notify)%20%7B%0Athis._addPropertyEffect(p%2C%20'notify'%2C%20%7B%20event%3A%20Polymer.CaseMap.camelToDashCase(p)%20%2B%20'-changed'%20%7D)%3B%0A%7D%0Aif%20(prop.reflectToAttribute)%20%7B%0Athis._addPropertyEffect(p%2C%20'reflect'%2C%20%7B%20attribute%3A%20Polymer.CaseMap.camelToDashCase(p)%20%7D)%3B%0A%7D%0Aif%20(prop.readOnly)%20%7B%0APolymer.Bind.ensurePropertyEffects(this%2C%20p)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_addComputedEffect%3A%20function%20(name%2C%20expression)%20%7B%0Avar%20sig%20%3D%20this._parseMethod(expression)%3B%0Avar%20dynamicFn%20%3D%20sig.dynamicFn%3B%0Afor%20(var%20i%20%3D%200%2C%20arg%3B%20i%20%3C%20sig.args.length%20%26%26%20(arg%20%3D%20sig.args%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._addPropertyEffect(arg.model%2C%20'compute'%2C%20%7B%0Amethod%3A%20sig.method%2C%0Aargs%3A%20sig.args%2C%0Atrigger%3A%20arg%2C%0Aname%3A%20name%2C%0AdynamicFn%3A%20dynamicFn%0A%7D)%3B%0A%7D%0Aif%20(dynamicFn)%20%7B%0Athis._addPropertyEffect(sig.method%2C%20'compute'%2C%20%7B%0Amethod%3A%20sig.method%2C%0Aargs%3A%20sig.args%2C%0Atrigger%3A%20null%2C%0Aname%3A%20name%2C%0AdynamicFn%3A%20dynamicFn%0A%7D)%3B%0A%7D%0A%7D%2C%0A_addObserverEffect%3A%20function%20(property%2C%20observer)%20%7B%0Athis._addPropertyEffect(property%2C%20'observer'%2C%20%7B%0Amethod%3A%20observer%2C%0Aproperty%3A%20property%0A%7D)%3B%0A%7D%2C%0A_addComplexObserverEffects%3A%20function%20(observers)%20%7B%0Aif%20(observers)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20observers.length%20%26%26%20(o%20%3D%20observers%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._addComplexObserverEffect(o)%3B%0A%7D%0A%7D%0A%7D%2C%0A_addComplexObserverEffect%3A%20function%20(observer)%20%7B%0Avar%20sig%20%3D%20this._parseMethod(observer)%3B%0Aif%20(!sig)%20%7B%0Athrow%20new%20Error('Malformed%20observer%20expression%20%5C''%20%2B%20observer%20%2B%20'%5C'')%3B%0A%7D%0Avar%20dynamicFn%20%3D%20sig.dynamicFn%3B%0Afor%20(var%20i%20%3D%200%2C%20arg%3B%20i%20%3C%20sig.args.length%20%26%26%20(arg%20%3D%20sig.args%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._addPropertyEffect(arg.model%2C%20'complexObserver'%2C%20%7B%0Amethod%3A%20sig.method%2C%0Aargs%3A%20sig.args%2C%0Atrigger%3A%20arg%2C%0AdynamicFn%3A%20dynamicFn%0A%7D)%3B%0A%7D%0Aif%20(dynamicFn)%20%7B%0Athis._addPropertyEffect(sig.method%2C%20'complexObserver'%2C%20%7B%0Amethod%3A%20sig.method%2C%0Aargs%3A%20sig.args%2C%0Atrigger%3A%20null%2C%0AdynamicFn%3A%20dynamicFn%0A%7D)%3B%0A%7D%0A%7D%2C%0A_addAnnotationEffects%3A%20function%20(notes)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20note%3B%20i%20%3C%20notes.length%20%26%26%20(note%20%3D%20notes%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20b%24%20%3D%20note.bindings%3B%0Afor%20(var%20j%20%3D%200%2C%20binding%3B%20j%20%3C%20b%24.length%20%26%26%20(binding%20%3D%20b%24%5Bj%5D)%3B%20j%2B%2B)%20%7B%0Athis._addAnnotationEffect(binding%2C%20i)%3B%0A%7D%0A%7D%0A%7D%2C%0A_addAnnotationEffect%3A%20function%20(note%2C%20index)%20%7B%0Aif%20(Polymer.Bind._shouldAddListener(note))%20%7B%0APolymer.Bind._addAnnotatedListener(this%2C%20index%2C%20note.name%2C%20note.parts%5B0%5D.value%2C%20note.parts%5B0%5D.event%2C%20note.parts%5B0%5D.negate)%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20note.parts.length%3B%20i%2B%2B)%20%7B%0Avar%20part%20%3D%20note.parts%5Bi%5D%3B%0Aif%20(part.signature)%20%7B%0Athis._addAnnotatedComputationEffect(note%2C%20part%2C%20index)%3B%0A%7D%20else%20if%20(!part.literal)%20%7B%0Athis._addPropertyEffect(part.model%2C%20'annotation'%2C%20%7B%0Akind%3A%20note.kind%2C%0Aindex%3A%20index%2C%0Aname%3A%20note.name%2C%0ApropertyName%3A%20note.propertyName%2C%0Avalue%3A%20part.value%2C%0AisCompound%3A%20note.isCompound%2C%0AcompoundIndex%3A%20part.compoundIndex%2C%0Aevent%3A%20part.event%2C%0AcustomEvent%3A%20part.customEvent%2C%0Anegate%3A%20part.negate%0A%7D)%3B%0A%7D%0A%7D%0A%7D%2C%0A_addAnnotatedComputationEffect%3A%20function%20(note%2C%20part%2C%20index)%20%7B%0Avar%20sig%20%3D%20part.signature%3B%0Aif%20(sig.static)%20%7B%0Athis.__addAnnotatedComputationEffect('__static__'%2C%20index%2C%20note%2C%20part%2C%20null)%3B%0A%7D%20else%20%7B%0Afor%20(var%20i%20%3D%200%2C%20arg%3B%20i%20%3C%20sig.args.length%20%26%26%20(arg%20%3D%20sig.args%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!arg.literal)%20%7B%0Athis.__addAnnotatedComputationEffect(arg.model%2C%20index%2C%20note%2C%20part%2C%20arg)%3B%0A%7D%0A%7D%0Aif%20(sig.dynamicFn)%20%7B%0Athis.__addAnnotatedComputationEffect(sig.method%2C%20index%2C%20note%2C%20part%2C%20null)%3B%0A%7D%0A%7D%0A%7D%2C%0A__addAnnotatedComputationEffect%3A%20function%20(property%2C%20index%2C%20note%2C%20part%2C%20trigger)%20%7B%0Athis._addPropertyEffect(property%2C%20'annotatedComputation'%2C%20%7B%0Aindex%3A%20index%2C%0AisCompound%3A%20note.isCompound%2C%0AcompoundIndex%3A%20part.compoundIndex%2C%0Akind%3A%20note.kind%2C%0Aname%3A%20note.name%2C%0Anegate%3A%20part.negate%2C%0Amethod%3A%20part.signature.method%2C%0Aargs%3A%20part.signature.args%2C%0Atrigger%3A%20trigger%2C%0AdynamicFn%3A%20part.signature.dynamicFn%0A%7D)%3B%0A%7D%2C%0A_parseMethod%3A%20function%20(expression)%20%7B%0Avar%20m%20%3D%20expression.match(%2F(%5B%5E%5Cs%5D%2B%3F)%5C((%5B%5Cs%5CS%5D*)%5C)%2F)%3B%0Aif%20(m)%20%7B%0Avar%20sig%20%3D%20%7B%0Amethod%3A%20m%5B1%5D%2C%0Astatic%3A%20true%0A%7D%3B%0Aif%20(this.getPropertyInfo(sig.method)%20!%3D%3D%20Polymer.nob)%20%7B%0Asig.static%20%3D%20false%3B%0Asig.dynamicFn%20%3D%20true%3B%0A%7D%0Aif%20(m%5B2%5D.trim())%20%7B%0Avar%20args%20%3D%20m%5B2%5D.replace(%2F%5C%5C%2C%2Fg%2C%20'%26comma%3B').split('%2C')%3B%0Areturn%20this._parseArgs(args%2C%20sig)%3B%0A%7D%20else%20%7B%0Asig.args%20%3D%20Polymer.nar%3B%0Areturn%20sig%3B%0A%7D%0A%7D%0A%7D%2C%0A_parseArgs%3A%20function%20(argList%2C%20sig)%20%7B%0Asig.args%20%3D%20argList.map(function%20(rawArg)%20%7B%0Avar%20arg%20%3D%20this._parseArg(rawArg)%3B%0Aif%20(!arg.literal)%20%7B%0Asig.static%20%3D%20false%3B%0A%7D%0Areturn%20arg%3B%0A%7D%2C%20this)%3B%0Areturn%20sig%3B%0A%7D%2C%0A_parseArg%3A%20function%20(rawArg)%20%7B%0Avar%20arg%20%3D%20rawArg.trim().replace(%2F%26comma%3B%2Fg%2C%20'%2C').replace(%2F%5C%5C(.)%2Fg%2C%20'%241')%3B%0Avar%20a%20%3D%20%7B%20name%3A%20arg%20%7D%3B%0Avar%20fc%20%3D%20arg%5B0%5D%3B%0Aif%20(fc%20%3D%3D%3D%20'-')%20%7B%0Afc%20%3D%20arg%5B1%5D%3B%0A%7D%0Aif%20(fc%20%3E%3D%20'0'%20%26%26%20fc%20%3C%3D%20'9')%20%7B%0Afc%20%3D%20'%23'%3B%0A%7D%0Aswitch%20(fc)%20%7B%0Acase%20'%5C''%3A%0Acase%20'%22'%3A%0Aa.value%20%3D%20arg.slice(1%2C%20-1)%3B%0Aa.literal%20%3D%20true%3B%0Abreak%3B%0Acase%20'%23'%3A%0Aa.value%20%3D%20Number(arg)%3B%0Aa.literal%20%3D%20true%3B%0Abreak%3B%0A%7D%0Aif%20(!a.literal)%20%7B%0Aa.model%20%3D%20this._modelForPath(arg)%3B%0Aa.structured%20%3D%20arg.indexOf('.')%20%3E%200%3B%0Aif%20(a.structured)%20%7B%0Aa.wildcard%20%3D%20arg.slice(-2)%20%3D%3D%20'.*'%3B%0Aif%20(a.wildcard)%20%7B%0Aa.name%20%3D%20arg.slice(0%2C%20-2)%3B%0A%7D%0A%7D%0A%7D%0Areturn%20a%3B%0A%7D%2C%0A_marshalInstanceEffects%3A%20function%20()%20%7B%0APolymer.Bind.prepareInstance(this)%3B%0Aif%20(this._bindListeners)%20%7B%0APolymer.Bind.setupBindListeners(this)%3B%0A%7D%0A%7D%2C%0A_applyEffectValue%3A%20function%20(info%2C%20value)%20%7B%0Avar%20node%20%3D%20this._nodes%5Binfo.index%5D%3B%0Avar%20property%20%3D%20info.name%3B%0Aif%20(info.isCompound)%20%7B%0Avar%20storage%20%3D%20node.__compoundStorage__%5Bproperty%5D%3B%0Astorage%5Binfo.compoundIndex%5D%20%3D%20value%3B%0Avalue%20%3D%20storage.join('')%3B%0A%7D%0Aif%20(info.kind%20%3D%3D%20'attribute')%20%7B%0Athis.serializeValueToAttribute(value%2C%20property%2C%20node)%3B%0A%7D%20else%20%7B%0Aif%20(property%20%3D%3D%3D%20'className')%20%7B%0Avalue%20%3D%20this._scopeElementClass(node%2C%20value)%3B%0A%7D%0Aif%20(property%20%3D%3D%3D%20'textContent'%20%7C%7C%20node.localName%20%3D%3D%20'input'%20%26%26%20property%20%3D%3D%20'value')%20%7B%0Avalue%20%3D%20value%20%3D%3D%20undefined%20%3F%20''%20%3A%20value%3B%0A%7D%0Avar%20pinfo%3B%0Aif%20(!node._propertyInfo%20%7C%7C%20!(pinfo%20%3D%20node._propertyInfo%5Bproperty%5D)%20%7C%7C%20!pinfo.readOnly)%20%7B%0Athis.__setProperty(property%2C%20value%2C%20false%2C%20node)%3B%0A%7D%0A%7D%0A%7D%2C%0A_executeStaticEffects%3A%20function%20()%20%7B%0Aif%20(this._propertyEffects%20%26%26%20this._propertyEffects.__static__)%20%7B%0Athis._effectEffects('__static__'%2C%20null%2C%20this._propertyEffects.__static__)%3B%0A%7D%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0Avar%20usePolyfillProto%20%3D%20Polymer.Settings.usePolyfillProto%3B%0APolymer.Base._addFeature(%7B%0A_setupConfigure%3A%20function%20(initialConfig)%20%7B%0Athis._config%20%3D%20%7B%7D%3B%0Athis._handlers%20%3D%20%5B%5D%3B%0Athis._aboveConfig%20%3D%20null%3B%0Aif%20(initialConfig)%20%7B%0Afor%20(var%20i%20in%20initialConfig)%20%7B%0Aif%20(initialConfig%5Bi%5D%20!%3D%3D%20undefined)%20%7B%0Athis._config%5Bi%5D%20%3D%20initialConfig%5Bi%5D%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_marshalAttributes%3A%20function%20()%20%7B%0Athis._takeAttributesToModel(this._config)%3B%0A%7D%2C%0A_attributeChangedImpl%3A%20function%20(name)%20%7B%0Avar%20model%20%3D%20this._clientsReadied%20%3F%20this%20%3A%20this._config%3B%0Athis._setAttributeToProperty(model%2C%20name)%3B%0A%7D%2C%0A_configValue%3A%20function%20(name%2C%20value)%20%7B%0Avar%20info%20%3D%20this._propertyInfo%5Bname%5D%3B%0Aif%20(!info%20%7C%7C%20!info.readOnly)%20%7B%0Athis._config%5Bname%5D%20%3D%20value%3B%0A%7D%0A%7D%2C%0A_beforeClientsReady%3A%20function%20()%20%7B%0Athis._configure()%3B%0A%7D%2C%0A_configure%3A%20function%20()%20%7B%0Athis._configureAnnotationReferences()%3B%0Athis._aboveConfig%20%3D%20this.mixin(%7B%7D%2C%20this._config)%3B%0Avar%20config%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._configureProperties(this.behaviors%5Bi%5D.properties%2C%20config)%3B%0A%7D%0Athis._configureProperties(this.properties%2C%20config)%3B%0Athis.mixin(config%2C%20this._aboveConfig)%3B%0Athis._config%20%3D%20config%3B%0Aif%20(this._clients%20%26%26%20this._clients.length)%20%7B%0Athis._distributeConfig(this._config)%3B%0A%7D%0A%7D%2C%0A_configureProperties%3A%20function%20(properties%2C%20config)%20%7B%0Afor%20(var%20i%20in%20properties)%20%7B%0Avar%20c%20%3D%20properties%5Bi%5D%3B%0Aif%20(!usePolyfillProto%20%26%26%20this.hasOwnProperty(i)%20%26%26%20this._propertyEffects%20%26%26%20this._propertyEffects%5Bi%5D)%20%7B%0Aconfig%5Bi%5D%20%3D%20this%5Bi%5D%3B%0Adelete%20this%5Bi%5D%3B%0A%7D%20else%20if%20(c.value%20!%3D%3D%20undefined)%20%7B%0Avar%20value%20%3D%20c.value%3B%0Aif%20(typeof%20value%20%3D%3D%20'function')%20%7B%0Avalue%20%3D%20value.call(this%2C%20this._config)%3B%0A%7D%0Aconfig%5Bi%5D%20%3D%20value%3B%0A%7D%0A%7D%0A%7D%2C%0A_distributeConfig%3A%20function%20(config)%20%7B%0Avar%20fx%24%20%3D%20this._propertyEffects%3B%0Aif%20(fx%24)%20%7B%0Afor%20(var%20p%20in%20config)%20%7B%0Avar%20fx%20%3D%20fx%24%5Bp%5D%3B%0Aif%20(fx)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20fx.length%2C%20x%3B%20i%20%3C%20l%20%26%26%20(x%20%3D%20fx%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(x.kind%20%3D%3D%3D%20'annotation'%20%26%26%20!x.isCompound)%20%7B%0Avar%20node%20%3D%20this._nodes%5Bx.effect.index%5D%3B%0Avar%20name%20%3D%20x.effect.propertyName%3B%0Avar%20isAttr%20%3D%20x.effect.kind%20%3D%3D%20'attribute'%3B%0Avar%20hasEffect%20%3D%20node._propertyEffects%20%26%26%20node._propertyEffects%5Bname%5D%3B%0Aif%20(node._configValue%20%26%26%20(hasEffect%20%7C%7C%20!isAttr))%20%7B%0Avar%20value%20%3D%20p%20%3D%3D%3D%20x.effect.value%20%3F%20config%5Bp%5D%20%3A%20this._get(x.effect.value%2C%20config)%3B%0Aif%20(isAttr)%20%7B%0Avalue%20%3D%20node.deserialize(this.serialize(value)%2C%20node._propertyInfo%5Bname%5D.type)%3B%0A%7D%0Anode._configValue(name%2C%20value)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_afterClientsReady%3A%20function%20()%20%7B%0Athis._executeStaticEffects()%3B%0Athis._applyConfig(this._config%2C%20this._aboveConfig)%3B%0Athis._flushHandlers()%3B%0A%7D%2C%0A_applyConfig%3A%20function%20(config%2C%20aboveConfig)%20%7B%0Afor%20(var%20n%20in%20config)%20%7B%0Aif%20(this%5Bn%5D%20%3D%3D%3D%20undefined)%20%7B%0Athis.__setProperty(n%2C%20config%5Bn%5D%2C%20n%20in%20aboveConfig)%3B%0A%7D%0A%7D%0A%7D%2C%0A_notifyListener%3A%20function%20(fn%2C%20e)%20%7B%0Aif%20(!Polymer.Bind._isEventBogus(e%2C%20e.target))%20%7B%0Avar%20value%2C%20path%3B%0Aif%20(e.detail)%20%7B%0Avalue%20%3D%20e.detail.value%3B%0Apath%20%3D%20e.detail.path%3B%0A%7D%0Aif%20(!this._clientsReadied)%20%7B%0Athis._queueHandler(%5B%0Afn%2C%0Ae.target%2C%0Avalue%2C%0Apath%0A%5D)%3B%0A%7D%20else%20%7B%0Areturn%20fn.call(this%2C%20e.target%2C%20value%2C%20path)%3B%0A%7D%0A%7D%0A%7D%2C%0A_queueHandler%3A%20function%20(args)%20%7B%0Athis._handlers.push(args)%3B%0A%7D%2C%0A_flushHandlers%3A%20function%20()%20%7B%0Avar%20h%24%20%3D%20this._handlers%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20h%24.length%2C%20h%3B%20i%20%3C%20l%20%26%26%20(h%20%3D%20h%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ah%5B0%5D.call(this%2C%20h%5B1%5D%2C%20h%5B2%5D%2C%20h%5B3%5D)%3B%0A%7D%0Athis._handlers%20%3D%20%5B%5D%3B%0A%7D%0A%7D)%3B%0A%7D())%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0APolymer.Base._addFeature(%7B%0AnotifyPath%3A%20function%20(path%2C%20value%2C%20fromAbove)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Athis._get(path%2C%20this%2C%20info)%3B%0Aif%20(info.path)%20%7B%0Athis._notifyPath(info.path%2C%20value%2C%20fromAbove)%3B%0A%7D%0A%7D%2C%0A_notifyPath%3A%20function%20(path%2C%20value%2C%20fromAbove)%20%7B%0Avar%20old%20%3D%20this._propertySetter(path%2C%20value)%3B%0Aif%20(old%20!%3D%3D%20value%20%26%26%20(old%20%3D%3D%3D%20old%20%7C%7C%20value%20%3D%3D%3D%20value))%20%7B%0Athis._pathEffector(path%2C%20value)%3B%0Aif%20(!fromAbove)%20%7B%0Athis._notifyPathUp(path%2C%20value)%3B%0A%7D%0Areturn%20true%3B%0A%7D%0A%7D%2C%0A_getPathParts%3A%20function%20(path)%20%7B%0Aif%20(Array.isArray(path))%20%7B%0Avar%20parts%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20path.length%3B%20i%2B%2B)%20%7B%0Avar%20args%20%3D%20path%5Bi%5D.toString().split('.')%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20args.length%3B%20j%2B%2B)%20%7B%0Aparts.push(args%5Bj%5D)%3B%0A%7D%0A%7D%0Areturn%20parts%3B%0A%7D%20else%20%7B%0Areturn%20path.toString().split('.')%3B%0A%7D%0A%7D%2C%0Aset%3A%20function%20(path%2C%20value%2C%20root)%20%7B%0Avar%20prop%20%3D%20root%20%7C%7C%20this%3B%0Avar%20parts%20%3D%20this._getPathParts(path)%3B%0Avar%20array%3B%0Avar%20last%20%3D%20parts%5Bparts.length%20-%201%5D%3B%0Aif%20(parts.length%20%3E%201)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20parts.length%20-%201%3B%20i%2B%2B)%20%7B%0Avar%20part%20%3D%20parts%5Bi%5D%3B%0Aif%20(array%20%26%26%20part%5B0%5D%20%3D%3D%20'%23')%20%7B%0Aprop%20%3D%20Polymer.Collection.get(array).getItem(part)%3B%0A%7D%20else%20%7B%0Aprop%20%3D%20prop%5Bpart%5D%3B%0Aif%20(array%20%26%26%20parseInt(part%2C%2010)%20%3D%3D%20part)%20%7B%0Aparts%5Bi%5D%20%3D%20Polymer.Collection.get(array).getKey(prop)%3B%0A%7D%0A%7D%0Aif%20(!prop)%20%7B%0Areturn%3B%0A%7D%0Aarray%20%3D%20Array.isArray(prop)%20%3F%20prop%20%3A%20null%3B%0A%7D%0Aif%20(array)%20%7B%0Avar%20coll%20%3D%20Polymer.Collection.get(array)%3B%0Avar%20old%2C%20key%3B%0Aif%20(last%5B0%5D%20%3D%3D%20'%23')%20%7B%0Akey%20%3D%20last%3B%0Aold%20%3D%20coll.getItem(key)%3B%0Alast%20%3D%20array.indexOf(old)%3B%0Acoll.setItem(key%2C%20value)%3B%0A%7D%20else%20if%20(parseInt(last%2C%2010)%20%3D%3D%20last)%20%7B%0Aold%20%3D%20prop%5Blast%5D%3B%0Akey%20%3D%20coll.getKey(old)%3B%0Aparts%5Bi%5D%20%3D%20key%3B%0Acoll.setItem(key%2C%20value)%3B%0A%7D%0A%7D%0Aprop%5Blast%5D%20%3D%20value%3B%0Aif%20(!root)%20%7B%0Athis._notifyPath(parts.join('.')%2C%20value)%3B%0A%7D%0A%7D%20else%20%7B%0Aprop%5Bpath%5D%20%3D%20value%3B%0A%7D%0A%7D%2C%0Aget%3A%20function%20(path%2C%20root)%20%7B%0Areturn%20this._get(path%2C%20root)%3B%0A%7D%2C%0A_get%3A%20function%20(path%2C%20root%2C%20info)%20%7B%0Avar%20prop%20%3D%20root%20%7C%7C%20this%3B%0Avar%20parts%20%3D%20this._getPathParts(path)%3B%0Avar%20array%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20parts.length%3B%20i%2B%2B)%20%7B%0Aif%20(!prop)%20%7B%0Areturn%3B%0A%7D%0Avar%20part%20%3D%20parts%5Bi%5D%3B%0Aif%20(array%20%26%26%20part%5B0%5D%20%3D%3D%20'%23')%20%7B%0Aprop%20%3D%20Polymer.Collection.get(array).getItem(part)%3B%0A%7D%20else%20%7B%0Aprop%20%3D%20prop%5Bpart%5D%3B%0Aif%20(info%20%26%26%20array%20%26%26%20parseInt(part%2C%2010)%20%3D%3D%20part)%20%7B%0Aparts%5Bi%5D%20%3D%20Polymer.Collection.get(array).getKey(prop)%3B%0A%7D%0A%7D%0Aarray%20%3D%20Array.isArray(prop)%20%3F%20prop%20%3A%20null%3B%0A%7D%0Aif%20(info)%20%7B%0Ainfo.path%20%3D%20parts.join('.')%3B%0A%7D%0Areturn%20prop%3B%0A%7D%2C%0A_pathEffector%3A%20function%20(path%2C%20value)%20%7B%0Avar%20model%20%3D%20this._modelForPath(path)%3B%0Avar%20fx%24%20%3D%20this._propertyEffects%20%26%26%20this._propertyEffects%5Bmodel%5D%3B%0Aif%20(fx%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20fx%3B%20i%20%3C%20fx%24.length%20%26%26%20(fx%20%3D%20fx%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20fxFn%20%3D%20fx.pathFn%3B%0Aif%20(fxFn)%20%7B%0AfxFn.call(this%2C%20path%2C%20value%2C%20fx.effect)%3B%0A%7D%0A%7D%0A%7D%0Aif%20(this._boundPaths)%20%7B%0Athis._notifyBoundPaths(path%2C%20value)%3B%0A%7D%0A%7D%2C%0A_annotationPathEffect%3A%20function%20(path%2C%20value%2C%20effect)%20%7B%0Aif%20(effect.value%20%3D%3D%3D%20path%20%7C%7C%20effect.value.indexOf(path%20%2B%20'.')%20%3D%3D%3D%200)%20%7B%0APolymer.Bind._annotationEffect.call(this%2C%20path%2C%20value%2C%20effect)%3B%0A%7D%20else%20if%20(path.indexOf(effect.value%20%2B%20'.')%20%3D%3D%3D%200%20%26%26%20!effect.negate)%20%7B%0Avar%20node%20%3D%20this._nodes%5Beffect.index%5D%3B%0Aif%20(node%20%26%26%20node._notifyPath)%20%7B%0Avar%20p%20%3D%20this._fixPath(effect.name%2C%20effect.value%2C%20path)%3B%0Anode._notifyPath(p%2C%20value%2C%20true)%3B%0A%7D%0A%7D%0A%7D%2C%0A_complexObserverPathEffect%3A%20function%20(path%2C%20value%2C%20effect)%20%7B%0Aif%20(this._pathMatchesEffect(path%2C%20effect))%20%7B%0APolymer.Bind._complexObserverEffect.call(this%2C%20path%2C%20value%2C%20effect)%3B%0A%7D%0A%7D%2C%0A_computePathEffect%3A%20function%20(path%2C%20value%2C%20effect)%20%7B%0Aif%20(this._pathMatchesEffect(path%2C%20effect))%20%7B%0APolymer.Bind._computeEffect.call(this%2C%20path%2C%20value%2C%20effect)%3B%0A%7D%0A%7D%2C%0A_annotatedComputationPathEffect%3A%20function%20(path%2C%20value%2C%20effect)%20%7B%0Aif%20(this._pathMatchesEffect(path%2C%20effect))%20%7B%0APolymer.Bind._annotatedComputationEffect.call(this%2C%20path%2C%20value%2C%20effect)%3B%0A%7D%0A%7D%2C%0A_pathMatchesEffect%3A%20function%20(path%2C%20effect)%20%7B%0Avar%20effectArg%20%3D%20effect.trigger.name%3B%0Areturn%20effectArg%20%3D%3D%20path%20%7C%7C%20effectArg.indexOf(path%20%2B%20'.')%20%3D%3D%3D%200%20%7C%7C%20effect.trigger.wildcard%20%26%26%20path.indexOf(effectArg)%20%3D%3D%3D%200%3B%0A%7D%2C%0AlinkPaths%3A%20function%20(to%2C%20from)%20%7B%0Athis._boundPaths%20%3D%20this._boundPaths%20%7C%7C%20%7B%7D%3B%0Aif%20(from)%20%7B%0Athis._boundPaths%5Bto%5D%20%3D%20from%3B%0A%7D%20else%20%7B%0Athis.unlinkPaths(to)%3B%0A%7D%0A%7D%2C%0AunlinkPaths%3A%20function%20(path)%20%7B%0Aif%20(this._boundPaths)%20%7B%0Adelete%20this._boundPaths%5Bpath%5D%3B%0A%7D%0A%7D%2C%0A_notifyBoundPaths%3A%20function%20(path%2C%20value)%20%7B%0Afor%20(var%20a%20in%20this._boundPaths)%20%7B%0Avar%20b%20%3D%20this._boundPaths%5Ba%5D%3B%0Aif%20(path.indexOf(a%20%2B%20'.')%20%3D%3D%200)%20%7B%0Athis._notifyPath(this._fixPath(b%2C%20a%2C%20path)%2C%20value)%3B%0A%7D%20else%20if%20(path.indexOf(b%20%2B%20'.')%20%3D%3D%200)%20%7B%0Athis._notifyPath(this._fixPath(a%2C%20b%2C%20path)%2C%20value)%3B%0A%7D%0A%7D%0A%7D%2C%0A_fixPath%3A%20function%20(property%2C%20root%2C%20path)%20%7B%0Areturn%20property%20%2B%20path.slice(root.length)%3B%0A%7D%2C%0A_notifyPathUp%3A%20function%20(path%2C%20value)%20%7B%0Avar%20rootName%20%3D%20this._modelForPath(path)%3B%0Avar%20dashCaseName%20%3D%20Polymer.CaseMap.camelToDashCase(rootName)%3B%0Avar%20eventName%20%3D%20dashCaseName%20%2B%20this._EVENT_CHANGED%3B%0Athis.fire(eventName%2C%20%7B%0Apath%3A%20path%2C%0Avalue%3A%20value%0A%7D%2C%20%7B%0Abubbles%3A%20false%2C%0A_useCache%3A%20true%0A%7D)%3B%0A%7D%2C%0A_modelForPath%3A%20function%20(path)%20%7B%0Avar%20dot%20%3D%20path.indexOf('.')%3B%0Areturn%20dot%20%3C%200%20%3F%20path%20%3A%20path.slice(0%2C%20dot)%3B%0A%7D%2C%0A_EVENT_CHANGED%3A%20'-changed'%2C%0AnotifySplices%3A%20function%20(path%2C%20splices)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Athis._notifySplices(array%2C%20info.path%2C%20splices)%3B%0A%7D%2C%0A_notifySplices%3A%20function%20(array%2C%20path%2C%20splices)%20%7B%0Avar%20change%20%3D%20%7B%0AkeySplices%3A%20Polymer.Collection.applySplices(array%2C%20splices)%2C%0AindexSplices%3A%20splices%0A%7D%3B%0Aif%20(!array.hasOwnProperty('splices'))%20%7B%0AObject.defineProperty(array%2C%20'splices'%2C%20%7B%0Aconfigurable%3A%20true%2C%0Awritable%3A%20true%0A%7D)%3B%0A%7D%0Aarray.splices%20%3D%20change%3B%0Athis._notifyPath(path%20%2B%20'.splices'%2C%20change)%3B%0Athis._notifyPath(path%20%2B%20'.length'%2C%20array.length)%3B%0Achange.keySplices%20%3D%20null%3B%0Achange.indexSplices%20%3D%20null%3B%0A%7D%2C%0A_notifySplice%3A%20function%20(array%2C%20path%2C%20index%2C%20added%2C%20removed)%20%7B%0Athis._notifySplices(array%2C%20path%2C%20%5B%7B%0Aindex%3A%20index%2C%0AaddedCount%3A%20added%2C%0Aremoved%3A%20removed%2C%0Aobject%3A%20array%2C%0Atype%3A%20'splice'%0A%7D%5D)%3B%0A%7D%2C%0Apush%3A%20function%20(path)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Avar%20args%20%3D%20Array.prototype.slice.call(arguments%2C%201)%3B%0Avar%20len%20%3D%20array.length%3B%0Avar%20ret%20%3D%20array.push.apply(array%2C%20args)%3B%0Aif%20(args.length)%20%7B%0Athis._notifySplice(array%2C%20info.path%2C%20len%2C%20args.length%2C%20%5B%5D)%3B%0A%7D%0Areturn%20ret%3B%0A%7D%2C%0Apop%3A%20function%20(path)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Avar%20hadLength%20%3D%20Boolean(array.length)%3B%0Avar%20args%20%3D%20Array.prototype.slice.call(arguments%2C%201)%3B%0Avar%20ret%20%3D%20array.pop.apply(array%2C%20args)%3B%0Aif%20(hadLength)%20%7B%0Athis._notifySplice(array%2C%20info.path%2C%20array.length%2C%200%2C%20%5Bret%5D)%3B%0A%7D%0Areturn%20ret%3B%0A%7D%2C%0Asplice%3A%20function%20(path%2C%20start)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Aif%20(start%20%3C%200)%20%7B%0Astart%20%3D%20array.length%20-%20Math.floor(-start)%3B%0A%7D%20else%20%7B%0Astart%20%3D%20Math.floor(start)%3B%0A%7D%0Aif%20(!start)%20%7B%0Astart%20%3D%200%3B%0A%7D%0Avar%20args%20%3D%20Array.prototype.slice.call(arguments%2C%201)%3B%0Avar%20ret%20%3D%20array.splice.apply(array%2C%20args)%3B%0Avar%20addedCount%20%3D%20Math.max(args.length%20-%202%2C%200)%3B%0Aif%20(addedCount%20%7C%7C%20ret.length)%20%7B%0Athis._notifySplice(array%2C%20info.path%2C%20start%2C%20addedCount%2C%20ret)%3B%0A%7D%0Areturn%20ret%3B%0A%7D%2C%0Ashift%3A%20function%20(path)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Avar%20hadLength%20%3D%20Boolean(array.length)%3B%0Avar%20args%20%3D%20Array.prototype.slice.call(arguments%2C%201)%3B%0Avar%20ret%20%3D%20array.shift.apply(array%2C%20args)%3B%0Aif%20(hadLength)%20%7B%0Athis._notifySplice(array%2C%20info.path%2C%200%2C%200%2C%20%5Bret%5D)%3B%0A%7D%0Areturn%20ret%3B%0A%7D%2C%0Aunshift%3A%20function%20(path)%20%7B%0Avar%20info%20%3D%20%7B%7D%3B%0Avar%20array%20%3D%20this._get(path%2C%20this%2C%20info)%3B%0Avar%20args%20%3D%20Array.prototype.slice.call(arguments%2C%201)%3B%0Avar%20ret%20%3D%20array.unshift.apply(array%2C%20args)%3B%0Aif%20(args.length)%20%7B%0Athis._notifySplice(array%2C%20info.path%2C%200%2C%20args.length%2C%20%5B%5D)%3B%0A%7D%0Areturn%20ret%3B%0A%7D%2C%0AprepareModelNotifyPath%3A%20function%20(model)%20%7B%0Athis.mixin(model%2C%20%7B%0Afire%3A%20Polymer.Base.fire%2C%0A_getEvent%3A%20Polymer.Base._getEvent%2C%0A__eventCache%3A%20Polymer.Base.__eventCache%2C%0AnotifyPath%3A%20Polymer.Base.notifyPath%2C%0A_get%3A%20Polymer.Base._get%2C%0A_EVENT_CHANGED%3A%20Polymer.Base._EVENT_CHANGED%2C%0A_notifyPath%3A%20Polymer.Base._notifyPath%2C%0A_notifyPathUp%3A%20Polymer.Base._notifyPathUp%2C%0A_pathEffector%3A%20Polymer.Base._pathEffector%2C%0A_annotationPathEffect%3A%20Polymer.Base._annotationPathEffect%2C%0A_complexObserverPathEffect%3A%20Polymer.Base._complexObserverPathEffect%2C%0A_annotatedComputationPathEffect%3A%20Polymer.Base._annotatedComputationPathEffect%2C%0A_computePathEffect%3A%20Polymer.Base._computePathEffect%2C%0A_modelForPath%3A%20Polymer.Base._modelForPath%2C%0A_pathMatchesEffect%3A%20Polymer.Base._pathMatchesEffect%2C%0A_notifyBoundPaths%3A%20Polymer.Base._notifyBoundPaths%2C%0A_getPathParts%3A%20Polymer.Base._getPathParts%0A%7D)%3B%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0AresolveUrl%3A%20function%20(url)%20%7B%0Avar%20module%20%3D%20Polymer.DomModule.import(this.is)%3B%0Avar%20root%20%3D%20''%3B%0Aif%20(module)%20%7B%0Avar%20assetPath%20%3D%20module.getAttribute('assetpath')%20%7C%7C%20''%3B%0Aroot%20%3D%20Polymer.ResolveUrl.resolveUrl(assetPath%2C%20module.ownerDocument.baseURI)%3B%0A%7D%0Areturn%20Polymer.ResolveUrl.resolveUrl(url%2C%20root)%3B%0A%7D%0A%7D)%3B%0APolymer.CssParse%20%3D%20function%20()%20%7B%0Areturn%20%7B%0Aparse%3A%20function%20(text)%20%7B%0Atext%20%3D%20this._clean(text)%3B%0Areturn%20this._parseCss(this._lex(text)%2C%20text)%3B%0A%7D%2C%0A_clean%3A%20function%20(cssText)%20%7B%0Areturn%20cssText.replace(this._rx.comments%2C%20'').replace(this._rx.port%2C%20'')%3B%0A%7D%2C%0A_lex%3A%20function%20(text)%20%7B%0Avar%20root%20%3D%20%7B%0Astart%3A%200%2C%0Aend%3A%20text.length%0A%7D%3B%0Avar%20n%20%3D%20root%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20text.length%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Aswitch%20(text%5Bi%5D)%20%7B%0Acase%20this.OPEN_BRACE%3A%0Aif%20(!n.rules)%20%7B%0An.rules%20%3D%20%5B%5D%3B%0A%7D%0Avar%20p%20%3D%20n%3B%0Avar%20previous%20%3D%20p.rules%5Bp.rules.length%20-%201%5D%3B%0An%20%3D%20%7B%0Astart%3A%20i%20%2B%201%2C%0Aparent%3A%20p%2C%0Aprevious%3A%20previous%0A%7D%3B%0Ap.rules.push(n)%3B%0Abreak%3B%0Acase%20this.CLOSE_BRACE%3A%0An.end%20%3D%20i%20%2B%201%3B%0An%20%3D%20n.parent%20%7C%7C%20root%3B%0Abreak%3B%0A%7D%0A%7D%0Areturn%20root%3B%0A%7D%2C%0A_parseCss%3A%20function%20(node%2C%20text)%20%7B%0Avar%20t%20%3D%20text.substring(node.start%2C%20node.end%20-%201)%3B%0Anode.parsedCssText%20%3D%20node.cssText%20%3D%20t.trim()%3B%0Aif%20(node.parent)%20%7B%0Avar%20ss%20%3D%20node.previous%20%3F%20node.previous.end%20%3A%20node.parent.start%3B%0At%20%3D%20text.substring(ss%2C%20node.start%20-%201)%3B%0At%20%3D%20this._expandUnicodeEscapes(t)%3B%0At%20%3D%20t.replace(this._rx.multipleSpaces%2C%20'%20')%3B%0At%20%3D%20t.substring(t.lastIndexOf('%3B')%20%2B%201)%3B%0Avar%20s%20%3D%20node.parsedSelector%20%3D%20node.selector%20%3D%20t.trim()%3B%0Anode.atRule%20%3D%20s.indexOf(this.AT_START)%20%3D%3D%3D%200%3B%0Aif%20(node.atRule)%20%7B%0Aif%20(s.indexOf(this.MEDIA_START)%20%3D%3D%3D%200)%20%7B%0Anode.type%20%3D%20this.types.MEDIA_RULE%3B%0A%7D%20else%20if%20(s.match(this._rx.keyframesRule))%20%7B%0Anode.type%20%3D%20this.types.KEYFRAMES_RULE%3B%0Anode.keyframesName%20%3D%20node.selector.split(this._rx.multipleSpaces).pop()%3B%0A%7D%0A%7D%20else%20%7B%0Aif%20(s.indexOf(this.VAR_START)%20%3D%3D%3D%200)%20%7B%0Anode.type%20%3D%20this.types.MIXIN_RULE%3B%0A%7D%20else%20%7B%0Anode.type%20%3D%20this.types.STYLE_RULE%3B%0A%7D%0A%7D%0A%7D%0Avar%20r%24%20%3D%20node.rules%3B%0Aif%20(r%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20r%24.length%2C%20r%3B%20i%20%3C%20l%20%26%26%20(r%20%3D%20r%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis._parseCss(r%2C%20text)%3B%0A%7D%0A%7D%0Areturn%20node%3B%0A%7D%2C%0A_expandUnicodeEscapes%3A%20function%20(s)%20%7B%0Areturn%20s.replace(%2F%5C%5C(%5B0-9a-f%5D%7B1%2C6%7D)%5Cs%2Fgi%2C%20function%20()%20%7B%0Avar%20code%20%3D%20arguments%5B1%5D%2C%20repeat%20%3D%206%20-%20code.length%3B%0Awhile%20(repeat--)%20%7B%0Acode%20%3D%20'0'%20%2B%20code%3B%0A%7D%0Areturn%20'%5C%5C'%20%2B%20code%3B%0A%7D)%3B%0A%7D%2C%0Astringify%3A%20function%20(node%2C%20preserveProperties%2C%20text)%20%7B%0Atext%20%3D%20text%20%7C%7C%20''%3B%0Avar%20cssText%20%3D%20''%3B%0Aif%20(node.cssText%20%7C%7C%20node.rules)%20%7B%0Avar%20r%24%20%3D%20node.rules%3B%0Aif%20(r%24%20%26%26%20(preserveProperties%20%7C%7C%20!this._hasMixinRules(r%24)))%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20r%24.length%2C%20r%3B%20i%20%3C%20l%20%26%26%20(r%20%3D%20r%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0AcssText%20%3D%20this.stringify(r%2C%20preserveProperties%2C%20cssText)%3B%0A%7D%0A%7D%20else%20%7B%0AcssText%20%3D%20preserveProperties%20%3F%20node.cssText%20%3A%20this.removeCustomProps(node.cssText)%3B%0AcssText%20%3D%20cssText.trim()%3B%0Aif%20(cssText)%20%7B%0AcssText%20%3D%20'%20%20'%20%2B%20cssText%20%2B%20'%5Cn'%3B%0A%7D%0A%7D%0A%7D%0Aif%20(cssText)%20%7B%0Aif%20(node.selector)%20%7B%0Atext%20%2B%3D%20node.selector%20%2B%20'%20'%20%2B%20this.OPEN_BRACE%20%2B%20'%5Cn'%3B%0A%7D%0Atext%20%2B%3D%20cssText%3B%0Aif%20(node.selector)%20%7B%0Atext%20%2B%3D%20this.CLOSE_BRACE%20%2B%20'%5Cn%5Cn'%3B%0A%7D%0A%7D%0Areturn%20text%3B%0A%7D%2C%0A_hasMixinRules%3A%20function%20(rules)%20%7B%0Areturn%20rules%5B0%5D.selector.indexOf(this.VAR_START)%20%3D%3D%3D%200%3B%0A%7D%2C%0AremoveCustomProps%3A%20function%20(cssText)%20%7B%0AcssText%20%3D%20this.removeCustomPropAssignment(cssText)%3B%0Areturn%20this.removeCustomPropApply(cssText)%3B%0A%7D%2C%0AremoveCustomPropAssignment%3A%20function%20(cssText)%20%7B%0Areturn%20cssText.replace(this._rx.customProp%2C%20'').replace(this._rx.mixinProp%2C%20'')%3B%0A%7D%2C%0AremoveCustomPropApply%3A%20function%20(cssText)%20%7B%0Areturn%20cssText.replace(this._rx.mixinApply%2C%20'').replace(this._rx.varApply%2C%20'')%3B%0A%7D%2C%0Atypes%3A%20%7B%0ASTYLE_RULE%3A%201%2C%0AKEYFRAMES_RULE%3A%207%2C%0AMEDIA_RULE%3A%204%2C%0AMIXIN_RULE%3A%201000%0A%7D%2C%0AOPEN_BRACE%3A%20'%7B'%2C%0ACLOSE_BRACE%3A%20'%7D'%2C%0A_rx%3A%20%7B%0Acomments%3A%20%2F%5C%2F%5C*%5B%5E*%5D*%5C*%2B(%5B%5E%5C%2F*%5D%5B%5E*%5D*%5C*%2B)*%5C%2F%2Fgim%2C%0Aport%3A%20%2F%40import%5B%5E%3B%5D*%3B%2Fgim%2C%0AcustomProp%3A%20%2F(%3F%3A%5E%5B%5E%3B%5C-%5Cs%7D%5D%2B)%3F--%5B%5E%3B%7B%7D%5D*%3F%3A%5B%5E%7B%7D%3B%5D*%3F(%3F%3A%5B%3B%5Cn%5D%7C%24)%2Fgim%2C%0AmixinProp%3A%20%2F(%3F%3A%5E%5B%5E%3B%5C-%5Cs%7D%5D%2B)%3F--%5B%5E%3B%7B%7D%5D*%3F%3A%5B%5E%7B%7D%3B%5D*%3F%7B%5B%5E%7D%5D*%3F%7D(%3F%3A%5B%3B%5Cn%5D%7C%24)%3F%2Fgim%2C%0AmixinApply%3A%20%2F%40apply%5B%5Cs%5D*%5C(%5B%5E)%5D*%3F%5C)%5B%5Cs%5D*(%3F%3A%5B%3B%5Cn%5D%7C%24)%3F%2Fgim%2C%0AvarApply%3A%20%2F%5B%5E%3B%3A%5D*%3F%3A%5B%5E%3B%5D*%3Fvar%5C(%5B%5E%3B%5D*%5C)(%3F%3A%5B%3B%5Cn%5D%7C%24)%3F%2Fgim%2C%0AkeyframesRule%3A%20%2F%5E%40%5B%5E%5Cs%5D*keyframes%2F%2C%0AmultipleSpaces%3A%20%2F%5Cs%2B%2Fg%0A%7D%2C%0AVAR_START%3A%20'--'%2C%0AMEDIA_START%3A%20'%40media'%2C%0AAT_START%3A%20'%40'%0A%7D%3B%0A%7D()%3B%0APolymer.StyleUtil%20%3D%20function%20()%20%7B%0Areturn%20%7B%0AMODULE_STYLES_SELECTOR%3A%20'style%2C%20link%5Brel%3Dimport%5D%5Btype~%3Dcss%5D%2C%20template'%2C%0AINCLUDE_ATTR%3A%20'include'%2C%0AtoCssText%3A%20function%20(rules%2C%20callback%2C%20preserveProperties)%20%7B%0Aif%20(typeof%20rules%20%3D%3D%3D%20'string')%20%7B%0Arules%20%3D%20this.parser.parse(rules)%3B%0A%7D%0Aif%20(callback)%20%7B%0Athis.forEachRule(rules%2C%20callback)%3B%0A%7D%0Areturn%20this.parser.stringify(rules%2C%20preserveProperties)%3B%0A%7D%2C%0AforRulesInStyles%3A%20function%20(styles%2C%20styleRuleCallback%2C%20keyframesRuleCallback)%20%7B%0Aif%20(styles)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20styles.length%2C%20s%3B%20i%20%3C%20l%20%26%26%20(s%20%3D%20styles%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis.forEachRule(this.rulesForStyle(s)%2C%20styleRuleCallback%2C%20keyframesRuleCallback)%3B%0A%7D%0A%7D%0A%7D%2C%0ArulesForStyle%3A%20function%20(style)%20%7B%0Aif%20(!style.__cssRules%20%26%26%20style.textContent)%20%7B%0Astyle.__cssRules%20%3D%20this.parser.parse(style.textContent)%3B%0A%7D%0Areturn%20style.__cssRules%3B%0A%7D%2C%0AisKeyframesSelector%3A%20function%20(rule)%20%7B%0Areturn%20rule.parent%20%26%26%20rule.parent.type%20%3D%3D%3D%20this.ruleTypes.KEYFRAMES_RULE%3B%0A%7D%2C%0AforEachRule%3A%20function%20(node%2C%20styleRuleCallback%2C%20keyframesRuleCallback)%20%7B%0Aif%20(!node)%20%7B%0Areturn%3B%0A%7D%0Avar%20skipRules%20%3D%20false%3B%0Aif%20(node.type%20%3D%3D%3D%20this.ruleTypes.STYLE_RULE)%20%7B%0AstyleRuleCallback(node)%3B%0A%7D%20else%20if%20(keyframesRuleCallback%20%26%26%20node.type%20%3D%3D%3D%20this.ruleTypes.KEYFRAMES_RULE)%20%7B%0AkeyframesRuleCallback(node)%3B%0A%7D%20else%20if%20(node.type%20%3D%3D%3D%20this.ruleTypes.MIXIN_RULE)%20%7B%0AskipRules%20%3D%20true%3B%0A%7D%0Avar%20r%24%20%3D%20node.rules%3B%0Aif%20(r%24%20%26%26%20!skipRules)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20r%24.length%2C%20r%3B%20i%20%3C%20l%20%26%26%20(r%20%3D%20r%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis.forEachRule(r%2C%20styleRuleCallback%2C%20keyframesRuleCallback)%3B%0A%7D%0A%7D%0A%7D%2C%0AapplyCss%3A%20function%20(cssText%2C%20moniker%2C%20target%2C%20afterNode)%20%7B%0Avar%20style%20%3D%20document.createElement('style')%3B%0Aif%20(moniker)%20%7B%0Astyle.setAttribute('scope'%2C%20moniker)%3B%0A%7D%0Astyle.textContent%20%3D%20cssText%3B%0Atarget%20%3D%20target%20%7C%7C%20document.head%3B%0Aif%20(!afterNode)%20%7B%0Avar%20n%24%20%3D%20target.querySelectorAll('style%5Bscope%5D')%3B%0AafterNode%20%3D%20n%24%5Bn%24.length%20-%201%5D%3B%0A%7D%0Atarget.insertBefore(style%2C%20afterNode%20%26%26%20afterNode.nextSibling%20%7C%7C%20target.firstChild)%3B%0Areturn%20style%3B%0A%7D%2C%0AcssFromModules%3A%20function%20(moduleIds%2C%20warnIfNotFound)%20%7B%0Avar%20modules%20%3D%20moduleIds.trim().split('%20')%3B%0Avar%20cssText%20%3D%20''%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20modules.length%3B%20i%2B%2B)%20%7B%0AcssText%20%2B%3D%20this.cssFromModule(modules%5Bi%5D%2C%20warnIfNotFound)%3B%0A%7D%0Areturn%20cssText%3B%0A%7D%2C%0AcssFromModule%3A%20function%20(moduleId%2C%20warnIfNotFound)%20%7B%0Avar%20m%20%3D%20Polymer.DomModule.import(moduleId)%3B%0Aif%20(m%20%26%26%20!m._cssText)%20%7B%0Am._cssText%20%3D%20this.cssFromElement(m)%3B%0A%7D%0Aif%20(!m%20%26%26%20warnIfNotFound)%20%7B%0Aconsole.warn('Could%20not%20find%20style%20data%20in%20module%20named'%2C%20moduleId)%3B%0A%7D%0Areturn%20m%20%26%26%20m._cssText%20%7C%7C%20''%3B%0A%7D%2C%0AcssFromElement%3A%20function%20(element)%20%7B%0Avar%20cssText%20%3D%20''%3B%0Avar%20content%20%3D%20element.content%20%7C%7C%20element%3B%0Avar%20e%24%20%3D%20Polymer.TreeApi.arrayCopy(content.querySelectorAll(this.MODULE_STYLES_SELECTOR))%3B%0Afor%20(var%20i%20%3D%200%2C%20e%3B%20i%20%3C%20e%24.length%3B%20i%2B%2B)%20%7B%0Ae%20%3D%20e%24%5Bi%5D%3B%0Aif%20(e.localName%20%3D%3D%3D%20'template')%20%7B%0AcssText%20%2B%3D%20this.cssFromElement(e)%3B%0A%7D%20else%20%7B%0Aif%20(e.localName%20%3D%3D%3D%20'style')%20%7B%0Avar%20include%20%3D%20e.getAttribute(this.INCLUDE_ATTR)%3B%0Aif%20(include)%20%7B%0AcssText%20%2B%3D%20this.cssFromModules(include%2C%20true)%3B%0A%7D%0Ae%20%3D%20e.__appliedElement%20%7C%7C%20e%3B%0Ae.parentNode.removeChild(e)%3B%0AcssText%20%2B%3D%20this.resolveCss(e.textContent%2C%20element.ownerDocument)%3B%0A%7D%20else%20if%20(e.import%20%26%26%20e.import.body)%20%7B%0AcssText%20%2B%3D%20this.resolveCss(e.import.body.textContent%2C%20e.import)%3B%0A%7D%0A%7D%0A%7D%0Areturn%20cssText%3B%0A%7D%2C%0AresolveCss%3A%20Polymer.ResolveUrl.resolveCss%2C%0Aparser%3A%20Polymer.CssParse%2C%0AruleTypes%3A%20Polymer.CssParse.types%0A%7D%3B%0A%7D()%3B%0APolymer.StyleTransformer%20%3D%20function%20()%20%7B%0Avar%20nativeShadow%20%3D%20Polymer.Settings.useNativeShadow%3B%0Avar%20styleUtil%20%3D%20Polymer.StyleUtil%3B%0Avar%20api%20%3D%20%7B%0Adom%3A%20function%20(node%2C%20scope%2C%20useAttr%2C%20shouldRemoveScope)%20%7B%0Athis._transformDom(node%2C%20scope%20%7C%7C%20''%2C%20useAttr%2C%20shouldRemoveScope)%3B%0A%7D%2C%0A_transformDom%3A%20function%20(node%2C%20selector%2C%20useAttr%2C%20shouldRemoveScope)%20%7B%0Aif%20(node.setAttribute)%20%7B%0Athis.element(node%2C%20selector%2C%20useAttr%2C%20shouldRemoveScope)%3B%0A%7D%0Avar%20c%24%20%3D%20Polymer.dom(node).childNodes%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c%24.length%3B%20i%2B%2B)%20%7B%0Athis._transformDom(c%24%5Bi%5D%2C%20selector%2C%20useAttr%2C%20shouldRemoveScope)%3B%0A%7D%0A%7D%2C%0Aelement%3A%20function%20(element%2C%20scope%2C%20useAttr%2C%20shouldRemoveScope)%20%7B%0Aif%20(useAttr)%20%7B%0Aif%20(shouldRemoveScope)%20%7B%0Aelement.removeAttribute(SCOPE_NAME)%3B%0A%7D%20else%20%7B%0Aelement.setAttribute(SCOPE_NAME%2C%20scope)%3B%0A%7D%0A%7D%20else%20%7B%0Aif%20(scope)%20%7B%0Aif%20(element.classList)%20%7B%0Aif%20(shouldRemoveScope)%20%7B%0Aelement.classList.remove(SCOPE_NAME)%3B%0Aelement.classList.remove(scope)%3B%0A%7D%20else%20%7B%0Aelement.classList.add(SCOPE_NAME)%3B%0Aelement.classList.add(scope)%3B%0A%7D%0A%7D%20else%20if%20(element.getAttribute)%20%7B%0Avar%20c%20%3D%20element.getAttribute(CLASS)%3B%0Aif%20(shouldRemoveScope)%20%7B%0Aif%20(c)%20%7B%0Aelement.setAttribute(CLASS%2C%20c.replace(SCOPE_NAME%2C%20'').replace(scope%2C%20''))%3B%0A%7D%0A%7D%20else%20%7B%0Aelement.setAttribute(CLASS%2C%20(c%20%3F%20c%20%2B%20'%20'%20%3A%20'')%20%2B%20SCOPE_NAME%20%2B%20'%20'%20%2B%20scope)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%2C%0AelementStyles%3A%20function%20(element%2C%20callback)%20%7B%0Avar%20styles%20%3D%20element._styles%3B%0Avar%20cssText%20%3D%20''%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20styles.length%2C%20s%3B%20i%20%3C%20l%20%26%26%20(s%20%3D%20styles%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20rules%20%3D%20styleUtil.rulesForStyle(s)%3B%0AcssText%20%2B%3D%20nativeShadow%20%3F%20styleUtil.toCssText(rules%2C%20callback)%20%3A%20this.css(rules%2C%20element.is%2C%20element.extends%2C%20callback%2C%20element._scopeCssViaAttr)%20%2B%20'%5Cn%5Cn'%3B%0A%7D%0Areturn%20cssText.trim()%3B%0A%7D%2C%0Acss%3A%20function%20(rules%2C%20scope%2C%20ext%2C%20callback%2C%20useAttr)%20%7B%0Avar%20hostScope%20%3D%20this._calcHostScope(scope%2C%20ext)%3B%0Ascope%20%3D%20this._calcElementScope(scope%2C%20useAttr)%3B%0Avar%20self%20%3D%20this%3B%0Areturn%20styleUtil.toCssText(rules%2C%20function%20(rule)%20%7B%0Aif%20(!rule.isScoped)%20%7B%0Aself.rule(rule%2C%20scope%2C%20hostScope)%3B%0Arule.isScoped%20%3D%20true%3B%0A%7D%0Aif%20(callback)%20%7B%0Acallback(rule%2C%20scope%2C%20hostScope)%3B%0A%7D%0A%7D)%3B%0A%7D%2C%0A_calcElementScope%3A%20function%20(scope%2C%20useAttr)%20%7B%0Aif%20(scope)%20%7B%0Areturn%20useAttr%20%3F%20CSS_ATTR_PREFIX%20%2B%20scope%20%2B%20CSS_ATTR_SUFFIX%20%3A%20CSS_CLASS_PREFIX%20%2B%20scope%3B%0A%7D%20else%20%7B%0Areturn%20''%3B%0A%7D%0A%7D%2C%0A_calcHostScope%3A%20function%20(scope%2C%20ext)%20%7B%0Areturn%20ext%20%3F%20'%5Bis%3D'%20%2B%20scope%20%2B%20'%5D'%20%3A%20scope%3B%0A%7D%2C%0Arule%3A%20function%20(rule%2C%20scope%2C%20hostScope)%20%7B%0Athis._transformRule(rule%2C%20this._transformComplexSelector%2C%20scope%2C%20hostScope)%3B%0A%7D%2C%0A_transformRule%3A%20function%20(rule%2C%20transformer%2C%20scope%2C%20hostScope)%20%7B%0Avar%20p%24%20%3D%20rule.selector.split(COMPLEX_SELECTOR_SEP)%3B%0Aif%20(!styleUtil.isKeyframesSelector(rule))%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20p%24.length%2C%20p%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20p%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ap%24%5Bi%5D%20%3D%20transformer.call(this%2C%20p%2C%20scope%2C%20hostScope)%3B%0A%7D%0A%7D%0Arule.selector%20%3D%20rule.transformedSelector%20%3D%20p%24.join(COMPLEX_SELECTOR_SEP)%3B%0A%7D%2C%0A_transformComplexSelector%3A%20function%20(selector%2C%20scope%2C%20hostScope)%20%7B%0Avar%20stop%20%3D%20false%3B%0Avar%20hostContext%20%3D%20false%3B%0Avar%20self%20%3D%20this%3B%0Aselector%20%3D%20selector.replace(CONTENT_START%2C%20HOST%20%2B%20'%20%241')%3B%0Aselector%20%3D%20selector.replace(SIMPLE_SELECTOR_SEP%2C%20function%20(m%2C%20c%2C%20s)%20%7B%0Aif%20(!stop)%20%7B%0Avar%20info%20%3D%20self._transformCompoundSelector(s%2C%20c%2C%20scope%2C%20hostScope)%3B%0Astop%20%3D%20stop%20%7C%7C%20info.stop%3B%0AhostContext%20%3D%20hostContext%20%7C%7C%20info.hostContext%3B%0Ac%20%3D%20info.combinator%3B%0As%20%3D%20info.value%3B%0A%7D%20else%20%7B%0As%20%3D%20s.replace(SCOPE_JUMP%2C%20'%20')%3B%0A%7D%0Areturn%20c%20%2B%20s%3B%0A%7D)%3B%0Aif%20(hostContext)%20%7B%0Aselector%20%3D%20selector.replace(HOST_CONTEXT_PAREN%2C%20function%20(m%2C%20pre%2C%20paren%2C%20post)%20%7B%0Areturn%20pre%20%2B%20paren%20%2B%20'%20'%20%2B%20hostScope%20%2B%20post%20%2B%20COMPLEX_SELECTOR_SEP%20%2B%20'%20'%20%2B%20pre%20%2B%20hostScope%20%2B%20paren%20%2B%20post%3B%0A%7D)%3B%0A%7D%0Areturn%20selector%3B%0A%7D%2C%0A_transformCompoundSelector%3A%20function%20(selector%2C%20combinator%2C%20scope%2C%20hostScope)%20%7B%0Avar%20jumpIndex%20%3D%20selector.search(SCOPE_JUMP)%3B%0Avar%20hostContext%20%3D%20false%3B%0Aif%20(selector.indexOf(HOST_CONTEXT)%20%3E%3D%200)%20%7B%0AhostContext%20%3D%20true%3B%0A%7D%20else%20if%20(selector.indexOf(HOST)%20%3E%3D%200)%20%7B%0Aselector%20%3D%20selector.replace(HOST_PAREN%2C%20function%20(m%2C%20host%2C%20paren)%20%7B%0Areturn%20hostScope%20%2B%20paren%3B%0A%7D)%3B%0Aselector%20%3D%20selector.replace(HOST%2C%20hostScope)%3B%0A%7D%20else%20if%20(jumpIndex%20!%3D%3D%200)%20%7B%0Aselector%20%3D%20scope%20%3F%20this._transformSimpleSelector(selector%2C%20scope)%20%3A%20selector%3B%0A%7D%0Aif%20(selector.indexOf(CONTENT)%20%3E%3D%200)%20%7B%0Acombinator%20%3D%20''%3B%0A%7D%0Avar%20stop%3B%0Aif%20(jumpIndex%20%3E%3D%200)%20%7B%0Aselector%20%3D%20selector.replace(SCOPE_JUMP%2C%20'%20')%3B%0Astop%20%3D%20true%3B%0A%7D%0Areturn%20%7B%0Avalue%3A%20selector%2C%0Acombinator%3A%20combinator%2C%0Astop%3A%20stop%2C%0AhostContext%3A%20hostContext%0A%7D%3B%0A%7D%2C%0A_transformSimpleSelector%3A%20function%20(selector%2C%20scope)%20%7B%0Avar%20p%24%20%3D%20selector.split(PSEUDO_PREFIX)%3B%0Ap%24%5B0%5D%20%2B%3D%20scope%3B%0Areturn%20p%24.join(PSEUDO_PREFIX)%3B%0A%7D%2C%0AdocumentRule%3A%20function%20(rule)%20%7B%0Arule.selector%20%3D%20rule.parsedSelector%3B%0Athis.normalizeRootSelector(rule)%3B%0Aif%20(!nativeShadow)%20%7B%0Athis._transformRule(rule%2C%20this._transformDocumentSelector)%3B%0A%7D%0A%7D%2C%0AnormalizeRootSelector%3A%20function%20(rule)%20%7B%0Aif%20(rule.selector%20%3D%3D%3D%20ROOT)%20%7B%0Arule.selector%20%3D%20'body'%3B%0A%7D%0A%7D%2C%0A_transformDocumentSelector%3A%20function%20(selector)%20%7B%0Areturn%20selector.match(SCOPE_JUMP)%20%3F%20this._transformComplexSelector(selector%2C%20SCOPE_DOC_SELECTOR)%20%3A%20this._transformSimpleSelector(selector.trim()%2C%20SCOPE_DOC_SELECTOR)%3B%0A%7D%2C%0ASCOPE_NAME%3A%20'style-scope'%0A%7D%3B%0Avar%20SCOPE_NAME%20%3D%20api.SCOPE_NAME%3B%0Avar%20SCOPE_DOC_SELECTOR%20%3D%20'%3Anot(%5B'%20%2B%20SCOPE_NAME%20%2B%20'%5D)'%20%2B%20'%3Anot(.'%20%2B%20SCOPE_NAME%20%2B%20')'%3B%0Avar%20COMPLEX_SELECTOR_SEP%20%3D%20'%2C'%3B%0Avar%20SIMPLE_SELECTOR_SEP%20%3D%20%2F(%5E%7C%5B%5Cs%3E%2B~%5D%2B)((%3F%3A%5C%5B.%2B%3F%5C%5D%7C%5B%5E%5Cs%3E%2B~%3D%5C%5B%5D)%2B)%2Fg%3B%0Avar%20HOST%20%3D%20'%3Ahost'%3B%0Avar%20ROOT%20%3D%20'%3Aroot'%3B%0Avar%20HOST_PAREN%20%3D%20%2F(%3Ahost)(%3F%3A%5C(((%3F%3A%5C(%5B%5E)(%5D*%5C)%7C%5B%5E)(%5D*)%2B%3F)%5C))%2Fg%3B%0Avar%20HOST_CONTEXT%20%3D%20'%3Ahost-context'%3B%0Avar%20HOST_CONTEXT_PAREN%20%3D%20%2F(.*)(%3F%3A%3Ahost-context)(%3F%3A%5C(((%3F%3A%5C(%5B%5E)(%5D*%5C)%7C%5B%5E)(%5D*)%2B%3F)%5C))(.*)%2F%3B%0Avar%20CONTENT%20%3D%20'%3A%3Acontent'%3B%0Avar%20SCOPE_JUMP%20%3D%20%2F%3A%3Acontent%7C%3A%3Ashadow%7C%5C%2Fdeep%5C%2F%2F%3B%0Avar%20CSS_CLASS_PREFIX%20%3D%20'.'%3B%0Avar%20CSS_ATTR_PREFIX%20%3D%20'%5B'%20%2B%20SCOPE_NAME%20%2B%20'~%3D'%3B%0Avar%20CSS_ATTR_SUFFIX%20%3D%20'%5D'%3B%0Avar%20PSEUDO_PREFIX%20%3D%20'%3A'%3B%0Avar%20CLASS%20%3D%20'class'%3B%0Avar%20CONTENT_START%20%3D%20new%20RegExp('%5E('%20%2B%20CONTENT%20%2B%20')')%3B%0Areturn%20api%3B%0A%7D()%3B%0APolymer.StyleExtends%20%3D%20function%20()%20%7B%0Avar%20styleUtil%20%3D%20Polymer.StyleUtil%3B%0Areturn%20%7B%0AhasExtends%3A%20function%20(cssText)%20%7B%0Areturn%20Boolean(cssText.match(this.rx.EXTEND))%3B%0A%7D%2C%0Atransform%3A%20function%20(style)%20%7B%0Avar%20rules%20%3D%20styleUtil.rulesForStyle(style)%3B%0Avar%20self%20%3D%20this%3B%0AstyleUtil.forEachRule(rules%2C%20function%20(rule)%20%7B%0Aself._mapRuleOntoParent(rule)%3B%0Aif%20(rule.parent)%20%7B%0Avar%20m%3B%0Awhile%20(m%20%3D%20self.rx.EXTEND.exec(rule.cssText))%20%7B%0Avar%20extend%20%3D%20m%5B1%5D%3B%0Avar%20extendor%20%3D%20self._findExtendor(extend%2C%20rule)%3B%0Aif%20(extendor)%20%7B%0Aself._extendRule(rule%2C%20extendor)%3B%0A%7D%0A%7D%0A%7D%0Arule.cssText%20%3D%20rule.cssText.replace(self.rx.EXTEND%2C%20'')%3B%0A%7D)%3B%0Areturn%20styleUtil.toCssText(rules%2C%20function%20(rule)%20%7B%0Aif%20(rule.selector.match(self.rx.STRIP))%20%7B%0Arule.cssText%20%3D%20''%3B%0A%7D%0A%7D%2C%20true)%3B%0A%7D%2C%0A_mapRuleOntoParent%3A%20function%20(rule)%20%7B%0Aif%20(rule.parent)%20%7B%0Avar%20map%20%3D%20rule.parent.map%20%7C%7C%20(rule.parent.map%20%3D%20%7B%7D)%3B%0Avar%20parts%20%3D%20rule.selector.split('%2C')%3B%0Afor%20(var%20i%20%3D%200%2C%20p%3B%20i%20%3C%20parts.length%3B%20i%2B%2B)%20%7B%0Ap%20%3D%20parts%5Bi%5D%3B%0Amap%5Bp.trim()%5D%20%3D%20rule%3B%0A%7D%0Areturn%20map%3B%0A%7D%0A%7D%2C%0A_findExtendor%3A%20function%20(extend%2C%20rule)%20%7B%0Areturn%20rule.parent%20%26%26%20rule.parent.map%20%26%26%20rule.parent.map%5Bextend%5D%20%7C%7C%20this._findExtendor(extend%2C%20rule.parent)%3B%0A%7D%2C%0A_extendRule%3A%20function%20(target%2C%20source)%20%7B%0Aif%20(target.parent%20!%3D%3D%20source.parent)%20%7B%0Athis._cloneAndAddRuleToParent(source%2C%20target.parent)%3B%0A%7D%0Atarget.extends%20%3D%20target.extends%20%7C%7C%20%5B%5D%3B%0Atarget.extends.push(source)%3B%0Asource.selector%20%3D%20source.selector.replace(this.rx.STRIP%2C%20'')%3B%0Asource.selector%20%3D%20(source.selector%20%26%26%20source.selector%20%2B%20'%2C%5Cn')%20%2B%20target.selector%3B%0Aif%20(source.extends)%20%7B%0Asource.extends.forEach(function%20(e)%20%7B%0Athis._extendRule(target%2C%20e)%3B%0A%7D%2C%20this)%3B%0A%7D%0A%7D%2C%0A_cloneAndAddRuleToParent%3A%20function%20(rule%2C%20parent)%20%7B%0Arule%20%3D%20Object.create(rule)%3B%0Arule.parent%20%3D%20parent%3B%0Aif%20(rule.extends)%20%7B%0Arule.extends%20%3D%20rule.extends.slice()%3B%0A%7D%0Aparent.rules.push(rule)%3B%0A%7D%2C%0Arx%3A%20%7B%0AEXTEND%3A%20%2F%40extends%5C((%5B%5E)%5D*)%5C)%5Cs*%3F%3B%2Fgim%2C%0ASTRIP%3A%20%2F%25%5B%5E%2C%5D*%24%2F%0A%7D%0A%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%0Avar%20prepElement%20%3D%20Polymer.Base._prepElement%3B%0Avar%20nativeShadow%20%3D%20Polymer.Settings.useNativeShadow%3B%0Avar%20styleUtil%20%3D%20Polymer.StyleUtil%3B%0Avar%20styleTransformer%20%3D%20Polymer.StyleTransformer%3B%0Avar%20styleExtends%20%3D%20Polymer.StyleExtends%3B%0APolymer.Base._addFeature(%7B%0A_prepElement%3A%20function%20(element)%20%7B%0Aif%20(this._encapsulateStyle)%20%7B%0AstyleTransformer.element(element%2C%20this.is%2C%20this._scopeCssViaAttr)%3B%0A%7D%0AprepElement.call(this%2C%20element)%3B%0A%7D%2C%0A_prepStyles%3A%20function%20()%20%7B%0Aif%20(this._encapsulateStyle%20%3D%3D%3D%20undefined)%20%7B%0Athis._encapsulateStyle%20%3D%20!nativeShadow%20%26%26%20Boolean(this._template)%3B%0A%7D%0Aif%20(this._template)%20%7B%0Athis._styles%20%3D%20this._collectStyles()%3B%0Avar%20cssText%20%3D%20styleTransformer.elementStyles(this)%3B%0Athis._prepStyleProperties()%3B%0Avar%20needsStatic%20%3D%20this._styles.length%20%26%26%20!this._needsStyleProperties()%3B%0Aif%20(needsStatic%20%7C%7C%20!nativeShadow)%20%7B%0AcssText%20%3D%20needsStatic%20%3F%20cssText%20%3A%20'%20'%3B%0Avar%20style%20%3D%20styleUtil.applyCss(cssText%2C%20this.is%2C%20nativeShadow%20%3F%20this._template.content%20%3A%20null)%3B%0Aif%20(!nativeShadow)%20%7B%0Athis._scopeStyle%20%3D%20style%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Athis._styles%20%3D%20%5B%5D%3B%0A%7D%0A%7D%2C%0A_collectStyles%3A%20function%20()%20%7B%0Avar%20styles%20%3D%20%5B%5D%3B%0Avar%20cssText%20%3D%20''%2C%20m%24%20%3D%20this.styleModules%3B%0Aif%20(m%24)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20m%24.length%2C%20m%3B%20i%20%3C%20l%20%26%26%20(m%20%3D%20m%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0AcssText%20%2B%3D%20styleUtil.cssFromModule(m)%3B%0A%7D%0A%7D%0AcssText%20%2B%3D%20styleUtil.cssFromModule(this.is)%3B%0Avar%20p%20%3D%20this._template%20%26%26%20this._template.parentNode%3B%0Aif%20(this._template%20%26%26%20(!p%20%7C%7C%20p.id.toLowerCase()%20!%3D%3D%20this.is))%20%7B%0AcssText%20%2B%3D%20styleUtil.cssFromElement(this._template)%3B%0A%7D%0Aif%20(cssText)%20%7B%0Avar%20style%20%3D%20document.createElement('style')%3B%0Astyle.textContent%20%3D%20cssText%3B%0Aif%20(styleExtends.hasExtends(style.textContent))%20%7B%0AcssText%20%3D%20styleExtends.transform(style)%3B%0A%7D%0Astyles.push(style)%3B%0A%7D%0Areturn%20styles%3B%0A%7D%2C%0A_elementAdd%3A%20function%20(node)%20%7B%0Aif%20(this._encapsulateStyle)%20%7B%0Aif%20(node.__styleScoped)%20%7B%0Anode.__styleScoped%20%3D%20false%3B%0A%7D%20else%20%7B%0AstyleTransformer.dom(node%2C%20this.is%2C%20this._scopeCssViaAttr)%3B%0A%7D%0A%7D%0A%7D%2C%0A_elementRemove%3A%20function%20(node)%20%7B%0Aif%20(this._encapsulateStyle)%20%7B%0AstyleTransformer.dom(node%2C%20this.is%2C%20this._scopeCssViaAttr%2C%20true)%3B%0A%7D%0A%7D%2C%0AscopeSubtree%3A%20function%20(container%2C%20shouldObserve)%20%7B%0Aif%20(nativeShadow)%20%7B%0Areturn%3B%0A%7D%0Avar%20self%20%3D%20this%3B%0Avar%20scopify%20%3D%20function%20(node)%20%7B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE)%20%7B%0Avar%20className%20%3D%20node.getAttribute('class')%3B%0Anode.setAttribute('class'%2C%20self._scopeElementClass(node%2C%20className))%3B%0Avar%20n%24%20%3D%20node.querySelectorAll('*')%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0AclassName%20%3D%20n.getAttribute('class')%3B%0An.setAttribute('class'%2C%20self._scopeElementClass(n%2C%20className))%3B%0A%7D%0A%7D%0A%7D%3B%0Ascopify(container)%3B%0Aif%20(shouldObserve)%20%7B%0Avar%20mo%20%3D%20new%20MutationObserver(function%20(mxns)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20m%3B%20i%20%3C%20mxns.length%20%26%26%20(m%20%3D%20mxns%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(m.addedNodes)%20%7B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20m.addedNodes.length%3B%20j%2B%2B)%20%7B%0Ascopify(m.addedNodes%5Bj%5D)%3B%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0Amo.observe(container%2C%20%7B%0AchildList%3A%20true%2C%0Asubtree%3A%20true%0A%7D)%3B%0Areturn%20mo%3B%0A%7D%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.StyleProperties%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20nativeShadow%20%3D%20Polymer.Settings.useNativeShadow%3B%0Avar%20matchesSelector%20%3D%20Polymer.DomApi.matchesSelector%3B%0Avar%20styleUtil%20%3D%20Polymer.StyleUtil%3B%0Avar%20styleTransformer%20%3D%20Polymer.StyleTransformer%3B%0Areturn%20%7B%0AdecorateStyles%3A%20function%20(styles)%20%7B%0Avar%20self%20%3D%20this%2C%20props%20%3D%20%7B%7D%2C%20keyframes%20%3D%20%5B%5D%3B%0AstyleUtil.forRulesInStyles(styles%2C%20function%20(rule)%20%7B%0Aself.decorateRule(rule)%3B%0Aself.collectPropertiesInCssText(rule.propertyInfo.cssText%2C%20props)%3B%0A%7D%2C%20function%20onKeyframesRule(rule)%20%7B%0Akeyframes.push(rule)%3B%0A%7D)%3B%0Astyles._keyframes%20%3D%20keyframes%3B%0Avar%20names%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20in%20props)%20%7B%0Anames.push(i)%3B%0A%7D%0Areturn%20names%3B%0A%7D%2C%0AdecorateRule%3A%20function%20(rule)%20%7B%0Aif%20(rule.propertyInfo)%20%7B%0Areturn%20rule.propertyInfo%3B%0A%7D%0Avar%20info%20%3D%20%7B%7D%2C%20properties%20%3D%20%7B%7D%3B%0Avar%20hasProperties%20%3D%20this.collectProperties(rule%2C%20properties)%3B%0Aif%20(hasProperties)%20%7B%0Ainfo.properties%20%3D%20properties%3B%0Arule.rules%20%3D%20null%3B%0A%7D%0Ainfo.cssText%20%3D%20this.collectCssText(rule)%3B%0Arule.propertyInfo%20%3D%20info%3B%0Areturn%20info%3B%0A%7D%2C%0AcollectProperties%3A%20function%20(rule%2C%20properties)%20%7B%0Avar%20info%20%3D%20rule.propertyInfo%3B%0Aif%20(info)%20%7B%0Aif%20(info.properties)%20%7B%0APolymer.Base.mixin(properties%2C%20info.properties)%3B%0Areturn%20true%3B%0A%7D%0A%7D%20else%20%7B%0Avar%20m%2C%20rx%20%3D%20this.rx.VAR_ASSIGN%3B%0Avar%20cssText%20%3D%20rule.parsedCssText%3B%0Avar%20any%3B%0Awhile%20(m%20%3D%20rx.exec(cssText))%20%7B%0Aproperties%5Bm%5B1%5D%5D%20%3D%20(m%5B2%5D%20%7C%7C%20m%5B3%5D).trim()%3B%0Aany%20%3D%20true%3B%0A%7D%0Areturn%20any%3B%0A%7D%0A%7D%2C%0AcollectCssText%3A%20function%20(rule)%20%7B%0Areturn%20this.collectConsumingCssText(rule.parsedCssText)%3B%0A%7D%2C%0AcollectConsumingCssText%3A%20function%20(cssText)%20%7B%0Areturn%20cssText.replace(this.rx.BRACKETED%2C%20'').replace(this.rx.VAR_ASSIGN%2C%20'')%3B%0A%7D%2C%0AcollectPropertiesInCssText%3A%20function%20(cssText%2C%20props)%20%7B%0Avar%20m%3B%0Awhile%20(m%20%3D%20this.rx.VAR_CAPTURE.exec(cssText))%20%7B%0Aprops%5Bm%5B1%5D%5D%20%3D%20true%3B%0Avar%20def%20%3D%20m%5B2%5D%3B%0Aif%20(def%20%26%26%20def.match(this.rx.IS_VAR))%20%7B%0Aprops%5Bdef%5D%20%3D%20true%3B%0A%7D%0A%7D%0A%7D%2C%0Areify%3A%20function%20(props)%20%7B%0Avar%20names%20%3D%20Object.getOwnPropertyNames(props)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20names.length%3B%20i%2B%2B)%20%7B%0An%20%3D%20names%5Bi%5D%3B%0Aprops%5Bn%5D%20%3D%20this.valueForProperty(props%5Bn%5D%2C%20props)%3B%0A%7D%0A%7D%2C%0AvalueForProperty%3A%20function%20(property%2C%20props)%20%7B%0Aif%20(property)%20%7B%0Aif%20(property.indexOf('%3B')%20%3E%3D%200)%20%7B%0Aproperty%20%3D%20this.valueForProperties(property%2C%20props)%3B%0A%7D%20else%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20fn%20%3D%20function%20(all%2C%20prefix%2C%20value%2C%20fallback)%20%7B%0Avar%20propertyValue%20%3D%20self.valueForProperty(props%5Bvalue%5D%2C%20props)%20%7C%7C%20(props%5Bfallback%5D%20%3F%20self.valueForProperty(props%5Bfallback%5D%2C%20props)%20%3A%20fallback)%3B%0Areturn%20prefix%20%2B%20(propertyValue%20%7C%7C%20'')%3B%0A%7D%3B%0Aproperty%20%3D%20property.replace(this.rx.VAR_MATCH%2C%20fn)%3B%0A%7D%0A%7D%0Areturn%20property%20%26%26%20property.trim()%20%7C%7C%20''%3B%0A%7D%2C%0AvalueForProperties%3A%20function%20(property%2C%20props)%20%7B%0Avar%20parts%20%3D%20property.split('%3B')%3B%0Afor%20(var%20i%20%3D%200%2C%20p%2C%20m%3B%20i%20%3C%20parts.length%3B%20i%2B%2B)%20%7B%0Aif%20(p%20%3D%20parts%5Bi%5D)%20%7B%0Am%20%3D%20p.match(this.rx.MIXIN_MATCH)%3B%0Aif%20(m)%20%7B%0Ap%20%3D%20this.valueForProperty(props%5Bm%5B1%5D%5D%2C%20props)%3B%0A%7D%20else%20%7B%0Avar%20colon%20%3D%20p.indexOf('%3A')%3B%0Aif%20(colon%20!%3D%3D%20-1)%20%7B%0Avar%20pp%20%3D%20p.substring(colon)%3B%0App%20%3D%20pp.trim()%3B%0App%20%3D%20this.valueForProperty(pp%2C%20props)%20%7C%7C%20pp%3B%0Ap%20%3D%20p.substring(0%2C%20colon)%20%2B%20pp%3B%0A%7D%0A%7D%0Aparts%5Bi%5D%20%3D%20p%20%26%26%20p.lastIndexOf('%3B')%20%3D%3D%3D%20p.length%20-%201%20%3F%20p.slice(0%2C%20-1)%20%3A%20p%20%7C%7C%20''%3B%0A%7D%0A%7D%0Areturn%20parts.join('%3B')%3B%0A%7D%2C%0AapplyProperties%3A%20function%20(rule%2C%20props)%20%7B%0Avar%20output%20%3D%20''%3B%0Aif%20(!rule.propertyInfo)%20%7B%0Athis.decorateRule(rule)%3B%0A%7D%0Aif%20(rule.propertyInfo.cssText)%20%7B%0Aoutput%20%3D%20this.valueForProperties(rule.propertyInfo.cssText%2C%20props)%3B%0A%7D%0Arule.cssText%20%3D%20output%3B%0A%7D%2C%0AapplyKeyframeTransforms%3A%20function%20(rule%2C%20keyframeTransforms)%20%7B%0Avar%20input%20%3D%20rule.cssText%3B%0Avar%20output%20%3D%20rule.cssText%3B%0Aif%20(rule.hasAnimations%20%3D%3D%20null)%20%7B%0Arule.hasAnimations%20%3D%20this.rx.ANIMATION_MATCH.test(input)%3B%0A%7D%0Aif%20(rule.hasAnimations)%20%7B%0Avar%20transform%3B%0Aif%20(rule.keyframeNamesToTransform%20%3D%3D%20null)%20%7B%0Arule.keyframeNamesToTransform%20%3D%20%5B%5D%3B%0Afor%20(var%20keyframe%20in%20keyframeTransforms)%20%7B%0Atransform%20%3D%20keyframeTransforms%5Bkeyframe%5D%3B%0Aoutput%20%3D%20transform(input)%3B%0Aif%20(input%20!%3D%3D%20output)%20%7B%0Ainput%20%3D%20output%3B%0Arule.keyframeNamesToTransform.push(keyframe)%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20rule.keyframeNamesToTransform.length%3B%20%2B%2Bi)%20%7B%0Atransform%20%3D%20keyframeTransforms%5Brule.keyframeNamesToTransform%5Bi%5D%5D%3B%0Ainput%20%3D%20transform(input)%3B%0A%7D%0Aoutput%20%3D%20input%3B%0A%7D%0A%7D%0Arule.cssText%20%3D%20output%3B%0A%7D%2C%0ApropertyDataFromStyles%3A%20function%20(styles%2C%20element)%20%7B%0Avar%20props%20%3D%20%7B%7D%2C%20self%20%3D%20this%3B%0Avar%20o%20%3D%20%5B%5D%2C%20i%20%3D%200%3B%0AstyleUtil.forRulesInStyles(styles%2C%20function%20(rule)%20%7B%0Aif%20(!rule.propertyInfo)%20%7B%0Aself.decorateRule(rule)%3B%0A%7D%0Aif%20(element%20%26%26%20rule.propertyInfo.properties%20%26%26%20matchesSelector.call(element%2C%20rule.transformedSelector%20%7C%7C%20rule.parsedSelector))%20%7B%0Aself.collectProperties(rule%2C%20props)%3B%0AaddToBitMask(i%2C%20o)%3B%0A%7D%0Ai%2B%2B%3B%0A%7D)%3B%0Areturn%20%7B%0Aproperties%3A%20props%2C%0Akey%3A%20o%0A%7D%3B%0A%7D%2C%0AscopePropertiesFromStyles%3A%20function%20(styles)%20%7B%0Aif%20(!styles._scopeStyleProperties)%20%7B%0Astyles._scopeStyleProperties%20%3D%20this.selectedPropertiesFromStyles(styles%2C%20this.SCOPE_SELECTORS)%3B%0A%7D%0Areturn%20styles._scopeStyleProperties%3B%0A%7D%2C%0AhostPropertiesFromStyles%3A%20function%20(styles)%20%7B%0Aif%20(!styles._hostStyleProperties)%20%7B%0Astyles._hostStyleProperties%20%3D%20this.selectedPropertiesFromStyles(styles%2C%20this.HOST_SELECTORS)%3B%0A%7D%0Areturn%20styles._hostStyleProperties%3B%0A%7D%2C%0AselectedPropertiesFromStyles%3A%20function%20(styles%2C%20selectors)%20%7B%0Avar%20props%20%3D%20%7B%7D%2C%20self%20%3D%20this%3B%0AstyleUtil.forRulesInStyles(styles%2C%20function%20(rule)%20%7B%0Aif%20(!rule.propertyInfo)%20%7B%0Aself.decorateRule(rule)%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20selectors.length%3B%20i%2B%2B)%20%7B%0Aif%20(rule.parsedSelector%20%3D%3D%3D%20selectors%5Bi%5D)%20%7B%0Aself.collectProperties(rule%2C%20props)%3B%0Areturn%3B%0A%7D%0A%7D%0A%7D)%3B%0Areturn%20props%3B%0A%7D%2C%0AtransformStyles%3A%20function%20(element%2C%20properties%2C%20scopeSelector)%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20hostSelector%20%3D%20styleTransformer._calcHostScope(element.is%2C%20element.extends)%3B%0Avar%20rxHostSelector%20%3D%20element.extends%20%3F%20'%5C%5C'%20%2B%20hostSelector.slice(0%2C%20-1)%20%2B%20'%5C%5C%5D'%20%3A%20hostSelector%3B%0Avar%20hostRx%20%3D%20new%20RegExp(this.rx.HOST_PREFIX%20%2B%20rxHostSelector%20%2B%20this.rx.HOST_SUFFIX)%3B%0Avar%20keyframeTransforms%20%3D%20this._elementKeyframeTransforms(element%2C%20scopeSelector)%3B%0Areturn%20styleTransformer.elementStyles(element%2C%20function%20(rule)%20%7B%0Aself.applyProperties(rule%2C%20properties)%3B%0Aif%20(!nativeShadow%20%26%26%20!Polymer.StyleUtil.isKeyframesSelector(rule)%20%26%26%20rule.cssText)%20%7B%0Aself.applyKeyframeTransforms(rule%2C%20keyframeTransforms)%3B%0Aself._scopeSelector(rule%2C%20hostRx%2C%20hostSelector%2C%20element._scopeCssViaAttr%2C%20scopeSelector)%3B%0A%7D%0A%7D)%3B%0A%7D%2C%0A_elementKeyframeTransforms%3A%20function%20(element%2C%20scopeSelector)%20%7B%0Avar%20keyframesRules%20%3D%20element._styles._keyframes%3B%0Avar%20keyframeTransforms%20%3D%20%7B%7D%3B%0Aif%20(!nativeShadow%20%26%26%20keyframesRules)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20keyframesRule%20%3D%20keyframesRules%5Bi%5D%3B%20i%20%3C%20keyframesRules.length%3B%20keyframesRule%20%3D%20keyframesRules%5B%2B%2Bi%5D)%20%7B%0Athis._scopeKeyframes(keyframesRule%2C%20scopeSelector)%3B%0AkeyframeTransforms%5BkeyframesRule.keyframesName%5D%20%3D%20this._keyframesRuleTransformer(keyframesRule)%3B%0A%7D%0A%7D%0Areturn%20keyframeTransforms%3B%0A%7D%2C%0A_keyframesRuleTransformer%3A%20function%20(keyframesRule)%20%7B%0Areturn%20function%20(cssText)%20%7B%0Areturn%20cssText.replace(keyframesRule.keyframesNameRx%2C%20keyframesRule.transformedKeyframesName)%3B%0A%7D%3B%0A%7D%2C%0A_scopeKeyframes%3A%20function%20(rule%2C%20scopeId)%20%7B%0Arule.keyframesNameRx%20%3D%20new%20RegExp(rule.keyframesName%2C%20'g')%3B%0Arule.transformedKeyframesName%20%3D%20rule.keyframesName%20%2B%20'-'%20%2B%20scopeId%3B%0Arule.transformedSelector%20%3D%20rule.transformedSelector%20%7C%7C%20rule.selector%3B%0Arule.selector%20%3D%20rule.transformedSelector.replace(rule.keyframesName%2C%20rule.transformedKeyframesName)%3B%0A%7D%2C%0A_scopeSelector%3A%20function%20(rule%2C%20hostRx%2C%20hostSelector%2C%20viaAttr%2C%20scopeId)%20%7B%0Arule.transformedSelector%20%3D%20rule.transformedSelector%20%7C%7C%20rule.selector%3B%0Avar%20selector%20%3D%20rule.transformedSelector%3B%0Avar%20scope%20%3D%20viaAttr%20%3F%20'%5B'%20%2B%20styleTransformer.SCOPE_NAME%20%2B%20'~%3D'%20%2B%20scopeId%20%2B%20'%5D'%20%3A%20'.'%20%2B%20scopeId%3B%0Avar%20parts%20%3D%20selector.split('%2C')%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20parts.length%2C%20p%3B%20i%20%3C%20l%20%26%26%20(p%20%3D%20parts%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparts%5Bi%5D%20%3D%20p.match(hostRx)%20%3F%20p.replace(hostSelector%2C%20scope)%20%3A%20scope%20%2B%20'%20'%20%2B%20p%3B%0A%7D%0Arule.selector%20%3D%20parts.join('%2C')%3B%0A%7D%2C%0AapplyElementScopeSelector%3A%20function%20(element%2C%20selector%2C%20old%2C%20viaAttr)%20%7B%0Avar%20c%20%3D%20viaAttr%20%3F%20element.getAttribute(styleTransformer.SCOPE_NAME)%20%3A%20element.getAttribute('class')%20%7C%7C%20''%3B%0Avar%20v%20%3D%20old%20%3F%20c.replace(old%2C%20selector)%20%3A%20(c%20%3F%20c%20%2B%20'%20'%20%3A%20'')%20%2B%20this.XSCOPE_NAME%20%2B%20'%20'%20%2B%20selector%3B%0Aif%20(c%20!%3D%3D%20v)%20%7B%0Aif%20(viaAttr)%20%7B%0Aelement.setAttribute(styleTransformer.SCOPE_NAME%2C%20v)%3B%0A%7D%20else%20%7B%0Aelement.setAttribute('class'%2C%20v)%3B%0A%7D%0A%7D%0A%7D%2C%0AapplyElementStyle%3A%20function%20(element%2C%20properties%2C%20selector%2C%20style)%20%7B%0Avar%20cssText%20%3D%20style%20%3F%20style.textContent%20%7C%7C%20''%20%3A%20this.transformStyles(element%2C%20properties%2C%20selector)%3B%0Avar%20s%20%3D%20element._customStyle%3B%0Aif%20(s%20%26%26%20!nativeShadow%20%26%26%20s%20!%3D%3D%20style)%20%7B%0As._useCount--%3B%0Aif%20(s._useCount%20%3C%3D%200%20%26%26%20s.parentNode)%20%7B%0As.parentNode.removeChild(s)%3B%0A%7D%0A%7D%0Aif%20(nativeShadow%20%7C%7C%20(!style%20%7C%7C%20!style.parentNode))%20%7B%0Aif%20(nativeShadow%20%26%26%20element._customStyle)%20%7B%0Aelement._customStyle.textContent%20%3D%20cssText%3B%0Astyle%20%3D%20element._customStyle%3B%0A%7D%20else%20if%20(cssText)%20%7B%0Astyle%20%3D%20styleUtil.applyCss(cssText%2C%20selector%2C%20nativeShadow%20%3F%20element.root%20%3A%20null%2C%20element._scopeStyle)%3B%0A%7D%0A%7D%0Aif%20(style)%20%7B%0Astyle._useCount%20%3D%20style._useCount%20%7C%7C%200%3B%0Aif%20(element._customStyle%20!%3D%20style)%20%7B%0Astyle._useCount%2B%2B%3B%0A%7D%0Aelement._customStyle%20%3D%20style%3B%0A%7D%0Areturn%20style%3B%0A%7D%2C%0AmixinCustomStyle%3A%20function%20(props%2C%20customStyle)%20%7B%0Avar%20v%3B%0Afor%20(var%20i%20in%20customStyle)%20%7B%0Av%20%3D%20customStyle%5Bi%5D%3B%0Aif%20(v%20%7C%7C%20v%20%3D%3D%3D%200)%20%7B%0Aprops%5Bi%5D%20%3D%20v%3B%0A%7D%0A%7D%0A%7D%2C%0Arx%3A%20%7B%0AVAR_ASSIGN%3A%20%2F(%3F%3A%5E%7C%5B%3B%5Cs%7B%5D%5Cs*)(--%5B%5Cw-%5D*%3F)%5Cs*%3A%5Cs*(%3F%3A(%5B%5E%3B%7B%5D*)%7C%7B(%5B%5E%7D%5D*)%7D)(%3F%3A(%3F%3D%5B%3B%5Cs%7D%5D)%7C%24)%2Fgi%2C%0AMIXIN_MATCH%3A%20%2F(%3F%3A%5E%7C%5CW%2B)%40apply%5B%5Cs%5D*%5C((%5B%5E)%5D*)%5C)%2Fi%2C%0AVAR_MATCH%3A%20%2F(%5E%7C%5CW%2B)var%5C(%5B%5Cs%5D*(%5B%5E%2C)%5D*)%5B%5Cs%5D*%2C%3F%5B%5Cs%5D*((%3F%3A%5B%5E%2C()%5D*)%7C(%3F%3A%5B%5E%3B()%5D*%5C(%5B%5E%3B)%5D*%5C)))%5B%5Cs%5D*%3F%5C)%2Fgi%2C%0AVAR_CAPTURE%3A%20%2F%5C(%5B%5Cs%5D*(--%5B%5E%2C%5Cs)%5D*)(%3F%3A%2C%5B%5Cs%5D*(--%5B%5E%2C%5Cs)%5D*))%3F(%3F%3A%5C)%7C%2C)%2Fgi%2C%0AANIMATION_MATCH%3A%20%2F(animation%5Cs*%3A)%7C(animation-name%5Cs*%3A)%2F%2C%0AIS_VAR%3A%20%2F%5E--%2F%2C%0ABRACKETED%3A%20%2F%5C%7B%5B%5E%7D%5D*%5C%7D%2Fg%2C%0AHOST_PREFIX%3A%20'(%3F%3A%5E%7C%5B%5E.%23%5B%3A%5D)'%2C%0AHOST_SUFFIX%3A%20'(%24%7C%5B.%3A%5B%5C%5Cs%3E%2B~%5D)'%0A%7D%2C%0AHOST_SELECTORS%3A%20%5B'%3Ahost'%5D%2C%0ASCOPE_SELECTORS%3A%20%5B'%3Aroot'%5D%2C%0AXSCOPE_NAME%3A%20'x-scope'%0A%7D%3B%0Afunction%20addToBitMask(n%2C%20bits)%20%7B%0Avar%20o%20%3D%20parseInt(n%20%2F%2032)%3B%0Avar%20v%20%3D%201%20%3C%3C%20n%20%25%2032%3B%0Abits%5Bo%5D%20%3D%20(bits%5Bo%5D%20%7C%7C%200)%20%7C%20v%3B%0A%7D%0A%7D()%3B%0A(function%20()%20%7B%0APolymer.StyleCache%20%3D%20function%20()%20%7B%0Athis.cache%20%3D%20%7B%7D%3B%0A%7D%3B%0APolymer.StyleCache.prototype%20%3D%20%7B%0AMAX%3A%20100%2C%0Astore%3A%20function%20(is%2C%20data%2C%20keyValues%2C%20keyStyles)%20%7B%0Adata.keyValues%20%3D%20keyValues%3B%0Adata.styles%20%3D%20keyStyles%3B%0Avar%20s%24%20%3D%20this.cache%5Bis%5D%20%3D%20this.cache%5Bis%5D%20%7C%7C%20%5B%5D%3B%0As%24.push(data)%3B%0Aif%20(s%24.length%20%3E%20this.MAX)%20%7B%0As%24.shift()%3B%0A%7D%0A%7D%2C%0Aretrieve%3A%20function%20(is%2C%20keyValues%2C%20keyStyles)%20%7B%0Avar%20cache%20%3D%20this.cache%5Bis%5D%3B%0Aif%20(cache)%20%7B%0Afor%20(var%20i%20%3D%20cache.length%20-%201%2C%20data%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Adata%20%3D%20cache%5Bi%5D%3B%0Aif%20(keyStyles%20%3D%3D%3D%20data.styles%20%26%26%20this._objectsEqual(keyValues%2C%20data.keyValues))%20%7B%0Areturn%20data%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0Aclear%3A%20function%20()%20%7B%0Athis.cache%20%3D%20%7B%7D%3B%0A%7D%2C%0A_objectsEqual%3A%20function%20(target%2C%20source)%20%7B%0Avar%20t%2C%20s%3B%0Afor%20(var%20i%20in%20target)%20%7B%0At%20%3D%20target%5Bi%5D%2C%20s%20%3D%20source%5Bi%5D%3B%0Aif%20(!(typeof%20t%20%3D%3D%3D%20'object'%20%26%26%20t%20%3F%20this._objectsStrictlyEqual(t%2C%20s)%20%3A%20t%20%3D%3D%3D%20s))%20%7B%0Areturn%20false%3B%0A%7D%0A%7D%0Aif%20(Array.isArray(target))%20%7B%0Areturn%20target.length%20%3D%3D%3D%20source.length%3B%0A%7D%0Areturn%20true%3B%0A%7D%2C%0A_objectsStrictlyEqual%3A%20function%20(target%2C%20source)%20%7B%0Areturn%20this._objectsEqual(target%2C%20source)%20%26%26%20this._objectsEqual(source%2C%20target)%3B%0A%7D%0A%7D%3B%0A%7D())%3B%0APolymer.StyleDefaults%20%3D%20function%20()%20%7B%0Avar%20styleProperties%20%3D%20Polymer.StyleProperties%3B%0Avar%20StyleCache%20%3D%20Polymer.StyleCache%3B%0Avar%20api%20%3D%20%7B%0A_styles%3A%20%5B%5D%2C%0A_properties%3A%20null%2C%0AcustomStyle%3A%20%7B%7D%2C%0A_styleCache%3A%20new%20StyleCache()%2C%0AaddStyle%3A%20function%20(style)%20%7B%0Athis._styles.push(style)%3B%0Athis._properties%20%3D%20null%3B%0A%7D%2C%0Aget%20_styleProperties()%20%7B%0Aif%20(!this._properties)%20%7B%0AstyleProperties.decorateStyles(this._styles)%3B%0Athis._styles._scopeStyleProperties%20%3D%20null%3B%0Athis._properties%20%3D%20styleProperties.scopePropertiesFromStyles(this._styles)%3B%0AstyleProperties.mixinCustomStyle(this._properties%2C%20this.customStyle)%3B%0AstyleProperties.reify(this._properties)%3B%0A%7D%0Areturn%20this._properties%3B%0A%7D%2C%0A_needsStyleProperties%3A%20function%20()%20%7B%0A%7D%2C%0A_computeStyleProperties%3A%20function%20()%20%7B%0Areturn%20this._styleProperties%3B%0A%7D%2C%0AupdateStyles%3A%20function%20(properties)%20%7B%0Athis._properties%20%3D%20null%3B%0Aif%20(properties)%20%7B%0APolymer.Base.mixin(this.customStyle%2C%20properties)%3B%0A%7D%0Athis._styleCache.clear()%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20this._styles.length%3B%20i%2B%2B)%20%7B%0As%20%3D%20this._styles%5Bi%5D%3B%0As%20%3D%20s.__importElement%20%7C%7C%20s%3B%0As._apply()%3B%0A%7D%0A%7D%0A%7D%3B%0Areturn%20api%3B%0A%7D()%3B%0A(function%20()%20%7B%0A'use%20strict'%3B%0Avar%20serializeValueToAttribute%20%3D%20Polymer.Base.serializeValueToAttribute%3B%0Avar%20propertyUtils%20%3D%20Polymer.StyleProperties%3B%0Avar%20styleTransformer%20%3D%20Polymer.StyleTransformer%3B%0Avar%20styleDefaults%20%3D%20Polymer.StyleDefaults%3B%0Avar%20nativeShadow%20%3D%20Polymer.Settings.useNativeShadow%3B%0APolymer.Base._addFeature(%7B%0A_prepStyleProperties%3A%20function%20()%20%7B%0Athis._ownStylePropertyNames%20%3D%20this._styles%20%26%26%20this._styles.length%20%3F%20propertyUtils.decorateStyles(this._styles)%20%3A%20null%3B%0A%7D%2C%0AcustomStyle%3A%20null%2C%0AgetComputedStyleValue%3A%20function%20(property)%20%7B%0Areturn%20this._styleProperties%20%26%26%20this._styleProperties%5Bproperty%5D%20%7C%7C%20getComputedStyle(this).getPropertyValue(property)%3B%0A%7D%2C%0A_setupStyleProperties%3A%20function%20()%20%7B%0Athis.customStyle%20%3D%20%7B%7D%3B%0Athis._styleCache%20%3D%20null%3B%0Athis._styleProperties%20%3D%20null%3B%0Athis._scopeSelector%20%3D%20null%3B%0Athis._ownStyleProperties%20%3D%20null%3B%0Athis._customStyle%20%3D%20null%3B%0A%7D%2C%0A_needsStyleProperties%3A%20function%20()%20%7B%0Areturn%20Boolean(this._ownStylePropertyNames%20%26%26%20this._ownStylePropertyNames.length)%3B%0A%7D%2C%0A_beforeAttached%3A%20function%20()%20%7B%0Aif%20(!this._scopeSelector%20%26%26%20this._needsStyleProperties())%20%7B%0Athis._updateStyleProperties()%3B%0A%7D%0A%7D%2C%0A_findStyleHost%3A%20function%20()%20%7B%0Avar%20e%20%3D%20this%2C%20root%3B%0Awhile%20(root%20%3D%20Polymer.dom(e).getOwnerRoot())%20%7B%0Aif%20(Polymer.isInstance(root.host))%20%7B%0Areturn%20root.host%3B%0A%7D%0Ae%20%3D%20root.host%3B%0A%7D%0Areturn%20styleDefaults%3B%0A%7D%2C%0A_updateStyleProperties%3A%20function%20()%20%7B%0Avar%20info%2C%20scope%20%3D%20this._findStyleHost()%3B%0Aif%20(!scope._styleCache)%20%7B%0Ascope._styleCache%20%3D%20new%20Polymer.StyleCache()%3B%0A%7D%0Avar%20scopeData%20%3D%20propertyUtils.propertyDataFromStyles(scope._styles%2C%20this)%3B%0AscopeData.key.customStyle%20%3D%20this.customStyle%3B%0Ainfo%20%3D%20scope._styleCache.retrieve(this.is%2C%20scopeData.key%2C%20this._styles)%3B%0Avar%20scopeCached%20%3D%20Boolean(info)%3B%0Aif%20(scopeCached)%20%7B%0Athis._styleProperties%20%3D%20info._styleProperties%3B%0A%7D%20else%20%7B%0Athis._computeStyleProperties(scopeData.properties)%3B%0A%7D%0Athis._computeOwnStyleProperties()%3B%0Aif%20(!scopeCached)%20%7B%0Ainfo%20%3D%20styleCache.retrieve(this.is%2C%20this._ownStyleProperties%2C%20this._styles)%3B%0A%7D%0Avar%20globalCached%20%3D%20Boolean(info)%20%26%26%20!scopeCached%3B%0Avar%20style%20%3D%20this._applyStyleProperties(info)%3B%0Aif%20(!scopeCached)%20%7B%0Astyle%20%3D%20style%20%26%26%20nativeShadow%20%3F%20style.cloneNode(true)%20%3A%20style%3B%0Ainfo%20%3D%20%7B%0Astyle%3A%20style%2C%0A_scopeSelector%3A%20this._scopeSelector%2C%0A_styleProperties%3A%20this._styleProperties%0A%7D%3B%0AscopeData.key.customStyle%20%3D%20%7B%7D%3B%0Athis.mixin(scopeData.key.customStyle%2C%20this.customStyle)%3B%0Ascope._styleCache.store(this.is%2C%20info%2C%20scopeData.key%2C%20this._styles)%3B%0Aif%20(!globalCached)%20%7B%0AstyleCache.store(this.is%2C%20Object.create(info)%2C%20this._ownStyleProperties%2C%20this._styles)%3B%0A%7D%0A%7D%0A%7D%2C%0A_computeStyleProperties%3A%20function%20(scopeProps)%20%7B%0Avar%20scope%20%3D%20this._findStyleHost()%3B%0Aif%20(!scope._styleProperties)%20%7B%0Ascope._computeStyleProperties()%3B%0A%7D%0Avar%20props%20%3D%20Object.create(scope._styleProperties)%3B%0Athis.mixin(props%2C%20propertyUtils.hostPropertiesFromStyles(this._styles))%3B%0AscopeProps%20%3D%20scopeProps%20%7C%7C%20propertyUtils.propertyDataFromStyles(scope._styles%2C%20this).properties%3B%0Athis.mixin(props%2C%20scopeProps)%3B%0Athis.mixin(props%2C%20propertyUtils.scopePropertiesFromStyles(this._styles))%3B%0ApropertyUtils.mixinCustomStyle(props%2C%20this.customStyle)%3B%0ApropertyUtils.reify(props)%3B%0Athis._styleProperties%20%3D%20props%3B%0A%7D%2C%0A_computeOwnStyleProperties%3A%20function%20()%20%7B%0Avar%20props%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20this._ownStylePropertyNames.length%3B%20i%2B%2B)%20%7B%0An%20%3D%20this._ownStylePropertyNames%5Bi%5D%3B%0Aprops%5Bn%5D%20%3D%20this._styleProperties%5Bn%5D%3B%0A%7D%0Athis._ownStyleProperties%20%3D%20props%3B%0A%7D%2C%0A_scopeCount%3A%200%2C%0A_applyStyleProperties%3A%20function%20(info)%20%7B%0Avar%20oldScopeSelector%20%3D%20this._scopeSelector%3B%0Athis._scopeSelector%20%3D%20info%20%3F%20info._scopeSelector%20%3A%20this.is%20%2B%20'-'%20%2B%20this.__proto__._scopeCount%2B%2B%3B%0Avar%20style%20%3D%20propertyUtils.applyElementStyle(this%2C%20this._styleProperties%2C%20this._scopeSelector%2C%20info%20%26%26%20info.style)%3B%0Aif%20(!nativeShadow)%20%7B%0ApropertyUtils.applyElementScopeSelector(this%2C%20this._scopeSelector%2C%20oldScopeSelector%2C%20this._scopeCssViaAttr)%3B%0A%7D%0Areturn%20style%3B%0A%7D%2C%0AserializeValueToAttribute%3A%20function%20(value%2C%20attribute%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(attribute%20%3D%3D%3D%20'class'%20%26%26%20!nativeShadow)%20%7B%0Avar%20host%20%3D%20node%20%3D%3D%3D%20this%20%3F%20this.domHost%20%7C%7C%20this.dataHost%20%3A%20this%3B%0Aif%20(host)%20%7B%0Avalue%20%3D%20host._scopeElementClass(node%2C%20value)%3B%0A%7D%0A%7D%0Anode%20%3D%20this.shadyRoot%20%26%26%20this.shadyRoot._hasDistributed%20%3F%20Polymer.dom(node)%20%3A%20node%3B%0AserializeValueToAttribute.call(this%2C%20value%2C%20attribute%2C%20node)%3B%0A%7D%2C%0A_scopeElementClass%3A%20function%20(element%2C%20selector)%20%7B%0Aif%20(!nativeShadow%20%26%26%20!this._scopeCssViaAttr)%20%7B%0Aselector%20%3D%20(selector%20%3F%20selector%20%2B%20'%20'%20%3A%20'')%20%2B%20SCOPE_NAME%20%2B%20'%20'%20%2B%20this.is%20%2B%20(element._scopeSelector%20%3F%20'%20'%20%2B%20XSCOPE_NAME%20%2B%20'%20'%20%2B%20element._scopeSelector%20%3A%20'')%3B%0A%7D%0Areturn%20selector%3B%0A%7D%2C%0AupdateStyles%3A%20function%20(properties)%20%7B%0Aif%20(this.isAttached)%20%7B%0Aif%20(properties)%20%7B%0Athis.mixin(this.customStyle%2C%20properties)%3B%0A%7D%0Aif%20(this._needsStyleProperties())%20%7B%0Athis._updateStyleProperties()%3B%0A%7D%20else%20%7B%0Athis._styleProperties%20%3D%20null%3B%0A%7D%0Aif%20(this._styleCache)%20%7B%0Athis._styleCache.clear()%3B%0A%7D%0Athis._updateRootStyles()%3B%0A%7D%0A%7D%2C%0A_updateRootStyles%3A%20function%20(root)%20%7B%0Aroot%20%3D%20root%20%7C%7C%20this.root%3B%0Avar%20c%24%20%3D%20Polymer.dom(root)._query(function%20(e)%20%7B%0Areturn%20e.shadyRoot%20%7C%7C%20e.shadowRoot%3B%0A%7D)%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20c%3B%20i%20%3C%20l%20%26%26%20(c%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(c.updateStyles)%20%7B%0Ac.updateStyles()%3B%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer.updateStyles%20%3D%20function%20(properties)%20%7B%0AstyleDefaults.updateStyles(properties)%3B%0APolymer.Base._updateRootStyles(document)%3B%0A%7D%3B%0Avar%20styleCache%20%3D%20new%20Polymer.StyleCache()%3B%0APolymer.customStyleCache%20%3D%20styleCache%3B%0Avar%20SCOPE_NAME%20%3D%20styleTransformer.SCOPE_NAME%3B%0Avar%20XSCOPE_NAME%20%3D%20propertyUtils.XSCOPE_NAME%3B%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepConstructor()%3B%0Athis._prepTemplate()%3B%0Athis._prepStyles()%3B%0Athis._prepAnnotations()%3B%0Athis._prepEffects()%3B%0Athis._prepBehaviors()%3B%0Athis._prepPropertyInfo()%3B%0Athis._prepBindings()%3B%0Athis._prepShady()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addPropertyEffects(b.properties)%3B%0Athis._addComplexObserverEffects(b.observers)%3B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._setupGestures()%3B%0Athis._setupConfigure()%3B%0Athis._setupStyleProperties()%3B%0Athis._setupDebouncers()%3B%0Athis._setupShady()%3B%0Athis._registerHost()%3B%0Aif%20(this._template)%20%7B%0Athis._poolContent()%3B%0Athis._beginHosting()%3B%0Athis._stampTemplate()%3B%0Athis._endHosting()%3B%0Athis._marshalAnnotationReferences()%3B%0A%7D%0Athis._marshalInstanceEffects()%3B%0Athis._marshalBehaviors()%3B%0Athis._marshalHostAttributes()%3B%0Athis._marshalAttributes()%3B%0Athis._tryReady()%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0Aif%20(b.listeners)%20%7B%0Athis._listenListeners(b.listeners)%3B%0A%7D%0A%7D%0A%7D)%3B%0A(function%20()%20%7B%0Avar%20propertyUtils%20%3D%20Polymer.StyleProperties%3B%0Avar%20styleUtil%20%3D%20Polymer.StyleUtil%3B%0Avar%20cssParse%20%3D%20Polymer.CssParse%3B%0Avar%20styleDefaults%20%3D%20Polymer.StyleDefaults%3B%0Avar%20styleTransformer%20%3D%20Polymer.StyleTransformer%3B%0APolymer(%7B%0Ais%3A%20'custom-style'%2C%0Aextends%3A%20'style'%2C%0A_template%3A%20null%2C%0Aproperties%3A%20%7B%20include%3A%20String%20%7D%2C%0Aready%3A%20function%20()%20%7B%0Athis._tryApply()%3B%0A%7D%2C%0Aattached%3A%20function%20()%20%7B%0Athis._tryApply()%3B%0A%7D%2C%0A_tryApply%3A%20function%20()%20%7B%0Aif%20(!this._appliesToDocument)%20%7B%0Aif%20(this.parentNode%20%26%26%20this.parentNode.localName%20!%3D%3D%20'dom-module')%20%7B%0Athis._appliesToDocument%20%3D%20true%3B%0Avar%20e%20%3D%20this.__appliedElement%20%7C%7C%20this%3B%0AstyleDefaults.addStyle(e)%3B%0Aif%20(e.textContent%20%7C%7C%20this.include)%20%7B%0Athis._apply(true)%3B%0A%7D%20else%20%7B%0Avar%20self%20%3D%20this%3B%0Avar%20observer%20%3D%20new%20MutationObserver(function%20()%20%7B%0Aobserver.disconnect()%3B%0Aself._apply(true)%3B%0A%7D)%3B%0Aobserver.observe(e%2C%20%7B%20childList%3A%20true%20%7D)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_apply%3A%20function%20(deferProperties)%20%7B%0Avar%20e%20%3D%20this.__appliedElement%20%7C%7C%20this%3B%0Aif%20(this.include)%20%7B%0Ae.textContent%20%3D%20styleUtil.cssFromModules(this.include%2C%20true)%20%2B%20e.textContent%3B%0A%7D%0Aif%20(e.textContent)%20%7B%0AstyleUtil.forEachRule(styleUtil.rulesForStyle(e)%2C%20function%20(rule)%20%7B%0AstyleTransformer.documentRule(rule)%3B%0A%7D)%3B%0Avar%20self%20%3D%20this%3B%0Avar%20fn%20%3D%20function%20fn()%20%7B%0Aself._applyCustomProperties(e)%3B%0A%7D%3B%0Aif%20(this._pendingApplyProperties)%20%7B%0AcancelAnimationFrame(this._pendingApplyProperties)%3B%0Athis._pendingApplyProperties%20%3D%20null%3B%0A%7D%0Aif%20(deferProperties)%20%7B%0Athis._pendingApplyProperties%20%3D%20requestAnimationFrame(fn)%3B%0A%7D%20else%20%7B%0Afn()%3B%0A%7D%0A%7D%0A%7D%2C%0A_applyCustomProperties%3A%20function%20(element)%20%7B%0Athis._computeStyleProperties()%3B%0Avar%20props%20%3D%20this._styleProperties%3B%0Avar%20rules%20%3D%20styleUtil.rulesForStyle(element)%3B%0Aelement.textContent%20%3D%20styleUtil.toCssText(rules%2C%20function%20(rule)%20%7B%0Avar%20css%20%3D%20rule.cssText%20%3D%20rule.parsedCssText%3B%0Aif%20(rule.propertyInfo%20%26%26%20rule.propertyInfo.cssText)%20%7B%0Acss%20%3D%20cssParse.removeCustomPropAssignment(css)%3B%0Arule.cssText%20%3D%20propertyUtils.valueForProperties(css%2C%20props)%3B%0A%7D%0A%7D)%3B%0A%7D%0A%7D)%3B%0A%7D())%3B%0APolymer.Templatizer%20%3D%20%7B%0Aproperties%3A%20%7B%20__hideTemplateChildren__%3A%20%7B%20observer%3A%20'_showHideChildren'%20%7D%20%7D%2C%0A_instanceProps%3A%20Polymer.nob%2C%0A_parentPropPrefix%3A%20'_parent_'%2C%0Atemplatize%3A%20function%20(template)%20%7B%0Athis._templatized%20%3D%20template%3B%0Aif%20(!template._content)%20%7B%0Atemplate._content%20%3D%20template.content%3B%0A%7D%0Aif%20(template._content._ctor)%20%7B%0Athis.ctor%20%3D%20template._content._ctor%3B%0Athis._prepParentProperties(this.ctor.prototype%2C%20template)%3B%0Areturn%3B%0A%7D%0Avar%20archetype%20%3D%20Object.create(Polymer.Base)%3B%0Athis._customPrepAnnotations(archetype%2C%20template)%3B%0Athis._prepParentProperties(archetype%2C%20template)%3B%0Aarchetype._prepEffects()%3B%0Athis._customPrepEffects(archetype)%3B%0Aarchetype._prepBehaviors()%3B%0Aarchetype._prepPropertyInfo()%3B%0Aarchetype._prepBindings()%3B%0Aarchetype._notifyPathUp%20%3D%20this._notifyPathUpImpl%3B%0Aarchetype._scopeElementClass%20%3D%20this._scopeElementClassImpl%3B%0Aarchetype.listen%20%3D%20this._listenImpl%3B%0Aarchetype._showHideChildren%20%3D%20this._showHideChildrenImpl%3B%0Aarchetype.__setPropertyOrig%20%3D%20this.__setProperty%3B%0Aarchetype.__setProperty%20%3D%20this.__setPropertyImpl%3B%0Avar%20_constructor%20%3D%20this._constructorImpl%3B%0Avar%20ctor%20%3D%20function%20TemplateInstance(model%2C%20host)%20%7B%0A_constructor.call(this%2C%20model%2C%20host)%3B%0A%7D%3B%0Actor.prototype%20%3D%20archetype%3B%0Aarchetype.constructor%20%3D%20ctor%3B%0Atemplate._content._ctor%20%3D%20ctor%3B%0Athis.ctor%20%3D%20ctor%3B%0A%7D%2C%0A_getRootDataHost%3A%20function%20()%20%7B%0Areturn%20this.dataHost%20%26%26%20this.dataHost._rootDataHost%20%7C%7C%20this.dataHost%3B%0A%7D%2C%0A_showHideChildrenImpl%3A%20function%20(hide)%20%7B%0Avar%20c%20%3D%20this._children%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20c.length%3B%20i%2B%2B)%20%7B%0Avar%20n%20%3D%20c%5Bi%5D%3B%0Aif%20(Boolean(hide)%20!%3D%20Boolean(n.__hideTemplateChildren__))%20%7B%0Aif%20(n.nodeType%20%3D%3D%3D%20Node.TEXT_NODE)%20%7B%0Aif%20(hide)%20%7B%0An.__polymerTextContent__%20%3D%20n.textContent%3B%0An.textContent%20%3D%20''%3B%0A%7D%20else%20%7B%0An.textContent%20%3D%20n.__polymerTextContent__%3B%0A%7D%0A%7D%20else%20if%20(n.style)%20%7B%0Aif%20(hide)%20%7B%0An.__polymerDisplay__%20%3D%20n.style.display%3B%0An.style.display%20%3D%20'none'%3B%0A%7D%20else%20%7B%0An.style.display%20%3D%20n.__polymerDisplay__%3B%0A%7D%0A%7D%0A%7D%0An.__hideTemplateChildren__%20%3D%20hide%3B%0A%7D%0A%7D%2C%0A__setPropertyImpl%3A%20function%20(property%2C%20value%2C%20fromAbove%2C%20node)%20%7B%0Aif%20(node%20%26%26%20node.__hideTemplateChildren__%20%26%26%20property%20%3D%3D%20'textContent')%20%7B%0Aproperty%20%3D%20'__polymerTextContent__'%3B%0A%7D%0Athis.__setPropertyOrig(property%2C%20value%2C%20fromAbove%2C%20node)%3B%0A%7D%2C%0A_debounceTemplate%3A%20function%20(fn)%20%7B%0APolymer.dom.addDebouncer(this.debounce('_debounceTemplate'%2C%20fn))%3B%0A%7D%2C%0A_flushTemplates%3A%20function%20()%20%7B%0APolymer.dom.flush()%3B%0A%7D%2C%0A_customPrepEffects%3A%20function%20(archetype)%20%7B%0Avar%20parentProps%20%3D%20archetype._parentProps%3B%0Afor%20(var%20prop%20in%20parentProps)%20%7B%0Aarchetype._addPropertyEffect(prop%2C%20'function'%2C%20this._createHostPropEffector(prop))%3B%0A%7D%0Afor%20(prop%20in%20this._instanceProps)%20%7B%0Aarchetype._addPropertyEffect(prop%2C%20'function'%2C%20this._createInstancePropEffector(prop))%3B%0A%7D%0A%7D%2C%0A_customPrepAnnotations%3A%20function%20(archetype%2C%20template)%20%7B%0Aarchetype._template%20%3D%20template%3B%0Avar%20c%20%3D%20template._content%3B%0Aif%20(!c._notes)%20%7B%0Avar%20rootDataHost%20%3D%20archetype._rootDataHost%3B%0Aif%20(rootDataHost)%20%7B%0APolymer.Annotations.prepElement%20%3D%20function%20()%20%7B%0ArootDataHost._prepElement()%3B%0A%7D%3B%0A%7D%0Ac._notes%20%3D%20Polymer.Annotations.parseAnnotations(template)%3B%0APolymer.Annotations.prepElement%20%3D%20null%3B%0Athis._processAnnotations(c._notes)%3B%0A%7D%0Aarchetype._notes%20%3D%20c._notes%3B%0Aarchetype._parentProps%20%3D%20c._parentProps%3B%0A%7D%2C%0A_prepParentProperties%3A%20function%20(archetype%2C%20template)%20%7B%0Avar%20parentProps%20%3D%20this._parentProps%20%3D%20archetype._parentProps%3B%0Aif%20(this._forwardParentProp%20%26%26%20parentProps)%20%7B%0Avar%20proto%20%3D%20archetype._parentPropProto%3B%0Avar%20prop%3B%0Aif%20(!proto)%20%7B%0Afor%20(prop%20in%20this._instanceProps)%20%7B%0Adelete%20parentProps%5Bprop%5D%3B%0A%7D%0Aproto%20%3D%20archetype._parentPropProto%20%3D%20Object.create(null)%3B%0Aif%20(template%20!%3D%20this)%20%7B%0APolymer.Bind.prepareModel(proto)%3B%0APolymer.Base.prepareModelNotifyPath(proto)%3B%0A%7D%0Afor%20(prop%20in%20parentProps)%20%7B%0Avar%20parentProp%20%3D%20this._parentPropPrefix%20%2B%20prop%3B%0Avar%20effects%20%3D%20%5B%0A%7B%0Akind%3A%20'function'%2C%0Aeffect%3A%20this._createForwardPropEffector(prop)%2C%0Afn%3A%20Polymer.Bind._functionEffect%0A%7D%2C%0A%7B%0Akind%3A%20'notify'%2C%0Afn%3A%20Polymer.Bind._notifyEffect%2C%0Aeffect%3A%20%7B%20event%3A%20Polymer.CaseMap.camelToDashCase(parentProp)%20%2B%20'-changed'%20%7D%0A%7D%0A%5D%3B%0APolymer.Bind._createAccessors(proto%2C%20parentProp%2C%20effects)%3B%0A%7D%0A%7D%0Avar%20self%20%3D%20this%3B%0Aif%20(template%20!%3D%20this)%20%7B%0APolymer.Bind.prepareInstance(template)%3B%0Atemplate._forwardParentProp%20%3D%20function%20(source%2C%20value)%20%7B%0Aself._forwardParentProp(source%2C%20value)%3B%0A%7D%3B%0A%7D%0Athis._extendTemplate(template%2C%20proto)%3B%0Atemplate._pathEffector%20%3D%20function%20(path%2C%20value%2C%20fromAbove)%20%7B%0Areturn%20self._pathEffectorImpl(path%2C%20value%2C%20fromAbove)%3B%0A%7D%3B%0A%7D%0A%7D%2C%0A_createForwardPropEffector%3A%20function%20(prop)%20%7B%0Areturn%20function%20(source%2C%20value)%20%7B%0Athis._forwardParentProp(prop%2C%20value)%3B%0A%7D%3B%0A%7D%2C%0A_createHostPropEffector%3A%20function%20(prop)%20%7B%0Avar%20prefix%20%3D%20this._parentPropPrefix%3B%0Areturn%20function%20(source%2C%20value)%20%7B%0Athis.dataHost._templatized%5Bprefix%20%2B%20prop%5D%20%3D%20value%3B%0A%7D%3B%0A%7D%2C%0A_createInstancePropEffector%3A%20function%20(prop)%20%7B%0Areturn%20function%20(source%2C%20value%2C%20old%2C%20fromAbove)%20%7B%0Aif%20(!fromAbove)%20%7B%0Athis.dataHost._forwardInstanceProp(this%2C%20prop%2C%20value)%3B%0A%7D%0A%7D%3B%0A%7D%2C%0A_extendTemplate%3A%20function%20(template%2C%20proto)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(proto)%3B%0Aif%20(proto._propertySetter)%20%7B%0Atemplate._propertySetter%20%3D%20proto._propertySetter%3B%0A%7D%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Avar%20val%20%3D%20template%5Bn%5D%3B%0Avar%20pd%20%3D%20Object.getOwnPropertyDescriptor(proto%2C%20n)%3B%0AObject.defineProperty(template%2C%20n%2C%20pd)%3B%0Aif%20(val%20!%3D%3D%20undefined)%20%7B%0Atemplate._propertySetter(n%2C%20val)%3B%0A%7D%0A%7D%0A%7D%2C%0A_showHideChildren%3A%20function%20(hidden)%20%7B%0A%7D%2C%0A_forwardInstancePath%3A%20function%20(inst%2C%20path%2C%20value)%20%7B%0A%7D%2C%0A_forwardInstanceProp%3A%20function%20(inst%2C%20prop%2C%20value)%20%7B%0A%7D%2C%0A_notifyPathUpImpl%3A%20function%20(path%2C%20value)%20%7B%0Avar%20dataHost%20%3D%20this.dataHost%3B%0Avar%20dot%20%3D%20path.indexOf('.')%3B%0Avar%20root%20%3D%20dot%20%3C%200%20%3F%20path%20%3A%20path.slice(0%2C%20dot)%3B%0AdataHost._forwardInstancePath.call(dataHost%2C%20this%2C%20path%2C%20value)%3B%0Aif%20(root%20in%20dataHost._parentProps)%20%7B%0AdataHost._templatized.notifyPath(dataHost._parentPropPrefix%20%2B%20path%2C%20value)%3B%0A%7D%0A%7D%2C%0A_pathEffectorImpl%3A%20function%20(path%2C%20value%2C%20fromAbove)%20%7B%0Aif%20(this._forwardParentPath)%20%7B%0Aif%20(path.indexOf(this._parentPropPrefix)%20%3D%3D%3D%200)%20%7B%0Avar%20subPath%20%3D%20path.substring(this._parentPropPrefix.length)%3B%0Avar%20model%20%3D%20this._modelForPath(subPath)%3B%0Aif%20(model%20in%20this._parentProps)%20%7B%0Athis._forwardParentPath(subPath%2C%20value)%3B%0A%7D%0A%7D%0A%7D%0APolymer.Base._pathEffector.call(this._templatized%2C%20path%2C%20value%2C%20fromAbove)%3B%0A%7D%2C%0A_constructorImpl%3A%20function%20(model%2C%20host)%20%7B%0Athis._rootDataHost%20%3D%20host._getRootDataHost()%3B%0Athis._setupConfigure(model)%3B%0Athis._registerHost(host)%3B%0Athis._beginHosting()%3B%0Athis.root%20%3D%20this.instanceTemplate(this._template)%3B%0Athis.root.__noContent%20%3D%20!this._notes._hasContent%3B%0Athis.root.__styleScoped%20%3D%20true%3B%0Athis._endHosting()%3B%0Athis._marshalAnnotatedNodes()%3B%0Athis._marshalInstanceEffects()%3B%0Athis._marshalAnnotatedListeners()%3B%0Avar%20children%20%3D%20%5B%5D%3B%0Afor%20(var%20n%20%3D%20this.root.firstChild%3B%20n%3B%20n%20%3D%20n.nextSibling)%20%7B%0Achildren.push(n)%3B%0An._templateInstance%20%3D%20this%3B%0A%7D%0Athis._children%20%3D%20children%3B%0Aif%20(host.__hideTemplateChildren__)%20%7B%0Athis._showHideChildren(true)%3B%0A%7D%0Athis._tryReady()%3B%0A%7D%2C%0A_listenImpl%3A%20function%20(node%2C%20eventName%2C%20methodName)%20%7B%0Avar%20model%20%3D%20this%3B%0Avar%20host%20%3D%20this._rootDataHost%3B%0Avar%20handler%20%3D%20host._createEventHandler(node%2C%20eventName%2C%20methodName)%3B%0Avar%20decorated%20%3D%20function%20(e)%20%7B%0Ae.model%20%3D%20model%3B%0Ahandler(e)%3B%0A%7D%3B%0Ahost._listen(node%2C%20eventName%2C%20decorated)%3B%0A%7D%2C%0A_scopeElementClassImpl%3A%20function%20(node%2C%20value)%20%7B%0Avar%20host%20%3D%20this._rootDataHost%3B%0Aif%20(host)%20%7B%0Areturn%20host._scopeElementClass(node%2C%20value)%3B%0A%7D%0A%7D%2C%0Astamp%3A%20function%20(model)%20%7B%0Amodel%20%3D%20model%20%7C%7C%20%7B%7D%3B%0Aif%20(this._parentProps)%20%7B%0Avar%20templatized%20%3D%20this._templatized%3B%0Afor%20(var%20prop%20in%20this._parentProps)%20%7B%0Aif%20(model%5Bprop%5D%20%3D%3D%3D%20undefined)%20%7B%0Amodel%5Bprop%5D%20%3D%20templatized%5Bthis._parentPropPrefix%20%2B%20prop%5D%3B%0A%7D%0A%7D%0A%7D%0Areturn%20new%20this.ctor(model%2C%20this)%3B%0A%7D%2C%0AmodelForElement%3A%20function%20(el)%20%7B%0Avar%20model%3B%0Awhile%20(el)%20%7B%0Aif%20(model%20%3D%20el._templateInstance)%20%7B%0Aif%20(model.dataHost%20!%3D%20this)%20%7B%0Ael%20%3D%20model.dataHost%3B%0A%7D%20else%20%7B%0Areturn%20model%3B%0A%7D%0A%7D%20else%20%7B%0Ael%20%3D%20el.parentNode%3B%0A%7D%0A%7D%0A%7D%0A%7D%3B%0APolymer(%7B%0Ais%3A%20'dom-template'%2C%0Aextends%3A%20'template'%2C%0A_template%3A%20null%2C%0Abehaviors%3A%20%5BPolymer.Templatizer%5D%2C%0Aready%3A%20function%20()%20%7B%0Athis.templatize(this)%3B%0A%7D%0A%7D)%3B%0APolymer._collections%20%3D%20new%20WeakMap()%3B%0APolymer.Collection%20%3D%20function%20(userArray)%20%7B%0APolymer._collections.set(userArray%2C%20this)%3B%0Athis.userArray%20%3D%20userArray%3B%0Athis.store%20%3D%20userArray.slice()%3B%0Athis.initMap()%3B%0A%7D%3B%0APolymer.Collection.prototype%20%3D%20%7B%0Aconstructor%3A%20Polymer.Collection%2C%0AinitMap%3A%20function%20()%20%7B%0Avar%20omap%20%3D%20this.omap%20%3D%20new%20WeakMap()%3B%0Avar%20pmap%20%3D%20this.pmap%20%3D%20%7B%7D%3B%0Avar%20s%20%3D%20this.store%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20s.length%3B%20i%2B%2B)%20%7B%0Avar%20item%20%3D%20s%5Bi%5D%3B%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Aomap.set(item%2C%20i)%3B%0A%7D%20else%20%7B%0Apmap%5Bitem%5D%20%3D%20i%3B%0A%7D%0A%7D%0A%7D%2C%0Aadd%3A%20function%20(item)%20%7B%0Avar%20key%20%3D%20this.store.push(item)%20-%201%3B%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Athis.omap.set(item%2C%20key)%3B%0A%7D%20else%20%7B%0Athis.pmap%5Bitem%5D%20%3D%20key%3B%0A%7D%0Areturn%20'%23'%20%2B%20key%3B%0A%7D%2C%0AremoveKey%3A%20function%20(key)%20%7B%0Aif%20(key%20%3D%20this._parseKey(key))%20%7B%0Athis._removeFromMap(this.store%5Bkey%5D)%3B%0Adelete%20this.store%5Bkey%5D%3B%0A%7D%0A%7D%2C%0A_removeFromMap%3A%20function%20(item)%20%7B%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Athis.omap.delete(item)%3B%0A%7D%20else%20%7B%0Adelete%20this.pmap%5Bitem%5D%3B%0A%7D%0A%7D%2C%0Aremove%3A%20function%20(item)%20%7B%0Avar%20key%20%3D%20this.getKey(item)%3B%0Athis.removeKey(key)%3B%0Areturn%20key%3B%0A%7D%2C%0AgetKey%3A%20function%20(item)%20%7B%0Avar%20key%3B%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Akey%20%3D%20this.omap.get(item)%3B%0A%7D%20else%20%7B%0Akey%20%3D%20this.pmap%5Bitem%5D%3B%0A%7D%0Aif%20(key%20!%3D%20undefined)%20%7B%0Areturn%20'%23'%20%2B%20key%3B%0A%7D%0A%7D%2C%0AgetKeys%3A%20function%20()%20%7B%0Areturn%20Object.keys(this.store).map(function%20(key)%20%7B%0Areturn%20'%23'%20%2B%20key%3B%0A%7D)%3B%0A%7D%2C%0A_parseKey%3A%20function%20(key)%20%7B%0Aif%20(key%20%26%26%20key%5B0%5D%20%3D%3D%20'%23')%20%7B%0Areturn%20key.slice(1)%3B%0A%7D%0A%7D%2C%0AsetItem%3A%20function%20(key%2C%20item)%20%7B%0Aif%20(key%20%3D%20this._parseKey(key))%20%7B%0Avar%20old%20%3D%20this.store%5Bkey%5D%3B%0Aif%20(old)%20%7B%0Athis._removeFromMap(old)%3B%0A%7D%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Athis.omap.set(item%2C%20key)%3B%0A%7D%20else%20%7B%0Athis.pmap%5Bitem%5D%20%3D%20key%3B%0A%7D%0Athis.store%5Bkey%5D%20%3D%20item%3B%0A%7D%0A%7D%2C%0AgetItem%3A%20function%20(key)%20%7B%0Aif%20(key%20%3D%20this._parseKey(key))%20%7B%0Areturn%20this.store%5Bkey%5D%3B%0A%7D%0A%7D%2C%0AgetItems%3A%20function%20()%20%7B%0Avar%20items%20%3D%20%5B%5D%2C%20store%20%3D%20this.store%3B%0Afor%20(var%20key%20in%20store)%20%7B%0Aitems.push(store%5Bkey%5D)%3B%0A%7D%0Areturn%20items%3B%0A%7D%2C%0A_applySplices%3A%20function%20(splices)%20%7B%0Avar%20keyMap%20%3D%20%7B%7D%2C%20key%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0As.addedKeys%20%3D%20%5B%5D%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20s.removed.length%3B%20j%2B%2B)%20%7B%0Akey%20%3D%20this.getKey(s.removed%5Bj%5D)%3B%0AkeyMap%5Bkey%5D%20%3D%20keyMap%5Bkey%5D%20%3F%20null%20%3A%20-1%3B%0A%7D%0Afor%20(j%20%3D%200%3B%20j%20%3C%20s.addedCount%3B%20j%2B%2B)%20%7B%0Avar%20item%20%3D%20this.userArray%5Bs.index%20%2B%20j%5D%3B%0Akey%20%3D%20this.getKey(item)%3B%0Akey%20%3D%20key%20%3D%3D%3D%20undefined%20%3F%20this.add(item)%20%3A%20key%3B%0AkeyMap%5Bkey%5D%20%3D%20keyMap%5Bkey%5D%20%3F%20null%20%3A%201%3B%0As.addedKeys.push(key)%3B%0A%7D%0A%7D%0Avar%20removed%20%3D%20%5B%5D%3B%0Avar%20added%20%3D%20%5B%5D%3B%0Afor%20(key%20in%20keyMap)%20%7B%0Aif%20(keyMap%5Bkey%5D%20%3C%200)%20%7B%0Athis.removeKey(key)%3B%0Aremoved.push(key)%3B%0A%7D%0Aif%20(keyMap%5Bkey%5D%20%3E%200)%20%7B%0Aadded.push(key)%3B%0A%7D%0A%7D%0Areturn%20%5B%7B%0Aremoved%3A%20removed%2C%0Aadded%3A%20added%0A%7D%5D%3B%0A%7D%0A%7D%3B%0APolymer.Collection.get%20%3D%20function%20(userArray)%20%7B%0Areturn%20Polymer._collections.get(userArray)%20%7C%7C%20new%20Polymer.Collection(userArray)%3B%0A%7D%3B%0APolymer.Collection.applySplices%20%3D%20function%20(userArray%2C%20splices)%20%7B%0Avar%20coll%20%3D%20Polymer._collections.get(userArray)%3B%0Areturn%20coll%20%3F%20coll._applySplices(splices)%20%3A%20null%3B%0A%7D%3B%0APolymer(%7B%0Ais%3A%20'dom-repeat'%2C%0Aextends%3A%20'template'%2C%0A_template%3A%20null%2C%0Aproperties%3A%20%7B%0Aitems%3A%20%7B%20type%3A%20Array%20%7D%2C%0Aas%3A%20%7B%0Atype%3A%20String%2C%0Avalue%3A%20'item'%0A%7D%2C%0AindexAs%3A%20%7B%0Atype%3A%20String%2C%0Avalue%3A%20'index'%0A%7D%2C%0Asort%3A%20%7B%0Atype%3A%20Function%2C%0Aobserver%3A%20'_sortChanged'%0A%7D%2C%0Afilter%3A%20%7B%0Atype%3A%20Function%2C%0Aobserver%3A%20'_filterChanged'%0A%7D%2C%0Aobserve%3A%20%7B%0Atype%3A%20String%2C%0Aobserver%3A%20'_observeChanged'%0A%7D%2C%0Adelay%3A%20Number%2C%0ArenderedItemCount%3A%20%7B%0Atype%3A%20Number%2C%0Anotify%3A%20true%2C%0AreadOnly%3A%20true%0A%7D%2C%0AinitialCount%3A%20%7B%0Atype%3A%20Number%2C%0Aobserver%3A%20'_initializeChunking'%0A%7D%2C%0AtargetFramerate%3A%20%7B%0Atype%3A%20Number%2C%0Avalue%3A%2020%0A%7D%2C%0A_targetFrameTime%3A%20%7B%0Atype%3A%20Number%2C%0Acomputed%3A%20'_computeFrameTime(targetFramerate)'%0A%7D%0A%7D%2C%0Abehaviors%3A%20%5BPolymer.Templatizer%5D%2C%0Aobservers%3A%20%5B'_itemsChanged(items.*)'%5D%2C%0Acreated%3A%20function%20()%20%7B%0Athis._instances%20%3D%20%5B%5D%3B%0Athis._pool%20%3D%20%5B%5D%3B%0Athis._limit%20%3D%20Infinity%3B%0Avar%20self%20%3D%20this%3B%0Athis._boundRenderChunk%20%3D%20function%20()%20%7B%0Aself._renderChunk()%3B%0A%7D%3B%0A%7D%2C%0Adetached%3A%20function%20()%20%7B%0Athis.__isDetached%20%3D%20true%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._instances.length%3B%20i%2B%2B)%20%7B%0Athis._detachInstance(i)%3B%0A%7D%0A%7D%2C%0Aattached%3A%20function%20()%20%7B%0Aif%20(this.__isDetached)%20%7B%0Athis.__isDetached%20%3D%20false%3B%0Avar%20parent%20%3D%20Polymer.dom(Polymer.dom(this).parentNode)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._instances.length%3B%20i%2B%2B)%20%7B%0Athis._attachInstance(i%2C%20parent)%3B%0A%7D%0A%7D%0A%7D%2C%0Aready%3A%20function%20()%20%7B%0Athis._instanceProps%20%3D%20%7B%20__key__%3A%20true%20%7D%3B%0Athis._instanceProps%5Bthis.as%5D%20%3D%20true%3B%0Athis._instanceProps%5Bthis.indexAs%5D%20%3D%20true%3B%0Aif%20(!this.ctor)%20%7B%0Athis.templatize(this)%3B%0A%7D%0A%7D%2C%0A_sortChanged%3A%20function%20(sort)%20%7B%0Avar%20dataHost%20%3D%20this._getRootDataHost()%3B%0Athis._sortFn%20%3D%20sort%20%26%26%20(typeof%20sort%20%3D%3D%20'function'%20%3F%20sort%20%3A%20function%20()%20%7B%0Areturn%20dataHost%5Bsort%5D.apply(dataHost%2C%20arguments)%3B%0A%7D)%3B%0Athis._needFullRefresh%20%3D%20true%3B%0Aif%20(this.items)%20%7B%0Athis._debounceTemplate(this._render)%3B%0A%7D%0A%7D%2C%0A_filterChanged%3A%20function%20(filter)%20%7B%0Avar%20dataHost%20%3D%20this._getRootDataHost()%3B%0Athis._filterFn%20%3D%20filter%20%26%26%20(typeof%20filter%20%3D%3D%20'function'%20%3F%20filter%20%3A%20function%20()%20%7B%0Areturn%20dataHost%5Bfilter%5D.apply(dataHost%2C%20arguments)%3B%0A%7D)%3B%0Athis._needFullRefresh%20%3D%20true%3B%0Aif%20(this.items)%20%7B%0Athis._debounceTemplate(this._render)%3B%0A%7D%0A%7D%2C%0A_computeFrameTime%3A%20function%20(rate)%20%7B%0Areturn%20Math.ceil(1000%20%2F%20rate)%3B%0A%7D%2C%0A_initializeChunking%3A%20function%20()%20%7B%0Aif%20(this.initialCount)%20%7B%0Athis._limit%20%3D%20this.initialCount%3B%0Athis._chunkCount%20%3D%20this.initialCount%3B%0Athis._lastChunkTime%20%3D%20performance.now()%3B%0A%7D%0A%7D%2C%0A_tryRenderChunk%3A%20function%20()%20%7B%0Aif%20(this.items%20%26%26%20this._limit%20%3C%20this.items.length)%20%7B%0Athis.debounce('renderChunk'%2C%20this._requestRenderChunk)%3B%0A%7D%0A%7D%2C%0A_requestRenderChunk%3A%20function%20()%20%7B%0ArequestAnimationFrame(this._boundRenderChunk)%3B%0A%7D%2C%0A_renderChunk%3A%20function%20()%20%7B%0Avar%20currChunkTime%20%3D%20performance.now()%3B%0Avar%20ratio%20%3D%20this._targetFrameTime%20%2F%20(currChunkTime%20-%20this._lastChunkTime)%3B%0Athis._chunkCount%20%3D%20Math.round(this._chunkCount%20*%20ratio)%20%7C%7C%201%3B%0Athis._limit%20%2B%3D%20this._chunkCount%3B%0Athis._lastChunkTime%20%3D%20currChunkTime%3B%0Athis._debounceTemplate(this._render)%3B%0A%7D%2C%0A_observeChanged%3A%20function%20()%20%7B%0Athis._observePaths%20%3D%20this.observe%20%26%26%20this.observe.replace('.*'%2C%20'.').split('%20')%3B%0A%7D%2C%0A_itemsChanged%3A%20function%20(change)%20%7B%0Aif%20(change.path%20%3D%3D%20'items')%20%7B%0Aif%20(Array.isArray(this.items))%20%7B%0Athis.collection%20%3D%20Polymer.Collection.get(this.items)%3B%0A%7D%20else%20if%20(!this.items)%20%7B%0Athis.collection%20%3D%20null%3B%0A%7D%20else%20%7B%0Athis._error(this._logf('dom-repeat'%2C%20'expected%20array%20for%20%60items%60%2C'%20%2B%20'%20found'%2C%20this.items))%3B%0A%7D%0Athis._keySplices%20%3D%20%5B%5D%3B%0Athis._indexSplices%20%3D%20%5B%5D%3B%0Athis._needFullRefresh%20%3D%20true%3B%0Athis._initializeChunking()%3B%0Athis._debounceTemplate(this._render)%3B%0A%7D%20else%20if%20(change.path%20%3D%3D%20'items.splices')%20%7B%0Athis._keySplices%20%3D%20this._keySplices.concat(change.value.keySplices)%3B%0Athis._indexSplices%20%3D%20this._indexSplices.concat(change.value.indexSplices)%3B%0Athis._debounceTemplate(this._render)%3B%0A%7D%20else%20%7B%0Avar%20subpath%20%3D%20change.path.slice(6)%3B%0Athis._forwardItemPath(subpath%2C%20change.value)%3B%0Athis._checkObservedPaths(subpath)%3B%0A%7D%0A%7D%2C%0A_checkObservedPaths%3A%20function%20(path)%20%7B%0Aif%20(this._observePaths)%20%7B%0Apath%20%3D%20path.substring(path.indexOf('.')%20%2B%201)%3B%0Avar%20paths%20%3D%20this._observePaths%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20paths.length%3B%20i%2B%2B)%20%7B%0Aif%20(path.indexOf(paths%5Bi%5D)%20%3D%3D%3D%200)%20%7B%0Athis._needFullRefresh%20%3D%20true%3B%0Aif%20(this.delay)%20%7B%0Athis.debounce('render'%2C%20this._render%2C%20this.delay)%3B%0A%7D%20else%20%7B%0Athis._debounceTemplate(this._render)%3B%0A%7D%0Areturn%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0Arender%3A%20function%20()%20%7B%0Athis._needFullRefresh%20%3D%20true%3B%0Athis._debounceTemplate(this._render)%3B%0Athis._flushTemplates()%3B%0A%7D%2C%0A_render%3A%20function%20()%20%7B%0Aif%20(this._needFullRefresh)%20%7B%0Athis._applyFullRefresh()%3B%0Athis._needFullRefresh%20%3D%20false%3B%0A%7D%20else%20if%20(this._keySplices.length)%20%7B%0Aif%20(this._sortFn)%20%7B%0Athis._applySplicesUserSort(this._keySplices)%3B%0A%7D%20else%20%7B%0Aif%20(this._filterFn)%20%7B%0Athis._applyFullRefresh()%3B%0A%7D%20else%20%7B%0Athis._applySplicesArrayOrder(this._indexSplices)%3B%0A%7D%0A%7D%0A%7D%20else%20%7B%0A%7D%0Athis._keySplices%20%3D%20%5B%5D%3B%0Athis._indexSplices%20%3D%20%5B%5D%3B%0Avar%20keyToIdx%20%3D%20this._keyToInstIdx%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%20this._instances.length%20-%201%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Avar%20inst%20%3D%20this._instances%5Bi%5D%3B%0Aif%20(inst.isPlaceholder%20%26%26%20i%20%3C%20this._limit)%20%7B%0Ainst%20%3D%20this._insertInstance(i%2C%20inst.__key__)%3B%0A%7D%20else%20if%20(!inst.isPlaceholder%20%26%26%20i%20%3E%3D%20this._limit)%20%7B%0Ainst%20%3D%20this._downgradeInstance(i%2C%20inst.__key__)%3B%0A%7D%0AkeyToIdx%5Binst.__key__%5D%20%3D%20i%3B%0Aif%20(!inst.isPlaceholder)%20%7B%0Ainst.__setProperty(this.indexAs%2C%20i%2C%20true)%3B%0A%7D%0A%7D%0Athis._pool.length%20%3D%200%3B%0Athis._setRenderedItemCount(this._instances.length)%3B%0Athis.fire('dom-change')%3B%0Athis._tryRenderChunk()%3B%0A%7D%2C%0A_applyFullRefresh%3A%20function%20()%20%7B%0Avar%20c%20%3D%20this.collection%3B%0Avar%20keys%3B%0Aif%20(this._sortFn)%20%7B%0Akeys%20%3D%20c%20%3F%20c.getKeys()%20%3A%20%5B%5D%3B%0A%7D%20else%20%7B%0Akeys%20%3D%20%5B%5D%3B%0Avar%20items%20%3D%20this.items%3B%0Aif%20(items)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20items.length%3B%20i%2B%2B)%20%7B%0Akeys.push(c.getKey(items%5Bi%5D))%3B%0A%7D%0A%7D%0A%7D%0Avar%20self%20%3D%20this%3B%0Aif%20(this._filterFn)%20%7B%0Akeys%20%3D%20keys.filter(function%20(a)%20%7B%0Areturn%20self._filterFn(c.getItem(a))%3B%0A%7D)%3B%0A%7D%0Aif%20(this._sortFn)%20%7B%0Akeys.sort(function%20(a%2C%20b)%20%7B%0Areturn%20self._sortFn(c.getItem(a)%2C%20c.getItem(b))%3B%0A%7D)%3B%0A%7D%0Afor%20(i%20%3D%200%3B%20i%20%3C%20keys.length%3B%20i%2B%2B)%20%7B%0Avar%20key%20%3D%20keys%5Bi%5D%3B%0Avar%20inst%20%3D%20this._instances%5Bi%5D%3B%0Aif%20(inst)%20%7B%0Ainst.__key__%20%3D%20key%3B%0Aif%20(!inst.isPlaceholder%20%26%26%20i%20%3C%20this._limit)%20%7B%0Ainst.__setProperty(this.as%2C%20c.getItem(key)%2C%20true)%3B%0A%7D%0A%7D%20else%20if%20(i%20%3C%20this._limit)%20%7B%0Athis._insertInstance(i%2C%20key)%3B%0A%7D%20else%20%7B%0Athis._insertPlaceholder(i%2C%20key)%3B%0A%7D%0A%7D%0Afor%20(var%20j%20%3D%20this._instances.length%20-%201%3B%20j%20%3E%3D%20i%3B%20j--)%20%7B%0Athis._detachAndRemoveInstance(j)%3B%0A%7D%0A%7D%2C%0A_numericSort%3A%20function%20(a%2C%20b)%20%7B%0Areturn%20a%20-%20b%3B%0A%7D%2C%0A_applySplicesUserSort%3A%20function%20(splices)%20%7B%0Avar%20c%20%3D%20this.collection%3B%0Avar%20keyMap%20%3D%20%7B%7D%3B%0Avar%20key%3B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20s.removed.length%3B%20j%2B%2B)%20%7B%0Akey%20%3D%20s.removed%5Bj%5D%3B%0AkeyMap%5Bkey%5D%20%3D%20keyMap%5Bkey%5D%20%3F%20null%20%3A%20-1%3B%0A%7D%0Afor%20(j%20%3D%200%3B%20j%20%3C%20s.added.length%3B%20j%2B%2B)%20%7B%0Akey%20%3D%20s.added%5Bj%5D%3B%0AkeyMap%5Bkey%5D%20%3D%20keyMap%5Bkey%5D%20%3F%20null%20%3A%201%3B%0A%7D%0A%7D%0Avar%20removedIdxs%20%3D%20%5B%5D%3B%0Avar%20addedKeys%20%3D%20%5B%5D%3B%0Afor%20(key%20in%20keyMap)%20%7B%0Aif%20(keyMap%5Bkey%5D%20%3D%3D%3D%20-1)%20%7B%0AremovedIdxs.push(this._keyToInstIdx%5Bkey%5D)%3B%0A%7D%0Aif%20(keyMap%5Bkey%5D%20%3D%3D%3D%201)%20%7B%0AaddedKeys.push(key)%3B%0A%7D%0A%7D%0Aif%20(removedIdxs.length)%20%7B%0AremovedIdxs.sort(this._numericSort)%3B%0Afor%20(i%20%3D%20removedIdxs.length%20-%201%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Avar%20idx%20%3D%20removedIdxs%5Bi%5D%3B%0Aif%20(idx%20!%3D%3D%20undefined)%20%7B%0Athis._detachAndRemoveInstance(idx)%3B%0A%7D%0A%7D%0A%7D%0Avar%20self%20%3D%20this%3B%0Aif%20(addedKeys.length)%20%7B%0Aif%20(this._filterFn)%20%7B%0AaddedKeys%20%3D%20addedKeys.filter(function%20(a)%20%7B%0Areturn%20self._filterFn(c.getItem(a))%3B%0A%7D)%3B%0A%7D%0AaddedKeys.sort(function%20(a%2C%20b)%20%7B%0Areturn%20self._sortFn(c.getItem(a)%2C%20c.getItem(b))%3B%0A%7D)%3B%0Avar%20start%20%3D%200%3B%0Afor%20(i%20%3D%200%3B%20i%20%3C%20addedKeys.length%3B%20i%2B%2B)%20%7B%0Astart%20%3D%20this._insertRowUserSort(start%2C%20addedKeys%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0A_insertRowUserSort%3A%20function%20(start%2C%20key)%20%7B%0Avar%20c%20%3D%20this.collection%3B%0Avar%20item%20%3D%20c.getItem(key)%3B%0Avar%20end%20%3D%20this._instances.length%20-%201%3B%0Avar%20idx%20%3D%20-1%3B%0Awhile%20(start%20%3C%3D%20end)%20%7B%0Avar%20mid%20%3D%20start%20%2B%20end%20%3E%3E%201%3B%0Avar%20midKey%20%3D%20this._instances%5Bmid%5D.__key__%3B%0Avar%20cmp%20%3D%20this._sortFn(c.getItem(midKey)%2C%20item)%3B%0Aif%20(cmp%20%3C%200)%20%7B%0Astart%20%3D%20mid%20%2B%201%3B%0A%7D%20else%20if%20(cmp%20%3E%200)%20%7B%0Aend%20%3D%20mid%20-%201%3B%0A%7D%20else%20%7B%0Aidx%20%3D%20mid%3B%0Abreak%3B%0A%7D%0A%7D%0Aif%20(idx%20%3C%200)%20%7B%0Aidx%20%3D%20end%20%2B%201%3B%0A%7D%0Athis._insertPlaceholder(idx%2C%20key)%3B%0Areturn%20idx%3B%0A%7D%2C%0A_applySplicesArrayOrder%3A%20function%20(splices)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20s%3B%20i%20%3C%20splices.length%20%26%26%20(s%20%3D%20splices%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20s.removed.length%3B%20j%2B%2B)%20%7B%0Athis._detachAndRemoveInstance(s.index)%3B%0A%7D%0Afor%20(j%20%3D%200%3B%20j%20%3C%20s.addedKeys.length%3B%20j%2B%2B)%20%7B%0Athis._insertPlaceholder(s.index%20%2B%20j%2C%20s.addedKeys%5Bj%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0A_detachInstance%3A%20function%20(idx)%20%7B%0Avar%20inst%20%3D%20this._instances%5Bidx%5D%3B%0Aif%20(!inst.isPlaceholder)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20inst._children.length%3B%20i%2B%2B)%20%7B%0Avar%20el%20%3D%20inst._children%5Bi%5D%3B%0APolymer.dom(inst.root).appendChild(el)%3B%0A%7D%0Areturn%20inst%3B%0A%7D%0A%7D%2C%0A_attachInstance%3A%20function%20(idx%2C%20parent)%20%7B%0Avar%20inst%20%3D%20this._instances%5Bidx%5D%3B%0Aif%20(!inst.isPlaceholder)%20%7B%0Aparent.insertBefore(inst.root%2C%20this)%3B%0A%7D%0A%7D%2C%0A_detachAndRemoveInstance%3A%20function%20(idx)%20%7B%0Avar%20inst%20%3D%20this._detachInstance(idx)%3B%0Aif%20(inst)%20%7B%0Athis._pool.push(inst)%3B%0A%7D%0Athis._instances.splice(idx%2C%201)%3B%0A%7D%2C%0A_insertPlaceholder%3A%20function%20(idx%2C%20key)%20%7B%0Athis._instances.splice(idx%2C%200%2C%20%7B%0AisPlaceholder%3A%20true%2C%0A__key__%3A%20key%0A%7D)%3B%0A%7D%2C%0A_stampInstance%3A%20function%20(idx%2C%20key)%20%7B%0Avar%20model%20%3D%20%7B%20__key__%3A%20key%20%7D%3B%0Amodel%5Bthis.as%5D%20%3D%20this.collection.getItem(key)%3B%0Amodel%5Bthis.indexAs%5D%20%3D%20idx%3B%0Areturn%20this.stamp(model)%3B%0A%7D%2C%0A_insertInstance%3A%20function%20(idx%2C%20key)%20%7B%0Avar%20inst%20%3D%20this._pool.pop()%3B%0Aif%20(inst)%20%7B%0Ainst.__setProperty(this.as%2C%20this.collection.getItem(key)%2C%20true)%3B%0Ainst.__setProperty('__key__'%2C%20key%2C%20true)%3B%0A%7D%20else%20%7B%0Ainst%20%3D%20this._stampInstance(idx%2C%20key)%3B%0A%7D%0Avar%20beforeRow%20%3D%20this._instances%5Bidx%20%2B%201%5D%3B%0Avar%20beforeNode%20%3D%20beforeRow%20%26%26%20!beforeRow.isPlaceholder%20%3F%20beforeRow._children%5B0%5D%20%3A%20this%3B%0Avar%20parentNode%20%3D%20Polymer.dom(this).parentNode%3B%0APolymer.dom(parentNode).insertBefore(inst.root%2C%20beforeNode)%3B%0Athis._instances%5Bidx%5D%20%3D%20inst%3B%0Areturn%20inst%3B%0A%7D%2C%0A_downgradeInstance%3A%20function%20(idx%2C%20key)%20%7B%0Avar%20inst%20%3D%20this._detachInstance(idx)%3B%0Aif%20(inst)%20%7B%0Athis._pool.push(inst)%3B%0A%7D%0Ainst%20%3D%20%7B%0AisPlaceholder%3A%20true%2C%0A__key__%3A%20key%0A%7D%3B%0Athis._instances%5Bidx%5D%20%3D%20inst%3B%0Areturn%20inst%3B%0A%7D%2C%0A_showHideChildren%3A%20function%20(hidden)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._instances.length%3B%20i%2B%2B)%20%7B%0Athis._instances%5Bi%5D._showHideChildren(hidden)%3B%0A%7D%0A%7D%2C%0A_forwardInstanceProp%3A%20function%20(inst%2C%20prop%2C%20value)%20%7B%0Aif%20(prop%20%3D%3D%20this.as)%20%7B%0Avar%20idx%3B%0Aif%20(this._sortFn%20%7C%7C%20this._filterFn)%20%7B%0Aidx%20%3D%20this.items.indexOf(this.collection.getItem(inst.__key__))%3B%0A%7D%20else%20%7B%0Aidx%20%3D%20inst%5Bthis.indexAs%5D%3B%0A%7D%0Athis.set('items.'%20%2B%20idx%2C%20value)%3B%0A%7D%0A%7D%2C%0A_forwardInstancePath%3A%20function%20(inst%2C%20path%2C%20value)%20%7B%0Aif%20(path.indexOf(this.as%20%2B%20'.')%20%3D%3D%3D%200)%20%7B%0Athis._notifyPath('items.'%20%2B%20inst.__key__%20%2B%20'.'%20%2B%20path.slice(this.as.length%20%2B%201)%2C%20value)%3B%0A%7D%0A%7D%2C%0A_forwardParentProp%3A%20function%20(prop%2C%20value)%20%7B%0Avar%20i%24%20%3D%20this._instances%3B%0Afor%20(var%20i%20%3D%200%2C%20inst%3B%20i%20%3C%20i%24.length%20%26%26%20(inst%20%3D%20i%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!inst.isPlaceholder)%20%7B%0Ainst.__setProperty(prop%2C%20value%2C%20true)%3B%0A%7D%0A%7D%0A%7D%2C%0A_forwardParentPath%3A%20function%20(path%2C%20value)%20%7B%0Avar%20i%24%20%3D%20this._instances%3B%0Afor%20(var%20i%20%3D%200%2C%20inst%3B%20i%20%3C%20i%24.length%20%26%26%20(inst%20%3D%20i%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!inst.isPlaceholder)%20%7B%0Ainst._notifyPath(path%2C%20value%2C%20true)%3B%0A%7D%0A%7D%0A%7D%2C%0A_forwardItemPath%3A%20function%20(path%2C%20value)%20%7B%0Aif%20(this._keyToInstIdx)%20%7B%0Avar%20dot%20%3D%20path.indexOf('.')%3B%0Avar%20key%20%3D%20path.substring(0%2C%20dot%20%3C%200%20%3F%20path.length%20%3A%20dot)%3B%0Avar%20idx%20%3D%20this._keyToInstIdx%5Bkey%5D%3B%0Avar%20inst%20%3D%20this._instances%5Bidx%5D%3B%0Aif%20(inst%20%26%26%20!inst.isPlaceholder)%20%7B%0Aif%20(dot%20%3E%3D%200)%20%7B%0Apath%20%3D%20this.as%20%2B%20'.'%20%2B%20path.substring(dot%20%2B%201)%3B%0Ainst._notifyPath(path%2C%20value%2C%20true)%3B%0A%7D%20else%20%7B%0Ainst.__setProperty(this.as%2C%20value%2C%20true)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0AitemForElement%3A%20function%20(el)%20%7B%0Avar%20instance%20%3D%20this.modelForElement(el)%3B%0Areturn%20instance%20%26%26%20instance%5Bthis.as%5D%3B%0A%7D%2C%0AkeyForElement%3A%20function%20(el)%20%7B%0Avar%20instance%20%3D%20this.modelForElement(el)%3B%0Areturn%20instance%20%26%26%20instance.__key__%3B%0A%7D%2C%0AindexForElement%3A%20function%20(el)%20%7B%0Avar%20instance%20%3D%20this.modelForElement(el)%3B%0Areturn%20instance%20%26%26%20instance%5Bthis.indexAs%5D%3B%0A%7D%0A%7D)%3B%0APolymer(%7B%0Ais%3A%20'array-selector'%2C%0A_template%3A%20null%2C%0Aproperties%3A%20%7B%0Aitems%3A%20%7B%0Atype%3A%20Array%2C%0Aobserver%3A%20'clearSelection'%0A%7D%2C%0Amulti%3A%20%7B%0Atype%3A%20Boolean%2C%0Avalue%3A%20false%2C%0Aobserver%3A%20'clearSelection'%0A%7D%2C%0Aselected%3A%20%7B%0Atype%3A%20Object%2C%0Anotify%3A%20true%0A%7D%2C%0AselectedItem%3A%20%7B%0Atype%3A%20Object%2C%0Anotify%3A%20true%0A%7D%2C%0Atoggle%3A%20%7B%0Atype%3A%20Boolean%2C%0Avalue%3A%20false%0A%7D%0A%7D%2C%0AclearSelection%3A%20function%20()%20%7B%0Aif%20(Array.isArray(this.selected))%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.selected.length%3B%20i%2B%2B)%20%7B%0Athis.unlinkPaths('selected.'%20%2B%20i)%3B%0A%7D%0A%7D%20else%20%7B%0Athis.unlinkPaths('selected')%3B%0Athis.unlinkPaths('selectedItem')%3B%0A%7D%0Aif%20(this.multi)%20%7B%0Aif%20(!this.selected%20%7C%7C%20this.selected.length)%20%7B%0Athis.selected%20%3D%20%5B%5D%3B%0Athis._selectedColl%20%3D%20Polymer.Collection.get(this.selected)%3B%0A%7D%0A%7D%20else%20%7B%0Athis.selected%20%3D%20null%3B%0Athis._selectedColl%20%3D%20null%3B%0A%7D%0Athis.selectedItem%20%3D%20null%3B%0A%7D%2C%0AisSelected%3A%20function%20(item)%20%7B%0Aif%20(this.multi)%20%7B%0Areturn%20this._selectedColl.getKey(item)%20!%3D%3D%20undefined%3B%0A%7D%20else%20%7B%0Areturn%20this.selected%20%3D%3D%20item%3B%0A%7D%0A%7D%2C%0Adeselect%3A%20function%20(item)%20%7B%0Aif%20(this.multi)%20%7B%0Aif%20(this.isSelected(item))%20%7B%0Avar%20skey%20%3D%20this._selectedColl.getKey(item)%3B%0Athis.arrayDelete('selected'%2C%20item)%3B%0Athis.unlinkPaths('selected.'%20%2B%20skey)%3B%0A%7D%0A%7D%20else%20%7B%0Athis.selected%20%3D%20null%3B%0Athis.selectedItem%20%3D%20null%3B%0Athis.unlinkPaths('selected')%3B%0Athis.unlinkPaths('selectedItem')%3B%0A%7D%0A%7D%2C%0Aselect%3A%20function%20(item)%20%7B%0Avar%20icol%20%3D%20Polymer.Collection.get(this.items)%3B%0Avar%20key%20%3D%20icol.getKey(item)%3B%0Aif%20(this.multi)%20%7B%0Aif%20(this.isSelected(item))%20%7B%0Aif%20(this.toggle)%20%7B%0Athis.deselect(item)%3B%0A%7D%0A%7D%20else%20%7B%0Athis.push('selected'%2C%20item)%3B%0Avar%20skey%20%3D%20this._selectedColl.getKey(item)%3B%0Athis.linkPaths('selected.'%20%2B%20skey%2C%20'items.'%20%2B%20key)%3B%0A%7D%0A%7D%20else%20%7B%0Aif%20(this.toggle%20%26%26%20item%20%3D%3D%20this.selected)%20%7B%0Athis.deselect()%3B%0A%7D%20else%20%7B%0Athis.selected%20%3D%20item%3B%0Athis.selectedItem%20%3D%20item%3B%0Athis.linkPaths('selected'%2C%20'items.'%20%2B%20key)%3B%0Athis.linkPaths('selectedItem'%2C%20'items.'%20%2B%20key)%3B%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer(%7B%0Ais%3A%20'dom-if'%2C%0Aextends%3A%20'template'%2C%0A_template%3A%20null%2C%0Aproperties%3A%20%7B%0A'if'%3A%20%7B%0Atype%3A%20Boolean%2C%0Avalue%3A%20false%2C%0Aobserver%3A%20'_queueRender'%0A%7D%2C%0Arestamp%3A%20%7B%0Atype%3A%20Boolean%2C%0Avalue%3A%20false%2C%0Aobserver%3A%20'_queueRender'%0A%7D%0A%7D%2C%0Abehaviors%3A%20%5BPolymer.Templatizer%5D%2C%0A_queueRender%3A%20function%20()%20%7B%0Athis._debounceTemplate(this._render)%3B%0A%7D%2C%0Adetached%3A%20function%20()%20%7B%0Aif%20(!this.parentNode%20%7C%7C%20this.parentNode.nodeType%20%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE%20%26%26%20(!Polymer.Settings.hasShadow%20%7C%7C%20!(this.parentNode%20instanceof%20ShadowRoot)))%20%7B%0Athis._teardownInstance()%3B%0A%7D%0A%7D%2C%0Aattached%3A%20function%20()%20%7B%0Aif%20(this.if%20%26%26%20this.ctor)%20%7B%0Athis.async(this._ensureInstance)%3B%0A%7D%0A%7D%2C%0Arender%3A%20function%20()%20%7B%0Athis._flushTemplates()%3B%0A%7D%2C%0A_render%3A%20function%20()%20%7B%0Aif%20(this.if)%20%7B%0Aif%20(!this.ctor)%20%7B%0Athis.templatize(this)%3B%0A%7D%0Athis._ensureInstance()%3B%0Athis._showHideChildren()%3B%0A%7D%20else%20if%20(this.restamp)%20%7B%0Athis._teardownInstance()%3B%0A%7D%0Aif%20(!this.restamp%20%26%26%20this._instance)%20%7B%0Athis._showHideChildren()%3B%0A%7D%0Aif%20(this.if%20!%3D%20this._lastIf)%20%7B%0Athis.fire('dom-change')%3B%0Athis._lastIf%20%3D%20this.if%3B%0A%7D%0A%7D%2C%0A_ensureInstance%3A%20function%20()%20%7B%0Avar%20parentNode%20%3D%20Polymer.dom(this).parentNode%3B%0Aif%20(parentNode)%20%7B%0Avar%20parent%20%3D%20Polymer.dom(parentNode)%3B%0Aif%20(!this._instance)%20%7B%0Athis._instance%20%3D%20this.stamp()%3B%0Avar%20root%20%3D%20this._instance.root%3B%0Aparent.insertBefore(root%2C%20this)%3B%0A%7D%20else%20%7B%0Avar%20c%24%20%3D%20this._instance._children%3B%0Aif%20(c%24%20%26%26%20c%24.length)%20%7B%0Avar%20lastChild%20%3D%20Polymer.dom(this).previousSibling%3B%0Aif%20(lastChild%20!%3D%3D%20c%24%5Bc%24.length%20-%201%5D)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20c%24.length%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparent.insertBefore(n%2C%20this)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_teardownInstance%3A%20function%20()%20%7B%0Aif%20(this._instance)%20%7B%0Avar%20c%24%20%3D%20this._instance._children%3B%0Aif%20(c%24%20%26%26%20c%24.length)%20%7B%0Avar%20parent%20%3D%20Polymer.dom(Polymer.dom(c%24%5B0%5D).parentNode)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20c%24.length%20%26%26%20(n%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aparent.removeChild(n)%3B%0A%7D%0A%7D%0Athis._instance%20%3D%20null%3B%0A%7D%0A%7D%2C%0A_showHideChildren%3A%20function%20()%20%7B%0Avar%20hidden%20%3D%20this.__hideTemplateChildren__%20%7C%7C%20!this.if%3B%0Aif%20(this._instance)%20%7B%0Athis._instance._showHideChildren(hidden)%3B%0A%7D%0A%7D%2C%0A_forwardParentProp%3A%20function%20(prop%2C%20value)%20%7B%0Aif%20(this._instance)%20%7B%0Athis._instance%5Bprop%5D%20%3D%20value%3B%0A%7D%0A%7D%2C%0A_forwardParentPath%3A%20function%20(path%2C%20value)%20%7B%0Aif%20(this._instance)%20%7B%0Athis._instance._notifyPath(path%2C%20value%2C%20true)%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer(%7B%0Ais%3A%20'dom-bind'%2C%0Aextends%3A%20'template'%2C%0A_template%3A%20null%2C%0Acreated%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0APolymer.RenderStatus.whenReady(function%20()%20%7B%0Aif%20(document.readyState%20%3D%3D%20'loading')%20%7B%0Adocument.addEventListener('DOMContentLoaded'%2C%20function%20()%20%7B%0Aself._markImportsReady()%3B%0A%7D)%3B%0A%7D%20else%20%7B%0Aself._markImportsReady()%3B%0A%7D%0A%7D)%3B%0A%7D%2C%0A_ensureReady%3A%20function%20()%20%7B%0Aif%20(!this._readied)%20%7B%0Athis._readySelf()%3B%0A%7D%0A%7D%2C%0A_markImportsReady%3A%20function%20()%20%7B%0Athis._importsReady%20%3D%20true%3B%0Athis._ensureReady()%3B%0A%7D%2C%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepConstructor()%3B%0A%7D%2C%0A_insertChildren%3A%20function%20()%20%7B%0Avar%20parentDom%20%3D%20Polymer.dom(Polymer.dom(this).parentNode)%3B%0AparentDom.insertBefore(this.root%2C%20this)%3B%0A%7D%2C%0A_removeChildren%3A%20function%20()%20%7B%0Aif%20(this._children)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._children.length%3B%20i%2B%2B)%20%7B%0Athis.root.appendChild(this._children%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0A%7D%2C%0A_scopeElementClass%3A%20function%20(element%2C%20selector)%20%7B%0Aif%20(this.dataHost)%20%7B%0Areturn%20this.dataHost._scopeElementClass(element%2C%20selector)%3B%0A%7D%20else%20%7B%0Areturn%20selector%3B%0A%7D%0A%7D%2C%0A_prepConfigure%3A%20function%20()%20%7B%0Avar%20config%20%3D%20%7B%7D%3B%0Afor%20(var%20prop%20in%20this._propertyEffects)%20%7B%0Aconfig%5Bprop%5D%20%3D%20this%5Bprop%5D%3B%0A%7D%0Avar%20setupConfigure%20%3D%20this._setupConfigure%3B%0Athis._setupConfigure%20%3D%20function%20()%20%7B%0AsetupConfigure.call(this%2C%20config)%3B%0A%7D%3B%0A%7D%2C%0Aattached%3A%20function%20()%20%7B%0Aif%20(this._importsReady)%20%7B%0Athis.render()%3B%0A%7D%0A%7D%2C%0Adetached%3A%20function%20()%20%7B%0Athis._removeChildren()%3B%0A%7D%2C%0Arender%3A%20function%20()%20%7B%0Athis._ensureReady()%3B%0Aif%20(!this._children)%20%7B%0Athis._template%20%3D%20this%3B%0Athis._prepAnnotations()%3B%0Athis._prepEffects()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConfigure()%3B%0Athis._prepBindings()%3B%0Athis._prepPropertyInfo()%3B%0APolymer.Base._initFeatures.call(this)%3B%0Athis._children%20%3D%20Polymer.TreeApi.arrayCopyChildNodes(this.root)%3B%0A%7D%0Athis._insertChildren()%3B%0Athis.fire('dom-change')%3B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer.html.js%0A:3534 in _initFeatures data:text/javascript;charset=utf-8,(function%20()%20%7B%0Afunction%20resolve()%20%7B%0Adocument.body.removeAttribute('unresolved')%3B%0A%7D%0Aif%20(window.WebComponents)%20%7B%0AaddEventListener('WebComponentsReady'%2C%20resolve)%3B%0A%7D%20else%20%7B%0Aif%20(document.readyState%20%3D%3D%3D%20'interactive'%20%7C%7C%20document.readyState%20%3D%3D%3D%20'complete')%20%7B%0Aresolve()%3B%0A%7D%20else%20%7B%0AaddEventListener('DOMContentLoaded'%2C%20resolve)%3B%0A%7D%0A%7D%0A%7D())%3B%0Awindow.Polymer%20%3D%20%7B%0ASettings%3A%20function%20()%20%7B%0Avar%20user%20%3D%20window.Polymer%20%7C%7C%20%7B%7D%3B%0Avar%20parts%20%3D%20location.search.slice(1).split('%26')%3B%0Afor%20(var%20i%20%3D%200%2C%20o%3B%20i%20%3C%20parts.length%20%26%26%20(o%20%3D%20parts%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Ao%20%3D%20o.split('%3D')%3B%0Ao%5B0%5D%20%26%26%20(user%5Bo%5B0%5D%5D%20%3D%20o%5B1%5D%20%7C%7C%20true)%3B%0A%7D%0Avar%20wantShadow%20%3D%20user.dom%20%3D%3D%3D%20'shadow'%3B%0Avar%20hasShadow%20%3D%20Boolean(Element.prototype.createShadowRoot)%3B%0Avar%20nativeShadow%20%3D%20hasShadow%20%26%26%20!window.ShadowDOMPolyfill%3B%0Avar%20useShadow%20%3D%20wantShadow%20%26%26%20hasShadow%3B%0Avar%20hasNativeImports%20%3D%20Boolean('import'%20in%20document.createElement('link'))%3B%0Avar%20useNativeImports%20%3D%20hasNativeImports%3B%0Avar%20useNativeCustomElements%20%3D%20!window.CustomElements%20%7C%7C%20window.CustomElements.useNative%3B%0Avar%20usePolyfillProto%20%3D%20!useNativeCustomElements%20%26%26%20!Object.__proto__%3B%0Areturn%20%7B%0AwantShadow%3A%20wantShadow%2C%0AhasShadow%3A%20hasShadow%2C%0AnativeShadow%3A%20nativeShadow%2C%0AuseShadow%3A%20useShadow%2C%0AuseNativeShadow%3A%20useShadow%20%26%26%20nativeShadow%2C%0AuseNativeImports%3A%20useNativeImports%2C%0AuseNativeCustomElements%3A%20useNativeCustomElements%2C%0AusePolyfillProto%3A%20usePolyfillProto%0A%7D%3B%0A%7D()%0A%7D%3B%0A(function%20()%20%7B%0Avar%20userPolymer%20%3D%20window.Polymer%3B%0Awindow.Polymer%20%3D%20function%20(prototype)%20%7B%0Aif%20(typeof%20prototype%20%3D%3D%3D%20'function')%20%7B%0Aprototype%20%3D%20prototype.prototype%3B%0A%7D%0Aif%20(!prototype)%20%7B%0Aprototype%20%3D%20%7B%7D%3B%0A%7D%0Avar%20factory%20%3D%20desugar(prototype)%3B%0Aprototype%20%3D%20factory.prototype%3B%0Avar%20options%20%3D%20%7B%20prototype%3A%20prototype%20%7D%3B%0Aif%20(prototype.extends)%20%7B%0Aoptions.extends%20%3D%20prototype.extends%3B%0A%7D%0APolymer.telemetry._registrate(prototype)%3B%0Adocument.registerElement(prototype.is%2C%20options)%3B%0Areturn%20factory%3B%0A%7D%3B%0Avar%20desugar%20%3D%20function%20(prototype)%20%7B%0Avar%20base%20%3D%20Polymer.Base%3B%0Aif%20(prototype.extends)%20%7B%0Abase%20%3D%20Polymer.Base._getExtendedPrototype(prototype.extends)%3B%0A%7D%0Aprototype%20%3D%20Polymer.Base.chainObject(prototype%2C%20base)%3B%0Aprototype.registerCallback()%3B%0Areturn%20prototype.constructor%3B%0A%7D%3B%0Aif%20(userPolymer)%20%7B%0Afor%20(var%20i%20in%20userPolymer)%20%7B%0APolymer%5Bi%5D%20%3D%20userPolymer%5Bi%5D%3B%0A%7D%0A%7D%0APolymer.Class%20%3D%20desugar%3B%0A%7D())%3B%0APolymer.telemetry%20%3D%20%7B%0Aregistrations%3A%20%5B%5D%2C%0A_regLog%3A%20function%20(prototype)%20%7B%0Aconsole.log('%5B'%20%2B%20prototype.is%20%2B%20'%5D%3A%20registered')%3B%0A%7D%2C%0A_registrate%3A%20function%20(prototype)%20%7B%0Athis.registrations.push(prototype)%3B%0APolymer.log%20%26%26%20this._regLog(prototype)%3B%0A%7D%2C%0AdumpRegistrations%3A%20function%20()%20%7B%0Athis.registrations.forEach(this._regLog)%3B%0A%7D%0A%7D%3B%0AObject.defineProperty(window%2C%20'currentImport'%2C%20%7B%0Aenumerable%3A%20true%2C%0Aconfigurable%3A%20true%2C%0Aget%3A%20function%20()%20%7B%0Areturn%20(document._currentScript%20%7C%7C%20document.currentScript).ownerDocument%3B%0A%7D%0A%7D)%3B%0APolymer.RenderStatus%20%3D%20%7B%0A_ready%3A%20false%2C%0A_callbacks%3A%20%5B%5D%2C%0AwhenReady%3A%20function%20(cb)%20%7B%0Aif%20(this._ready)%20%7B%0Acb()%3B%0A%7D%20else%20%7B%0Athis._callbacks.push(cb)%3B%0A%7D%0A%7D%2C%0A_makeReady%3A%20function%20()%20%7B%0Athis._ready%20%3D%20true%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._callbacks.length%3B%20i%2B%2B)%20%7B%0Athis._callbacks%5Bi%5D()%3B%0A%7D%0Athis._callbacks%20%3D%20%5B%5D%3B%0A%7D%2C%0A_catchFirstRender%3A%20function%20()%20%7B%0ArequestAnimationFrame(function%20()%20%7B%0APolymer.RenderStatus._makeReady()%3B%0A%7D)%3B%0A%7D%2C%0A_afterNextRenderQueue%3A%20%5B%5D%2C%0A_waitingNextRender%3A%20false%2C%0AafterNextRender%3A%20function%20(element%2C%20fn%2C%20args)%20%7B%0Athis._watchNextRender()%3B%0Athis._afterNextRenderQueue.push(%5B%0Aelement%2C%0Afn%2C%0Aargs%0A%5D)%3B%0A%7D%2C%0A_watchNextRender%3A%20function%20()%20%7B%0Aif%20(!this._waitingNextRender)%20%7B%0Athis._waitingNextRender%20%3D%20true%3B%0Avar%20fn%20%3D%20function%20()%20%7B%0APolymer.RenderStatus._flushNextRender()%3B%0A%7D%3B%0Aif%20(!this._ready)%20%7B%0Athis.whenReady(fn)%3B%0A%7D%20else%20%7B%0ArequestAnimationFrame(fn)%3B%0A%7D%0A%7D%0A%7D%2C%0A_flushNextRender%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0AsetTimeout(function%20()%20%7B%0Aself._flushRenderCallbacks(self._afterNextRenderQueue)%3B%0Aself._afterNextRenderQueue%20%3D%20%5B%5D%3B%0Aself._waitingNextRender%20%3D%20false%3B%0A%7D)%3B%0A%7D%2C%0A_flushRenderCallbacks%3A%20function%20(callbacks)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20h%3B%20i%20%3C%20callbacks.length%3B%20i%2B%2B)%20%7B%0Ah%20%3D%20callbacks%5Bi%5D%3B%0Ah%5B1%5D.apply(h%5B0%5D%2C%20h%5B2%5D%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%0A%7D%3B%0Aif%20(window.HTMLImports)%20%7B%0AHTMLImports.whenReady(function%20()%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D)%3B%0A%7D%20else%20%7B%0APolymer.RenderStatus._catchFirstRender()%3B%0A%7D%0APolymer.ImportStatus%20%3D%20Polymer.RenderStatus%3B%0APolymer.ImportStatus.whenLoaded%20%3D%20Polymer.ImportStatus.whenReady%3B%0APolymer.Base%20%3D%20%7B%0A__isPolymerInstance__%3A%20true%2C%0A_addFeature%3A%20function%20(feature)%20%7B%0Athis.extend(this%2C%20feature)%3B%0A%7D%2C%0AregisterCallback%3A%20function%20()%20%7B%0Athis._desugarBehaviors()%3B%0Athis._doBehavior('beforeRegister')%3B%0Athis._registerFeatures()%3B%0Athis._doBehavior('registered')%3B%0A%7D%2C%0AcreatedCallback%3A%20function%20()%20%7B%0APolymer.telemetry.instanceCount%2B%2B%3B%0Athis.root%20%3D%20this%3B%0Athis._doBehavior('created')%3B%0Athis._initFeatures()%3B%0A%7D%2C%0AattachedCallback%3A%20function%20()%20%7B%0Avar%20self%20%3D%20this%3B%0APolymer.RenderStatus.whenReady(function%20()%20%7B%0Aself.isAttached%20%3D%20true%3B%0Aself._doBehavior('attached')%3B%0A%7D)%3B%0A%7D%2C%0AdetachedCallback%3A%20function%20()%20%7B%0Athis.isAttached%20%3D%20false%3B%0Athis._doBehavior('detached')%3B%0A%7D%2C%0AattributeChangedCallback%3A%20function%20(name%2C%20oldValue%2C%20newValue)%20%7B%0Athis._attributeChangedImpl(name)%3B%0Athis._doBehavior('attributeChanged'%2C%20%5B%0Aname%2C%0AoldValue%2C%0AnewValue%0A%5D)%3B%0A%7D%2C%0A_attributeChangedImpl%3A%20function%20(name)%20%7B%0Athis._setAttributeToProperty(this%2C%20name)%3B%0A%7D%2C%0Aextend%3A%20function%20(prototype%2C%20api)%20%7B%0Aif%20(prototype%20%26%26%20api)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(api)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Athis.copyOwnProperty(n%2C%20api%2C%20prototype)%3B%0A%7D%0A%7D%0Areturn%20prototype%20%7C%7C%20api%3B%0A%7D%2C%0Amixin%3A%20function%20(target%2C%20source)%20%7B%0Afor%20(var%20i%20in%20source)%20%7B%0Atarget%5Bi%5D%20%3D%20source%5Bi%5D%3B%0A%7D%0Areturn%20target%3B%0A%7D%2C%0AcopyOwnProperty%3A%20function%20(name%2C%20source%2C%20target)%20%7B%0Avar%20pd%20%3D%20Object.getOwnPropertyDescriptor(source%2C%20name)%3B%0Aif%20(pd)%20%7B%0AObject.defineProperty(target%2C%20name%2C%20pd)%3B%0A%7D%0A%7D%2C%0A_log%3A%20console.log.apply.bind(console.log%2C%20console)%2C%0A_warn%3A%20console.warn.apply.bind(console.warn%2C%20console)%2C%0A_error%3A%20console.error.apply.bind(console.error%2C%20console)%2C%0A_logf%3A%20function%20()%20%7B%0Areturn%20this._logPrefix.concat(%5Bthis.is%5D).concat(Array.prototype.slice.call(arguments%2C%200))%3B%0A%7D%0A%7D%3B%0APolymer.Base._logPrefix%20%3D%20function%20()%20%7B%0Avar%20color%20%3D%20window.chrome%20%7C%7C%20%2Ffirefox%2Fi.test(navigator.userAgent)%3B%0Areturn%20color%20%3F%20%5B%0A'%25c%5B%25s%3A%3A%25s%5D%3A'%2C%0A'font-weight%3A%20bold%3B%20background-color%3A%23EEEE00%3B'%0A%5D%20%3A%20%5B'%5B%25s%3A%3A%25s%5D%3A'%5D%3B%0A%7D()%3B%0APolymer.Base.chainObject%20%3D%20function%20(object%2C%20inherited)%20%7B%0Aif%20(object%20%26%26%20inherited%20%26%26%20object%20!%3D%3D%20inherited)%20%7B%0Aif%20(!Object.__proto__)%20%7B%0Aobject%20%3D%20Polymer.Base.extend(Object.create(inherited)%2C%20object)%3B%0A%7D%0Aobject.__proto__%20%3D%20inherited%3B%0A%7D%0Areturn%20object%3B%0A%7D%3B%0APolymer.Base%20%3D%20Polymer.Base.chainObject(Polymer.Base%2C%20HTMLElement.prototype)%3B%0Aif%20(window.CustomElements)%20%7B%0APolymer.instanceof%20%3D%20CustomElements.instanceof%3B%0A%7D%20else%20%7B%0APolymer.instanceof%20%3D%20function%20(obj%2C%20ctor)%20%7B%0Areturn%20obj%20instanceof%20ctor%3B%0A%7D%3B%0A%7D%0APolymer.isInstance%20%3D%20function%20(obj)%20%7B%0Areturn%20Boolean(obj%20%26%26%20obj.__isPolymerInstance__)%3B%0A%7D%3B%0APolymer.telemetry.instanceCount%20%3D%200%3B%0A(function%20()%20%7B%0Avar%20modules%20%3D%20%7B%7D%3B%0Avar%20lcModules%20%3D%20%7B%7D%3B%0Avar%20findModule%20%3D%20function%20(id)%20%7B%0Areturn%20modules%5Bid%5D%20%7C%7C%20lcModules%5Bid.toLowerCase()%5D%3B%0A%7D%3B%0Avar%20DomModule%20%3D%20function%20()%20%7B%0Areturn%20document.createElement('dom-module')%3B%0A%7D%3B%0ADomModule.prototype%20%3D%20Object.create(HTMLElement.prototype)%3B%0APolymer.Base.extend(DomModule.prototype%2C%20%7B%0Aconstructor%3A%20DomModule%2C%0AcreatedCallback%3A%20function%20()%20%7B%0Athis.register()%3B%0A%7D%2C%0Aregister%3A%20function%20(id)%20%7B%0Aid%20%3D%20id%20%7C%7C%20this.id%20%7C%7C%20this.getAttribute('name')%20%7C%7C%20this.getAttribute('is')%3B%0Aif%20(id)%20%7B%0Athis.id%20%3D%20id%3B%0Amodules%5Bid%5D%20%3D%20this%3B%0AlcModules%5Bid.toLowerCase()%5D%20%3D%20this%3B%0A%7D%0A%7D%2C%0Aimport%3A%20function%20(id%2C%20selector)%20%7B%0Aif%20(id)%20%7B%0Avar%20m%20%3D%20findModule(id)%3B%0Aif%20(!m)%20%7B%0AforceDomModulesUpgrade()%3B%0Am%20%3D%20findModule(id)%3B%0A%7D%0Aif%20(m%20%26%26%20selector)%20%7B%0Am%20%3D%20m.querySelector(selector)%3B%0A%7D%0Areturn%20m%3B%0A%7D%0A%7D%0A%7D)%3B%0Avar%20cePolyfill%20%3D%20window.CustomElements%20%26%26%20!CustomElements.useNative%3B%0Adocument.registerElement('dom-module'%2C%20DomModule)%3B%0Afunction%20forceDomModulesUpgrade()%20%7B%0Aif%20(cePolyfill)%20%7B%0Avar%20script%20%3D%20document._currentScript%20%7C%7C%20document.currentScript%3B%0Avar%20doc%20%3D%20script%20%26%26%20script.ownerDocument%20%7C%7C%20document%3B%0Avar%20modules%20%3D%20doc.querySelectorAll('dom-module')%3B%0Afor%20(var%20i%20%3D%20modules.length%20-%201%2C%20m%3B%20i%20%3E%3D%200%20%26%26%20(m%20%3D%20modules%5Bi%5D)%3B%20i--)%20%7B%0Aif%20(m.__upgraded__)%20%7B%0Areturn%3B%0A%7D%20else%20%7B%0ACustomElements.upgrade(m)%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D())%3B%0APolymer.Base._addFeature(%7B%0A_prepIs%3A%20function%20()%20%7B%0Aif%20(!this.is)%20%7B%0Avar%20module%20%3D%20(document._currentScript%20%7C%7C%20document.currentScript).parentNode%3B%0Aif%20(module.localName%20%3D%3D%3D%20'dom-module')%20%7B%0Avar%20id%20%3D%20module.id%20%7C%7C%20module.getAttribute('name')%20%7C%7C%20module.getAttribute('is')%3B%0Athis.is%20%3D%20id%3B%0A%7D%0A%7D%0Aif%20(this.is)%20%7B%0Athis.is%20%3D%20this.is.toLowerCase()%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0Abehaviors%3A%20%5B%5D%2C%0A_desugarBehaviors%3A%20function%20()%20%7B%0Aif%20(this.behaviors.length)%20%7B%0Athis.behaviors%20%3D%20this._desugarSomeBehaviors(this.behaviors)%3B%0A%7D%0A%7D%2C%0A_desugarSomeBehaviors%3A%20function%20(behaviors)%20%7B%0Avar%20behaviorSet%20%3D%20%5B%5D%3B%0Abehaviors%20%3D%20this._flattenBehaviorsList(behaviors)%3B%0Afor%20(var%20i%20%3D%20behaviors.length%20-%201%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(behaviorSet.indexOf(b)%20%3D%3D%3D%20-1)%20%7B%0Athis._mixinBehavior(b)%3B%0AbehaviorSet.unshift(b)%3B%0A%7D%0A%7D%0Areturn%20behaviorSet%3B%0A%7D%2C%0A_flattenBehaviorsList%3A%20function%20(behaviors)%20%7B%0Avar%20flat%20%3D%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20behaviors.length%3B%20i%2B%2B)%20%7B%0Avar%20b%20%3D%20behaviors%5Bi%5D%3B%0Aif%20(b%20instanceof%20Array)%20%7B%0Aflat%20%3D%20flat.concat(this._flattenBehaviorsList(b))%3B%0A%7D%20else%20if%20(b)%20%7B%0Aflat.push(b)%3B%0A%7D%20else%20%7B%0Athis._warn(this._logf('_flattenBehaviorsList'%2C%20'behavior%20is%20null%2C%20check%20for%20missing%20or%20404%20import'))%3B%0A%7D%0A%7D%0Areturn%20flat%3B%0A%7D%2C%0A_mixinBehavior%3A%20function%20(b)%20%7B%0Avar%20n%24%20%3D%20Object.getOwnPropertyNames(b)%3B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20n%24.length%20%26%26%20(n%20%3D%20n%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(!Polymer.Base._behaviorProperties%5Bn%5D%20%26%26%20!this.hasOwnProperty(n))%20%7B%0Athis.copyOwnProperty(n%2C%20b%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_prepBehaviors%3A%20function%20()%20%7B%0Athis._prepFlattenedBehaviors(this.behaviors)%3B%0A%7D%2C%0A_prepFlattenedBehaviors%3A%20function%20(behaviors)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20behaviors.length%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Athis._prepBehavior(behaviors%5Bi%5D)%3B%0A%7D%0Athis._prepBehavior(this)%3B%0A%7D%2C%0A_doBehavior%3A%20function%20(name%2C%20args)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._invokeBehavior(this.behaviors%5Bi%5D%2C%20name%2C%20args)%3B%0A%7D%0Athis._invokeBehavior(this%2C%20name%2C%20args)%3B%0A%7D%2C%0A_invokeBehavior%3A%20function%20(b%2C%20name%2C%20args)%20%7B%0Avar%20fn%20%3D%20b%5Bname%5D%3B%0Aif%20(fn)%20%7B%0Afn.apply(this%2C%20args%20%7C%7C%20Polymer.nar)%3B%0A%7D%0A%7D%2C%0A_marshalBehaviors%3A%20function%20()%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._marshalBehavior(this.behaviors%5Bi%5D)%3B%0A%7D%0Athis._marshalBehavior(this)%3B%0A%7D%0A%7D)%3B%0APolymer.Base._behaviorProperties%20%3D%20%7B%0AhostAttributes%3A%20true%2C%0AbeforeRegister%3A%20true%2C%0Aregistered%3A%20true%2C%0Aproperties%3A%20true%2C%0Aobservers%3A%20true%2C%0Alisteners%3A%20true%2C%0Acreated%3A%20true%2C%0Aattached%3A%20true%2C%0Adetached%3A%20true%2C%0AattributeChanged%3A%20true%2C%0Aready%3A%20true%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_getExtendedPrototype%3A%20function%20(tag)%20%7B%0Areturn%20this._getExtendedNativePrototype(tag)%3B%0A%7D%2C%0A_nativePrototypes%3A%20%7B%7D%2C%0A_getExtendedNativePrototype%3A%20function%20(tag)%20%7B%0Avar%20p%20%3D%20this._nativePrototypes%5Btag%5D%3B%0Aif%20(!p)%20%7B%0Avar%20np%20%3D%20this.getNativePrototype(tag)%3B%0Ap%20%3D%20this.extend(Object.create(np)%2C%20Polymer.Base)%3B%0Athis._nativePrototypes%5Btag%5D%20%3D%20p%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0AgetNativePrototype%3A%20function%20(tag)%20%7B%0Areturn%20Object.getPrototypeOf(document.createElement(tag))%3B%0A%7D%0A%7D)%3B%0APolymer.Base._addFeature(%7B%0A_prepConstructor%3A%20function%20()%20%7B%0Athis._factoryArgs%20%3D%20this.extends%20%3F%20%5B%0Athis.extends%2C%0Athis.is%0A%5D%20%3A%20%5Bthis.is%5D%3B%0Avar%20ctor%20%3D%20function%20()%20%7B%0Areturn%20this._factory(arguments)%3B%0A%7D%3B%0Aif%20(this.hasOwnProperty('extends'))%20%7B%0Actor.extends%20%3D%20this.extends%3B%0A%7D%0AObject.defineProperty(this%2C%20'constructor'%2C%20%7B%0Avalue%3A%20ctor%2C%0Awritable%3A%20true%2C%0Aconfigurable%3A%20true%0A%7D)%3B%0Actor.prototype%20%3D%20this%3B%0A%7D%2C%0A_factory%3A%20function%20(args)%20%7B%0Avar%20elt%20%3D%20document.createElement.apply(document%2C%20this._factoryArgs)%3B%0Aif%20(this.factoryImpl)%20%7B%0Athis.factoryImpl.apply(elt%2C%20args)%3B%0A%7D%0Areturn%20elt%3B%0A%7D%0A%7D)%3B%0APolymer.nob%20%3D%20Object.create(null)%3B%0APolymer.Base._addFeature(%7B%0Aproperties%3A%20%7B%7D%2C%0AgetPropertyInfo%3A%20function%20(property)%20%7B%0Avar%20info%20%3D%20this._getPropertyInfo(property%2C%20this.properties)%3B%0Aif%20(!info)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Ainfo%20%3D%20this._getPropertyInfo(property%2C%20this.behaviors%5Bi%5D.properties)%3B%0Aif%20(info)%20%7B%0Areturn%20info%3B%0A%7D%0A%7D%0A%7D%0Areturn%20info%20%7C%7C%20Polymer.nob%3B%0A%7D%2C%0A_getPropertyInfo%3A%20function%20(property%2C%20properties)%20%7B%0Avar%20p%20%3D%20properties%20%26%26%20properties%5Bproperty%5D%3B%0Aif%20(typeof%20p%20%3D%3D%3D%20'function')%20%7B%0Ap%20%3D%20properties%5Bproperty%5D%20%3D%20%7B%20type%3A%20p%20%7D%3B%0A%7D%0Aif%20(p)%20%7B%0Ap.defined%20%3D%20true%3B%0A%7D%0Areturn%20p%3B%0A%7D%2C%0A_prepPropertyInfo%3A%20function%20()%20%7B%0Athis._propertyInfo%20%3D%20%7B%7D%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this.behaviors.length%3B%20i%2B%2B)%20%7B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.behaviors%5Bi%5D.properties)%3B%0A%7D%0Athis._addPropertyInfo(this._propertyInfo%2C%20this.properties)%3B%0Athis._addPropertyInfo(this._propertyInfo%2C%20this._propertyEffects)%3B%0A%7D%2C%0A_addPropertyInfo%3A%20function%20(target%2C%20source)%20%7B%0Aif%20(source)%20%7B%0Avar%20t%2C%20s%3B%0Afor%20(var%20i%20in%20source)%20%7B%0At%20%3D%20target%5Bi%5D%3B%0As%20%3D%20source%5Bi%5D%3B%0Aif%20(i%5B0%5D%20%3D%3D%3D%20'_'%20%26%26%20!s.readOnly)%20%7B%0Acontinue%3B%0A%7D%0Aif%20(!target%5Bi%5D)%20%7B%0Atarget%5Bi%5D%20%3D%20%7B%0Atype%3A%20typeof%20s%20%3D%3D%3D%20'function'%20%3F%20s%20%3A%20s.type%2C%0AreadOnly%3A%20s.readOnly%2C%0Aattribute%3A%20Polymer.CaseMap.camelToDashCase(i)%0A%7D%3B%0A%7D%20else%20%7B%0Aif%20(!t.type)%20%7B%0At.type%20%3D%20s.type%3B%0A%7D%0Aif%20(!t.readOnly)%20%7B%0At.readOnly%20%3D%20s.readOnly%3B%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D%0A%7D)%3B%0APolymer.CaseMap%20%3D%20%7B%0A_caseMap%3A%20%7B%7D%2C%0A_rx%3A%20%7B%0AdashToCamel%3A%20%2F-%5Ba-z%5D%2Fg%2C%0AcamelToDash%3A%20%2F(%5BA-Z%5D)%2Fg%0A%7D%2C%0AdashToCamelCase%3A%20function%20(dash)%20%7B%0Areturn%20this._caseMap%5Bdash%5D%20%7C%7C%20(this._caseMap%5Bdash%5D%20%3D%20dash.indexOf('-')%20%3C%200%20%3F%20dash%20%3A%20dash.replace(this._rx.dashToCamel%2C%20function%20(m)%20%7B%0Areturn%20m%5B1%5D.toUpperCase()%3B%0A%7D))%3B%0A%7D%2C%0AcamelToDashCase%3A%20function%20(camel)%20%7B%0Areturn%20this._caseMap%5Bcamel%5D%20%7C%7C%20(this._caseMap%5Bcamel%5D%20%3D%20camel.replace(this._rx.camelToDash%2C%20'-%241').toLowerCase())%3B%0A%7D%0A%7D%3B%0APolymer.Base._addFeature(%7B%0A_addHostAttributes%3A%20function%20(attributes)%20%7B%0Aif%20(!this._aggregatedAttributes)%20%7B%0Athis._aggregatedAttributes%20%3D%20%7B%7D%3B%0A%7D%0Aif%20(attributes)%20%7B%0Athis.mixin(this._aggregatedAttributes%2C%20attributes)%3B%0A%7D%0A%7D%2C%0A_marshalHostAttributes%3A%20function%20()%20%7B%0Aif%20(this._aggregatedAttributes)%20%7B%0Athis._applyAttributes(this%2C%20this._aggregatedAttributes)%3B%0A%7D%0A%7D%2C%0A_applyAttributes%3A%20function%20(node%2C%20attr%24)%20%7B%0Afor%20(var%20n%20in%20attr%24)%20%7B%0Aif%20(!this.hasAttribute(n)%20%26%26%20n%20!%3D%3D%20'class')%20%7B%0Avar%20v%20%3D%20attr%24%5Bn%5D%3B%0Athis.serializeValueToAttribute(v%2C%20n%2C%20this)%3B%0A%7D%0A%7D%0A%7D%2C%0A_marshalAttributes%3A%20function%20()%20%7B%0Athis._takeAttributesToModel(this)%3B%0A%7D%2C%0A_takeAttributesToModel%3A%20function%20(model)%20%7B%0Aif%20(this.hasAttributes())%20%7B%0Afor%20(var%20i%20in%20this._propertyInfo)%20%7B%0Avar%20info%20%3D%20this._propertyInfo%5Bi%5D%3B%0Aif%20(this.hasAttribute(info.attribute))%20%7B%0Athis._setAttributeToProperty(model%2C%20info.attribute%2C%20i%2C%20info)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_setAttributeToProperty%3A%20function%20(model%2C%20attribute%2C%20property%2C%20info)%20%7B%0Aif%20(!this._serializing)%20%7B%0Aproperty%20%3D%20property%20%7C%7C%20Polymer.CaseMap.dashToCamelCase(attribute)%3B%0Ainfo%20%3D%20info%20%7C%7C%20this._propertyInfo%20%26%26%20this._propertyInfo%5Bproperty%5D%3B%0Aif%20(info%20%26%26%20!info.readOnly)%20%7B%0Avar%20v%20%3D%20this.getAttribute(attribute)%3B%0Amodel%5Bproperty%5D%20%3D%20this.deserialize(v%2C%20info.type)%3B%0A%7D%0A%7D%0A%7D%2C%0A_serializing%3A%20false%2C%0AreflectPropertyToAttribute%3A%20function%20(property%2C%20attribute%2C%20value)%20%7B%0Athis._serializing%20%3D%20true%3B%0Avalue%20%3D%20value%20%3D%3D%3D%20undefined%20%3F%20this%5Bproperty%5D%20%3A%20value%3B%0Athis.serializeValueToAttribute(value%2C%20attribute%20%7C%7C%20Polymer.CaseMap.camelToDashCase(property))%3B%0Athis._serializing%20%3D%20false%3B%0A%7D%2C%0AserializeValueToAttribute%3A%20function%20(value%2C%20attribute%2C%20node)%20%7B%0Avar%20str%20%3D%20this.serialize(value)%3B%0Anode%20%3D%20node%20%7C%7C%20this%3B%0Aif%20(str%20%3D%3D%3D%20undefined)%20%7B%0Anode.removeAttribute(attribute)%3B%0A%7D%20else%20%7B%0Anode.setAttribute(attribute%2C%20str)%3B%0A%7D%0A%7D%2C%0Adeserialize%3A%20function%20(value%2C%20type)%20%7B%0Aswitch%20(type)%20%7B%0Acase%20Number%3A%0Avalue%20%3D%20Number(value)%3B%0Abreak%3B%0Acase%20Boolean%3A%0Avalue%20%3D%20value%20!%3D%20null%3B%0Abreak%3B%0Acase%20Object%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0A%7D%0Abreak%3B%0Acase%20Array%3A%0Atry%20%7B%0Avalue%20%3D%20JSON.parse(value)%3B%0A%7D%20catch%20(x)%20%7B%0Avalue%20%3D%20null%3B%0Aconsole.warn('Polymer%3A%3AAttributes%3A%20couldn%60t%20decode%20Array%20as%20JSON')%3B%0A%7D%0Abreak%3B%0Acase%20Date%3A%0Avalue%20%3D%20new%20Date(value)%3B%0Abreak%3B%0Acase%20String%3A%0Adefault%3A%0Abreak%3B%0A%7D%0Areturn%20value%3B%0A%7D%2C%0Aserialize%3A%20function%20(value)%20%7B%0Aswitch%20(typeof%20value)%20%7B%0Acase%20'boolean'%3A%0Areturn%20value%20%3F%20''%20%3A%20undefined%3B%0Acase%20'object'%3A%0Aif%20(value%20instanceof%20Date)%20%7B%0Areturn%20value.toString()%3B%0A%7D%20else%20if%20(value)%20%7B%0Atry%20%7B%0Areturn%20JSON.stringify(value)%3B%0A%7D%20catch%20(x)%20%7B%0Areturn%20''%3B%0A%7D%0A%7D%0Adefault%3A%0Areturn%20value%20!%3D%20null%20%3F%20value%20%3A%20undefined%3B%0A%7D%0A%7D%0A%7D)%3B%0APolymer.version%20%3D%20'1.3.1'%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepPropertyInfo()%3B%0A%7D%2C%0A_prepBehavior%3A%20function%20(b)%20%7B%0Athis._addHostAttributes(b.hostAttributes)%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0A%7D%2C%0A_initFeatures%3A%20function%20()%20%7B%0Athis._marshalHostAttributes()%3B%0Athis._marshalBehaviors()%3B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Falugha.com%2Fembed%2Fpolymer-live%2Fbower_components%2Fpolymer%2Fpolymer-micro.html.js%0A:182 in createdCallback https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in i https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in n https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in t https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in n https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in n https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in n https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in n https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in t https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in r https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in t https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in v https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in i https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in o https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in g https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in t :0 in dispatchEvent https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in n https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in r :0 in dispatchEvent https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in parseImport https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in parseLink https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in parse https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in parseNext https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in parseImport https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in parseLink https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in parse https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in parseNext https://alugha.com/embed/polymer-live/scripts/vendor-218ce54111.js:4 in r Disney's Oscar award-winning Frozen in 26 languages ​​in one video by alugha - alugha