7 sec in total
439 ms
6.4 sec
145 ms
Click here to check amazing Snek content for United States. Otherwise, check out these important facts you probably never knew about snek.co.kr
도메인, 도메인등록, 퀵돔등록, 도메인연장, 도메인이전, 무료 파킹, 무료포워딩 제공, 국내 최저가 도메인 서비스 제공, 웹호스팅, 서버호스팅, 홈페이지제작, 쇼핑몰, 서버, IDC
Visit snek.co.krWe analyzed Snek.co.kr page load time and found that the first response time was 439 ms and then it took 6.6 sec to load all DOM resources and completely render a web page. This is a poor result, as 80% of websites can load faster.
snek.co.kr performance score
name
value
score
weighting
Value3.5 s
35/100
10%
Value9.3 s
1/100
25%
Value4.9 s
65/100
10%
Value0 ms
100/100
30%
Value0.125
83/100
15%
Value5.1 s
75/100
10%
439 ms
763 ms
189 ms
551 ms
55 ms
Our browser made a total of 110 requests to load all elements on the main page. We found that 1% of them (1 request) were addressed to the original Snek.co.kr, 66% (73 requests) were made to and 14% (15 requests) were made to Cdn.snek.ai. The less responsive or slowest element that took the longest time to load (3.6 sec) relates to the external source Cdn.snek.ai.
Page size can be reduced by 900.4 kB (68%)
1.3 MB
415.9 kB
In fact, the total size of Snek.co.kr main page is 1.3 MB. This result falls beyond the top 1M of websites and identifies a large and not optimized web page that may take ages to load. 50% of websites need less resources to load. Javascripts take 881.7 kB which makes up the majority of the site volume.
Potential reduce by 186.2 kB
HTML content can be minified and compressed by a website’s server. The most efficient way is to compress content using GZIP which reduces data amount travelling through the network between server and browser. HTML code on this page is well minified. It is highly recommended that content of this web page should be compressed using GZIP, as it can save up to 186.2 kB or 78% of the original size.
Potential reduce by 2.0 kB
Image size optimization can help to speed up a website loading time. The chart above shows the difference between the size before and after optimization. Snek images are well optimized though.
Potential reduce by 578.3 kB
It’s better to minify JavaScript in order to improve website performance. The diagram shows the current total size of all JavaScript files against the prospective JavaScript size after its minification and compression. It is highly recommended that all JavaScript files should be compressed and minified as it can save up to 578.3 kB or 66% of the original size.
Potential reduce by 134.0 kB
CSS files minification is very important to reduce a web page rendering time. The faster CSS files can load, the earlier a page can be rendered. Snek.co.kr needs all CSS files to be minified and compressed as it can save up to 134.0 kB or 90% of the original size.
Number of requests can be reduced by 14 (52%)
27
13
The browser has sent 27 CSS, Javascripts, AJAX and image requests in order to completely render the main page of Snek. We recommend that multiple CSS and JavaScript files should be merged into one by each type, as it can help reduce assets requests from 12 to 1 for JavaScripts and from 4 to 1 for CSS and as a result speed up the page load time.
snek.co.kr
439 ms
www.snek.ai
763 ms
alpha
189 ms
top_ideas
551 ms
webcomponents-lite.min.js
55 ms
snek.css
193 ms
snek.js
744 ms
webfont.js
48 ms
addthis_widget.js
49 ms
icon
51 ms
icon_loading.gif
101 ms
11173385_1401275686862660_3943656654094454937_n.jpg
295 ms
img_symbol_snek@2x.png
74 ms
snek_logo@2x.png
81 ms
13ec13cbe0df4216a9fdacdc04acb7aa.jpg
735 ms
6c1fbfbefc054e5da4ba4be063ad88b6.jpg
746 ms
4d8cfab641064642b4b3a3e2fdced112.jpg
739 ms
13de4591d32d402986e87d91042e5000.jpg
720 ms
bottom_snek_logo@2x.png
84 ms
NanumBarunGothic.woff
3185 ms
NanumBarunGothicLight.woff
2826 ms
NanumBarunGothicUltraLight.woff
3434 ms
NanumBarunGothicBold.woff
3631 ms
analytics.js
100 ms
vulcanized_20160325.html
253 ms
collect
12 ms
collect
56 ms
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%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%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%0Awindow.Polymer%20%3D%20Polymer%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%3B%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%0Avar%20id%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%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%0Athis._mixinBehavior(behaviors%5Bi%5D)%3B%0A%7D%0Areturn%20behaviors%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%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%3B%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%2C%20p%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%0AdashToCamelCase%3A%20function%20(dash)%20%7B%0Avar%20mapped%20%3D%20Polymer.CaseMap._caseMap%5Bdash%5D%3B%0Aif%20(mapped)%20%7B%0Areturn%20mapped%3B%0A%7D%0Aif%20(dash.indexOf('-')%20%3C%200)%20%7B%0Areturn%20Polymer.CaseMap._caseMap%5Bdash%5D%20%3D%20dash%3B%0A%7D%0Areturn%20Polymer.CaseMap._caseMap%5Bdash%5D%20%3D%20dash.replace(%2F-(%5Ba-z%5D)%2Fg%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%0Avar%20mapped%20%3D%20Polymer.CaseMap._caseMap%5Bcamel%5D%3B%0Aif%20(mapped)%20%7B%0Areturn%20mapped%3B%0A%7D%0Areturn%20Polymer.CaseMap._caseMap%5Bcamel%5D%20%3D%20camel.replace(%2F(%5Ba-z%5D%5BA-Z%5D)%2Fg%2C%20function%20(g)%20%7B%0Areturn%20g%5B0%5D%20%2B%20'-'%20%2B%20g%5B1%5D.toLowerCase()%3B%0A%7D)%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%0Avar%20property%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%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%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.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%20debouncer%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.version%20%3D%20'1.2.3'%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._setupDebouncers()%3B%0Athis._marshalBehaviors()%3B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html.js%0A
1 ms
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%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%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(var%20i%20%3D%201%3B%20i%20%3C%20rowCount%3B%20i%2B%2B)%20%7B%0Afor%20(var%20j%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%0Avar%20splice%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%0Ac%24%20%3D%20composed%20%3F%20node._composedChildren%20%3A%20c%24%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%0APolymer.DomApi%20%3D%20function%20()%20%7B%0A'use%20strict'%3B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20getInnerHTML%20%3D%20Polymer.domInnerHTML.getInnerHTML%3B%0Avar%20nativeInsertBefore%20%3D%20Element.prototype.insertBefore%3B%0Avar%20nativeRemoveChild%20%3D%20Element.prototype.removeChild%3B%0Avar%20nativeAppendChild%20%3D%20Element.prototype.appendChild%3B%0Avar%20nativeCloneNode%20%3D%20Element.prototype.cloneNode%3B%0Avar%20nativeImportNode%20%3D%20Document.prototype.importNode%3B%0Avar%20needsToWrap%20%3D%20Settings.hasShadow%20%26%26%20!Settings.nativeShadow%3B%0Avar%20wrap%20%3D%20window.wrap%20%3F%20window.wrap%20%3A%20function%20(node)%20%7B%0Areturn%20node%3B%0A%7D%3B%0Avar%20DomApi%20%3D%20function%20(node)%20%7B%0Athis.node%20%3D%20needsToWrap%20%3F%20wrap(node)%20%3A%20node%3B%0Aif%20(this.patch)%20%7B%0Athis.patch()%3B%0A%7D%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%20wrappedDocument%20%3D%20wrap(document)%3B%0Awhile%20(n%20%26%26%20n%20!%3D%3D%20wrappedDocument%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%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._addNode(node)%3B%0A%7D%2C%0AinsertBefore%3A%20function%20(node%2C%20ref_node)%20%7B%0Areturn%20this._addNode(node%2C%20ref_node)%3B%0A%7D%2C%0A_addNode%3A%20function%20(node%2C%20ref_node)%20%7B%0Athis._removeNodeFromParent(node)%3B%0Avar%20addedInsertionPoint%3B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0AaddedInsertionPoint%20%3D%20this._maybeAddInsertionPoint(node%2C%20this.node)%3B%0A%7D%0Aif%20(this._nodeHasLogicalChildren(this.node))%20%7B%0Aif%20(ref_node)%20%7B%0Avar%20children%20%3D%20this.childNodes%3B%0Avar%20index%20%3D%20children.indexOf(ref_node)%3B%0Aif%20(index%20%3C%200)%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%0A%7D%0Athis._addLogicalInfo(node%2C%20this.node%2C%20index)%3B%0A%7D%0Athis._addNodeToHost(node)%3B%0Aif%20(!this._maybeDistribute(node%2C%20this.node)%20%26%26%20!this._tryRemoveUndistributedNode(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%0AaddToComposedParent(container%2C%20node%2C%20ref_node)%3B%0Aif%20(ref_node)%20%7B%0AnativeInsertBefore.call(container%2C%20node%2C%20ref_node)%3B%0A%7D%20else%20%7B%0AnativeAppendChild.call(container%2C%20node)%3B%0A%7D%0A%7D%0Aif%20(addedInsertionPoint)%20%7B%0Athis._updateInsertionPoints(root.host)%3B%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%3B%0A%7D%2C%0AremoveChild%3A%20function%20(node)%20%7B%0Aif%20(factory(node).parentNode%20!%3D%3D%20this.node)%20%7B%0Aconsole.warn('The%20node%20to%20be%20removed%20is%20not%20a%20child%20of%20this%20node'%2C%20node)%3B%0A%7D%0Athis._removeNodeFromHost(node)%3B%0Aif%20(!this._maybeDistribute(node%2C%20this.node))%20%7B%0Avar%20container%20%3D%20this.node._isShadyRoot%20%3F%20this.node.host%20%3A%20this.node%3B%0Aif%20(container%20%3D%3D%3D%20node.parentNode)%20%7B%0AremoveFromComposedParent(container%2C%20node)%3B%0AnativeRemoveChild.call(container%2C%20node)%3B%0A%7D%0A%7D%0Athis.notifyObserver()%3B%0Areturn%20node%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%0Aif%20(node._ownerShadyRoot%20%3D%3D%3D%20undefined)%20%7B%0Avar%20root%3B%0Aif%20(node._isShadyRoot)%20%7B%0Aroot%20%3D%20node%3B%0A%7D%20else%20%7B%0Avar%20parent%20%3D%20Polymer.dom(node).parentNode%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%0Anode._ownerShadyRoot%20%3D%20root%3B%0A%7D%0Areturn%20node._ownerShadyRoot%3B%0A%7D%2C%0A_maybeDistribute%3A%20function%20(node%2C%20parent)%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%20Polymer.dom(node).querySelector(CONTENT)%3B%0Avar%20wrappedContent%20%3D%20fragContent%20%26%26%20Polymer.dom(fragContent).parentNode.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._ownerShadyRootForNode(parent)%3B%0Aif%20(root)%20%7B%0Avar%20host%20%3D%20root.host%3B%0Athis._lazyDistribute(host)%3B%0A%7D%0A%7D%0Avar%20parentNeedsDist%20%3D%20this._parentNeedsDistribution(parent)%3B%0Aif%20(parentNeedsDist)%20%7B%0Athis._lazyDistribute(parent)%3B%0A%7D%0Areturn%20parentNeedsDist%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%20factory(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%20factory(n).parentNode%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%0AsaveLightChildrenIfNeeded(parent)%3B%0AsaveLightChildrenIfNeeded(node)%3B%0Aadded%20%3D%20true%3B%0A%7D%0Areturn%20added%3B%0A%7D%2C%0A_tryRemoveUndistributedNode%3A%20function%20(node)%20%7B%0Aif%20(this.node.shadyRoot)%20%7B%0Avar%20parent%20%3D%20getComposedParent(node)%3B%0Aif%20(parent)%20%7B%0AnativeRemoveChild.call(parent%2C%20node)%3B%0A%7D%0Areturn%20true%3B%0A%7D%0A%7D%2C%0A_updateInsertionPoints%3A%20function%20(host)%20%7B%0Avar%20i%24%20%3D%20host.shadyRoot._insertionPoints%20%3D%20factory(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%0AsaveLightChildrenIfNeeded(c)%3B%0AsaveLightChildrenIfNeeded(factory(c).parentNode)%3B%0A%7D%0A%7D%2C%0A_nodeHasLogicalChildren%3A%20function%20(node)%20%7B%0Areturn%20Boolean(node._lightChildren%20!%3D%3D%20undefined)%3B%0A%7D%2C%0A_parentNeedsDistribution%3A%20function%20(parent)%20%7B%0Areturn%20parent%20%26%26%20parent.shadyRoot%20%26%26%20hasInsertionPoint(parent.shadyRoot)%3B%0A%7D%2C%0A_removeNodeFromParent%3A%20function%20(node)%20%7B%0Avar%20parent%20%3D%20node._lightParent%20%7C%7C%20node.parentNode%3B%0Aif%20(parent%20%26%26%20hasDomApi(parent))%20%7B%0Afactory(parent).notifyObserver()%3B%0A%7D%0Athis._removeNodeFromHost(node%2C%20true)%3B%0A%7D%2C%0A_removeNodeFromHost%3A%20function%20(node%2C%20ensureComposedRemoval)%20%7B%0Avar%20hostNeedsDist%3B%0Avar%20root%3B%0Avar%20parent%20%3D%20node._lightParent%3B%0Aif%20(parent)%20%7B%0Afactory(node)._distributeParent()%3B%0Aroot%20%3D%20this._ownerShadyRootForNode(node)%3B%0Aif%20(root)%20%7B%0Aroot.host._elementRemove(node)%3B%0AhostNeedsDist%20%3D%20this._removeDistributedChildren(root%2C%20node)%3B%0A%7D%0Athis._removeLogicalInfo(node%2C%20parent)%3B%0A%7D%0Athis._removeOwnerShadyRoot(node)%3B%0Aif%20(root%20%26%26%20hostNeedsDist)%20%7B%0Athis._updateInsertionPoints(root.host)%3B%0Athis._lazyDistribute(root.host)%3B%0A%7D%20else%20if%20(ensureComposedRemoval)%20%7B%0AremoveFromComposedParent(getComposedParent(node)%2C%20node)%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%20factory(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%20node.parentNode%3B%0Aif%20(parent)%20%7B%0AremoveFromComposedParent(parent%2C%20node)%3B%0AnativeRemoveChild.call(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%20factory(node).parentNode%3B%0A%7D%0A%7D%2C%0A_addNodeToHost%3A%20function%20(node)%20%7B%0Avar%20root%20%3D%20this.getOwnerRoot()%3B%0Aif%20(root)%20%7B%0Aroot.host._elementAdd(node)%3B%0A%7D%0A%7D%2C%0A_addLogicalInfo%3A%20function%20(node%2C%20container%2C%20index)%20%7B%0Avar%20children%20%3D%20factory(container).childNodes%3B%0Aindex%20%3D%20index%20%3D%3D%3D%20undefined%20%3F%20children.length%20%3A%20index%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Avar%20c%24%20%3D%20arrayCopyChildNodes(node)%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%0Achildren.splice(index%2B%2B%2C%200%2C%20n)%3B%0An._lightParent%20%3D%20container%3B%0A%7D%0A%7D%20else%20%7B%0Achildren.splice(index%2C%200%2C%20node)%3B%0Anode._lightParent%20%3D%20container%3B%0A%7D%0A%7D%2C%0A_removeLogicalInfo%3A%20function%20(node%2C%20container)%20%7B%0Avar%20children%20%3D%20factory(container).childNodes%3B%0Avar%20index%20%3D%20children.indexOf(node)%3B%0Aif%20(index%20%3C%200%20%7C%7C%20container%20!%3D%3D%20node._lightParent)%20%7B%0Athrow%20Error('The%20node%20to%20be%20removed%20is%20not%20a%20child%20of%20this%20node')%3B%0A%7D%0Achildren.splice(index%2C%201)%3B%0Anode._lightParent%20%3D%20null%3B%0A%7D%2C%0A_removeOwnerShadyRoot%3A%20function%20(node)%20%7B%0Aif%20(this._hasCachedOwnerRoot(node))%20%7B%0Avar%20c%24%20%3D%20factory(node).childNodes%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%20factory(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%20factory(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%0Areturn%20this.querySelectorAll(selector)%5B0%5D%3B%0A%7D%2C%0AquerySelectorAll%3A%20function%20(selector)%20%7B%0Areturn%20this._query(function%20(n)%20%7B%0Areturn%20matchesSelector.call(n%2C%20selector)%3B%0A%7D%2C%20this.node)%3B%0A%7D%2C%0A_query%3A%20function%20(matcher%2C%20node)%20%7B%0Anode%20%3D%20node%20%7C%7C%20this.node%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Athis._queryElements(factory(node).childNodes%2C%20matcher%2C%20list)%3B%0Areturn%20list%3B%0A%7D%2C%0A_queryElements%3A%20function%20(elements%2C%20matcher%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%0Athis._queryElement(c%2C%20matcher%2C%20list)%3B%0A%7D%0A%7D%0A%7D%2C%0A_queryElement%3A%20function%20(node%2C%20matcher%2C%20list)%20%7B%0Aif%20(matcher(node))%20%7B%0Alist.push(node)%3B%0A%7D%0Athis._queryElements(factory(node).childNodes%2C%20matcher%2C%20list)%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%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%20matchesSelector.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%20factory(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%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._distributeParent()%3B%0A%7D%2C%0AremoveAttribute%3A%20function%20(name)%20%7B%0Athis.node.removeAttribute(name)%3B%0Athis._distributeParent()%3B%0A%7D%2C%0A_distributeParent%3A%20function%20()%20%7B%0Aif%20(this._parentNeedsDistribution(this.parentNode))%20%7B%0Athis._lazyDistribute(this.parentNode)%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%20factory(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%20factory(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%20factory(externalNode).childNodes%3B%0Avar%20d%20%3D%20factory(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%20factory(doc).importNode(c%24%5Bi%5D%2C%20true)%3B%0Ad.appendChild(nc)%3B%0A%7D%0A%7D%0Areturn%20n%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%0A%7D%3B%0Aif%20(!Settings.useShadow)%20%7B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20getLightChildren(this.node)%3B%0Areturn%20Array.isArray(c%24)%20%3F%20c%24%20%3A%20arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%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%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AparentNode%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.node._lightParent%20%7C%7C%20getComposedParent(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.childNodes%5B0%5D%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.childNodes%3B%0Areturn%20c%24%5Bc%24.length%20-%201%5D%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.parentNode%20%26%26%20factory(this.parentNode).childNodes%3B%0Aif%20(c%24)%20%7B%0Areturn%20c%24%5BArray.prototype.indexOf.call(c%24%2C%20this.node)%20%2B%201%5D%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.parentNode%20%26%26%20factory(this.parentNode).childNodes%3B%0Aif%20(c%24)%20%7B%0Areturn%20c%24%5BArray.prototype.indexOf.call(c%24%2C%20this.node)%20-%201%5D%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AfirstElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20this.children%5B0%5D%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AlastElementChild%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.children%3B%0Areturn%20c%24%5Bc%24.length%20-%201%5D%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0AnextElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.parentNode%20%26%26%20factory(this.parentNode).children%3B%0Aif%20(c%24)%20%7B%0Areturn%20c%24%5BArray.prototype.indexOf.call(c%24%2C%20this.node)%20%2B%201%5D%3B%0A%7D%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0ApreviousElementSibling%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Avar%20c%24%20%3D%20this.parentNode%20%26%26%20factory(this.parentNode).children%3B%0Aif%20(c%24)%20%7B%0Areturn%20c%24%5BArray.prototype.indexOf.call(c%24%2C%20this.node)%20-%201%5D%3B%0A%7D%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%20arrayCopyChildNodes(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.prototype._getComposedInnerHTML%20%3D%20function%20()%20%7B%0Areturn%20getInnerHTML(this.node%2C%20true)%3B%0A%7D%3B%0A%7D%20else%20%7B%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'%0A%5D)%3B%0ADomApi.prototype.querySelectorAll%20%3D%20function%20(selector)%20%7B%0Areturn%20arrayCopy(this.node.querySelectorAll(selector))%3B%0A%7D%3B%0ADomApi.prototype.getOwnerRoot%20%3D%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%3B%0ADomApi.prototype.importNode%20%3D%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%3B%0ADomApi.prototype.getDestinationInsertionPoints%20%3D%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDestinationInsertionPoints%20%26%26%20this.node.getDestinationInsertionPoints()%3B%0Areturn%20n%24%20%3F%20arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%3B%0ADomApi.prototype.getDistributedNodes%20%3D%20function%20()%20%7B%0Avar%20n%24%20%3D%20this.node.getDistributedNodes%20%26%26%20this.node.getDistributedNodes()%3B%0Areturn%20n%24%20%3F%20arrayCopy(n%24)%20%3A%20%5B%5D%3B%0A%7D%3B%0ADomApi.prototype._distributeParent%20%3D%20function%20()%20%7B%0A%7D%3B%0AObject.defineProperties(DomApi.prototype%2C%20%7B%0AchildNodes%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20arrayCopyChildNodes(this.node)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20arrayCopyChildren(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%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%0Avar%20CONTENT%20%3D%20'content'%3B%0Afunction%20factory(node%2C%20patch)%20%7B%0Anode%20%3D%20node%20%7C%7C%20document%3B%0Aif%20(!node.__domApi)%20%7B%0Anode.__domApi%20%3D%20new%20DomApi(node%2C%20patch)%3B%0A%7D%0Areturn%20node.__domApi%3B%0A%7D%0A%3B%0Afunction%20hasDomApi(node)%20%7B%0Areturn%20Boolean(node.__domApi)%3B%0A%7D%0A%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%20factory(obj%2C%20patch)%3B%0A%7D%0A%7D%3B%0Afunction%20getLightChildren(node)%20%7B%0Avar%20children%20%3D%20node._lightChildren%3B%0Areturn%20children%20%3F%20children%20%3A%20node.childNodes%3B%0A%7D%0Afunction%20getComposedChildren(node)%20%7B%0Aif%20(!node._composedChildren)%20%7B%0Anode._composedChildren%20%3D%20arrayCopyChildNodes(node)%3B%0A%7D%0Areturn%20node._composedChildren%3B%0A%7D%0Afunction%20addToComposedParent(parent%2C%20node%2C%20ref_node)%20%7B%0Avar%20children%20%3D%20getComposedChildren(parent)%3B%0Avar%20i%20%3D%20ref_node%20%3F%20children.indexOf(ref_node)%20%3A%20-1%3B%0Aif%20(node.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0Avar%20fragChildren%20%3D%20getComposedChildren(node)%3B%0Afor%20(var%20j%20%3D%200%3B%20j%20%3C%20fragChildren.length%3B%20j%2B%2B)%20%7B%0AaddNodeToComposedChildren(fragChildren%5Bj%5D%2C%20parent%2C%20children%2C%20i%20%2B%20j)%3B%0A%7D%0Anode._composedChildren%20%3D%20null%3B%0A%7D%20else%20%7B%0AaddNodeToComposedChildren(node%2C%20parent%2C%20children%2C%20i)%3B%0A%7D%0A%7D%0Afunction%20getComposedParent(node)%20%7B%0Areturn%20node.__patched%20%3F%20node._composedParent%20%3A%20node.parentNode%3B%0A%7D%0Afunction%20addNodeToComposedChildren(node%2C%20parent%2C%20children%2C%20i)%20%7B%0Anode._composedParent%20%3D%20parent%3B%0Achildren.splice(i%20%3E%3D%200%20%3F%20i%20%3A%20children.length%2C%200%2C%20node)%3B%0A%7D%0Afunction%20removeFromComposedParent(parent%2C%20node)%20%7B%0Anode._composedParent%20%3D%20null%3B%0Aif%20(parent)%20%7B%0Avar%20children%20%3D%20getComposedChildren(parent)%3B%0Avar%20i%20%3D%20children.indexOf(node)%3B%0Aif%20(i%20%3E%3D%200)%20%7B%0Achildren.splice(i%2C%201)%3B%0A%7D%0A%7D%0A%7D%0Afunction%20saveLightChildrenIfNeeded(node)%20%7B%0Aif%20(!node._lightChildren)%20%7B%0Avar%20c%24%20%3D%20arrayCopyChildNodes(node)%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%0Achild._lightParent%20%3D%20child._lightParent%20%7C%7C%20node%3B%0A%7D%0Anode._lightChildren%20%3D%20c%24%3B%0A%7D%0A%7D%0Afunction%20arrayCopyChildNodes(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%0Afunction%20arrayCopyChildren(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%0Afunction%20arrayCopy(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%0Afunction%20hasInsertionPoint(root)%20%7B%0Areturn%20Boolean(root%20%26%26%20root._insertionPoints.length)%3B%0A%7D%0Avar%20p%20%3D%20Element.prototype%3B%0Avar%20matchesSelector%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%20%7B%0AgetLightChildren%3A%20getLightChildren%2C%0AgetComposedParent%3A%20getComposedParent%2C%0AgetComposedChildren%3A%20getComposedChildren%2C%0AremoveFromComposedParent%3A%20removeFromComposedParent%2C%0AsaveLightChildrenIfNeeded%3A%20saveLightChildrenIfNeeded%2C%0AmatchesSelector%3A%20matchesSelector%2C%0AhasInsertionPoint%3A%20hasInsertionPoint%2C%0Actor%3A%20DomApi%2C%0Afactory%3A%20factory%2C%0AhasDomApi%3A%20hasDomApi%2C%0AarrayCopy%3A%20arrayCopy%2C%0AarrayCopyChildNodes%3A%20arrayCopyChildNodes%2C%0AarrayCopyChildren%3A%20arrayCopyChildren%2C%0Awrap%3A%20wrap%0A%7D%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%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._debouncers.length%3B%20i%2B%2B)%20%7B%0Athis._debouncers%5Bi%5D.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%20o%20%3D%20this.rootTarget%3B%0Awhile%20(o)%20%7B%0Apath.push(o)%3B%0Ao%20%3D%20Polymer.dom(o).parentNode%20%7C%7C%20o.host%3B%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%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.domApi._distributeParent()%3B%0A%7D%2C%0Aremove%3A%20function%20()%20%7B%0Athis.node.classList.remove.apply(this.node.classList%2C%20arguments)%3B%0Athis.domApi._distributeParent()%3B%0A%7D%2C%0Atoggle%3A%20function%20()%20%7B%0Athis.node.classList.toggle.apply(this.node.classList%2C%20arguments)%3B%0Athis.domApi._distributeParent()%3B%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%0Avar%20hasDomApi%20%3D%20Polymer.DomApi.hasDomApi%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(mxns)%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(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%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%0Avar%20beforeCallListeners%20%3D%20DomApi.EffectiveNodesObserver.prototype._beforeCallListeners%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%20hasDomApi%20%3D%20Polymer.DomApi.hasDomApi%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_poolContent%3A%20function%20()%20%7B%0Aif%20(this._useContent)%20%7B%0AsaveLightChildrenIfNeeded(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%0AupgradeLightChildren(this._lightChildren)%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%0AsaveLightChildrenIfNeeded(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%0AsaveLightChildrenIfNeeded(c)%3B%0AsaveLightChildrenIfNeeded(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%0Avar%20dom%20%3D%20Polymer.dom(this)%3B%0Aif%20(updateInsertionPoints)%20%7B%0Adom._updateInsertionPoints(this)%3B%0A%7D%0Avar%20host%20%3D%20getTopDistributingHost(this)%3B%0Adom._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%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%20hasInsertionPoint(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(hasInsertionPoint(this.shadyRoot))%20%7B%0Athis._composeTree()%3B%0AnotifyContentObservers(this.shadyRoot)%3B%0A%7D%20else%20%7B%0Aif%20(!this.shadyRoot._hasDistributed)%20%7B%0Athis.textContent%20%3D%20''%3B%0Athis._composedChildren%20%3D%20null%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%20matchesSelector.call(node%2C%20selector)%3B%0A%7D%2C%0A_resetDistribution%3A%20function%20()%20%7B%0Avar%20children%20%3D%20getLightChildren(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%20getLightChildren(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%20getLightChildren(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%20p._lightParent%20%7C%7C%20p.parentNode%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%20getLightChildren(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%20getComposedChildren(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(getComposedParent(n)%20%3D%3D%3D%20container)%20%7B%0Aremove(n)%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(var%20j%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%0AinsertBefore(container%2C%20n%2C%20next)%3B%0Acomposed.splice(j%2C%200%2C%20n)%3B%0A%7D%0A%7D%0AensureComposedParent(container%2C%20children)%3B%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%0Avar%20saveLightChildrenIfNeeded%20%3D%20Polymer.DomApi.saveLightChildrenIfNeeded%3B%0Avar%20getLightChildren%20%3D%20Polymer.DomApi.getLightChildren%3B%0Avar%20matchesSelector%20%3D%20Polymer.DomApi.matchesSelector%3B%0Avar%20hasInsertionPoint%20%3D%20Polymer.DomApi.hasInsertionPoint%3B%0Avar%20getComposedChildren%20%3D%20Polymer.DomApi.getComposedChildren%3B%0Avar%20getComposedParent%20%3D%20Polymer.DomApi.getComposedParent%3B%0Avar%20removeFromComposedParent%20%3D%20Polymer.DomApi.removeFromComposedParent%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%20content._lightParent%3B%0Aif%20(parent%20%26%26%20parent.shadyRoot%20%26%26%20hasInsertionPoint(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%0Avar%20nativeInsertBefore%20%3D%20Element.prototype.insertBefore%3B%0Avar%20nativeRemoveChild%20%3D%20Element.prototype.removeChild%3B%0Afunction%20insertBefore(parentNode%2C%20newChild%2C%20refChild)%20%7B%0Avar%20newChildParent%20%3D%20getComposedParent(newChild)%3B%0Aif%20(newChildParent%20!%3D%3D%20parentNode)%20%7B%0AremoveFromComposedParent(newChildParent%2C%20newChild)%3B%0A%7D%0Aremove(newChild)%3B%0AnativeInsertBefore.call(parentNode%2C%20newChild%2C%20refChild%20%7C%7C%20null)%3B%0AnewChild._composedParent%20%3D%20parentNode%3B%0A%7D%0Afunction%20remove(node)%20%7B%0Avar%20parentNode%20%3D%20getComposedParent(node)%3B%0Aif%20(parentNode)%20%7B%0Anode._composedParent%20%3D%20null%3B%0AnativeRemoveChild.call(parentNode%2C%20node)%3B%0A%7D%0A%7D%0Afunction%20ensureComposedParent(parent%2C%20children)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20n%3B%20i%20%3C%20children.length%3B%20i%2B%2B)%20%7B%0Achildren%5Bi%5D._composedParent%20%3D%20parent%3B%0A%7D%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%20Polymer.dom(host).children%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%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(hasDomApi(c))%20%7B%0APolymer.dom(c).notifyObserver()%3B%0A%7D%0A%7D%0A%7D%0Afunction%20notifyInitialDistribution(host)%20%7B%0Aif%20(hasDomApi(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%20upgradeLightChildren(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.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%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-1.js%0A
2 ms
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%20%2F(%5B%5E%7B%5B%5D*)(%5C%7B%5C%7B%7C%5C%5B%5C%5B)(%3F!%5C%7D%5C%7D%7C%5C%5D%5C%5D)(.%2B%3F)(%3F%3A%5C%5D%5C%5D%7C%5C%7D%5C%7D)%2Fg%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%20m%2C%20lastIndex%3B%0Awhile%20((m%20%3D%20re.exec(text))%20!%3D%3D%20null)%20%7B%0Aif%20(m%5B1%5D)%20%7B%0Aparts.push(%7B%20literal%3A%20m%5B1%5D%20%7D)%3B%0A%7D%0Avar%20mode%20%3D%20m%5B2%5D%5B0%5D%3B%0Avar%20value%20%3D%20m%5B3%5D.trim()%3B%0Avar%20negate%20%3D%20false%3B%0Aif%20(value%5B0%5D%20%3D%3D%20'!')%20%7B%0Anegate%20%3D%20true%3B%0Avalue%20%3D%20value.substring(1).trim()%3B%0A%7D%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%20'input'%20%26%26%20name%20%3D%3D%20'value')%20%7B%0Anode.setAttribute(origName%2C%20'')%3B%0A%7D%0Anode.removeAttribute(origName)%3B%0Aif%20(kind%20%3D%3D%3D%20'property')%20%7B%0Aname%20%3D%20Polymer.CaseMap.dashToCamelCase(name)%3B%0A%7D%0Areturn%20%7B%0Akind%3A%20kind%2C%0Aname%3A%20name%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%0A_localSubTree%3A%20function%20(node%2C%20host)%20%7B%0Areturn%20node%20%3D%3D%3D%20host%20%3F%20node.childNodes%20%3A%20node._lightChildren%20%7C%7C%20node.childNodes%3B%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%0Areturn%20!parent%20%3F%20root%20%3A%20Polymer.Annotations._localSubTree(parent%2C%20root)%5Bannote.index%5D%3B%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%0A%7D%0Athis._processAnnotations(this._notes)%3B%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%0Ap.signature%20%3D%20this._parseMethod(p.value)%3B%0Aif%20(!p.signature)%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%0App%5Bargs%5Bkk%5D.model%5D%20%3D%20true%3B%0A%7D%0A%7D%20else%20%7B%0App%5Bp.model%5D%20%3D%20true%3B%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(config)%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%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%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%7B%0Aif%20(r.reset)%20%7B%0Ar.reset()%3B%0A%7D%0A%7D%0A%7D%0A%7D%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%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%20function%20()%20%7B%0A%7D%2C%0Aupfn%3A%20function%20()%20%7B%0A%7D%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%0Avar%20self%20%3D%20this%3B%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%20function%20()%20%7B%0A%7D%2C%0Aupfn%3A%20function%20()%20%7B%0A%7D%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%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%0AGestures.prevent('tap')%3B%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%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%0AGestures.prevent('tap')%3B%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_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.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%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%0Avar%20detail%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)%20%7B%0Avar%20l%20%3D%20document.createElement('link')%3B%0Al.rel%20%3D%20'import'%3B%0Al.href%20%3D%20href%3B%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'computedAnnotation'%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)%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))%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)%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(!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%3B%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'%20%26%26%20!effect.parts%5B0%5D.negate%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%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%20args%20%3D%20Polymer.Bind._marshalArgs(this.__data__%2C%20effect%2C%20source%2C%20value)%3B%0Aif%20(args)%20%7B%0Avar%20fn%20%3D%20this%5Beffect.method%5D%3B%0Aif%20(fn)%20%7B%0Athis.__setProperty(effect.name%2C%20fn.apply(this%2C%20args))%3B%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%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%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%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(args.length%20%3E%201%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%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%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%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%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)%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%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%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%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)%5C((.*)%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(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%0Aname%3A%20arg%2C%0Amodel%3A%20this._modelForPath(arg)%0A%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.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%20true%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%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%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(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%0Aif%20(node._configValue)%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%0Anode._configValue(x.effect.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(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%0Athis._notifyPath(info.path%2C%20value%2C%20fromAbove)%3B%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%0Aif%20(last%5B0%5D%20%3D%3D%20'%23')%20%7B%0Avar%20key%20%3D%20last%3B%0Avar%20old%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%0Avar%20old%20%3D%20prop%5Blast%5D%3B%0Avar%20key%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%2C%20deleteCount)%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%0Avar%20api%20%3D%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%20s%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%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%7C%5B%5Cs%3B%5D)--%5B%5E%3B%7B%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%7C%5B%5Cs%3B%5D)%3F--%5B%5E%3B%7B%5D*%3F%3A%5B%5E%7B%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%0Areturn%20api%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.forEachStyleRule(rules%2C%20callback)%3B%0A%7D%0Areturn%20this.parser.stringify(rules%2C%20preserveProperties)%3B%0A%7D%2C%0AforRulesInStyles%3A%20function%20(styles%2C%20callback)%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.forEachStyleRule(this.rulesForStyle(s)%2C%20callback)%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%0AclearStyleRules%3A%20function%20(style)%20%7B%0Astyle.__cssRules%20%3D%20null%3B%0A%7D%2C%0AforEachStyleRule%3A%20function%20(node%2C%20callback)%20%7B%0Aif%20(!node)%20%7B%0Areturn%3B%0A%7D%0Avar%20s%20%3D%20node.parsedSelector%3B%0Avar%20skipRules%20%3D%20false%3B%0Aif%20(node.type%20%3D%3D%3D%20this.ruleTypes.STYLE_RULE)%20%7B%0Acallback(node)%3B%0A%7D%20else%20if%20(node.type%20%3D%3D%3D%20this.ruleTypes.KEYFRAMES_RULE%20%7C%7C%20node.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.forEachStyleRule(r%2C%20callback)%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.DomApi.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%20c%20%2B%20(c%20%3F%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%2C%20text%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%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%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(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)(%5B%5E%5Cs%3E%2B~%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(%5C%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%5C%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%5C%3A%5C%3Acontent%7C%5C%3A%5C%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%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.forEachStyleRule(rules%2C%20function%20(rule)%20%7B%0Avar%20map%20%3D%20self._mapRule(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_mapRule%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%0Aif%20(cssText)%20%7B%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%0Anode.className%20%3D%20self._scopeElementClass(node%2C%20node.className)%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%0An.className%20%3D%20self._scopeElementClass(n%2C%20n.className)%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%3B%0AstyleUtil.forRulesInStyles(styles%2C%20function%20(rule)%20%7B%0Aself.decorateRule(rule)%3B%0Aself.collectPropertiesInCssText(rule.propertyInfo.cssText%2C%20props)%3B%0A%7D)%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%0Avar%20customCssText%20%3D%20''%3B%0Avar%20cssText%20%3D%20rule.parsedCssText%3B%0AcssText%20%3D%20cssText.replace(this.rx.BRACKETED%2C%20'').replace(this.rx.VAR_ASSIGN%2C%20'')%3B%0Avar%20parts%20%3D%20cssText.split('%3B')%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%0Aif%20(p.match(this.rx.MIXIN_MATCH)%20%7C%7C%20p.match(this.rx.VAR_MATCH))%20%7B%0AcustomCssText%20%2B%3D%20p%20%2B%20'%3B%5Cn'%3B%0A%7D%0A%7D%0Areturn%20customCssText%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%20pp%20%3D%20p.split('%3A')%3B%0Aif%20(pp%5B1%5D)%20%7B%0App%5B1%5D%20%3D%20pp%5B1%5D.trim()%3B%0App%5B1%5D%20%3D%20this.valueForProperty(pp%5B1%5D%2C%20props)%20%7C%7C%20pp%5B1%5D%3B%0A%7D%0Ap%20%3D%20pp.join('%3A')%3B%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.filter(function%20(v)%20%7B%0Areturn%20v%3B%0A%7D).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%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%0Areturn%20styleTransformer.elementStyles(element%2C%20function%20(rule)%20%7B%0Aself.applyProperties(rule%2C%20properties)%3B%0Aif%20(rule.cssText%20%26%26%20!nativeShadow)%20%7B%0Aself._scopeSelector(rule%2C%20hostRx%2C%20hostSelector%2C%20element._scopeCssViaAttr%2C%20scopeSelector)%3B%0A%7D%0A%7D)%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%20hostSelector%20%2B%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.className%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.className%20%3D%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%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%20styleUtil%20%3D%20Polymer.StyleUtil%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%20styleUtil%20%3D%20Polymer.StyleUtil%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%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%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%2B%3D%20(selector%20%3F%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._prepStyleProperties()%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._setupConfigure()%3B%0Athis._setupStyleProperties()%3B%0Athis._setupDebouncers()%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%20nativeShadow%20%3D%20Polymer.Settings.useNativeShadow%3B%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.forEachStyleRule(styleUtil.rulesForStyle(e)%2C%20function%20(rule)%20%7B%0AstyleTransformer.documentRule(rule)%3B%0A%7D)%3B%0Avar%20self%20%3D%20this%3B%0Afunction%20fn()%20%7B%0Aself._applyCustomProperties(e)%3B%0A%7D%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%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_debounceTemplate%3A%20function%20(fn)%20%7B%0APolymer.dom.addDebouncer(this.debounce('_debounceTemplate'%2C%20fn))%3B%0A%7D%2C%0A_flushTemplates%3A%20function%20(debouncerExpired)%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(var%20prop%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%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%0Amodel%5Bprop%5D%20%3D%20templatized%5Bthis._parentPropPrefix%20%2B%20prop%5D%3B%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%0Akey%20%3D%20this._parseKey(key)%3B%0Athis._removeFromMap(this.store%5Bkey%5D)%3B%0Adelete%20this.store%5Bkey%5D%3B%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%5B0%5D%20%3D%3D%20'%23')%20%7B%0Areturn%20key.slice(1)%3B%0A%7D%0Athrow%20new%20Error('unexpected%20key%20'%20%2B%20key)%3B%0A%7D%2C%0AsetItem%3A%20function%20(key%2C%20item)%20%7B%0Akey%20%3D%20this._parseKey(key)%3B%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%2C%0AgetItem%3A%20function%20(key)%20%7B%0Akey%20%3D%20this._parseKey(key)%3B%0Areturn%20this.store%5Bkey%5D%3B%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(var%20j%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(var%20key%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%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%20computed%3A%20'_computeFrameTime(targetFramerate)'%20%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%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%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%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%0Avar%20c%20%3D%20this.collection%3B%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.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(var%20i%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%20instances%20%3D%20this._instances%3B%0Avar%20keyMap%20%3D%20%7B%7D%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%0Avar%20key%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(var%20j%20%3D%200%3B%20j%20%3C%20s.added.length%3B%20j%2B%2B)%20%7B%0Avar%20key%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(var%20key%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(var%20i%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(var%20i%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%0Avar%20c%20%3D%20this.collection%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%0Athis._detachAndRemoveInstance(s.index)%3B%0A%7D%0Afor%20(var%20j%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%0Athis._teardownInstance()%3B%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%0Aif%20(!this._instance)%20%7B%0Avar%20parentNode%20%3D%20Polymer.dom(this).parentNode%3B%0Aif%20(parentNode)%20%7B%0Avar%20parent%20%3D%20Polymer.dom(parentNode)%3B%0Athis._instance%20%3D%20this.stamp()%3B%0Avar%20root%20%3D%20this._instance.root%3B%0Aparent.insertBefore(root%2C%20this)%3B%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%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%0Aself._markImportsReady()%3B%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.DomApi.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%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-2.js%0A
7 ms
javascript;charset=utf-8,%0A%0A%20%20(function()%20%7B%0A%0A%20%20%20%20%2F%2F%20monostate%20data%0A%20%20%20%20var%20metaDatas%20%3D%20%7B%7D%3B%0A%20%20%20%20var%20metaArrays%20%3D%20%7B%7D%3B%0A%20%20%20%20var%20singleton%20%3D%20null%3B%0A%0A%20%20%20%20Polymer.IronMeta%20%3D%20Polymer(%7B%0A%0A%20%20%20%20%20%20is%3A%20'iron-meta'%2C%0A%0A%20%20%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20type%20of%20meta-data.%20%20All%20meta-data%20of%20the%20same%20type%20is%20stored%0A%20%20%20%20%20%20%20%20%20*%20together.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20type%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20'default'%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_typeChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20key%20used%20to%20store%20%60value%60%20under%20the%20%60type%60%20namespace.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20key%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_keyChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20meta-data%20to%20store%20or%20retrieve.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20value%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_valueChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20%60value%60%20is%20set%20to%20the%20iron-meta%20instance%20itself.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20self%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_selfChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Array%20of%20all%20meta-data%20values%20for%20the%20given%20type.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20list%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Array%2C%0A%20%20%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20%20%20hidden%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Only%20runs%20if%20someone%20invokes%20the%20factory%2Fconstructor%20directly%0A%20%20%20%20%20%20%20*%20e.g.%20%60new%20Polymer.IronMeta()%60%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B%7Btype%3A%20(string%7Cundefined)%2C%20key%3A%20(string%7Cundefined)%2C%20value%7D%3D%7D%20config%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20factoryImpl%3A%20function(config)%20%7B%0A%20%20%20%20%20%20%20%20if%20(config)%20%7B%0A%20%20%20%20%20%20%20%20%20%20for%20(var%20n%20in%20config)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20switch(n)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20case%20'type'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20case%20'key'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20case%20'value'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this%5Bn%5D%20%3D%20config%5Bn%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20created%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20TODO(sjmiles)%3A%20good%20for%20debugging%3F%0A%20%20%20%20%20%20%20%20this._metaDatas%20%3D%20metaDatas%3B%0A%20%20%20%20%20%20%20%20this._metaArrays%20%3D%20metaArrays%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_keyChanged%3A%20function(key%2C%20old)%20%7B%0A%20%20%20%20%20%20%20%20this._resetRegistration(old)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_valueChanged%3A%20function(value)%20%7B%0A%20%20%20%20%20%20%20%20this._resetRegistration(this.key)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_selfChanged%3A%20function(self)%20%7B%0A%20%20%20%20%20%20%20%20if%20(self)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.value%20%3D%20this%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_typeChanged%3A%20function(type)%20%7B%0A%20%20%20%20%20%20%20%20this._unregisterKey(this.key)%3B%0A%20%20%20%20%20%20%20%20if%20(!metaDatas%5Btype%5D)%20%7B%0A%20%20%20%20%20%20%20%20%20%20metaDatas%5Btype%5D%20%3D%20%7B%7D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20this._metaData%20%3D%20metaDatas%5Btype%5D%3B%0A%20%20%20%20%20%20%20%20if%20(!metaArrays%5Btype%5D)%20%7B%0A%20%20%20%20%20%20%20%20%20%20metaArrays%5Btype%5D%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20this.list%20%3D%20metaArrays%5Btype%5D%3B%0A%20%20%20%20%20%20%20%20this._registerKeyValue(this.key%2C%20this.value)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Retrieves%20meta%20data%20value%20by%20key.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40method%20byKey%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20key%20The%20key%20of%20the%20meta-data%20to%20be%20returned.%0A%20%20%20%20%20%20%20*%20%40return%20%7B*%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20byKey%3A%20function(key)%20%7B%0A%20%20%20%20%20%20%20%20return%20this._metaData%20%26%26%20this._metaData%5Bkey%5D%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_resetRegistration%3A%20function(oldKey)%20%7B%0A%20%20%20%20%20%20%20%20this._unregisterKey(oldKey)%3B%0A%20%20%20%20%20%20%20%20this._registerKeyValue(this.key%2C%20this.value)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_unregisterKey%3A%20function(key)%20%7B%0A%20%20%20%20%20%20%20%20this._unregister(key%2C%20this._metaData%2C%20this.list)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_registerKeyValue%3A%20function(key%2C%20value)%20%7B%0A%20%20%20%20%20%20%20%20this._register(key%2C%20value%2C%20this._metaData%2C%20this.list)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_register%3A%20function(key%2C%20value%2C%20data%2C%20list)%20%7B%0A%20%20%20%20%20%20%20%20if%20(key%20%26%26%20data%20%26%26%20value%20!%3D%3D%20undefined)%20%7B%0A%20%20%20%20%20%20%20%20%20%20data%5Bkey%5D%20%3D%20value%3B%0A%20%20%20%20%20%20%20%20%20%20list.push(value)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_unregister%3A%20function(key%2C%20data%2C%20list)%20%7B%0A%20%20%20%20%20%20%20%20if%20(key%20%26%26%20data)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(key%20in%20data)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20value%20%3D%20data%5Bkey%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20delete%20data%5Bkey%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.arrayDelete(list%2C%20value)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D)%3B%0A%0A%20%20%20%20Polymer.IronMeta.getIronMeta%20%3D%20function%20getIronMeta()%20%7B%0A%20%20%20%20%20%20%20if%20(singleton%20%3D%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20singleton%20%3D%20new%20Polymer.IronMeta()%3B%0A%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20return%20singleton%3B%0A%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%60iron-meta-query%60%20can%20be%20used%20to%20access%20infomation%20stored%20in%20%60iron-meta%60.%0A%0A%20%20%20%20Examples%3A%0A%0A%20%20%20%20If%20I%20create%20an%20instance%20like%20this%3A%0A%0A%20%20%20%20%20%20%20%20%3Ciron-meta%20key%3D%22info%22%20value%3D%22foo%2Fbar%22%3E%3C%2Firon-meta%3E%0A%0A%20%20%20%20Note%20that%20value%3D%22foo%2Fbar%22%20is%20the%20metadata%20I've%20defined.%20I%20could%20define%20more%0A%20%20%20%20attributes%20or%20use%20child%20nodes%20to%20define%20additional%20metadata.%0A%0A%20%20%20%20Now%20I%20can%20access%20that%20element%20(and%20it's%20metadata)%20from%20any%20%60iron-meta-query%60%20instance%3A%0A%0A%20%20%20%20%20%20%20%20%20var%20value%20%3D%20new%20Polymer.IronMetaQuery(%7Bkey%3A%20'info'%7D).value%3B%0A%0A%20%20%20%20%40group%20Polymer%20Iron%20Elements%0A%20%20%20%20%40element%20iron-meta-query%0A%20%20%20%20*%2F%0A%20%20%20%20Polymer.IronMetaQuery%20%3D%20Polymer(%7B%0A%0A%20%20%20%20%20%20is%3A%20'iron-meta-query'%2C%0A%0A%20%20%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20type%20of%20meta-data.%20%20All%20meta-data%20of%20the%20same%20type%20is%20stored%0A%20%20%20%20%20%20%20%20%20*%20together.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20type%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20'default'%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_typeChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Specifies%20a%20key%20to%20use%20for%20retrieving%20%60value%60%20from%20the%20%60type%60%0A%20%20%20%20%20%20%20%20%20*%20namespace.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20key%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_keyChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20meta-data%20to%20store%20or%20retrieve.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20value%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Array%20of%20all%20meta-data%20values%20for%20the%20given%20type.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20list%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Array%2C%0A%20%20%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Actually%20a%20factory%20method%2C%20not%20a%20true%20constructor.%20Only%20runs%20if%0A%20%20%20%20%20%20%20*%20someone%20invokes%20it%20directly%20(via%20%60new%20Polymer.IronMeta()%60)%3B%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7B%7Btype%3A%20(string%7Cundefined)%2C%20key%3A%20(string%7Cundefined)%7D%3D%7D%20config%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20factoryImpl%3A%20function(config)%20%7B%0A%20%20%20%20%20%20%20%20if%20(config)%20%7B%0A%20%20%20%20%20%20%20%20%20%20for%20(var%20n%20in%20config)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20switch(n)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20case%20'type'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20case%20'key'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this%5Bn%5D%20%3D%20config%5Bn%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20created%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20TODO(sjmiles)%3A%20good%20for%20debugging%3F%0A%20%20%20%20%20%20%20%20this._metaDatas%20%3D%20metaDatas%3B%0A%20%20%20%20%20%20%20%20this._metaArrays%20%3D%20metaArrays%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_keyChanged%3A%20function(key)%20%7B%0A%20%20%20%20%20%20%20%20this._setValue(this._metaData%20%26%26%20this._metaData%5Bkey%5D)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_typeChanged%3A%20function(type)%20%7B%0A%20%20%20%20%20%20%20%20this._metaData%20%3D%20metaDatas%5Btype%5D%3B%0A%20%20%20%20%20%20%20%20this.list%20%3D%20metaArrays%5Btype%5D%3B%0A%20%20%20%20%20%20%20%20if%20(this.key)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._keyChanged(this.key)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Retrieves%20meta%20data%20value%20by%20key.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20key%20The%20key%20of%20the%20meta-data%20to%20be%20returned.%0A%20%20%20%20%20%20%20*%20%40return%20%7B*%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20byKey%3A%20function(key)%20%7B%0A%20%20%20%20%20%20%20%20return%20this._metaData%20%26%26%20this._metaData%5Bkey%5D%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D)%3B%0A%0A%20%20%7D)()%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-3.js%0A
0 ms
javascript;charset=utf-8,%0A%0A%20%20%20%20Polymer(%7B%0A%0A%20%20%20%20%20%20is%3A%20'iron-icon'%2C%0A%0A%20%20%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20name%20of%20the%20icon%20to%20use.%20The%20name%20should%20be%20of%20the%20form%3A%0A%20%20%20%20%20%20%20%20%20*%20%60iconset_name%3Aicon_name%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20icon%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_iconChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20name%20of%20the%20theme%20to%20used%2C%20if%20one%20is%20specified%20by%20the%0A%20%20%20%20%20%20%20%20%20*%20iconset.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20theme%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_updateIcon'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20If%20using%20iron-icon%20without%20an%20iconset%2C%20you%20can%20set%20the%20src%20to%20be%0A%20%20%20%20%20%20%20%20%20*%20the%20URL%20of%20an%20individual%20icon%20image%20file.%20Note%20that%20this%20will%20take%0A%20%20%20%20%20%20%20%20%20*%20precedence%20over%20a%20given%20icon%20attribute.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20src%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_srcChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20%40type%20%7B!Polymer.IronMeta%7D%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_meta%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%3A%20Polymer.Base.create('iron-meta'%2C%20%7Btype%3A%20'iconset'%7D)%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_DEFAULT_ICONSET%3A%20'icons'%2C%0A%0A%20%20%20%20%20%20_iconChanged%3A%20function(icon)%20%7B%0A%20%20%20%20%20%20%20%20var%20parts%20%3D%20(icon%20%7C%7C%20'').split('%3A')%3B%0A%20%20%20%20%20%20%20%20this._iconName%20%3D%20parts.pop()%3B%0A%20%20%20%20%20%20%20%20this._iconsetName%20%3D%20parts.pop()%20%7C%7C%20this._DEFAULT_ICONSET%3B%0A%20%20%20%20%20%20%20%20this._updateIcon()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_srcChanged%3A%20function(src)%20%7B%0A%20%20%20%20%20%20%20%20this._updateIcon()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_usesIconset%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.icon%20%7C%7C%20!this.src%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%20%40suppress%20%7Bvisibility%7D%20*%2F%0A%20%20%20%20%20%20_updateIcon%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(this._usesIconset())%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(this._iconsetName)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._iconset%20%3D%20%2F**%20%40type%20%7B%3FPolymer.Iconset%7D%20*%2F%20(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._meta.byKey(this._iconsetName))%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this._iconset)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._iconset.applyIcon(this%2C%20this._iconName%2C%20this.theme)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.unlisten(window%2C%20'iron-iconset-added'%2C%20'_updateIcon')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.listen(window%2C%20'iron-iconset-added'%2C%20'_updateIcon')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!this._img)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._img%20%3D%20document.createElement('img')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._img.style.width%20%3D%20'100%25'%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._img.style.height%20%3D%20'100%25'%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._img.draggable%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20this._img.src%20%3D%20this.src%3B%0A%20%20%20%20%20%20%20%20%20%20Polymer.dom(this.root).appendChild(this._img)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D)%3B%0A%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-4.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%2F**%0A%20%20%20*%20The%20%60iron-iconset-svg%60%20element%20allows%20users%20to%20define%20their%20own%20icon%20sets%0A%20%20%20*%20that%20contain%20svg%20icons.%20The%20svg%20icon%20elements%20should%20be%20children%20of%20the%0A%20%20%20*%20%60iron-iconset-svg%60%20element.%20Multiple%20icons%20should%20be%20given%20distinct%20id's.%0A%20%20%20*%0A%20%20%20*%20Using%20svg%20elements%20to%20create%20icons%20has%20a%20few%20advantages%20over%20traditional%0A%20%20%20*%20bitmap%20graphics%20like%20jpg%20or%20png.%20Icons%20that%20use%20svg%20are%20vector%20based%20so%0A%20%20%20*%20they%20are%20resolution%20independent%20and%20should%20look%20good%20on%20any%20device.%20They%0A%20%20%20*%20are%20stylable%20via%20css.%20Icons%20can%20be%20themed%2C%20colorized%2C%20and%20even%20animated.%0A%20%20%20*%0A%20%20%20*%20Example%3A%0A%20%20%20*%0A%20%20%20*%20%20%20%20%20%3Ciron-iconset-svg%20name%3D%22my-svg-icons%22%20size%3D%2224%22%3E%0A%20%20%20*%20%20%20%20%20%20%20%3Csvg%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%3Cdefs%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%3Cg%20id%3D%22shape%22%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%20%20%3Crect%20x%3D%2212%22%20y%3D%220%22%20width%3D%2212%22%20height%3D%2224%22%20%2F%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2212%22%20%2F%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%20%20%3C%2Fg%3E%0A%20%20%20*%20%20%20%20%20%20%20%20%20%3C%2Fdefs%3E%0A%20%20%20*%20%20%20%20%20%20%20%3C%2Fsvg%3E%0A%20%20%20*%20%20%20%20%20%3C%2Firon-iconset-svg%3E%0A%20%20%20*%0A%20%20%20*%20This%20will%20automatically%20register%20the%20icon%20set%20%22my-svg-icons%22%20to%20the%20iconset%0A%20%20%20*%20database.%20%20To%20use%20these%20icons%20from%20within%20another%20element%2C%20make%20a%0A%20%20%20*%20%60iron-iconset%60%20element%20and%20call%20the%20%60byId%60%20method%0A%20%20%20*%20to%20retrieve%20a%20given%20iconset.%20To%20apply%20a%20particular%20icon%20inside%20an%0A%20%20%20*%20element%20use%20the%20%60applyIcon%60%20method.%20For%20example%3A%0A%20%20%20*%0A%20%20%20*%20%20%20%20%20iconset.applyIcon(iconNode%2C%20'car')%3B%0A%20%20%20*%0A%20%20%20*%20%40element%20iron-iconset-svg%0A%20%20%20*%20%40demo%20demo%2Findex.html%0A%20%20%20*%20%40implements%20%7BPolymer.Iconset%7D%0A%20%20%20*%2F%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'iron-iconset-svg'%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20name%20of%20the%20iconset.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20name%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_nameChanged'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20size%20of%20an%20individual%20icon.%20Note%20that%20icons%20must%20be%20square.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20size%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20value%3A%2024%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20this.style.display%20%3D%20'none'%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Construct%20an%20array%20of%20all%20icon%20names%20in%20this%20iconset.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7B!Array%7D%20Array%20of%20icon%20names.%0A%20%20%20%20%20*%2F%0A%20%20%20%20getIconNames%3A%20function()%20%7B%0A%20%20%20%20%20%20this._icons%20%3D%20this._createIconMap()%3B%0A%20%20%20%20%20%20return%20Object.keys(this._icons).map(function(n)%20%7B%0A%20%20%20%20%20%20%20%20return%20this.name%20%2B%20'%3A'%20%2B%20n%3B%0A%20%20%20%20%20%20%7D%2C%20this)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Applies%20an%20icon%20to%20the%20given%20element.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20An%20svg%20icon%20is%20prepended%20to%20the%20element's%20shadowRoot%20if%20it%20exists%2C%0A%20%20%20%20%20*%20otherwise%20to%20the%20element%20itself.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20applyIcon%0A%20%20%20%20%20*%20%40param%20%7BElement%7D%20element%20Element%20to%20which%20the%20icon%20is%20applied.%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20iconName%20Name%20of%20the%20icon%20to%20apply.%0A%20%20%20%20%20*%20%40return%20%7B%3FElement%7D%20The%20svg%20element%20which%20renders%20the%20icon.%0A%20%20%20%20%20*%2F%0A%20%20%20%20applyIcon%3A%20function(element%2C%20iconName)%20%7B%0A%20%20%20%20%20%20%2F%2F%20insert%20svg%20element%20into%20shadow%20root%2C%20if%20it%20exists%0A%20%20%20%20%20%20element%20%3D%20element.root%20%7C%7C%20element%3B%0A%20%20%20%20%20%20%2F%2F%20Remove%20old%20svg%20element%0A%20%20%20%20%20%20this.removeIcon(element)%3B%0A%20%20%20%20%20%20%2F%2F%20install%20new%20svg%20element%0A%20%20%20%20%20%20var%20svg%20%3D%20this._cloneIcon(iconName)%3B%0A%20%20%20%20%20%20if%20(svg)%20%7B%0A%20%20%20%20%20%20%20%20var%20pde%20%3D%20Polymer.dom(element)%3B%0A%20%20%20%20%20%20%20%20pde.insertBefore(svg%2C%20pde.childNodes%5B0%5D)%3B%0A%20%20%20%20%20%20%20%20return%20element._svgIcon%20%3D%20svg%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20null%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Remove%20an%20icon%20from%20the%20given%20element%20by%20undoing%20the%20changes%20effected%0A%20%20%20%20%20*%20by%20%60applyIcon%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BElement%7D%20element%20The%20element%20from%20which%20the%20icon%20is%20removed.%0A%20%20%20%20%20*%2F%0A%20%20%20%20removeIcon%3A%20function(element)%20%7B%0A%20%20%20%20%20%20%2F%2F%20Remove%20old%20svg%20element%0A%20%20%20%20%20%20if%20(element._svgIcon)%20%7B%0A%20%20%20%20%20%20%20%20Polymer.dom(element).removeChild(element._svgIcon)%3B%0A%20%20%20%20%20%20%20%20element._svgIcon%20%3D%20null%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20When%20name%20is%20changed%2C%20register%20iconset%20metadata%0A%20%20%20%20%20*%0A%20%20%20%20%20*%2F%0A%20%20%20%20_nameChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20new%20Polymer.IronMeta(%7Btype%3A%20'iconset'%2C%20key%3A%20this.name%2C%20value%3A%20this%7D)%3B%0A%20%20%20%20%20%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20this.fire('iron-iconset-added'%2C%20this%2C%20%7Bnode%3A%20window%7D)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Create%20a%20map%20of%20child%20SVG%20elements%20by%20id.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7B!Object%7D%20Map%20of%20id's%20to%20SVG%20elements.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_createIconMap%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20Objects%20chained%20to%20Object.prototype%20(%60%7B%7D%60)%20have%20members.%20Specifically%2C%0A%20%20%20%20%20%20%2F%2F%20on%20FF%20there%20is%20a%20%60watch%60%20method%20that%20confuses%20the%20icon%20map%2C%20so%20we%0A%20%20%20%20%20%20%2F%2F%20need%20to%20use%20a%20null-based%20object%20here.%0A%20%20%20%20%20%20var%20icons%20%3D%20Object.create(null)%3B%0A%20%20%20%20%20%20Polymer.dom(this).querySelectorAll('%5Bid%5D')%0A%20%20%20%20%20%20%20%20.forEach(function(icon)%20%7B%0A%20%20%20%20%20%20%20%20%20%20icons%5Bicon.id%5D%20%3D%20icon%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20return%20icons%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Produce%20installable%20clone%20of%20the%20SVG%20element%20matching%20%60id%60%20in%20this%0A%20%20%20%20%20*%20iconset%2C%20or%20%60undefined%60%20if%20there%20is%20no%20matching%20element.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7BElement%7D%20Returns%20an%20installable%20clone%20of%20the%20SVG%20element%0A%20%20%20%20%20*%20matching%20%60id%60.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_cloneIcon%3A%20function(id)%20%7B%0A%20%20%20%20%20%20%2F%2F%20create%20the%20icon%20map%20on-demand%2C%20since%20the%20iconset%20itself%20has%20no%20discrete%0A%20%20%20%20%20%20%2F%2F%20signal%20to%20know%20when%20it's%20children%20are%20fully%20parsed%0A%20%20%20%20%20%20this._icons%20%3D%20this._icons%20%7C%7C%20this._createIconMap()%3B%0A%20%20%20%20%20%20return%20this._prepareSvgClone(this._icons%5Bid%5D%2C%20this.size)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20%40param%20%7BElement%7D%20sourceSvg%0A%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20size%0A%20%20%20%20%20*%20%40return%20%7BElement%7D%0A%20%20%20%20%20*%2F%0A%20%20%20%20_prepareSvgClone%3A%20function(sourceSvg%2C%20size)%20%7B%0A%20%20%20%20%20%20if%20(sourceSvg)%20%7B%0A%20%20%20%20%20%20%20%20var%20content%20%3D%20sourceSvg.cloneNode(true)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20svg%20%3D%20document.createElementNS('http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%2C%20'svg')%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20viewBox%20%3D%20content.getAttribute('viewBox')%20%7C%7C%20'0%200%20'%20%2B%20size%20%2B%20'%20'%20%2B%20size%3B%0A%20%20%20%20%20%20%20%20svg.setAttribute('viewBox'%2C%20viewBox)%3B%0A%20%20%20%20%20%20%20%20svg.setAttribute('preserveAspectRatio'%2C%20'xMidYMid%20meet')%3B%0A%20%20%20%20%20%20%20%20%2F%2F%20TODO(dfreedm)%3A%20%60pointer-events%3A%20none%60%20works%20around%20https%3A%2F%2Fcrbug.com%2F370136%0A%20%20%20%20%20%20%20%20%2F%2F%20TODO(sjmiles)%3A%20inline%20style%20may%20not%20be%20ideal%2C%20but%20avoids%20requiring%20a%20shadow-root%0A%20%20%20%20%20%20%20%20svg.style.cssText%20%3D%20'pointer-events%3A%20none%3B%20display%3A%20block%3B%20width%3A%20100%25%3B%20height%3A%20100%25%3B'%3B%0A%20%20%20%20%20%20%20%20svg.appendChild(content).removeAttribute('id')%3B%0A%20%20%20%20%20%20%20%20return%20svg%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20null%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-5.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'iron-media-query'%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20Boolean%20return%20value%20of%20the%20media%20query.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20queryMatches%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20CSS%20media%20query%20to%20evaluate.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20query%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'queryChanged'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20query%20attribute%20is%20assumed%20to%20be%20a%20complete%20media%20query%0A%20%20%20%20%20%20%20*%20string%20rather%20than%20a%20single%20media%20feature.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20full%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20%40type%20%7Bfunction(MediaQueryList)%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20_boundMQHandler%3A%20%7B%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.queryHandler.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20%40type%20%7BMediaQueryList%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20_mq%3A%20%7B%0A%20%20%20%20%20%20%20%20value%3A%20null%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20this.style.display%20%3D%20'none'%3B%0A%20%20%20%20%20%20this.queryChanged()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20detached%3A%20function()%20%7B%0A%20%20%20%20%20%20this._remove()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_add%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._mq)%20%7B%0A%20%20%20%20%20%20%20%20this._mq.addListener(this._boundMQHandler)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_remove%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._mq)%20%7B%0A%20%20%20%20%20%20%20%20this._mq.removeListener(this._boundMQHandler)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._mq%20%3D%20null%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20queryChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20this._remove()%3B%0A%20%20%20%20%20%20var%20query%20%3D%20this.query%3B%0A%20%20%20%20%20%20if%20(!query)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!this.full%20%26%26%20query%5B0%5D%20!%3D%3D%20'(')%20%7B%0A%20%20%20%20%20%20%20%20query%20%3D%20'('%20%2B%20query%20%2B%20')'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._mq%20%3D%20window.matchMedia(query)%3B%0A%20%20%20%20%20%20this._add()%3B%0A%20%20%20%20%20%20this.queryHandler(this._mq)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20queryHandler%3A%20function(mq)%20%7B%0A%20%20%20%20%20%20this._setQueryMatches(mq.matches)%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D)%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-6.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20%40param%20%7B!Function%7D%20selectCallback%0A%20%20%20*%20%40constructor%0A%20%20%20*%2F%0A%20%20Polymer.IronSelection%20%3D%20function(selectCallback)%20%7B%0A%20%20%20%20this.selection%20%3D%20%5B%5D%3B%0A%20%20%20%20this.selectCallback%20%3D%20selectCallback%3B%0A%20%20%7D%3B%0A%0A%20%20Polymer.IronSelection.prototype%20%3D%20%7B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Retrieves%20the%20selected%20item(s).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20get%0A%20%20%20%20%20*%20%40returns%20Returns%20the%20selected%20item(s).%20If%20the%20multi%20property%20is%20true%2C%0A%20%20%20%20%20*%20%60get%60%20will%20return%20an%20array%2C%20otherwise%20it%20will%20return%0A%20%20%20%20%20*%20the%20selected%20item%20or%20undefined%20if%20there%20is%20no%20selection.%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%3A%20function()%20%7B%0A%20%20%20%20%20%20return%20this.multi%20%3F%20this.selection.slice()%20%3A%20this.selection%5B0%5D%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Clears%20all%20the%20selection%20except%20the%20ones%20indicated.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20clear%0A%20%20%20%20%20*%20%40param%20%7BArray%7D%20excludes%20items%20to%20be%20excluded.%0A%20%20%20%20%20*%2F%0A%20%20%20%20clear%3A%20function(excludes)%20%7B%0A%20%20%20%20%20%20this.selection.slice().forEach(function(item)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!excludes%20%7C%7C%20excludes.indexOf(item)%20%3C%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.setItemSelected(item%2C%20false)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%20this)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Indicates%20if%20a%20given%20item%20is%20selected.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20isSelected%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20item%20The%20item%20whose%20selection%20state%20should%20be%20checked.%0A%20%20%20%20%20*%20%40returns%20Returns%20true%20if%20%60item%60%20is%20selected.%0A%20%20%20%20%20*%2F%0A%20%20%20%20isSelected%3A%20function(item)%20%7B%0A%20%20%20%20%20%20return%20this.selection.indexOf(item)%20%3E%3D%200%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Sets%20the%20selection%20state%20for%20a%20given%20item%20to%20either%20selected%20or%20deselected.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20setItemSelected%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20item%20The%20item%20to%20select.%0A%20%20%20%20%20*%20%40param%20%7Bboolean%7D%20isSelected%20True%20for%20selected%2C%20false%20for%20deselected.%0A%20%20%20%20%20*%2F%0A%20%20%20%20setItemSelected%3A%20function(item%2C%20isSelected)%20%7B%0A%20%20%20%20%20%20if%20(item%20!%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20if%20(isSelected)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.selection.push(item)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20i%20%3D%20this.selection.indexOf(item)%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(i%20%3E%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.selection.splice(i%2C%201)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(this.selectCallback)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.selectCallback(item%2C%20isSelected)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Sets%20the%20selection%20state%20for%20a%20given%20item.%20If%20the%20%60multi%60%20property%0A%20%20%20%20%20*%20is%20true%2C%20then%20the%20selected%20state%20of%20%60item%60%20will%20be%20toggled%3B%20otherwise%0A%20%20%20%20%20*%20the%20%60item%60%20will%20be%20selected.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20select%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20item%20The%20item%20to%20select.%0A%20%20%20%20%20*%2F%0A%20%20%20%20select%3A%20function(item)%20%7B%0A%20%20%20%20%20%20if%20(this.multi)%20%7B%0A%20%20%20%20%20%20%20%20this.toggle(item)%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(this.get()%20!%3D%3D%20item)%20%7B%0A%20%20%20%20%20%20%20%20this.setItemSelected(this.get()%2C%20false)%3B%0A%20%20%20%20%20%20%20%20this.setItemSelected(item%2C%20true)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Toggles%20the%20selection%20state%20for%20%60item%60.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20toggle%0A%20%20%20%20%20*%20%40param%20%7B*%7D%20item%20The%20item%20to%20toggle.%0A%20%20%20%20%20*%2F%0A%20%20%20%20toggle%3A%20function(item)%20%7B%0A%20%20%20%20%20%20this.setItemSelected(item%2C%20!this.isSelected(item))%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-7.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%20%40polymerBehavior%20*%2F%0A%20%20Polymer.IronSelectableBehavior%20%3D%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Fired%20when%20iron-selector%20is%20activated%20(selected%20or%20deselected).%0A%20%20%20%20%20%20%20*%20It%20is%20fired%20before%20the%20selected%20items%20are%20changed.%0A%20%20%20%20%20%20%20*%20Cancel%20the%20event%20to%20abort%20selection.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20iron-activate%0A%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Fired%20when%20an%20item%20is%20selected%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20iron-select%0A%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Fired%20when%20an%20item%20is%20deselected%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20iron-deselect%0A%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Fired%20when%20the%20list%20of%20selectable%20items%20changes%20(e.g.%2C%20items%20are%0A%20%20%20%20%20%20%20*%20added%20or%20removed).%20The%20detail%20of%20the%20event%20is%20a%20list%20of%20mutation%0A%20%20%20%20%20%20%20*%20records%20that%20describe%20what%20changed.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20iron-items-changed%0A%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you%20want%20to%20use%20the%20attribute%20value%20of%20an%20element%20for%20%60selected%60%20instead%20of%20the%20index%2C%0A%20%20%20%20%20%20%20*%20set%20this%20to%20the%20name%20of%20the%20attribute.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20attrForSelected%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20null%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Gets%20or%20sets%20the%20selected%20element.%20The%20default%20is%20to%20use%20the%20index%20of%20the%20item.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20selected%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Returns%20the%20currently%20selected%20item.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40type%20%7B%3FObject%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20selectedItem%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20event%20that%20fires%20from%20items%20when%20they%20are%20selected.%20Selectable%0A%20%20%20%20%20%20%20*%20will%20listen%20for%20this%20event%20from%20items%20and%20update%20the%20selection%20state.%0A%20%20%20%20%20%20%20*%20Set%20to%20empty%20string%20to%20listen%20to%20no%20events.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20activateEvent%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'tap'%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_activateEventChanged'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20This%20is%20a%20CSS%20selector%20string.%20%20If%20this%20is%20set%2C%20only%20items%20that%20match%20the%20CSS%20selector%0A%20%20%20%20%20%20%20*%20are%20selectable.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20selectable%3A%20String%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20class%20to%20set%20on%20elements%20when%20selected.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20selectedClass%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'iron-selected'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20attribute%20to%20set%20on%20elements%20when%20selected.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20selectedAttribute%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20null%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20list%20of%20items%20from%20which%20a%20selection%20can%20be%20made.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20items%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Array%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20set%20of%20excluded%20elements%20where%20the%20key%20is%20the%20%60localName%60%0A%20%20%20%20%20%20%20*%20of%20the%20element%20that%20will%20be%20ignored%20from%20the%20item%20list.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40default%20%7Btemplate%3A%201%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20_excludedLocalNames%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20'template'%3A%201%0A%20%20%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_updateSelected(attrForSelected%2C%20selected)'%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20created%3A%20function()%20%7B%0A%20%20%20%20%20%20this._bindFilterItem%20%3D%20this._filterItem.bind(this)%3B%0A%20%20%20%20%20%20this._selection%20%3D%20new%20Polymer.IronSelection(this._applySelection.bind(this))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20this._observer%20%3D%20this._observeItems(this)%3B%0A%20%20%20%20%20%20this._updateItems()%3B%0A%20%20%20%20%20%20if%20(!this._shouldUpdateSelection)%20%7B%0A%20%20%20%20%20%20%20%20this._updateSelected(this.attrForSelected%2Cthis.selected)%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._addListener(this.activateEvent)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20detached%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._observer)%20%7B%0A%20%20%20%20%20%20%20%20Polymer.dom(this).unobserveNodes(this._observer)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._removeListener(this.activateEvent)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20the%20index%20of%20the%20given%20item.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20indexOf%0A%20%20%20%20%20*%20%40param%20%7BObject%7D%20item%0A%20%20%20%20%20*%20%40returns%20Returns%20the%20index%20of%20the%20item%0A%20%20%20%20%20*%2F%0A%20%20%20%20indexOf%3A%20function(item)%20%7B%0A%20%20%20%20%20%20return%20this.items.indexOf(item)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Selects%20the%20given%20value.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20select%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20value%20the%20value%20to%20select.%0A%20%20%20%20%20*%2F%0A%20%20%20%20select%3A%20function(value)%20%7B%0A%20%20%20%20%20%20this.selected%20%3D%20value%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Selects%20the%20previous%20item.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20selectPrevious%0A%20%20%20%20%20*%2F%0A%20%20%20%20selectPrevious%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20length%20%3D%20this.items.length%3B%0A%20%20%20%20%20%20var%20index%20%3D%20(Number(this._valueToIndex(this.selected))%20-%201%20%2B%20length)%20%25%20length%3B%0A%20%20%20%20%20%20this.selected%20%3D%20this._indexToValue(index)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Selects%20the%20next%20item.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20selectNext%0A%20%20%20%20%20*%2F%0A%20%20%20%20selectNext%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20index%20%3D%20(Number(this._valueToIndex(this.selected))%20%2B%201)%20%25%20this.items.length%3B%0A%20%20%20%20%20%20this.selected%20%3D%20this._indexToValue(index)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_shouldUpdateSelection()%20%7B%0A%20%20%20%20%20%20return%20this.selected%20!%3D%20null%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_addListener%3A%20function(eventName)%20%7B%0A%20%20%20%20%20%20this.listen(this%2C%20eventName%2C%20'_activateHandler')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_removeListener%3A%20function(eventName)%20%7B%0A%20%20%20%20%20%20this.unlisten(this%2C%20eventName%2C%20'_activateHandler')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_activateEventChanged%3A%20function(eventName%2C%20old)%20%7B%0A%20%20%20%20%20%20this._removeListener(old)%3B%0A%20%20%20%20%20%20this._addListener(eventName)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_updateItems%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20nodes%20%3D%20Polymer.dom(this).queryDistributedElements(this.selectable%20%7C%7C%20'*')%3B%0A%20%20%20%20%20%20nodes%20%3D%20Array.prototype.filter.call(nodes%2C%20this._bindFilterItem)%3B%0A%20%20%20%20%20%20this._setItems(nodes)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_updateSelected%3A%20function()%20%7B%0A%20%20%20%20%20%20this._selectSelected(this.selected)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_selectSelected%3A%20function(selected)%20%7B%0A%20%20%20%20%20%20this._selection.select(this._valueToItem(this.selected))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_filterItem%3A%20function(node)%20%7B%0A%20%20%20%20%20%20return%20!this._excludedLocalNames%5Bnode.localName%5D%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_valueToItem%3A%20function(value)%20%7B%0A%20%20%20%20%20%20return%20(value%20%3D%3D%20null)%20%3F%20null%20%3A%20this.items%5Bthis._valueToIndex(value)%5D%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_valueToIndex%3A%20function(value)%20%7B%0A%20%20%20%20%20%20if%20(this.attrForSelected)%20%7B%0A%20%20%20%20%20%20%20%20for%20(var%20i%20%3D%200%2C%20item%3B%20item%20%3D%20this.items%5Bi%5D%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(this._valueForItem(item)%20%3D%3D%20value)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20i%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20return%20Number(value)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_indexToValue%3A%20function(index)%20%7B%0A%20%20%20%20%20%20if%20(this.attrForSelected)%20%7B%0A%20%20%20%20%20%20%20%20var%20item%20%3D%20this.items%5Bindex%5D%3B%0A%20%20%20%20%20%20%20%20if%20(item)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._valueForItem(item)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20return%20index%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_valueForItem%3A%20function(item)%20%7B%0A%20%20%20%20%20%20return%20item%5Bthis.attrForSelected%5D%20%7C%7C%20item.getAttribute(this.attrForSelected)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_applySelection%3A%20function(item%2C%20isSelected)%20%7B%0A%20%20%20%20%20%20if%20(this.selectedClass)%20%7B%0A%20%20%20%20%20%20%20%20this.toggleClass(this.selectedClass%2C%20isSelected%2C%20item)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(this.selectedAttribute)%20%7B%0A%20%20%20%20%20%20%20%20this.toggleAttribute(this.selectedAttribute%2C%20isSelected%2C%20item)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._selectionChange()%3B%0A%20%20%20%20%20%20this.fire('iron-'%20%2B%20(isSelected%20%3F%20'select'%20%3A%20'deselect')%2C%20%7Bitem%3A%20item%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_selectionChange%3A%20function()%20%7B%0A%20%20%20%20%20%20this._setSelectedItem(this._selection.get())%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20observe%20items%20change%20under%20the%20given%20node.%0A%20%20%20%20_observeItems%3A%20function(node)%20%7B%0A%20%20%20%20%20%20return%20Polymer.dom(node).observeNodes(function(mutations)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20Let%20other%20interested%20parties%20know%20about%20the%20change%20so%20that%0A%20%20%20%20%20%20%20%20%2F%2F%20we%20don't%20have%20to%20recreate%20mutation%20observers%20everywher.%0A%20%20%20%20%20%20%20%20this.fire('iron-items-changed'%2C%20mutations%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20bubbles%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20cancelable%3A%20false%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20this._updateItems()%3B%0A%0A%20%20%20%20%20%20%20%20if%20(this._shouldUpdateSelection)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._updateSelected()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_activateHandler%3A%20function(e)%20%7B%0A%20%20%20%20%20%20var%20t%20%3D%20e.target%3B%0A%20%20%20%20%20%20var%20items%20%3D%20this.items%3B%0A%20%20%20%20%20%20while%20(t%20%26%26%20t%20!%3D%20this)%20%7B%0A%20%20%20%20%20%20%20%20var%20i%20%3D%20items.indexOf(t)%3B%0A%20%20%20%20%20%20%20%20if%20(i%20%3E%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20value%20%3D%20this._indexToValue(i)%3B%0A%20%20%20%20%20%20%20%20%20%20this._itemActivate(value%2C%20t)%3B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20t%20%3D%20t.parentNode%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_itemActivate%3A%20function(value%2C%20item)%20%7B%0A%20%20%20%20%20%20if%20(!this.fire('iron-activate'%2C%0A%20%20%20%20%20%20%20%20%20%20%7Bselected%3A%20value%2C%20item%3A%20item%7D%2C%20%7Bcancelable%3A%20true%7D).defaultPrevented)%20%7B%0A%20%20%20%20%20%20%20%20this.select(value)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-8.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%2F**%20%40polymerBehavior%20Polymer.IronMultiSelectableBehavior%20*%2F%0A%20%20Polymer.IronMultiSelectableBehaviorImpl%20%3D%20%7B%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20multiple%20selections%20are%20allowed.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20multi%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'multiChanged'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Gets%20or%20sets%20the%20selected%20elements.%20This%20is%20used%20instead%20of%20%60selected%60%20when%20%60multi%60%0A%20%20%20%20%20%20%20*%20is%20true.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20selectedValues%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Array%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Returns%20an%20array%20of%20currently%20selected%20items.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20selectedItems%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Array%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_updateSelected(attrForSelected%2C%20selectedValues)'%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Selects%20the%20given%20value.%20If%20the%20%60multi%60%20property%20is%20true%2C%20then%20the%20selected%20state%20of%20the%0A%20%20%20%20%20*%20%60value%60%20will%20be%20toggled%3B%20otherwise%20the%20%60value%60%20will%20be%20selected.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40method%20select%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20value%20the%20value%20to%20select.%0A%20%20%20%20%20*%2F%0A%20%20%20%20select%3A%20function(value)%20%7B%0A%20%20%20%20%20%20if%20(this.multi)%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.selectedValues)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._toggleSelected(value)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.selectedValues%20%3D%20%5Bvalue%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.selected%20%3D%20value%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20multiChanged%3A%20function(multi)%20%7B%0A%20%20%20%20%20%20this._selection.multi%20%3D%20multi%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_shouldUpdateSelection()%20%7B%0A%20%20%20%20%20%20return%20this.selected%20!%3D%20null%20%7C%7C%0A%20%20%20%20%20%20%20%20(this.selectedValues%20!%3D%20null%20%26%26%20this.selectedValues.length)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_updateSelected%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.multi)%20%7B%0A%20%20%20%20%20%20%20%20this._selectMulti(this.selectedValues)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this._selectSelected(this.selected)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_selectMulti%3A%20function(values)%20%7B%0A%20%20%20%20%20%20this._selection.clear()%3B%0A%20%20%20%20%20%20if%20(values)%20%7B%0A%20%20%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20values.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._selection.setItemSelected(this._valueToItem(values%5Bi%5D)%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_selectionChange%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20s%20%3D%20this._selection.get()%3B%0A%20%20%20%20%20%20if%20(this.multi)%20%7B%0A%20%20%20%20%20%20%20%20this._setSelectedItems(s)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this._setSelectedItems(%5Bs%5D)%3B%0A%20%20%20%20%20%20%20%20this._setSelectedItem(s)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_toggleSelected%3A%20function(value)%20%7B%0A%20%20%20%20%20%20var%20i%20%3D%20this.selectedValues.indexOf(value)%3B%0A%20%20%20%20%20%20var%20unselected%20%3D%20i%20%3C%200%3B%0A%20%20%20%20%20%20if%20(unselected)%20%7B%0A%20%20%20%20%20%20%20%20this.push('selectedValues'%2Cvalue)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.splice('selectedValues'%2Ci%2C1)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._selection.setItemSelected(this._valueToItem(value)%2C%20unselected)%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20*%2F%0A%20%20Polymer.IronMultiSelectableBehavior%20%3D%20%5B%0A%20%20%20%20Polymer.IronSelectableBehavior%2C%0A%20%20%20%20Polymer.IronMultiSelectableBehaviorImpl%0A%20%20%5D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-9.js%0A
0 ms
javascript;charset=utf-8,%0A%20%20%2F**%0A%20%20%60iron-selector%60%20is%20an%20element%20which%20can%20be%20used%20to%20manage%20a%20list%20of%20elements%0A%20%20that%20can%20be%20selected.%20%20Tapping%20on%20the%20item%20will%20make%20the%20item%20selected.%20%20The%20%60selected%60%20indicates%0A%20%20which%20item%20is%20being%20selected.%20%20The%20default%20is%20to%20use%20the%20index%20of%20the%20item.%0A%0A%20%20Example%3A%0A%0A%20%20%20%20%20%20%3Ciron-selector%20selected%3D%220%22%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%3EItem%201%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%3EItem%202%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%3EItem%203%3C%2Fdiv%3E%0A%20%20%20%20%20%20%3C%2Firon-selector%3E%0A%0A%20%20If%20you%20want%20to%20use%20the%20attribute%20value%20of%20an%20element%20for%20%60selected%60%20instead%20of%20the%20index%2C%0A%20%20set%20%60attrForSelected%60%20to%20the%20name%20of%20the%20attribute.%20%20For%20example%2C%20if%20you%20want%20to%20select%20item%20by%0A%20%20%60name%60%2C%20set%20%60attrForSelected%60%20to%20%60name%60.%0A%0A%20%20Example%3A%0A%0A%20%20%20%20%20%20%3Ciron-selector%20attr-for-selected%3D%22name%22%20selected%3D%22foo%22%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%20name%3D%22foo%22%3EFoo%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%20name%3D%22bar%22%3EBar%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%20name%3D%22zot%22%3EZot%3C%2Fdiv%3E%0A%20%20%20%20%20%20%3C%2Firon-selector%3E%0A%0A%20%20%60iron-selector%60%20is%20not%20styled.%20Use%20the%20%60iron-selected%60%20CSS%20class%20to%20style%20the%20selected%20element.%0A%0A%20%20Example%3A%0A%0A%20%20%20%20%20%20%3Cstyle%3E%0A%20%20%20%20%20%20%20%20.iron-selected%20%7B%0A%20%20%20%20%20%20%20%20%20%20background%3A%20%23eee%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%3C%2Fstyle%3E%0A%0A%20%20%20%20%20%20...%0A%0A%20%20%20%20%20%20%3Ciron-selector%20selected%3D%220%22%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%3EItem%201%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%3EItem%202%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%3EItem%203%3C%2Fdiv%3E%0A%20%20%20%20%20%20%3C%2Firon-selector%3E%0A%0A%20%20%40demo%20demo%2Findex.html%0A%20%20*%2F%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'iron-selector'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.IronMultiSelectableBehavior%0A%20%20%20%20%5D%0A%0A%20%20%7D)%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-10.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%2F**%0A%20%20%20*%20%60IronResizableBehavior%60%20is%20a%20behavior%20that%20can%20be%20used%20in%20Polymer%20elements%20to%0A%20%20%20*%20coordinate%20the%20flow%20of%20resize%20events%20between%20%22resizers%22%20(elements%20that%20control%20the%0A%20%20%20*%20size%20or%20hidden%20state%20of%20their%20children)%20and%20%22resizables%22%20(elements%20that%20need%20to%20be%0A%20%20%20*%20notified%20when%20they%20are%20resized%20or%20un-hidden%20by%20their%20parents%20in%20order%20to%20take%0A%20%20%20*%20action%20on%20their%20new%20measurements).%0A%20%20%20*%20Elements%20that%20perform%20measurement%20should%20add%20the%20%60IronResizableBehavior%60%20behavior%20to%0A%20%20%20*%20their%20element%20definition%20and%20listen%20for%20the%20%60iron-resize%60%20event%20on%20themselves.%0A%20%20%20*%20This%20event%20will%20be%20fired%20when%20they%20become%20showing%20after%20having%20been%20hidden%2C%0A%20%20%20*%20when%20they%20are%20resized%20explicitly%20by%20another%20resizable%2C%20or%20when%20the%20window%20has%20been%0A%20%20%20*%20resized.%0A%20%20%20*%20Note%2C%20the%20%60iron-resize%60%20event%20is%20non-bubbling.%0A%20%20%20*%0A%20%20%20*%20%40polymerBehavior%20Polymer.IronResizableBehavior%0A%20%20%20*%20%40demo%20demo%2Findex.html%0A%20%20%20**%2F%0A%20%20Polymer.IronResizableBehavior%20%3D%20%7B%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20closest%20ancestor%20element%20that%20implements%20%60IronResizableBehavior%60.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20_parentResizable%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_parentResizableChanged'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20True%20if%20this%20element%20is%20currently%20notifying%20its%20descedant%20elements%20of%0A%20%20%20%20%20%20%20*%20resize.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20_notifyingDescendant%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'iron-request-resize-notifications'%3A%20'_onIronRequestResizeNotifications'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20created%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20We%20don't%20really%20need%20property%20effects%20on%20these%2C%20and%20also%20we%20want%20them%0A%20%20%20%20%20%20%2F%2F%20to%20be%20created%20before%20the%20%60_parentResizable%60%20observer%20fires%3A%0A%20%20%20%20%20%20this._interestedResizables%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20this._boundNotifyResize%20%3D%20this.notifyResize.bind(this)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20this.fire('iron-request-resize-notifications'%2C%20null%2C%20%7B%0A%20%20%20%20%20%20%20%20node%3A%20this%2C%0A%20%20%20%20%20%20%20%20bubbles%3A%20true%2C%0A%20%20%20%20%20%20%20%20cancelable%3A%20true%0A%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20if%20(!this._parentResizable)%20%7B%0A%20%20%20%20%20%20%20%20window.addEventListener('resize'%2C%20this._boundNotifyResize)%3B%0A%20%20%20%20%20%20%20%20this.notifyResize()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20detached%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._parentResizable)%20%7B%0A%20%20%20%20%20%20%20%20this._parentResizable.stopResizeNotificationsFor(this)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20window.removeEventListener('resize'%2C%20this._boundNotifyResize)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this._parentResizable%20%3D%20null%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Can%20be%20called%20to%20manually%20notify%20a%20resizable%20and%20its%20descendant%0A%20%20%20%20%20*%20resizables%20of%20a%20resize%20change.%0A%20%20%20%20%20*%2F%0A%20%20%20%20notifyResize%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(!this.isAttached)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this._interestedResizables.forEach(function(resizable)%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.resizerShouldNotify(resizable))%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._notifyDescendant(resizable)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%20this)%3B%0A%0A%20%20%20%20%20%20this._fireResize()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Used%20to%20assign%20the%20closest%20resizable%20ancestor%20to%20this%20resizable%0A%20%20%20%20%20*%20if%20the%20ancestor%20detects%20a%20request%20for%20notifications.%0A%20%20%20%20%20*%2F%0A%20%20%20%20assignParentResizable%3A%20function(parentResizable)%20%7B%0A%20%20%20%20%20%20this._parentResizable%20%3D%20parentResizable%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Used%20to%20remove%20a%20resizable%20descendant%20from%20the%20list%20of%20descendants%0A%20%20%20%20%20*%20that%20should%20be%20notified%20of%20a%20resize%20change.%0A%20%20%20%20%20*%2F%0A%20%20%20%20stopResizeNotificationsFor%3A%20function(target)%20%7B%0A%20%20%20%20%20%20var%20index%20%3D%20this._interestedResizables.indexOf(target)%3B%0A%0A%20%20%20%20%20%20if%20(index%20%3E%20-1)%20%7B%0A%20%20%20%20%20%20%20%20this._interestedResizables.splice(index%2C%201)%3B%0A%20%20%20%20%20%20%20%20this.unlisten(target%2C%20'iron-resize'%2C%20'_onDescendantIronResize')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20This%20method%20can%20be%20overridden%20to%20filter%20nested%20elements%20that%20should%20or%0A%20%20%20%20%20*%20should%20not%20be%20notified%20by%20the%20current%20element.%20Return%20true%20if%20an%20element%0A%20%20%20%20%20*%20should%20be%20notified%2C%20or%20false%20if%20it%20should%20not%20be%20notified.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BHTMLElement%7D%20element%20A%20candidate%20descendant%20element%20that%0A%20%20%20%20%20*%20implements%20%60IronResizableBehavior%60.%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20the%20%60element%60%20should%20be%20notified%20of%20resize.%0A%20%20%20%20%20*%2F%0A%20%20%20%20resizerShouldNotify%3A%20function(element)%20%7B%20return%20true%3B%20%7D%2C%0A%0A%20%20%20%20_onDescendantIronResize%3A%20function(event)%20%7B%0A%20%20%20%20%20%20if%20(this._notifyingDescendant)%20%7B%0A%20%20%20%20%20%20%20%20event.stopPropagation()%3B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20NOTE(cdata)%3A%20In%20ShadowDOM%2C%20event%20retargetting%20makes%20echoing%20of%20the%0A%20%20%20%20%20%20%2F%2F%20otherwise%20non-bubbling%20event%20%22just%20work.%22%20We%20do%20it%20manually%20here%20for%0A%20%20%20%20%20%20%2F%2F%20the%20case%20where%20Polymer%20is%20not%20using%20shadow%20roots%20for%20whatever%20reason%3A%0A%20%20%20%20%20%20if%20(!Polymer.Settings.useShadow)%20%7B%0A%20%20%20%20%20%20%20%20this._fireResize()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_fireResize%3A%20function()%20%7B%0A%20%20%20%20%20%20this.fire('iron-resize'%2C%20null%2C%20%7B%0A%20%20%20%20%20%20%20%20node%3A%20this%2C%0A%20%20%20%20%20%20%20%20bubbles%3A%20false%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onIronRequestResizeNotifications%3A%20function(event)%20%7B%0A%20%20%20%20%20%20var%20target%20%3D%20event.path%20%3F%20event.path%5B0%5D%20%3A%20event.target%3B%0A%0A%20%20%20%20%20%20if%20(target%20%3D%3D%3D%20this)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20if%20(this._interestedResizables.indexOf(target)%20%3D%3D%3D%20-1)%20%7B%0A%20%20%20%20%20%20%20%20this._interestedResizables.push(target)%3B%0A%20%20%20%20%20%20%20%20this.listen(target%2C%20'iron-resize'%2C%20'_onDescendantIronResize')%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20target.assignParentResizable(this)%3B%0A%20%20%20%20%20%20this._notifyDescendant(target)%3B%0A%0A%20%20%20%20%20%20event.stopPropagation()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_parentResizableChanged%3A%20function(parentResizable)%20%7B%0A%20%20%20%20%20%20if%20(parentResizable)%20%7B%0A%20%20%20%20%20%20%20%20window.removeEventListener('resize'%2C%20this._boundNotifyResize)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_notifyDescendant%3A%20function(descendant)%20%7B%0A%20%20%20%20%20%20%2F%2F%20NOTE(cdata)%3A%20In%20IE10%2C%20attached%20is%20fired%20on%20children%20first%2C%20so%20it's%0A%20%20%20%20%20%20%2F%2F%20important%20not%20to%20notify%20them%20if%20the%20parent%20is%20not%20attached%20yet%20(or%0A%20%20%20%20%20%20%2F%2F%20else%20they%20will%20get%20redundantly%20notified%20when%20the%20parent%20attaches).%0A%20%20%20%20%20%20if%20(!this.isAttached)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this._notifyingDescendant%20%3D%20true%3B%0A%20%20%20%20%20%20descendant.notifyResize()%3B%0A%20%20%20%20%20%20this._notifyingDescendant%20%3D%20false%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-11.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%20%20(function()%20%7B%0A%20%20%20%20%20%20'use%20strict'%3B%0A%0A%20%20%20%20%20%20%2F%2F%20this%20would%20be%20the%20only%20%60paper-drawer-panel%60%20in%0A%20%20%20%20%20%20%2F%2F%20the%20whole%20app%20that%20can%20be%20in%20%60dragging%60%20state%0A%20%20%20%20%20%20var%20sharedPanel%20%3D%20null%3B%0A%0A%20%20%20%20%20%20function%20classNames(obj)%20%7B%0A%20%20%20%20%20%20%20%20var%20classes%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20for%20(var%20key%20in%20obj)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(obj.hasOwnProperty(key)%20%26%26%20obj%5Bkey%5D)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20classes.push(key)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20classes.join('%20')%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20Polymer(%7B%0A%0A%20%20%20%20%20%20%20%20is%3A%20'paper-drawer-panel'%2C%0A%0A%20%20%20%20%20%20%20%20behaviors%3A%20%5BPolymer.IronResizableBehavior%5D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20when%20the%20narrow%20layout%20changes.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20paper-responsive-change%20%7B%7Bnarrow%3A%20boolean%7D%7D%20detail%20-%0A%20%20%20%20%20%20%20%20%20*%20%20%20%20%20narrow%3A%20true%20if%20the%20panel%20is%20in%20narrow%20layout.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20when%20the%20a%20panel%20is%20selected.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20Listening%20for%20this%20event%20is%20an%20alternative%20to%20observing%20changes%20in%20the%20%60selected%60%20attribute.%0A%20%20%20%20%20%20%20%20%20*%20This%20event%20is%20fired%20both%20when%20a%20panel%20is%20selected.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20iron-select%20%7B%7Bitem%3A%20Object%7D%7D%20detail%20-%0A%20%20%20%20%20%20%20%20%20*%20%20%20%20%20item%3A%20The%20panel%20that%20the%20event%20refers%20to.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20when%20a%20panel%20is%20deselected.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20Listening%20for%20this%20event%20is%20an%20alternative%20to%20observing%20changes%20in%20the%20%60selected%60%20attribute.%0A%20%20%20%20%20%20%20%20%20*%20This%20event%20is%20fired%20both%20when%20a%20panel%20is%20deselected.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20iron-deselect%20%7B%7Bitem%3A%20Object%7D%7D%20detail%20-%0A%20%20%20%20%20%20%20%20%20*%20%20%20%20%20item%3A%20The%20panel%20that%20the%20event%20refers%20to.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20panel%20to%20be%20selected%20when%20%60paper-drawer-panel%60%20changes%20to%20narrow%0A%20%20%20%20%20%20%20%20%20%20%20*%20layout.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20defaultSelected%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20'main'%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20swipe%20from%20the%20edge%20is%20disabled.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20disableEdgeSwipe%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20swipe%20to%20open%2Fclose%20the%20drawer%20is%20disabled.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20disableSwipe%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Whether%20the%20user%20is%20dragging%20the%20drawer%20interactively.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20dragging%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Width%20of%20the%20drawer%20panel.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20drawerWidth%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20'256px'%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20How%20many%20pixels%20on%20the%20side%20of%20the%20screen%20are%20sensitive%20to%20edge%0A%20%20%20%20%20%20%20%20%20%20%20*%20swipes%20and%20peek.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20edgeSwipeSensitivity%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%2030%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20ignore%20%60responsiveWidth%60%20setting%20and%20force%20the%20narrow%20layout.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20forceNarrow%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Whether%20the%20browser%20has%20support%20for%20the%20transform%20CSS%20property.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20hasTransform%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20'transform'%20in%20this.style%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Whether%20the%20browser%20has%20support%20for%20the%20will-change%20CSS%20property.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20hasWillChange%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20'willChange'%20in%20this.style%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Returns%20true%20if%20the%20panel%20is%20in%20narrow%20layout.%20%20This%20is%20useful%20if%20you%0A%20%20%20%20%20%20%20%20%20%20%20*%20need%20to%20show%2Fhide%20elements%20based%20on%20the%20layout.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20narrow%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Whether%20the%20drawer%20is%20peeking%20out%20from%20the%20edge.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20peeking%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Max-width%20when%20the%20panel%20changes%20to%20narrow%20layout.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20responsiveWidth%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20'600px'%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20position%20the%20drawer%20to%20the%20right.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20rightDrawer%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20panel%20that%20is%20being%20selected.%20%60drawer%60%20for%20the%20drawer%20panel%20and%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60main%60%20for%20the%20main%20panel.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20selected%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20null%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20attribute%20on%20elements%20that%20should%20toggle%20the%20drawer%20on%20tap%2C%20also%20elements%20will%0A%20%20%20%20%20%20%20%20%20%20%20*%20automatically%20be%20hidden%20in%20wide%20layout.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20drawerToggleAttribute%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20'paper-drawer-toggle'%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Whether%20the%20transition%20is%20enabled.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20_transition%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20tap%3A%20'_onTap'%2C%0A%20%20%20%20%20%20%20%20%20%20track%3A%20'_onTrack'%2C%0A%20%20%20%20%20%20%20%20%20%20down%3A%20'_downHandler'%2C%0A%20%20%20%20%20%20%20%20%20%20up%3A%20'_upHandler'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20'_forceNarrowChanged(forceNarrow%2C%20defaultSelected)'%0A%20%20%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Toggles%20the%20panel%20open%20and%20closed.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40method%20togglePanel%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20togglePanel%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(this._isMainSelected())%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.openDrawer()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.closeDrawer()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Opens%20the%20drawer.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40method%20openDrawer%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20openDrawer%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.selected%20%3D%20'drawer'%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Closes%20the%20drawer.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40method%20closeDrawer%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20closeDrawer%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.selected%20%3D%20'main'%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Avoid%20transition%20at%20the%20beginning%20e.g.%20page%20loads%20and%20enable%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20transitions%20only%20after%20the%20element%20is%20rendered%20and%20ready.%0A%20%20%20%20%20%20%20%20%20%20this._transition%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_onMainTransitionEnd%3A%20function%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(e.currentTarget%20%3D%3D%3D%20this.%24.main%20%26%26%20(e.propertyName%20%3D%3D%3D%20'left'%20%7C%7C%20e.propertyName%20%3D%3D%3D%20'right'))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.notifyResize()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_computeIronSelectorClass%3A%20function(narrow%2C%20transition%2C%20dragging%2C%20rightDrawer%2C%20peeking)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20classNames(%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20dragging%3A%20dragging%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20'narrow-layout'%3A%20narrow%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20'right-drawer'%3A%20rightDrawer%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20'left-drawer'%3A%20!rightDrawer%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20transition%3A%20transition%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20peeking%3A%20peeking%0A%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_computeDrawerStyle%3A%20function(drawerWidth)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20'width%3A'%20%2B%20drawerWidth%20%2B%20'%3B'%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_computeMainStyle%3A%20function(narrow%2C%20rightDrawer%2C%20drawerWidth)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20style%20%3D%20''%3B%0A%0A%20%20%20%20%20%20%20%20%20%20style%20%2B%3D%20'left%3A'%20%2B%20((narrow%20%7C%7C%20rightDrawer)%20%3F%20'0'%20%3A%20drawerWidth)%20%2B%20'%3B'%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(rightDrawer)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20style%20%2B%3D%20'right%3A'%20%2B%20(narrow%20%3F%20''%20%3A%20drawerWidth)%20%2B%20'%3B'%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20return%20style%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_computeMediaQuery%3A%20function(forceNarrow%2C%20responsiveWidth)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20forceNarrow%20%3F%20''%20%3A%20'(max-width%3A%20'%20%2B%20responsiveWidth%20%2B%20')'%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_computeSwipeOverlayHidden%3A%20function(narrow%2C%20disableEdgeSwipe)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20!narrow%20%7C%7C%20disableEdgeSwipe%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_onTrack%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(sharedPanel%20%26%26%20this%20!%3D%3D%20sharedPanel)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20switch%20(event.detail.state)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%20'start'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._trackStart(event)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%20'track'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._trackX(event)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20case%20'end'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._trackEnd(event)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_responsiveChange%3A%20function(narrow)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._setNarrow(narrow)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(this.narrow)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.selected%20%3D%20this.defaultSelected%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20this.setScrollDirection(this._swipeAllowed()%20%3F%20'y'%20%3A%20'all')%3B%0A%20%20%20%20%20%20%20%20%20%20this.fire('paper-responsive-change'%2C%20%7Bnarrow%3A%20this.narrow%7D)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_onQueryMatchesChanged%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._responsiveChange(event.detail.value)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_forceNarrowChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20set%20the%20narrow%20mode%20only%20if%20we%20reached%20the%20%60responsiveWidth%60%0A%20%20%20%20%20%20%20%20%20%20this._responsiveChange(this.forceNarrow%20%7C%7C%20this.%24.mq.queryMatches)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_swipeAllowed%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.narrow%20%26%26%20!this.disableSwipe%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_isMainSelected%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.selected%20%3D%3D%3D%20'main'%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_startEdgePeek%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.width%20%3D%20this.%24.drawer.offsetWidth%3B%0A%20%20%20%20%20%20%20%20%20%20this._moveDrawer(this._translateXForDeltaX(this.rightDrawer%20%3F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20-this.edgeSwipeSensitivity%20%3A%20this.edgeSwipeSensitivity))%3B%0A%20%20%20%20%20%20%20%20%20%20this._setPeeking(true)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_stopEdgePeek%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(this.peeking)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._setPeeking(false)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._moveDrawer(null)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_downHandler%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!this.dragging%20%26%26%20this._isMainSelected()%20%26%26%20this._isEdgeTouch(event)%20%26%26%20!sharedPanel)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._startEdgePeek()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20cancel%20selection%0A%20%20%20%20%20%20%20%20%20%20%20%20event.preventDefault()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20grab%20this%20panel%0A%20%20%20%20%20%20%20%20%20%20%20%20sharedPanel%20%3D%20this%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_upHandler%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._stopEdgePeek()%3B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20release%20the%20panel%0A%20%20%20%20%20%20%20%20%20%20sharedPanel%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_onTap%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20targetElement%20%3D%20Polymer.dom(event).localTarget%3B%0A%20%20%20%20%20%20%20%20%20%20var%20isTargetToggleElement%20%3D%20targetElement%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20this.drawerToggleAttribute%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20targetElement.hasAttribute(this.drawerToggleAttribute)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(isTargetToggleElement)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.togglePanel()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_isEdgeTouch%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20x%20%3D%20event.detail.x%3B%0A%0A%20%20%20%20%20%20%20%20%20%20return%20!this.disableEdgeSwipe%20%26%26%20this._swipeAllowed()%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20(this.rightDrawer%20%3F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20x%20%3E%3D%20this.offsetWidth%20-%20this.edgeSwipeSensitivity%20%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20x%20%3C%3D%20this.edgeSwipeSensitivity)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_trackStart%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(this._swipeAllowed())%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20sharedPanel%20%3D%20this%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._setDragging(true)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this._isMainSelected())%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._setDragging(this.peeking%20%7C%7C%20this._isEdgeTouch(event))%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this.dragging)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.width%20%3D%20this.%24.drawer.offsetWidth%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._transition%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_translateXForDeltaX%3A%20function(deltaX)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20isMain%20%3D%20this._isMainSelected()%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(this.rightDrawer)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20Math.max(0%2C%20isMain%20%3F%20this.width%20%2B%20deltaX%20%3A%20deltaX)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20Math.min(0%2C%20isMain%20%3F%20deltaX%20-%20this.width%20%3A%20deltaX)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_trackX%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(this.dragging)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20dx%20%3D%20event.detail.dx%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this.peeking)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(Math.abs(dx)%20%3C%3D%20this.edgeSwipeSensitivity)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Ignore%20trackx%20until%20we%20move%20past%20the%20edge%20peek.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._setPeeking(false)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20this._moveDrawer(this._translateXForDeltaX(dx))%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_trackEnd%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(this.dragging)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20xDirection%20%3D%20event.detail.dx%20%3E%200%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20this._setDragging(false)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._transition%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20sharedPanel%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._moveDrawer(null)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this.rightDrawer)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this%5BxDirection%20%3F%20'closeDrawer'%20%3A%20'openDrawer'%5D()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this%5BxDirection%20%3F%20'openDrawer'%20%3A%20'closeDrawer'%5D()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_transformForTranslateX%3A%20function(translateX)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(translateX%20%3D%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20''%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20return%20this.hasWillChange%20%3F%20'translateX('%20%2B%20translateX%20%2B%20'px)'%20%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20'translate3d('%20%2B%20translateX%20%2B%20'px%2C%200%2C%200)'%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_moveDrawer%3A%20function(translateX)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.transform(this._transformForTranslateX(translateX)%2C%20this.%24.drawer)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D())%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-12.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%20%20(function()%20%7B%0A%20%20%20%20%20%20'use%20strict'%3B%0A%0A%20%20%20%20%20%20var%20SHADOW_WHEN_SCROLLING%20%3D%201%3B%0A%20%20%20%20%20%20var%20SHADOW_ALWAYS%20%3D%202%3B%0A%20%20%20%20%20%20var%20MODE_CONFIGS%20%3D%20%7B%0A%20%20%20%20%20%20%20%20outerScroll%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20'scroll'%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20shadowMode%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20'standard'%3A%20SHADOW_ALWAYS%2C%0A%20%20%20%20%20%20%20%20%20%20'waterfall'%3A%20SHADOW_WHEN_SCROLLING%2C%0A%20%20%20%20%20%20%20%20%20%20'waterfall-tall'%3A%20SHADOW_WHEN_SCROLLING%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20tallMode%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20'waterfall-tall'%3A%20true%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20%20%20is%3A%20'paper-header-panel'%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20when%20the%20content%20has%20been%20scrolled.%20%20%60event.detail.target%60%20returns%0A%20%20%20%20%20%20%20%20%20*%20the%20scrollable%20element%20which%20you%20can%20use%20to%20access%20scroll%20info%20such%20as%0A%20%20%20%20%20%20%20%20%20*%20%60scrollTop%60.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%3Cpaper-header-panel%20on-content-scroll%3D%22scrollHandler%22%3E%0A%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%20%20...%0A%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%3C%2Fpaper-header-panel%3E%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%20%20%20%20scrollHandler%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%20%20var%20scroller%20%3D%20event.detail.target%3B%0A%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%20%20console.log(scroller.scrollTop)%3B%0A%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20content-scroll%0A%20%20%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Controls%20header%20and%20scrolling%20behavior.%20Options%20are%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60standard%60%2C%20%60seamed%60%2C%20%60waterfall%60%2C%20%60waterfall-tall%60%2C%20%60scroll%60%20and%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60cover%60.%20Default%20is%20%60standard%60.%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60standard%60%3A%20The%20header%20is%20a%20step%20above%20the%20panel.%20The%20header%20will%20consume%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20panel%20at%20the%20point%20of%20entry%2C%20preventing%20it%20from%20passing%20through%20to%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20opposite%20side.%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60seamed%60%3A%20The%20header%20is%20presented%20as%20seamed%20with%20the%20panel.%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60waterfall%60%3A%20Similar%20to%20standard%20mode%2C%20but%20header%20is%20initially%20presented%20as%0A%20%20%20%20%20%20%20%20%20%20%20*%20seamed%20with%20panel%2C%20but%20then%20separates%20to%20form%20the%20step.%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60waterfall-tall%60%3A%20The%20header%20is%20initially%20taller%20(%60tall%60%20class%20is%20added%20to%0A%20%20%20%20%20%20%20%20%20%20%20*%20the%20header).%20%20As%20the%20user%20scrolls%2C%20the%20header%20separates%20(forming%20an%20edge)%0A%20%20%20%20%20%20%20%20%20%20%20*%20while%20condensing%20(%60tall%60%20class%20is%20removed%20from%20the%20header).%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60scroll%60%3A%20The%20header%20keeps%20its%20seam%20with%20the%20panel%2C%20and%20is%20pushed%20off%20screen.%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60cover%60%3A%20The%20panel%20covers%20the%20whole%20%60paper-header-panel%60%20including%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20header.%20This%20allows%20user%20to%20style%20the%20panel%20in%20such%20a%20way%20that%20the%20panel%20is%0A%20%20%20%20%20%20%20%20%20%20%20*%20partially%20covering%20the%20header.%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%3Cpaper-header-panel%20mode%3D%22cover%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%3Cpaper-toolbar%20class%3D%22tall%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%20%20%3Cpaper-icon-button%20icon%3D%22menu%22%3E%3C%2Fpaper-icon-button%3E%0A%20%20%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%3C%2Fpaper-toolbar%3E%0A%20%20%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%20%20%3Cdiv%20class%3D%22content%22%3E%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%20%20%20*%20%20%20%20%20%3C%2Fpaper-header-panel%3E%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20mode%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20'standard'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20observer%3A%20'_modeChanged'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20the%20drop-shadow%20is%20always%20shown%20no%20matter%20what%20mode%20is%20set%20to.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20shadow%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20class%20used%20in%20waterfall-tall%20mode.%20%20Change%20this%20if%20the%20header%0A%20%20%20%20%20%20%20%20%20%20%20*%20accepts%20a%20different%20class%20for%20toggling%20height%2C%20e.g.%20%22medium-tall%22%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20tallClass%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20'tall'%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20the%20scroller%20is%20at%20the%20top%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20atTop%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20'_computeDropShadowHidden(atTop%2C%20mode%2C%20shadow)'%0A%20%20%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.scrollHandler%20%3D%20this._scroll.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._addListener()%3B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Run%20%60scroll%60%20logic%20once%20to%20initialize%20class%20names%2C%20etc.%0A%20%20%20%20%20%20%20%20%20%20this._keepScrollingState()%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20detached%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._removeListener()%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Returns%20the%20header%20element%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40property%20header%0A%20%20%20%20%20%20%20%20%20*%20%40type%20Object%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20header()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20Polymer.dom(this.%24.headerContent).getDistributedNodes()%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Returns%20the%20scrollable%20element.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40property%20scroller%0A%20%20%20%20%20%20%20%20%20*%20%40type%20Object%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20scroller()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._getScrollerForMode(this.mode)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Returns%20true%20if%20the%20scroller%20has%20a%20visible%20shadow.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40property%20visibleShadow%0A%20%20%20%20%20%20%20%20%20*%20%40type%20Boolean%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20visibleShadow()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.%24.dropShadow.classList.contains('has-shadow')%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_computeDropShadowHidden%3A%20function(atTop%2C%20mode%2C%20shadow)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20shadowMode%20%3D%20MODE_CONFIGS.shadowMode%5Bmode%5D%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(this.shadow)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.toggleClass('has-shadow'%2C%20true%2C%20this.%24.dropShadow)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(shadowMode%20%3D%3D%3D%20SHADOW_ALWAYS)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.toggleClass('has-shadow'%2C%20true%2C%20this.%24.dropShadow)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(shadowMode%20%3D%3D%3D%20SHADOW_WHEN_SCROLLING%20%26%26%20!atTop)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.toggleClass('has-shadow'%2C%20true%2C%20this.%24.dropShadow)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.toggleClass('has-shadow'%2C%20false%2C%20this.%24.dropShadow)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_computeMainContainerClass%3A%20function(mode)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20TODO%3A%20%20It%20will%20be%20useful%20to%20have%20a%20utility%20for%20classes%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20e.g.%20Polymer.Utils.classes(%7B%20foo%3A%20true%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20var%20classes%20%3D%20%7B%7D%3B%0A%0A%20%20%20%20%20%20%20%20%20%20classes%5B'flex'%5D%20%3D%20mode%20!%3D%3D%20'cover'%3B%0A%0A%20%20%20%20%20%20%20%20%20%20return%20Object.keys(classes).filter(%0A%20%20%20%20%20%20%20%20%20%20%20%20function(className)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20classes%5BclassName%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D).join('%20')%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_addListener%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.scroller.addEventListener('scroll'%2C%20this.scrollHandler%2C%20false)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_removeListener%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.scroller.removeEventListener('scroll'%2C%20this.scrollHandler)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_modeChanged%3A%20function(newMode%2C%20oldMode)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20configs%20%3D%20MODE_CONFIGS%3B%0A%20%20%20%20%20%20%20%20%20%20var%20header%20%3D%20this.header%3B%0A%20%20%20%20%20%20%20%20%20%20var%20animateDuration%20%3D%20200%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(header)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20in%20tallMode%20it%20may%20add%20tallClass%20to%20the%20header%3B%20so%20do%20the%20cleanup%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20when%20mode%20is%20changed%20from%20tallMode%20to%20not%20tallMode%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(configs.tallMode%5BoldMode%5D%20%26%26%20!configs.tallMode%5BnewMode%5D)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20header.classList.remove(this.tallClass)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20header.classList.remove('animate')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%20animateDuration)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20header.classList.toggle('animate'%2C%20configs.tallMode%5BnewMode%5D)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20this._keepScrollingState()%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_keepScrollingState%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20main%20%3D%20this.scroller%3B%0A%20%20%20%20%20%20%20%20%20%20var%20header%20%3D%20this.header%3B%0A%0A%20%20%20%20%20%20%20%20%20%20this._setAtTop(main.scrollTop%20%3D%3D%3D%200)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(header%20%26%26%20this.tallClass%20%26%26%20MODE_CONFIGS.tallMode%5Bthis.mode%5D)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.toggleClass(this.tallClass%2C%20this.atTop%20%7C%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20header.classList.contains(this.tallClass)%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20main.scrollHeight%20%3C%20this.offsetHeight%2C%20header)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_scroll%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._keepScrollingState()%3B%0A%20%20%20%20%20%20%20%20%20%20this.fire('content-scroll'%2C%20%7Btarget%3A%20this.scroller%7D%2C%20%7Bbubbles%3A%20false%7D)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_getScrollerForMode%3A%20function(mode)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20MODE_CONFIGS.outerScroll%5Bmode%5D%20%3F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this%20%3A%20this.%24.mainContainer%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D)()%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-13.js%0A
0 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20Use%20%60Polymer.NeonAnimationBehavior%60%20to%20implement%20an%20animation.%0A%20%20%20*%20%40polymerBehavior%0A%20%20%20*%2F%0A%20%20Polymer.NeonAnimationBehavior%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Defines%20the%20animation%20timing.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20animationTiming%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20duration%3A%20500%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20easing%3A%20'cubic-bezier(0.4%2C%200%2C%200.2%2C%201)'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20fill%3A%20'both'%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20registered%3A%20function()%20%7B%0A%20%20%20%20%20%20new%20Polymer.IronMeta(%7Btype%3A%20'animation'%2C%20key%3A%20this.is%2C%20value%3A%20this.constructor%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Do%20any%20animation%20configuration%20here.%0A%20%20%20%20%20*%2F%0A%20%20%20%20%2F%2F%20configure%3A%20function(config)%20%7B%0A%20%20%20%20%2F%2F%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20the%20animation%20timing%20by%20mixing%20in%20properties%20from%20%60config%60%20to%20the%20defaults%20defined%0A%20%20%20%20%20*%20by%20the%20animation.%0A%20%20%20%20%20*%2F%0A%20%20%20%20timingFromConfig%3A%20function(config)%20%7B%0A%20%20%20%20%20%20if%20(config.timing)%20%7B%0A%20%20%20%20%20%20%20%20for%20(var%20property%20in%20config.timing)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.animationTiming%5Bproperty%5D%20%3D%20config.timing%5Bproperty%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20this.animationTiming%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Sets%20%60transform%60%20and%20%60transformOrigin%60%20properties%20along%20with%20the%20prefixed%20versions.%0A%20%20%20%20%20*%2F%0A%20%20%20%20setPrefixedProperty%3A%20function(node%2C%20property%2C%20value)%20%7B%0A%20%20%20%20%20%20var%20map%20%3D%20%7B%0A%20%20%20%20%20%20%20%20'transform'%3A%20%5B'webkitTransform'%5D%2C%0A%20%20%20%20%20%20%20%20'transformOrigin'%3A%20%5B'mozTransformOrigin'%2C%20'webkitTransformOrigin'%5D%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20var%20prefixes%20%3D%20map%5Bproperty%5D%3B%0A%20%20%20%20%20%20for%20(var%20prefix%2C%20index%20%3D%200%3B%20prefix%20%3D%20prefixes%5Bindex%5D%3B%20index%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20node.style%5Bprefix%5D%20%3D%20value%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20node.style%5Bproperty%5D%20%3D%20value%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Called%20when%20the%20animation%20finishes.%0A%20%20%20%20%20*%2F%0A%20%20%20%20complete%3A%20function()%20%7B%7D%0A%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-14.js%0A
1 ms
web-animations-next-lite.min.js
4 ms
javascript;charset=utf-8,%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'opaque-animation'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.NeonAnimationBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20configure%3A%20function(config)%20%7B%0A%20%20%20%20%20%20var%20node%20%3D%20config.node%3B%0A%20%20%20%20%20%20node.style.opacity%20%3D%20'0'%3B%0A%20%20%20%20%20%20this._effect%20%3D%20new%20KeyframeEffect(node%2C%20%5B%0A%20%20%20%20%20%20%20%20%7B'opacity'%3A%20'1'%7D%2C%0A%20%20%20%20%20%20%20%20%7B'opacity'%3A%20'1'%7D%0A%20%20%20%20%20%20%5D%2C%20this.timingFromConfig(config))%3B%0A%20%20%20%20%20%20return%20this._effect%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20complete%3A%20function(config)%20%7B%0A%20%20%20%20%20%20config.node.style.opacity%20%3D%20''%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D)%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-15.js%0A
0 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20%60Polymer.NeonAnimatableBehavior%60%20is%20implemented%20by%20elements%20containing%20animations%20for%20use%20with%0A%20%20%20*%20elements%20implementing%20%60Polymer.NeonAnimationRunnerBehavior%60.%0A%20%20%20*%20%40polymerBehavior%0A%20%20%20*%2F%0A%20%20Polymer.NeonAnimatableBehavior%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Animation%20configuration.%20See%20README%20for%20more%20info.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20animationConfig%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Convenience%20property%20for%20setting%20an%20'entry'%20animation.%20Do%20not%20set%20%60animationConfig.entry%60%0A%20%20%20%20%20%20%20*%20manually%20if%20using%20this.%20The%20animated%20node%20is%20set%20to%20%60this%60%20if%20using%20this%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20entryAnimation%3A%20%7B%0A%20%20%20%20%20%20%20%20observer%3A%20'_entryAnimationChanged'%2C%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Convenience%20property%20for%20setting%20an%20'exit'%20animation.%20Do%20not%20set%20%60animationConfig.exit%60%0A%20%20%20%20%20%20%20*%20manually%20if%20using%20this.%20The%20animated%20node%20is%20set%20to%20%60this%60%20if%20using%20this%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20exitAnimation%3A%20%7B%0A%20%20%20%20%20%20%20%20observer%3A%20'_exitAnimationChanged'%2C%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_entryAnimationChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20this.animationConfig%20%3D%20this.animationConfig%20%7C%7C%20%7B%7D%3B%0A%20%20%20%20%20%20if%20(this.entryAnimation%20!%3D%3D%20'fade-in-animation')%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20insert%20polyfill%20hack%0A%20%20%20%20%20%20%20%20this.animationConfig%5B'entry'%5D%20%3D%20%5B%7B%0A%20%20%20%20%20%20%20%20%20%20name%3A%20'opaque-animation'%2C%0A%20%20%20%20%20%20%20%20%20%20node%3A%20this%0A%20%20%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20name%3A%20this.entryAnimation%2C%0A%20%20%20%20%20%20%20%20%20%20node%3A%20this%0A%20%20%20%20%20%20%20%20%7D%5D%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.animationConfig%5B'entry'%5D%20%3D%20%5B%7B%0A%20%20%20%20%20%20%20%20%20%20name%3A%20this.entryAnimation%2C%0A%20%20%20%20%20%20%20%20%20%20node%3A%20this%0A%20%20%20%20%20%20%20%20%7D%5D%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_exitAnimationChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20this.animationConfig%20%3D%20this.animationConfig%20%7C%7C%20%7B%7D%3B%0A%20%20%20%20%20%20this.animationConfig%5B'exit'%5D%20%3D%20%5B%7B%0A%20%20%20%20%20%20%20%20name%3A%20this.exitAnimation%2C%0A%20%20%20%20%20%20%20%20node%3A%20this%0A%20%20%20%20%20%20%7D%5D%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_copyProperties%3A%20function(config1%2C%20config2)%20%7B%0A%20%20%20%20%20%20%2F%2F%20shallowly%20copy%20properties%20from%20config2%20to%20config1%0A%20%20%20%20%20%20for%20(var%20property%20in%20config2)%20%7B%0A%20%20%20%20%20%20%20%20config1%5Bproperty%5D%20%3D%20config2%5Bproperty%5D%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_cloneConfig%3A%20function(config)%20%7B%0A%20%20%20%20%20%20var%20clone%20%3D%20%7B%0A%20%20%20%20%20%20%20%20isClone%3A%20true%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20this._copyProperties(clone%2C%20config)%3B%0A%20%20%20%20%20%20return%20clone%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_getAnimationConfigRecursive%3A%20function(type%2C%20map%2C%20allConfigs)%20%7B%0A%20%20%20%20%20%20if%20(!this.animationConfig)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20if(this.animationConfig.value%20%26%26%20typeof%20this.animationConfig.value%20%3D%3D%3D%20'function')%20%7B%0A%20%20%20%20%20%20%09this._warn(this._logf('playAnimation'%2C%20%22Please%20put%20'animationConfig'%20inside%20of%20your%20components%20'properties'%20object%20instead%20of%20outside%20of%20it.%22))%3B%0A%20%20%20%20%20%20%09return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20type%20is%20optional%0A%20%20%20%20%20%20var%20thisConfig%3B%0A%20%20%20%20%20%20if%20(type)%20%7B%0A%20%20%20%20%20%20%20%20thisConfig%20%3D%20this.animationConfig%5Btype%5D%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20thisConfig%20%3D%20this.animationConfig%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20if%20(!Array.isArray(thisConfig))%20%7B%0A%20%20%20%20%20%20%20%20thisConfig%20%3D%20%5BthisConfig%5D%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20iterate%20animations%20and%20recurse%20to%20process%20configurations%20from%20child%20nodes%0A%20%20%20%20%20%20if%20(thisConfig)%20%7B%0A%20%20%20%20%20%20%20%20for%20(var%20config%2C%20index%20%3D%200%3B%20config%20%3D%20thisConfig%5Bindex%5D%3B%20index%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(config.animatable)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20config.animatable._getAnimationConfigRecursive(config.type%20%7C%7C%20type%2C%20map%2C%20allConfigs)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(config.id)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20cachedConfig%20%3D%20map%5Bconfig.id%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(cachedConfig)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20merge%20configurations%20with%20the%20same%20id%2C%20making%20a%20clone%20lazily%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(!cachedConfig.isClone)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20map%5Bconfig.id%5D%20%3D%20this._cloneConfig(cachedConfig)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20cachedConfig%20%3D%20map%5Bconfig.id%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._copyProperties(cachedConfig%2C%20config)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20put%20any%20configs%20with%20an%20id%20into%20a%20map%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20map%5Bconfig.id%5D%20%3D%20config%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20allConfigs.push(config)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20An%20element%20implementing%20%60Polymer.NeonAnimationRunnerBehavior%60%20calls%20this%20method%20to%20configure%0A%20%20%20%20%20*%20an%20animation%20with%20an%20optional%20type.%20Elements%20implementing%20%60Polymer.NeonAnimatableBehavior%60%0A%20%20%20%20%20*%20should%20define%20the%20property%20%60animationConfig%60%2C%20which%20is%20either%20a%20configuration%20object%0A%20%20%20%20%20*%20or%20a%20map%20of%20animation%20type%20to%20array%20of%20configuration%20objects.%0A%20%20%20%20%20*%2F%0A%20%20%20%20getAnimationConfig%3A%20function(type)%20%7B%0A%20%20%20%20%20%20var%20map%20%3D%20%7B%7D%3B%0A%20%20%20%20%20%20var%20allConfigs%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20this._getAnimationConfigRecursive(type%2C%20map%2C%20allConfigs)%3B%0A%20%20%20%20%20%20%2F%2F%20append%20the%20configurations%20saved%20in%20the%20map%20to%20the%20array%0A%20%20%20%20%20%20for%20(var%20key%20in%20map)%20%7B%0A%20%20%20%20%20%20%20%20allConfigs.push(map%5Bkey%5D)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20allConfigs%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-16.js%0A
0 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20%60Polymer.NeonAnimationRunnerBehavior%60%20adds%20a%20method%20to%20run%20animations.%0A%20%20%20*%0A%20%20%20*%20%40polymerBehavior%20Polymer.NeonAnimationRunnerBehavior%0A%20%20%20*%2F%0A%20%20Polymer.NeonAnimationRunnerBehaviorImpl%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20_animationMeta%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20new%20Polymer.IronMeta(%7Btype%3A%20'animation'%7D)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%20%40type%20%7B%3FObject%7D%20*%2F%0A%20%20%20%20%20%20_player%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_configureAnimationEffects%3A%20function(allConfigs)%20%7B%0A%20%20%20%20%20%20var%20allAnimations%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20if%20(allConfigs.length%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20for%20(var%20config%2C%20index%20%3D%200%3B%20config%20%3D%20allConfigs%5Bindex%5D%3B%20index%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20animationConstructor%20%3D%20this._animationMeta.byKey(config.name)%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(animationConstructor)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20animation%20%3D%20animationConstructor%20%26%26%20new%20animationConstructor()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20effect%20%3D%20animation.configure(config)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(effect)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20allAnimations.push(%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20animation%3A%20animation%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20config%3A%20config%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20effect%3A%20effect%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20console.warn(this.is%20%2B%20'%3A'%2C%20config.name%2C%20'not%20found!')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20allAnimations%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_runAnimationEffects%3A%20function(allEffects)%20%7B%0A%20%20%20%20%20%20return%20document.timeline.play(new%20GroupEffect(allEffects))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_completeAnimations%3A%20function(allAnimations)%20%7B%0A%20%20%20%20%20%20for%20(var%20animation%2C%20index%20%3D%200%3B%20animation%20%3D%20allAnimations%5Bindex%5D%3B%20index%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20animation.animation.complete(animation.config)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Plays%20an%20animation%20with%20an%20optional%20%60type%60.%0A%20%20%20%20%20*%20%40param%20%7Bstring%3D%7D%20type%0A%20%20%20%20%20*%20%40param%20%7B!Object%3D%7D%20cookie%0A%20%20%20%20%20*%2F%0A%20%20%20%20playAnimation%3A%20function(type%2C%20cookie)%20%7B%0A%20%20%20%20%20%20var%20allConfigs%20%3D%20this.getAnimationConfig(type)%3B%0A%20%20%20%20%20%20if%20(!allConfigs)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20allAnimations%20%3D%20this._configureAnimationEffects(allConfigs)%3B%0A%20%20%20%20%20%20var%20allEffects%20%3D%20allAnimations.map(function(animation)%20%7B%0A%20%20%20%20%20%20%20%20return%20animation.effect%3B%0A%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20if%20(allEffects.length%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20this._player%20%3D%20this._runAnimationEffects(allEffects)%3B%0A%20%20%20%20%20%20%20%20this._player.onfinish%20%3D%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._completeAnimations(allAnimations)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(this._player)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._player.cancel()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._player%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20this.fire('neon-animation-finish'%2C%20cookie%2C%20%7Bbubbles%3A%20false%7D)%3B%0A%20%20%20%20%20%20%20%20%7D.bind(this)%3B%0A%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.fire('neon-animation-finish'%2C%20cookie%2C%20%7Bbubbles%3A%20false%7D)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Cancels%20the%20currently%20running%20animation.%0A%20%20%20%20%20*%2F%0A%20%20%20%20cancelAnimation%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._player)%20%7B%0A%20%20%20%20%20%20%20%20this._player.cancel()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20Polymer.NeonAnimationRunnerBehavior%20*%2F%0A%20%20Polymer.NeonAnimationRunnerBehavior%20%3D%20%5B%0A%20%20%20%20Polymer.NeonAnimatableBehavior%2C%0A%20%20%20%20Polymer.NeonAnimationRunnerBehaviorImpl%0A%20%20%5D%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-17.js%0A
0 ms
javascript;charset=utf-8,%0A%0A%2F**%0APolymer.IronFitBehavior%20fits%20an%20element%20in%20another%20element%20using%20%60max-height%60%20and%20%60max-width%60%2C%20and%0Aoptionally%20centers%20it%20in%20the%20window%20or%20another%20element.%0A%0AThe%20element%20will%20only%20be%20sized%20and%2For%20positioned%20if%20it%20has%20not%20already%20been%20sized%20and%2For%20positioned%0Aby%20CSS.%0A%0ACSS%20properties%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20Action%0A-----------------------------%7C-------------------------------------------%0A%60position%60%20set%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20Element%20is%20not%20centered%20horizontally%20or%20vertically%0A%60top%60%20or%20%60bottom%60%20set%20%20%20%20%20%20%20%20%7C%20Element%20is%20not%20vertically%20centered%0A%60left%60%20or%20%60right%60%20set%20%20%20%20%20%20%20%20%7C%20Element%20is%20not%20horizontally%20centered%0A%60max-height%60%20or%20%60height%60%20set%20%7C%20Element%20respects%20%60max-height%60%20or%20%60height%60%0A%60max-width%60%20or%20%60width%60%20set%20%20%20%7C%20Element%20respects%20%60max-width%60%20or%20%60width%60%0A%0A%40demo%20demo%2Findex.html%0A%40polymerBehavior%0A*%2F%0A%0A%20%20Polymer.IronFitBehavior%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20element%20that%20will%20receive%20a%20%60max-height%60%2F%60width%60.%20By%20default%20it%20is%20the%20same%20as%20%60this%60%2C%0A%20%20%20%20%20%20%20*%20but%20it%20can%20be%20set%20to%20a%20child%20element.%20This%20is%20useful%2C%20for%20example%2C%20for%20implementing%20a%0A%20%20%20%20%20%20%20*%20scrolling%20region%20inside%20the%20element.%0A%20%20%20%20%20%20%20*%20%40type%20%7B!Element%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20sizingTarget%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20element%20to%20fit%20%60this%60%20into.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20fitInto%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20value%3A%20window%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20auto-fit%20on%20attach.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20autoFitOnAttach%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%20%40type%20%7B%3FObject%7D%20*%2F%0A%20%20%20%20%20%20_fitInfo%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_fitWidth()%20%7B%0A%20%20%20%20%20%20var%20fitWidth%3B%0A%20%20%20%20%20%20if%20(this.fitInto%20%3D%3D%3D%20window)%20%7B%0A%20%20%20%20%20%20%20%20fitWidth%20%3D%20this.fitInto.innerWidth%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20fitWidth%20%3D%20this.fitInto.getBoundingClientRect().width%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20fitWidth%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_fitHeight()%20%7B%0A%20%20%20%20%20%20var%20fitHeight%3B%0A%20%20%20%20%20%20if%20(this.fitInto%20%3D%3D%3D%20window)%20%7B%0A%20%20%20%20%20%20%20%20fitHeight%20%3D%20this.fitInto.innerHeight%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20fitHeight%20%3D%20this.fitInto.getBoundingClientRect().height%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20fitHeight%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_fitLeft()%20%7B%0A%20%20%20%20%20%20var%20fitLeft%3B%0A%20%20%20%20%20%20if%20(this.fitInto%20%3D%3D%3D%20window)%20%7B%0A%20%20%20%20%20%20%20%20fitLeft%20%3D%200%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20fitLeft%20%3D%20this.fitInto.getBoundingClientRect().left%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20fitLeft%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_fitTop()%20%7B%0A%20%20%20%20%20%20var%20fitTop%3B%0A%20%20%20%20%20%20if%20(this.fitInto%20%3D%3D%3D%20window)%20%7B%0A%20%20%20%20%20%20%20%20fitTop%20%3D%200%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20fitTop%20%3D%20this.fitInto.getBoundingClientRect().top%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20fitTop%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.autoFitOnAttach)%20%7B%0A%20%20%20%20%20%20%20%20if%20(window.getComputedStyle(this).display%20%3D%3D%3D%20'none')%20%7B%0A%20%20%20%20%20%20%20%20%20%20setTimeout(function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.fit()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D.bind(this))%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.fit()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Fits%20and%20optionally%20centers%20the%20element%20into%20the%20window%2C%20or%20%60fitInfo%60%20if%20specified.%0A%20%20%20%20%20*%2F%0A%20%20%20%20fit%3A%20function()%20%7B%0A%20%20%20%20%20%20this._discoverInfo()%3B%0A%20%20%20%20%20%20this.constrain()%3B%0A%20%20%20%20%20%20this.center()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Memoize%20information%20needed%20to%20position%20and%20size%20the%20target%20element.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_discoverInfo%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._fitInfo)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20target%20%3D%20window.getComputedStyle(this)%3B%0A%20%20%20%20%20%20var%20sizer%20%3D%20window.getComputedStyle(this.sizingTarget)%3B%0A%20%20%20%20%20%20this._fitInfo%20%3D%20%7B%0A%20%20%20%20%20%20%20%20inlineStyle%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20top%3A%20this.style.top%20%7C%7C%20''%2C%0A%20%20%20%20%20%20%20%20%20%20left%3A%20this.style.left%20%7C%7C%20''%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20positionedBy%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20vertically%3A%20target.top%20!%3D%3D%20'auto'%20%3F%20'top'%20%3A%20(target.bottom%20!%3D%3D%20'auto'%20%3F%0A%20%20%20%20%20%20%20%20%20%20%20%20'bottom'%20%3A%20null)%2C%0A%20%20%20%20%20%20%20%20%20%20horizontally%3A%20target.left%20!%3D%3D%20'auto'%20%3F%20'left'%20%3A%20(target.right%20!%3D%3D%20'auto'%20%3F%0A%20%20%20%20%20%20%20%20%20%20%20%20'right'%20%3A%20null)%2C%0A%20%20%20%20%20%20%20%20%20%20css%3A%20target.position%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20sizedBy%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20height%3A%20sizer.maxHeight%20!%3D%3D%20'none'%2C%0A%20%20%20%20%20%20%20%20%20%20width%3A%20sizer.maxWidth%20!%3D%3D%20'none'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20margin%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20top%3A%20parseInt(target.marginTop%2C%2010)%20%7C%7C%200%2C%0A%20%20%20%20%20%20%20%20%20%20right%3A%20parseInt(target.marginRight%2C%2010)%20%7C%7C%200%2C%0A%20%20%20%20%20%20%20%20%20%20bottom%3A%20parseInt(target.marginBottom%2C%2010)%20%7C%7C%200%2C%0A%20%20%20%20%20%20%20%20%20%20left%3A%20parseInt(target.marginLeft%2C%2010)%20%7C%7C%200%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Resets%20the%20target%20element's%20position%20and%20size%20constraints%2C%20and%20clear%0A%20%20%20%20%20*%20the%20memoized%20data.%0A%20%20%20%20%20*%2F%0A%20%20%20%20resetFit%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(!this._fitInfo%20%7C%7C%20!this._fitInfo.sizedBy.height)%20%7B%0A%20%20%20%20%20%20%20%20this.sizingTarget.style.maxHeight%20%3D%20''%3B%0A%20%20%20%20%20%20%20%20this.style.top%20%3D%20this._fitInfo%20%3F%20this._fitInfo.inlineStyle.top%20%3A%20''%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!this._fitInfo%20%7C%7C%20!this._fitInfo.sizedBy.width)%20%7B%0A%20%20%20%20%20%20%20%20this.sizingTarget.style.maxWidth%20%3D%20''%3B%0A%20%20%20%20%20%20%20%20this.style.left%20%3D%20this._fitInfo%20%3F%20this._fitInfo.inlineStyle.left%20%3A%20''%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(this._fitInfo)%20%7B%0A%20%20%20%20%20%20%20%20this.style.position%20%3D%20this._fitInfo.positionedBy.css%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._fitInfo%20%3D%20null%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Equivalent%20to%20calling%20%60resetFit()%60%20and%20%60fit()%60.%20Useful%20to%20call%20this%20after%20the%20element%2C%0A%20%20%20%20%20*%20the%20window%2C%20or%20the%20%60fitInfo%60%20element%20has%20been%20resized.%0A%20%20%20%20%20*%2F%0A%20%20%20%20refit%3A%20function()%20%7B%0A%20%20%20%20%20%20this.resetFit()%3B%0A%20%20%20%20%20%20this.fit()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Constrains%20the%20size%20of%20the%20element%20to%20the%20window%20or%20%60fitInfo%60%20by%20setting%20%60max-height%60%0A%20%20%20%20%20*%20and%2For%20%60max-width%60.%0A%20%20%20%20%20*%2F%0A%20%20%20%20constrain%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20info%20%3D%20this._fitInfo%3B%0A%20%20%20%20%20%20%2F%2F%20position%20at%20(0px%2C%200px)%20if%20not%20already%20positioned%2C%20so%20we%20can%20measure%20the%20natural%20size.%0A%20%20%20%20%20%20if%20(!this._fitInfo.positionedBy.vertically)%20%7B%0A%20%20%20%20%20%20%20%20this.style.top%20%3D%20'0px'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!this._fitInfo.positionedBy.horizontally)%20%7B%0A%20%20%20%20%20%20%20%20this.style.left%20%3D%20'0px'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!this._fitInfo.positionedBy.vertically%20%7C%7C%20!this._fitInfo.positionedBy.horizontally)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20need%20position%3Afixed%20to%20properly%20size%20the%20element%0A%20%20%20%20%20%20%20%20this.style.position%20%3D%20'fixed'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%2F%2F%20need%20border-box%20for%20margin%2Fpadding%0A%20%20%20%20%20%20this.sizingTarget.style.boxSizing%20%3D%20'border-box'%3B%0A%20%20%20%20%20%20%2F%2F%20constrain%20the%20width%20and%20height%20if%20not%20already%20set%0A%20%20%20%20%20%20var%20rect%20%3D%20this.getBoundingClientRect()%3B%0A%20%20%20%20%20%20if%20(!info.sizedBy.height)%20%7B%0A%20%20%20%20%20%20%20%20this._sizeDimension(rect%2C%20info.positionedBy.vertically%2C%20'top'%2C%20'bottom'%2C%20'Height')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!info.sizedBy.width)%20%7B%0A%20%20%20%20%20%20%20%20this._sizeDimension(rect%2C%20info.positionedBy.horizontally%2C%20'left'%2C%20'right'%2C%20'Width')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_sizeDimension%3A%20function(rect%2C%20positionedBy%2C%20start%2C%20end%2C%20extent)%20%7B%0A%20%20%20%20%20%20var%20info%20%3D%20this._fitInfo%3B%0A%20%20%20%20%20%20var%20max%20%3D%20extent%20%3D%3D%3D%20'Width'%20%3F%20this._fitWidth%20%3A%20this._fitHeight%3B%0A%20%20%20%20%20%20var%20flip%20%3D%20(positionedBy%20%3D%3D%3D%20end)%3B%0A%20%20%20%20%20%20var%20offset%20%3D%20flip%20%3F%20max%20-%20rect%5Bend%5D%20%3A%20rect%5Bstart%5D%3B%0A%20%20%20%20%20%20var%20margin%20%3D%20info.margin%5Bflip%20%3F%20start%20%3A%20end%5D%3B%0A%20%20%20%20%20%20var%20offsetExtent%20%3D%20'offset'%20%2B%20extent%3B%0A%20%20%20%20%20%20var%20sizingOffset%20%3D%20this%5BoffsetExtent%5D%20-%20this.sizingTarget%5BoffsetExtent%5D%3B%0A%20%20%20%20%20%20this.sizingTarget.style%5B'max'%20%2B%20extent%5D%20%3D%20(max%20-%20margin%20-%20offset%20-%20sizingOffset)%20%2B%20'px'%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Centers%20horizontally%20and%20vertically%20if%20not%20already%20positioned.%20This%20also%20sets%0A%20%20%20%20%20*%20%60position%3Afixed%60.%0A%20%20%20%20%20*%2F%0A%20%20%20%20center%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(!this._fitInfo.positionedBy.vertically%20%7C%7C%20!this._fitInfo.positionedBy.horizontally)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20need%20position%3Afixed%20to%20center%0A%20%20%20%20%20%20%20%20this.style.position%20%3D%20'fixed'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!this._fitInfo.positionedBy.vertically)%20%7B%0A%20%20%20%20%20%20%20%20var%20top%20%3D%20(this._fitHeight%20-%20this.offsetHeight)%20%2F%202%20%2B%20this._fitTop%3B%0A%20%20%20%20%20%20%20%20top%20-%3D%20this._fitInfo.margin.top%3B%0A%20%20%20%20%20%20%20%20this.style.top%20%3D%20top%20%2B%20'px'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!this._fitInfo.positionedBy.horizontally)%20%7B%0A%20%20%20%20%20%20%20%20var%20left%20%3D%20(this._fitWidth%20-%20this.offsetWidth)%20%2F%202%20%2B%20this._fitLeft%3B%0A%20%20%20%20%20%20%20%20left%20-%3D%20this._fitInfo.margin.left%3B%0A%20%20%20%20%20%20%20%20this.style.left%20%3D%20left%20%2B%20'px'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-18.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20Polymer.IronOverlayManager%20%3D%20%7B%0A%0A%20%20%20%20_overlays%3A%20%5B%5D%2C%0A%0A%20%20%20%20%2F%2F%20iframes%20have%20a%20default%20z-index%20of%20100%2C%20so%20this%20default%20should%20be%20at%20least%0A%20%20%20%20%2F%2F%20that.%0A%20%20%20%20_minimumZ%3A%20101%2C%0A%0A%20%20%20%20_backdrops%3A%20%5B%5D%2C%0A%0A%20%20%20%20_applyOverlayZ%3A%20function(overlay%2C%20aboveZ)%20%7B%0A%20%20%20%20%20%20this._setZ(overlay%2C%20aboveZ%20%2B%202)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_setZ%3A%20function(element%2C%20z)%20%7B%0A%20%20%20%20%20%20element.style.zIndex%20%3D%20z%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20track%20overlays%20for%20z-index%20and%20focus%20managemant%0A%20%20%20%20addOverlay%3A%20function(overlay)%20%7B%0A%20%20%20%20%20%20var%20minimumZ%20%3D%20Math.max(this.currentOverlayZ()%2C%20this._minimumZ)%3B%0A%20%20%20%20%20%20this._overlays.push(overlay)%3B%0A%20%20%20%20%20%20var%20newZ%20%3D%20this.currentOverlayZ()%3B%0A%20%20%20%20%20%20if%20(newZ%20%3C%3D%20minimumZ)%20%7B%0A%20%20%20%20%20%20%20%20this._applyOverlayZ(overlay%2C%20minimumZ)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20removeOverlay%3A%20function(overlay)%20%7B%0A%20%20%20%20%20%20var%20i%20%3D%20this._overlays.indexOf(overlay)%3B%0A%20%20%20%20%20%20if%20(i%20%3E%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20this._overlays.splice(i%2C%201)%3B%0A%20%20%20%20%20%20%20%20this._setZ(overlay%2C%20'')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20currentOverlay%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20i%20%3D%20this._overlays.length%20-%201%3B%0A%20%20%20%20%20%20while%20(this._overlays%5Bi%5D%20%26%26%20!this._overlays%5Bi%5D.opened)%20%7B%0A%20%20%20%20%20%20%20%20--i%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20this._overlays%5Bi%5D%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20currentOverlayZ%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20z%20%3D%20this._minimumZ%3B%0A%20%20%20%20%20%20var%20current%20%3D%20this.currentOverlay()%3B%0A%20%20%20%20%20%20if%20(current)%20%7B%0A%20%20%20%20%20%20%20%20var%20z1%20%3D%20window.getComputedStyle(current).zIndex%3B%0A%20%20%20%20%20%20%20%20if%20(!isNaN(z1))%20%7B%0A%20%20%20%20%20%20%20%20%20%20z%20%3D%20Number(z1)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20z%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Ensures%20that%20the%20minimum%20z-index%20of%20new%20overlays%20is%20at%20least%20%60minimumZ%60.%0A%20%20%20%20%20*%20This%20does%20not%20effect%20the%20z-index%20of%20any%20existing%20overlays.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7Bnumber%7D%20minimumZ%0A%20%20%20%20%20*%2F%0A%20%20%20%20ensureMinimumZ%3A%20function(minimumZ)%20%7B%0A%20%20%20%20%20%20this._minimumZ%20%3D%20Math.max(this._minimumZ%2C%20minimumZ)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20focusOverlay%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20current%20%3D%20this.currentOverlay()%3B%0A%20%20%20%20%20%20%2F%2F%20We%20have%20to%20be%20careful%20to%20focus%20the%20next%20overlay%20_after_%20any%20current%0A%20%20%20%20%20%20%2F%2F%20transitions%20are%20complete%20(due%20to%20the%20state%20being%20toggled%20prior%20to%20the%0A%20%20%20%20%20%20%2F%2F%20transition).%20Otherwise%2C%20we%20risk%20infinite%20recursion%20when%20a%20transitioning%0A%20%20%20%20%20%20%2F%2F%20(closed)%20overlay%20becomes%20the%20current%20overlay.%0A%20%20%20%20%20%20%2F%2F%0A%20%20%20%20%20%20%2F%2F%20NOTE%3A%20We%20make%20the%20assumption%20that%20any%20overlay%20that%20completes%20a%20transition%0A%20%20%20%20%20%20%2F%2F%20will%20call%20into%20focusOverlay%20to%20kick%20the%20process%20back%20off.%20Currently%3A%0A%20%20%20%20%20%20%2F%2F%20transitionend%20-%3E%20_applyFocus%20-%3E%20focusOverlay.%0A%20%20%20%20%20%20if%20(current%20%26%26%20!current.transitioning)%20%7B%0A%20%20%20%20%20%20%20%20current._applyFocus()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20trackBackdrop%3A%20function(element)%20%7B%0A%20%20%20%20%20%20%2F%2F%20backdrops%20contains%20the%20overlays%20with%20a%20backdrop%20that%20are%20currently%0A%20%20%20%20%20%20%2F%2F%20visible%0A%20%20%20%20%20%20if%20(element.opened)%20%7B%0A%20%20%20%20%20%20%20%20this._backdrops.push(element)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20var%20index%20%3D%20this._backdrops.indexOf(element)%3B%0A%20%20%20%20%20%20%20%20if%20(index%20%3E%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._backdrops.splice(index%2C%201)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20getBackdrops%3A%20function()%20%7B%0A%20%20%20%20%20%20return%20this._backdrops%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-19.js%0A
0 ms
javascript;charset=utf-8,%0A%0A(function()%20%7B%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'iron-overlay-backdrop'%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Returns%20true%20if%20the%20backdrop%20is%20opened.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20opened%3A%20%7B%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_manager%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20value%3A%20Polymer.IronOverlayManager%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Appends%20the%20backdrop%20to%20document%20body%20and%20sets%20its%20%60z-index%60%20to%20be%20below%20the%20latest%20overlay.%0A%20%20%20%20%20*%2F%0A%20%20%20%20prepare%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(!this.parentNode)%20%7B%0A%20%20%20%20%20%20%20%20Polymer.dom(document.body).appendChild(this)%3B%0A%20%20%20%20%20%20%20%20this.style.zIndex%20%3D%20this._manager.currentOverlayZ()%20-%201%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Shows%20the%20backdrop%20if%20needed.%0A%20%20%20%20%20*%2F%0A%20%20%20%20open%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20only%20need%20to%20make%20the%20backdrop%20visible%20if%20this%20is%20called%20by%20the%20first%20overlay%20with%20a%20backdrop%0A%20%20%20%20%20%20if%20(this._manager.getBackdrops().length%20%3C%202)%20%7B%0A%20%20%20%20%20%20%20%20this._setOpened(true)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Hides%20the%20backdrop%20if%20needed.%0A%20%20%20%20%20*%2F%0A%20%20%20%20close%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20only%20need%20to%20make%20the%20backdrop%20invisible%20if%20this%20is%20called%20by%20the%20last%20overlay%20with%20a%20backdrop%0A%20%20%20%20%20%20if%20(this._manager.getBackdrops().length%20%3C%202)%20%7B%0A%20%20%20%20%20%20%20%20this._setOpened(false)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Removes%20the%20backdrop%20from%20document%20body%20if%20needed.%0A%20%20%20%20%20*%2F%0A%20%20%20%20complete%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20only%20remove%20the%20backdrop%20if%20there%20are%20no%20more%20overlays%20with%20backdrops%0A%20%20%20%20%20%20if%20(this._manager.getBackdrops().length%20%3D%3D%3D%200%20%26%26%20this.parentNode)%20%7B%0A%20%20%20%20%20%20%20%20Polymer.dom(this.parentNode).removeChild(this)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D)%3B%0A%0A%7D)()%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-20.js%0A
0 ms
javascript;charset=utf-8,%0A%0A%2F**%0AUse%20%60Polymer.IronOverlayBehavior%60%20to%20implement%20an%20element%20that%20can%20be%20hidden%20or%20shown%2C%20and%20displays%0Aon%20top%20of%20other%20content.%20It%20includes%20an%20optional%20backdrop%2C%20and%20can%20be%20used%20to%20implement%20a%20variety%0Aof%20UI%20controls%20including%20dialogs%20and%20drop%20downs.%20Multiple%20overlays%20may%20be%20displayed%20at%20once.%0A%0A%23%23%23%20Closing%20and%20canceling%0A%0AA%20dialog%20may%20be%20hidden%20by%20closing%20or%20canceling.%20The%20difference%20between%20close%20and%20cancel%20is%20user%0Aintent.%20Closing%20generally%20implies%20that%20the%20user%20acknowledged%20the%20content%20on%20the%20overlay.%20By%20default%2C%0Ait%20will%20cancel%20whenever%20the%20user%20taps%20outside%20it%20or%20presses%20the%20escape%20key.%20This%20behavior%20is%0Aconfigurable%20with%20the%20%60no-cancel-on-esc-key%60%20and%20the%20%60no-cancel-on-outside-click%60%20properties.%0A%60close()%60%20should%20be%20called%20explicitly%20by%20the%20implementer%20when%20the%20user%20interacts%20with%20a%20control%0Ain%20the%20overlay%20element.%20When%20the%20dialog%20is%20canceled%2C%20the%20overlay%20fires%20an%20'iron-overlay-canceled'%0Aevent.%20Call%20%60preventDefault%60%20on%20this%20event%20to%20prevent%20the%20overlay%20from%20closing.%0A%0A%23%23%23%20Positioning%0A%0ABy%20default%20the%20element%20is%20sized%20and%20positioned%20to%20fit%20and%20centered%20inside%20the%20window.%20You%20can%0Aposition%20and%20size%20it%20manually%20using%20CSS.%20See%20%60Polymer.IronFitBehavior%60.%0A%0A%23%23%23%20Backdrop%0A%0ASet%20the%20%60with-backdrop%60%20attribute%20to%20display%20a%20backdrop%20behind%20the%20overlay.%20The%20backdrop%20is%0Aappended%20to%20%60%3Cbody%3E%60%20and%20is%20of%20type%20%60%3Ciron-overlay-backdrop%3E%60.%20See%20its%20doc%20page%20for%20styling%0Aoptions.%0A%0A%23%23%23%20Limitations%0A%0AThe%20element%20is%20styled%20to%20appear%20on%20top%20of%20other%20content%20by%20setting%20its%20%60z-index%60%20property.%20You%0Amust%20ensure%20no%20element%20has%20a%20stacking%20context%20with%20a%20higher%20%60z-index%60%20than%20its%20parent%20stacking%0Acontext.%20You%20should%20place%20this%20element%20as%20a%20child%20of%20%60%3Cbody%3E%60%20whenever%20possible.%0A%0A%40demo%20demo%2Findex.html%0A%40polymerBehavior%20Polymer.IronOverlayBehavior%0A*%2F%0A%0A%20%20Polymer.IronOverlayBehaviorImpl%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20True%20if%20the%20overlay%20is%20currently%20displayed.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20opened%3A%20%7B%0A%20%20%20%20%20%20%20%20observer%3A%20'_openedChanged'%2C%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20True%20if%20the%20overlay%20was%20canceled%20when%20it%20was%20last%20closed.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20canceled%3A%20%7B%0A%20%20%20%20%20%20%20%20observer%3A%20'_canceledChanged'%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20display%20a%20backdrop%20behind%20the%20overlay.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20withBackdrop%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20disable%20auto-focusing%20the%20overlay%20or%20child%20nodes%20with%0A%20%20%20%20%20%20%20*%20the%20%60autofocus%60%20attribute%60%20when%20the%20overlay%20is%20opened.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20noAutoFocus%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20disable%20canceling%20the%20overlay%20with%20the%20ESC%20key.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20noCancelOnEscKey%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20disable%20canceling%20the%20overlay%20by%20clicking%20outside%20it.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20noCancelOnOutsideClick%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Returns%20the%20reason%20this%20dialog%20was%20last%20closed.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20closingReason%3A%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20was%20a%20getter%20before%2C%20but%20needs%20to%20be%20a%20property%20so%20other%0A%20%20%20%20%20%20%20%20%2F%2F%20behaviors%20can%20override%20this.%0A%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_manager%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20value%3A%20Polymer.IronOverlayManager%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_boundOnCaptureClick%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Function%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._onCaptureClick.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_boundOnCaptureKeydown%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Function%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._onCaptureKeydown.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'iron-resize'%3A%20'_onIronResize'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20The%20backdrop%20element.%0A%20%20%20%20%20*%20%40type%20Node%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%20backdropElement()%20%7B%0A%20%20%20%20%20%20return%20this._backdrop%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_focusNode()%20%7B%0A%20%20%20%20%20%20return%20Polymer.dom(this).querySelector('%5Bautofocus%5D')%20%7C%7C%20this%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20registered%3A%20function()%20%7B%0A%20%20%20%20%20%20this._backdrop%20%3D%20document.createElement('iron-overlay-backdrop')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20this._ensureSetup()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20Call%20_openedChanged%20here%20so%20that%20position%20can%20be%20computed%20correctly.%0A%20%20%20%20%20%20if%20(this._callOpenedWhenReady)%20%7B%0A%20%20%20%20%20%20%20%20this._openedChanged()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20detached%3A%20function()%20%7B%0A%20%20%20%20%20%20this.opened%20%3D%20false%3B%0A%20%20%20%20%20%20this._completeBackdrop()%3B%0A%20%20%20%20%20%20this._manager.removeOverlay(this)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Toggle%20the%20opened%20state%20of%20the%20overlay.%0A%20%20%20%20%20*%2F%0A%20%20%20%20toggle%3A%20function()%20%7B%0A%20%20%20%20%20%20this.opened%20%3D%20!this.opened%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Open%20the%20overlay.%0A%20%20%20%20%20*%2F%0A%20%20%20%20open%3A%20function()%20%7B%0A%20%20%20%20%20%20this.opened%20%3D%20true%3B%0A%20%20%20%20%20%20this.closingReason%20%3D%20%7Bcanceled%3A%20false%7D%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Close%20the%20overlay.%0A%20%20%20%20%20*%2F%0A%20%20%20%20close%3A%20function()%20%7B%0A%20%20%20%20%20%20this.opened%20%3D%20false%3B%0A%20%20%20%20%20%20this._setCanceled(false)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Cancels%20the%20overlay.%0A%20%20%20%20%20*%2F%0A%20%20%20%20cancel%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20cancelEvent%20%3D%20this.fire('iron-overlay-canceled'%2C%20undefined%2C%20%7Bcancelable%3A%20true%7D)%3B%0A%20%20%20%20%20%20if%20(cancelEvent.defaultPrevented)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this.opened%20%3D%20false%3B%0A%20%20%20%20%20%20this._setCanceled(true)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_ensureSetup%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._overlaySetup)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._overlaySetup%20%3D%20true%3B%0A%20%20%20%20%20%20this.style.outline%20%3D%20'none'%3B%0A%20%20%20%20%20%20this.style.display%20%3D%20'none'%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_openedChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20this.removeAttribute('aria-hidden')%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.setAttribute('aria-hidden'%2C%20'true')%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20wait%20to%20call%20after%20ready%20only%20if%20we're%20initially%20open%0A%20%20%20%20%20%20if%20(!this._overlaySetup)%20%7B%0A%20%20%20%20%20%20%20%20this._callOpenedWhenReady%20%3D%20this.opened%3B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(this._openChangedAsync)%20%7B%0A%20%20%20%20%20%20%20%20this.cancelAsync(this._openChangedAsync)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this._toggleListeners()%3B%0A%0A%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20this._prepareRenderOpened()%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20async%20here%20to%20allow%20overlay%20layer%20to%20become%20visible.%0A%20%20%20%20%20%20this._openChangedAsync%20%3D%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20overlay%20becomes%20visible%20here%0A%20%20%20%20%20%20%20%20this.style.display%20%3D%20''%3B%0A%20%20%20%20%20%20%20%20%2F%2F%20force%20layout%20to%20ensure%20transitions%20will%20go%0A%20%20%20%20%20%20%20%20%2F**%20%40suppress%20%7BsuspiciousCode%7D%20*%2F%20this.offsetWidth%3B%0A%20%20%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._renderOpened()%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._renderClosed()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20this._openChangedAsync%20%3D%20null%3B%0A%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_canceledChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20this.closingReason%20%3D%20this.closingReason%20%7C%7C%20%7B%7D%3B%0A%20%20%20%20%20%20this.closingReason.canceled%20%3D%20this.canceled%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_toggleListener%3A%20function(enable%2C%20node%2C%20event%2C%20boundListener%2C%20capture)%20%7B%0A%20%20%20%20%20%20if%20(enable)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20enable%20document-wide%20tap%20recognizer%0A%20%20%20%20%20%20%20%20if%20(event%20%3D%3D%3D%20'tap')%20%7B%0A%20%20%20%20%20%20%20%20%20%20Polymer.Gestures.add(document%2C%20'tap'%2C%20null)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20node.addEventListener(event%2C%20boundListener%2C%20capture)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20disable%20document-wide%20tap%20recognizer%0A%20%20%20%20%20%20%20%20if%20(event%20%3D%3D%3D%20'tap')%20%7B%0A%20%20%20%20%20%20%20%20%20%20Polymer.Gestures.remove(document%2C%20'tap'%2C%20null)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20node.removeEventListener(event%2C%20boundListener%2C%20capture)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_toggleListeners%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._toggleListenersAsync)%20%7B%0A%20%20%20%20%20%20%20%20this.cancelAsync(this._toggleListenersAsync)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%2F%2F%20async%20so%20we%20don't%20auto-close%20immediately%20via%20a%20click.%0A%20%20%20%20%20%20this._toggleListenersAsync%20%3D%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20this._toggleListener(this.opened%2C%20document%2C%20'tap'%2C%20this._boundOnCaptureClick%2C%20true)%3B%0A%20%20%20%20%20%20%20%20this._toggleListener(this.opened%2C%20document%2C%20'keydown'%2C%20this._boundOnCaptureKeydown%2C%20true)%3B%0A%20%20%20%20%20%20%20%20this._toggleListenersAsync%20%3D%20null%3B%0A%20%20%20%20%20%20%7D%2C%201)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20tasks%20which%20must%20occur%20before%20opening%3B%20e.g.%20making%20the%20element%20visible%0A%20%20%20%20_prepareRenderOpened%3A%20function()%20%7B%0A%20%20%20%20%20%20this._manager.addOverlay(this)%3B%0A%0A%20%20%20%20%20%20if%20(this.withBackdrop)%20%7B%0A%20%20%20%20%20%20%20%20this.backdropElement.prepare()%3B%0A%20%20%20%20%20%20%20%20this._manager.trackBackdrop(this)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this._preparePositioning()%3B%0A%20%20%20%20%20%20this.fit()%3B%0A%20%20%20%20%20%20this._finishPositioning()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20tasks%20which%20cause%20the%20overlay%20to%20actually%20open%3B%20typically%20play%20an%0A%20%20%20%20%2F%2F%20animation%0A%20%20%20%20_renderOpened%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.withBackdrop)%20%7B%0A%20%20%20%20%20%20%20%20this.backdropElement.open()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._finishRenderOpened()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_renderClosed%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.withBackdrop)%20%7B%0A%20%20%20%20%20%20%20%20this.backdropElement.close()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._finishRenderClosed()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onTransitionend%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%2F%2F%20make%20sure%20this%20is%20our%20transition%20event.%0A%20%20%20%20%20%20if%20(event%20%26%26%20event.target%20!%3D%3D%20this)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20this._finishRenderOpened()%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this._finishRenderClosed()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_finishRenderOpened%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20focus%20the%20child%20node%20with%20%5Bautofocus%5D%0A%20%20%20%20%20%20if%20(!this.noAutoFocus)%20%7B%0A%20%20%20%20%20%20%20%20this._focusNode.focus()%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this.fire('iron-overlay-opened')%3B%0A%0A%20%20%20%20%20%20this._squelchNextResize%20%3D%20true%3B%0A%20%20%20%20%20%20this.async(this.notifyResize)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_finishRenderClosed%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20hide%20the%20overlay%20and%20remove%20the%20backdrop%0A%20%20%20%20%20%20this.resetFit()%3B%0A%20%20%20%20%20%20this.style.display%20%3D%20'none'%3B%0A%20%20%20%20%20%20this._completeBackdrop()%3B%0A%20%20%20%20%20%20this._manager.removeOverlay(this)%3B%0A%0A%20%20%20%20%20%20this._focusNode.blur()%3B%0A%20%20%20%20%20%20%2F%2F%20focus%20the%20next%20overlay%2C%20if%20there%20is%20one%0A%20%20%20%20%20%20this._manager.focusOverlay()%3B%0A%0A%20%20%20%20%20%20this.fire('iron-overlay-closed'%2C%20this.closingReason)%3B%0A%0A%20%20%20%20%20%20this._squelchNextResize%20%3D%20true%3B%0A%20%20%20%20%20%20this.async(this.notifyResize)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_completeBackdrop%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.withBackdrop)%20%7B%0A%20%20%20%20%20%20%20%20this._manager.trackBackdrop(this)%3B%0A%20%20%20%20%20%20%20%20this.backdropElement.complete()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_preparePositioning%3A%20function()%20%7B%0A%20%20%20%20%20%20this.style.transition%20%3D%20this.style.webkitTransition%20%3D%20'none'%3B%0A%20%20%20%20%20%20this.style.transform%20%3D%20this.style.webkitTransform%20%3D%20'none'%3B%0A%20%20%20%20%20%20this.style.display%20%3D%20''%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_finishPositioning%3A%20function()%20%7B%0A%20%20%20%20%20%20this.style.display%20%3D%20'none'%3B%0A%20%20%20%20%20%20this.style.transform%20%3D%20this.style.webkitTransform%20%3D%20''%3B%0A%20%20%20%20%20%20%2F%2F%20force%20layout%20to%20avoid%20application%20of%20transform%0A%20%20%20%20%20%20%2F**%20%40suppress%20%7BsuspiciousCode%7D%20*%2F%20this.offsetWidth%3B%0A%20%20%20%20%20%20this.style.transition%20%3D%20this.style.webkitTransition%20%3D%20''%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_applyFocus%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!this.noAutoFocus)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._focusNode.focus()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this._focusNode.blur()%3B%0A%20%20%20%20%20%20%20%20this._manager.focusOverlay()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onCaptureClick%3A%20function(event)%20%7B%0A%20%20%20%20%20%20if%20(!this.noCancelOnOutsideClick%20%26%26%0A%20%20%20%20%20%20%20%20%20%20this._manager.currentOverlay()%20%3D%3D%3D%20this%20%26%26%0A%20%20%20%20%20%20%20%20%20%20Polymer.dom(event).path.indexOf(this)%20%3D%3D%3D%20-1)%20%7B%0A%20%20%20%20%20%20%20%20this.cancel()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onCaptureKeydown%3A%20function(event)%20%7B%0A%20%20%20%20%20%20var%20ESC%20%3D%2027%3B%0A%20%20%20%20%20%20if%20(!this.noCancelOnEscKey%20%26%26%20(event.keyCode%20%3D%3D%3D%20ESC))%20%7B%0A%20%20%20%20%20%20%20%20this.cancel()%3B%0A%20%20%20%20%20%20%20%20event.stopPropagation()%3B%0A%20%20%20%20%20%20%20%20event.stopImmediatePropagation()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onIronResize%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._squelchNextResize)%20%7B%0A%20%20%20%20%20%20%20%20this._squelchNextResize%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20this.refit()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%2F**%0A%20*%20Fired%20after%20the%20%60iron-overlay%60%20opens.%0A%20*%20%40event%20iron-overlay-opened%0A%20*%2F%0A%0A%2F**%0A%20*%20Fired%20when%20the%20%60iron-overlay%60%20is%20canceled%2C%20but%20before%20it%20is%20closed.%0A%20*%20Cancel%20the%20event%20to%20prevent%20the%20%60iron-overlay%60%20from%20closing.%0A%20*%20%40event%20iron-overlay-canceled%0A%20*%2F%0A%0A%2F**%0A%20*%20Fired%20after%20the%20%60iron-overlay%60%20closes.%0A%20*%20%40event%20iron-overlay-closed%0A%20*%20%40param%20%7B%7Bcanceled%3A%20(boolean%7Cundefined)%7D%7D%20set%20to%20the%20%60closingReason%60%20attribute%0A%20*%2F%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20*%2F%0A%20%20Polymer.IronOverlayBehavior%20%3D%20%5BPolymer.IronFitBehavior%2C%20Polymer.IronResizableBehavior%2C%20Polymer.IronOverlayBehaviorImpl%5D%3B%0A%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-21.js%0A
0 ms
css
13 ms
css
13 ms
javascript;charset=utf-8,%0A%0A%2F**%0AUse%20%60Polymer.PaperDialogBehavior%60%20and%20%60paper-dialog-shared-styles.html%60%20to%20implement%20a%20Material%20Design%0Adialog.%0A%0AFor%20example%2C%20if%20%60%3Cpaper-dialog-impl%3E%60%20implements%20this%20behavior%3A%0A%0A%20%20%20%20%3Cpaper-dialog-impl%3E%0A%20%20%20%20%20%20%20%20%3Ch2%3EHeader%3C%2Fh2%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%3EDialog%20body%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%3Cdiv%20class%3D%22buttons%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cpaper-button%20dialog-dismiss%3ECancel%3C%2Fpaper-button%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cpaper-button%20dialog-confirm%3EAccept%3C%2Fpaper-button%3E%0A%20%20%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%3C%2Fpaper-dialog-impl%3E%0A%0A%60paper-dialog-shared-styles.html%60%20provide%20styles%20for%20a%20header%2C%20content%20area%2C%20and%20an%20action%20area%20for%20buttons.%0AUse%20the%20%60%3Ch2%3E%60%20tag%20for%20the%20header%20and%20the%20%60buttons%60%20class%20for%20the%20action%20area.%20You%20can%20use%20the%0A%60paper-dialog-scrollable%60%20element%20(in%20its%20own%20repository)%20if%20you%20need%20a%20scrolling%20content%20area.%0A%0AUse%20the%20%60dialog-dismiss%60%20and%20%60dialog-confirm%60%20attributes%20on%20interactive%20controls%20to%20close%20the%0Adialog.%20If%20the%20user%20dismisses%20the%20dialog%20with%20%60dialog-confirm%60%2C%20the%20%60closingReason%60%20will%20update%0Ato%20include%20%60confirmed%3A%20true%60.%0A%0A%23%23%23%20Styling%0A%0AThe%20following%20custom%20properties%20and%20mixins%20are%20available%20for%20styling.%0A%0ACustom%20property%20%7C%20Description%20%7C%20Default%0A----------------%7C-------------%7C----------%0A%60--paper-dialog-background-color%60%20%7C%20Dialog%20background%20color%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20%60--primary-background-color%60%0A%60--paper-dialog-color%60%20%20%20%20%20%20%20%20%20%20%20%20%7C%20Dialog%20foreground%20color%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20%60--primary-text-color%60%0A%60--paper-dialog%60%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20Mixin%20applied%20to%20the%20dialog%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20%60%7B%7D%60%0A%60--paper-dialog-title%60%20%20%20%20%20%20%20%20%20%20%20%20%7C%20Mixin%20applied%20to%20the%20title%20(%60%3Ch2%3E%60)%20element%20%7C%20%60%7B%7D%60%0A%60--paper-dialog-button-color%60%20%20%20%20%20%7C%20Button%20area%20foreground%20color%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20%60--default-primary-color%60%0A%0A%23%23%23%20Accessibility%0A%0AThis%20element%20has%20%60role%3D%22dialog%22%60%20by%20default.%20Depending%20on%20the%20context%2C%20it%20may%20be%20more%20appropriate%0Ato%20override%20this%20attribute%20with%20%60role%3D%22alertdialog%22%60.%0A%0AIf%20%60modal%60%20is%20set%2C%20the%20element%20will%20set%20%60aria-modal%60%20and%20prevent%20the%20focus%20from%20exiting%20the%20element.%0AIt%20will%20also%20ensure%20that%20focus%20remains%20in%20the%20dialog.%0A%0AThe%20%60aria-labelledby%60%20attribute%20will%20be%20set%20to%20the%20header%20element%2C%20if%20one%20exists.%0A%0A%40hero%20hero.svg%0A%40demo%20demo%2Findex.html%0A%40polymerBehavior%20Polymer.PaperDialogBehavior%0A*%2F%0A%0A%20%20Polymer.PaperDialogBehaviorImpl%20%3D%20%7B%0A%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20'role'%3A%20'dialog'%2C%0A%20%20%20%20%20%20'tabindex'%3A%20'-1'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20%60modal%60%20is%20true%2C%20this%20implies%20%60no-cancel-on-outside-click%60%20and%20%60with-backdrop%60.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20modal%3A%20%7B%0A%20%20%20%20%20%20%20%20observer%3A%20'_modalChanged'%2C%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%20%40type%20%7B%3FNode%7D%20*%2F%0A%20%20%20%20%20%20_lastFocusedElement%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_boundOnFocus%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Function%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._onFocus.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_boundOnBackdropClick%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Function%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._onBackdropClick.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'tap'%3A%20'_onDialogClick'%2C%0A%20%20%20%20%20%20'iron-overlay-opened'%3A%20'_onIronOverlayOpened'%2C%0A%20%20%20%20%20%20'iron-overlay-closed'%3A%20'_onIronOverlayClosed'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20this._observer%20%3D%20this._observe(this)%3B%0A%20%20%20%20%20%20this._updateAriaLabelledBy()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20detached%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._observer)%20%7B%0A%20%20%20%20%20%20%20%20this._observer.disconnect()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_observe%3A%20function(node)%20%7B%0A%20%20%20%20%20%20var%20observer%20%3D%20new%20MutationObserver(function()%20%7B%0A%20%20%20%20%20%20%20%20this._updateAriaLabelledBy()%3B%0A%20%20%20%20%20%20%7D.bind(this))%3B%0A%20%20%20%20%20%20observer.observe(node%2C%20%7B%0A%20%20%20%20%20%20%20%20childList%3A%20true%2C%0A%20%20%20%20%20%20%20%20subtree%3A%20true%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20return%20observer%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_modalChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.modal)%20%7B%0A%20%20%20%20%20%20%20%20this.setAttribute('aria-modal'%2C%20'true')%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.setAttribute('aria-modal'%2C%20'false')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%2F%2F%20modal%20implies%20noCancelOnOutsideClick%20and%20withBackdrop%20if%20true%2C%20don't%20overwrite%0A%20%20%20%20%20%20%2F%2F%20those%20properties%20otherwise.%0A%20%20%20%20%20%20if%20(this.modal)%20%7B%0A%20%20%20%20%20%20%20%20this.noCancelOnOutsideClick%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20this.withBackdrop%20%3D%20true%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_updateAriaLabelledBy%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20header%20%3D%20Polymer.dom(this).querySelector('h2')%3B%0A%20%20%20%20%20%20if%20(!header)%20%7B%0A%20%20%20%20%20%20%20%20this.removeAttribute('aria-labelledby')%3B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20headerId%20%3D%20header.getAttribute('id')%3B%0A%20%20%20%20%20%20if%20(headerId%20%26%26%20this.getAttribute('aria-labelledby')%20%3D%3D%3D%20headerId)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%2F%2F%20set%20aria-describedBy%20to%20the%20header%20element%0A%20%20%20%20%20%20var%20labelledById%3B%0A%20%20%20%20%20%20if%20(headerId)%20%7B%0A%20%20%20%20%20%20%20%20labelledById%20%3D%20headerId%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20labelledById%20%3D%20'paper-dialog-header-'%20%2B%20new%20Date().getUTCMilliseconds()%3B%0A%20%20%20%20%20%20%20%20header.setAttribute('id'%2C%20labelledById)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this.setAttribute('aria-labelledby'%2C%20labelledById)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_updateClosingReasonConfirmed%3A%20function(confirmed)%20%7B%0A%20%20%20%20%20%20this.closingReason%20%3D%20this.closingReason%20%7C%7C%20%7B%7D%3B%0A%20%20%20%20%20%20this.closingReason.confirmed%20%3D%20confirmed%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onDialogClick%3A%20function(event)%20%7B%0A%20%20%20%20%20%20var%20target%20%3D%20event.target%3B%0A%20%20%20%20%20%20while%20(target%20%26%26%20target%20!%3D%3D%20this)%20%7B%0A%20%20%20%20%20%20%20%20if%20(target.hasAttribute)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(target.hasAttribute('dialog-dismiss'))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._updateClosingReasonConfirmed(false)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.close()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(target.hasAttribute('dialog-confirm'))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._updateClosingReasonConfirmed(true)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.close()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20target%20%3D%20target.parentNode%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onIronOverlayOpened%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.modal)%20%7B%0A%20%20%20%20%20%20%20%20document.body.addEventListener('focus'%2C%20this._boundOnFocus%2C%20true)%3B%0A%20%20%20%20%20%20%20%20this.backdropElement.addEventListener('click'%2C%20this._boundOnBackdropClick)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onIronOverlayClosed%3A%20function()%20%7B%0A%20%20%20%20%20%20document.body.removeEventListener('focus'%2C%20this._boundOnFocus%2C%20true)%3B%0A%20%20%20%20%20%20this.backdropElement.removeEventListener('click'%2C%20this._boundOnBackdropClick)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onFocus%3A%20function(event)%20%7B%0A%20%20%20%20%20%20if%20(this.modal)%20%7B%0A%20%20%20%20%20%20%20%20var%20target%20%3D%20event.target%3B%0A%20%20%20%20%20%20%20%20while%20(target%20%26%26%20target%20!%3D%3D%20this%20%26%26%20target%20!%3D%3D%20document.body)%20%7B%0A%20%20%20%20%20%20%20%20%20%20target%20%3D%20target.parentNode%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(target)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(target%20%3D%3D%3D%20document.body)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this._lastFocusedElement)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._lastFocusedElement.focus()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._focusNode.focus()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._lastFocusedElement%20%3D%20event.target%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onBackdropClick%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.modal)%20%7B%0A%20%20%20%20%20%20%20%20if%20(this._lastFocusedElement)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._lastFocusedElement.focus()%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._focusNode.focus()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20*%2F%0A%20%20Polymer.PaperDialogBehavior%20%3D%20%5BPolymer.IronOverlayBehavior%2C%20Polymer.PaperDialogBehaviorImpl%5D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-22.js%0A
0 ms
javascript;charset=utf-8,%0A%0A(function()%20%7B%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'paper-dialog'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.PaperDialogBehavior%2C%0A%20%20%20%20%20%20Polymer.NeonAnimationRunnerBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'neon-animation-finish'%3A%20'_onNeonAnimationFinish'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_renderOpened%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.withBackdrop)%20%7B%0A%20%20%20%20%20%20%20%20this.backdropElement.open()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this.playAnimation('entry')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_renderClosed%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.withBackdrop)%20%7B%0A%20%20%20%20%20%20%20%20this.backdropElement.close()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this.playAnimation('exit')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onNeonAnimationFinish%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20this._finishRenderOpened()%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this._finishRenderClosed()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D)%3B%0A%0A%7D)()%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-23.js%0A
1 ms
javascript;charset=utf-8,%0A%0A(function()%20%7B%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'paper-dialog-scrollable'%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20dialog%20element%20that%20implements%20%60Polymer.PaperDialogBehavior%60%20containing%20this%20element.%0A%20%20%20%20%20%20%20*%20%40type%20%7B%3FNode%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20dialogElement%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.parentNode%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'scrollable.scroll'%3A%20'_onScroll'%2C%0A%20%20%20%20%20%20'iron-resize'%3A%20'_onIronResize'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20the%20scrolling%20element.%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%20scrollTarget()%20%7B%0A%20%20%20%20%20%20return%20this.%24.scrollable%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20this.classList.add('no-padding')%3B%0A%20%20%20%20%20%20%2F%2F%20Set%20itself%20to%20the%20overlay%20sizing%20target%0A%20%20%20%20%20%20this.dialogElement.sizingTarget%20%3D%20this.scrollTarget%3B%0A%20%20%20%20%20%20%2F%2F%20If%20the%20host%20is%20sized%2C%20fit%20the%20scrollable%20area%20to%20the%20container.%20Otherwise%20let%20it%20be%0A%20%20%20%20%20%20%2F%2F%20its%20natural%20size.%0A%20%20%20%20%20%20requestAnimationFrame(function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.offsetHeight%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.%24.scrollable.classList.add('fit')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20this._scroll()%3B%0A%20%20%20%20%20%20%7D.bind(this))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_scroll%3A%20function()%20%7B%0A%20%20%20%20%20%20this.toggleClass('is-scrolled'%2C%20this.scrollTarget.scrollTop%20%3E%200)%3B%0A%20%20%20%20%20%20this.toggleClass('can-scroll'%2C%20this.scrollTarget.offsetHeight%20%3C%20this.scrollTarget.scrollHeight)%3B%0A%20%20%20%20%20%20this.toggleClass('scrolled-to-bottom'%2C%0A%20%20%20%20%20%20%20%20this.scrollTarget.scrollTop%20%2B%20this.scrollTarget.offsetHeight%20%3E%3D%20this.scrollTarget.scrollHeight)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onScroll%3A%20function()%20%7B%0A%20%20%20%20%20%20this._scroll()%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D)%0A%0A%7D)()%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-24.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20is%3A%20'paper-toolbar'%2C%0A%0A%20%20%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20%20%20'role'%3A%20'toolbar'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Controls%20how%20the%20items%20are%20aligned%20horizontally%20when%20they%20are%20placed%0A%20%20%20%20%20%20%20%20%20*%20at%20the%20bottom.%0A%20%20%20%20%20%20%20%20%20*%20Options%20are%20%60start%60%2C%20%60center%60%2C%20%60end%60%2C%20%60justified%60%20and%20%60around%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20bottomJustify%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Controls%20how%20the%20items%20are%20aligned%20horizontally.%0A%20%20%20%20%20%20%20%20%20*%20Options%20are%20%60start%60%2C%20%60center%60%2C%20%60end%60%2C%20%60justified%60%20and%20%60around%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20justify%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Controls%20how%20the%20items%20are%20aligned%20horizontally%20when%20they%20are%20placed%0A%20%20%20%20%20%20%20%20%20*%20in%20the%20middle.%0A%20%20%20%20%20%20%20%20%20*%20Options%20are%20%60start%60%2C%20%60center%60%2C%20%60end%60%2C%20%60justified%60%20and%20%60around%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20middleJustify%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._observer%20%3D%20this._observe(this)%3B%0A%20%20%20%20%20%20%20%20this._updateAriaLabelledBy()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20detached%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(this._observer)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._observer.disconnect()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_observe%3A%20function(node)%20%7B%0A%20%20%20%20%20%20%20%20var%20observer%20%3D%20new%20MutationObserver(function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._updateAriaLabelledBy()%3B%0A%20%20%20%20%20%20%20%20%7D.bind(this))%3B%0A%20%20%20%20%20%20%20%20observer.observe(node%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20childList%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20subtree%3A%20true%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20return%20observer%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_updateAriaLabelledBy%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20var%20labelledBy%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20var%20contents%20%3D%20Polymer.dom(this.root).querySelectorAll('content')%3B%0A%20%20%20%20%20%20%20%20for%20(var%20content%2C%20index%20%3D%200%3B%20content%20%3D%20contents%5Bindex%5D%3B%20index%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20nodes%20%3D%20Polymer.dom(content).getDistributedNodes()%3B%0A%20%20%20%20%20%20%20%20%20%20for%20(var%20node%2C%20jndex%20%3D%200%3B%20node%20%3D%20nodes%5Bjndex%5D%3B%20jndex%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(node.classList%20%26%26%20node.classList.contains('title'))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(node.id)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20labelledBy.push(node.id)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20id%20%3D%20'paper-toolbar-label-'%20%2B%20Math.floor(Math.random()%20*%2010000)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20node.id%20%3D%20id%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20labelledBy.push(id)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(labelledBy.length%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.setAttribute('aria-labelledby'%2C%20labelledBy.join('%20'))%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_computeBarExtraClasses%3A%20function(barJustify)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!barJustify)%20return%20''%3B%0A%0A%20%20%20%20%20%20%20%20return%20barJustify%20%2B%20(barJustify%20%3D%3D%3D%20'justified'%20%3F%20''%20%3A%20'-justified')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-25.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20(function()%20%7B%0A%20%20%20%20'use%20strict'%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Chrome%20uses%20an%20older%20version%20of%20DOM%20Level%203%20Keyboard%20Events%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Most%20keys%20are%20labeled%20as%20text%2C%20but%20some%20are%20Unicode%20codepoints.%0A%20%20%20%20%20*%20Values%20taken%20from%3A%20http%3A%2F%2Fwww.w3.org%2FTR%2F2007%2FWD-DOM-Level-3-Events-20071221%2Fkeyset.html%23KeySet-Set%0A%20%20%20%20%20*%2F%0A%20%20%20%20var%20KEY_IDENTIFIER%20%3D%20%7B%0A%20%20%20%20%20%20'U%2B0008'%3A%20'backspace'%2C%0A%20%20%20%20%20%20'U%2B0009'%3A%20'tab'%2C%0A%20%20%20%20%20%20'U%2B001B'%3A%20'esc'%2C%0A%20%20%20%20%20%20'U%2B0020'%3A%20'space'%2C%0A%20%20%20%20%20%20'U%2B007F'%3A%20'del'%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Special%20table%20for%20KeyboardEvent.keyCode.%0A%20%20%20%20%20*%20KeyboardEvent.keyIdentifier%20is%20better%2C%20and%20KeyBoardEvent.key%20is%20even%20better%0A%20%20%20%20%20*%20than%20that.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Values%20from%3A%20https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FAPI%2FKeyboardEvent.keyCode%23Value_of_keyCode%0A%20%20%20%20%20*%2F%0A%20%20%20%20var%20KEY_CODE%20%3D%20%7B%0A%20%20%20%20%20%208%3A%20'backspace'%2C%0A%20%20%20%20%20%209%3A%20'tab'%2C%0A%20%20%20%20%20%2013%3A%20'enter'%2C%0A%20%20%20%20%20%2027%3A%20'esc'%2C%0A%20%20%20%20%20%2033%3A%20'pageup'%2C%0A%20%20%20%20%20%2034%3A%20'pagedown'%2C%0A%20%20%20%20%20%2035%3A%20'end'%2C%0A%20%20%20%20%20%2036%3A%20'home'%2C%0A%20%20%20%20%20%2032%3A%20'space'%2C%0A%20%20%20%20%20%2037%3A%20'left'%2C%0A%20%20%20%20%20%2038%3A%20'up'%2C%0A%20%20%20%20%20%2039%3A%20'right'%2C%0A%20%20%20%20%20%2040%3A%20'down'%2C%0A%20%20%20%20%20%2046%3A%20'del'%2C%0A%20%20%20%20%20%20106%3A%20'*'%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20MODIFIER_KEYS%20maps%20the%20short%20name%20for%20modifier%20keys%20used%20in%20a%20key%0A%20%20%20%20%20*%20combo%20string%20to%20the%20property%20name%20that%20references%20those%20same%20keys%0A%20%20%20%20%20*%20in%20a%20KeyboardEvent%20instance.%0A%20%20%20%20%20*%2F%0A%20%20%20%20var%20MODIFIER_KEYS%20%3D%20%7B%0A%20%20%20%20%20%20'shift'%3A%20'shiftKey'%2C%0A%20%20%20%20%20%20'ctrl'%3A%20'ctrlKey'%2C%0A%20%20%20%20%20%20'alt'%3A%20'altKey'%2C%0A%20%20%20%20%20%20'meta'%3A%20'metaKey'%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20KeyboardEvent.key%20is%20mostly%20represented%20by%20printable%20character%20made%20by%0A%20%20%20%20%20*%20the%20keyboard%2C%20with%20unprintable%20keys%20labeled%20nicely.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20However%2C%20on%20OS%20X%2C%20Alt%2Bchar%20can%20make%20a%20Unicode%20character%20that%20follows%20an%0A%20%20%20%20%20*%20Apple-specific%20mapping.%20In%20this%20case%2C%20we%20fall%20back%20to%20.keyCode.%0A%20%20%20%20%20*%2F%0A%20%20%20%20var%20KEY_CHAR%20%3D%20%2F%5Ba-z0-9*%5D%2F%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Matches%20a%20keyIdentifier%20string.%0A%20%20%20%20%20*%2F%0A%20%20%20%20var%20IDENT_CHAR%20%3D%20%2FU%5C%2B%2F%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Matches%20arrow%20keys%20in%20Gecko%2027.0%2B%0A%20%20%20%20%20*%2F%0A%20%20%20%20var%20ARROW_KEY%20%3D%20%2F%5Earrow%2F%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Matches%20space%20keys%20everywhere%20(notably%20including%20IE10's%20exceptional%20name%0A%20%20%20%20%20*%20%60spacebar%60).%0A%20%20%20%20%20*%2F%0A%20%20%20%20var%20SPACE_KEY%20%3D%20%2F%5Espace(bar)%3F%2F%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Transforms%20the%20key.%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20key%20The%20KeyBoardEvent.key%0A%20%20%20%20%20*%20%40param%20%7BBoolean%7D%20%5BnoSpecialChars%5D%20Limits%20the%20transformation%20to%0A%20%20%20%20%20*%20alpha-numeric%20characters.%0A%20%20%20%20%20*%2F%0A%20%20%20%20function%20transformKey(key%2C%20noSpecialChars)%20%7B%0A%20%20%20%20%20%20var%20validKey%20%3D%20''%3B%0A%20%20%20%20%20%20if%20(key)%20%7B%0A%20%20%20%20%20%20%20%20var%20lKey%20%3D%20key.toLowerCase()%3B%0A%20%20%20%20%20%20%20%20if%20(lKey%20%3D%3D%3D%20'%20'%20%7C%7C%20SPACE_KEY.test(lKey))%20%7B%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20'space'%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(lKey.length%20%3D%3D%201)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!noSpecialChars%20%7C%7C%20KEY_CHAR.test(lKey))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20lKey%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(ARROW_KEY.test(lKey))%20%7B%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20lKey.replace('arrow'%2C%20'')%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(lKey%20%3D%3D%20'multiply')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20numpad%20'*'%20can%20map%20to%20Multiply%20on%20IE%2FWindows%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20'*'%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20lKey%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20validKey%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20function%20transformKeyIdentifier(keyIdent)%20%7B%0A%20%20%20%20%20%20var%20validKey%20%3D%20''%3B%0A%20%20%20%20%20%20if%20(keyIdent)%20%7B%0A%20%20%20%20%20%20%20%20if%20(keyIdent%20in%20KEY_IDENTIFIER)%20%7B%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20KEY_IDENTIFIER%5BkeyIdent%5D%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(IDENT_CHAR.test(keyIdent))%20%7B%0A%20%20%20%20%20%20%20%20%20%20keyIdent%20%3D%20parseInt(keyIdent.replace('U%2B'%2C%20'0x')%2C%2016)%3B%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20String.fromCharCode(keyIdent).toLowerCase()%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20keyIdent.toLowerCase()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20validKey%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20function%20transformKeyCode(keyCode)%20%7B%0A%20%20%20%20%20%20var%20validKey%20%3D%20''%3B%0A%20%20%20%20%20%20if%20(Number(keyCode))%20%7B%0A%20%20%20%20%20%20%20%20if%20(keyCode%20%3E%3D%2065%20%26%26%20keyCode%20%3C%3D%2090)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20ascii%20a-z%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20lowercase%20is%2032%20offset%20from%20uppercase%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20String.fromCharCode(32%20%2B%20keyCode)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(keyCode%20%3E%3D%20112%20%26%26%20keyCode%20%3C%3D%20123)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20function%20keys%20f1-f12%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20'f'%20%2B%20(keyCode%20-%20112)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(keyCode%20%3E%3D%2048%20%26%26%20keyCode%20%3C%3D%2057)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20top%200-9%20keys%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20String(48%20-%20keyCode)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(keyCode%20%3E%3D%2096%20%26%26%20keyCode%20%3C%3D%20105)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20num%20pad%200-9%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20String(96%20-%20keyCode)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20validKey%20%3D%20KEY_CODE%5BkeyCode%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20validKey%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20%20*%20Calculates%20the%20normalized%20key%20for%20a%20KeyboardEvent.%0A%20%20%20%20%20%20*%20%40param%20%7BKeyboardEvent%7D%20keyEvent%0A%20%20%20%20%20%20*%20%40param%20%7BBoolean%7D%20%5BnoSpecialChars%5D%20Set%20to%20true%20to%20limit%20keyEvent.key%0A%20%20%20%20%20%20*%20transformation%20to%20alpha-numeric%20chars.%20This%20is%20useful%20with%20key%0A%20%20%20%20%20%20*%20combinations%20like%20shift%20%2B%202%2C%20which%20on%20FF%20for%20MacOS%20produces%0A%20%20%20%20%20%20*%20keyEvent.key%20%3D%20%40%0A%20%20%20%20%20%20*%20To%20get%202%20returned%2C%20set%20noSpecialChars%20%3D%20true%0A%20%20%20%20%20%20*%20To%20get%20%40%20returned%2C%20set%20noSpecialChars%20%3D%20false%0A%20%20%20%20%20*%2F%0A%20%20%20%20function%20normalizedKeyForEvent(keyEvent%2C%20noSpecialChars)%20%7B%0A%20%20%20%20%20%20%2F%2F%20Fall%20back%20from%20.key%2C%20to%20.keyIdentifier%2C%20to%20.keyCode%2C%20and%20then%20to%0A%20%20%20%20%20%20%2F%2F%20.detail.key%20to%20support%20artificial%20keyboard%20events.%0A%20%20%20%20%20%20return%20transformKey(keyEvent.key%2C%20noSpecialChars)%20%7C%7C%0A%20%20%20%20%20%20%20%20transformKeyIdentifier(keyEvent.keyIdentifier)%20%7C%7C%0A%20%20%20%20%20%20%20%20transformKeyCode(keyEvent.keyCode)%20%7C%7C%0A%20%20%20%20%20%20%20%20transformKey(keyEvent.detail.key%2C%20noSpecialChars)%20%7C%7C%20''%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20function%20keyComboMatchesEvent(keyCombo%2C%20event)%20%7B%0A%20%20%20%20%20%20%2F%2F%20For%20combos%20with%20modifiers%20we%20support%20only%20alpha-numeric%20keys%0A%20%20%20%20%20%20var%20keyEvent%20%3D%20normalizedKeyForEvent(event%2C%20keyCombo.hasModifiers)%3B%0A%20%20%20%20%20%20return%20keyEvent%20%3D%3D%3D%20keyCombo.key%20%26%26%0A%20%20%20%20%20%20%20%20(!keyCombo.hasModifiers%20%7C%7C%20(%0A%20%20%20%20%20%20%20%20%20%20!!event.shiftKey%20%3D%3D%3D%20!!keyCombo.shiftKey%20%26%26%0A%20%20%20%20%20%20%20%20%20%20!!event.ctrlKey%20%3D%3D%3D%20!!keyCombo.ctrlKey%20%26%26%0A%20%20%20%20%20%20%20%20%20%20!!event.altKey%20%3D%3D%3D%20!!keyCombo.altKey%20%26%26%0A%20%20%20%20%20%20%20%20%20%20!!event.metaKey%20%3D%3D%3D%20!!keyCombo.metaKey)%0A%20%20%20%20%20%20%20%20)%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20function%20parseKeyComboString(keyComboString)%20%7B%0A%20%20%20%20%20%20if%20(keyComboString.length%20%3D%3D%3D%201)%20%7B%0A%20%20%20%20%20%20%20%20return%20%7B%0A%20%20%20%20%20%20%20%20%20%20combo%3A%20keyComboString%2C%0A%20%20%20%20%20%20%20%20%20%20key%3A%20keyComboString%2C%0A%20%20%20%20%20%20%20%20%20%20event%3A%20'keydown'%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20keyComboString.split('%2B').reduce(function(parsedKeyCombo%2C%20keyComboPart)%20%7B%0A%20%20%20%20%20%20%20%20var%20eventParts%20%3D%20keyComboPart.split('%3A')%3B%0A%20%20%20%20%20%20%20%20var%20keyName%20%3D%20eventParts%5B0%5D%3B%0A%20%20%20%20%20%20%20%20var%20event%20%3D%20eventParts%5B1%5D%3B%0A%0A%20%20%20%20%20%20%20%20if%20(keyName%20in%20MODIFIER_KEYS)%20%7B%0A%20%20%20%20%20%20%20%20%20%20parsedKeyCombo%5BMODIFIER_KEYS%5BkeyName%5D%5D%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%20parsedKeyCombo.hasModifiers%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20parsedKeyCombo.key%20%3D%20keyName%3B%0A%20%20%20%20%20%20%20%20%20%20parsedKeyCombo.event%20%3D%20event%20%7C%7C%20'keydown'%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20parsedKeyCombo%3B%0A%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20combo%3A%20keyComboString.split('%3A').shift()%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20function%20parseEventString(eventString)%20%7B%0A%20%20%20%20%20%20return%20eventString.trim().split('%20').map(function(keyComboString)%20%7B%0A%20%20%20%20%20%20%20%20return%20parseKeyComboString(keyComboString)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20%60Polymer.IronA11yKeysBehavior%60%20provides%20a%20normalized%20interface%20for%20processing%0A%20%20%20%20%20*%20keyboard%20commands%20that%20pertain%20to%20%5BWAI-ARIA%20best%20practices%5D(http%3A%2F%2Fwww.w3.org%2FTR%2Fwai-aria-practices%2F%23kbd_general_binding).%0A%20%20%20%20%20*%20The%20element%20takes%20care%20of%20browser%20differences%20with%20respect%20to%20Keyboard%20events%0A%20%20%20%20%20*%20and%20uses%20an%20expressive%20syntax%20to%20filter%20key%20presses.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Use%20the%20%60keyBindings%60%20prototype%20property%20to%20express%20what%20combination%20of%20keys%0A%20%20%20%20%20*%20will%20trigger%20the%20event%20to%20fire.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20Use%20the%20%60key-event-target%60%20attribute%20to%20set%20up%20event%20handlers%20on%20a%20specific%0A%20%20%20%20%20*%20node.%0A%20%20%20%20%20*%20The%20%60keys-pressed%60%20event%20will%20fire%20when%20one%20of%20the%20key%20combinations%20set%20with%20the%0A%20%20%20%20%20*%20%60keys%60%20property%20is%20pressed.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40demo%20demo%2Findex.html%0A%20%20%20%20%20*%20%40polymerBehavior%0A%20%20%20%20%20*%2F%0A%20%20%20%20Polymer.IronA11yKeysBehavior%20%3D%20%7B%0A%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20HTMLElement%20that%20will%20be%20firing%20relevant%20KeyboardEvents.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20keyEventTarget%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20this%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20this%20property%20will%20cause%20the%20implementing%20element%20to%0A%20%20%20%20%20%20%20%20%20*%20automatically%20stop%20propagation%20on%20any%20handled%20KeyboardEvents.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20stopKeyboardEventPropagation%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_boundKeyHandlers%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Array%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20We%20use%20this%20due%20to%20a%20limitation%20in%20IE10%20where%20instances%20will%20have%0A%20%20%20%20%20%20%20%20%2F%2F%20own%20properties%20of%20everything%20on%20the%20%22prototype%22.%0A%20%20%20%20%20%20%20%20_imperativeKeyBindings%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20%7B%7D%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20%20%20'_resetKeyEventListeners(keyEventTarget%2C%20_boundKeyHandlers)'%0A%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20keyBindings%3A%20%7B%7D%2C%0A%0A%20%20%20%20%20%20registered%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._prepKeyBindings()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._listenKeyEventListeners()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20detached%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._unlistenKeyEventListeners()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Can%20be%20used%20to%20imperatively%20add%20a%20key%20binding%20to%20the%20implementing%0A%20%20%20%20%20%20%20*%20element.%20This%20is%20the%20imperative%20equivalent%20of%20declaring%20a%20keybinding%0A%20%20%20%20%20%20%20*%20in%20the%20%60keyBindings%60%20prototype%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20addOwnKeyBinding%3A%20function(eventString%2C%20handlerName)%20%7B%0A%20%20%20%20%20%20%20%20this._imperativeKeyBindings%5BeventString%5D%20%3D%20handlerName%3B%0A%20%20%20%20%20%20%20%20this._prepKeyBindings()%3B%0A%20%20%20%20%20%20%20%20this._resetKeyEventListeners()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20When%20called%2C%20will%20remove%20all%20imperatively-added%20key%20bindings.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20removeOwnKeyBindings%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._imperativeKeyBindings%20%3D%20%7B%7D%3B%0A%20%20%20%20%20%20%20%20this._prepKeyBindings()%3B%0A%20%20%20%20%20%20%20%20this._resetKeyEventListeners()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20keyboardEventMatchesKeys%3A%20function(event%2C%20eventString)%20%7B%0A%20%20%20%20%20%20%20%20var%20keyCombos%20%3D%20parseEventString(eventString)%3B%0A%20%20%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20keyCombos.length%3B%20%2B%2Bi)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(keyComboMatchesEvent(keyCombos%5Bi%5D%2C%20event))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_collectKeyBindings%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20var%20keyBindings%20%3D%20this.behaviors.map(function(behavior)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20behavior.keyBindings%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(keyBindings.indexOf(this.keyBindings)%20%3D%3D%3D%20-1)%20%7B%0A%20%20%20%20%20%20%20%20%20%20keyBindings.push(this.keyBindings)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20keyBindings%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_prepKeyBindings%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._keyBindings%20%3D%20%7B%7D%3B%0A%0A%20%20%20%20%20%20%20%20this._collectKeyBindings().forEach(function(keyBindings)%20%7B%0A%20%20%20%20%20%20%20%20%20%20for%20(var%20eventString%20in%20keyBindings)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._addKeyBinding(eventString%2C%20keyBindings%5BeventString%5D)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%20this)%3B%0A%0A%20%20%20%20%20%20%20%20for%20(var%20eventString%20in%20this._imperativeKeyBindings)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._addKeyBinding(eventString%2C%20this._imperativeKeyBindings%5BeventString%5D)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Give%20precedence%20to%20combos%20with%20modifiers%20to%20be%20checked%20first.%0A%20%20%20%20%20%20%20%20for%20(var%20eventName%20in%20this._keyBindings)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._keyBindings%5BeventName%5D.sort(function%20(kb1%2C%20kb2)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20b1%20%3D%20kb1%5B0%5D.hasModifiers%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20b2%20%3D%20kb2%5B0%5D.hasModifiers%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20(b1%20%3D%3D%3D%20b2)%20%3F%200%20%3A%20b1%20%3F%20-1%20%3A%201%3B%0A%20%20%20%20%20%20%20%20%20%20%7D)%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_addKeyBinding%3A%20function(eventString%2C%20handlerName)%20%7B%0A%20%20%20%20%20%20%20%20parseEventString(eventString).forEach(function(keyCombo)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._keyBindings%5BkeyCombo.event%5D%20%3D%0A%20%20%20%20%20%20%20%20%20%20%20%20this._keyBindings%5BkeyCombo.event%5D%20%7C%7C%20%5B%5D%3B%0A%0A%20%20%20%20%20%20%20%20%20%20this._keyBindings%5BkeyCombo.event%5D.push(%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20keyCombo%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20handlerName%0A%20%20%20%20%20%20%20%20%20%20%5D)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%20this)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_resetKeyEventListeners%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._unlistenKeyEventListeners()%3B%0A%0A%20%20%20%20%20%20%20%20if%20(this.isAttached)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._listenKeyEventListeners()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_listenKeyEventListeners%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20Object.keys(this._keyBindings).forEach(function(eventName)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20keyBindings%20%3D%20this._keyBindings%5BeventName%5D%3B%0A%20%20%20%20%20%20%20%20%20%20var%20boundKeyHandler%20%3D%20this._onKeyBindingEvent.bind(this%2C%20keyBindings)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20this._boundKeyHandlers.push(%5Bthis.keyEventTarget%2C%20eventName%2C%20boundKeyHandler%5D)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20this.keyEventTarget.addEventListener(eventName%2C%20boundKeyHandler)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%20this)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_unlistenKeyEventListeners%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20var%20keyHandlerTuple%3B%0A%20%20%20%20%20%20%20%20var%20keyEventTarget%3B%0A%20%20%20%20%20%20%20%20var%20eventName%3B%0A%20%20%20%20%20%20%20%20var%20boundKeyHandler%3B%0A%0A%20%20%20%20%20%20%20%20while%20(this._boundKeyHandlers.length)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20My%20kingdom%20for%20block-scope%20binding%20and%20destructuring%20assignment..%0A%20%20%20%20%20%20%20%20%20%20keyHandlerTuple%20%3D%20this._boundKeyHandlers.pop()%3B%0A%20%20%20%20%20%20%20%20%20%20keyEventTarget%20%3D%20keyHandlerTuple%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20eventName%20%3D%20keyHandlerTuple%5B1%5D%3B%0A%20%20%20%20%20%20%20%20%20%20boundKeyHandler%20%3D%20keyHandlerTuple%5B2%5D%3B%0A%0A%20%20%20%20%20%20%20%20%20%20keyEventTarget.removeEventListener(eventName%2C%20boundKeyHandler)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_onKeyBindingEvent%3A%20function(keyBindings%2C%20event)%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.stopKeyboardEventPropagation)%20%7B%0A%20%20%20%20%20%20%20%20%20%20event.stopPropagation()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20if%20event%20has%20been%20already%20prevented%2C%20don't%20do%20anything%0A%20%20%20%20%20%20%20%20if%20(event.defaultPrevented)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20keyBindings.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20keyCombo%20%3D%20keyBindings%5Bi%5D%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%20%20var%20handlerName%20%3D%20keyBindings%5Bi%5D%5B1%5D%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(keyComboMatchesEvent(keyCombo%2C%20event))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._triggerKeyHandler(keyCombo%2C%20handlerName%2C%20event)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20exit%20the%20loop%20if%20eventDefault%20was%20prevented%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(event.defaultPrevented)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_triggerKeyHandler%3A%20function(keyCombo%2C%20handlerName%2C%20keyboardEvent)%20%7B%0A%20%20%20%20%20%20%20%20var%20detail%20%3D%20Object.create(keyCombo)%3B%0A%20%20%20%20%20%20%20%20detail.keyboardEvent%20%3D%20keyboardEvent%3B%0A%20%20%20%20%20%20%20%20var%20event%20%3D%20new%20CustomEvent(keyCombo.event%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20detail%3A%20detail%2C%0A%20%20%20%20%20%20%20%20%20%20cancelable%3A%20true%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20this%5BhandlerName%5D.call(this%2C%20event)%3B%0A%20%20%20%20%20%20%20%20if%20(event.defaultPrevented)%20%7B%0A%20%20%20%20%20%20%20%20%20%20keyboardEvent.preventDefault()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%3B%0A%20%20%7D)()%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-26.js%0A
2 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20%40demo%20demo%2Findex.html%0A%20%20%20*%20%40polymerBehavior%0A%20%20%20*%2F%0A%20%20Polymer.IronControlState%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20element%20currently%20has%20focus.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20focused%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20user%20cannot%20interact%20with%20this%20element.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20disabled%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_disabledChanged'%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_oldTabIndex%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_boundFocusBlurHandler%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Function%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._focusBlurHandler.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_changedControlState(focused%2C%20disabled)'%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20this.addEventListener('focus'%2C%20this._boundFocusBlurHandler%2C%20true)%3B%0A%20%20%20%20%20%20this.addEventListener('blur'%2C%20this._boundFocusBlurHandler%2C%20true)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_focusBlurHandler%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%2F%2F%20NOTE(cdata)%3A%20%20if%20we%20are%20in%20ShadowDOM%20land%2C%20%60event.target%60%20will%0A%20%20%20%20%20%20%2F%2F%20eventually%20become%20%60this%60%20due%20to%20retargeting%3B%20if%20we%20are%20not%20in%0A%20%20%20%20%20%20%2F%2F%20ShadowDOM%20land%2C%20%60event.target%60%20will%20eventually%20become%20%60this%60%20due%0A%20%20%20%20%20%20%2F%2F%20to%20the%20second%20conditional%20which%20fires%20a%20synthetic%20event%20(that%20is%20also%0A%20%20%20%20%20%20%2F%2F%20handled).%20In%20either%20case%2C%20we%20can%20disregard%20%60event.path%60.%0A%0A%20%20%20%20%20%20if%20(event.target%20%3D%3D%3D%20this)%20%7B%0A%20%20%20%20%20%20%20%20this._setFocused(event.type%20%3D%3D%3D%20'focus')%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(!this.shadowRoot%20%26%26%20!this.isLightDescendant(event.target))%20%7B%0A%20%20%20%20%20%20%20%20this.fire(event.type%2C%20%7BsourceEvent%3A%20event%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20node%3A%20this%2C%0A%20%20%20%20%20%20%20%20%20%20bubbles%3A%20event.bubbles%2C%0A%20%20%20%20%20%20%20%20%20%20cancelable%3A%20event.cancelable%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_disabledChanged%3A%20function(disabled%2C%20old)%20%7B%0A%20%20%20%20%20%20this.setAttribute('aria-disabled'%2C%20disabled%20%3F%20'true'%20%3A%20'false')%3B%0A%20%20%20%20%20%20this.style.pointerEvents%20%3D%20disabled%20%3F%20'none'%20%3A%20''%3B%0A%20%20%20%20%20%20if%20(disabled)%20%7B%0A%20%20%20%20%20%20%20%20this._oldTabIndex%20%3D%20this.tabIndex%3B%0A%20%20%20%20%20%20%20%20this.focused%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20this.tabIndex%20%3D%20-1%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(this._oldTabIndex%20!%3D%3D%20undefined)%20%7B%0A%20%20%20%20%20%20%20%20this.tabIndex%20%3D%20this._oldTabIndex%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_changedControlState%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20_controlStateChanged%20is%20abstract%2C%20follow-on%20behaviors%20may%20implement%20it%0A%20%20%20%20%20%20if%20(this._controlStateChanged)%20%7B%0A%20%20%20%20%20%20%20%20this._controlStateChanged()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-27.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20%40demo%20demo%2Findex.html%0A%20%20%20*%20%40polymerBehavior%20Polymer.IronButtonState%0A%20%20%20*%2F%0A%20%20Polymer.IronButtonStateImpl%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20user%20is%20currently%20holding%20down%20the%20button.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20pressed%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_pressedChanged'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20button%20toggles%20the%20active%20state%20with%20each%20tap%20or%20press%0A%20%20%20%20%20%20%20*%20of%20the%20spacebar.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20toggles%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20button%20is%20a%20toggle%20and%20is%20currently%20in%20the%20active%20state.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20active%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20True%20if%20the%20element%20is%20currently%20being%20pressed%20by%20a%20%22pointer%2C%22%20which%0A%20%20%20%20%20%20%20*%20is%20loosely%20defined%20as%20mouse%20or%20touch%20input%20(but%20specifically%20excluding%0A%20%20%20%20%20%20%20*%20keyboard%20input).%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20pointerDown%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20True%20if%20the%20input%20device%20that%20caused%20the%20element%20to%20receive%20focus%0A%20%20%20%20%20%20%20*%20was%20a%20keyboard.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20receivedFocusFromKeyboard%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20aria%20attribute%20to%20be%20set%20if%20the%20button%20is%20a%20toggle%20and%20in%20the%0A%20%20%20%20%20%20%20*%20active%20state.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20ariaActiveAttribute%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'aria-pressed'%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_ariaActiveAttributeChanged'%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20down%3A%20'_downHandler'%2C%0A%20%20%20%20%20%20up%3A%20'_upHandler'%2C%0A%20%20%20%20%20%20tap%3A%20'_tapHandler'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_detectKeyboardFocus(focused)'%2C%0A%20%20%20%20%20%20'_activeChanged(active%2C%20ariaActiveAttribute)'%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20keyBindings%3A%20%7B%0A%20%20%20%20%20%20'enter%3Akeydown'%3A%20'_asyncClick'%2C%0A%20%20%20%20%20%20'space%3Akeydown'%3A%20'_spaceKeyDownHandler'%2C%0A%20%20%20%20%20%20'space%3Akeyup'%3A%20'_spaceKeyUpHandler'%2C%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_mouseEventRe%3A%20%2F%5Emouse%2F%2C%0A%0A%20%20%20%20_tapHandler%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.toggles)%20%7B%0A%20%20%20%20%20%20%20%2F%2F%20a%20tap%20is%20needed%20to%20toggle%20the%20active%20state%0A%20%20%20%20%20%20%20%20this._userActivate(!this.active)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.active%20%3D%20false%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_detectKeyboardFocus%3A%20function(focused)%20%7B%0A%20%20%20%20%20%20this._setReceivedFocusFromKeyboard(!this.pointerDown%20%26%26%20focused)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20to%20emulate%20native%20checkbox%2C%20(de-)activations%20from%20a%20user%20interaction%20fire%0A%20%20%20%20%2F%2F%20'change'%20events%0A%20%20%20%20_userActivate%3A%20function(active)%20%7B%0A%20%20%20%20%20%20if%20(this.active%20!%3D%3D%20active)%20%7B%0A%20%20%20%20%20%20%20%20this.active%20%3D%20active%3B%0A%20%20%20%20%20%20%20%20this.fire('change')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_downHandler%3A%20function(event)%20%7B%0A%20%20%20%20%20%20this._setPointerDown(true)%3B%0A%20%20%20%20%20%20this._setPressed(true)%3B%0A%20%20%20%20%20%20this._setReceivedFocusFromKeyboard(false)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_upHandler%3A%20function()%20%7B%0A%20%20%20%20%20%20this._setPointerDown(false)%3B%0A%20%20%20%20%20%20this._setPressed(false)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20%40param%20%7B!KeyboardEvent%7D%20event%20.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_spaceKeyDownHandler%3A%20function(event)%20%7B%0A%20%20%20%20%20%20var%20keyboardEvent%20%3D%20event.detail.keyboardEvent%3B%0A%20%20%20%20%20%20var%20target%20%3D%20Polymer.dom(keyboardEvent).localTarget%3B%0A%0A%20%20%20%20%20%20%2F%2F%20Ignore%20the%20event%20if%20this%20is%20coming%20from%20a%20focused%20light%20child%2C%20since%20that%0A%20%20%20%20%20%20%2F%2F%20element%20will%20deal%20with%20it.%0A%20%20%20%20%20%20if%20(this.isLightDescendant(%2F**%20%40type%20%7BNode%7D%20*%2F(target)))%0A%20%20%20%20%20%20%20%20return%3B%0A%0A%20%20%20%20%20%20keyboardEvent.preventDefault()%3B%0A%20%20%20%20%20%20keyboardEvent.stopImmediatePropagation()%3B%0A%20%20%20%20%20%20this._setPressed(true)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20%40param%20%7B!KeyboardEvent%7D%20event%20.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_spaceKeyUpHandler%3A%20function(event)%20%7B%0A%20%20%20%20%20%20var%20keyboardEvent%20%3D%20event.detail.keyboardEvent%3B%0A%20%20%20%20%20%20var%20target%20%3D%20Polymer.dom(keyboardEvent).localTarget%3B%0A%0A%20%20%20%20%20%20%2F%2F%20Ignore%20the%20event%20if%20this%20is%20coming%20from%20a%20focused%20light%20child%2C%20since%20that%0A%20%20%20%20%20%20%2F%2F%20element%20will%20deal%20with%20it.%0A%20%20%20%20%20%20if%20(this.isLightDescendant(%2F**%20%40type%20%7BNode%7D%20*%2F(target)))%0A%20%20%20%20%20%20%20%20return%3B%0A%0A%20%20%20%20%20%20if%20(this.pressed)%20%7B%0A%20%20%20%20%20%20%20%20this._asyncClick()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._setPressed(false)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20trigger%20click%20asynchronously%2C%20the%20asynchrony%20is%20useful%20to%20allow%20one%0A%20%20%20%20%2F%2F%20event%20handler%20to%20unwind%20before%20triggering%20another%20event%0A%20%20%20%20_asyncClick%3A%20function()%20%7B%0A%20%20%20%20%20%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20this.click()%3B%0A%20%20%20%20%20%20%7D%2C%201)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20any%20of%20these%20changes%20are%20considered%20a%20change%20to%20button%20state%0A%0A%20%20%20%20_pressedChanged%3A%20function(pressed)%20%7B%0A%20%20%20%20%20%20this._changedButtonState()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_ariaActiveAttributeChanged%3A%20function(value%2C%20oldValue)%20%7B%0A%20%20%20%20%20%20if%20(oldValue%20%26%26%20oldValue%20!%3D%20value%20%26%26%20this.hasAttribute(oldValue))%20%7B%0A%20%20%20%20%20%20%20%20this.removeAttribute(oldValue)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_activeChanged%3A%20function(active%2C%20ariaActiveAttribute)%20%7B%0A%20%20%20%20%20%20if%20(this.toggles)%20%7B%0A%20%20%20%20%20%20%20%20this.setAttribute(this.ariaActiveAttribute%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20active%20%3F%20'true'%20%3A%20'false')%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.removeAttribute(this.ariaActiveAttribute)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._changedButtonState()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_controlStateChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.disabled)%20%7B%0A%20%20%20%20%20%20%20%20this._setPressed(false)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this._changedButtonState()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20provide%20hook%20for%20follow-on%20behaviors%20to%20react%20to%20button-state%0A%0A%20%20%20%20_changedButtonState%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._buttonStateChanged)%20%7B%0A%20%20%20%20%20%20%20%20this._buttonStateChanged()%3B%20%2F%2F%20abstract%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20*%2F%0A%20%20Polymer.IronButtonState%20%3D%20%5B%0A%20%20%20%20Polymer.IronA11yKeysBehavior%2C%0A%20%20%20%20Polymer.IronButtonStateImpl%0A%20%20%5D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-28.js%0A
0 ms
javascript;charset=utf-8,%0A%20%20(function()%20%7B%0A%20%20%20%20var%20Utility%20%3D%20%7B%0A%20%20%20%20%20%20distance%3A%20function(x1%2C%20y1%2C%20x2%2C%20y2)%20%7B%0A%20%20%20%20%20%20%20%20var%20xDelta%20%3D%20(x1%20-%20x2)%3B%0A%20%20%20%20%20%20%20%20var%20yDelta%20%3D%20(y1%20-%20y2)%3B%0A%0A%20%20%20%20%20%20%20%20return%20Math.sqrt(xDelta%20*%20xDelta%20%2B%20yDelta%20*%20yDelta)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20now%3A%20window.performance%20%26%26%20window.performance.now%20%3F%0A%20%20%20%20%20%20%20%20%20%20window.performance.now.bind(window.performance)%20%3A%20Date.now%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20%40param%20%7BHTMLElement%7D%20element%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%2F%0A%20%20%20%20function%20ElementMetrics(element)%20%7B%0A%20%20%20%20%20%20this.element%20%3D%20element%3B%0A%20%20%20%20%20%20this.width%20%3D%20this.boundingRect.width%3B%0A%20%20%20%20%20%20this.height%20%3D%20this.boundingRect.height%3B%0A%0A%20%20%20%20%20%20this.size%20%3D%20Math.max(this.width%2C%20this.height)%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20ElementMetrics.prototype%20%3D%20%7B%0A%20%20%20%20%20%20get%20boundingRect%20()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.element.getBoundingClientRect()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20furthestCornerDistanceFrom%3A%20function(x%2C%20y)%20%7B%0A%20%20%20%20%20%20%20%20var%20topLeft%20%3D%20Utility.distance(x%2C%20y%2C%200%2C%200)%3B%0A%20%20%20%20%20%20%20%20var%20topRight%20%3D%20Utility.distance(x%2C%20y%2C%20this.width%2C%200)%3B%0A%20%20%20%20%20%20%20%20var%20bottomLeft%20%3D%20Utility.distance(x%2C%20y%2C%200%2C%20this.height)%3B%0A%20%20%20%20%20%20%20%20var%20bottomRight%20%3D%20Utility.distance(x%2C%20y%2C%20this.width%2C%20this.height)%3B%0A%0A%20%20%20%20%20%20%20%20return%20Math.max(topLeft%2C%20topRight%2C%20bottomLeft%2C%20bottomRight)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20%40param%20%7BHTMLElement%7D%20element%0A%20%20%20%20%20*%20%40constructor%0A%20%20%20%20%20*%2F%0A%20%20%20%20function%20Ripple(element)%20%7B%0A%20%20%20%20%20%20this.element%20%3D%20element%3B%0A%20%20%20%20%20%20this.color%20%3D%20window.getComputedStyle(element).color%3B%0A%0A%20%20%20%20%20%20this.wave%20%3D%20document.createElement('div')%3B%0A%20%20%20%20%20%20this.waveContainer%20%3D%20document.createElement('div')%3B%0A%20%20%20%20%20%20this.wave.style.backgroundColor%20%3D%20this.color%3B%0A%20%20%20%20%20%20this.wave.classList.add('wave')%3B%0A%20%20%20%20%20%20this.waveContainer.classList.add('wave-container')%3B%0A%20%20%20%20%20%20Polymer.dom(this.waveContainer).appendChild(this.wave)%3B%0A%0A%20%20%20%20%20%20this.resetInteractionState()%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20Ripple.MAX_RADIUS%20%3D%20300%3B%0A%0A%20%20%20%20Ripple.prototype%20%3D%20%7B%0A%20%20%20%20%20%20get%20recenters()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.element.recenters%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20center()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.element.center%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20mouseDownElapsed()%20%7B%0A%20%20%20%20%20%20%20%20var%20elapsed%3B%0A%0A%20%20%20%20%20%20%20%20if%20(!this.mouseDownStart)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%200%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20elapsed%20%3D%20Utility.now()%20-%20this.mouseDownStart%3B%0A%0A%20%20%20%20%20%20%20%20if%20(this.mouseUpStart)%20%7B%0A%20%20%20%20%20%20%20%20%20%20elapsed%20-%3D%20this.mouseUpElapsed%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20elapsed%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20mouseUpElapsed()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.mouseUpStart%20%3F%0A%20%20%20%20%20%20%20%20%20%20Utility.now%20()%20-%20this.mouseUpStart%20%3A%200%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20mouseDownElapsedSeconds()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.mouseDownElapsed%20%2F%201000%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20mouseUpElapsedSeconds()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.mouseUpElapsed%20%2F%201000%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20mouseInteractionSeconds()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.mouseDownElapsedSeconds%20%2B%20this.mouseUpElapsedSeconds%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20initialOpacity()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.element.initialOpacity%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20opacityDecayVelocity()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.element.opacityDecayVelocity%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20radius()%20%7B%0A%20%20%20%20%20%20%20%20var%20width2%20%3D%20this.containerMetrics.width%20*%20this.containerMetrics.width%3B%0A%20%20%20%20%20%20%20%20var%20height2%20%3D%20this.containerMetrics.height%20*%20this.containerMetrics.height%3B%0A%20%20%20%20%20%20%20%20var%20waveRadius%20%3D%20Math.min(%0A%20%20%20%20%20%20%20%20%20%20Math.sqrt(width2%20%2B%20height2)%2C%0A%20%20%20%20%20%20%20%20%20%20Ripple.MAX_RADIUS%0A%20%20%20%20%20%20%20%20)%20*%201.1%20%2B%205%3B%0A%0A%20%20%20%20%20%20%20%20var%20duration%20%3D%201.1%20-%200.2%20*%20(waveRadius%20%2F%20Ripple.MAX_RADIUS)%3B%0A%20%20%20%20%20%20%20%20var%20timeNow%20%3D%20this.mouseInteractionSeconds%20%2F%20duration%3B%0A%20%20%20%20%20%20%20%20var%20size%20%3D%20waveRadius%20*%20(1%20-%20Math.pow(80%2C%20-timeNow))%3B%0A%0A%20%20%20%20%20%20%20%20return%20Math.abs(size)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20opacity()%20%7B%0A%20%20%20%20%20%20%20%20if%20(!this.mouseUpStart)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.initialOpacity%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20Math.max(%0A%20%20%20%20%20%20%20%20%20%200%2C%0A%20%20%20%20%20%20%20%20%20%20this.initialOpacity%20-%20this.mouseUpElapsedSeconds%20*%20this.opacityDecayVelocity%0A%20%20%20%20%20%20%20%20)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20outerOpacity()%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20Linear%20increase%20in%20background%20opacity%2C%20capped%20at%20the%20opacity%0A%20%20%20%20%20%20%20%20%2F%2F%20of%20the%20wavefront%20(waveOpacity).%0A%20%20%20%20%20%20%20%20var%20outerOpacity%20%3D%20this.mouseUpElapsedSeconds%20*%200.3%3B%0A%20%20%20%20%20%20%20%20var%20waveOpacity%20%3D%20this.opacity%3B%0A%0A%20%20%20%20%20%20%20%20return%20Math.max(%0A%20%20%20%20%20%20%20%20%20%200%2C%0A%20%20%20%20%20%20%20%20%20%20Math.min(outerOpacity%2C%20waveOpacity)%0A%20%20%20%20%20%20%20%20)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20isOpacityFullyDecayed()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.opacity%20%3C%200.01%20%26%26%0A%20%20%20%20%20%20%20%20%20%20this.radius%20%3E%3D%20Math.min(this.maxRadius%2C%20Ripple.MAX_RADIUS)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20isRestingAtMaxRadius()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.opacity%20%3E%3D%20this.initialOpacity%20%26%26%0A%20%20%20%20%20%20%20%20%20%20this.radius%20%3E%3D%20Math.min(this.maxRadius%2C%20Ripple.MAX_RADIUS)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20isAnimationComplete()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.mouseUpStart%20%3F%0A%20%20%20%20%20%20%20%20%20%20this.isOpacityFullyDecayed%20%3A%20this.isRestingAtMaxRadius%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20translationFraction()%20%7B%0A%20%20%20%20%20%20%20%20return%20Math.min(%0A%20%20%20%20%20%20%20%20%20%201%2C%0A%20%20%20%20%20%20%20%20%20%20this.radius%20%2F%20this.containerMetrics.size%20*%202%20%2F%20Math.sqrt(2)%0A%20%20%20%20%20%20%20%20)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20xNow()%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.xEnd)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.xStart%20%2B%20this.translationFraction%20*%20(this.xEnd%20-%20this.xStart)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20this.xStart%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20yNow()%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.yEnd)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.yStart%20%2B%20this.translationFraction%20*%20(this.yEnd%20-%20this.yStart)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20this.yStart%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20isMouseDown()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.mouseDownStart%20%26%26%20!this.mouseUpStart%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20resetInteractionState%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this.maxRadius%20%3D%200%3B%0A%20%20%20%20%20%20%20%20this.mouseDownStart%20%3D%200%3B%0A%20%20%20%20%20%20%20%20this.mouseUpStart%20%3D%200%3B%0A%0A%20%20%20%20%20%20%20%20this.xStart%20%3D%200%3B%0A%20%20%20%20%20%20%20%20this.yStart%20%3D%200%3B%0A%20%20%20%20%20%20%20%20this.xEnd%20%3D%200%3B%0A%20%20%20%20%20%20%20%20this.yEnd%20%3D%200%3B%0A%20%20%20%20%20%20%20%20this.slideDistance%20%3D%200%3B%0A%0A%20%20%20%20%20%20%20%20this.containerMetrics%20%3D%20new%20ElementMetrics(this.element)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20draw%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20var%20scale%3B%0A%20%20%20%20%20%20%20%20var%20translateString%3B%0A%20%20%20%20%20%20%20%20var%20dx%3B%0A%20%20%20%20%20%20%20%20var%20dy%3B%0A%0A%20%20%20%20%20%20%20%20this.wave.style.opacity%20%3D%20this.opacity%3B%0A%0A%20%20%20%20%20%20%20%20scale%20%3D%20this.radius%20%2F%20(this.containerMetrics.size%20%2F%202)%3B%0A%20%20%20%20%20%20%20%20dx%20%3D%20this.xNow%20-%20(this.containerMetrics.width%20%2F%202)%3B%0A%20%20%20%20%20%20%20%20dy%20%3D%20this.yNow%20-%20(this.containerMetrics.height%20%2F%202)%3B%0A%0A%0A%20%20%20%20%20%20%20%20%2F%2F%202d%20transform%20for%20safari%20because%20of%20border-radius%20and%20overflow%3Ahidden%20clipping%20bug.%0A%20%20%20%20%20%20%20%20%2F%2F%20https%3A%2F%2Fbugs.webkit.org%2Fshow_bug.cgi%3Fid%3D98538%0A%20%20%20%20%20%20%20%20this.waveContainer.style.webkitTransform%20%3D%20'translate('%20%2B%20dx%20%2B%20'px%2C%20'%20%2B%20dy%20%2B%20'px)'%3B%0A%20%20%20%20%20%20%20%20this.waveContainer.style.transform%20%3D%20'translate3d('%20%2B%20dx%20%2B%20'px%2C%20'%20%2B%20dy%20%2B%20'px%2C%200)'%3B%0A%20%20%20%20%20%20%20%20this.wave.style.webkitTransform%20%3D%20'scale('%20%2B%20scale%20%2B%20'%2C'%20%2B%20scale%20%2B%20')'%3B%0A%20%20%20%20%20%20%20%20this.wave.style.transform%20%3D%20'scale3d('%20%2B%20scale%20%2B%20'%2C'%20%2B%20scale%20%2B%20'%2C1)'%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%20%40param%20%7BEvent%3D%7D%20event%20*%2F%0A%20%20%20%20%20%20downAction%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20var%20xCenter%20%3D%20this.containerMetrics.width%20%2F%202%3B%0A%20%20%20%20%20%20%20%20var%20yCenter%20%3D%20this.containerMetrics.height%20%2F%202%3B%0A%0A%20%20%20%20%20%20%20%20this.resetInteractionState()%3B%0A%20%20%20%20%20%20%20%20this.mouseDownStart%20%3D%20Utility.now()%3B%0A%0A%20%20%20%20%20%20%20%20if%20(this.center)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.xStart%20%3D%20xCenter%3B%0A%20%20%20%20%20%20%20%20%20%20this.yStart%20%3D%20yCenter%3B%0A%20%20%20%20%20%20%20%20%20%20this.slideDistance%20%3D%20Utility.distance(%0A%20%20%20%20%20%20%20%20%20%20%20%20this.xStart%2C%20this.yStart%2C%20this.xEnd%2C%20this.yEnd%0A%20%20%20%20%20%20%20%20%20%20)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.xStart%20%3D%20event%20%3F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20event.detail.x%20-%20this.containerMetrics.boundingRect.left%20%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.containerMetrics.width%20%2F%202%3B%0A%20%20%20%20%20%20%20%20%20%20this.yStart%20%3D%20event%20%3F%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20event.detail.y%20-%20this.containerMetrics.boundingRect.top%20%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.containerMetrics.height%20%2F%202%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20if%20(this.recenters)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.xEnd%20%3D%20xCenter%3B%0A%20%20%20%20%20%20%20%20%20%20this.yEnd%20%3D%20yCenter%3B%0A%20%20%20%20%20%20%20%20%20%20this.slideDistance%20%3D%20Utility.distance(%0A%20%20%20%20%20%20%20%20%20%20%20%20this.xStart%2C%20this.yStart%2C%20this.xEnd%2C%20this.yEnd%0A%20%20%20%20%20%20%20%20%20%20)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20this.maxRadius%20%3D%20this.containerMetrics.furthestCornerDistanceFrom(%0A%20%20%20%20%20%20%20%20%20%20this.xStart%2C%0A%20%20%20%20%20%20%20%20%20%20this.yStart%0A%20%20%20%20%20%20%20%20)%3B%0A%0A%20%20%20%20%20%20%20%20this.waveContainer.style.top%20%3D%0A%20%20%20%20%20%20%20%20%20%20(this.containerMetrics.height%20-%20this.containerMetrics.size)%20%2F%202%20%2B%20'px'%3B%0A%20%20%20%20%20%20%20%20this.waveContainer.style.left%20%3D%0A%20%20%20%20%20%20%20%20%20%20(this.containerMetrics.width%20-%20this.containerMetrics.size)%20%2F%202%20%2B%20'px'%3B%0A%0A%20%20%20%20%20%20%20%20this.waveContainer.style.width%20%3D%20this.containerMetrics.size%20%2B%20'px'%3B%0A%20%20%20%20%20%20%20%20this.waveContainer.style.height%20%3D%20this.containerMetrics.size%20%2B%20'px'%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%20%40param%20%7BEvent%3D%7D%20event%20*%2F%0A%20%20%20%20%20%20upAction%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!this.isMouseDown)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20this.mouseUpStart%20%3D%20Utility.now()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20remove%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20Polymer.dom(this.waveContainer.parentNode).removeChild(%0A%20%20%20%20%20%20%20%20%20%20this.waveContainer%0A%20%20%20%20%20%20%20%20)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20is%3A%20'paper-ripple'%2C%0A%0A%20%20%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20%20%20Polymer.IronA11yKeysBehavior%0A%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20initial%20opacity%20set%20on%20the%20wave.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40attribute%20initialOpacity%0A%20%20%20%20%20%20%20%20%20*%20%40type%20number%0A%20%20%20%20%20%20%20%20%20*%20%40default%200.25%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20initialOpacity%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%200.25%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20How%20fast%20(opacity%20per%20second)%20the%20wave%20fades%20out.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40attribute%20opacityDecayVelocity%0A%20%20%20%20%20%20%20%20%20*%20%40type%20number%0A%20%20%20%20%20%20%20%20%20*%20%40default%200.8%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20opacityDecayVelocity%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%200.8%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20ripples%20will%20exhibit%20a%20gravitational%20pull%20towards%0A%20%20%20%20%20%20%20%20%20*%20the%20center%20of%20their%20container%20as%20they%20fade%20away.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40attribute%20recenters%0A%20%20%20%20%20%20%20%20%20*%20%40type%20boolean%0A%20%20%20%20%20%20%20%20%20*%20%40default%20false%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20recenters%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20ripples%20will%20center%20inside%20its%20container%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40attribute%20recenters%0A%20%20%20%20%20%20%20%20%20*%20%40type%20boolean%0A%20%20%20%20%20%20%20%20%20*%20%40default%20false%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20center%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20A%20list%20of%20the%20visual%20ripples.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40attribute%20ripples%0A%20%20%20%20%20%20%20%20%20*%20%40type%20Array%0A%20%20%20%20%20%20%20%20%20*%20%40default%20%5B%5D%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20ripples%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Array%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20True%20when%20there%20are%20visible%20ripples%20animating%20within%20the%0A%20%20%20%20%20%20%20%20%20*%20element.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20animating%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20the%20ripple%20will%20remain%20in%20the%20%22down%22%20state%20until%20%60holdDown%60%0A%20%20%20%20%20%20%20%20%20*%20is%20set%20to%20false%20again.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20holdDown%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_holdDownChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20If%20true%2C%20the%20ripple%20will%20not%20generate%20a%20ripple%20effect%0A%20%20%20%20%20%20%20%20%20*%20via%20pointer%20interaction.%0A%20%20%20%20%20%20%20%20%20*%20Calling%20ripple's%20imperative%20api%20like%20%60simulatedRipple%60%20will%0A%20%20%20%20%20%20%20%20%20*%20still%20generate%20the%20ripple%20effect.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20noink%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_animating%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_boundAnimate%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Function%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20this.animate.bind(this)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20target%20()%20%7B%0A%20%20%20%20%20%20%20%20var%20ownerRoot%20%3D%20Polymer.dom(this).getOwnerRoot()%3B%0A%20%20%20%20%20%20%20%20var%20target%3B%0A%0A%20%20%20%20%20%20%20%20if%20(this.parentNode.nodeType%20%3D%3D%2011)%20%7B%20%2F%2F%20DOCUMENT_FRAGMENT_NODE%0A%20%20%20%20%20%20%20%20%20%20target%20%3D%20ownerRoot.host%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20target%20%3D%20this.parentNode%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20target%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20keyBindings%3A%20%7B%0A%20%20%20%20%20%20%20%20'enter%3Akeydown'%3A%20'_onEnterKeydown'%2C%0A%20%20%20%20%20%20%20%20'space%3Akeydown'%3A%20'_onSpaceKeydown'%2C%0A%20%20%20%20%20%20%20%20'space%3Akeyup'%3A%20'_onSpaceKeyup'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20Set%20up%20a11yKeysBehavior%20to%20listen%20to%20key%20events%20on%20the%20target%2C%0A%20%20%20%20%20%20%20%20%2F%2F%20so%20that%20space%20and%20enter%20activate%20the%20ripple%20even%20if%20the%20target%20doesn't%0A%20%20%20%20%20%20%20%20%2F%2F%20handle%20key%20events.%20The%20key%20handlers%20deal%20with%20%60noink%60%20themselves.%0A%20%20%20%20%20%20%20%20this.keyEventTarget%20%3D%20this.target%3B%0A%20%20%20%20%20%20%20%20this.listen(this.target%2C%20'up'%2C%20'uiUpAction')%3B%0A%20%20%20%20%20%20%20%20this.listen(this.target%2C%20'down'%2C%20'uiDownAction')%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20detached%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this.unlisten(this.target%2C%20'up'%2C%20'uiUpAction')%3B%0A%20%20%20%20%20%20%20%20this.unlisten(this.target%2C%20'down'%2C%20'uiDownAction')%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20get%20shouldKeepAnimating%20()%20%7B%0A%20%20%20%20%20%20%20%20for%20(var%20index%20%3D%200%3B%20index%20%3C%20this.ripples.length%3B%20%2B%2Bindex)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!this.ripples%5Bindex%5D.isAnimationComplete)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20simulatedRipple%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this.downAction(null)%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Please%20see%20polymer%2Fpolymer%231305%0A%20%20%20%20%20%20%20%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.upAction()%3B%0A%20%20%20%20%20%20%20%20%7D%2C%201)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Provokes%20a%20ripple%20down%20effect%20via%20a%20UI%20event%2C%0A%20%20%20%20%20%20%20*%20respecting%20the%20%60noink%60%20property.%0A%20%20%20%20%20%20%20*%20%40param%20%7BEvent%3D%7D%20event%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20uiDownAction%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!this.noink)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.downAction(event)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Provokes%20a%20ripple%20down%20effect%20via%20a%20UI%20event%2C%0A%20%20%20%20%20%20%20*%20*not*%20respecting%20the%20%60noink%60%20property.%0A%20%20%20%20%20%20%20*%20%40param%20%7BEvent%3D%7D%20event%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20downAction%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.holdDown%20%26%26%20this.ripples.length%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20var%20ripple%20%3D%20this.addRipple()%3B%0A%0A%20%20%20%20%20%20%20%20ripple.downAction(event)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(!this._animating)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.animate()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Provokes%20a%20ripple%20up%20effect%20via%20a%20UI%20event%2C%0A%20%20%20%20%20%20%20*%20respecting%20the%20%60noink%60%20property.%0A%20%20%20%20%20%20%20*%20%40param%20%7BEvent%3D%7D%20event%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20uiUpAction%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!this.noink)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.upAction(event)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Provokes%20a%20ripple%20up%20effect%20via%20a%20UI%20event%2C%0A%20%20%20%20%20%20%20*%20*not*%20respecting%20the%20%60noink%60%20property.%0A%20%20%20%20%20%20%20*%20%40param%20%7BEvent%3D%7D%20event%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20upAction%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.holdDown)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20this.ripples.forEach(function(ripple)%20%7B%0A%20%20%20%20%20%20%20%20%20%20ripple.upAction(event)%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20this.animate()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20onAnimationComplete%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._animating%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20this.%24.background.style.backgroundColor%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20this.fire('transitionend')%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20addRipple%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20var%20ripple%20%3D%20new%20Ripple(this)%3B%0A%0A%20%20%20%20%20%20%20%20Polymer.dom(this.%24.waves).appendChild(ripple.waveContainer)%3B%0A%20%20%20%20%20%20%20%20this.%24.background.style.backgroundColor%20%3D%20ripple.color%3B%0A%20%20%20%20%20%20%20%20this.ripples.push(ripple)%3B%0A%0A%20%20%20%20%20%20%20%20this._setAnimating(true)%3B%0A%0A%20%20%20%20%20%20%20%20return%20ripple%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20removeRipple%3A%20function(ripple)%20%7B%0A%20%20%20%20%20%20%20%20var%20rippleIndex%20%3D%20this.ripples.indexOf(ripple)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(rippleIndex%20%3C%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20this.ripples.splice(rippleIndex%2C%201)%3B%0A%0A%20%20%20%20%20%20%20%20ripple.remove()%3B%0A%0A%20%20%20%20%20%20%20%20if%20(!this.ripples.length)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._setAnimating(false)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20animate%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20var%20index%3B%0A%20%20%20%20%20%20%20%20var%20ripple%3B%0A%0A%20%20%20%20%20%20%20%20this._animating%20%3D%20true%3B%0A%0A%20%20%20%20%20%20%20%20for%20(index%20%3D%200%3B%20index%20%3C%20this.ripples.length%3B%20%2B%2Bindex)%20%7B%0A%20%20%20%20%20%20%20%20%20%20ripple%20%3D%20this.ripples%5Bindex%5D%3B%0A%0A%20%20%20%20%20%20%20%20%20%20ripple.draw()%3B%0A%0A%20%20%20%20%20%20%20%20%20%20this.%24.background.style.opacity%20%3D%20ripple.outerOpacity%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(ripple.isOpacityFullyDecayed%20%26%26%20!ripple.isRestingAtMaxRadius)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.removeRipple(ripple)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20if%20(!this.shouldKeepAnimating%20%26%26%20this.ripples.length%20%3D%3D%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.onAnimationComplete()%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20window.requestAnimationFrame(this._boundAnimate)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_onEnterKeydown%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this.uiDownAction()%3B%0A%20%20%20%20%20%20%20%20this.async(this.uiUpAction%2C%201)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_onSpaceKeydown%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this.uiDownAction()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_onSpaceKeyup%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this.uiUpAction()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F%2F%20note%3A%20holdDown%20does%20not%20respect%20noink%20since%20it%20can%20be%20a%20focus%20based%0A%20%20%20%20%20%20%2F%2F%20effect.%0A%20%20%20%20%20%20_holdDownChanged%3A%20function(newVal%2C%20oldVal)%20%7B%0A%20%20%20%20%20%20%20%20if%20(oldVal%20%3D%3D%3D%20undefined)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(newVal)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.downAction()%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.upAction()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%20%20%7D)()%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-29.js%0A
0 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20%60Polymer.PaperRippleBehavior%60%20dynamically%20implements%20a%20ripple%0A%20%20%20*%20when%20the%20element%20has%20focus%20via%20pointer%20or%20keyboard.%0A%20%20%20*%0A%20%20%20*%20NOTE%3A%20This%20behavior%20is%20intended%20to%20be%20used%20in%20conjunction%20with%20and%20after%0A%20%20%20*%20%60Polymer.IronButtonState%60%20and%20%60Polymer.IronControlState%60.%0A%20%20%20*%0A%20%20%20*%20%40polymerBehavior%20Polymer.PaperRippleBehavior%0A%20%20%20*%2F%0A%20%20Polymer.PaperRippleBehavior%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20element%20will%20not%20produce%20a%20ripple%20effect%20when%20interacted%0A%20%20%20%20%20%20%20*%20with%20via%20the%20pointer.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20noink%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_noinkChanged'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20%40type%20%7BElement%7Cundefined%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20_rippleContainer%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Ensures%20a%20%60%3Cpaper-ripple%3E%60%20element%20is%20available%20when%20the%20element%20is%0A%20%20%20%20%20*%20focused.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_buttonStateChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.focused)%20%7B%0A%20%20%20%20%20%20%20%20this.ensureRipple()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20In%20addition%20to%20the%20functionality%20provided%20in%20%60IronButtonState%60%2C%20ensures%0A%20%20%20%20%20*%20a%20ripple%20effect%20is%20created%20when%20the%20element%20is%20in%20a%20%60pressed%60%20state.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_downHandler%3A%20function(event)%20%7B%0A%20%20%20%20%20%20Polymer.IronButtonStateImpl._downHandler.call(this%2C%20event)%3B%0A%20%20%20%20%20%20if%20(this.pressed)%20%7B%0A%20%20%20%20%20%20%20%20this.ensureRipple(event)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Ensures%20this%20element%20contains%20a%20ripple%20effect.%20For%20startup%20efficiency%0A%20%20%20%20%20*%20the%20ripple%20effect%20is%20dynamically%20on%20demand%20when%20needed.%0A%20%20%20%20%20*%20%40param%20%7B!Event%3D%7D%20optTriggeringEvent%20(optional)%20event%20that%20triggered%20the%0A%20%20%20%20%20*%20ripple.%0A%20%20%20%20%20*%2F%0A%20%20%20%20ensureRipple%3A%20function(optTriggeringEvent)%20%7B%0A%20%20%20%20%20%20if%20(!this.hasRipple())%20%7B%0A%20%20%20%20%20%20%20%20this._ripple%20%3D%20this._createRipple()%3B%0A%20%20%20%20%20%20%20%20this._ripple.noink%20%3D%20this.noink%3B%0A%20%20%20%20%20%20%20%20var%20rippleContainer%20%3D%20this._rippleContainer%20%7C%7C%20this.root%3B%0A%20%20%20%20%20%20%20%20if%20(rippleContainer)%20%7B%0A%20%20%20%20%20%20%20%20%20%20Polymer.dom(rippleContainer).appendChild(this._ripple)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(optTriggeringEvent)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Check%20if%20the%20event%20happened%20inside%20of%20the%20ripple%20container%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Fall%20back%20to%20host%20instead%20of%20the%20root%20because%20distributed%20text%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20nodes%20are%20not%20valid%20event%20targets%0A%20%20%20%20%20%20%20%20%20%20var%20domContainer%20%3D%20Polymer.dom(this._rippleContainer%20%7C%7C%20this)%3B%0A%20%20%20%20%20%20%20%20%20%20var%20target%20%3D%20Polymer.dom(optTriggeringEvent).rootTarget%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(domContainer.deepContains(%20%2F**%20%40type%20%7BNode%7D%20*%2F(target)))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._ripple.uiDownAction(optTriggeringEvent)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20the%20%60%3Cpaper-ripple%3E%60%20element%20used%20by%20this%20element%20to%20create%0A%20%20%20%20%20*%20ripple%20effects.%20The%20element's%20ripple%20is%20created%20on%20demand%2C%20when%0A%20%20%20%20%20*%20necessary%2C%20and%20calling%20this%20method%20will%20force%20the%0A%20%20%20%20%20*%20ripple%20to%20be%20created.%0A%20%20%20%20%20*%2F%0A%20%20%20%20getRipple%3A%20function()%20%7B%0A%20%20%20%20%20%20this.ensureRipple()%3B%0A%20%20%20%20%20%20return%20this._ripple%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20true%20if%20this%20element%20currently%20contains%20a%20ripple%20effect.%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%0A%20%20%20%20%20*%2F%0A%20%20%20%20hasRipple%3A%20function()%20%7B%0A%20%20%20%20%20%20return%20Boolean(this._ripple)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Create%20the%20element's%20ripple%20effect%20via%20creating%20a%20%60%3Cpaper-ripple%3E%60.%0A%20%20%20%20%20*%20Override%20this%20method%20to%20customize%20the%20ripple%20element.%0A%20%20%20%20%20*%20%40return%20%7B!PaperRippleElement%7D%20Returns%20a%20%60%3Cpaper-ripple%3E%60%20element.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_createRipple%3A%20function()%20%7B%0A%20%20%20%20%20%20return%20%2F**%20%40type%20%7B!PaperRippleElement%7D%20*%2F%20(%0A%20%20%20%20%20%20%20%20%20%20document.createElement('paper-ripple'))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_noinkChanged%3A%20function(noink)%20%7B%0A%20%20%20%20%20%20if%20(this.hasRipple())%20%7B%0A%20%20%20%20%20%20%20%20this._ripple.noink%20%3D%20noink%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-30.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%20%40polymerBehavior%20Polymer.PaperButtonBehavior%20*%2F%0A%20%20Polymer.PaperButtonBehaviorImpl%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20z-depth%20of%20this%20element%2C%20from%200-5.%20Setting%20to%200%20will%20remove%20the%0A%20%20%20%20%20%20%20*%20shadow%2C%20and%20each%20increasing%20number%20greater%20than%200%20will%20be%20%22deeper%22%0A%20%20%20%20%20%20%20*%20than%20the%20last.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40attribute%20elevation%0A%20%20%20%20%20%20%20*%20%40type%20number%0A%20%20%20%20%20%20%20*%20%40default%201%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20elevation%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_calculateElevation(focused%2C%20disabled%2C%20active%2C%20pressed%2C%20receivedFocusFromKeyboard)'%2C%0A%20%20%20%20%20%20'_computeKeyboardClass(receivedFocusFromKeyboard)'%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20role%3A%20'button'%2C%0A%20%20%20%20%20%20tabindex%3A%20'0'%2C%0A%20%20%20%20%20%20animated%3A%20true%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_calculateElevation%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20e%20%3D%201%3B%0A%20%20%20%20%20%20if%20(this.disabled)%20%7B%0A%20%20%20%20%20%20%20%20e%20%3D%200%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(this.active%20%7C%7C%20this.pressed)%20%7B%0A%20%20%20%20%20%20%20%20e%20%3D%204%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(this.receivedFocusFromKeyboard)%20%7B%0A%20%20%20%20%20%20%20%20e%20%3D%203%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._setElevation(e)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_computeKeyboardClass%3A%20function(receivedFocusFromKeyboard)%20%7B%0A%20%20%20%20%20%20this.classList.toggle('keyboard-focus'%2C%20receivedFocusFromKeyboard)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20In%20addition%20to%20%60IronButtonState%60%20behavior%2C%20when%20space%20key%20goes%20down%2C%0A%20%20%20%20%20*%20create%20a%20ripple%20down%20effect.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!KeyboardEvent%7D%20event%20.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_spaceKeyDownHandler%3A%20function(event)%20%7B%0A%20%20%20%20%20%20Polymer.IronButtonStateImpl._spaceKeyDownHandler.call(this%2C%20event)%3B%0A%20%20%20%20%20%20if%20(this.hasRipple())%20%7B%0A%20%20%20%20%20%20%20%20this._ripple.uiDownAction()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20In%20addition%20to%20%60IronButtonState%60%20behavior%2C%20when%20space%20key%20goes%20up%2C%0A%20%20%20%20%20*%20create%20a%20ripple%20up%20effect.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7B!KeyboardEvent%7D%20event%20.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_spaceKeyUpHandler%3A%20function(event)%20%7B%0A%20%20%20%20%20%20Polymer.IronButtonStateImpl._spaceKeyUpHandler.call(this%2C%20event)%3B%0A%20%20%20%20%20%20if%20(this.hasRipple())%20%7B%0A%20%20%20%20%20%20%20%20this._ripple.uiUpAction()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20*%2F%0A%20%20Polymer.PaperButtonBehavior%20%3D%20%5B%0A%20%20%20%20Polymer.IronButtonState%2C%0A%20%20%20%20Polymer.IronControlState%2C%0A%20%20%20%20Polymer.PaperRippleBehavior%2C%0A%20%20%20%20Polymer.PaperButtonBehaviorImpl%0A%20%20%5D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-31.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20%60Polymer.PaperInkyFocusBehavior%60%20implements%20a%20ripple%20when%20the%20element%20has%20keyboard%20focus.%0A%20%20%20*%0A%20%20%20*%20%40polymerBehavior%20Polymer.PaperInkyFocusBehavior%0A%20%20%20*%2F%0A%20%20Polymer.PaperInkyFocusBehaviorImpl%20%3D%20%7B%0A%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_focusedChanged(receivedFocusFromKeyboard)'%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20_focusedChanged%3A%20function(receivedFocusFromKeyboard)%20%7B%0A%20%20%20%20%20%20if%20(receivedFocusFromKeyboard)%20%7B%0A%20%20%20%20%20%20%20%20this.ensureRipple()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(this.hasRipple())%20%7B%0A%20%20%20%20%20%20%20%20this._ripple.holdDown%20%3D%20receivedFocusFromKeyboard%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_createRipple%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20ripple%20%3D%20Polymer.PaperRippleBehavior._createRipple()%3B%0A%20%20%20%20%20%20ripple.id%20%3D%20'ink'%3B%0A%20%20%20%20%20%20ripple.setAttribute('center'%2C%20'')%3B%0A%20%20%20%20%20%20ripple.classList.add('circle')%3B%0A%20%20%20%20%20%20return%20ripple%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20Polymer.PaperInkyFocusBehavior%20*%2F%0A%20%20Polymer.PaperInkyFocusBehavior%20%3D%20%5B%0A%20%20%20%20Polymer.IronButtonState%2C%0A%20%20%20%20Polymer.IronControlState%2C%0A%20%20%20%20Polymer.PaperRippleBehavior%2C%0A%20%20%20%20Polymer.PaperInkyFocusBehaviorImpl%0A%20%20%5D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-32.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20is%3A%20'paper-icon-button'%2C%0A%0A%20%20%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20%20%20role%3A%20'button'%2C%0A%20%20%20%20%20%20%20%20tabindex%3A%20'0'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20%20%20Polymer.PaperInkyFocusBehavior%0A%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20URL%20of%20an%20image%20for%20the%20icon.%20If%20the%20src%20property%20is%20specified%2C%0A%20%20%20%20%20%20%20%20%20*%20the%20icon%20property%20should%20not%20be.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20src%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Specifies%20the%20icon%20name%20or%20index%20in%20the%20set%20of%20icons%20available%20in%0A%20%20%20%20%20%20%20%20%20*%20the%20icon's%20icon%20set.%20If%20the%20icon%20property%20is%20specified%2C%0A%20%20%20%20%20%20%20%20%20*%20the%20src%20property%20should%20not%20be.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20icon%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Specifies%20the%20alternate%20text%20for%20the%20button%2C%20for%20accessibility.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20alt%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20%22_altChanged%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_altChanged%3A%20function(newValue%2C%20oldValue)%20%7B%0A%20%20%20%20%20%20%20%20var%20label%20%3D%20this.getAttribute('aria-label')%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Don't%20stomp%20over%20a%20user-set%20aria-label.%0A%20%20%20%20%20%20%20%20if%20(!label%20%7C%7C%20oldValue%20%3D%3D%20label)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.setAttribute('aria-label'%2C%20newValue)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-33.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20(function()%20%7B%0A%20%20%20%20'use%20strict'%3B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20The%20IronDropdownScrollManager%20is%20intended%20to%20provide%20a%20central%20source%0A%20%20%20%20%20*%20of%20authority%20and%20control%20over%20which%20elements%20in%20a%20document%20are%20currently%0A%20%20%20%20%20*%20allowed%20to%20scroll.%0A%20%20%20%20%20*%2F%0A%0A%20%20%20%20Polymer.IronDropdownScrollManager%20%3D%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20current%20element%20that%20defines%20the%20DOM%20boundaries%20of%20the%0A%20%20%20%20%20%20%20*%20scroll%20lock.%20This%20is%20always%20the%20most%20recently%20locking%20element.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20get%20currentLockingElement()%20%7B%0A%20%20%20%20%20%20%20%20return%20this._lockingElements%5Bthis._lockingElements.length%20-%201%5D%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Returns%20true%20if%20the%20provided%20element%20is%20%22scroll%20locked%2C%22%20which%20is%20to%0A%20%20%20%20%20%20%20*%20say%20that%20it%20cannot%20be%20scrolled%20via%20pointer%20or%20keyboard%20interactions.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BHTMLElement%7D%20element%20An%20HTML%20element%20instance%20which%20may%20or%20may%0A%20%20%20%20%20%20%20*%20not%20be%20scroll%20locked.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20elementIsScrollLocked%3A%20function(element)%20%7B%0A%20%20%20%20%20%20%20%20var%20currentLockingElement%20%3D%20this.currentLockingElement%3B%0A%0A%20%20%20%20%20%20%20%20if%20(currentLockingElement%20%3D%3D%3D%20undefined)%0A%20%20%20%20%20%20%20%20%20%20return%20false%3B%0A%0A%20%20%20%20%20%20%20%20var%20scrollLocked%3B%0A%0A%20%20%20%20%20%20%20%20if%20(this._hasCachedLockedElement(element))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20if%20(this._hasCachedUnlockedElement(element))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20scrollLocked%20%3D%20!!currentLockingElement%20%26%26%0A%20%20%20%20%20%20%20%20%20%20currentLockingElement%20!%3D%3D%20element%20%26%26%0A%20%20%20%20%20%20%20%20%20%20!this._composedTreeContains(currentLockingElement%2C%20element)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(scrollLocked)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._lockedElementCache.push(element)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._unlockedElementCache.push(element)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20scrollLocked%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Push%20an%20element%20onto%20the%20current%20scroll%20lock%20stack.%20The%20most%20recently%0A%20%20%20%20%20%20%20*%20pushed%20element%20and%20its%20children%20will%20be%20considered%20scrollable.%20All%0A%20%20%20%20%20%20%20*%20other%20elements%20will%20not%20be%20scrollable.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20Scroll%20locking%20is%20implemented%20as%20a%20stack%20so%20that%20cases%20such%20as%0A%20%20%20%20%20%20%20*%20dropdowns%20within%20dropdowns%20are%20handled%20well.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BHTMLElement%7D%20element%20The%20element%20that%20should%20lock%20scroll.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20pushScrollLock%3A%20function(element)%20%7B%0A%20%20%20%20%20%20%20%20if%20(this._lockingElements.length%20%3D%3D%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._lockScrollInteractions()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20this._lockingElements.push(element)%3B%0A%0A%20%20%20%20%20%20%20%20this._lockedElementCache%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20this._unlockedElementCache%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Remove%20an%20element%20from%20the%20scroll%20lock%20stack.%20The%20element%20being%0A%20%20%20%20%20%20%20*%20removed%20does%20not%20need%20to%20be%20the%20most%20recently%20pushed%20element.%20However%2C%0A%20%20%20%20%20%20%20*%20the%20scroll%20lock%20constraints%20only%20change%20when%20the%20most%20recently%20pushed%0A%20%20%20%20%20%20%20*%20element%20is%20removed.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BHTMLElement%7D%20element%20The%20element%20to%20remove%20from%20the%20scroll%0A%20%20%20%20%20%20%20*%20lock%20stack.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20removeScrollLock%3A%20function(element)%20%7B%0A%20%20%20%20%20%20%20%20var%20index%20%3D%20this._lockingElements.indexOf(element)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(index%20%3D%3D%3D%20-1)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20this._lockingElements.splice(index%2C%201)%3B%0A%0A%20%20%20%20%20%20%20%20this._lockedElementCache%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20this._unlockedElementCache%20%3D%20%5B%5D%3B%0A%0A%20%20%20%20%20%20%20%20if%20(this._lockingElements.length%20%3D%3D%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._unlockScrollInteractions()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_lockingElements%3A%20%5B%5D%2C%0A%0A%20%20%20%20%20%20_lockedElementCache%3A%20null%2C%0A%0A%20%20%20%20%20%20_unlockedElementCache%3A%20null%2C%0A%0A%20%20%20%20%20%20_originalBodyStyles%3A%20%7B%7D%2C%0A%0A%20%20%20%20%20%20_isScrollingKeypress%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20return%20Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(%0A%20%20%20%20%20%20%20%20%20%20event%2C%20'pageup%20pagedown%20home%20end%20up%20left%20down%20right')%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_hasCachedLockedElement%3A%20function(element)%20%7B%0A%20%20%20%20%20%20%20%20return%20this._lockedElementCache.indexOf(element)%20%3E%20-1%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_hasCachedUnlockedElement%3A%20function(element)%20%7B%0A%20%20%20%20%20%20%20%20return%20this._unlockedElementCache.indexOf(element)%20%3E%20-1%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_composedTreeContains%3A%20function(element%2C%20child)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20NOTE(cdata)%3A%20This%20method%20iterates%20over%20content%20elements%20and%20their%0A%20%20%20%20%20%20%20%20%2F%2F%20corresponding%20distributed%20nodes%20to%20implement%20a%20contains-like%20method%0A%20%20%20%20%20%20%20%20%2F%2F%20that%20pierces%20through%20the%20composed%20tree%20of%20the%20ShadowDOM.%20Results%20of%0A%20%20%20%20%20%20%20%20%2F%2F%20this%20operation%20are%20cached%20(elsewhere)%20on%20a%20per-scroll-lock%20basis%2C%20to%0A%20%20%20%20%20%20%20%20%2F%2F%20guard%20against%20potentially%20expensive%20lookups%20happening%20repeatedly%20as%0A%20%20%20%20%20%20%20%20%2F%2F%20a%20user%20scrolls%20%2F%20touchmoves.%0A%20%20%20%20%20%20%20%20var%20contentElements%3B%0A%20%20%20%20%20%20%20%20var%20distributedNodes%3B%0A%20%20%20%20%20%20%20%20var%20contentIndex%3B%0A%20%20%20%20%20%20%20%20var%20nodeIndex%3B%0A%0A%20%20%20%20%20%20%20%20if%20(element.contains(child))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20contentElements%20%3D%20Polymer.dom(element).querySelectorAll('content')%3B%0A%0A%20%20%20%20%20%20%20%20for%20(contentIndex%20%3D%200%3B%20contentIndex%20%3C%20contentElements.length%3B%20%2B%2BcontentIndex)%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20distributedNodes%20%3D%20Polymer.dom(contentElements%5BcontentIndex%5D).getDistributedNodes()%3B%0A%0A%20%20%20%20%20%20%20%20%20%20for%20(nodeIndex%20%3D%200%3B%20nodeIndex%20%3C%20distributedNodes.length%3B%20%2B%2BnodeIndex)%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this._composedTreeContains(distributedNodes%5BnodeIndex%5D%2C%20child))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_scrollInteractionHandler%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20if%20(Polymer%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20.IronDropdownScrollManager%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20.elementIsScrollLocked(event.target))%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(event.type%20%3D%3D%3D%20'keydown'%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20!Polymer.IronDropdownScrollManager._isScrollingKeypress(event))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20event.preventDefault()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_lockScrollInteractions%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20Memoize%20body%20inline%20styles%3A%0A%20%20%20%20%20%20%20%20this._originalBodyStyles.overflow%20%3D%20document.body.style.overflow%3B%0A%20%20%20%20%20%20%20%20this._originalBodyStyles.overflowX%20%3D%20document.body.style.overflowX%3B%0A%20%20%20%20%20%20%20%20this._originalBodyStyles.overflowY%20%3D%20document.body.style.overflowY%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Disable%20overflow%20scrolling%20on%20body%3A%0A%20%20%20%20%20%20%20%20%2F%2F%20TODO(cdata)%3A%20It%20is%20technically%20not%20sufficient%20to%20hide%20overflow%20on%0A%20%20%20%20%20%20%20%20%2F%2F%20body%20alone.%20A%20better%20solution%20might%20be%20to%20traverse%20all%20ancestors%20of%0A%20%20%20%20%20%20%20%20%2F%2F%20the%20current%20scroll%20locking%20element%20and%20hide%20overflow%20on%20them.%20This%0A%20%20%20%20%20%20%20%20%2F%2F%20becomes%20expensive%2C%20though%2C%20as%20it%20would%20have%20to%20be%20redone%20every%20time%0A%20%20%20%20%20%20%20%20%2F%2F%20a%20new%20scroll%20locking%20element%20is%20added.%0A%20%20%20%20%20%20%20%20document.body.style.overflow%20%3D%20'hidden'%3B%0A%20%20%20%20%20%20%20%20document.body.style.overflowX%20%3D%20'hidden'%3B%0A%20%20%20%20%20%20%20%20document.body.style.overflowY%20%3D%20'hidden'%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Modern%20%60wheel%60%20event%20for%20mouse%20wheel%20scrolling%3A%0A%20%20%20%20%20%20%20%20window.addEventListener('wheel'%2C%20this._scrollInteractionHandler%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%2F%2F%20Older%2C%20non-standard%20%60mousewheel%60%20event%20for%20some%20FF%3A%0A%20%20%20%20%20%20%20%20window.addEventListener('mousewheel'%2C%20this._scrollInteractionHandler%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%2F%2F%20IE%3A%0A%20%20%20%20%20%20%20%20window.addEventListener('DOMMouseScroll'%2C%20this._scrollInteractionHandler%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%2F%2F%20Mobile%20devices%20can%20scroll%20on%20touch%20move%3A%0A%20%20%20%20%20%20%20%20window.addEventListener('touchmove'%2C%20this._scrollInteractionHandler%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%2F%2F%20Capture%20keydown%20to%20prevent%20scrolling%20keys%20(pageup%2C%20pagedown%20etc.)%0A%20%20%20%20%20%20%20%20document.addEventListener('keydown'%2C%20this._scrollInteractionHandler%2C%20true)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_unlockScrollInteractions%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20document.body.style.overflow%20%3D%20this._originalBodyStyles.overflow%3B%0A%20%20%20%20%20%20%20%20document.body.style.overflowX%20%3D%20this._originalBodyStyles.overflowX%3B%0A%20%20%20%20%20%20%20%20document.body.style.overflowY%20%3D%20this._originalBodyStyles.overflowY%3B%0A%0A%20%20%20%20%20%20%20%20window.removeEventListener('wheel'%2C%20this._scrollInteractionHandler%2C%20true)%3B%0A%20%20%20%20%20%20%20%20window.removeEventListener('mousewheel'%2C%20this._scrollInteractionHandler%2C%20true)%3B%0A%20%20%20%20%20%20%20%20window.removeEventListener('DOMMouseScroll'%2C%20this._scrollInteractionHandler%2C%20true)%3B%0A%20%20%20%20%20%20%20%20window.removeEventListener('touchmove'%2C%20this._scrollInteractionHandler%2C%20true)%3B%0A%20%20%20%20%20%20%20%20document.removeEventListener('keydown'%2C%20this._scrollInteractionHandler%2C%20true)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%3B%0A%20%20%7D)()%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-34.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%20%20(function()%20%7B%0A%20%20%20%20%20%20'use%20strict'%3B%0A%0A%20%20%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20%20%20is%3A%20'iron-dropdown'%2C%0A%0A%20%20%20%20%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronControlState%2C%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronA11yKeysBehavior%2C%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronOverlayBehavior%2C%0A%20%20%20%20%20%20%20%20%20%20Polymer.NeonAnimationRunnerBehavior%0A%20%20%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20orientation%20against%20which%20to%20align%20the%20dropdown%20content%0A%20%20%20%20%20%20%20%20%20%20%20*%20horizontally%20relative%20to%20the%20dropdown%20trigger.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20horizontalAlign%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20'left'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20orientation%20against%20which%20to%20align%20the%20dropdown%20content%0A%20%20%20%20%20%20%20%20%20%20%20*%20vertically%20relative%20to%20the%20dropdown%20trigger.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20verticalAlign%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20'top'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20A%20pixel%20value%20that%20will%20be%20added%20to%20the%20position%20calculated%20for%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20given%20%60horizontalAlign%60%2C%20in%20the%20direction%20of%20alignment.%20You%20can%20think%0A%20%20%20%20%20%20%20%20%20%20%20*%20of%20it%20as%20increasing%20or%20decreasing%20the%20distance%20to%20the%20side%20of%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20screen%20given%20by%20%60horizontalAlign%60.%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20If%20%60horizontalAlign%60%20is%20%22left%22%2C%20this%20offset%20will%20increase%20or%20decrease%0A%20%20%20%20%20%20%20%20%20%20%20*%20the%20distance%20to%20the%20left%20side%20of%20the%20screen%3A%20a%20negative%20offset%20will%0A%20%20%20%20%20%20%20%20%20%20%20*%20move%20the%20dropdown%20to%20the%20left%3B%20a%20positive%20one%2C%20to%20the%20right.%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20Conversely%20if%20%60horizontalAlign%60%20is%20%22right%22%2C%20this%20offset%20will%20increase%0A%20%20%20%20%20%20%20%20%20%20%20*%20or%20decrease%20the%20distance%20to%20the%20right%20side%20of%20the%20screen%3A%20a%20negative%0A%20%20%20%20%20%20%20%20%20%20%20*%20offset%20will%20move%20the%20dropdown%20to%20the%20right%3B%20a%20positive%20one%2C%20to%20the%20left.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20horizontalOffset%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20A%20pixel%20value%20that%20will%20be%20added%20to%20the%20position%20calculated%20for%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20given%20%60verticalAlign%60%2C%20in%20the%20direction%20of%20alignment.%20You%20can%20think%0A%20%20%20%20%20%20%20%20%20%20%20*%20of%20it%20as%20increasing%20or%20decreasing%20the%20distance%20to%20the%20side%20of%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20screen%20given%20by%20%60verticalAlign%60.%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20If%20%60verticalAlign%60%20is%20%22top%22%2C%20this%20offset%20will%20increase%20or%20decrease%0A%20%20%20%20%20%20%20%20%20%20%20*%20the%20distance%20to%20the%20top%20side%20of%20the%20screen%3A%20a%20negative%20offset%20will%0A%20%20%20%20%20%20%20%20%20%20%20*%20move%20the%20dropdown%20upwards%3B%20a%20positive%20one%2C%20downwards.%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20Conversely%20if%20%60verticalAlign%60%20is%20%22bottom%22%2C%20this%20offset%20will%20increase%0A%20%20%20%20%20%20%20%20%20%20%20*%20or%20decrease%20the%20distance%20to%20the%20bottom%20side%20of%20the%20screen%3A%20a%20negative%0A%20%20%20%20%20%20%20%20%20%20%20*%20offset%20will%20move%20the%20dropdown%20downwards%3B%20a%20positive%20one%2C%20upwards.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20verticalOffset%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20element%20that%20should%20be%20used%20to%20position%20the%20dropdown%20when%0A%20%20%20%20%20%20%20%20%20%20%20*%20it%20is%20opened.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20positionTarget%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20observer%3A%20'_positionTargetChanged'%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20An%20animation%20config.%20If%20provided%2C%20this%20will%20be%20used%20to%20animate%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20opening%20of%20the%20dropdown.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20openAnimationConfig%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20An%20animation%20config.%20If%20provided%2C%20this%20will%20be%20used%20to%20animate%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20closing%20of%20the%20dropdown.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20closeAnimationConfig%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20If%20provided%2C%20this%20will%20be%20the%20element%20that%20will%20be%20focused%20when%0A%20%20%20%20%20%20%20%20%20%20%20*%20the%20dropdown%20opens.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20focusTarget%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20disable%20animations%20when%20opening%20and%20closing%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20dropdown.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20noAnimations%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20By%20default%2C%20the%20dropdown%20will%20constrain%20scrolling%20on%20the%20page%0A%20%20%20%20%20%20%20%20%20%20%20*%20to%20itself%20when%20opened.%0A%20%20%20%20%20%20%20%20%20%20%20*%20Set%20to%20true%20in%20order%20to%20prevent%20scroll%20from%20being%20constrained%0A%20%20%20%20%20%20%20%20%20%20%20*%20to%20the%20dropdown%20when%20it%20opens.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20allowOutsideScroll%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20We%20memoize%20the%20positionTarget%20bounding%20rectangle%20so%20that%20we%20can%0A%20%20%20%20%20%20%20%20%20%20%20*%20limit%20the%20number%20of%20times%20it%20is%20queried%20per%20resize%20%2F%20relayout.%0A%20%20%20%20%20%20%20%20%20%20%20*%20%40type%20%7B%3FObject%7D%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20_positionRectMemo%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20'neon-animation-finish'%3A%20'_onNeonAnimationFinish'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20'_updateOverlayPosition(verticalAlign%2C%20horizontalAlign%2C%20verticalOffset%2C%20horizontalOffset)'%0A%20%20%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(this.positionTarget%20%3D%3D%3D%20undefined)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.positionTarget%20%3D%20this._defaultPositionTarget%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20element%20that%20is%20contained%20by%20the%20dropdown%2C%20if%20any.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20containedElement()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20Polymer.dom(this.%24.content).getDistributedNodes()%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20element%20that%20should%20be%20focused%20when%20the%20dropdown%20opens.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20_focusTarget()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.focusTarget%20%7C%7C%20this.containedElement%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Whether%20the%20text%20direction%20is%20RTL%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_isRTL%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20window.getComputedStyle(this).direction%20%3D%3D%20'rtl'%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20element%20that%20should%20be%20used%20to%20position%20the%20dropdown%20when%0A%20%20%20%20%20%20%20%20%20*%20it%20opens%2C%20if%20no%20position%20target%20is%20configured.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20_defaultPositionTarget()%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20parent%20%3D%20Polymer.dom(this).parentNode%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(parent.nodeType%20%3D%3D%3D%20Node.DOCUMENT_FRAGMENT_NODE)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20parent%20%3D%20parent.host%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20return%20parent%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20bounding%20rect%20of%20the%20position%20target.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20_positionRect()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!this._positionRectMemo%20%26%26%20this.positionTarget)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._positionRectMemo%20%3D%20this.positionTarget.getBoundingClientRect()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20return%20this._positionRectMemo%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20horizontal%20offset%20value%20used%20to%20position%20the%20dropdown.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20_horizontalAlignTargetValue()%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20target%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20In%20RTL%2C%20the%20direction%20flips%2C%20so%20what%20is%20%22right%22%20in%20LTR%20becomes%20%22left%22.%0A%20%20%20%20%20%20%20%20%20%20var%20isRTL%20%3D%20this._isRTL()%3B%0A%20%20%20%20%20%20%20%20%20%20if%20((!isRTL%20%26%26%20this.horizontalAlign%20%3D%3D%3D%20'right')%20%7C%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20(isRTL%20%26%26%20this.horizontalAlign%20%3D%3D%3D%20'left'))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20target%20%3D%20document.documentElement.clientWidth%20-%20this._positionRect.right%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20target%20%3D%20this._positionRect.left%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20target%20%2B%3D%20this.horizontalOffset%3B%0A%0A%20%20%20%20%20%20%20%20%20%20return%20Math.max(target%2C%200)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20vertical%20offset%20value%20used%20to%20position%20the%20dropdown.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20_verticalAlignTargetValue()%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20target%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(this.verticalAlign%20%3D%3D%3D%20'bottom')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20target%20%3D%20document.documentElement.clientHeight%20-%20this._positionRect.bottom%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20target%20%3D%20this._positionRect.top%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20target%20%2B%3D%20this.verticalOffset%3B%0A%0A%20%20%20%20%20%20%20%20%20%20return%20Math.max(target%2C%200)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20horizontal%20align%20value%2C%20accounting%20for%20the%20RTL%2FLTR%20text%20direction.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20_localeHorizontalAlign()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20In%20RTL%2C%20%22left%22%20becomes%20%22right%22.%0A%20%20%20%20%20%20%20%20%20%20if%20(this._isRTL())%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20this.horizontalAlign%20%3D%3D%3D%20'right'%20%3F%20'left'%20%3A%20'right'%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20this.horizontalAlign%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Called%20when%20the%20value%20of%20%60opened%60%20changes.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%7D%20opened%20True%20if%20the%20dropdown%20is%20opened.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_openedChanged%3A%20function(opened)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(opened%20%26%26%20this.disabled)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.cancel()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.cancelAnimation()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._prepareDropdown()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this%2C%20arguments)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._focusContent()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Overridden%20from%20%60IronOverlayBehavior%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_renderOpened%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!this.allowOutsideScroll)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20Polymer.IronDropdownScrollManager.pushScrollLock(this)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(!this.noAnimations%20%26%26%20this.animationConfig%20%26%26%20this.animationConfig.open)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.%24.contentWrapper.classList.add('animating')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.playAnimation('open')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20Polymer.IronOverlayBehaviorImpl._renderOpened.apply(this%2C%20arguments)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Overridden%20from%20%60IronOverlayBehavior%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_renderClosed%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronDropdownScrollManager.removeScrollLock(this)%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(!this.noAnimations%20%26%26%20this.animationConfig%20%26%26%20this.animationConfig.close)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.%24.contentWrapper.classList.add('animating')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.playAnimation('close')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20Polymer.IronOverlayBehaviorImpl._renderClosed.apply(this%2C%20arguments)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Called%20when%20animation%20finishes%20on%20the%20dropdown%20(when%20opening%20or%0A%20%20%20%20%20%20%20%20%20*%20closing).%20Responsible%20for%20%22completing%22%20the%20process%20of%20opening%20or%0A%20%20%20%20%20%20%20%20%20*%20closing%20the%20dropdown%20by%20positioning%20it%20or%20setting%20its%20display%20to%0A%20%20%20%20%20%20%20%20%20*%20none.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_onNeonAnimationFinish%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.%24.contentWrapper.classList.remove('animating')%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20Polymer.IronOverlayBehaviorImpl._renderOpened.apply(this)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20Polymer.IronOverlayBehaviorImpl._renderClosed.apply(this)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Called%20when%20an%20%60iron-resize%60%20event%20fires.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_onIronResize%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20containedElement%20%3D%20this.containedElement%3B%0A%20%20%20%20%20%20%20%20%20%20var%20scrollTop%3B%0A%20%20%20%20%20%20%20%20%20%20var%20scrollLeft%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(containedElement)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20scrollTop%20%3D%20containedElement.scrollTop%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20scrollLeft%20%3D%20containedElement.scrollLeft%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._updateOverlayPosition()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronOverlayBehaviorImpl._onIronResize.apply(this%2C%20arguments)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(containedElement)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20containedElement.scrollTop%20%3D%20scrollTop%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20containedElement.scrollLeft%20%3D%20scrollLeft%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Called%20when%20the%20%60positionTarget%60%20property%20changes.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_positionTargetChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._updateOverlayPosition()%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Constructs%20the%20final%20animation%20config%20from%20different%20properties%20used%0A%20%20%20%20%20%20%20%20%20*%20to%20configure%20specific%20parts%20of%20the%20opening%20and%20closing%20animations.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_updateAnimationConfig%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20animationConfig%20%3D%20%7B%7D%3B%0A%20%20%20%20%20%20%20%20%20%20var%20animations%20%3D%20%5B%5D%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(this.openAnimationConfig)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20NOTE(cdata)%3A%20When%20making%20%60display%3Anone%60%20elements%20visible%20in%20Safari%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20the%20element%20will%20paint%20once%20in%20a%20fully%20visible%20state%2C%20causing%20the%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20dropdown%20to%20flash%20before%20it%20fades%20in.%20We%20prepend%20an%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20%60opaque-animation%60%20to%20fix%20this%20problem%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20animationConfig.open%20%3D%20%5B%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20'opaque-animation'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%5D.concat(this.openAnimationConfig)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20animations%20%3D%20animations.concat(animationConfig.open)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(this.closeAnimationConfig)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20animationConfig.close%20%3D%20this.closeAnimationConfig%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20animations%20%3D%20animations.concat(animationConfig.close)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20animations.forEach(function(animation)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20animation.node%20%3D%20this.containedElement%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%20this)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20this.animationConfig%20%3D%20animationConfig%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Prepares%20the%20dropdown%20for%20opening%20by%20updating%20measured%20layout%0A%20%20%20%20%20%20%20%20%20*%20values.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_prepareDropdown%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.sizingTarget%20%3D%20this.containedElement%20%7C%7C%20this.sizingTarget%3B%0A%20%20%20%20%20%20%20%20%20%20this._updateAnimationConfig()%3B%0A%20%20%20%20%20%20%20%20%20%20this._updateOverlayPosition()%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Updates%20the%20overlay%20position%20based%20on%20configured%20horizontal%0A%20%20%20%20%20%20%20%20%20*%20and%20vertical%20alignment%2C%20and%20re-memoizes%20these%20values%20for%20the%20sake%0A%20%20%20%20%20%20%20%20%20*%20of%20behavior%20in%20%60IronFitBehavior%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_updateOverlayPosition%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._positionRectMemo%20%3D%20null%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(!this.positionTarget)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20this.style%5Bthis._localeHorizontalAlign%5D%20%3D%0A%20%20%20%20%20%20%20%20%20%20%20%20this._horizontalAlignTargetValue%20%2B%20'px'%3B%0A%0A%20%20%20%20%20%20%20%20%20%20this.style%5Bthis.verticalAlign%5D%20%3D%0A%20%20%20%20%20%20%20%20%20%20%20%20this._verticalAlignTargetValue%20%2B%20'px'%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20NOTE(cdata)%3A%20We%20re-memoize%20inline%20styles%20here%2C%20otherwise%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20calling%20%60refit%60%20from%20%60IronFitBehavior%60%20will%20reset%20inline%20styles%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20to%20whatever%20they%20were%20when%20the%20dropdown%20first%20opened.%0A%20%20%20%20%20%20%20%20%20%20if%20(this._fitInfo)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._fitInfo.inlineStyle%5Bthis.horizontalAlign%5D%20%3D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.style%5Bthis.horizontalAlign%5D%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20this._fitInfo.inlineStyle%5Bthis.verticalAlign%5D%20%3D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.style%5Bthis.verticalAlign%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Focuses%20the%20configured%20focus%20target.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_focusContent%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20NOTE(cdata)%3A%20This%20is%20async%20so%20that%20it%20can%20attempt%20the%20focus%20after%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20%60display%3A%20none%60%20is%20removed%20from%20the%20element.%0A%20%20%20%20%20%20%20%20%20%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this._focusTarget)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._focusTarget.focus()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D)()%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-35.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-material'%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20z-depth%20of%20this%20element%2C%20from%200-5.%20Setting%20to%200%20will%20remove%20the%0A%20%20%20%20%20%20%20*%20shadow%2C%20and%20each%20increasing%20number%20greater%20than%200%20will%20be%20%22deeper%22%0A%20%20%20%20%20%20%20*%20than%20the%20last.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40attribute%20elevation%0A%20%20%20%20%20%20%20*%20%40type%20number%0A%20%20%20%20%20%20%20*%20%40default%201%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20elevation%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%201%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20this%20to%20true%20to%20animate%20the%20shadow%20when%20setting%20a%20new%0A%20%20%20%20%20%20%20*%20%60elevation%60%20value.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40attribute%20animated%0A%20%20%20%20%20%20%20*%20%40type%20boolean%0A%20%20%20%20%20%20%20*%20%40default%20false%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20animated%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-36.js%0A
0 ms
javascript;charset=utf-8,%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'fade-in-animation'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.NeonAnimationBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20configure%3A%20function(config)%20%7B%0A%20%20%20%20%20%20var%20node%20%3D%20config.node%3B%0A%20%20%20%20%20%20this._effect%20%3D%20new%20KeyframeEffect(node%2C%20%5B%0A%20%20%20%20%20%20%20%20%7B'opacity'%3A%20'0'%7D%2C%0A%20%20%20%20%20%20%20%20%7B'opacity'%3A%20'1'%7D%0A%20%20%20%20%20%20%5D%2C%20this.timingFromConfig(config))%3B%0A%20%20%20%20%20%20return%20this._effect%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D)%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-37.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'fade-out-animation'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.NeonAnimationBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20configure%3A%20function(config)%20%7B%0A%20%20%20%20%20%20var%20node%20%3D%20config.node%3B%0A%20%20%20%20%20%20this._effect%20%3D%20new%20KeyframeEffect(node%2C%20%5B%0A%20%20%20%20%20%20%20%20%7B'opacity'%3A%20'1'%7D%2C%0A%20%20%20%20%20%20%20%20%7B'opacity'%3A%20'0'%7D%0A%20%20%20%20%20%20%5D%2C%20this.timingFromConfig(config))%3B%0A%20%20%20%20%20%20return%20this._effect%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D)%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-38.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-menu-grow-height-animation'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.NeonAnimationBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20configure%3A%20function(config)%20%7B%0A%20%20%20%20%20%20var%20node%20%3D%20config.node%3B%0A%20%20%20%20%20%20var%20rect%20%3D%20node.getBoundingClientRect()%3B%0A%20%20%20%20%20%20var%20height%20%3D%20rect.height%3B%0A%0A%20%20%20%20%20%20this._effect%20%3D%20new%20KeyframeEffect(node%2C%20%5B%7B%0A%20%20%20%20%20%20%20%20height%3A%20(height%20%2F%202)%20%2B%20'px'%0A%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20height%3A%20height%20%2B%20'px'%0A%20%20%20%20%20%20%7D%5D%2C%20this.timingFromConfig(config))%3B%0A%0A%20%20%20%20%20%20return%20this._effect%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-menu-grow-width-animation'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.NeonAnimationBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20configure%3A%20function(config)%20%7B%0A%20%20%20%20%20%20var%20node%20%3D%20config.node%3B%0A%20%20%20%20%20%20var%20rect%20%3D%20node.getBoundingClientRect()%3B%0A%20%20%20%20%20%20var%20width%20%3D%20rect.width%3B%0A%0A%20%20%20%20%20%20this._effect%20%3D%20new%20KeyframeEffect(node%2C%20%5B%7B%0A%20%20%20%20%20%20%20%20width%3A%20(width%20%2F%202)%20%2B%20'px'%0A%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20width%3A%20width%20%2B%20'px'%0A%20%20%20%20%20%20%7D%5D%2C%20this.timingFromConfig(config))%3B%0A%0A%20%20%20%20%20%20return%20this._effect%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-menu-shrink-width-animation'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.NeonAnimationBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20configure%3A%20function(config)%20%7B%0A%20%20%20%20%20%20var%20node%20%3D%20config.node%3B%0A%20%20%20%20%20%20var%20rect%20%3D%20node.getBoundingClientRect()%3B%0A%20%20%20%20%20%20var%20width%20%3D%20rect.width%3B%0A%0A%20%20%20%20%20%20this._effect%20%3D%20new%20KeyframeEffect(node%2C%20%5B%7B%0A%20%20%20%20%20%20%20%20width%3A%20width%20%2B%20'px'%0A%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20width%3A%20width%20-%20(width%20%2F%2020)%20%2B%20'px'%0A%20%20%20%20%20%20%7D%5D%2C%20this.timingFromConfig(config))%3B%0A%0A%20%20%20%20%20%20return%20this._effect%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-menu-shrink-height-animation'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.NeonAnimationBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20configure%3A%20function(config)%20%7B%0A%20%20%20%20%20%20var%20node%20%3D%20config.node%3B%0A%20%20%20%20%20%20var%20rect%20%3D%20node.getBoundingClientRect()%3B%0A%20%20%20%20%20%20var%20height%20%3D%20rect.height%3B%0A%20%20%20%20%20%20var%20top%20%3D%20rect.top%3B%0A%0A%20%20%20%20%20%20this.setPrefixedProperty(node%2C%20'transformOrigin'%2C%20'0%200')%3B%0A%0A%20%20%20%20%20%20this._effect%20%3D%20new%20KeyframeEffect(node%2C%20%5B%7B%0A%20%20%20%20%20%20%20%20height%3A%20height%20%2B%20'px'%2C%0A%20%20%20%20%20%20%20%20transform%3A%20'translateY(0)'%0A%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20height%3A%20height%20%2F%202%20%2B%20'px'%2C%0A%20%20%20%20%20%20%20%20transform%3A%20'translateY(-20px)'%0A%20%20%20%20%20%20%7D%5D%2C%20this.timingFromConfig(config))%3B%0A%0A%20%20%20%20%20%20return%20this._effect%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-39.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20(function()%20%7B%0A%20%20%20%20'use%20strict'%3B%0A%0A%20%20%20%20var%20PaperMenuButton%20%3D%20Polymer(%7B%0A%20%20%20%20%20%20is%3A%20'paper-menu-button'%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Fired%20when%20the%20dropdown%20opens.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20paper-dropdown-open%0A%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Fired%20when%20the%20dropdown%20closes.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20paper-dropdown-close%0A%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20%20%20Polymer.IronA11yKeysBehavior%2C%0A%20%20%20%20%20%20%20%20Polymer.IronControlState%0A%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20True%20if%20the%20content%20is%20currently%20displayed.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20opened%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_openedChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20orientation%20against%20which%20to%20align%20the%20menu%20dropdown%0A%20%20%20%20%20%20%20%20%20*%20horizontally%20relative%20to%20the%20dropdown%20trigger.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20horizontalAlign%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20'left'%2C%0A%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20orientation%20against%20which%20to%20align%20the%20menu%20dropdown%0A%20%20%20%20%20%20%20%20%20*%20vertically%20relative%20to%20the%20dropdown%20trigger.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20verticalAlign%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20'top'%2C%0A%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20A%20pixel%20value%20that%20will%20be%20added%20to%20the%20position%20calculated%20for%20the%0A%20%20%20%20%20%20%20%20%20*%20given%20%60horizontalAlign%60.%20Use%20a%20negative%20value%20to%20offset%20to%20the%0A%20%20%20%20%20%20%20%20%20*%20left%2C%20or%20a%20positive%20value%20to%20offset%20to%20the%20right.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20horizontalOffset%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20A%20pixel%20value%20that%20will%20be%20added%20to%20the%20position%20calculated%20for%20the%0A%20%20%20%20%20%20%20%20%20*%20given%20%60verticalAlign%60.%20Use%20a%20negative%20value%20to%20offset%20towards%20the%0A%20%20%20%20%20%20%20%20%20*%20top%2C%20or%20a%20positive%20value%20to%20offset%20towards%20the%20bottom.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20verticalOffset%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%200%2C%0A%20%20%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20disable%20animations%20when%20opening%20and%20closing%20the%0A%20%20%20%20%20%20%20%20%20*%20dropdown.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20noAnimations%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20disable%20automatically%20closing%20the%20dropdown%20after%0A%20%20%20%20%20%20%20%20%20*%20a%20selection%20has%20been%20made.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20ignoreSelect%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20An%20animation%20config.%20If%20provided%2C%20this%20will%20be%20used%20to%20animate%20the%0A%20%20%20%20%20%20%20%20%20*%20opening%20of%20the%20dropdown.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20openAnimationConfig%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20%5B%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20'fade-in-animation'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20timing%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20delay%3A%20100%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20duration%3A%20200%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20'paper-menu-grow-width-animation'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20timing%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20delay%3A%20100%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20duration%3A%20150%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20easing%3A%20PaperMenuButton.ANIMATION_CUBIC_BEZIER%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20'paper-menu-grow-height-animation'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20timing%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20delay%3A%20100%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20duration%3A%20275%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20easing%3A%20PaperMenuButton.ANIMATION_CUBIC_BEZIER%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20An%20animation%20config.%20If%20provided%2C%20this%20will%20be%20used%20to%20animate%20the%0A%20%20%20%20%20%20%20%20%20*%20closing%20of%20the%20dropdown.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20closeAnimationConfig%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20%5B%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20'fade-out-animation'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20timing%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20duration%3A%20150%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20'paper-menu-shrink-width-animation'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20timing%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20delay%3A%20100%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20duration%3A%2050%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20easing%3A%20PaperMenuButton.ANIMATION_CUBIC_BEZIER%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%3A%20'paper-menu-shrink-height-animation'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20timing%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20duration%3A%20200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20easing%3A%20'ease-in'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20This%20is%20the%20element%20intended%20to%20be%20bound%20as%20the%20focus%20target%0A%20%20%20%20%20%20%20%20%20*%20for%20the%20%60iron-dropdown%60%20contained%20by%20%60paper-menu-button%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_dropdownContent%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20%20%20role%3A%20'group'%2C%0A%20%20%20%20%20%20%20%20'aria-haspopup'%3A%20'true'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20%20%20'iron-select'%3A%20'_onIronSelect'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20content%20element%20that%20is%20contained%20by%20the%20menu%20button%2C%20if%20any.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20get%20contentElement()%20%7B%0A%20%20%20%20%20%20%20%20return%20Polymer.dom(this.%24.content).getDistributedNodes()%5B0%5D%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Make%20the%20dropdown%20content%20appear%20as%20an%20overlay%20positioned%20relative%0A%20%20%20%20%20%20%20*%20to%20the%20dropdown%20trigger.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20open%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.disabled)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20this.%24.dropdown.open()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Hide%20the%20dropdown%20content.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20close%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this.%24.dropdown.close()%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20When%20an%20%60iron-select%60%20event%20is%20received%2C%20the%20dropdown%20should%0A%20%20%20%20%20%20%20*%20automatically%20close%20on%20the%20assumption%20that%20a%20value%20has%20been%20chosen.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7BCustomEvent%7D%20event%20A%20CustomEvent%20instance%20with%20type%0A%20%20%20%20%20%20%20*%20set%20to%20%60%22iron-select%22%60.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20_onIronSelect%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!this.ignoreSelect)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.close()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20When%20the%20dropdown%20opens%2C%20the%20%60paper-menu-button%60%20fires%20%60paper-open%60.%0A%20%20%20%20%20%20%20*%20When%20the%20dropdown%20closes%2C%20the%20%60paper-menu-button%60%20fires%20%60paper-close%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%7D%20opened%20True%20if%20the%20dropdown%20is%20opened%2C%20otherwise%20false.%0A%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%7D%20oldOpened%20The%20previous%20value%20of%20%60opened%60.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20_openedChanged%3A%20function(opened%2C%20oldOpened)%20%7B%0A%20%20%20%20%20%20%20%20if%20(opened)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20TODO(cdata)%3A%20Update%20this%20when%20we%20can%20measure%20changes%20in%20distributed%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20children%20in%20an%20idiomatic%20way.%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20We%20poke%20this%20property%20in%20case%20the%20element%20has%20changed.%20This%20will%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20cause%20the%20focus%20target%20for%20the%20%60iron-dropdown%60%20to%20be%20updated%20as%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20necessary%3A%0A%20%20%20%20%20%20%20%20%20%20this._dropdownContent%20%3D%20this.contentElement%3B%0A%20%20%20%20%20%20%20%20%20%20this.fire('paper-dropdown-open')%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(oldOpened%20!%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.fire('paper-dropdown-close')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20the%20dropdown%20is%20open%20when%20disabled%20becomes%20true%2C%20close%20the%0A%20%20%20%20%20%20%20*%20dropdown.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%7D%20disabled%20True%20if%20disabled%2C%20otherwise%20false.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20_disabledChanged%3A%20function(disabled)%20%7B%0A%20%20%20%20%20%20%20%20Polymer.IronControlState._disabledChanged.apply(this%2C%20arguments)%3B%0A%20%20%20%20%20%20%20%20if%20(disabled%20%26%26%20this.opened)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.close()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%0A%20%20%20%20PaperMenuButton.ANIMATION_CUBIC_BEZIER%20%3D%20'cubic-bezier(.3%2C.95%2C.5%2C1)'%3B%0A%20%20%20%20PaperMenuButton.MAX_ANIMATION_TIME_MS%20%3D%20400%3B%0A%0A%20%20%20%20Polymer.PaperMenuButton%20%3D%20PaperMenuButton%3B%0A%20%20%7D)()%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-40.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-button'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.PaperButtonBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20button%20should%20be%20styled%20with%20a%20shadow.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20raised%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_calculateElevation'%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_calculateElevation%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(!this.raised)%20%7B%0A%20%20%20%20%20%20%20%20this._setElevation(0)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20%2F**%0A%0A%20%20%20%20Fired%20when%20the%20animation%20finishes.%0A%20%20%20%20This%20is%20useful%20if%20you%20want%20to%20wait%20until%0A%20%20%20%20the%20ripple%20animation%20finishes%20to%20perform%20some%20action.%0A%0A%20%20%20%20%40event%20transitionend%0A%20%20%20%20%40param%20%7B%7Bnode%3A%20Object%7D%7D%20detail%20Contains%20the%20animated%20node.%0A%20%20%20%20*%2F%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-41.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20%20%20(function()%20%7B%0A%20%20%20%20%20%20'use%20strict'%3B%0A%0A%20%20%20%20%20%20Polymer.IronA11yAnnouncer%20%3D%20Polymer(%7B%0A%20%20%20%20%20%20%20%20is%3A%20'iron-a11y-announcer'%2C%0A%0A%20%20%20%20%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20value%20of%20mode%20is%20used%20to%20set%20the%20%60aria-live%60%20attribute%0A%20%20%20%20%20%20%20%20%20%20%20*%20for%20the%20element%20that%20will%20be%20announced.%20Valid%20values%20are%3A%20%60off%60%2C%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60polite%60%20and%20%60assertive%60.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20mode%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20'polite'%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20_text%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20created%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!Polymer.IronA11yAnnouncer.instance)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20Polymer.IronA11yAnnouncer.instance%20%3D%20this%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20document.body.addEventListener('iron-announce'%2C%20this._onIronAnnounce.bind(this))%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Cause%20a%20text%20string%20to%20be%20announced%20by%20screen%20readers.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bstring%7D%20text%20The%20text%20that%20should%20be%20announced.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20announce%3A%20function(text)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._text%20%3D%20''%3B%0A%20%20%20%20%20%20%20%20%20%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._text%20%3D%20text%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%20100)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_onIronAnnounce%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(event.detail%20%26%26%20event.detail.text)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.announce(event.detail.text)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20Polymer.IronA11yAnnouncer.instance%20%3D%20null%3B%0A%0A%20%20%20%20%20%20Polymer.IronA11yAnnouncer.requestAvailability%20%3D%20function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(!Polymer.IronA11yAnnouncer.instance)%20%7B%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronA11yAnnouncer.instance%20%3D%20document.createElement('iron-a11y-announcer')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20document.body.appendChild(Polymer.IronA11yAnnouncer.instance)%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%7D)()%3B%0A%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-42.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%20%20(function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20Keeps%20track%20of%20the%20toast%20currently%20opened.%0A%20%20%20%20%20%20var%20currentToast%20%3D%20null%3B%0A%0A%20%20%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20%20%20is%3A%20'paper-toast'%2C%0A%0A%20%20%20%20%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronOverlayBehavior%0A%20%20%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20duration%20in%20milliseconds%20to%20show%20the%20toast.%0A%20%20%20%20%20%20%20%20%20%20%20*%20Set%20to%20%600%60%2C%20a%20negative%20number%2C%20or%20%60Infinity%60%2C%20to%20disable%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20toast%20auto-closing.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20duration%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%203000%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20text%20to%20display%20in%20the%20toast.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20text%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Overridden%20from%20%60IronOverlayBehavior%60.%0A%20%20%20%20%20%20%20%20%20%20%20*%20Set%20to%20false%20to%20enable%20closing%20of%20the%20toast%20by%20clicking%20outside%20it.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20noCancelOnOutsideClick%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Read-only.%20Deprecated.%20Use%20%60opened%60%20from%20%60IronOverlayBehavior%60.%0A%20%20%20%20%20%20%20%20%20*%20%40property%20visible%0A%20%20%20%20%20%20%20%20%20*%20%40deprecated%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20visible()%20%7B%0A%20%20%20%20%20%20%20%20%20%20console.warn('%60visible%60%20is%20deprecated%2C%20use%20%60opened%60%20instead')%3B%0A%20%20%20%20%20%20%20%20%20%20return%20this.opened%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Read-only.%20Can%20auto-close%20if%20duration%20is%20a%20positive%20finite%20number.%0A%20%20%20%20%20%20%20%20%20*%20%40property%20_canAutoClose%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20_canAutoClose()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.duration%20%3E%200%20%26%26%20this.duration%20!%3D%3D%20Infinity%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20created%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._autoClose%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronA11yAnnouncer.requestAvailability()%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Show%20the%20toast.%20Same%20as%20%60open()%60%20from%20%60IronOverlayBehavior%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20show%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.open()%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Hide%20the%20toast.%20Same%20as%20%60close()%60%20from%20%60IronOverlayBehavior%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20hide%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.close()%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Overridden%20from%20%60IronOverlayBehavior%60.%0A%20%20%20%20%20%20%20%20%20*%20Called%20when%20the%20value%20of%20%60opened%60%20changes.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_openedChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(this._autoClose%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.cancelAsync(this._autoClose)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._autoClose%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(currentToast%20%26%26%20currentToast%20!%3D%3D%20this)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20currentToast.close()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20currentToast%20%3D%20this%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.fire('iron-announce'%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20text%3A%20this.text%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this._canAutoClose)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._autoClose%20%3D%20this.async(this.close%2C%20this.duration)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(currentToast%20%3D%3D%3D%20this)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20currentToast%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this%2C%20arguments)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Overridden%20from%20%60IronOverlayBehavior%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_renderOpened%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.classList.add('paper-toast-open')%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Overridden%20from%20%60IronOverlayBehavior%60.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_renderClosed%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.classList.remove('paper-toast-open')%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Overridden%20from%20%60IronOverlayBehavior%60.%0A%20%20%20%20%20%20%20%20%20*%20iron-fit-behavior%20will%20set%20the%20inline%20style%20position%3A%20static%2C%20which%0A%20%20%20%20%20%20%20%20%20*%20causes%20the%20toast%20to%20be%20rendered%20incorrectly%20when%20opened%20by%20default.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_onIronResize%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronOverlayBehaviorImpl._onIronResize.apply(this%2C%20arguments)%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(this.opened)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Make%20sure%20there%20is%20no%20inline%20style%20for%20position.%0A%20%20%20%20%20%20%20%20%20%20%20%20this.style.position%20%3D%20''%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20when%20%60paper-toast%60%20is%20opened.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20'iron-announce'%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B%7Btext%3A%20string%7D%7D%20detail%20Contains%20text%20that%20will%20be%20announced.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D)()%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-43.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20%60Polymer.IronMenuBehavior%60%20implements%20accessible%20menu%20behavior.%0A%20%20%20*%0A%20%20%20*%20%40demo%20demo%2Findex.html%0A%20%20%20*%20%40polymerBehavior%20Polymer.IronMenuBehavior%0A%20%20%20*%2F%0A%20%20Polymer.IronMenuBehaviorImpl%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Returns%20the%20currently%20focused%20item.%0A%20%20%20%20%20%20%20*%20%40type%20%7B%3FObject%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20focusedItem%3A%20%7B%0A%20%20%20%20%20%20%20%20observer%3A%20'_focusedItemChanged'%2C%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20attribute%20to%20use%20on%20menu%20items%20to%20look%20up%20the%20item%20title.%20Typing%20the%20first%0A%20%20%20%20%20%20%20*%20letter%20of%20an%20item%20when%20the%20menu%20is%20open%20focuses%20that%20item.%20If%20unset%2C%20%60textContent%60%0A%20%20%20%20%20%20%20*%20will%20be%20used.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20attrForItemTitle%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20'role'%3A%20'menu'%2C%0A%20%20%20%20%20%20'tabindex'%3A%20'0'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_updateMultiselectable(multi)'%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'focus'%3A%20'_onFocus'%2C%0A%20%20%20%20%20%20'keydown'%3A%20'_onKeydown'%2C%0A%20%20%20%20%20%20'iron-items-changed'%3A%20'_onIronItemsChanged'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20keyBindings%3A%20%7B%0A%20%20%20%20%20%20'up'%3A%20'_onUpKey'%2C%0A%20%20%20%20%20%20'down'%3A%20'_onDownKey'%2C%0A%20%20%20%20%20%20'esc'%3A%20'_onEscKey'%2C%0A%20%20%20%20%20%20'shift%2Btab%3Akeydown'%3A%20'_onShiftTabDown'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20this._resetTabindices()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Selects%20the%20given%20value.%20If%20the%20%60multi%60%20property%20is%20true%2C%20then%20the%20selected%20state%20of%20the%0A%20%20%20%20%20*%20%60value%60%20will%20be%20toggled%3B%20otherwise%20the%20%60value%60%20will%20be%20selected.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20value%20the%20value%20to%20select.%0A%20%20%20%20%20*%2F%0A%20%20%20%20select%3A%20function(value)%20%7B%0A%20%20%20%20%20%20if%20(this._defaultFocusAsync)%20%7B%0A%20%20%20%20%20%20%20%20this.cancelAsync(this._defaultFocusAsync)%3B%0A%20%20%20%20%20%20%20%20this._defaultFocusAsync%20%3D%20null%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20item%20%3D%20this._valueToItem(value)%3B%0A%20%20%20%20%20%20if%20(item%20%26%26%20item.hasAttribute('disabled'))%20return%3B%0A%20%20%20%20%20%20this._setFocusedItem(item)%3B%0A%20%20%20%20%20%20Polymer.IronMultiSelectableBehaviorImpl.select.apply(this%2C%20arguments)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Resets%20all%20tabindex%20attributes%20to%20the%20appropriate%20value%20based%20on%20the%0A%20%20%20%20%20*%20current%20selection%20state.%20The%20appropriate%20value%20is%20%600%60%20(focusable)%20for%0A%20%20%20%20%20*%20the%20default%20selected%20item%2C%20and%20%60-1%60%20(not%20keyboard%20focusable)%20for%20all%0A%20%20%20%20%20*%20other%20items.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_resetTabindices%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20selectedItem%20%3D%20this.multi%20%3F%20(this.selectedItems%20%26%26%20this.selectedItems%5B0%5D)%20%3A%20this.selectedItem%3B%0A%0A%20%20%20%20%20%20this.items.forEach(function(item)%20%7B%0A%20%20%20%20%20%20%20%20item.setAttribute('tabindex'%2C%20item%20%3D%3D%3D%20selectedItem%20%3F%20'0'%20%3A%20'-1')%3B%0A%20%20%20%20%20%20%7D%2C%20this)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Sets%20appropriate%20ARIA%20based%20on%20whether%20or%20not%20the%20menu%20is%20meant%20to%20be%0A%20%20%20%20%20*%20multi-selectable.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7Bboolean%7D%20multi%20True%20if%20the%20menu%20should%20be%20multi-selectable.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_updateMultiselectable%3A%20function(multi)%20%7B%0A%20%20%20%20%20%20if%20(multi)%20%7B%0A%20%20%20%20%20%20%20%20this.setAttribute('aria-multiselectable'%2C%20'true')%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.removeAttribute('aria-multiselectable')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Given%20a%20KeyboardEvent%2C%20this%20method%20will%20focus%20the%20appropriate%20item%20in%20the%0A%20%20%20%20%20*%20menu%20(if%20there%20is%20a%20relevant%20item%2C%20and%20it%20is%20possible%20to%20focus%20it).%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BKeyboardEvent%7D%20event%20A%20KeyboardEvent.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_focusWithKeyboardEvent%3A%20function(event)%20%7B%0A%20%20%20%20%20%20for%20(var%20i%20%3D%200%2C%20item%3B%20item%20%3D%20this.items%5Bi%5D%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20var%20attr%20%3D%20this.attrForItemTitle%20%7C%7C%20'textContent'%3B%0A%20%20%20%20%20%20%20%20var%20title%20%3D%20item%5Battr%5D%20%7C%7C%20item.getAttribute(attr)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(title%20%26%26%20title.trim().charAt(0).toLowerCase()%20%3D%3D%3D%20String.fromCharCode(event.keyCode).toLowerCase())%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._setFocusedItem(item)%3B%0A%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Focuses%20the%20previous%20item%20(relative%20to%20the%20currently%20focused%20item)%20in%20the%0A%20%20%20%20%20*%20menu.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_focusPrevious%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20length%20%3D%20this.items.length%3B%0A%20%20%20%20%20%20var%20index%20%3D%20(Number(this.indexOf(this.focusedItem))%20-%201%20%2B%20length)%20%25%20length%3B%0A%20%20%20%20%20%20this._setFocusedItem(this.items%5Bindex%5D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Focuses%20the%20next%20item%20(relative%20to%20the%20currently%20focused%20item)%20in%20the%0A%20%20%20%20%20*%20menu.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_focusNext%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20index%20%3D%20(Number(this.indexOf(this.focusedItem))%20%2B%201)%20%25%20this.items.length%3B%0A%20%20%20%20%20%20this._setFocusedItem(this.items%5Bindex%5D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Mutates%20items%20in%20the%20menu%20based%20on%20provided%20selection%20details%2C%20so%20that%0A%20%20%20%20%20*%20all%20items%20correctly%20reflect%20selection%20state.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BElement%7D%20item%20An%20item%20in%20the%20menu.%0A%20%20%20%20%20*%20%40param%20%7Bboolean%7D%20isSelected%20True%20if%20the%20item%20should%20be%20shown%20in%20a%0A%20%20%20%20%20*%20selected%20state%2C%20otherwise%20false.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_applySelection%3A%20function(item%2C%20isSelected)%20%7B%0A%20%20%20%20%20%20if%20(isSelected)%20%7B%0A%20%20%20%20%20%20%20%20item.setAttribute('aria-selected'%2C%20'true')%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20item.removeAttribute('aria-selected')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20Polymer.IronSelectableBehavior._applySelection.apply(this%2C%20arguments)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Discretely%20updates%20tabindex%20values%20among%20menu%20items%20as%20the%20focused%20item%0A%20%20%20%20%20*%20changes.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BElement%7D%20focusedItem%20The%20element%20that%20is%20currently%20focused.%0A%20%20%20%20%20*%20%40param%20%7B%3FElement%7D%20old%20The%20last%20element%20that%20was%20considered%20focused%2C%20if%0A%20%20%20%20%20*%20applicable.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_focusedItemChanged%3A%20function(focusedItem%2C%20old)%20%7B%0A%20%20%20%20%20%20old%20%26%26%20old.setAttribute('tabindex'%2C%20'-1')%3B%0A%20%20%20%20%20%20if%20(focusedItem)%20%7B%0A%20%20%20%20%20%20%20%20focusedItem.setAttribute('tabindex'%2C%20'0')%3B%0A%20%20%20%20%20%20%20%20focusedItem.focus()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20A%20handler%20that%20responds%20to%20mutation%20changes%20related%20to%20the%20list%20of%20items%0A%20%20%20%20%20*%20in%20the%20menu.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BCustomEvent%7D%20event%20An%20event%20containing%20mutation%20records%20as%20its%0A%20%20%20%20%20*%20detail.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_onIronItemsChanged%3A%20function(event)%20%7B%0A%20%20%20%20%20%20var%20mutations%20%3D%20event.detail%3B%0A%20%20%20%20%20%20var%20mutation%3B%0A%20%20%20%20%20%20var%20index%3B%0A%0A%20%20%20%20%20%20for%20(index%20%3D%200%3B%20index%20%3C%20mutations.length%3B%20%2B%2Bindex)%20%7B%0A%20%20%20%20%20%20%20%20mutation%20%3D%20mutations%5Bindex%5D%3B%0A%0A%20%20%20%20%20%20%20%20if%20(mutation.addedNodes.length)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._resetTabindices()%3B%0A%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Handler%20that%20is%20called%20when%20a%20shift%2Btab%20keypress%20is%20detected%20by%20the%20menu.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BCustomEvent%7D%20event%20A%20key%20combination%20event.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_onShiftTabDown%3A%20function(event)%20%7B%0A%20%20%20%20%20%20var%20oldTabIndex%20%3D%20this.getAttribute('tabindex')%3B%0A%0A%20%20%20%20%20%20Polymer.IronMenuBehaviorImpl._shiftTabPressed%20%3D%20true%3B%0A%0A%20%20%20%20%20%20this._setFocusedItem(null)%3B%0A%0A%20%20%20%20%20%20this.setAttribute('tabindex'%2C%20'-1')%3B%0A%0A%20%20%20%20%20%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20this.setAttribute('tabindex'%2C%20oldTabIndex)%3B%0A%20%20%20%20%20%20%20%20Polymer.IronMenuBehaviorImpl._shiftTabPressed%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20%2F%2F%20NOTE(cdata)%3A%20polymer%2Fpolymer%231305%0A%20%20%20%20%20%20%7D%2C%201)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Handler%20that%20is%20called%20when%20the%20menu%20receives%20focus.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BFocusEvent%7D%20event%20A%20focus%20event.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_onFocus%3A%20function(event)%20%7B%0A%20%20%20%20%20%20if%20(Polymer.IronMenuBehaviorImpl._shiftTabPressed)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20do%20not%20focus%20the%20menu%20itself%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this.blur()%3B%0A%0A%20%20%20%20%20%20%2F%2F%20clear%20the%20cached%20focus%20item%0A%20%20%20%20%20%20this._defaultFocusAsync%20%3D%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20focus%20the%20selected%20item%20when%20the%20menu%20receives%20focus%2C%20or%20the%20first%20item%0A%20%20%20%20%20%20%20%20%2F%2F%20if%20no%20item%20is%20selected%0A%20%20%20%20%20%20%20%20var%20selectedItem%20%3D%20this.multi%20%3F%20(this.selectedItems%20%26%26%20this.selectedItems%5B0%5D)%20%3A%20this.selectedItem%3B%0A%0A%20%20%20%20%20%20%20%20this._setFocusedItem(null)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(selectedItem)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._setFocusedItem(selectedItem)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._setFocusedItem(this.items%5B0%5D)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%2F%2F%20async%201ms%20to%20wait%20for%20%60select%60%20to%20get%20called%20from%20%60_itemActivate%60%0A%20%20%20%20%20%20%7D%2C%201)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Handler%20that%20is%20called%20when%20the%20up%20key%20is%20pressed.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BCustomEvent%7D%20event%20A%20key%20combination%20event.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_onUpKey%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%2F%2F%20up%20and%20down%20arrows%20moves%20the%20focus%0A%20%20%20%20%20%20this._focusPrevious()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Handler%20that%20is%20called%20when%20the%20down%20key%20is%20pressed.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BCustomEvent%7D%20event%20A%20key%20combination%20event.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_onDownKey%3A%20function(event)%20%7B%0A%20%20%20%20%20%20this._focusNext()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Handler%20that%20is%20called%20when%20the%20esc%20key%20is%20pressed.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BCustomEvent%7D%20event%20A%20key%20combination%20event.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_onEscKey%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%2F%2F%20esc%20blurs%20the%20control%0A%20%20%20%20%20%20this.focusedItem.blur()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Handler%20that%20is%20called%20when%20a%20keydown%20event%20is%20detected.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BKeyboardEvent%7D%20event%20A%20keyboard%20event.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_onKeydown%3A%20function(event)%20%7B%0A%20%20%20%20%20%20if%20(!this.keyboardEventMatchesKeys(event%2C%20'up%20down%20esc'))%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20all%20other%20keys%20focus%20the%20menu%20item%20starting%20with%20that%20character%0A%20%20%20%20%20%20%20%20this._focusWithKeyboardEvent(event)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20event.stopPropagation()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20override%20_activateHandler%0A%20%20%20%20_activateHandler%3A%20function(event)%20%7B%0A%20%20%20%20%20%20Polymer.IronSelectableBehavior._activateHandler.call(this%2C%20event)%3B%0A%20%20%20%20%20%20event.stopPropagation()%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20Polymer.IronMenuBehaviorImpl._shiftTabPressed%20%3D%20false%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20Polymer.IronMenuBehavior%20*%2F%0A%20%20Polymer.IronMenuBehavior%20%3D%20%5B%0A%20%20%20%20Polymer.IronMultiSelectableBehavior%2C%0A%20%20%20%20Polymer.IronA11yKeysBehavior%2C%0A%20%20%20%20Polymer.IronMenuBehaviorImpl%0A%20%20%5D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-44.js%0A
0 ms
javascript;charset=utf-8,%0A%20%20%20%20(function()%20%7B%0A%20%20%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20%20%20is%3A%20'paper-menu'%2C%0A%0A%20%20%20%20%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronMenuBehavior%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D)()%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-45.js%0A
0 ms
javascript;charset=utf-8,%0A%20%20%2F**%20%40polymerBehavior%20Polymer.PaperItemBehavior%20*%2F%0A%20%20Polymer.PaperItemBehaviorImpl%20%3D%20%7B%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20role%3A%20'option'%2C%0A%20%20%20%20%20%20tabindex%3A%20'0'%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20*%2F%0A%20%20Polymer.PaperItemBehavior%20%3D%20%5B%0A%20%20%20%20Polymer.IronButtonState%2C%0A%20%20%20%20Polymer.IronControlState%2C%0A%20%20%20%20Polymer.PaperItemBehaviorImpl%0A%20%20%5D%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-46.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20is%3A%20'paper-item'%2C%0A%0A%20%20%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20%20%20Polymer.PaperItemBehavior%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D)%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-47.js%0A
0 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20%60Polymer.IronMenubarBehavior%60%20implements%20accessible%20menubar%20behavior.%0A%20%20%20*%0A%20%20%20*%20%40polymerBehavior%20Polymer.IronMenubarBehavior%0A%20%20%20*%2F%0A%20%20Polymer.IronMenubarBehaviorImpl%20%3D%20%7B%0A%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20'role'%3A%20'menubar'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20keyBindings%3A%20%7B%0A%20%20%20%20%20%20'left'%3A%20'_onLeftKey'%2C%0A%20%20%20%20%20%20'right'%3A%20'_onRightKey'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onUpKey%3A%20function(event)%20%7B%0A%20%20%20%20%20%20this.focusedItem.click()%3B%0A%20%20%20%20%20%20event.detail.keyboardEvent.preventDefault()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onDownKey%3A%20function(event)%20%7B%0A%20%20%20%20%20%20this.focusedItem.click()%3B%0A%20%20%20%20%20%20event.detail.keyboardEvent.preventDefault()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onLeftKey%3A%20function()%20%7B%0A%20%20%20%20%20%20this._focusPrevious()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onRightKey%3A%20function()%20%7B%0A%20%20%20%20%20%20this._focusNext()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onKeydown%3A%20function(event)%20%7B%0A%20%20%20%20%20%20if%20(this.keyboardEventMatchesKeys(event%2C%20'up%20down%20left%20right%20esc'))%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20all%20other%20keys%20focus%20the%20menu%20item%20starting%20with%20that%20character%0A%20%20%20%20%20%20this._focusWithKeyboardEvent(event)%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20Polymer.IronMenubarBehavior%20*%2F%0A%20%20Polymer.IronMenubarBehavior%20%3D%20%5B%0A%20%20%20%20Polymer.IronMenuBehavior%2C%0A%20%20%20%20Polymer.IronMenubarBehaviorImpl%0A%20%20%5D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-48.js%0A
0 ms
javascript;charset=utf-8,%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'paper-tab'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.IronControlState%2C%0A%20%20%20%20%20%20Polymer.IronButtonState%2C%0A%20%20%20%20%20%20Polymer.PaperRippleBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20role%3A%20'tab'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20down%3A%20'_updateNoink'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20ripple%20%3D%20this.getRipple()%3B%0A%20%20%20%20%20%20ripple.initialOpacity%20%3D%200.95%3B%0A%20%20%20%20%20%20ripple.opacityDecayVelocity%20%3D%200.98%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20this._updateNoink()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_parentNoink%20()%20%7B%0A%20%20%20%20%20%20var%20parent%20%3D%20Polymer.dom(this).parentNode%3B%0A%20%20%20%20%20%20return%20!!parent%20%26%26%20!!parent.noink%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_updateNoink%3A%20function()%20%7B%0A%20%20%20%20%20%20this.noink%20%3D%20!!this.noink%20%7C%7C%20!!this._parentNoink%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-49.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'paper-tabs'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.IronResizableBehavior%2C%0A%20%20%20%20%20%20Polymer.IronMenubarBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20ink%20ripple%20effect%20is%20disabled.%20When%20this%20property%20is%20changed%2C%0A%20%20%20%20%20%20%20*%20all%20descendant%20%60%3Cpaper-tab%3E%60%20elements%20have%20their%20%60noink%60%20property%0A%20%20%20%20%20%20%20*%20changed%20to%20the%20new%20value%20as%20well.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20noink%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_noinkChanged'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20bottom%20bar%20to%20indicate%20the%20selected%20tab%20will%20not%20be%20shown.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20noBar%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20slide%20effect%20for%20the%20bottom%20bar%20is%20disabled.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20noSlide%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20tabs%20are%20scrollable%20and%20the%20tab%20width%20is%20based%20on%20the%20label%20width.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20scrollable%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20dragging%20on%20the%20tabs%20to%20scroll%20is%20disabled.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20disableDrag%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20scroll%20buttons%20(left%2Fright%20arrow)%20will%20be%20hidden%20for%20scrollable%20tabs.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20hideScrollButtons%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20tabs%20are%20aligned%20to%20bottom%20(the%20selection%20bar%20appears%20at%20the%20top).%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20alignBottom%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Gets%20or%20sets%20the%20selected%20element.%20The%20default%20is%20to%20use%20the%20index%20of%20the%20item.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20selected%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20selectable%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'paper-tab'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_step%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20value%3A%2010%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_holdDelay%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20value%3A%201%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_leftHidden%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_rightHidden%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_previousTab%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20role%3A%20'tablist'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'iron-resize'%3A%20'_onResize'%2C%0A%20%20%20%20%20%20'iron-select'%3A%20'_onIronSelect'%2C%0A%20%20%20%20%20%20'iron-deselect'%3A%20'_onIronDeselect'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20created%3A%20function()%20%7B%0A%20%20%20%20%20%20this._holdJob%20%3D%20null%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20this.setScrollDirection('y'%2C%20this.%24.tabsContainer)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_noinkChanged%3A%20function(noink)%20%7B%0A%20%20%20%20%20%20var%20childTabs%20%3D%20Polymer.dom(this).querySelectorAll('paper-tab')%3B%0A%20%20%20%20%20%20childTabs.forEach(noink%20%3F%20this._setNoinkAttribute%20%3A%20this._removeNoinkAttribute)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_setNoinkAttribute%3A%20function(element)%20%7B%0A%20%20%20%20%20%20element.setAttribute('noink'%2C%20'')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_removeNoinkAttribute%3A%20function(element)%20%7B%0A%20%20%20%20%20%20element.removeAttribute('noink')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_computeScrollButtonClass%3A%20function(hideThisButton%2C%20scrollable%2C%20hideScrollButtons)%20%7B%0A%20%20%20%20%20%20if%20(!scrollable%20%7C%7C%20hideScrollButtons)%20%7B%0A%20%20%20%20%20%20%20%20return%20'hidden'%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20if%20(hideThisButton)%20%7B%0A%20%20%20%20%20%20%20%20return%20'not-visible'%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20return%20''%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_computeTabsContentClass%3A%20function(scrollable)%20%7B%0A%20%20%20%20%20%20return%20scrollable%20%3F%20'scrollable'%20%3A%20'horizontal%20layout'%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_computeSelectionBarClass%3A%20function(noBar%2C%20alignBottom)%20%7B%0A%20%20%20%20%20%20if%20(noBar)%20%7B%0A%20%20%20%20%20%20%20%20return%20'hidden'%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(alignBottom)%20%7B%0A%20%20%20%20%20%20%20%20return%20'align-bottom'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20TODO(cdata)%3A%20Add%20%60track%60%20response%20back%20in%20when%20gesture%20lands.%0A%0A%20%20%20%20_onResize%3A%20function()%20%7B%0A%20%20%20%20%20%20this.debounce('_onResize'%2C%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._scroll()%3B%0A%20%20%20%20%20%20%20%20this.%24.isSelectedItemSets%20%3D%20false%3B%20%2F%2F%20custom%20modify%0A%20%20%20%20%20%20%20%20this._tabChanged(this.selectedItem)%3B%0A%20%20%20%20%20%20%7D%2C%2010)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onIronSelect%3A%20function(event)%20%7B%0A%20%20%20%20%20%20this._tabChanged(event.detail.item%2C%20this._previousTab)%3B%0A%20%20%20%20%20%20this._previousTab%20%3D%20event.detail.item%3B%0A%20%20%20%20%20%20this.cancelDebouncer('tab-changed')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onIronDeselect%3A%20function(event)%20%7B%0A%20%20%20%20%20%20this.debounce('tab-changed'%2C%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._tabChanged(null%2C%20this._previousTab)%3B%0A%20%20%20%20%20%20%2F%2F%20See%20polymer%2Fpolymer%231305%0A%20%20%20%20%20%20%7D%2C%201)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_tabContainerScrollSize%20()%20%7B%0A%20%20%20%20%20%20return%20Math.max(%0A%20%20%20%20%20%20%20%200%2C%0A%20%20%20%20%20%20%20%20this.%24.tabsContainer.scrollWidth%20-%0A%20%20%20%20%20%20%20%20%20%20this.%24.tabsContainer.offsetWidth%0A%20%20%20%20%20%20)%3B%0A%20%20%20%20%7D%2C%0A%0A%0A%20%20%20%20_scroll%3A%20function(e%2C%20detail)%20%7B%0A%20%20%20%20%20%20if%20(!this.scrollable)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20var%20ddx%20%3D%20(detail%20%26%26%20-detail.ddx)%20%7C%7C%200%3B%0A%20%20%20%20%20%20this._affectScroll(ddx)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_down%3A%20function(e)%20%7B%0A%20%20%20%20%20%20%2F%2F%20go%20one%20beat%20async%20to%20defeat%20IronMenuBehavior%0A%20%20%20%20%20%20%2F%2F%20autorefocus-on-no-selection%20timeout%0A%20%20%20%20%20%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(this._defaultFocusAsync)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.cancelAsync(this._defaultFocusAsync)%3B%0A%20%20%20%20%20%20%20%20%20%20this._defaultFocusAsync%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%201)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_affectScroll%3A%20function(dx)%20%7B%0A%20%20%20%20%20%20this.%24.tabsContainer.scrollLeft%20%2B%3D%20dx%3B%0A%0A%20%20%20%20%20%20var%20scrollLeft%20%3D%20this.%24.tabsContainer.scrollLeft%3B%0A%0A%20%20%20%20%20%20this._leftHidden%20%3D%20scrollLeft%20%3D%3D%3D%200%3B%0A%20%20%20%20%20%20this._rightHidden%20%3D%20scrollLeft%20%3D%3D%3D%20this._tabContainerScrollSize%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onLeftScrollButtonDown%3A%20function()%20%7B%0A%20%20%20%20%20%20this._scrollToLeft()%3B%0A%20%20%20%20%20%20this._holdJob%20%3D%20setInterval(this._scrollToLeft.bind(this)%2C%20this._holdDelay)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onRightScrollButtonDown%3A%20function()%20%7B%0A%20%20%20%20%20%20this._scrollToRight()%3B%0A%20%20%20%20%20%20this._holdJob%20%3D%20setInterval(this._scrollToRight.bind(this)%2C%20this._holdDelay)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onScrollButtonUp%3A%20function()%20%7B%0A%20%20%20%20%20%20clearInterval(this._holdJob)%3B%0A%20%20%20%20%20%20this._holdJob%20%3D%20null%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_scrollToLeft%3A%20function()%20%7B%0A%20%20%20%20%20%20this._affectScroll(-this._step)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_scrollToRight%3A%20function()%20%7B%0A%20%20%20%20%20%20this._affectScroll(this._step)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_tabChanged%3A%20function(tab%2C%20old)%20%7B%0A%20%20%20%20%20%20if%20(!tab)%20%7B%0A%20%20%20%20%20%20%20%20this._positionBar(0%2C%200)%3B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20var%20r%20%3D%20this.%24.tabsContent.getBoundingClientRect()%3B%0A%20%20%20%20%20%20var%20w%20%3D%20r.width%3B%0A%20%20%20%20%20%20var%20tabRect%20%3D%20tab.getBoundingClientRect()%3B%0A%20%20%20%20%20%20var%20tabOffsetLeft%20%3D%20tabRect.left%20-%20r.left%3B%0A%0A%20%20%20%20%20%20this._pos%20%3D%20%7B%0A%20%20%20%20%20%20%20%20width%3A%20this._calcPercent(tabRect.width%2C%20w)%2C%0A%20%20%20%20%20%20%20%20left%3A%20this._calcPercent(tabOffsetLeft%2C%20w)%0A%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20if%20(this.noSlide%20%7C%7C%20old%20%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20position%20bar%20directly%20without%20animation%0A%20%20%20%20%20%20%20%20this._positionBar(this._pos.width%2C%20this._pos.left)%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20custom%20modify%0A%20%20%20%20%20%20%20%20if%20(this.selectedItem%20%26%26%20false%20%3D%3D%3D%20this.%24.isSelectedItemSets)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.%24.tabsContainer.scrollLeft%20%3D%20tabOffsetLeft%3B%0A%20%20%20%20%20%20%20%20%20%20this.%24.isSelectedItemSets%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%20this._affectScroll(0)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20var%20oldRect%20%3D%20old.getBoundingClientRect()%3B%0A%20%20%20%20%20%20var%20oldIndex%20%3D%20this.items.indexOf(old)%3B%0A%20%20%20%20%20%20var%20index%20%3D%20this.items.indexOf(tab)%3B%0A%20%20%20%20%20%20var%20m%20%3D%205%3B%0A%0A%20%20%20%20%20%20%2F%2F%20bar%20animation%3A%20expand%0A%20%20%20%20%20%20this.%24.selectionBar.classList.add('expand')%3B%0A%0A%20%20%20%20%20%20if%20(oldIndex%20%3C%20index)%20%7B%0A%20%20%20%20%20%20%20%20this._positionBar(this._calcPercent(tabRect.left%20%2B%20tabRect.width%20-%20oldRect.left%2C%20w)%20-%20m%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20this._left)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this._positionBar(this._calcPercent(oldRect.left%20%2B%20oldRect.width%20-%20tabRect.left%2C%20w)%20-%20m%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20this._calcPercent(tabOffsetLeft%2C%20w)%20%2B%20m)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20if%20(this.scrollable)%20%7B%0A%20%20%20%20%20%20%20%20this._scrollToSelectedIfNeeded(tabRect.width%2C%20tabOffsetLeft)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_scrollToSelectedIfNeeded%3A%20function(tabWidth%2C%20tabOffsetLeft)%20%7B%0A%20%20%20%20%20%20var%20l%20%3D%20tabOffsetLeft%20-%20this.%24.tabsContainer.scrollLeft%3B%0A%20%20%20%20%20%20if%20(l%20%3C%200)%20%7B%0A%20%20%20%20%20%20%20%20this.%24.tabsContainer.scrollLeft%20%2B%3D%20l%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20l%20%2B%3D%20(tabWidth%20-%20this.%24.tabsContainer.offsetWidth)%3B%0A%20%20%20%20%20%20%20%20if%20(l%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.%24.tabsContainer.scrollLeft%20%2B%3D%20l%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_calcPercent%3A%20function(w%2C%20w0)%20%7B%0A%20%20%20%20%20%20return%20100%20*%20w%20%2F%20w0%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_positionBar%3A%20function(width%2C%20left)%20%7B%0A%20%20%20%20%20%20width%20%3D%20width%20%7C%7C%200%3B%0A%20%20%20%20%20%20left%20%3D%20left%20%7C%7C%200%3B%0A%0A%20%20%20%20%20%20this._width%20%3D%20width%3B%0A%20%20%20%20%20%20this._left%20%3D%20left%3B%0A%20%20%20%20%20%20this.transform(%0A%20%20%20%20%20%20%20%20%20%20'translate3d('%20%2B%20left%20%2B%20'%25%2C%200%2C%200)%20scaleX('%20%2B%20(width%20%2F%20100)%20%2B%20')'%2C%0A%20%20%20%20%20%20%20%20%20%20this.%24.selectionBar)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onBarTransitionEnd%3A%20function(e)%20%7B%0A%20%20%20%20%20%20var%20cl%20%3D%20this.%24.selectionBar.classList%3B%0A%20%20%20%20%20%20%2F%2F%20bar%20animation%3A%20expand%20-%3E%20contract%0A%20%20%20%20%20%20if%20(cl.contains('expand'))%20%7B%0A%20%20%20%20%20%20%20%20cl.remove('expand')%3B%0A%20%20%20%20%20%20%20%20cl.add('contract')%3B%0A%20%20%20%20%20%20%20%20this._positionBar(this._pos.width%2C%20this._pos.left)%3B%0A%20%20%20%20%20%20%2F%2F%20bar%20animation%20done%0A%20%20%20%20%20%20%7D%20else%20if%20(cl.contains('contract'))%20%7B%0A%20%20%20%20%20%20%20%20cl.remove('contract')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D)%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-50.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%2F**%0A%20%20Polymer.IronFormElementBehavior%20enables%20a%20custom%20element%20to%20be%20included%0A%20%20in%20an%20%60iron-form%60.%0A%0A%20%20%40demo%20demo%2Findex.html%0A%20%20%40polymerBehavior%0A%20%20*%2F%0A%20%20Polymer.IronFormElementBehavior%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Fired%20when%20the%20element%20is%20added%20to%20an%20%60iron-form%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20iron-form-element-register%0A%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Fired%20when%20the%20element%20is%20removed%20from%20an%20%60iron-form%60.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20iron-form-element-unregister%0A%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20name%20of%20this%20element.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20name%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20value%20for%20this%20element.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20value%3A%20%7B%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20mark%20the%20input%20as%20required.%20If%20used%20in%20a%20form%2C%20a%0A%20%20%20%20%20%20%20*%20custom%20element%20that%20uses%20this%20behavior%20should%20also%20use%0A%20%20%20%20%20%20%20*%20Polymer.IronValidatableBehavior%20and%20define%20a%20custom%20validation%20method.%0A%20%20%20%20%20%20%20*%20Otherwise%2C%20a%20%60required%60%20element%20will%20always%20be%20considered%20valid.%0A%20%20%20%20%20%20%20*%20It's%20also%20strongly%20recommended%20to%20provide%20a%20visual%20style%20for%20the%20element%0A%20%20%20%20%20%20%20*%20when%20its%20value%20is%20invalid.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20required%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20form%20that%20the%20element%20is%20registered%20to.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20_parentForm%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20Note%3A%20the%20iron-form%20that%20this%20element%20belongs%20to%20will%20set%20this%0A%20%20%20%20%20%20%2F%2F%20element's%20_parentForm%20property%20when%20handling%20this%20event.%0A%20%20%20%20%20%20this.fire('iron-form-element-register')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20detached%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._parentForm)%20%7B%0A%20%20%20%20%20%20%20%20this._parentForm.fire('iron-form-element-unregister'%2C%20%7Btarget%3A%20this%7D)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-51.js%0A
43 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20%60Use%20Polymer.IronValidatableBehavior%60%20to%20implement%20an%20element%20that%20validates%20user%20input.%0A%20%20%20*%20Use%20the%20related%20%60Polymer.IronValidatorBehavior%60%20to%20add%20custom%20validation%20logic%20to%20an%20iron-input.%0A%20%20%20*%0A%20%20%20*%20By%20default%2C%20an%20%60%3Ciron-form%3E%60%20element%20validates%20its%20fields%20when%20the%20user%20presses%20the%20submit%20button.%0A%20%20%20*%20To%20validate%20a%20form%20imperatively%2C%20call%20the%20form's%20%60validate()%60%20method%2C%20which%20in%20turn%20will%0A%20%20%20*%20call%20%60validate()%60%20on%20all%20its%20children.%20By%20using%20%60Polymer.IronValidatableBehavior%60%2C%20your%0A%20%20%20*%20custom%20element%20will%20get%20a%20public%20%60validate()%60%2C%20which%0A%20%20%20*%20will%20return%20the%20validity%20of%20the%20element%2C%20and%20a%20corresponding%20%60invalid%60%20attribute%2C%0A%20%20%20*%20which%20can%20be%20used%20for%20styling.%0A%20%20%20*%0A%20%20%20*%20To%20implement%20the%20custom%20validation%20logic%20of%20your%20element%2C%20you%20must%20override%0A%20%20%20*%20the%20protected%20%60_getValidity()%60%20method%20of%20this%20behaviour%2C%20rather%20than%20%60validate()%60.%0A%20%20%20*%20See%20%5Bthis%5D(https%3A%2F%2Fgithub.com%2FPolymerElements%2Firon-form%2Fblob%2Fmaster%2Fdemo%2Fsimple-element.html)%0A%20%20%20*%20for%20an%20example.%0A%20%20%20*%0A%20%20%20*%20%23%23%23%20Accessibility%0A%20%20%20*%0A%20%20%20*%20Changing%20the%20%60invalid%60%20property%2C%20either%20manually%20or%20by%20calling%20%60validate()%60%20will%20update%20the%0A%20%20%20*%20%60aria-invalid%60%20attribute.%0A%20%20%20*%0A%20%20%20*%20%40demo%20demo%2Findex.html%0A%20%20%20*%20%40polymerBehavior%0A%20%20%20*%2F%0A%20%20Polymer.IronValidatableBehavior%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Namespace%20for%20this%20validator.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20validatorType%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'validator'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Name%20of%20the%20validator%20to%20use.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20validator%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20True%20if%20the%20last%20call%20to%20%60validate%60%20is%20invalid.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20invalid%3A%20%7B%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_validatorMeta%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Object%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_invalidChanged(invalid)'%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20get%20_validator()%20%7B%0A%20%20%20%20%20%20return%20this._validatorMeta%20%26%26%20this._validatorMeta.byKey(this.validator)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20this._validatorMeta%20%3D%20new%20Polymer.IronMeta(%7Btype%3A%20this.validatorType%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_invalidChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.invalid)%20%7B%0A%20%20%20%20%20%20%20%20this.setAttribute('aria-invalid'%2C%20'true')%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.removeAttribute('aria-invalid')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20the%20validator%20%60validator%60%20exists.%0A%20%20%20%20%20*%2F%0A%20%20%20%20hasValidator%3A%20function()%20%7B%0A%20%20%20%20%20%20return%20this._validator%20!%3D%20null%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20true%20if%20the%20%60value%60%20is%20valid%2C%20and%20updates%20%60invalid%60.%20If%20you%20want%0A%20%20%20%20%20*%20your%20element%20to%20have%20custom%20validation%20logic%2C%20do%20not%20override%20this%20method%3B%0A%20%20%20%20%20*%20override%20%60_getValidity(value)%60%20instead.%0A%0A%20%20%20%20%20*%20%40param%20%7BObject%7D%20value%20The%20value%20to%20be%20validated.%20By%20default%2C%20it%20is%20passed%0A%20%20%20%20%20*%20to%20the%20validator's%20%60validate()%60%20function%2C%20if%20a%20validator%20is%20set.%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20%60value%60%20is%20valid.%0A%20%20%20%20%20*%2F%0A%20%20%20%20validate%3A%20function(value)%20%7B%0A%20%20%20%20%20%20this.invalid%20%3D%20!this._getValidity(value)%3B%0A%20%20%20%20%20%20return%20!this.invalid%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20true%20if%20%60value%60%20is%20valid.%20%20By%20default%2C%20it%20is%20passed%0A%20%20%20%20%20*%20to%20the%20validator's%20%60validate()%60%20function%2C%20if%20a%20validator%20is%20set.%20You%0A%20%20%20%20%20*%20should%20override%20this%20method%20if%20you%20want%20to%20implement%20custom%20validity%0A%20%20%20%20%20*%20logic%20for%20your%20element.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BObject%7D%20value%20The%20value%20to%20be%20validated.%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20%60value%60%20is%20valid.%0A%20%20%20%20%20*%2F%0A%0A%20%20%20%20_getValidity%3A%20function(value)%20%7B%0A%20%20%20%20%20%20if%20(this.hasValidator())%20%7B%0A%20%20%20%20%20%20%20%20return%20this._validator.validate(value)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-52.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%2F*%0A%60%3Ciron-input%3E%60%20adds%20two-way%20binding%20and%20custom%20validators%20using%20%60Polymer.IronValidatorBehavior%60%0Ato%20%60%3Cinput%3E%60.%0A%0A%23%23%23%20Two-way%20binding%0A%0ABy%20default%20you%20can%20only%20get%20notified%20of%20changes%20to%20an%20%60input%60's%20%60value%60%20due%20to%20user%20input%3A%0A%0A%20%20%20%20%3Cinput%20value%3D%22%7B%7BmyValue%3A%3Ainput%7D%7D%22%3E%0A%0A%60iron-input%60%20adds%20the%20%60bind-value%60%20property%20that%20mirrors%20the%20%60value%60%20property%2C%20and%20can%20be%20used%0Afor%20two-way%20data%20binding.%20%60bind-value%60%20will%20notify%20if%20it%20is%20changed%20either%20by%20user%20input%20or%20by%20script.%0A%0A%20%20%20%20%3Cinput%20is%3D%22iron-input%22%20bind-value%3D%22%7B%7BmyValue%7D%7D%22%3E%0A%0A%23%23%23%20Custom%20validators%0A%0AYou%20can%20use%20custom%20validators%20that%20implement%20%60Polymer.IronValidatorBehavior%60%20with%20%60%3Ciron-input%3E%60.%0A%0A%20%20%20%20%3Cinput%20is%3D%22iron-input%22%20validator%3D%22my-custom-validator%22%3E%0A%0A%23%23%23%20Stopping%20invalid%20input%0A%0AIt%20may%20be%20desirable%20to%20only%20allow%20users%20to%20enter%20certain%20characters.%20You%20can%20use%20the%0A%60prevent-invalid-input%60%20and%20%60allowed-pattern%60%20attributes%20together%20to%20accomplish%20this.%20This%20feature%0Ais%20separate%20from%20validation%2C%20and%20%60allowed-pattern%60%20does%20not%20affect%20how%20the%20input%20is%20validated.%0A%0A%20%20%20%20%3C!--%20only%20allow%20characters%20that%20match%20%5B0-9%5D%20--%3E%0A%20%20%20%20%3Cinput%20is%3D%22iron-input%22%20prevent-invalid-input%20allowed-pattern%3D%22%5B0-9%5D%22%3E%0A%0A%40hero%20hero.svg%0A%40demo%20demo%2Findex.html%0A*%2F%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'iron-input'%2C%0A%0A%20%20%20%20extends%3A%20'input'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.IronValidatableBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Use%20this%20property%20instead%20of%20%60value%60%20for%20two-way%20data%20binding.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20bindValue%3A%20%7B%0A%20%20%20%20%20%20%20%20observer%3A%20'_bindValueChanged'%2C%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20prevent%20the%20user%20from%20entering%20invalid%20input.%20The%20new%20input%20characters%20are%0A%20%20%20%20%20%20%20*%20matched%20with%20%60allowedPattern%60%20if%20it%20is%20set%2C%20otherwise%20it%20will%20use%20the%20%60type%60%20attribute%20(only%0A%20%20%20%20%20%20%20*%20supported%20for%20%60type%3Dnumber%60).%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20preventInvalidInput%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Regular%20expression%20expressing%20a%20set%20of%20characters%20to%20enforce%20the%20validity%20of%20input%20characters.%0A%20%20%20%20%20%20%20*%20The%20recommended%20value%20should%20follow%20this%20format%3A%20%60%5Ba-ZA-Z0-9.%2B-!%3B%3A%5D%60%20that%20list%20the%20characters%20%0A%20%20%20%20%20%20%20*%20allowed%20as%20input.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20allowedPattern%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20observer%3A%20%22_allowedPatternChanged%22%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_previousValidInput%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_patternAlreadyChecked%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'input'%3A%20'_onInput'%2C%0A%20%20%20%20%20%20'keypress'%3A%20'_onKeypress'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_patternRegExp()%20%7B%0A%20%20%20%20%20%20var%20pattern%3B%0A%20%20%20%20%20%20if%20(this.allowedPattern)%20%7B%0A%20%20%20%20%20%20%20%20pattern%20%3D%20new%20RegExp(this.allowedPattern)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20switch%20(this.type)%20%7B%0A%20%20%20%20%20%20%20%20%20%20case%20'number'%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20pattern%20%3D%20%2F%5B0-9.%2Ce-%5D%2F%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20pattern%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20this.bindValue%20%3D%20this.value%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20%40suppress%20%7BcheckTypes%7D%0A%20%20%20%20%20*%2F%0A%20%20%20%20_bindValueChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.value%20!%3D%3D%20this.bindValue)%20%7B%0A%20%20%20%20%20%20%20%20this.value%20%3D%20!(this.bindValue%20%7C%7C%20this.bindValue%20%3D%3D%3D%200%20%7C%7C%20this.bindValue%20%3D%3D%3D%20false)%20%3F%20''%20%3A%20this.bindValue%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%2F%2F%20manually%20notify%20because%20we%20don't%20want%20to%20notify%20until%20after%20setting%20value%0A%20%20%20%20%20%20this.fire('bind-value-changed'%2C%20%7Bvalue%3A%20this.bindValue%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_allowedPatternChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20Force%20to%20prevent%20invalid%20input%20when%20an%20%60allowed-pattern%60%20is%20set%0A%20%20%20%20%20%20this.preventInvalidInput%20%3D%20this.allowedPattern%20%3F%20true%20%3A%20false%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onInput%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20Need%20to%20validate%20each%20of%20the%20characters%20pasted%20if%20they%20haven't%0A%20%20%20%20%20%20%2F%2F%20been%20validated%20inside%20%60_onKeypress%60%20already.%0A%20%20%20%20%20%20if%20(this.preventInvalidInput%20%26%26%20!this._patternAlreadyChecked)%20%7B%0A%20%20%20%20%20%20%20%20var%20valid%20%3D%20this._checkPatternValidity()%3B%0A%20%20%20%20%20%20%20%20if%20(!valid)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.value%20%3D%20this._previousValidInput%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this.bindValue%20%3D%20this.value%3B%0A%20%20%20%20%20%20this._previousValidInput%20%3D%20this.value%3B%0A%20%20%20%20%20%20this._patternAlreadyChecked%20%3D%20false%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_isPrintable%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%2F%2F%20What%20a%20control%2Fprintable%20character%20is%20varies%20wildly%20based%20on%20the%20browser.%0A%20%20%20%20%20%20%2F%2F%20-%20most%20control%20characters%20(arrows%2C%20backspace)%20do%20not%20send%20a%20%60keypress%60%20event%0A%20%20%20%20%20%20%2F%2F%20%20%20in%20Chrome%2C%20but%20the%20*do*%20on%20Firefox%0A%20%20%20%20%20%20%2F%2F%20-%20in%20Firefox%2C%20when%20they%20do%20send%20a%20%60keypress%60%20event%2C%20control%20chars%20have%0A%20%20%20%20%20%20%2F%2F%20%20%20a%20charCode%20%3D%200%2C%20keyCode%20%3D%20xx%20(for%20ex.%2040%20for%20down%20arrow)%0A%20%20%20%20%20%20%2F%2F%20-%20printable%20characters%20always%20send%20a%20keypress%20event.%0A%20%20%20%20%20%20%2F%2F%20-%20in%20Firefox%2C%20printable%20chars%20always%20have%20a%20keyCode%20%3D%200.%20In%20Chrome%2C%20the%20keyCode%0A%20%20%20%20%20%20%2F%2F%20%20%20always%20matches%20the%20charCode.%0A%20%20%20%20%20%20%2F%2F%20None%20of%20this%20makes%20any%20sense.%0A%0A%20%20%20%20%20%20%2F%2F%20For%20these%20keys%2C%20ASCII%20code%20%3D%3D%20browser%20keycode.%0A%20%20%20%20%20%20var%20anyNonPrintable%20%3D%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3D%3D%208)%20%20%20%7C%7C%20%20%2F%2F%20backspace%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3D%3D%209)%20%20%20%7C%7C%20%20%2F%2F%20tab%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3D%3D%2013)%20%20%7C%7C%20%20%2F%2F%20enter%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3D%3D%2027)%3B%20%20%20%20%20%2F%2F%20escape%0A%0A%20%20%20%20%20%20%2F%2F%20For%20these%20keys%2C%20make%20sure%20it's%20a%20browser%20keycode%20and%20not%20an%20ASCII%20code.%0A%20%20%20%20%20%20var%20mozNonPrintable%20%3D%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3D%3D%2019)%20%20%7C%7C%20%20%2F%2F%20pause%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3D%3D%2020)%20%20%7C%7C%20%20%2F%2F%20caps%20lock%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3D%3D%2045)%20%20%7C%7C%20%20%2F%2F%20insert%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3D%3D%2046)%20%20%7C%7C%20%20%2F%2F%20delete%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3D%3D%20144)%20%7C%7C%20%20%2F%2F%20num%20lock%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3D%3D%20145)%20%7C%7C%20%20%2F%2F%20scroll%20lock%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3E%2032%20%26%26%20event.keyCode%20%3C%2041)%20%20%20%7C%7C%20%2F%2F%20page%20up%2Fdown%2C%20end%2C%20home%2C%20arrows%0A%20%20%20%20%20%20%20%20(event.keyCode%20%3E%20111%20%26%26%20event.keyCode%20%3C%20124)%3B%20%2F%2F%20fn%20keys%0A%0A%20%20%20%20%20%20return%20!anyNonPrintable%20%26%26%20!(event.charCode%20%3D%3D%200%20%26%26%20mozNonPrintable)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onKeypress%3A%20function(event)%20%7B%0A%20%20%20%20%20%20if%20(!this.preventInvalidInput%20%26%26%20this.type%20!%3D%3D%20'number')%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20regexp%20%3D%20this._patternRegExp%3B%0A%20%20%20%20%20%20if%20(!regexp)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20Handle%20special%20keys%20and%20backspace%0A%20%20%20%20%20%20if%20(event.metaKey%20%7C%7C%20event.ctrlKey%20%7C%7C%20event.altKey)%0A%20%20%20%20%20%20%20%20return%3B%0A%0A%20%20%20%20%20%20%2F%2F%20Check%20the%20pattern%20either%20here%20or%20in%20%60_onInput%60%2C%20but%20not%20in%20both.%0A%20%20%20%20%20%20this._patternAlreadyChecked%20%3D%20true%3B%0A%0A%20%20%20%20%20%20var%20thisChar%20%3D%20String.fromCharCode(event.charCode)%3B%0A%20%20%20%20%20%20if%20(this._isPrintable(event)%20%26%26%20!regexp.test(thisChar))%20%7B%0A%20%20%20%20%20%20%20%20event.preventDefault()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_checkPatternValidity%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20regexp%20%3D%20this._patternRegExp%3B%0A%20%20%20%20%20%20if%20(!regexp)%20%7B%0A%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20this.value.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!regexp.test(this.value%5Bi%5D))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20true%20if%20%60value%60%20is%20valid.%20The%20validator%20provided%20in%20%60validator%60%20will%20be%20used%20first%2C%0A%20%20%20%20%20*%20then%20any%20constraints.%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20the%20value%20is%20valid.%0A%20%20%20%20%20*%2F%0A%20%20%20%20validate%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20Empty%2C%20non-required%20input%20is%20valid.%0A%20%20%20%20%20%20if%20(!this.required%20%26%26%20this.value%20%3D%3D%20'')%20%7B%0A%20%20%20%20%20%20%20%20this.invalid%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20var%20valid%3B%0A%20%20%20%20%20%20if%20(this.hasValidator())%20%7B%0A%20%20%20%20%20%20%20%20valid%20%3D%20Polymer.IronValidatableBehavior.validate.call(this%2C%20this.value)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20valid%20%3D%20this.checkValidity()%3B%0A%20%20%20%20%20%20%20%20this.invalid%20%3D%20!valid%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this.fire('iron-input-validate')%3B%0A%20%20%20%20%20%20return%20valid%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D)%3B%0A%0A%20%20%2F*%0A%20%20The%20%60iron-input-validate%60%20event%20is%20fired%20whenever%20%60validate()%60%20is%20called.%0A%20%20%40event%20iron-input-validate%0A%20%20*%2F%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-53.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%2F**%0A%20%20%20*%20Use%20%60Polymer.PaperInputBehavior%60%20to%20implement%20inputs%20with%20%60%3Cpaper-input-container%3E%60.%20This%0A%20%20%20*%20behavior%20is%20implemented%20by%20%60%3Cpaper-input%3E%60.%20It%20exposes%20a%20number%20of%20properties%20from%0A%20%20%20*%20%60%3Cpaper-input-container%3E%60%20and%20%60%3Cinput%20is%3D%22iron-input%22%3E%60%20and%20they%20should%20be%20bound%20in%20your%0A%20%20%20*%20template.%0A%20%20%20*%0A%20%20%20*%20The%20input%20element%20can%20be%20accessed%20by%20the%20%60inputElement%60%20property%20if%20you%20need%20to%20access%0A%20%20%20*%20properties%20or%20methods%20that%20are%20not%20exposed.%0A%20%20%20*%20%40polymerBehavior%20Polymer.PaperInputBehavior%0A%20%20%20*%2F%0A%20%20Polymer.PaperInputBehaviorImpl%20%3D%20%7B%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Fired%20when%20the%20input%20changes%20due%20to%20user%20interaction.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20change%0A%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20label%20for%20this%20input.%20If%20you're%20using%20PaperInputBehavior%20to%0A%20%20%20%20%20%20%20*%20implement%20your%20own%20paper-input-like%20element%2C%20bind%20this%20to%0A%20%20%20%20%20%20%20*%20%60%3Clabel%3E%60's%20content%20and%20%60hidden%60%20property%2C%20e.g.%0A%20%20%20%20%20%20%20*%20%60%3Clabel%20hidden%24%3D%22%5B%5B!label%5D%5D%22%3E%5B%5Blabel%5D%5D%3C%2Flabel%3E%60%20in%20your%20%60template%60%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20label%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20value%20for%20this%20input.%20If%20you're%20using%20PaperInputBehavior%20to%0A%20%20%20%20%20%20%20*%20implement%20your%20own%20paper-input-like%20element%2C%20bind%20this%20to%0A%20%20%20%20%20%20%20*%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60bindValue%60%0A%20%20%20%20%20%20%20*%20property%2C%20or%20the%20value%20property%20of%20your%20input%20that%20is%20%60notify%3Atrue%60.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20value%3A%20%7B%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20disable%20this%20input.%20If%20you're%20using%20PaperInputBehavior%20to%0A%20%20%20%20%20%20%20*%20implement%20your%20own%20paper-input-like%20element%2C%20bind%20this%20to%0A%20%20%20%20%20%20%20*%20both%20the%20%60%3Cpaper-input-container%3E%60's%20and%20the%20input's%20%60disabled%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20disabled%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Returns%20true%20if%20the%20value%20is%20invalid.%20If%20you're%20using%20PaperInputBehavior%20to%0A%20%20%20%20%20%20%20*%20implement%20your%20own%20paper-input-like%20element%2C%20bind%20this%20to%20both%20the%0A%20%20%20%20%20%20%20*%20%60%3Cpaper-input-container%3E%60's%20and%20the%20input's%20%60invalid%60%20property.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20If%20%60autoValidate%60%20is%20true%2C%20the%20%60invalid%60%20attribute%20is%20managed%20automatically%2C%0A%20%20%20%20%20%20%20*%20which%20can%20clobber%20attempts%20to%20manage%20it%20manually.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20invalid%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20prevent%20the%20user%20from%20entering%20invalid%20input.%20If%20you're%0A%20%20%20%20%20%20%20*%20using%20PaperInputBehavior%20to%20%20implement%20your%20own%20paper-input-like%20element%2C%0A%20%20%20%20%20%20%20*%20bind%20this%20to%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60preventInvalidInput%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20preventInvalidInput%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20this%20to%20specify%20the%20pattern%20allowed%20by%20%60preventInvalidInput%60.%20If%0A%20%20%20%20%20%20%20*%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60allowedPattern%60%0A%20%20%20%20%20%20%20*%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20allowedPattern%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20type%20of%20the%20input.%20The%20supported%20types%20are%20%60text%60%2C%20%60number%60%20and%20%60password%60.%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%20element%2C%0A%20%20%20%20%20%20%20*%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60type%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20type%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20datalist%20of%20the%20input%20(if%20any).%20This%20should%20match%20the%20id%20of%20an%20existing%20%60%3Cdatalist%3E%60.%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60list%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20list%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20A%20pattern%20to%20validate%20the%20%60input%60%20with.%20If%20you're%20using%20PaperInputBehavior%20to%0A%20%20%20%20%20%20%20*%20implement%20your%20own%20paper-input-like%20element%2C%20bind%20this%20to%0A%20%20%20%20%20%20%20*%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60pattern%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20pattern%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20mark%20the%20input%20as%20required.%20If%20you're%20using%20PaperInputBehavior%20to%0A%20%20%20%20%20%20%20*%20implement%20your%20own%20paper-input-like%20element%2C%20bind%20this%20to%0A%20%20%20%20%20%20%20*%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60required%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20required%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20error%20message%20to%20display%20when%20the%20input%20is%20invalid.%20If%20you're%20using%0A%20%20%20%20%20%20%20*%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%20element%2C%0A%20%20%20%20%20%20%20*%20bind%20this%20to%20the%20%60%3Cpaper-input-error%3E%60's%20content%2C%20if%20using.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20errorMessage%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20show%20a%20character%20counter.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20charCounter%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20disable%20the%20floating%20label.%20If%20you're%20using%20PaperInputBehavior%20to%0A%20%20%20%20%20%20%20*%20implement%20your%20own%20paper-input-like%20element%2C%20bind%20this%20to%0A%20%20%20%20%20%20%20*%20the%20%60%3Cpaper-input-container%3E%60's%20%60noLabelFloat%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20noLabelFloat%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20always%20float%20the%20label.%20If%20you're%20using%20PaperInputBehavior%20to%0A%20%20%20%20%20%20%20*%20implement%20your%20own%20paper-input-like%20element%2C%20bind%20this%20to%0A%20%20%20%20%20%20%20*%20the%20%60%3Cpaper-input-container%3E%60's%20%60alwaysFloatLabel%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20alwaysFloatLabel%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20auto-validate%20the%20input%20value.%20If%20you're%20using%20PaperInputBehavior%20to%0A%20%20%20%20%20%20%20*%20implement%20your%20own%20paper-input-like%20element%2C%20bind%20this%20to%0A%20%20%20%20%20%20%20*%20the%20%60%3Cpaper-input-container%3E%60's%20%60autoValidate%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20autoValidate%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Name%20of%20the%20validator%20to%20use.%20If%20you're%20using%20PaperInputBehavior%20to%0A%20%20%20%20%20%20%20*%20implement%20your%20own%20paper-input-like%20element%2C%20bind%20this%20to%0A%20%20%20%20%20%20%20*%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60validator%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20validator%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F%2F%20HTMLInputElement%20attributes%20for%20binding%20if%20needed%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60autocomplete%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20autocomplete%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'off'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60autofocus%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20autofocus%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60inputmode%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20inputmode%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20minimum%20length%20of%20the%20input%20value.%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60minlength%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20minlength%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20maximum%20length%20of%20the%20input%20value.%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60maxlength%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20maxlength%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20minimum%20(numeric%20or%20date-time)%20input%20value.%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60min%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20min%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20maximum%20(numeric%20or%20date-time)%20input%20value.%0A%20%20%20%20%20%20%20*%20Can%20be%20a%20String%20(e.g.%20%60%222000-1-1%22%60)%20or%20a%20Number%20(e.g.%20%602%60).%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60max%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20max%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Limits%20the%20numeric%20or%20date-time%20increments.%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60step%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20step%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60name%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20name%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20A%20placeholder%20string%20in%20addition%20to%20the%20label.%20If%20this%20is%20set%2C%20the%20label%20will%20always%20float.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20placeholder%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%2F%2F%20need%20to%20set%20a%20default%20so%20_computeAlwaysFloatLabel%20is%20run%0A%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60readonly%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20readonly%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60size%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20size%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F%2F%20Nonstandard%20attributes%20for%20binding%20if%20needed%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60autocapitalize%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20autocapitalize%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'none'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60autocorrect%60%20property.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20autocorrect%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'off'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60autosave%60%20property%2C%0A%20%20%20%20%20%20%20*%20used%20with%20type%3Dsearch.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20autosave%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60results%60%20property%2C%0A%20%20%20%20%20%20%20*%20used%20with%20type%3Dsearch.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20results%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%20%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60accept%60%20property%2C%0A%20%20%20%20%20%20%20*%20used%20with%20type%3Dfile.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20accept%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20you're%20using%20PaperInputBehavior%20to%20implement%20your%20own%20paper-input-like%0A%20%20%20%20%20%20%20*%20element%2C%20bind%20this%20to%20the%60%3Cinput%20is%3D%22iron-input%22%3E%60's%20%60multiple%60%20property%2C%0A%20%20%20%20%20%20%20*%20used%20with%20type%3Dfile.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20multiple%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_ariaDescribedBy%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_ariaLabelledBy%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'addon-attached'%3A%20'_onAddonAttached'%2C%0A%20%20%20%20%20%20'focus'%3A%20'_onFocus'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_focusedControlStateChanged(focused)'%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20keyBindings%3A%20%7B%0A%20%20%20%20%20%20'shift%2Btab%3Akeydown'%3A%20'_onShiftTabDown'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20tabindex%3A%200%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20a%20reference%20to%20the%20input%20element.%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%20inputElement()%20%7B%0A%20%20%20%20%20%20return%20this.%24.input%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20a%20reference%20to%20the%20focusable%20element.%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%20_focusableElement()%20%7B%0A%20%20%20%20%20%20return%20this.inputElement%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20registered%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20These%20types%20have%20some%20default%20placeholder%20text%3B%20overlapping%0A%20%20%20%20%20%20%2F%2F%20the%20label%20on%20top%20of%20it%20looks%20terrible.%20Auto-float%20the%20label%20in%20this%20case.%0A%20%20%20%20%20%20this._typesThatHaveText%20%3D%20%5B%22date%22%2C%20%22datetime%22%2C%20%22datetime-local%22%2C%20%22month%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22time%22%2C%20%22week%22%2C%20%22file%22%5D%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20this._updateAriaLabelledBy()%3B%0A%0A%20%20%20%20%20%20if%20(this.inputElement%20%26%26%0A%20%20%20%20%20%20%20%20%20%20this._typesThatHaveText.indexOf(this.inputElement.type)%20!%3D%3D%20-1)%20%7B%0A%20%20%20%20%20%20%20%20this.alwaysFloatLabel%20%3D%20true%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_appendStringWithSpace%3A%20function(str%2C%20more)%20%7B%0A%20%20%20%20%20%20if%20(str)%20%7B%0A%20%20%20%20%20%20%20%20str%20%3D%20str%20%2B%20'%20'%20%2B%20more%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20str%20%3D%20more%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20str%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onAddonAttached%3A%20function(event)%20%7B%0A%20%20%20%20%20%20var%20target%20%3D%20event.path%20%3F%20event.path%5B0%5D%20%3A%20event.target%3B%0A%20%20%20%20%20%20if%20(target.id)%20%7B%0A%20%20%20%20%20%20%20%20this._ariaDescribedBy%20%3D%20this._appendStringWithSpace(this._ariaDescribedBy%2C%20target.id)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20var%20id%20%3D%20'paper-input-add-on-'%20%2B%20Math.floor((Math.random()%20*%20100000))%3B%0A%20%20%20%20%20%20%20%20target.id%20%3D%20id%3B%0A%20%20%20%20%20%20%20%20this._ariaDescribedBy%20%3D%20this._appendStringWithSpace(this._ariaDescribedBy%2C%20id)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Validates%20the%20input%20element%20and%20sets%20an%20error%20style%20if%20needed.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%0A%20%20%20%20%20*%2F%0A%20%20%20%20validate%3A%20function()%20%7B%0A%20%20%20%20%20%20return%20this.inputElement.validate()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Forward%20focus%20to%20inputElement%0A%20%20%20%20%20*%2F%0A%20%20%20%20_onFocus%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(!this._shiftTabPressed)%20%7B%0A%20%20%20%20%20%20%20%20this._focusableElement.focus()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Handler%20that%20is%20called%20when%20a%20shift%2Btab%20keypress%20is%20detected%20by%20the%20menu.%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40param%20%7BCustomEvent%7D%20event%20A%20key%20combination%20event.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_onShiftTabDown%3A%20function(event)%20%7B%0A%20%20%20%20%20%20var%20oldTabIndex%20%3D%20this.getAttribute('tabindex')%3B%0A%20%20%20%20%20%20this._shiftTabPressed%20%3D%20true%3B%0A%20%20%20%20%20%20this.setAttribute('tabindex'%2C%20'-1')%3B%0A%20%20%20%20%20%20this.async(function()%20%7B%0A%20%20%20%20%20%20%20%20this.setAttribute('tabindex'%2C%20oldTabIndex)%3B%0A%20%20%20%20%20%20%20%20this._shiftTabPressed%20%3D%20false%3B%0A%20%20%20%20%20%20%7D%2C%201)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20If%20%60autoValidate%60%20is%20true%2C%20then%20validates%20the%20element.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_handleAutoValidate%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.autoValidate)%0A%20%20%20%20%20%20%20%20this.validate()%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Restores%20the%20cursor%20to%20its%20original%20position%20after%20updating%20the%20value.%0A%20%20%20%20%20*%20%40param%20%7Bstring%7D%20newValue%20The%20value%20that%20should%20be%20saved.%0A%20%20%20%20%20*%2F%0A%20%20%20%20updateValueAndPreserveCaret%3A%20function(newValue)%20%7B%0A%20%20%20%20%20%20%2F%2F%20Not%20all%20elements%20might%20have%20selection%2C%20and%20even%20if%20they%20have%20the%0A%20%20%20%20%20%20%2F%2F%20right%20properties%2C%20accessing%20them%20might%20throw%20an%20exception%20(like%20for%0A%20%20%20%20%20%20%2F%2F%20%3Cinput%20type%3Dnumber%3E)%0A%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20var%20start%20%3D%20this.inputElement.selectionStart%3B%0A%20%20%20%20%20%20%20%20this.value%20%3D%20newValue%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20The%20cursor%20automatically%20jumps%20to%20the%20end%20after%20re-setting%20the%20value%2C%0A%20%20%20%20%20%20%20%20%2F%2F%20so%20restore%20it%20to%20its%20original%20position.%0A%20%20%20%20%20%20%20%20this.inputElement.selectionStart%20%3D%20start%3B%0A%20%20%20%20%20%20%20%20this.inputElement.selectionEnd%20%3D%20start%3B%0A%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20Just%20set%20the%20value%20and%20give%20up%20on%20the%20caret.%0A%20%20%20%20%20%20%20%20this.value%20%3D%20newValue%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_computeAlwaysFloatLabel%3A%20function(alwaysFloatLabel%2C%20placeholder)%20%7B%0A%20%20%20%20%20%20return%20placeholder%20%7C%7C%20alwaysFloatLabel%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_focusedControlStateChanged%3A%20function(focused)%20%7B%0A%20%20%20%20%20%20%2F%2F%20IronControlState%20stops%20the%20focus%20and%20blur%20events%20in%20order%20to%20redispatch%20them%20on%20the%20host%0A%20%20%20%20%20%20%2F%2F%20element%2C%20but%20paper-input-container%20listens%20to%20those%20events.%20Since%20there%20are%20more%0A%20%20%20%20%20%20%2F%2F%20pending%20work%20on%20focus%2Fblur%20in%20IronControlState%2C%20I'm%20putting%20in%20this%20hack%20to%20get%20the%0A%20%20%20%20%20%20%2F%2F%20input%20focus%20state%20working%20for%20now.%0A%20%20%20%20%20%20if%20(!this.%24.container)%20%7B%0A%20%20%20%20%20%20%20%20this.%24.container%20%3D%20Polymer.dom(this.root).querySelector('paper-input-container')%3B%0A%20%20%20%20%20%20%20%20if%20(!this.%24.container)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(focused)%20%7B%0A%20%20%20%20%20%20%20%20this.%24.container._onFocus()%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.%24.container._onBlur()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_updateAriaLabelledBy%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20label%20%3D%20Polymer.dom(this.root).querySelector('label')%3B%0A%20%20%20%20%20%20if%20(!label)%20%7B%0A%20%20%20%20%20%20%20%20this._ariaLabelledBy%20%3D%20''%3B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20labelledBy%3B%0A%20%20%20%20%20%20if%20(label.id)%20%7B%0A%20%20%20%20%20%20%20%20labelledBy%20%3D%20label.id%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20labelledBy%20%3D%20'paper-input-label-'%20%2B%20new%20Date().getUTCMilliseconds()%3B%0A%20%20%20%20%20%20%20%20label.id%20%3D%20labelledBy%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._ariaLabelledBy%20%3D%20labelledBy%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onChange%3Afunction(event)%20%7B%0A%20%20%20%20%20%20%2F%2F%20In%20the%20Shadow%20DOM%2C%20the%20%60change%60%20event%20is%20not%20leaked%20into%20the%0A%20%20%20%20%20%20%2F%2F%20ancestor%20tree%2C%20so%20we%20must%20do%20this%20manually.%0A%20%20%20%20%20%20%2F%2F%20See%20https%3A%2F%2Fw3c.github.io%2Fwebcomponents%2Fspec%2Fshadow%2F%23events-that-are-not-leaked-into-ancestor-trees.%0A%20%20%20%20%20%20if%20(this.shadowRoot)%20%7B%0A%20%20%20%20%20%20%20%20this.fire(event.type%2C%20%7BsourceEvent%3A%20event%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20node%3A%20this%2C%0A%20%20%20%20%20%20%20%20%20%20bubbles%3A%20event.bubbles%2C%0A%20%20%20%20%20%20%20%20%20%20cancelable%3A%20event.cancelable%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20*%2F%0A%20%20Polymer.PaperInputBehavior%20%3D%20%5B%0A%20%20%20%20Polymer.IronControlState%2C%0A%20%20%20%20Polymer.IronA11yKeysBehavior%2C%0A%20%20%20%20Polymer.PaperInputBehaviorImpl%0A%20%20%5D%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-54.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20Use%20%60Polymer.PaperInputAddonBehavior%60%20to%20implement%20an%20add-on%20for%20%60%3Cpaper-input-container%3E%60.%20A%0A%20%20%20*%20add-on%20appears%20below%20the%20input%2C%20and%20may%20display%20information%20based%20on%20the%20input%20value%20and%0A%20%20%20*%20validity%20such%20as%20a%20character%20counter%20or%20an%20error%20message.%0A%20%20%20*%20%40polymerBehavior%0A%20%20%20*%2F%0A%20%20Polymer.PaperInputAddonBehavior%20%3D%20%7B%0A%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20'add-on'%3A%20''%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20this.fire('addon-attached')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20The%20function%20called%20by%20%60%3Cpaper-input-container%3E%60%20when%20the%20input%20value%20or%20validity%20changes.%0A%20%20%20%20%20*%20%40param%20%7B%7B%0A%20%20%20%20%20*%20%20%20inputElement%3A%20(Node%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20value%3A%20(string%7Cundefined)%2C%0A%20%20%20%20%20*%20%20%20invalid%3A%20(boolean%7Cundefined)%0A%20%20%20%20%20*%20%7D%7D%20state%20All%20properties%20are%20optional%20-%0A%20%20%20%20%20*%20%20%20%20%20inputElement%3A%20The%20input%20element.%0A%20%20%20%20%20*%20%20%20%20%20value%3A%20The%20input%20value.%0A%20%20%20%20%20*%20%20%20%20%20invalid%3A%20True%20if%20the%20input%20value%20is%20invalid.%0A%20%20%20%20%20*%2F%0A%20%20%20%20update%3A%20function(state)%20%7B%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-55.js%0A
0 ms
javascript;charset=utf-8,%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-input-char-counter'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.PaperInputAddonBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20_charCounterStr%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'0'%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20update%3A%20function(state)%20%7B%0A%20%20%20%20%20%20if%20(!state.inputElement)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20state.value%20%3D%20state.value%20%7C%7C%20''%3B%0A%0A%20%20%20%20%20%20%2F%2F%20Account%20for%20the%20textarea's%20new%20lines.%0A%20%20%20%20%20%20var%20str%20%3D%20state.value.replace(%2F(%5Cr%5Cn%7C%5Cn%7C%5Cr)%2Fg%2C%20'--').length%3B%0A%0A%20%20%20%20%20%20if%20(state.inputElement.hasAttribute('maxlength'))%20%7B%0A%20%20%20%20%20%20%20%20str%20%2B%3D%20'%2F'%20%2B%20state.inputElement.getAttribute('maxlength')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this._charCounterStr%20%3D%20str%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-56.js%0A
0 ms
javascript;charset=utf-8,%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-input-container'%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20disable%20the%20floating%20label.%20The%20label%20disappears%20when%20the%20input%20value%20is%0A%20%20%20%20%20%20%20*%20not%20null.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20noLabelFloat%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20always%20float%20the%20floating%20label.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20alwaysFloatLabel%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20attribute%20to%20listen%20for%20value%20changes%20on.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20attrForValue%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'bind-value'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20auto-validate%20the%20input%20value%20when%20it%20changes.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20autoValidate%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20True%20if%20the%20input%20is%20invalid.%20This%20property%20is%20set%20automatically%20when%20the%20input%20value%0A%20%20%20%20%20%20%20*%20changes%20if%20auto-validating%2C%20or%20when%20the%20%60iron-input-validate%60%20event%20is%20heard%20from%20a%20child.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20invalid%3A%20%7B%0A%20%20%20%20%20%20%20%20observer%3A%20'_invalidChanged'%2C%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20True%20if%20the%20input%20has%20focus.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20focused%3A%20%7B%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_addons%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Array%0A%20%20%20%20%20%20%20%20%2F%2F%20do%20not%20set%20a%20default%20value%20here%20intentionally%20-%20it%20will%20be%20initialized%20lazily%20when%20a%0A%20%20%20%20%20%20%20%20%2F%2F%20distributed%20child%20is%20attached%2C%20which%20may%20occur%20before%20configuration%20for%20this%20element%0A%20%20%20%20%20%20%20%20%2F%2F%20in%20polyfill.%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_inputHasContent%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_inputSelector%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'input%2Ctextarea%2C.paper-input-input'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_boundOnFocus%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Function%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._onFocus.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_boundOnBlur%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Function%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._onBlur.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_boundOnInput%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Function%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._onInput.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_boundValueChanged%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Function%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this._onValueChanged.bind(this)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'addon-attached'%3A%20'_onAddonAttached'%2C%0A%20%20%20%20%20%20'iron-input-validate'%3A%20'_onIronInputValidate'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_valueChangedEvent()%20%7B%0A%20%20%20%20%20%20return%20this.attrForValue%20%2B%20'-changed'%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_propertyForValue()%20%7B%0A%20%20%20%20%20%20return%20Polymer.CaseMap.dashToCamelCase(this.attrForValue)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_inputElement()%20%7B%0A%20%20%20%20%20%20return%20Polymer.dom(this).querySelector(this._inputSelector)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_inputElementValue()%20%7B%0A%20%20%20%20%20%20return%20this._inputElement%5Bthis._propertyForValue%5D%20%7C%7C%20this._inputElement.value%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(!this._addons)%20%7B%0A%20%20%20%20%20%20%20%20this._addons%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this.addEventListener('focus'%2C%20this._boundOnFocus%2C%20true)%3B%0A%20%20%20%20%20%20this.addEventListener('blur'%2C%20this._boundOnBlur%2C%20true)%3B%0A%20%20%20%20%20%20if%20(this.attrForValue)%20%7B%0A%20%20%20%20%20%20%20%20this._inputElement.addEventListener(this._valueChangedEvent%2C%20this._boundValueChanged)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.addEventListener('input'%2C%20this._onInput)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20Only%20validate%20when%20attached%20if%20the%20input%20already%20has%20a%20value.%0A%20%20%20%20%20%20if%20(this._inputElementValue%20!%3D%20'')%20%7B%0A%20%20%20%20%20%20%20%20this._handleValueAndAutoValidate(this._inputElement)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this._handleValue(this._inputElement)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onAddonAttached%3A%20function(event)%20%7B%0A%20%20%20%20%20%20if%20(!this._addons)%20%7B%0A%20%20%20%20%20%20%20%20this._addons%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20target%20%3D%20event.target%3B%0A%20%20%20%20%20%20if%20(this._addons.indexOf(target)%20%3D%3D%3D%20-1)%20%7B%0A%20%20%20%20%20%20%20%20this._addons.push(target)%3B%0A%20%20%20%20%20%20%20%20if%20(this.isAttached)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._handleValue(this._inputElement)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onFocus%3A%20function()%20%7B%0A%20%20%20%20%20%20this._setFocused(true)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onBlur%3A%20function()%20%7B%0A%20%20%20%20%20%20this._setFocused(false)%3B%0A%20%20%20%20%20%20this._handleValueAndAutoValidate(this._inputElement)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onInput%3A%20function(event)%20%7B%0A%20%20%20%20%20%20this._handleValueAndAutoValidate(event.target)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onValueChanged%3A%20function(event)%20%7B%0A%20%20%20%20%20%20this._handleValueAndAutoValidate(event.target)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_handleValue%3A%20function(inputElement)%20%7B%0A%20%20%20%20%20%20var%20value%20%3D%20this._inputElementValue%3B%0A%0A%20%20%20%20%20%20%2F%2F%20type%3D%22number%22%20hack%20needed%20because%20this.value%20is%20empty%20until%20it's%20valid%0A%20%20%20%20%20%20if%20(value%20%7C%7C%20value%20%3D%3D%3D%200%20%7C%7C%20(inputElement.type%20%3D%3D%3D%20'number'%20%26%26%20!inputElement.checkValidity()))%20%7B%0A%20%20%20%20%20%20%20%20this._inputHasContent%20%3D%20true%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this._inputHasContent%20%3D%20false%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this.updateAddons(%7B%0A%20%20%20%20%20%20%20%20inputElement%3A%20inputElement%2C%0A%20%20%20%20%20%20%20%20value%3A%20value%2C%0A%20%20%20%20%20%20%20%20invalid%3A%20this.invalid%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_handleValueAndAutoValidate%3A%20function(inputElement)%20%7B%0A%20%20%20%20%20%20if%20(this.autoValidate)%20%7B%0A%20%20%20%20%20%20%20%20var%20valid%3B%0A%20%20%20%20%20%20%20%20if%20(inputElement.validate)%20%7B%0A%20%20%20%20%20%20%20%20%20%20valid%20%3D%20inputElement.validate(this._inputElementValue)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20valid%20%3D%20inputElement.checkValidity()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20this.invalid%20%3D%20!valid%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20Call%20this%20last%20to%20notify%20the%20add-ons.%0A%20%20%20%20%20%20this._handleValue(inputElement)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onIronInputValidate%3A%20function(event)%20%7B%0A%20%20%20%20%20%20this.invalid%20%3D%20this._inputElement.invalid%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_invalidChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this._addons)%20%7B%0A%20%20%20%20%20%20%20%20this.updateAddons(%7Binvalid%3A%20this.invalid%7D)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Call%20this%20to%20update%20the%20state%20of%20add-ons.%0A%20%20%20%20%20*%20%40param%20%7BObject%7D%20state%20Add-on%20state.%0A%20%20%20%20%20*%2F%0A%20%20%20%20updateAddons%3A%20function(state)%20%7B%0A%20%20%20%20%20%20for%20(var%20addon%2C%20index%20%3D%200%3B%20addon%20%3D%20this._addons%5Bindex%5D%3B%20index%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20addon.update(state)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_computeInputContentClass%3A%20function(noLabelFloat%2C%20alwaysFloatLabel%2C%20focused%2C%20invalid%2C%20_inputHasContent)%20%7B%0A%20%20%20%20%20%20var%20cls%20%3D%20'input-content'%3B%0A%20%20%20%20%20%20if%20(!noLabelFloat)%20%7B%0A%20%20%20%20%20%20%20%20var%20label%20%3D%20this.querySelector('label')%3B%0A%0A%20%20%20%20%20%20%20%20if%20(alwaysFloatLabel%20%7C%7C%20_inputHasContent)%20%7B%0A%20%20%20%20%20%20%20%20%20%20cls%20%2B%3D%20'%20label-is-floating'%3B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20the%20label%20is%20floating%2C%20ignore%20any%20offsets%20that%20may%20have%20been%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20applied%20from%20a%20prefix%20element.%0A%20%20%20%20%20%20%20%20%20%20this.%24.labelAndInputContainer.style.position%20%3D%20'static'%3B%0A%0A%20%20%20%20%20%20%20%20%20%20if%20(invalid)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20cls%20%2B%3D%20'%20is-invalid'%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(focused)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20cls%20%2B%3D%20%22%20label-is-highlighted%22%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20When%20the%20label%20is%20not%20floating%2C%20it%20should%20overlap%20the%20input%20element.%0A%20%20%20%20%20%20%20%20%20%20if%20(label)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.%24.labelAndInputContainer.style.position%20%3D%20'relative'%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20if%20(_inputHasContent)%20%7B%0A%20%20%20%20%20%20%20%20%20%20cls%20%2B%3D%20'%20label-is-hidden'%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20cls%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_computeUnderlineClass%3A%20function(focused%2C%20invalid)%20%7B%0A%20%20%20%20%20%20var%20cls%20%3D%20'underline'%3B%0A%20%20%20%20%20%20if%20(invalid)%20%7B%0A%20%20%20%20%20%20%20%20cls%20%2B%3D%20'%20is-invalid'%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(focused)%20%7B%0A%20%20%20%20%20%20%20%20cls%20%2B%3D%20'%20is-highlighted'%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20cls%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_computeAddOnContentClass%3A%20function(focused%2C%20invalid)%20%7B%0A%20%20%20%20%20%20var%20cls%20%3D%20'add-on-content'%3B%0A%20%20%20%20%20%20if%20(invalid)%20%7B%0A%20%20%20%20%20%20%20%20cls%20%2B%3D%20'%20is-invalid'%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(focused)%20%7B%0A%20%20%20%20%20%20%20%20cls%20%2B%3D%20'%20is-highlighted'%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20cls%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-57.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-input-error'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.PaperInputAddonBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20True%20if%20the%20error%20is%20showing.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20invalid%3A%20%7B%0A%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20update%3A%20function(state)%20%7B%0A%20%20%20%20%20%20this._setInvalid(state.invalid)%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-58.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-input'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.IronFormElementBehavior%2C%0A%20%20%20%20%20%20Polymer.PaperInputBehavior%0A%20%20%20%20%5D%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-59.js%0A
0 ms
javascript;charset=utf-8,%0A%20%20%20%20(function()%20%7B%0A%20%20%20%20%20%20'use%20strict'%3B%0A%0A%20%20%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20%20%20is%3A%20'paper-dropdown-menu'%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20when%20the%20dropdown%20opens.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20paper-dropdown-open%0A%20%20%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20when%20the%20dropdown%20closes.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20paper-dropdown-close%0A%20%20%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronButtonState%2C%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronControlState%2C%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronFormElementBehavior%2C%0A%20%20%20%20%20%20%20%20%20%20Polymer.IronValidatableBehavior%0A%20%20%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20derived%20%22label%22%20of%20the%20currently%20selected%20item.%20This%20value%0A%20%20%20%20%20%20%20%20%20%20%20*%20is%20the%20%60label%60%20property%20on%20the%20selected%20item%20if%20set%2C%20or%20else%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20trimmed%20text%20content%20of%20the%20selected%20item.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20selectedItemLabel%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20last%20selected%20item.%20An%20item%20is%20selected%20if%20the%20dropdown%20menu%20has%0A%20%20%20%20%20%20%20%20%20%20%20*%20a%20child%20with%20class%20%60dropdown-content%60%2C%20and%20that%20child%20triggers%20an%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60iron-select%60%20event%20with%20the%20selected%20%60item%60%20in%20the%20%60detail%60.%0A%20%20%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20%20%20*%20%40type%20%7B%3FObject%7D%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20selectedItem%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Object%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20value%20for%20this%20element%20that%20will%20be%20used%20when%20submitting%20in%0A%20%20%20%20%20%20%20%20%20%20%20*%20a%20form.%20It%20is%20read%20only%2C%20and%20will%20always%20have%20the%20same%20value%0A%20%20%20%20%20%20%20%20%20%20%20*%20as%20%60selectedItemLabel%60.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20value%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20label%20for%20the%20dropdown.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20label%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20placeholder%20for%20the%20dropdown.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20placeholder%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20True%20if%20the%20dropdown%20is%20open.%20Otherwise%2C%20false.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20opened%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20observer%3A%20'_openedChanged'%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20disable%20the%20floating%20label.%20Bind%20this%20to%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60%3Cpaper-input-container%3E%60's%20%60noLabelFloat%60%20property.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20noLabelFloat%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20always%20float%20the%20label.%20Bind%20this%20to%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20%60%3Cpaper-input-container%3E%60's%20%60alwaysFloatLabel%60%20property.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20alwaysFloatLabel%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20disable%20animations%20when%20opening%20and%20closing%20the%0A%20%20%20%20%20%20%20%20%20%20%20*%20dropdown.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20noAnimations%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20orientation%20against%20which%20to%20align%20the%20menu%20dropdown%0A%20%20%20%20%20%20%20%20%20%20%20*%20horizontally%20relative%20to%20the%20dropdown%20trigger.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20horizontalAlign%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20'right'%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20%20%20*%20The%20orientation%20against%20which%20to%20align%20the%20menu%20dropdown%0A%20%20%20%20%20%20%20%20%20%20%20*%20vertically%20relative%20to%20the%20dropdown%20trigger.%0A%20%20%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20%20%20verticalAlign%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20'top'%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20'tap'%3A%20'_onTap'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20keyBindings%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20'up%20down'%3A%20'open'%2C%0A%20%20%20%20%20%20%20%20%20%20'esc'%3A%20'close'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20role%3A%20'combobox'%2C%0A%20%20%20%20%20%20%20%20%20%20'aria-autocomplete'%3A%20'none'%2C%0A%20%20%20%20%20%20%20%20%20%20'aria-haspopup'%3A%20'true'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20'_selectedItemChanged(selectedItem)'%0A%20%20%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20%20%20attached%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20NOTE(cdata)%3A%20Due%20to%20timing%2C%20a%20preselected%20value%20in%20a%20%60IronSelectable%60%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20child%20will%20cause%20an%20%60iron-select%60%20event%20to%20fire%20while%20the%20element%20is%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20still%20in%20a%20%60DocumentFragment%60.%20This%20has%20the%20effect%20of%20causing%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20handlers%20not%20to%20fire.%20So%2C%20we%20double%20check%20this%20value%20on%20attached%3A%0A%20%20%20%20%20%20%20%20%20%20var%20contentElement%20%3D%20this.contentElement%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(contentElement%20%26%26%20contentElement.selectedItem)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._setSelectedItem(contentElement.selectedItem)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20content%20element%20that%20is%20contained%20by%20the%20dropdown%20menu%2C%20if%20any.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20get%20contentElement()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20Polymer.dom(this.%24.content).getDistributedNodes()%5B0%5D%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Show%20the%20dropdown%20content.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20open%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.%24.menuButton.open()%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Hide%20the%20dropdown%20content.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20close%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.%24.menuButton.close()%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20A%20handler%20that%20is%20called%20when%20%60iron-select%60%20is%20fired.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7BCustomEvent%7D%20event%20An%20%60iron-select%60%20event.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_onIronSelect%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._setSelectedItem(event.detail.item)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20A%20handler%20that%20is%20called%20when%20%60iron-deselect%60%20is%20fired.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7BCustomEvent%7D%20event%20An%20%60iron-deselect%60%20event.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_onIronDeselect%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._setSelectedItem(null)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20A%20handler%20that%20is%20called%20when%20the%20dropdown%20is%20tapped.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7BCustomEvent%7D%20event%20A%20tap%20event.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_onTap%3A%20function(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(Polymer.Gestures.findOriginalTarget(event)%20%3D%3D%3D%20this)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this.open()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Compute%20the%20label%20for%20the%20dropdown%20given%20a%20selected%20item.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7BElement%7D%20selectedItem%20A%20selected%20Element%20item%2C%20with%20an%0A%20%20%20%20%20%20%20%20%20*%20optional%20%60label%60%20property.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_selectedItemChanged%3A%20function(selectedItem)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20value%20%3D%20''%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(!selectedItem)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20value%20%3D%20''%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20value%20%3D%20selectedItem.label%20%7C%7C%20selectedItem.textContent.trim()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20this._setValue(value)%3B%0A%20%20%20%20%20%20%20%20%20%20this._setSelectedItemLabel(value)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Compute%20the%20vertical%20offset%20of%20the%20menu%20based%20on%20the%20value%20of%0A%20%20%20%20%20%20%20%20%20*%20%60noLabelFloat%60.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7Bboolean%7D%20noLabelFloat%20True%20if%20the%20label%20should%20not%20float%0A%20%20%20%20%20%20%20%20%20*%20above%20the%20input%2C%20otherwise%20false.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_computeMenuVerticalOffset%3A%20function(noLabelFloat)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20NOTE(cdata)%3A%20These%20numbers%20are%20somewhat%20magical%20because%20they%20are%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20derived%20from%20the%20metrics%20of%20elements%20internal%20to%20%60paper-input%60's%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20template.%20The%20metrics%20will%20change%20depending%20on%20whether%20or%20not%20the%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20input%20has%20a%20floating%20label.%0A%20%20%20%20%20%20%20%20%20%20return%20noLabelFloat%20%3F%20-4%20%3A%208%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Returns%20false%20if%20the%20element%20is%20required%20and%20does%20not%20have%20a%20selection%2C%0A%20%20%20%20%20%20%20%20%20*%20and%20true%20otherwise.%0A%20%20%20%20%20%20%20%20%20*%20%40param%20%7B*%3D%7D%20_value%20Ignored.%0A%20%20%20%20%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20true%20if%20%60required%60%20is%20false%2C%20or%20if%20%60required%60%20is%20true%0A%20%20%20%20%20%20%20%20%20*%20and%20the%20element%20has%20a%20valid%20selection.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20_getValidity%3A%20function(_value)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.disabled%20%7C%7C%20!this.required%20%7C%7C%20(this.required%20%26%26%20!!this.value)%3B%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20_openedChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20openState%20%3D%20this.opened%20%3F%20'true'%20%3A%20'false'%3B%0A%20%20%20%20%20%20%20%20%20%20var%20e%20%3D%20this.contentElement%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20e.setAttribute('aria-expanded'%2C%20openState)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D)()%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-60.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'iron-autogrow-textarea'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.IronFormElementBehavior%2C%0A%20%20%20%20%20%20Polymer.IronValidatableBehavior%2C%0A%20%20%20%20%20%20Polymer.IronControlState%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Use%20this%20property%20instead%20of%20%60value%60%20for%20two-way%20data%20binding.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40type%20%7Bstring%7Cnumber%7Cundefined%7Cnull%7D%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20bindValue%3A%20%7B%0A%20%20%20%20%20%20%20%20observer%3A%20'_bindValueChanged'%2C%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20initial%20number%20of%20rows.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40attribute%20rows%0A%20%20%20%20%20%20%20*%20%40type%20number%0A%20%20%20%20%20%20%20*%20%40default%201%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20rows%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20value%3A%201%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_updateCached'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20maximum%20number%20of%20rows%20this%20element%20can%20grow%20to%20until%20it%0A%20%20%20%20%20%20%20*%20scrolls.%200%20means%20no%20maximum.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40attribute%20maxRows%0A%20%20%20%20%20%20%20*%20%40type%20number%0A%20%20%20%20%20%20%20*%20%40default%200%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20maxRows%3A%20%7B%0A%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20value%3A%200%2C%0A%20%20%20%20%20%20%20observer%3A%20'_updateCached'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Bound%20to%20the%20textarea's%20%60autocomplete%60%20attribute.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20autocomplete%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'off'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Bound%20to%20the%20textarea's%20%60autofocus%60%20attribute.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20autofocus%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Bound%20to%20the%20textarea's%20%60inputmode%60%20attribute.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20inputmode%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Bound%20to%20the%20textarea's%20%60name%60%20attribute.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20name%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20value%20for%20this%20input%2C%20same%20as%20%60bindValue%60%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20value%3A%20%7B%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20computed%3A%20'_computeValue(bindValue)'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Bound%20to%20the%20textarea's%20%60placeholder%60%20attribute.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20placeholder%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Bound%20to%20the%20textarea's%20%60readonly%60%20attribute.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20readonly%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Set%20to%20true%20to%20mark%20the%20textarea%20as%20required.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20required%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20maximum%20length%20of%20the%20input%20value.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20maxlength%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'input'%3A%20'_onInput'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20the%20underlying%20textarea.%0A%20%20%20%20%20*%20%40type%20HTMLTextAreaElement%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%20textarea()%20%7B%0A%20%20%20%20%20%20return%20this.%24.textarea%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20textarea's%20selection%20start.%0A%20%20%20%20%20*%20%40type%20Number%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%20selectionStart()%20%7B%0A%20%20%20%20%20%20return%20this.%24.textarea.selectionStart%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20textarea's%20selection%20end.%0A%20%20%20%20%20*%20%40type%20Number%0A%20%20%20%20%20*%2F%0A%20%20%20%20get%20selectionEnd()%20%7B%0A%20%20%20%20%20%20return%20this.%24.textarea.selectionEnd%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Sets%20the%20textarea's%20selection%20start.%0A%20%20%20%20%20*%2F%0A%20%20%20%20set%20selectionStart(value)%20%7B%0A%20%20%20%20%20%20this.%24.textarea.selectionStart%20%3D%20value%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Sets%20the%20textarea's%20selection%20end.%0A%20%20%20%20%20*%2F%0A%20%20%20%20set%20selectionEnd(value)%20%7B%0A%20%20%20%20%20%20this.%24.textarea.selectionEnd%20%3D%20value%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20true%20if%20%60value%60%20is%20valid.%20The%20validator%20provided%20in%20%60validator%60%0A%20%20%20%20%20*%20will%20be%20used%20first%2C%20if%20it%20exists%3B%20otherwise%2C%20the%20%60textarea%60's%20validity%0A%20%20%20%20%20*%20is%20used.%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20True%20if%20the%20value%20is%20valid.%0A%20%20%20%20%20*%2F%0A%20%20%20%20validate%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20Empty%2C%20non-required%20input%20is%20valid.%0A%20%20%20%20%20%20if%20(!this.required%20%26%26%20this.value%20%3D%3D%20'')%20%7B%0A%20%20%20%20%20%20%20%20this.invalid%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20var%20valid%3B%0A%20%20%20%20%20%20if%20(this.hasValidator())%20%7B%0A%20%20%20%20%20%20%20%20valid%20%3D%20Polymer.IronValidatableBehavior.validate.call(this%2C%20this.value)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20valid%20%3D%20this.%24.textarea.validity.valid%3B%0A%20%20%20%20%20%20%20%20this.invalid%20%3D%20!valid%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this.fire('iron-input-validate')%3B%0A%20%20%20%20%20%20return%20valid%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_bindValueChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20textarea%20%3D%20this.textarea%3B%0A%20%20%20%20%20%20if%20(!textarea)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20If%20the%20bindValue%20changed%20manually%2C%20then%20we%20need%20to%20also%20update%0A%20%20%20%20%20%20%2F%2F%20the%20underlying%20textarea's%20value.%20Otherwise%20this%20change%20was%20probably%0A%20%20%20%20%20%20%2F%2F%20generated%20from%20the%20_onInput%20handler%2C%20and%20the%20two%20values%20are%20already%0A%20%20%20%20%20%20%2F%2F%20the%20same.%0A%20%20%20%20%20%20if%20(textarea.value%20!%3D%3D%20this.bindValue)%20%7B%0A%20%20%20%20%20%20%20%20textarea.value%20%3D%20!(this.bindValue%20%7C%7C%20this.bindValue%20%3D%3D%3D%200)%20%3F%20''%20%3A%20this.bindValue%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20this.%24.mirror.innerHTML%20%3D%20this._valueForMirror()%3B%0A%20%20%20%20%20%20%2F%2F%20manually%20notify%20because%20we%20don't%20want%20to%20notify%20until%20after%20setting%20value%0A%20%20%20%20%20%20this.fire('bind-value-changed'%2C%20%7Bvalue%3A%20this.bindValue%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onInput%3A%20function(event)%20%7B%0A%20%20%20%20%20%20this.bindValue%20%3D%20event.path%20%3F%20event.path%5B0%5D.value%20%3A%20event.target.value%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_constrain%3A%20function(tokens)%20%7B%0A%20%20%20%20%20%20var%20_tokens%3B%0A%20%20%20%20%20%20tokens%20%3D%20tokens%20%7C%7C%20%5B''%5D%3B%0A%20%20%20%20%20%20%2F%2F%20Enforce%20the%20min%20and%20max%20heights%20for%20a%20multiline%20input%20to%20avoid%20measurement%0A%20%20%20%20%20%20if%20(this.maxRows%20%3E%200%20%26%26%20tokens.length%20%3E%20this.maxRows)%20%7B%0A%20%20%20%20%20%20%20%20_tokens%20%3D%20tokens.slice(0%2C%20this.maxRows)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20_tokens%20%3D%20tokens.slice(0)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20while%20(this.rows%20%3E%200%20%26%26%20_tokens.length%20%3C%20this.rows)%20%7B%0A%20%20%20%20%20%20%20%20_tokens.push('')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%2F%2F%20Use%20%26%23160%3B%20instead%20%26nbsp%3B%20of%20to%20allow%20this%20element%20to%20be%20used%20in%20XHTML.%0A%20%20%20%20%20%20return%20_tokens.join('%3Cbr%2F%3E')%20%2B%20'%26%23160%3B'%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_valueForMirror%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20input%20%3D%20this.textarea%3B%0A%20%20%20%20%20%20if%20(!input)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20this.tokens%20%3D%20(input%20%26%26%20input.value)%20%3F%20input.value.replace(%2F%26%2Fgm%2C%20'%26amp%3B').replace(%2F%22%2Fgm%2C%20'%26quot%3B').replace(%2F'%2Fgm%2C%20'%26%2339%3B').replace(%2F%3C%2Fgm%2C%20'%26lt%3B').replace(%2F%3E%2Fgm%2C%20'%26gt%3B').split('%5Cn')%20%3A%20%5B''%5D%3B%0A%20%20%20%20%20%20return%20this._constrain(this.tokens)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_updateCached%3A%20function()%20%7B%0A%20%20%20%20%20%20this.%24.mirror.innerHTML%20%3D%20this._constrain(this.tokens)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_computeValue%3A%20function()%20%7B%0A%20%20%20%20%20%20return%20this.bindValue%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-61.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-textarea'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.PaperInputBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20_ariaLabelledBy%3A%20%7B%0A%20%20%20%20%20%20%20%20observer%3A%20'_ariaLabelledByChanged'%2C%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_ariaDescribedBy%3A%20%7B%0A%20%20%20%20%20%20%20%20observer%3A%20'_ariaDescribedByChanged'%2C%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20initial%20number%20of%20rows.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40attribute%20rows%0A%20%20%20%20%20%20%20*%20%40type%20number%0A%20%20%20%20%20%20%20*%20%40default%201%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20rows%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20value%3A%201%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20The%20maximum%20number%20of%20rows%20this%20element%20can%20grow%20to%20until%20it%0A%20%20%20%20%20%20%20*%20scrolls.%200%20means%20no%20maximum.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40attribute%20maxRows%0A%20%20%20%20%20%20%20*%20%40type%20number%0A%20%20%20%20%20%20%20*%20%40default%200%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20maxRows%3A%20%7B%0A%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20value%3A%200%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_ariaLabelledByChanged%3A%20function(ariaLabelledBy)%20%7B%0A%20%20%20%20%20%20this.%24.input.textarea.setAttribute('aria-labelledby'%2C%20ariaLabelledBy)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_ariaDescribedByChanged%3A%20function(ariaDescribedBy)%20%7B%0A%20%20%20%20%20%20this.%24.input.textarea.setAttribute('aria-describedby'%2C%20ariaDescribedBy)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20get%20_focusableElement()%20%7B%0A%20%20%20%20%20%20return%20this.%24.input.textarea%3B%0A%20%20%20%20%7D%2C%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-62.js%0A
0 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20Use%20%60Polymer.IronCheckedElementBehavior%60%20to%20implement%20a%20custom%20element%0A%20%20%20*%20that%20has%20a%20%60checked%60%20property%2C%20which%20can%20be%20used%20for%20validation%20if%20the%0A%20%20%20*%20element%20is%20also%20%60required%60.%20Element%20instances%20implementing%20this%20behavior%0A%20%20%20*%20will%20also%20be%20registered%20for%20use%20in%20an%20%60iron-form%60%20element.%0A%20%20%20*%0A%20%20%20*%20%40demo%20demo%2Findex.html%0A%20%20%20*%20%40polymerBehavior%20Polymer.IronCheckedElementBehavior%0A%20%20%20*%2F%0A%20%20Polymer.IronCheckedElementBehaviorImpl%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Fired%20when%20the%20checked%20state%20changes.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20iron-change%0A%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Gets%20or%20sets%20the%20state%2C%20%60true%60%20is%20checked%20and%20%60false%60%20is%20unchecked.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20checked%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_checkedChanged'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20the%20button%20toggles%20the%20active%20state%20with%20each%20tap%20or%20press%0A%20%20%20%20%20%20%20*%20of%20the%20spacebar.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20toggles%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20true%2C%0A%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F*%20Overriden%20from%20Polymer.IronFormElementBehavior%20*%2F%0A%20%20%20%20%20%20value%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'on'%2C%0A%20%20%20%20%20%20%20%20observer%3A%20'_valueChanged'%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_requiredChanged(required)'%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20created%3A%20function()%20%7B%0A%20%20%20%20%20%20%2F%2F%20Used%20by%20%60iron-form%60%20to%20handle%20the%20case%20that%20an%20element%20with%20this%20behavior%0A%20%20%20%20%20%20%2F%2F%20doesn't%20have%20a%20role%20of%20'checkbox'%20or%20'radio'%2C%20but%20should%20still%20only%20be%0A%20%20%20%20%20%20%2F%2F%20included%20when%20the%20form%20is%20serialized%20if%20%60this.checked%20%3D%3D%3D%20true%60.%0A%20%20%20%20%20%20this._hasIronCheckedElementBehavior%20%3D%20true%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Returns%20false%20if%20the%20element%20is%20required%20and%20not%20checked%2C%20and%20true%20otherwise.%0A%20%20%20%20%20*%20%40param%20%7B*%3D%7D%20_value%20Ignored.%0A%20%20%20%20%20*%20%40return%20%7Bboolean%7D%20true%20if%20%60required%60%20is%20false%2C%20or%20if%20%60required%60%20and%20%60checked%60%20are%20both%20true.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_getValidity%3A%20function(_value)%20%7B%0A%20%20%20%20%20%20return%20this.disabled%20%7C%7C%20!this.required%20%7C%7C%20(this.required%20%26%26%20this.checked)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Update%20the%20aria-required%20label%20when%20%60required%60%20is%20changed.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_requiredChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.required)%20%7B%0A%20%20%20%20%20%20%20%20this.setAttribute('aria-required'%2C%20'true')%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20this.removeAttribute('aria-required')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Fire%20%60iron-changed%60%20when%20the%20checked%20state%20changes.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_checkedChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20this.active%20%3D%20this.checked%3B%0A%20%20%20%20%20%20this.fire('iron-change')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Reset%20value%20to%20'on'%20if%20it%20is%20set%20to%20%60undefined%60.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_valueChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20if%20(this.value%20%3D%3D%3D%20undefined%20%7C%7C%20this.value%20%3D%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20this.value%20%3D%20'on'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20Polymer.IronCheckedElementBehavior%20*%2F%0A%20%20Polymer.IronCheckedElementBehavior%20%3D%20%5B%0A%20%20%20%20Polymer.IronFormElementBehavior%2C%0A%20%20%20%20Polymer.IronValidatableBehavior%2C%0A%20%20%20%20Polymer.IronCheckedElementBehaviorImpl%0A%20%20%5D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-63.js%0A
1 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20Use%20%60Polymer.PaperCheckedElementBehavior%60%20to%20implement%20a%20custom%20element%0A%20%20%20*%20that%20has%20a%20%60checked%60%20property%20similar%20to%20%60Polymer.IronCheckedElementBehavior%60%0A%20%20%20*%20and%20is%20compatible%20with%20having%20a%20ripple%20effect.%0A%20%20%20*%20%40polymerBehavior%20Polymer.PaperCheckedElementBehavior%0A%20%20%20*%2F%0A%20%20Polymer.PaperCheckedElementBehaviorImpl%20%3D%20%7B%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Synchronizes%20the%20element's%20checked%20state%20with%20its%20ripple%20effect.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_checkedChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20Polymer.IronCheckedElementBehaviorImpl._checkedChanged.call(this)%3B%0A%20%20%20%20%20%20if%20(this.hasRipple())%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.checked)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._ripple.setAttribute('checked'%2C%20'')%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._ripple.removeAttribute('checked')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Synchronizes%20the%20element's%20%60active%60%20and%20%60checked%60%20state.%0A%20%20%20%20%20*%2F%0A%20%20%20%20_buttonStateChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20Polymer.PaperRippleBehavior._buttonStateChanged.call(this)%3B%0A%20%20%20%20%20%20if%20(this.disabled)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(this.isAttached)%20%7B%0A%20%20%20%20%20%20%20%20this.checked%20%3D%20this.active%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%7D%3B%0A%0A%20%20%2F**%20%40polymerBehavior%20Polymer.PaperCheckedElementBehavior%20*%2F%0A%20%20Polymer.PaperCheckedElementBehavior%20%3D%20%5B%0A%20%20%20%20Polymer.PaperInkyFocusBehavior%2C%0A%20%20%20%20Polymer.IronCheckedElementBehavior%2C%0A%20%20%20%20Polymer.PaperCheckedElementBehaviorImpl%0A%20%20%5D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-64.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20is%3A%20'paper-radio-button'%2C%0A%0A%20%20%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20%20%20Polymer.PaperCheckedElementBehavior%0A%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20%20%20role%3A%20'radio'%2C%0A%20%20%20%20%20%20%20%20'aria-checked'%3A%20false%2C%0A%20%20%20%20%20%20%20%20tabindex%3A%200%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20when%20the%20checked%20state%20changes%20due%20to%20user%20interaction.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20change%0A%20%20%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20when%20the%20checked%20state%20changes.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20iron-change%0A%20%20%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%20%20ariaActiveAttribute%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20'aria-checked'%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F%2F%20create%20the%20element%20ripple%20inside%20the%20%60radioContainer%60%0A%20%20%20%20%20%20_createRipple%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._rippleContainer%20%3D%20this.%24.radioContainer%3B%0A%20%20%20%20%20%20%20%20return%20Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-65.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'paper-radio-group'%2C%0A%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.IronA11yKeysBehavior%2C%0A%20%20%20%20%20%20Polymer.IronSelectableBehavior%0A%20%20%20%20%5D%2C%0A%0A%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20role%3A%20'radiogroup'%2C%0A%20%20%20%20%20%20tabindex%3A%200%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Fired%20when%20the%20radio%20group%20selection%20changes.%0A%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20*%20%40event%20paper-radio-group-changed%0A%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Overriden%20from%20Polymer.IronSelectableBehavior%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20attrForSelected%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'name'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Overriden%20from%20Polymer.IronSelectableBehavior%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20selectedAttribute%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'checked'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Overriden%20from%20Polymer.IronSelectableBehavior%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20selectable%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'paper-radio-button'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20If%20true%2C%20radio-buttons%20can%20be%20deselected%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20allowEmptySelection%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20keyBindings%3A%20%7B%0A%20%20%20%20%20%20'left%20up'%3A%20'selectPrevious'%2C%0A%20%20%20%20%20%20'right%20down'%3A%20'selectNext'%2C%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Selects%20the%20given%20value.%0A%20%20%20%20%20*%2F%0A%20%20%20%20%20select%3A%20function(value)%20%7B%0A%20%20%20%20%20%20if%20(this.selected)%20%7B%0A%20%20%20%20%20%20%20%20var%20oldItem%20%3D%20this._valueToItem(this.selected)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(this.selected%20%3D%3D%20value)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20If%20deselecting%20is%20allowed%20we'll%20have%20to%20apply%20an%20empty%20selection.%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Otherwise%2C%20we%20should%20force%20the%20selection%20to%20stay%20and%20make%20this%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20action%20a%20no-op.%0A%20%20%20%20%20%20%20%20%20%20if%20(this.allowEmptySelection)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20value%20%3D%20''%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(oldItem)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20oldItem.checked%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20if%20(oldItem)%0A%20%20%20%20%20%20%20%20%20%20oldItem.checked%20%3D%20false%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20Polymer.IronSelectableBehavior.select.apply(this%2C%20%5Bvalue%5D)%3B%0A%20%20%20%20%20%20this.fire('paper-radio-group-changed')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Selects%20the%20previous%20item.%20If%20the%20previous%20item%20is%20disabled%2C%20then%20it%20is%0A%20%20%20%20%20*%20skipped%2C%20and%20its%20previous%20item%20is%20selected%0A%20%20%20%20%20*%2F%0A%20%20%20%20selectPrevious%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20length%20%3D%20this.items.length%3B%0A%20%20%20%20%20%20var%20newIndex%20%3D%20Number(this._valueToIndex(this.selected))%3B%0A%0A%20%20%20%20%20%20do%20%7B%0A%20%20%20%20%20%20%20%20newIndex%20%3D%20(newIndex%20-%201%20%2B%20length)%20%25%20length%3B%0A%20%20%20%20%20%20%7D%20while%20(this.items%5BnewIndex%5D.disabled)%0A%0A%20%20%20%20%20%20this._itemActivate(this._indexToValue(newIndex)%2C%20this.items%5BnewIndex%5D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Selects%20the%20next%20item.%20If%20the%20next%20item%20is%20disabled%2C%20then%20it%20is%0A%20%20%20%20%20*%20skipped%2C%20and%20the%20next%20item%20after%20it%20is%20selected.%0A%20%20%20%20%20*%2F%0A%20%20%20%20selectNext%3A%20function()%20%7B%0A%20%20%20%20%20%20var%20length%20%3D%20this.items.length%3B%0A%20%20%20%20%20%20var%20newIndex%20%3D%20Number(this._valueToIndex(this.selected))%3B%0A%0A%20%20%20%20%20%20do%20%7B%0A%20%20%20%20%20%20%20%20newIndex%20%3D%20(newIndex%20%2B%201%20%2B%20length)%20%25%20length%3B%0A%20%20%20%20%20%20%7D%20while%20(this.items%5BnewIndex%5D.disabled)%0A%0A%20%20%20%20%20%20this._itemActivate(this._indexToValue(newIndex)%2C%20this.items%5BnewIndex%5D)%3B%0A%20%20%20%20%7D%2C%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-66.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20is%3A%20'paper-checkbox'%2C%0A%0A%20%20%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20%20%20Polymer.PaperCheckedElementBehavior%0A%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20hostAttributes%3A%20%7B%0A%20%20%20%20%20%20%20%20role%3A%20'checkbox'%2C%0A%20%20%20%20%20%20%20%20'aria-checked'%3A%20false%2C%0A%20%20%20%20%20%20%20%20tabindex%3A%200%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20when%20the%20checked%20state%20changes%20due%20to%20user%20interaction.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20change%0A%20%20%20%20%20%20%20%20%20*%2F%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Fired%20when%20the%20checked%20state%20changes.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40event%20iron-change%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20ariaActiveAttribute%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20'aria-checked'%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_computeCheckboxClass%3A%20function(checked%2C%20invalid)%20%7B%0A%20%20%20%20%20%20%20%20var%20className%20%3D%20''%3B%0A%20%20%20%20%20%20%20%20if%20(checked)%20%7B%0A%20%20%20%20%20%20%20%20%20%20className%20%2B%3D%20'checked%20'%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(invalid)%20%7B%0A%20%20%20%20%20%20%20%20%20%20className%20%2B%3D%20'invalid'%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%20className%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_computeCheckmarkClass%3A%20function(checked)%20%7B%0A%20%20%20%20%20%20%20%20return%20checked%20%3F%20''%20%3A%20'hidden'%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F%2F%20create%20ripple%20inside%20the%20checkboxContainer%0A%20%20%20%20%20%20_createRipple%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this._rippleContainer%20%3D%20this.%24.checkboxContainer%3B%0A%20%20%20%20%20%20%20%20return%20Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D)%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-67.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20is%3A%20'iron-image'%2C%0A%0A%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20URL%20of%20an%20image.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20src%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_srcChanged'%2C%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20A%20short%20text%20alternative%20for%20the%20image.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20alt%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20null%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20When%20true%2C%20the%20image%20is%20prevented%20from%20loading%20and%20any%20placeholder%20is%0A%20%20%20%20%20%20%20%20%20*%20shown.%20%20This%20may%20be%20useful%20when%20a%20binding%20to%20the%20src%20property%20is%20known%20to%0A%20%20%20%20%20%20%20%20%20*%20be%20invalid%2C%20to%20prevent%20404%20requests.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20preventLoad%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_preventLoadChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Sets%20a%20sizing%20option%20for%20the%20image.%20%20Valid%20values%20are%20%60contain%60%20(full%0A%20%20%20%20%20%20%20%20%20*%20aspect%20ratio%20of%20the%20image%20is%20contained%20within%20the%20element%20and%0A%20%20%20%20%20%20%20%20%20*%20letterboxed)%20or%20%60cover%60%20(image%20is%20cropped%20in%20order%20to%20fully%20cover%20the%0A%20%20%20%20%20%20%20%20%20*%20bounds%20of%20the%20element)%2C%20or%20%60null%60%20(default%3A%20image%20takes%20natural%20size).%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20sizing%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20null%2C%0A%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20When%20a%20sizing%20option%20is%20used%20(%60cover%60%20or%20%60contain%60)%2C%20this%20determines%0A%20%20%20%20%20%20%20%20%20*%20how%20the%20image%20is%20aligned%20within%20the%20element%20bounds.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20position%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20'center'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20When%20%60true%60%2C%20any%20change%20to%20the%20%60src%60%20property%20will%20cause%20the%20%60placeholder%60%0A%20%20%20%20%20%20%20%20%20*%20image%20to%20be%20shown%20until%20the%20new%20image%20has%20loaded.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20preload%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20This%20image%20will%20be%20used%20as%20a%20background%2Fplaceholder%20until%20the%20src%20image%20has%0A%20%20%20%20%20%20%20%20%20*%20loaded.%20%20Use%20of%20a%20data-URI%20for%20placeholder%20is%20encouraged%20for%20instant%20rendering.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20placeholder%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20null%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_placeholderChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20When%20%60preload%60%20is%20true%2C%20setting%20%60fade%60%20to%20true%20will%20cause%20the%20image%20to%0A%20%20%20%20%20%20%20%20%20*%20fade%20into%20place.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20fade%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Read-only%20value%20that%20is%20true%20when%20the%20image%20is%20loaded.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20loaded%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Read-only%20value%20that%20tracks%20the%20loading%20state%20of%20the%20image%20when%20the%20%60preload%60%0A%20%20%20%20%20%20%20%20%20*%20option%20is%20used.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20loading%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Read-only%20value%20that%20indicates%20that%20the%20last%20set%20%60src%60%20failed%20to%20load.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20error%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Can%20be%20used%20to%20set%20the%20width%20of%20image%20(e.g.%20via%20binding)%3B%20size%20may%20also%20be%0A%20%20%20%20%20%20%20%20%20*%20set%20via%20CSS.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20width%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_widthChanged'%2C%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20null%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Can%20be%20used%20to%20set%20the%20height%20of%20image%20(e.g.%20via%20binding)%3B%20size%20may%20also%20be%0A%20%20%20%20%20%20%20%20%20*%20set%20via%20CSS.%0A%20%20%20%20%20%20%20%20%20*%0A%20%20%20%20%20%20%20%20%20*%20%40attribute%20height%0A%20%20%20%20%20%20%20%20%20*%20%40type%20number%0A%20%20%20%20%20%20%20%20%20*%20%40default%20null%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20height%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_heightChanged'%2C%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20null%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20%20%20'_transformChanged(sizing%2C%20position)'%0A%20%20%20%20%20%20%5D%2C%0A%0A%20%20%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20var%20img%20%3D%20this.%24.img%3B%0A%0A%20%20%20%20%20%20%20%20img.onload%20%3D%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(this.%24.img.src%20!%3D%3D%20this._resolveSrc(this.src))%20return%3B%0A%0A%20%20%20%20%20%20%20%20%20%20this._setLoading(false)%3B%0A%20%20%20%20%20%20%20%20%20%20this._setLoaded(true)%3B%0A%20%20%20%20%20%20%20%20%20%20this._setError(false)%3B%0A%20%20%20%20%20%20%20%20%7D.bind(this)%3B%0A%0A%20%20%20%20%20%20%20%20img.onerror%20%3D%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(this.%24.img.src%20!%3D%3D%20this._resolveSrc(this.src))%20return%3B%0A%0A%20%20%20%20%20%20%20%20%20%20this._reset()%3B%0A%0A%20%20%20%20%20%20%20%20%20%20this._setLoading(false)%3B%0A%20%20%20%20%20%20%20%20%20%20this._setLoaded(false)%3B%0A%20%20%20%20%20%20%20%20%20%20this._setError(true)%3B%0A%20%20%20%20%20%20%20%20%7D.bind(this)%3B%0A%0A%20%20%20%20%20%20%20%20this._resolvedSrc%20%3D%20''%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_load%3A%20function(src)%20%7B%0A%20%20%20%20%20%20%20%20if%20(src)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.%24.img.src%20%3D%20src%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.%24.img.removeAttribute('src')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20this.%24.sizedImgDiv.style.backgroundImage%20%3D%20src%20%3F%20'url(%22'%20%2B%20src%20%2B%20'%22)'%20%3A%20''%3B%0A%0A%20%20%20%20%20%20%20%20this._setLoading(true)%3B%0A%20%20%20%20%20%20%20%20this._setLoaded(false)%3B%0A%20%20%20%20%20%20%20%20this._setError(false)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_reset%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this.%24.img.removeAttribute('src')%3B%0A%20%20%20%20%20%20%20%20this.%24.sizedImgDiv.style.backgroundImage%20%3D%20''%3B%0A%0A%20%20%20%20%20%20%20%20this._setLoading(false)%3B%0A%20%20%20%20%20%20%20%20this._setLoaded(false)%3B%0A%20%20%20%20%20%20%20%20this._setError(false)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_computePlaceholderHidden%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20return%20!this.preload%20%7C%7C%20(!this.fade%20%26%26%20!this.loading%20%26%26%20this.loaded)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_computePlaceholderClassName%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20return%20(this.preload%20%26%26%20this.fade%20%26%26%20!this.loading%20%26%26%20this.loaded)%20%3F%20'faded-out'%20%3A%20''%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_computeImgDivHidden%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20return%20!this.sizing%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_computeImgDivARIAHidden%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20return%20this.alt%20%3D%3D%3D%20''%20%3F%20'true'%20%3A%20undefined%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_computeImgDivARIALabel%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.alt%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.alt%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Polymer.ResolveUrl.resolveUrl%20will%20resolve%20''%20relative%20to%20a%20URL%20x%20to%0A%20%20%20%20%20%20%20%20%2F%2F%20that%20URL%20x%2C%20but%20''%20is%20the%20default%20for%20src.%0A%20%20%20%20%20%20%20%20if%20(this.src%20%3D%3D%3D%20'')%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20''%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20var%20pathComponents%20%3D%20(new%20URL(this._resolveSrc(this.src))).pathname.split(%22%2F%22)%3B%0A%20%20%20%20%20%20%20%20return%20pathComponents%5BpathComponents.length%20-%201%5D%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_computeImgHidden%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20return%20!!this.sizing%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_widthChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this.style.width%20%3D%20isNaN(this.width)%20%3F%20this.width%20%3A%20this.width%20%2B%20'px'%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_heightChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this.style.height%20%3D%20isNaN(this.height)%20%3F%20this.height%20%3A%20this.height%20%2B%20'px'%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_preventLoadChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20if%20(this.preventLoad%20%7C%7C%20this.loaded)%20return%3B%0A%0A%20%20%20%20%20%20%20%20this._reset()%3B%0A%20%20%20%20%20%20%20%20this._load(this.src)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_srcChanged%3A%20function(newSrc%2C%20oldSrc)%20%7B%0A%20%20%20%20%20%20%20%20var%20newResolvedSrc%20%3D%20this._resolveSrc(newSrc)%3B%0A%20%20%20%20%20%20%20%20if%20(newResolvedSrc%20%3D%3D%3D%20this._resolvedSrc)%20return%3B%0A%20%20%20%20%20%20%20%20this._resolvedSrc%20%3D%20newResolvedSrc%3B%0A%0A%20%20%20%20%20%20%20%20this._reset()%3B%0A%20%20%20%20%20%20%20%20if%20(!this.preventLoad)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this._load(newSrc)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_placeholderChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20this.%24.placeholder.style.backgroundImage%20%3D%0A%20%20%20%20%20%20%20%20%20%20this.placeholder%20%3F%20'url(%22'%20%2B%20this.placeholder%20%2B%20'%22)'%20%3A%20''%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_transformChanged%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20var%20sizedImgDivStyle%20%3D%20this.%24.sizedImgDiv.style%3B%0A%20%20%20%20%20%20%20%20var%20placeholderStyle%20%3D%20this.%24.placeholder.style%3B%0A%0A%20%20%20%20%20%20%20%20sizedImgDivStyle.backgroundSize%20%3D%0A%20%20%20%20%20%20%20%20placeholderStyle.backgroundSize%20%3D%0A%20%20%20%20%20%20%20%20%20%20this.sizing%3B%0A%0A%20%20%20%20%20%20%20%20sizedImgDivStyle.backgroundPosition%20%3D%0A%20%20%20%20%20%20%20%20placeholderStyle.backgroundPosition%20%3D%0A%20%20%20%20%20%20%20%20%20%20this.sizing%20%3F%20this.position%20%3A%20''%3B%0A%0A%20%20%20%20%20%20%20%20sizedImgDivStyle.backgroundRepeat%20%3D%0A%20%20%20%20%20%20%20%20placeholderStyle.backgroundRepeat%20%3D%0A%20%20%20%20%20%20%20%20%20%20this.sizing%20%3F%20'no-repeat'%20%3A%20''%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_resolveSrc%3A%20function(testSrc)%20%7B%0A%20%20%20%20%20%20%20%20return%20Polymer.ResolveUrl.resolveUrl(testSrc%2C%20this.ownerDocument.baseURI)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-68.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20%20%20Polymer(%7B%0A%20%20%20%20%20%20is%3A%20'paper-card'%2C%0A%0A%20%20%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20title%20of%20the%20card.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20heading%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20''%2C%0A%20%20%20%20%20%20%20%20%20%20observer%3A%20'_headingChanged'%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20url%20of%20the%20title%20image%20of%20the%20card.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20image%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20''%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20When%20%60true%60%2C%20any%20change%20to%20the%20image%20url%20property%20will%20cause%20the%0A%20%20%20%20%20%20%20%20%20*%20%60placeholder%60%20image%20to%20be%20shown%20until%20the%20image%20is%20fully%20rendered.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20preloadImage%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20When%20%60preloadImage%60%20is%20true%2C%20setting%20%60fadeImage%60%20to%20true%20will%20cause%20the%0A%20%20%20%20%20%20%20%20%20*%20image%20to%20fade%20into%20place.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20fadeImage%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20The%20z-depth%20of%20the%20card%2C%20from%200-5.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20elevation%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Number%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%201%2C%0A%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Set%20this%20to%20true%20to%20animate%20the%20card%20shadow%20when%20setting%20a%20new%0A%20%20%20%20%20%20%20%20%20*%20%60z%60%20value.%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20animatedShadow%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20value%3A%20false%0A%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20%20%20*%20Read-only%20property%20used%20to%20pass%20down%20the%20%60animatedShadow%60%20value%20to%0A%20%20%20%20%20%20%20%20%20*%20the%20underlying%20paper-material%20style%20(since%20they%20have%20different%20names).%0A%20%20%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20%20%20animated%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%3A%20Boolean%2C%0A%20%20%20%20%20%20%20%20%20%20reflectToAttribute%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20readOnly%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20computed%3A%20'_computeAnimated(animatedShadow)'%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_headingChanged%3A%20function(heading)%20%7B%0A%20%20%20%20%20%20%20%20var%20label%20%3D%20this.getAttribute('aria-label')%3B%0A%20%20%20%20%20%20%20%20this.setAttribute('aria-label'%2C%20heading)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_computeHeadingClass%3A%20function(image)%20%7B%0A%20%20%20%20%20%20%20%20var%20cls%20%3D%20'title-text'%3B%0A%20%20%20%20%20%20%20%20if%20(image)%0A%20%20%20%20%20%20%20%20%20%20cls%20%2B%3D%20'%20over-image'%3B%0A%20%20%20%20%20%20%20%20return%20cls%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20_computeAnimated%3A%20function(animatedShadow)%20%7B%0A%20%20%20%20%20%20%20%20return%20animatedShadow%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%20%20%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-69.js%0A
2 ms
javascript;charset=utf-8,%0A%0A%20%20%2F**%0A%20%20%20*%20Use%20%60Polymer.IronValidatorBehavior%60%20to%20implement%20a%20custom%20input%2Fform%20validator.%20Element%0A%20%20%20*%20instances%20implementing%20this%20behavior%20will%20be%20registered%20for%20use%20in%20elements%20that%20implement%0A%20%20%20*%20%60Polymer.IronValidatableBehavior%60.%0A%20%20%20*%20%0A%20%20%20*%20%40demo%20demo%2Findex.html%0A%20%20%20*%20%40polymerBehavior%0A%20%20%20*%2F%0A%20%20Polymer.IronValidatorBehavior%20%3D%20%7B%0A%0A%20%20%20%20properties%3A%20%7B%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Namespace%20for%20this%20validator.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20validatorType%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'validator'%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Name%20for%20this%20validator%2C%20used%20by%20%60Polymer.IronValidatableBehavior%60%20to%20lookup%20this%20element.%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20validatorName%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20function()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.is%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20new%20Polymer.IronMeta(%7Btype%3A%20this.validatorType%2C%20key%3A%20this.validatorName%2C%20value%3A%20this%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F**%0A%20%20%20%20%20*%20Implement%20custom%20validation%20logic%20in%20this%20function.%0A%20%20%20%20%20*%20%40param%20%7BObject%7D%20values%20The%20value%20to%20validate.%20May%20be%20any%20type%20depending%20on%20the%20validation%20logic.%0A%20%20%20%20%20*%20%40return%20%7BBoolean%7D%20true%20if%20%60values%60%20is%20valid.%0A%20%20%20%20%20*%2F%0A%20%20%20%20validate%3A%20function(values)%20%7B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-70.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'phone-validator'%2C%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.IronValidatorBehavior%0A%20%20%20%20%5D%2C%0A%20%20%20%20validate%3A%20function(value)%20%7B%0A%20%20%20%20%20%20return%20!value%20%7C%7C%20value.match(%2F%5E%5B0-9%5D%7B0%2C3%7D-%5B0-9%5D%7B0%2C4%7D-%5B0-9%5D%7B0%2C4%7D%24%2F)%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-71.js%0A
1 ms
javascript;charset=utf-8,%0A%20%20Polymer(%7B%0A%20%20%20%20is%3A%20'phone-input'%2C%0A%20%20%20%20behaviors%3A%20%5B%0A%20%20%20%20%20%20Polymer.IronValidatableBehavior%0A%20%20%20%20%5D%2C%0A%20%20%20%20properties%3A%20%7B%0A%20%20%20%20%20%20value%3A%20%7B%0A%20%20%20%20%20%20%20%20notify%3A%20true%2C%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20_phone1%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20_phone2%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20_phone3%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20validator%3A%20%7B%0A%20%20%20%20%20%20%20%20type%3A%20String%2C%0A%20%20%20%20%20%20%20%20value%3A%20'phone-validator'%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20observers%3A%20%5B%0A%20%20%20%20%20%20'_computeValue(_phone1%2C_phone2%2C_phone3)'%0A%20%20%20%20%5D%2C%0A%20%20%20%20_computeValue%3A%20function(phone1%2C%20phone2%2C%20phone3)%20%7B%0A%20%20%20%20%20%20this.value%20%3D%20phone1.trim()%20%2B%20'-'%20%2B%20phone2.trim()%20%2B%20'-'%20%2B%20phone3.trim()%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%2F%2F%23%20sourceURL%3Dhttps%3A%2F%2Fcdn.snek.ai%2Fstatic%2Fv2%2Fvulcanized%2Fvulcanized_20160325.html-72.js%0A
1 ms
nr-892.min.js
149 ms
300lo.json
112 ms
ie67-css.0b9298757d03b80cea0a.js
64 ms
sh.953eb77977227bfd253ee158.html
44 ms
layers.34f2ad207a6dc0c4eb95.js
17 ms
40b8d6f50c
347 ms
ko.js
55 ms
snek.co.kr accessibility score
Contrast
These are opportunities to improve the legibility of your content.
Impact
Issue
Background and foreground colors do not have a sufficient contrast ratio.
Names and labels
These are opportunities to improve the semantics of the controls in your application. This may enhance the experience for users of assistive technology, like a screen reader.
Impact
Issue
Document doesn't have a <title> element
Image elements do not have [alt] attributes
Links do not have a discernible name
Navigation
These are opportunities to improve keyboard navigation in your application.
Impact
Issue
Heading elements are not in a sequentially-descending order
Best practices
These items highlight common accessibility best practices.
Impact
Issue
[user-scalable="no"] is used in the <meta name="viewport"> element or the [maximum-scale] attribute is less than 5.
snek.co.kr best practices score
Trust and Safety
Impact
Issue
Does not use HTTPS
Ensure CSP is effective against XSS attacks
User Experience
Impact
Issue
Serves images with low resolution
snek.co.kr SEO score
Content Best Practices
Format your HTML in a way that enables crawlers to better understand your app’s content.
Impact
Issue
Document doesn't have a <title> element
Links do not have descriptive text
Image elements do not have [alt] attributes
Mobile Friendly
Make sure your pages are mobile friendly so users don’t have to pinch or zoom in order to read the content pages. [Learn more](https://developers.google.com/search/mobile-sites/).
Impact
Issue
Document uses legible font sizes
KO
KO
UTF-8
Language claimed in HTML meta tag should match the language actually used on the web page. Otherwise Snek.co.kr can be misinterpreted by Google and other search engines. Our service has detected that Korean is used on the page, and it matches the claimed language. Our system also found out that Snek.co.kr main page’s claimed encoding is utf-8. Use of this encoding format is the best practice as the main page visitors from all over the world won’t have any issues with symbol transcription.
snek.co.kr
Open Graph description is not detected on the main page of Snek. Lack of Open Graph description can be counter-productive for their social media presence, as such a description allows converting a website homepage (or other pages) into good-looking, rich and well-structured posts, when it is being shared on Facebook and other social media. For example, adding the following code snippet into HTML <head> tag will help to represent this web page correctly in social networks: