12.1 sec in total
2.1 sec
8.2 sec
1.8 sec
Visit lifeisbutadish.com now to see the best up-to-date Life Is But A Dish content for United States and also check out these interesting facts you probably never knew about lifeisbutadish.com
Welcome to Life is But a Dish! Discover easy, approachable and delicious recipes for the everyday home cook, using simple ingredients and pantry staples.
Visit lifeisbutadish.comWe analyzed Lifeisbutadish.com page load time and found that the first response time was 2.1 sec and then it took 10 sec to load all DOM resources and completely render a web page. This is a poor result, as 90% of websites can load faster.
lifeisbutadish.com performance score
name
value
score
weighting
Value2.8 s
56/100
10%
Value2.8 s
83/100
25%
Value24.9 s
0/100
10%
Value12,640 ms
0/100
30%
Value0.044
99/100
15%
Value35.4 s
0/100
10%
2138 ms
115 ms
170 ms
166 ms
166 ms
Our browser made a total of 267 requests to load all elements on the main page. We found that 10% of them (26 requests) were addressed to the original Lifeisbutadish.com, 6% (16 requests) were made to Fileserver.glam.com and 4% (12 requests) were made to Scontent.cdninstagram.com. The less responsive or slowest element that took the longest time to load (2.1 sec) belongs to the original domain Lifeisbutadish.com.
Page size can be reduced by 1.9 MB (30%)
6.4 MB
4.5 MB
In fact, the total size of Lifeisbutadish.com main page is 6.4 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. 85% of websites need less resources to load and that’s why Accessify’s recommendations for optimization and resource minification can be helpful for this project. Images take 3.9 MB which makes up the majority of the site volume.
Potential reduce by 196.4 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 196.4 kB or 77% of the original size.
Potential reduce by 96.1 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. Life Is But A Dish images are well optimized though.
Potential reduce by 1.5 MB
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 1.5 MB or 69% of the original size.
Potential reduce by 108.7 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. Lifeisbutadish.com needs all CSS files to be minified and compressed as it can save up to 108.7 kB or 84% of the original size.
Number of requests can be reduced by 141 (64%)
220
79
The browser has sent 220 CSS, Javascripts, AJAX and image requests in order to completely render the main page of Life Is But A Dish. We recommend that multiple CSS and JavaScript files should be merged into one by each type, as it can help reduce assets requests from 84 to 1 for JavaScripts and from 9 to 1 for CSS and as a result speed up the page load time.
www.lifeisbutadish.com
2138 ms
wp-emoji-release.min.js
115 ms
style.css
170 ms
styles.css
166 ms
layout.css
166 ms
css
26 ms
style.css
163 ms
style.css
179 ms
jetpack.css
222 ms
style.css
234 ms
jquery.js
356 ms
jquery-migrate.min.js
237 ms
post.js
485 ms
skip-links.js
245 ms
load.sumome.com
310 ms
instansive.js
316 ms
viewChannelModule.act
212 ms
adsbygoogle.js
12 ms
load.min.js
225 ms
bo19mm49cApPMYURs12Y4jO7mYlYJ21h.js
35 ms
viewChannelModule.act
153 ms
viewChannelModule.act
143 ms
bada46fcf64e4118a2eb2f8d1d5c3d56e8a0800f.js
69 ms
glammedia_logo.js
82 ms
pinit.js
32 ms
photon.js
236 ms
jquery.form.min.js
248 ms
scripts.js
255 ms
devicepx-jetpack.js
26 ms
hoverIntent.min.js
258 ms
superfish.min.js
301 ms
superfish.args.min.js
322 ms
general.js
340 ms
jquery.flexslider.js
330 ms
wp-embed.min.js
368 ms
e-201611.js
24 ms
lightwidget.js
212 ms
analytics.js
10 ms
beacon.js
129 ms
Southwest-Chicken-Soup-3.jpg
133 ms
Pesto-Asparagus-Burrata-Pizza.jpg
137 ms
No-Bake-Oatmeal-Energy-Bites-4.jpg
126 ms
Laney-circle-250.png
298 ms
Healing-Turmeric-Lentil-Farro-Soup-5.jpg
126 ms
Cheeky-Giveaway.jpg
133 ms
Roasted-Garlic-Hummus-5.jpg
134 ms
Oatmeal-Cottage-Cheese-Pancakes-4.jpg
130 ms
Irish-Soda-Bread-4.jpg
131 ms
Butter-Lettuce-Salad-with-Salt-Pepper-Honey-Cashews-4.jpg
137 ms
Cauliflower-Rice-Veggie-Bowls-2.jpg
137 ms
snapcode.png
166 ms
collect
49 ms
collect
42 ms
search.png
158 ms
toadOcfmlt9b38dHJxOBGMw1o1eFRj7wYC6JbISqOjY.ttf
24 ms
toadOcfmlt9b38dHJxOBGEMbjGELOEJD5J8DUmxkO-A.ttf
23 ms
ODelI1aHBYDBqgeIAH2zlNzbP97U9sKh0jjxbPbfOKg.ttf
24 ms
toadOcfmlt9b38dHJxOBGLsbIrGiHa6JIepkyt5c0A0.ttf
23 ms
toadOcfmlt9b38dHJxOBGBPPOa1q11iOmmM9mDHHHX4.ttf
21 ms
fpTVHK8qsXbIeTHTrnQH6Iue0YgdIF4L_q7PS4yTQOQ.ttf
45 ms
M2Jd71oPJhLKp0zdtTvoM0DauxaEVho0aInXGvhmB4k.ttf
35 ms
ssi-icomoon.woff
132 ms
collect
150 ms
1b57422a9d435e2f8e8131da8b1eee0e.html
253 ms
collect
32 ms
showad.js
107 ms
AdServerServlet
115 ms
AdServerServlet
58 ms
AdServerServlet
51 ms
AdServerServlet
57 ms
AdServerServlet
113 ms
AdServerServlet
113 ms
AdServerServlet
116 ms
cTagsImgCmd.act
113 ms
pql
46 ms
glamadapt_jsrv.act
508 ms
quant.js
38 ms
glam_comscore.js
42 ms
cTagsImgCmd.act
104 ms
collect
21 ms
ga-audiences
96 ms
12383527_549090258606627_388522576_n.jpg
120 ms
10632293_525818340960778_1904064825_n.jpg
143 ms
10693712_544662002374398_1560522440_n.jpg
169 ms
12798159_582481018580849_1068940720_n.jpg
168 ms
12826022_1656939177913966_671074188_n.jpg
171 ms
12826043_553987268116313_1744881069_n.jpg
169 ms
PugMaster
17 ms
jsadimp.gif
102 ms
jsadimp.gif
99 ms
pixel
25 ms
Pug
49 ms
usersync.aspx
51 ms
pixel
47 ms
12383527_549090258606627_388522576_n.jpg
111 ms
10632293_525818340960778_1904064825_n.jpg
121 ms
10693712_544662002374398_1560522440_n.jpg
108 ms
12798159_582481018580849_1068940720_n.jpg
183 ms
12826022_1656939177913966_671074188_n.jpg
148 ms
12826043_553987268116313_1744881069_n.jpg
145 ms
collect
28 ms
Pug
28 ms
Pug
25 ms
Pug
27 ms
Pug
25 ms
Pug
19 ms
Pug
11 ms
verifyc
32 ms
gw.js
181 ms
adscout.php
40 ms
core.js
33 ms
metrics_lib.v2.13.js
28 ms
log.act
177 ms
a.gif
132 ms
rs.js
12 ms
moatad.js
24 ms
cTagsImgCmd.act
44 ms
adscout.php
29 ms
14555
75 ms
urldata.act
82 ms
clear.gif
67 ms
jsadimp.gif
36 ms
60-1x1.jpg
25 ms
m
52 ms
blank.gif
107 ms
602831819.js
205 ms
adscout.php
44 ms
adscout.php
44 ms
webcomponents-lite.min.js
104 ms
p
34 ms
rpc.flow
60 ms
vce_st.js
35 ms
pixel.gif
20 ms
e
27 ms
14555
23 ms
lgl.html
91 ms
pixel.gif
16 ms
p
10 ms
pixel;r=971631967;a=p-874AVp33Bbtkg;labels=Style;fpan=1;fpa=P0-1541029144-1458444987661;ns=0;ce=1;cm=;je=0;sr=1024x768x32;enc=n;dst=0;et=1458444987661;tzo=-180;ref=;url=http%3A%2F%2Fwww.lifeisbutadish.com%2F;ogl=type.website%2Ctitle.life%20is%20but%20a%20dish%2Curl.http%3A%2F%2Fwww%252Elifeisbutadish%252Ecom%2F%2Csite_name.life%20is%20but%20a%20dish%2Cimage.https%3A%2F%2Fs0%252Ewp%252Ecom%2Fi%2Fblank%252Ejpg%2Clocale.en_US
34 ms
brandlift.php
65 ms
ca-pub-5276359706774244.js
108 ms
zrt_lookup.html
104 ms
show_ads_impl.js
49 ms
invis.png
9 ms
glamadapt_jsrv.act
267 ms
lgrt
58 ms
ads
276 ms
osd.js
20 ms
pixel
47 ms
49 ms
ads
299 ms
0.gif
358 ms
20 ms
15 ms
glamadapt_psrv.act
1035 ms
log.act
191 ms
9707.js
60 ms
moatad.js
5 ms
2530
37 ms
sync
37 ms
612413816e3ea048005f9acaa1ee5cda_1.html
143 ms
2530
14 ms
ads.jsonp
110 ms
612413816e3ea048005f9acaa1ee5cda_1.html
126 ms
blank.gif
32 ms
cce5d35c-92e9-4219-839d-108b9fb99411
20 ms
ads.js
27 ms
log.act
211 ms
st.v2.js
210 ms
dvbs_src.js
98 ms
bst2tv3.html
175 ms
verify.js
77 ms
blank.gif
73 ms
91208106c809ac740aa1511ccab00e6f.jpg
129 ms
cvo.gif
87 ms
gr
82 ms
clear.gif
69 ms
;ord=8080248266177283955;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=
45 ms
pixel_details.html
39 ms
html_inpage_rendering_lib_200_111.js
62 ms
ddc.htm
50 ms
emily.html
54 ms
p
40 ms
rpc.flow
40 ms
pixel.gif
33 ms
glamadapt_jsrv.act
460 ms
pixel.gif
26 ms
tap.php
14 ms
KIA_DCO_160X600_Refresh_Backup_Optima.jpg
12 ms
dc_oe=ChMI6cvc-6rOywIVUkkMCh02AgAtEAAYACDv_Lcg;met=1;×tamp=1458444988648;eid1=9;ecn1=1;etm1=0;
22 ms
durly.js
131 ms
dvtp_src.js
21 ms
lidar.js
10 ms
4.gif
143 ms
ba.js
143 ms
dvtp_src_internal26.js
22 ms
t2tv7.html
113 ms
visit.js
49 ms
vast-client.js
17 ms
mediaelement.js
7 ms
blocker.js
12 ms
scrollbar.js
12 ms
nativead.js
38 ms
domready.js
11 ms
clear.gif
42 ms
animator.js
26 ms
flashmanipulation.js
29 ms
120845
176 ms
avs5639.js
67 ms
event.gif
20 ms
event.jpg
19 ms
sync
18 ms
pixel.gif
4 ms
ads.jsonp
166 ms
log.act
266 ms
adServer.bs
130 ms
log.act
129 ms
log.act
185 ms
p
23 ms
rpc.flow
23 ms
vadtag.html
76 ms
log.act
448 ms
glamadapt_jsrv.act
54 ms
css
14 ms
mode_video_json.act
95 ms
log.act
162 ms
MTP_ySUJH_bn48VBG8sNSonF5uFdDttMLvmWuJdhhgs.ttf
8 ms
k3k702ZOKiLJc3WVjuplzInF5uFdDttMLvmWuJdhhgs.ttf
8 ms
cJZKeOuBrn4kERxqtaUH3aCWcynf_cDxXwCLxiixG1c.ttf
8 ms
GlamSelectDefaultAds.js
105 ms
blank.gif
54 ms
blank.gif
42 ms
blank.gif
31 ms
1751503353.js
7 ms
1_MM_Foodie_160x24_wht.gif
16 ms
jsadimp.gif
210 ms
blank.gif
209 ms
pinit_main.js
196 ms
g.gif
185 ms
448 ms
polymer.html
106 ms
mode-core.html
115 ms
mode-social.html
88 ms
mode-post.html
83 ms
mode-slideshow.html
85 ms
mode-photostory.html
90 ms
mode-map.html
102 ms
924.jpg
67 ms
def_vw_img_spr.png
12 ms
927.jpg
60 ms
928.jpg
60 ms
929.jpg
63 ms
940.jpg
57 ms
blank.gif
84 ms
p
44 ms
collect
31 ms
collect
21 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%0Alocation.search.slice(1).split('%26').forEach(function%20(o)%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)%3B%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%0Aprototype%3A%20prototype%2C%0Aextends%3A%20prototype.extends%0A%7D%3B%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%0Athis._callbacks.forEach(function%20(cb)%20%7B%0Acb()%3B%0A%7D)%3B%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%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%0APolymer.RenderStatus.whenReady(function%20()%20%7B%0Athis.isAttached%20%3D%20true%3B%0Athis._doBehavior('attached')%3B%0A%7D.bind(this))%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)%20%7B%0Athis._attributeChangedImpl(name)%3B%0Athis._doBehavior('attributeChanged'%2C%20arguments)%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%0AObject.getOwnPropertyNames(api).forEach(function%20(n)%20%7B%0Athis.copyOwnProperty(n%2C%20api%2C%20prototype)%3B%0A%7D%2C%20this)%3B%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%0AforceDocumentUpgrade()%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%20forceDocumentUpgrade()%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%3B%0Aif%20(doc)%20%7B%0ACustomElements.upgradeAll(doc)%3B%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%0Abehaviors.forEach(function%20(b)%20%7B%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%2C%20this)%3B%0Areturn%20flat%3B%0A%7D%2C%0A_mixinBehavior%3A%20function%20(b)%20%7B%0AObject.getOwnPropertyNames(b).forEach(function%20(n)%20%7B%0Aswitch%20(n)%20%7B%0Acase%20'hostAttributes'%3A%0Acase%20'registered'%3A%0Acase%20'properties'%3A%0Acase%20'observers'%3A%0Acase%20'listeners'%3A%0Acase%20'created'%3A%0Acase%20'attached'%3A%0Acase%20'detached'%3A%0Acase%20'attributeChanged'%3A%0Acase%20'configure'%3A%0Acase%20'ready'%3A%0Abreak%3B%0Adefault%3A%0Aif%20(!this.hasOwnProperty(n))%20%7B%0Athis.copyOwnProperty(n%2C%20b%2C%20this)%3B%0A%7D%0Abreak%3B%0A%7D%0A%7D%2C%20this)%3B%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%0Athis.behaviors.forEach(function%20(b)%20%7B%0Athis._invokeBehavior(b%2C%20name%2C%20args)%3B%0A%7D%2C%20this)%3B%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%0Athis.behaviors.forEach(function%20(b)%20%7B%0Athis._marshalBehavior(b)%3B%0A%7D%2C%20this)%3B%0Athis._marshalBehavior(this)%3B%0A%7D%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%0Athis.behaviors.some(function%20(b)%20%7B%0Areturn%20info%20%3D%20this._getPropertyInfo(property%2C%20b.properties)%3B%0A%7D%2C%20this)%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%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_prepAttributes%3A%20function%20()%20%7B%0Athis._aggregatedAttributes%20%3D%20%7B%7D%3B%0A%7D%2C%0A_addHostAttributes%3A%20function%20(attributes)%20%7B%0Aif%20(attributes)%20%7B%0Athis.mixin(this._aggregatedAttributes%2C%20attributes)%3B%0A%7D%0A%7D%2C%0A_marshalHostAttributes%3A%20function%20()%20%7B%0Athis._applyAttributes(this%2C%20this._aggregatedAttributes)%3B%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%0Athis.serializeValueToAttribute(attr%24%5Bn%5D%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%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20this.attributes.length%3B%20i%20%3C%20l%3B%20i%2B%2B)%20%7B%0Athis._setAttributeToProperty(model%2C%20this.attributes%5Bi%5D.name)%3B%0A%7D%0A%7D%2C%0A_setAttributeToProperty%3A%20function%20(model%2C%20attrName)%20%7B%0Aif%20(!this._serializing)%20%7B%0Avar%20propName%20%3D%20Polymer.CaseMap.dashToCamelCase(attrName)%3B%0Avar%20info%20%3D%20this.getPropertyInfo(propName)%3B%0Aif%20(info.defined%20%7C%7C%20this._propertyEffects%20%26%26%20this._propertyEffects%5BpropName%5D)%20%7B%0Avar%20val%20%3D%20this.getAttribute(attrName)%3B%0Amodel%5BpropName%5D%20%3D%20this.deserialize(val%2C%20info.type)%3B%0A%7D%0A%7D%0A%7D%2C%0A_serializing%3A%20false%2C%0AreflectPropertyToAttribute%3A%20function%20(name)%20%7B%0Athis._serializing%20%3D%20true%3B%0Athis.serializeValueToAttribute(this%5Bname%5D%2C%20Polymer.CaseMap.camelToDashCase(name))%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%0A(node%20%7C%7C%20this)%5Bstr%20%3D%3D%3D%20undefined%20%3F%20'removeAttribute'%20%3A%20'setAttribute'%5D(attribute%2C%20str)%3B%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.1.2'%3B%0APolymer.Base._addFeature(%7B%0A_registerFeatures%3A%20function%20()%20%7B%0Athis._prepIs()%3B%0Athis._prepAttributes()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%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%3Dhttp%3A%2F%2Ffileserver.glam.com%2Fwebcomponents%2Flatest%2Fpolymer%2Fpolymer.html.js%0A
11 ms
ga-audiences
20 ms
javascript;charset=utf-8,Polymer.Base._addFeature(%7B%0A_prepTemplate%3A%20function%20()%20%7B%0Athis._template%20%3D%20this._template%20%7C%7C%20Polymer.DomModule.import(this.is%2C%20'template')%3B%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%20HTMLTemplateElement.bootstrap)%20%7B%0AHTMLTemplateElement.decorate(this._template)%3B%0AHTMLTemplateElement.bootstrap(this._template.content)%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_pushHost%3A%20function%20(host)%20%7B%0Athis.dataHost%20%3D%20host%20%3D%20host%20%7C%7C%20Polymer.Base._hostStack%5BPolymer.Base._hostStack.length%20-%201%5D%3B%0Aif%20(host%20%26%26%20host._clients)%20%7B%0Ahost._clients.push(this)%3B%0A%7D%0Athis._beginHost()%3B%0A%7D%2C%0A_beginHost%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_popHost%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%0Athis._setupRoot()%3B%0Athis._readyClients()%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%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%0Athis._finishDistribute()%3B%0Athis._clientsReadied%20%3D%20true%3B%0Athis._clients%20%3D%20null%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.EventApi%20%3D%20function%20()%20%7B%0Avar%20Settings%20%3D%20Polymer.Settings%3B%0Avar%20EventApi%20%3D%20function%20(event)%20%7B%0Athis.event%20%3D%20event%3B%0A%7D%3B%0Aif%20(Settings.useShadow)%20%7B%0AEventApi.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%0AEventApi.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%20EventApi(event)%3B%0A%7D%0Areturn%20event.__eventApi%3B%0A%7D%3B%0Areturn%20%7B%20factory%3A%20factory%20%7D%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%20DomApi%20%3D%20function%20(node)%20%7B%0Athis.node%20%3D%20node%3B%0Aif%20(this.patch)%20%7B%0Athis.patch()%3B%0A%7D%0A%7D%3B%0Aif%20(window.wrap%20%26%26%20Settings.useShadow%20%26%26%20!Settings.useNativeShadow)%20%7B%0ADomApi%20%3D%20function%20(node)%20%7B%0Athis.node%20%3D%20wrap(node)%3B%0Aif%20(this.patch)%20%7B%0Athis.patch()%3B%0A%7D%0A%7D%3B%0A%7D%0ADomApi.prototype%20%3D%20%7B%0Aflush%3A%20function%20()%20%7B%0APolymer.dom.flush()%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._removeNodeFromHost(node%2C%20true)%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%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%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_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%20node._lightParent)%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%20Array.prototype.slice.call(node.childNodes)%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.childNodes%3B%0Avar%20list%20%3D%20%5B%5D%3B%0Athis._distributedFilter(selector%2C%20c%24%2C%20list)%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%0Athis._distributedFilter(selector%2C%20factory(c).getDistributedNodes()%2C%20list)%3B%0A%7D%0A%7D%0Areturn%20list%3B%0A%7D%2C%0A_distributedFilter%3A%20function%20(selector%2C%20list%2C%20results)%20%7B%0Aresults%20%3D%20results%20%7C%7C%20%5B%5D%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20list.length%2C%20d%3B%20i%20%3C%20l%20%26%26%20(d%20%3D%20list%5Bi%5D)%3B%20i%2B%2B)%20%7B%0Aif%20(d.nodeType%20%3D%3D%3D%20Node.ELEMENT_NODE%20%26%26%20d.localName%20!%3D%3D%20CONTENT%20%26%26%20matchesSelector.call(d%2C%20selector))%20%7B%0Aresults.push(d)%3B%0A%7D%0A%7D%0Areturn%20results%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%0A%7D%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%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%20Array.prototype.slice.call(c%24)%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%20Array.prototype.slice.call(d.childNodes)%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%20%5B%0A'cloneNode'%2C%0A'appendChild'%2C%0A'insertBefore'%2C%0A'removeChild'%2C%0A'replaceChild'%0A%5D%3B%0AforwardMethods.forEach(function%20(name)%20%7B%0ADomApi.prototype%5Bname%5D%20%3D%20function%20()%20%7B%0Areturn%20this.node%5Bname%5D.apply(this.node%2C%20arguments)%3B%0A%7D%3B%0A%7D)%3B%0ADomApi.prototype.querySelectorAll%20%3D%20function%20(selector)%20%7B%0Areturn%20Array.prototype.slice.call(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%20Array.prototype.slice.call(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%20Array.prototype.slice.call(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%20Array.prototype.slice.call(this.node.childNodes)%3B%0A%7D%2C%0Aconfigurable%3A%20true%0A%7D%2C%0Achildren%3A%20%7B%0Aget%3A%20function%20()%20%7B%0Areturn%20Array.prototype.slice.call(this.node.children)%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%20%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%0AforwardProperties.forEach(function%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%0A%7D%0Avar%20CONTENT%20%3D%20'content'%3B%0Avar%20factory%20%3D%20function%20(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%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%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_finishDebouncer%3A%20null%2C%0Aflush%3A%20function%20()%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._flushPolyfills()%3B%0Aif%20(this._debouncers.length%20%26%26%20this._flushGuard%20%3C%20this._FLUSH_MAX)%20%7B%0Athis._flushGuard%2B%2B%3B%0Athis.flush()%3B%0A%7D%20else%20%7B%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%0Athis._flushGuard%20%3D%200%3B%0A%7D%0A%7D%2C%0A_flushPolyfills%3A%20function%20()%20%7B%0Aif%20(this._needsTakeRecords)%20%7B%0ACustomElements.takeRecords()%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%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%20Array.prototype.slice.call(node.childNodes)%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%20Array.prototype.slice.call(node.childNodes)%3B%0Afor%20(var%20i%20%3D%200%2C%20l%20%3D%20c%24.length%2C%20child%3B%20i%20%3C%20l%20%26%26%20(child%20%3D%20c%24%5Bi%5D)%3B%20i%2B%2B)%20%7B%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%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%0A%7D%3B%0A%7D()%3B%0A(function%20()%20%7B%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._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%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%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%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._prepAttributes()%3B%0Athis._prepBehaviors()%3B%0Athis._prepConstructor()%3B%0Athis._prepTemplate()%3B%0Athis._prepShady()%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._poolContent()%3B%0Athis._pushHost()%3B%0Athis._stampTemplate()%3B%0Athis._popHost()%3B%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%3Dhttp%3A%2F%2Ffileserver.glam.com%2Fwebcomponents%2Flatest%2Fpolymer%2Fpolymer.html-1.js%0A
4 ms
uRurqsi6-Rr2olQX8dQ6qFy4VAGfmIm9O4Uw5SodxZSS
30 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)%3B%0Areturn%20list%3B%0A%7D%2C%0A_parseNodeAnnotations%3A%20function%20(node%2C%20list)%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)%3B%0A%7D%2C%0A_testEscape%3A%20function%20(value)%20%7B%0Avar%20escape%20%3D%20value.slice(0%2C%202)%3B%0Aif%20(escape%20%3D%3D%3D%20'%7B%7B'%20%7C%7C%20escape%20%3D%3D%3D%20'%5B%5B')%20%7B%0Areturn%20escape%3B%0A%7D%0A%7D%2C%0A_parseTextNodeAnnotation%3A%20function%20(node%2C%20list)%20%7B%0Avar%20v%20%3D%20node.textContent%3B%0Avar%20escape%20%3D%20this._testEscape(v)%3B%0Aif%20(escape)%20%7B%0Anode.textContent%20%3D%20'%20'%3B%0Avar%20annote%20%3D%20%7B%0Abindings%3A%20%5B%7B%0Akind%3A%20'text'%2C%0Amode%3A%20escape%5B0%5D%2C%0Avalue%3A%20v.slice(2%2C%20-2).trim()%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)%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)%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%20callback)%20%7B%0Aif%20(root.firstChild)%20%7B%0Afor%20(var%20i%20%3D%200%2C%20node%20%3D%20root.firstChild%3B%20node%3B%20node%20%3D%20node.nextSibling%2C%20i%2B%2B)%20%7B%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%20node.nextSibling%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%0Aroot.removeChild(n)%3B%0An%20%3D%20n.nextSibling%3B%0A%7D%0A%7D%0Avar%20childAnnotation%20%3D%20this._parseNodeAnnotations(node%2C%20list%2C%20callback)%3B%0Aif%20(childAnnotation)%20%7B%0AchildAnnotation.parent%20%3D%20annote%3B%0AchildAnnotation.index%20%3D%20i%3B%0A%7D%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%0Afor%20(var%20i%20%3D%20node.attributes.length%20-%201%2C%20a%3B%20a%20%3D%20node.attributes%5Bi%5D%3B%20i--)%20%7B%0Avar%20n%20%3D%20a.name%2C%20v%20%3D%20a.value%3B%0Aif%20(n%20%3D%3D%3D%20'id'%20%26%26%20!this._testEscape(v))%20%7B%0Aannotation.id%20%3D%20v%3B%0A%7D%20else%20if%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%20%7B%0Avar%20b%20%3D%20this._parseNodeAttributeAnnotation(node%2C%20n%2C%20v)%3B%0Aif%20(b)%20%7B%0Aannotation.bindings.push(b)%3B%0A%7D%0A%7D%0A%7D%0A%7D%2C%0A_parseNodeAttributeAnnotation%3A%20function%20(node%2C%20n%2C%20v)%20%7B%0Avar%20escape%20%3D%20this._testEscape(v)%3B%0Aif%20(escape)%20%7B%0Avar%20customEvent%3B%0Avar%20name%20%3D%20n%3B%0Avar%20mode%20%3D%20escape%5B0%5D%3B%0Av%20%3D%20v.slice(2%2C%20-2).trim()%3B%0Avar%20not%20%3D%20false%3B%0Aif%20(v%5B0%5D%20%3D%3D%20'!')%20%7B%0Av%20%3D%20v.substring(1)%3B%0Anot%20%3D%20true%3B%0A%7D%0Avar%20kind%20%3D%20'property'%3B%0Aif%20(n%5Bn.length%20-%201%5D%20%3D%3D%20'%24')%20%7B%0Aname%20%3D%20n.slice(0%2C%20-1)%3B%0Akind%20%3D%20'attribute'%3B%0A%7D%0Avar%20notifyEvent%2C%20colon%3B%0Aif%20(mode%20%3D%3D%20'%7B'%20%26%26%20(colon%20%3D%20v.indexOf('%3A%3A'))%20%3E%200)%20%7B%0AnotifyEvent%20%3D%20v.substring(colon%20%2B%202)%3B%0Av%20%3D%20v.substring(0%2C%20colon)%3B%0AcustomEvent%20%3D%20true%3B%0A%7D%0Aif%20(node.localName%20%3D%3D%20'input'%20%26%26%20n%20%3D%3D%20'value')%20%7B%0Anode.setAttribute(n%2C%20'')%3B%0A%7D%0Anode.removeAttribute(n)%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%0Amode%3A%20mode%2C%0Aname%3A%20name%2C%0Avalue%3A%20v%2C%0Anegate%3A%20not%2C%0Aevent%3A%20notifyEvent%2C%0AcustomEvent%3A%20customEvent%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%0APolymer.Annotations.prepElement%20%3D%20this._prepElement.bind(this)%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%0Ab.signature%20%3D%20this._parseMethod(b.value)%3B%0Aif%20(!b.signature)%20%7B%0Ab.model%20%3D%20this._modelForPath(b.value)%3B%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%0Amode%3A%20'%7B'%2C%0Aname%3A%20'_parent_'%20%2B%20prop%2C%0Amodel%3A%20prop%2C%0Avalue%3A%20prop%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%0Anotes.forEach(function%20(n)%20%7B%0An.bindings.forEach(function%20(b)%20%7B%0Aif%20(b.signature)%20%7B%0Avar%20args%20%3D%20b.signature.args%3B%0Afor%20(var%20k%20%3D%200%3B%20k%20%3C%20args.length%3B%20k%2B%2B)%20%7B%0App%5Bargs%5Bk%5D.model%5D%20%3D%20true%3B%0A%7D%0A%7D%20else%20%7B%0App%5Bb.model%5D%20%3D%20true%3B%0A%7D%0A%7D)%3B%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)%3B%0Areturn%20pp%3B%0A%7D%2C%0A_prepElement%3A%20function%20(element)%20%7B%0APolymer.ResolveUrl.resolveAttrs(element%2C%20this._template.ownerDocument)%3B%0A%7D%2C%0A_findAnnotatedNode%3A%20Polymer.Annotations.findAnnotatedNode%2C%0A_marshalAnnotationReferences%3A%20function%20()%20%7B%0Aif%20(this._template)%20%7B%0Athis._marshalIdNodes()%3B%0Athis._marshalAnnotatedNodes()%3B%0Athis._marshalAnnotatedListeners()%3B%0A%7D%0A%7D%2C%0A_configureAnnotationReferences%3A%20function%20()%20%7B%0Athis._configureTemplateContent()%3B%0A%7D%2C%0A_configureTemplateContent%3A%20function%20()%20%7B%0Athis._notes.forEach(function%20(note%2C%20i)%20%7B%0Aif%20(note.templateContent)%20%7B%0Athis._nodes%5Bi%5D._content%20%3D%20note.templateContent%3B%0A%7D%0A%7D%2C%20this)%3B%0A%7D%2C%0A_marshalIdNodes%3A%20function%20()%20%7B%0Athis.%24%20%3D%20%7B%7D%3B%0Athis._notes.forEach(function%20(a)%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%2C%20this)%3B%0A%7D%2C%0A_marshalAnnotatedNodes%3A%20function%20()%20%7B%0Aif%20(this._nodes)%20%7B%0Athis._nodes%20%3D%20this._nodes.map(function%20(a)%20%7B%0Areturn%20this._findAnnotatedNode(this.root%2C%20a)%3B%0A%7D%2C%20this)%3B%0A%7D%0A%7D%2C%0A_marshalAnnotatedListeners%3A%20function%20()%20%7B%0Athis._notes.forEach(function%20(a)%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%0Aa.events.forEach(function%20(e)%20%7B%0Athis.listen(node%2C%20e.name%2C%20e.value)%3B%0A%7D%2C%20this)%3B%0A%7D%0A%7D%2C%20this)%3B%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%20key%3B%0Afor%20(key%20in%20listeners)%20%7B%0Aif%20(key.indexOf('.')%20%3C%200)%20%7B%0Anode%20%3D%20this%3B%0Aname%20%3D%20key%3B%0A%7D%20else%20%7B%0Aname%20%3D%20key.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%5Bkey%5D)%3B%0A%7D%0A%7D%2C%0Alisten%3A%20function%20(node%2C%20eventName%2C%20methodName)%20%7B%0Athis._listen(node%2C%20eventName%2C%20this._createEventHandler(node%2C%20eventName%2C%20methodName))%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%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%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%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%20ev.currentTarget%3B%0Avar%20gobj%20%3D%20node%5BGESTURE_KEY%5D%3B%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%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%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%0A%7D%0Aif%20(gd._count%20%3D%3D%3D%200)%20%7B%0Anode.removeEventListener(dep%2C%20this.handleNative)%3B%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%20Gestures.prevent.bind(Gestures)%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%20(window.MutationObserver%20%7C%7C%20JsMutationObserver)(Polymer.Async._atEndOfMicrotask.bind(Polymer.Async)).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%0Athis.boundComplete%20%3D%20this.complete.bind(this)%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%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%20Polymer.nob%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%20event%20%3D%20new%20CustomEvent(type%2C%20%7B%0Abubbles%3A%20Boolean(bubbles)%2C%0Acancelable%3A%20cancelable%2C%0Adetail%3A%20detail%0A%7D)%3B%0Anode.dispatchEvent(event)%3B%0Areturn%20event%3B%0A%7D%2C%0Aasync%3A%20function%20(callback%2C%20waitTime)%20%7B%0Areturn%20Polymer.Async.run(callback.bind(this)%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%0Aif%20(onload)%20%7B%0Al.onload%20%3D%20onload.bind(this)%3B%0A%7D%0Aif%20(onerror)%20%7B%0Al.onerror%20%3D%20onerror.bind(this)%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%0A%7D)%3B%0APolymer.Bind%20%3D%20%7B%0AprepareModel%3A%20function%20(model)%20%7B%0Amodel._propertyEffects%20%3D%20%7B%7D%3B%0Amodel._bindListeners%20%3D%20%5B%5D%3B%0APolymer.Base.mixin(model%2C%20this._modelApi)%3B%0A%7D%2C%0A_modelApi%3A%20%7B%0A_notifyChange%3A%20function%20(property)%20%7B%0Avar%20eventName%20%3D%20Polymer.CaseMap.camelToDashCase(property)%20%2B%20'-changed'%3B%0APolymer.Base.fire(eventName%2C%20%7B%20value%3A%20this%5Bproperty%5D%20%7D%2C%20%7B%0Abubbles%3A%20false%2C%0Anode%3A%20this%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%0Aeffects.forEach(function%20(fx)%20%7B%0Avar%20fn%20%3D%20Polymer.Bind%5B'_'%20%2B%20fx.kind%20%2B%20'Effect'%5D%3B%0Aif%20(fn)%20%7B%0Afn.call(this%2C%20property%2C%20value%2C%20fx.effect%2C%20old%2C%20fromAbove)%3B%0A%7D%0A%7D%2C%20this)%3B%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%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%0Afx.push(%7B%0Akind%3A%20kind%2C%0Aeffect%3A%20effect%0A%7D)%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%0Avar%20fn%20%3D%20this._notedListenerFactory(property%2C%20path%2C%20this._isStructured(path)%2C%20this._isEventBogus)%3B%0Avar%20eventName%20%3D%20event%20%7C%7C%20Polymer.CaseMap.camelToDashCase(property)%20%2B%20'-changed'%3B%0Amodel._bindListeners.push(%7B%0Aindex%3A%20index%2C%0Aproperty%3A%20property%2C%0Apath%3A%20path%2C%0AchangedFn%3A%20fn%2C%0Aevent%3A%20eventName%0A%7D)%3B%0A%7D%2C%0A_isStructured%3A%20function%20(path)%20%7B%0Areturn%20path.indexOf('.')%20%3E%200%3B%0A%7D%2C%0A_isEventBogus%3A%20function%20(e%2C%20target)%20%7B%0Areturn%20e.path%20%26%26%20e.path%5B0%5D%20!%3D%3D%20target%3B%0A%7D%2C%0A_notedListenerFactory%3A%20function%20(property%2C%20path%2C%20isStructured%2C%20bogusTest)%20%7B%0Areturn%20function%20(e%2C%20target)%20%7B%0Aif%20(!bogusTest(e%2C%20target))%20%7B%0Aif%20(e.detail%20%26%26%20e.detail.path)%20%7B%0Athis.notifyPath(this._fixPath(path%2C%20property%2C%20e.detail.path)%2C%20e.detail.value)%3B%0A%7D%20else%20%7B%0Avar%20value%20%3D%20target%5Bproperty%5D%3B%0Aif%20(!isStructured)%20%7B%0Athis%5Bpath%5D%20%3D%20target%5Bproperty%5D%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%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%0Ainst._bindListeners.forEach(function%20(info)%20%7B%0Avar%20node%20%3D%20inst._nodes%5Binfo.index%5D%3B%0Anode.addEventListener(info.event%2C%20inst._notifyListener.bind(inst%2C%20info.changedFn))%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.mode%20%3D%3D%3D%20'%7B'%20%26%26%20!effect.negate%20%26%26%20effect.kind%20!%3D%20'attribute'%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(calc%2C%20effect)%3B%0A%7D%0A%7D%2C%0A_reflectEffect%3A%20function%20(source)%20%7B%0Athis.reflectPropertyToAttribute(source)%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)%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.property%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(computedvalue%2C%20effect)%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%0APolymer.Bind.addPropertyEffect(this%2C%20property%2C%20kind%2C%20effect)%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')%3B%0A%7D%0Aif%20(prop.reflectToAttribute)%20%7B%0Athis._addPropertyEffect(p%2C%20'reflect')%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%0Asig.args.forEach(function%20(arg)%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%0Aproperty%3A%20name%0A%7D)%3B%0A%7D%2C%20this)%3B%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%0Aobservers.forEach(function%20(observer)%20%7B%0Athis._addComplexObserverEffect(observer)%3B%0A%7D%2C%20this)%3B%0A%7D%0A%7D%2C%0A_addComplexObserverEffect%3A%20function%20(observer)%20%7B%0Avar%20sig%20%3D%20this._parseMethod(observer)%3B%0Asig.args.forEach(function%20(arg)%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%2C%20this)%3B%0A%7D%2C%0A_addAnnotationEffects%3A%20function%20(notes)%20%7B%0Athis._nodes%20%3D%20%5B%5D%3B%0Anotes.forEach(function%20(note)%20%7B%0Avar%20index%20%3D%20this._nodes.push(note)%20-%201%3B%0Anote.bindings.forEach(function%20(binding)%20%7B%0Athis._addAnnotationEffect(binding%2C%20index)%3B%0A%7D%2C%20this)%3B%0A%7D%2C%20this)%3B%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.value%2C%20note.event)%3B%0A%7D%0Aif%20(note.signature)%20%7B%0Athis._addAnnotatedComputationEffect(note%2C%20index)%3B%0A%7D%20else%20%7B%0Anote.index%20%3D%20index%3B%0Athis._addPropertyEffect(note.model%2C%20'annotation'%2C%20note)%3B%0A%7D%0A%7D%2C%0A_addAnnotatedComputationEffect%3A%20function%20(note%2C%20index)%20%7B%0Avar%20sig%20%3D%20note.signature%3B%0Aif%20(sig.static)%20%7B%0Athis.__addAnnotatedComputationEffect('__static__'%2C%20index%2C%20note%2C%20sig%2C%20null)%3B%0A%7D%20else%20%7B%0Asig.args.forEach(function%20(arg)%20%7B%0Aif%20(!arg.literal)%20%7B%0Athis.__addAnnotatedComputationEffect(arg.model%2C%20index%2C%20note%2C%20sig%2C%20arg)%3B%0A%7D%0A%7D%2C%20this)%3B%0A%7D%0A%7D%2C%0A__addAnnotatedComputationEffect%3A%20function%20(property%2C%20index%2C%20note%2C%20sig%2C%20trigger)%20%7B%0Athis._addPropertyEffect(property%2C%20'annotatedComputation'%2C%20%7B%0Aindex%3A%20index%2C%0Akind%3A%20note.kind%2C%0Aproperty%3A%20note.name%2C%0Anegate%3A%20note.negate%2C%0Amethod%3A%20sig.method%2C%0Aargs%3A%20sig.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%0APolymer.Bind.setupBindListeners(this)%3B%0A%7D%2C%0A_applyEffectValue%3A%20function%20(value%2C%20info)%20%7B%0Avar%20node%20%3D%20this._nodes%5Binfo.index%5D%3B%0Avar%20property%20%3D%20info.property%20%7C%7C%20info.name%20%7C%7C%20'textContent'%3B%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%0Areturn%20node%5Bproperty%5D%20%3D%20value%3B%0A%7D%0A%7D%2C%0A_executeStaticEffects%3A%20function%20()%20%7B%0Aif%20(this._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%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%0Athis._handlers%20%3D%20%5B%5D%3B%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%0Athis._config%5Bname%5D%20%3D%20value%3B%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%0Athis.behaviors.forEach(function%20(b)%20%7B%0Athis._configureProperties(b.properties%2C%20config)%3B%0A%7D%2C%20this)%3B%0Athis._configureProperties(this.properties%2C%20config)%3B%0Athis._mixinConfigure(config%2C%20this._aboveConfig)%3B%0Athis._config%20%3D%20config%3B%0Athis._distributeConfig(this._config)%3B%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_mixinConfigure%3A%20function%20(a%2C%20b)%20%7B%0Afor%20(var%20prop%20in%20b)%20%7B%0Aif%20(!this.getPropertyInfo(prop).readOnly)%20%7B%0Aa%5Bprop%5D%20%3D%20b%5Bprop%5D%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%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(!this._clientsReadied)%20%7B%0Athis._queueHandler(%5B%0Afn%2C%0Ae%2C%0Ae.target%0A%5D)%3B%0A%7D%20else%20%7B%0Areturn%20fn.call(this%2C%20e%2C%20e.target)%3B%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)%3B%0A%7D%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%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._notifyPath(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%0Aprop%20%3D%20prop%5Bpart%5D%3B%0Aif%20(array%20%26%26%20parseInt(part)%20%3D%3D%20part)%20%7B%0Aparts%5Bi%5D%20%3D%20Polymer.Collection.get(array).getKey(prop)%3B%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%26%26%20parseInt(last)%20%3D%3D%20last)%20%7B%0Avar%20coll%20%3D%20Polymer.Collection.get(array)%3B%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%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%0Avar%20prop%20%3D%20root%20%7C%7C%20this%3B%0Avar%20parts%20%3D%20this._getPathParts(path)%3B%0Avar%20last%20%3D%20parts.pop()%3B%0Awhile%20(parts.length)%20%7B%0Aprop%20%3D%20prop%5Bparts.shift()%5D%3B%0Aif%20(!prop)%20%7B%0Areturn%3B%0A%7D%0A%7D%0Areturn%20prop%5Blast%5D%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%5Bmodel%5D%3B%0Aif%20(fx%24)%20%7B%0Afx%24.forEach(function%20(fx)%20%7B%0Avar%20fxFn%20%3D%20this%5B'_'%20%2B%20fx.kind%20%2B%20'PathEffect'%5D%3B%0Aif%20(fxFn)%20%7B%0AfxFn.call(this%2C%20path%2C%20value%2C%20fx.effect)%3B%0A%7D%0A%7D%2C%20this)%3B%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.unbindPath(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%0Avar%20from%2C%20to%3B%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%0Afrom%20%3D%20a%3B%0Ato%20%3D%20b%3B%0Abreak%3B%0A%7D%0Aif%20(path.indexOf(b%20%2B%20'.')%20%3D%3D%200)%20%7B%0Afrom%20%3D%20b%3B%0Ato%20%3D%20a%3B%0Abreak%3B%0A%7D%0A%7D%0Aif%20(from%20%26%26%20to)%20%7B%0Avar%20p%20%3D%20this._fixPath(to%2C%20from%2C%20path)%3B%0Athis.notifyPath(p%2C%20value)%3B%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_notifyPath%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%20bubbles%3A%20false%20%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%0A_notifySplice%3A%20function%20(array%2C%20path%2C%20index%2C%20added%2C%20removed)%20%7B%0Avar%20splices%20%3D%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%0Avar%20change%20%3D%20%7B%0AkeySplices%3A%20Polymer.Collection.applySplices(array%2C%20splices)%2C%0AindexSplices%3A%20splices%0A%7D%3B%0Athis.set(path%20%2B%20'.splices'%2C%20change)%3B%0Aif%20(added%20!%3D%20removed.length)%20%7B%0Athis.notifyPath(path%20%2B%20'.length'%2C%20array.length)%3B%0A%7D%0Achange.keySplices%20%3D%20null%3B%0Achange.indexSplices%20%3D%20null%3B%0A%7D%2C%0Apush%3A%20function%20(path)%20%7B%0Avar%20array%20%3D%20this.get(path)%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%20path%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%20array%20%3D%20this.get(path)%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%20path%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%20array%20%3D%20this.get(path)%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%20path%2C%20start%2C%20addedCount%2C%20ret)%3B%0A%7D%0Areturn%20ret%3B%0A%7D%2C%0Ashift%3A%20function%20(path)%20%7B%0Avar%20array%20%3D%20this.get(path)%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%20path%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%20array%20%3D%20this.get(path)%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%20path%2C%200%2C%20args.length%2C%20%5B%5D)%3B%0A%7D%0Areturn%20ret%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%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%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%3E%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%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)--%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*var%5B%5E%3B%5D*(%3F%3A%5B%3B%5Cn%5D%7C%24)%3F%2Fgim%2C%0AkeyframesRule%3A%20%2F%5E%40%5B%5E%5Cs%5D*keyframes%2F%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%0A_cssFromElement%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%20Array.prototype.slice.call(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(target.extends%20%3D%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%0Athis._styles%20%3D%20this._collectStyles()%3B%0Avar%20cssText%20%3D%20styleTransformer.elementStyles(this)%3B%0Aif%20(cssText%20%26%26%20this._template)%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%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%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%0AArray.prototype.forEach.call(n%24%2C%20function%20(n)%20%7B%0An.className%20%3D%20self._scopeElementClass(n%2C%20n.className)%3B%0A%7D)%3B%0A%7D%0A%7D%3B%0Ascopify(container)%3B%0Aif%20(shouldObserve)%20%7B%0Avar%20mo%20%3D%20new%20MutationObserver(function%20(mxns)%20%7B%0Amxns.forEach(function%20(m)%20%7B%0Aif%20(m.addedNodes)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20m.addedNodes.length%3B%20i%2B%2B)%20%7B%0Ascopify(m.addedNodes%5Bi%5D)%3B%0A%7D%0A%7D%0A%7D)%3B%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.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%5Cn%5D%5Cs*)(--%5B%5Cw-%5D*%3F)%3A%5Cs*(%3F%3A(%5B%5E%3B%7B%5D*)%7C%7B(%5B%5E%7D%5D*)%7D)(%3F%3A(%3F%3D%5B%3B%5Cn%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%20%5B%5D%3B%0A%7D%2C%0AcustomStyle%3A%20%7B%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%20Polymer.dom(node)%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._prepAttributes()%3B%0Athis._prepConstructor()%3B%0Athis._prepTemplate()%3B%0Athis._prepStyles()%3B%0Athis._prepStyleProperties()%3B%0Athis._prepAnnotations()%3B%0Athis._prepEffects()%3B%0Athis._prepBehaviors()%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._poolContent()%3B%0Athis._setupConfigure()%3B%0Athis._setupStyleProperties()%3B%0Athis._pushHost()%3B%0Athis._stampTemplate()%3B%0Athis._popHost()%3B%0Athis._marshalAnnotationReferences()%3B%0Athis._setupDebouncers()%3B%0Athis._marshalInstanceEffects()%3B%0Athis._marshalHostAttributes()%3B%0Athis._marshalBehaviors()%3B%0Athis._marshalAttributes()%3B%0Athis._tryReady()%3B%0A%7D%2C%0A_marshalBehavior%3A%20function%20(b)%20%7B%0Athis._listenListeners(b.listeners)%3B%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%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()%3B%0A%7D%20else%20%7B%0Avar%20observer%20%3D%20new%20MutationObserver(function%20()%20%7B%0Aobserver.disconnect()%3B%0Athis._apply()%3B%0A%7D.bind(this))%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()%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%0Athis._applyCustomProperties(e)%3B%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%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%0Aarchetype._prepEffects()%3B%0Athis._customPrepEffects(archetype)%3B%0Aarchetype._prepBehaviors()%3B%0Aarchetype._prepBindings()%3B%0Athis._prepParentProperties(archetype%2C%20template)%3B%0Aarchetype._notifyPath%20%3D%20this._notifyPathImpl%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%20rootDataHost._prepElement.bind(rootDataHost)%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%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)%0A%7D%2C%0A%7B%20kind%3A%20'notify'%20%7D%0A%5D%3B%0APolymer.Bind._createAccessors(proto%2C%20parentProp%2C%20effects)%3B%0A%7D%0A%7D%0Aif%20(template%20!%3D%20this)%20%7B%0APolymer.Bind.prepareInstance(template)%3B%0Atemplate._forwardParentProp%20%3D%20this._forwardParentProp.bind(this)%3B%0A%7D%0Athis._extendTemplate(template%2C%20proto)%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%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%0AObject.getOwnPropertyNames(proto).forEach(function%20(n)%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)%3B%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_notifyPathImpl%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.notifyPath(dataHost._parentPropPrefix%20%2B%20path%2C%20value)%3B%0A%7D%0A%7D%2C%0A_pathEffector%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%0Athis._forwardParentPath(path.substring(8)%2C%20value)%3B%0A%7D%0A%7D%0APolymer.Base._pathEffector.apply(this%2C%20arguments)%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._pushHost(host)%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._popHost()%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%0Afor%20(var%20prop%20in%20this._parentProps)%20%7B%0Amodel%5Bprop%5D%20%3D%20this%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%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%20key%3B%0A%7D%2C%0AremoveKey%3A%20function%20(key)%20%7B%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%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Areturn%20this.omap.get(item)%3B%0A%7D%20else%20%7B%0Areturn%20this.pmap%5Bitem%5D%3B%0A%7D%0A%7D%2C%0AgetKeys%3A%20function%20()%20%7B%0Areturn%20Object.keys(this.store)%3B%0A%7D%2C%0AsetItem%3A%20function%20(key%2C%20item)%20%7B%0Avar%20old%20%3D%20this.store%5Bkey%5D%3B%0Aif%20(old)%20%7B%0Athis._removeFromMap(old)%3B%0A%7D%0Aif%20(item%20%26%26%20typeof%20item%20%3D%3D%20'object')%20%7B%0Athis.omap.set(item%2C%20key)%3B%0A%7D%20else%20%7B%0Athis.pmap%5Bitem%5D%20%3D%20key%3B%0A%7D%0Athis.store%5Bkey%5D%20%3D%20item%3B%0A%7D%2C%0AgetItem%3A%20function%20(key)%20%7B%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%2C%20i%3B%0Asplices.forEach(function%20(s)%20%7B%0As.addedKeys%20%3D%20%5B%5D%3B%0Afor%20(i%20%3D%200%3B%20i%20%3C%20s.removed.length%3B%20i%2B%2B)%20%7B%0Akey%20%3D%20this.getKey(s.removed%5Bi%5D)%3B%0AkeyMap%5Bkey%5D%20%3D%20keyMap%5Bkey%5D%20%3F%20null%20%3A%20-1%3B%0A%7D%0Afor%20(i%20%3D%200%3B%20i%20%3C%20s.addedCount%3B%20i%2B%2B)%20%7B%0Avar%20item%20%3D%20this.userArray%5Bs.index%20%2B%20i%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%2C%20this)%3B%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%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%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%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._detachRow(i)%3B%0A%7D%0A%7D%2C%0Aattached%3A%20function%20()%20%7B%0Avar%20parentNode%20%3D%20Polymer.dom(this).parentNode%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20this._instances.length%3B%20i%2B%2B)%20%7B%0APolymer.dom(parentNode).insertBefore(this._instances%5Bi%5D.root%2C%20this)%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()%20%7B%0Avar%20dataHost%20%3D%20this._getRootDataHost()%3B%0Avar%20sort%20%3D%20this.sort%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()%20%7B%0Avar%20dataHost%20%3D%20this._getRootDataHost()%3B%0Avar%20filter%20%3D%20this.filter%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_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._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%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%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%200%3B%20i%20%3C%20this._instances.length%3B%20i%2B%2B)%20%7B%0Avar%20inst%20%3D%20this._instances%5Bi%5D%3B%0AkeyToIdx%5Binst.__key__%5D%20%3D%20i%3B%0Ainst.__setProperty(this.indexAs%2C%20i%2C%20true)%3B%0A%7D%0Athis.fire('dom-change')%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%0Aif%20(this._filterFn)%20%7B%0Akeys%20%3D%20keys.filter(function%20(a)%20%7B%0Areturn%20this._filterFn(c.getItem(a))%3B%0A%7D%2C%20this)%3B%0A%7D%0Aif%20(this._sortFn)%20%7B%0Akeys.sort(function%20(a%2C%20b)%20%7B%0Areturn%20this._sortFn(c.getItem(a)%2C%20c.getItem(b))%3B%0A%7D.bind(this))%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.__setProperty('__key__'%2C%20key%2C%20true)%3B%0Ainst.__setProperty(this.as%2C%20c.getItem(key)%2C%20true)%3B%0A%7D%20else%20%7B%0Athis._instances.push(this._insertRow(i%2C%20key))%3B%0A%7D%0A%7D%0Afor%20(%3B%20i%20%3C%20this._instances.length%3B%20i%2B%2B)%20%7B%0Athis._detachRow(i)%3B%0A%7D%0Athis._instances.splice(keys.length%2C%20this._instances.length%20-%20keys.length)%3B%0A%7D%2C%0A_keySort%3A%20function%20(a%2C%20b)%20%7B%0Areturn%20this.collection.getKey(a)%20-%20this.collection.getKey(b)%3B%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%0Avar%20pool%20%3D%20%5B%5D%3B%0Avar%20sortFn%20%3D%20this._sortFn%20%7C%7C%20this._keySort.bind(this)%3B%0Asplices.forEach(function%20(s)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20s.removed.length%3B%20i%2B%2B)%20%7B%0Avar%20key%20%3D%20s.removed%5Bi%5D%3B%0AkeyMap%5Bkey%5D%20%3D%20keyMap%5Bkey%5D%20%3F%20null%20%3A%20-1%3B%0A%7D%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20s.added.length%3B%20i%2B%2B)%20%7B%0Avar%20key%20%3D%20s.added%5Bi%5D%3B%0AkeyMap%5Bkey%5D%20%3D%20keyMap%5Bkey%5D%20%3F%20null%20%3A%201%3B%0A%7D%0A%7D%2C%20this)%3B%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%0Apool.push(this._detachRow(idx))%3B%0Ainstances.splice(idx%2C%201)%3B%0A%7D%0A%7D%0A%7D%0Aif%20(addedKeys.length)%20%7B%0Aif%20(this._filterFn)%20%7B%0AaddedKeys%20%3D%20addedKeys.filter(function%20(a)%20%7B%0Areturn%20this._filterFn(c.getItem(a))%3B%0A%7D%2C%20this)%3B%0A%7D%0AaddedKeys.sort(function%20(a%2C%20b)%20%7B%0Areturn%20this._sortFn(c.getItem(a)%2C%20c.getItem(b))%3B%0A%7D.bind(this))%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%2C%20pool)%3B%0A%7D%0A%7D%0A%7D%2C%0A_insertRowUserSort%3A%20function%20(start%2C%20key%2C%20pool)%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%0Avar%20sortFn%20%3D%20this._sortFn%20%7C%7C%20this._keySort.bind(this)%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%20sortFn(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._instances.splice(idx%2C%200%2C%20this._insertRow(idx%2C%20key%2C%20pool))%3B%0Areturn%20idx%3B%0A%7D%2C%0A_applySplicesArrayOrder%3A%20function%20(splices)%20%7B%0Avar%20pool%20%3D%20%5B%5D%3B%0Avar%20c%20%3D%20this.collection%3B%0Asplices.forEach(function%20(s)%20%7B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20s.removed.length%3B%20i%2B%2B)%20%7B%0Avar%20inst%20%3D%20this._detachRow(s.index%20%2B%20i)%3B%0Aif%20(!inst.isPlaceholder)%20%7B%0Apool.push(inst)%3B%0A%7D%0A%7D%0Athis._instances.splice(s.index%2C%20s.removed.length)%3B%0Afor%20(var%20i%20%3D%200%3B%20i%20%3C%20s.addedKeys.length%3B%20i%2B%2B)%20%7B%0Avar%20inst%20%3D%20%7B%0AisPlaceholder%3A%20true%2C%0Akey%3A%20s.addedKeys%5Bi%5D%0A%7D%3B%0Athis._instances.splice(s.index%20%2B%20i%2C%200%2C%20inst)%3B%0A%7D%0A%7D%2C%20this)%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%7B%0Athis._instances%5Bi%5D%20%3D%20this._insertRow(i%2C%20inst.key%2C%20pool%2C%20true)%3B%0A%7D%0A%7D%0A%7D%2C%0A_detachRow%3A%20function%20(idx)%20%7B%0Avar%20inst%20%3D%20this._instances%5Bidx%5D%3B%0Aif%20(!inst.isPlaceholder)%20%7B%0Avar%20parentNode%20%3D%20Polymer.dom(this).parentNode%3B%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%0A%7D%0Areturn%20inst%3B%0A%7D%2C%0A_insertRow%3A%20function%20(idx%2C%20key%2C%20pool%2C%20replace)%20%7B%0Avar%20inst%3B%0Aif%20(inst%20%3D%20pool%20%26%26%20pool.pop())%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._generateRow(idx%2C%20key)%3B%0A%7D%0Avar%20beforeRow%20%3D%20this._instances%5Breplace%20%3F%20idx%20%2B%201%20%3A%20idx%5D%3B%0Avar%20beforeNode%20%3D%20beforeRow%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%0Areturn%20inst%3B%0A%7D%2C%0A_generateRow%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%0Avar%20inst%20%3D%20this.stamp(model)%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%0Athis._instances.forEach(function%20(inst)%20%7B%0Ainst.__setProperty(prop%2C%20value%2C%20true)%3B%0A%7D%2C%20this)%3B%0A%7D%2C%0A_forwardParentPath%3A%20function%20(path%2C%20value)%20%7B%0Athis._instances.forEach(function%20(inst)%20%7B%0Ainst.notifyPath(path%2C%20value%2C%20true)%3B%0A%7D%2C%20this)%3B%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%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%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%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%0Askey%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%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%0Athis._instance%20%3D%20this.stamp()%3B%0Avar%20root%20%3D%20this._instance.root%3B%0Avar%20parent%20%3D%20Polymer.dom(Polymer.dom(this).parentNode)%3B%0Aparent.insertBefore(root%2C%20this)%3B%0A%7D%0A%7D%2C%0A_teardownInstance%3A%20function%20()%20%7B%0Aif%20(this._instance)%20%7B%0Avar%20c%20%3D%20this._instance._children%3B%0Aif%20(c)%20%7B%0Avar%20parent%20%3D%20Polymer.dom(Polymer.dom(c%5B0%5D).parentNode)%3B%0Ac.forEach(function%20(n)%20%7B%0Aparent.removeChild(n)%3B%0A%7D)%3B%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%0Acreated%3A%20function%20()%20%7B%0APolymer.RenderStatus.whenReady(this._markImportsReady.bind(this))%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%0Athis._setupConfigure%20%3D%20this._setupConfigure.bind(this%2C%20config)%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%0APolymer.Base._initFeatures.call(this)%3B%0Athis._children%20%3D%20Array.prototype.slice.call(this.root.childNodes)%3B%0A%7D%0Athis._insertChildren()%3B%0Athis.fire('dom-change')%3B%0A%7D%0A%7D)%3B%0A%2F%2F%23%20sourceURL%3Dhttp%3A%2F%2Ffileserver.glam.com%2Fwebcomponents%2Flatest%2Fpolymer%2Fpolymer.html-2.js%0A
6 ms
javascript;charset=utf-8,(function%20e(t%2Cn%2Cr)%7Bfunction%20s(o%2Cu)%7Bif(!n%5Bo%5D)%7Bif(!t%5Bo%5D)%7Bvar%20a%3Dtypeof%20require%3D%3D%22function%22%26%26require%3Bif(!u%26%26a)return%20a(o%2C!0)%3Bif(i)return%20i(o%2C!0)%3Bvar%20f%3Dnew%20Error(%22Cannot%20find%20module%20'%22%2Bo%2B%22'%22)%3Bthrow%20f.code%3D%22MODULE_NOT_FOUND%22%2Cf%7Dvar%20l%3Dn%5Bo%5D%3D%7Bexports%3A%7B%7D%7D%3Bt%5Bo%5D%5B0%5D.call(l.exports%2Cfunction(e)%7Bvar%20n%3Dt%5Bo%5D%5B1%5D%5Be%5D%3Breturn%20s(n%3Fn%3Ae)%7D%2Cl%2Cl.exports%2Ce%2Ct%2Cn%2Cr)%7Dreturn%20n%5Bo%5D.exports%7Dvar%20i%3Dtypeof%20require%3D%3D%22function%22%26%26require%3Bfor(var%20o%3D0%3Bo%3Cr.length%3Bo%2B%2B)s(r%5Bo%5D)%3Breturn%20s%7D)(%7B1%3A%5Bfunction(require%2Cmodule%2Cexports)%7B%0A%22use%20strict%22%3Bwindow.ModeBehaviors%3Dwindow.ModeBehaviors%7C%7C%7B%7D%2Cwindow.ModeBehaviors.PathBehaviour%3D%7Bproperties%3A%7Bpath%3A%7Btype%3AObject%2Cvalue%3Afunction()%7Breturn%7Bad%3A%22assets%2F%22%2C%22static%22%3A%22static_assets%2F%22%7D%7D%7D%7D%2CgetPath%3Afunction(t)%7Breturn%20this.path.ad%2Bt%7D%2CgetStaticPath%3Afunction(t)%7Breturn%20this.path%5B%22static%22%5D%2Bt%7D%7D%3B%0A%0A%7D%2C%7B%7D%5D%7D%2C%7B%7D%2C%5B1%5D)%0A%2F%2F%23%20sourceMappingURL%3Dindex.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttp%3A%2F%2Ffileserver.glam.com%2Fwebcomponents%2Flatest%2Fmode-core%2Fmode-core.html.js%0A
1 ms
javascript;charset=utf-8,(function%20e(t%2Cn%2Cr)%7Bfunction%20s(o%2Cu)%7Bif(!n%5Bo%5D)%7Bif(!t%5Bo%5D)%7Bvar%20a%3Dtypeof%20require%3D%3D%22function%22%26%26require%3Bif(!u%26%26a)return%20a(o%2C!0)%3Bif(i)return%20i(o%2C!0)%3Bvar%20f%3Dnew%20Error(%22Cannot%20find%20module%20'%22%2Bo%2B%22'%22)%3Bthrow%20f.code%3D%22MODULE_NOT_FOUND%22%2Cf%7Dvar%20l%3Dn%5Bo%5D%3D%7Bexports%3A%7B%7D%7D%3Bt%5Bo%5D%5B0%5D.call(l.exports%2Cfunction(e)%7Bvar%20n%3Dt%5Bo%5D%5B1%5D%5Be%5D%3Breturn%20s(n%3Fn%3Ae)%7D%2Cl%2Cl.exports%2Ce%2Ct%2Cn%2Cr)%7Dreturn%20n%5Bo%5D.exports%7Dvar%20i%3Dtypeof%20require%3D%3D%22function%22%26%26require%3Bfor(var%20o%3D0%3Bo%3Cr.length%3Bo%2B%2B)s(r%5Bo%5D)%3Breturn%20s%7D)(%7B1%3A%5Bfunction(require%2Cmodule%2Cexports)%7B%0A%22use%20strict%22%3Bfunction%20getStyle(t%2Ci)%7Breturn%20window.getComputedStyle(t)%5Bi%5D%7Dfunction%20updateViewBoxBounds(t%2Ci)%7Bvar%20e%3D%7Btop%3AMath.max(t.top%2Ci.top)%2Cleft%3AMath.max(t.left%2Ci.left)%2Cbottom%3AMath.min(t.bottom%2Ci.bottom)%2Cright%3AMath.min(t.right%2Ci.right)%2Chidden%3At.hidden%7D%3Breturn%20e.w%3De.right-e.left%2Ce.h%3De.bottom-e.top%2Ce%7Dfunction%20ElementVisibility(t%2Ci%2Ce)%7Bthis.polymer_el%3Dt%2Cthis.el%3Di%2Cthis.event_name%3De%2Cthis.should_track%3D!!e%2Cthis.w%3D0%2Cthis.h%3D0%2Cthis.top%3D0%2Cthis.right%3D0%2Cthis.bottom%3D0%2Cthis.left%3D0%2Cthis.duration%3D0%2Cthis.removed%3D!0%2Cthis.floating%3Dt.forceInView%2Cthis.should_track%26%26this.polymer_el.fire(%22mode-counter%22%2C%7Bname%3Athis.event_name%2Cvalue%3A%22init%22%7D)%7DObject.defineProperty(exports%2C%22__esModule%22%2C%7Bvalue%3A!0%7D)%3Bvar%20VIEW_THRESHOLD%3D.5%2CLARGE_VIEW_THRESHOLD%3D.3%2CQUALIFIED_TIME%3D1e3%3BElementVisibility.prototype%3D%7B_updateElementViewportBox%3Afunction(t%2Ci)%7Bif(i%26%26(this.was_hidden%3Dthis.hidden%2Cthis.hidden%3D!1)%2Ct%26%269!%3D%3Dt.nodeType)%7Bvar%20e%3Dt.parentNode%3Bif(!e)return%20this.hidden%3D!0%2Cvoid(!this.was_hidden%26%26this.should_track%26%26this.polymer_el.fire(%22mode-counter%22%2C%7Bname%3Athis.event_name%2Cvalue%3A%22warning-not-in-dom%22%7D))%3Bif(%220%22!%3D%3DgetStyle(t%2C%22opacity%22)%26%26%22none%22!%3D%3DgetStyle(t%2C%22display%22)%26%26%22hidden%22!%3D%3DgetStyle(t%2C%22visibility%22))%7Bvar%20s%3DgetStyle(t%2C%22overflow%22)%3Bif(!i%26%26(%22hidden%22%3D%3D%3Ds%7C%7C%22scroll%22%3D%3D%3Ds))%7Bvar%20h%3Dt.getBoundingClientRect()%3Bthis.vp%3DupdateViewBoxBounds(this.vp%2Ch)%2C%22scroll%22%3D%3D%3Ds%26%26(this.max_vp%3DupdateViewBoxBounds(this.max_vp%2Ch))%7Dreturn%20this._updateElementViewportBox(e%2C!1)%7Dif(this.hidden%3D!0%2C!this.was_hidden%26%26this.should_track)%7Bvar%20o%3Di%3F%22warning-hidden%22%3A%22warning-parent-hidden%22%3Bthis.polymer_el.fire(%22mode-counter%22%2C%7Bname%3Athis.event_name%2Cvalue%3Ao%7D)%7D%7D%7D%2CupdatePosition%3Afunction(t)%7Bif(this.vp%3Dt%2Cthis.max_vp%3Dt%2Cthis.removed%7C%7Cthis.floating)return%20this%3Bvar%20i%3Dthis.el.getBoundingClientRect()%3Breturn%20this.top%3Di.top%2Cthis.left%3Di.left%2Cthis.bottom%3Di.bottom%2Cthis.right%3Di.right%2Cthis.w%3Di.right-i.left%2Cthis.h%3Di.bottom-i.top%2Cthis.is_large%3Dthis.w*this.h%3E242500%2Cthis.el%26%26this._updateElementViewportBox(this.el%2C!0)%2Cthis%7D%2C_getPercentVisible%3Afunction()%7Bvar%20t%2Ci%3Bthis.top%3E%3Dthis.vp.bottom%7C%7Cthis.bottom%3C%3Dthis.vp.top%3Ft%3D0%3A(t%3Dthis.h%2Cthis.top%3Cthis.vp.bottom%26%26this.bottom%3Ethis.vp.bottom%26%26(t-%3Dthis.bottom-this.vp.bottom)%2Cthis.bottom%3Ethis.vp.top%26%26this.top%3Cthis.vp.top%26%26(t-%3Dthis.vp.top-this.top))%2Cthis.left%3E%3Dthis.vp.right%7C%7Cthis.right%3C%3Dthis.vp.left%3Fi%3D0%3A(i%3Dthis.w%2Cthis.left%3Cthis.vp.right%26%26this.right%3Ethis.vp.right%26%26(i-%3Dthis.right-this.vp.right)%2Cthis.right%3Ethis.vp.left%26%26this.left%3Cthis.vp.left%26%26(i-%3Dthis.vp.left-this.left))%3Bvar%20e%2Cs%3Di*t%3Be%3Dthis.is_large%3Fthis.w*this.h%3AMath.min(this.w%2Cthis.max_vp.w)*Math.min(this.h%2Cthis.max_vp.h)%3Bvar%20h%3D0%3D%3D%3De%3F0%3As%2Fe%3Breturn%20h%7D%2Creport%3Afunction()%7Bvar%20t%2Ci%3Dthis.polymer_el.visibilityState%2Ce%3D%2Bnew%20Date%3Bif(this.removed)t%3D!1%3Belse%20if(this.vp.hidden)t%3D!1%3Belse%20if(this.floating)t%3D!0%3Belse%20if(this.hidden)t%3D!1%3Belse%7Bvar%20s%3Dthis._getPercentVisible()%3Bt%3Dthis.is_large%3Fs%3E%3DLARGE_VIEW_THRESHOLD%3As%3E%3DVIEW_THRESHOLD%7Dreturn%20t%3F%22visible%22!%3D%3Di%26%26%22qualified%22!%3D%3Di%3F(this.polymer_el._setVisibilityState(%22visible%22)%2Cthis.should_track%26%26this.polymer_el.fire(%22mode-timer%22%2C%7Bname%3Athis.event_name%7D)%2Cthis.lastSeen%3De)%3A%22qualified%22!%3D%3Di%26%26e-this.lastSeen%3E%3DQUALIFIED_TIME%26%26(this.polymer_el._setVisibilityState(%22qualified%22)%2Cthis.should_track%26%26(this.polymer_el.fire(%22mode-counter%22%2C%7Bname%3Athis.event_name%2Cvalue%3A%22qualified%22%7D)%2Cthis.impression%7C%7C(this.polymer_el.fire(%22mode-counter%22%2C%7Bname%3Athis.event_name%2Cvalue%3A%22impression%22%7D)%2Cthis.impression%3D1)))%3A%22hidden%22!%3D%3Di%26%26(this.polymer_el._setVisibilityState(%22hidden%22)%2Cthis.should_track%26%26this.polymer_el.fire(%22mode-timer%22%2C%7Bname%3Athis.event_name%2Cstop%3A!0%7D)%2Cthis.lastSeen%26%26(this.duration%2B%3De-this.lastSeen))%2Cthis%7D%2CsetForced%3Afunction(t)%7Breturn%20this.floating%3Dt%2Cthis%7D%2CsetRemoved%3Afunction(t)%7Breturn%20this.removed%3Dt%2Cthis%7D%7D%2Cexports%5B%22default%22%5D%3DElementVisibility%2Cmodule.exports%3Dexports%5B%22default%22%5D%3B%0A%0A%7D%2C%7B%7D%5D%2C2%3A%5Bfunction(require%2Cmodule%2Cexports)%7B%0A%22use%20strict%22%3BObject.defineProperty(exports%2C%22__esModule%22%2C%7Bvalue%3A!0%7D)%3Bvar%20iframed%3D0%2Cbad_iframe%3D0%3Bself!%3Dtop%26%26(window.inDapIF%3D%3D%3D!0%26%26window.pub_iframe%3Fiframed%3D1%3A(bad_iframe%3D1%2Cwindow.console%26%26window.console.log(%22Not%20in%20friendly%20iframe%22)))%3Bvar%20inIframe%3Diframed%3Bexports.inIframe%3DinIframe%3Bvar%20unfriendlyIframe%3Dbad_iframe%3Bexports.unfriendlyIframe%3DunfriendlyIframe%3B%0A%0A%7D%2C%7B%7D%5D%2C3%3A%5Bfunction(require%2Cmodule%2Cexports)%7B%0A%22use%20strict%22%3Bfunction%20_interopRequireDefault(e)%7Breturn%20e%26%26e.__esModule%3Fe%3A%7B%22default%22%3Ae%7D%7Dfunction%20getViewportData()%7Bvar%20e%3Ddoc.documentElement.clientHeight%2Ci%3Ddoc.documentElement.clientWidth%3Breturn%7Bw%3Ai%2Ch%3Ae%2Ctop%3A0%2Cbottom%3Ae%2Cleft%3A0%2Cright%3Ai%2Chidden%3A_page_visibility.use%3F(0%2C_page_visibility.pageIsHidden)()%3A0%7D%7Dfunction%20update()%7Bfor(var%20e%3DgetViewportData()%2Ci%3D0%2Ct%3Dto_track.length%3Bt%3Ei%3Bi%2B%2B)to_track%5Bi%5D.updatePosition(e).report()%3BclearTimeout(update_timeout)%2Cupdate_timeout%3DsetTimeout(update%2C_page_visibility.use%26%26(0%2C_page_visibility.pageIsHidden)()%3F1e4%3A100)%7Dfunction%20beginTracking()%7Bupdate()%2Ctracking_started%7C%7C((0%2C_page_visibility.onPageVisibilityChange)(update)%2Ctracking_started%3D!0)%7Dvar%20_element_visibility%3Drequire(%22.%2Felement_visibility%22)%2C_element_visibility2%3D_interopRequireDefault(_element_visibility)%2C_page_visibility%3Drequire(%22.%2Fpage_visibility%22)%2C_iframe%3Drequire(%22.%2Fiframe%22)%2Cwin%3D_iframe.inIframe%3Ftop%3Awindow%2Cdoc%3Dwin.document%2CisConfirmed%2Cupdate_timeout%2Cto_track%3D%5B%5D%2Ctracking_started%3D!1%2Cundef%3BisConfirmed%3D_page_visibility.use%26%26!_iframe.unfriendlyIframe%2Cwindow.ModeBehaviors%3Dwindow.ModeBehaviors%7C%7C%7B%7D%2Cwindow.ModeBehaviors.InViewBehaviour%3D%7Bproperties%3A%7BtrackInViewAs%3A%7Btype%3AString%2Cvalue%3A%22in-view%22%7D%2CforceInView%3A%7Btype%3ABoolean%2Cvalue%3A!1%2Cnotify%3A!0%2Cobserver%3A%22_forceInViewChanged%22%7D%2CvisibilityState%3A%7Btype%3AString%2Cvalue%3A%22hidden%22%2Cnotify%3A!0%2CreadOnly%3A!0%7D%7D%2Cattached%3Afunction()%7Bif(!this.inViewController)%7Bvar%20e%3D_iframe.inIframe%26%26window.pub_iframe%3Fpub_iframe%3Athis%2Ci%3Dthis.trackInViewAs%3Fthis.trackInViewAs%2B(isConfirmed%3F%22%22%3A%22-unconfirmed%22)%3A!1%3Bthis.inViewController%3Dnew%20_element_visibility2%5B%22default%22%5D(this%2Ce%2Ci)%2Cthis.inViewController.setForced(this.forceInView)%2Cto_track.push(this.inViewController)%7Dthis.inViewController.setRemoved(!1)%2CbeginTracking()%7D%2Cdetached%3Afunction()%7Bthis.inViewController.setRemoved(!0)%7D%2C_forceInViewChanged%3Afunction(e)%7Bthis.inViewController%26%26this.inViewController.setForced(e)%7D%7D%3B%0A%0A%7D%2C%7B%22.%2Felement_visibility%22%3A1%2C%22.%2Fiframe%22%3A2%2C%22.%2Fpage_visibility%22%3A4%7D%5D%2C4%3A%5Bfunction(require%2Cmodule%2Cexports)%7B%0A%22use%20strict%22%3Bfunction%20_interopRequireDefault(i)%7Breturn%20i%26%26i.__esModule%3Fi%3A%7B%22default%22%3Ai%7D%7Dfunction%20pageIsHidden()%7Breturn%20doc%5Bhidden%5D%7Dfunction%20onPageVisibilityChange(i)%7Breturn%20usePageVisibilityAPI%3F(doc.addEventListener(visibilityChange%2Ci%2C!1)%2C!0)%3A!1%7DObject.defineProperty(exports%2C%22__esModule%22%2C%7Bvalue%3A!0%7D)%2Cexports.pageIsHidden%3DpageIsHidden%2Cexports.onPageVisibilityChange%3DonPageVisibilityChange%3Bvar%20_iframe%3Drequire(%22.%2Fiframe%22)%2C_iframe2%3D_interopRequireDefault(_iframe)%2Cdoc%3D(_iframe2%5B%22default%22%5D%3Ftop%3Awindow).document%2Chidden%2CvisibilityChange%2Cundef%3Bdoc.hidden!%3D%3Dundef%3F(hidden%3D%22hidden%22%2CvisibilityChange%3D%22visibilitychange%22)%3Adoc.mozHidden!%3D%3Dundef%3F(hidden%3D%22mozHidden%22%2CvisibilityChange%3D%22mozvisibilitychange%22)%3Adoc.webkitHidden!%3D%3Dundef%26%26(hidden%3D%22webkitHidden%22%2CvisibilityChange%3D%22webkitvisibilitychange%22)%3Bvar%20usePageVisibilityAPI%3Dhidden!%3D%3Dundef%2Cuse%3DusePageVisibilityAPI%3Bexports.use%3Duse%3B%0A%0A%7D%2C%7B%22.%2Fiframe%22%3A2%7D%5D%7D%2C%7B%7D%2C%5B3%5D)%0A%2F%2F%23%20sourceMappingURL%3Dindex.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttp%3A%2F%2Ffileserver.glam.com%2Fwebcomponents%2Flatest%2Fmode-core%2Fmode-core.html-1.js%0A
1 ms
javascript;charset=utf-8,(function%20e(t%2Cn%2Cr)%7Bfunction%20s(o%2Cu)%7Bif(!n%5Bo%5D)%7Bif(!t%5Bo%5D)%7Bvar%20a%3Dtypeof%20require%3D%3D%22function%22%26%26require%3Bif(!u%26%26a)return%20a(o%2C!0)%3Bif(i)return%20i(o%2C!0)%3Bvar%20f%3Dnew%20Error(%22Cannot%20find%20module%20'%22%2Bo%2B%22'%22)%3Bthrow%20f.code%3D%22MODULE_NOT_FOUND%22%2Cf%7Dvar%20l%3Dn%5Bo%5D%3D%7Bexports%3A%7B%7D%7D%3Bt%5Bo%5D%5B0%5D.call(l.exports%2Cfunction(e)%7Bvar%20n%3Dt%5Bo%5D%5B1%5D%5Be%5D%3Breturn%20s(n%3Fn%3Ae)%7D%2Cl%2Cl.exports%2Ce%2Ct%2Cn%2Cr)%7Dreturn%20n%5Bo%5D.exports%7Dvar%20i%3Dtypeof%20require%3D%3D%22function%22%26%26require%3Bfor(var%20o%3D0%3Bo%3Cr.length%3Bo%2B%2B)s(r%5Bo%5D)%3Breturn%20s%7D)(%7B1%3A%5Bfunction(require%2Cmodule%2Cexports)%7B%0A%22use%20strict%22%3Bfunction%20listen(e%2Ct%2Ci)%7Be.addEventListener%3Fe.addEventListener(t%2Ci%2C0)%3Ae.attachEvent%26%26e.attachEvent(%22on%22%2Bt%2Ci)%7Dfunction%20unlisten(e%2Ct%2Ci)%7Be.removeEventListener%3Fe.removeEventListener(t%2Ci%2C0)%3Ae.detachEvent%26%26e.detachEvent(%22on%22%2Bt%2Ci)%7Dfunction%20HoverTracker(e)%7Bthis.ref%3De%2Cthis.elements_moused_over%3D0%2Cthis.last_hover%3D0%2Cthis.last_active%3D0%2Cthis.iab_mouseover_sent%3D0%2Cthis.art_started%3D0%2Cthis.art_sent%3D0%2Cthis.iab_running%3D0%2Cthis.iab_last%3D0%2Cthis.iab_total%3D0%2Cthis.iab_timeout%3Dnull%3Bvar%20t%3Dthis%2Ci%3D%7Bx%3A0%2Cy%3A0%7D%3Bthis.isActive%3Dfunction(e)%7Bvar%20o%3Dt._coords(e)%2Cs%3D%2Bnew%20Date%3B(o.x!%3Di.x%7C%7Co.y!%3Di.y)%26%26(t.last_active%3Ds)%2Ci%3Do%7D%2Cthis.bound_mouseover_fn%3Dfunction(e)%7Bvar%20i%3Be%7C%7C(e%3Dwindow.event)%2Ce.target%3Fi%3De.target%3Ae.srcElement%26%26(i%3De.srcElement)%2Ct._handleMouseOver(i)%7D%2Cthis.bound_mouseout_fn%3Dfunction(e)%7Bvar%20i%3Be%7C%7C(e%3Dwindow.event)%2Ce.target%3Fi%3De.target%3Ae.srcElement%26%26(i%3De.srcElement)%2Ct._handleMouseOut(i)%7D%7DObject.defineProperty(exports%2C%22__esModule%22%2C%7Bvalue%3A!0%7D)%2CHoverTracker.prototype%3D%7BHOVER_THRESHOLD%3A50%2CIAB_MAX%3A6e4%2C_coords%3Afunction(e)%7Breturn%20e%7C%7C(e%3Dwindow.event)%2Ce.pageX%3F%7Bx%3Ae.pageX%2Cy%3Ae.pageY%7D%3A%7Bx%3Ae.clientX%2Bdocument.body.scrollLeft%2Bdocument.documentElement.scrollLeft%2Cy%3Ae.clientY%2Bdocument.body.scrollTop%2Bdocument.documentElement.scrollTop%7D%7D%2C_startUIT%3Afunction()%7Bif(!this.iab_running%26%26(this.iab_running%3D1%2Cthis.ref.fire(%22mode-timer%22%2C%7Bname%3A%22uitf%22%7D)%2Cthis.iab_total%3Cthis.IAB_MAX))%7Bthis.iab_last%3D%2Bnew%20Date%2Cthis.ref.fire(%22mode-timer%22%2C%7Bname%3A%22uit%22%7D)%3Bvar%20e%3Dthis%3Bthis.iab_timeout%3DsetTimeout(function()%7Be.ref.fire(%22mode-timer%22%2C%7Bname%3A%22uit%22%2Cstop%3A!0%7D)%2Ce.iab_total%3De.IAB_MAX%7D%2Cthis.IAB_MAX-this.iab_total)%7D%7D%2C_stopUIT%3Afunction()%7Bthis.iab_running%26%26(this.iab_running%3D0%2Cthis.ref.fire(%22mode-timer%22%2C%7Bname%3A%22uitf%22%2Cstop%3A!0%7D)%2Cthis.iab_total%3Cthis.IAB_MAX%26%26(this.ref.fire(%22mode-timer%22%2C%7Bname%3A%22uit%22%2Cstop%3A!0%7D)%2CclearTimeout(this.iab_timeout)%2Cthis.iab_total%2B%3D%2Bnew%20Date-this.iab_last))%7D%2C_handleMouseOver%3Afunction(e)%7Bvar%20t%3Dthis%3B%22y%22!%3D%3De.getAttribute(%22glm-uit-hvrng%22)%26%26(this.elements_moused_over%2B%2B%2Ce.setAttribute(%22glm-uit-hvrng%22%2C%22y%22)%2Cthis.elements_moused_over%3E1%7C%7C0!%3D%3Dthis.last_hover%26%26%2Bnew%20Date-this.last_hover%3C%3Dthis.HOVER_THRESHOLD%7C%7C(this.ref.fire(%22mode-counter%22%2C%7Bname%3A%22mousehover%22%2Cvalue%3A%22%22%7D)%2CsetTimeout(function()%7Bt.elements_moused_over%26%26(t.art_sent%7C%7C(t.ref.fire(%22mode-timer%22%2C%7Bname%3A%22art%22%2Cstop%3A!0%7D)%2Ct.art_sent%3D1)%2Ct.ref.fire(%22mode-counter%22%2C%7Bname%3A%22mouseover%22%2Cvalue%3A%22qualified%22%7D)%2Cfunction%20e()%7Bt.elements_moused_over%26%26(%2Bnew%20Date-t.last_active%3C200%3F(t.iab_mouseover_sent%7C%7C(t.ref.fire(%22mode-counter%22%2C%7Bname%3A%22mouseover%22%2Cvalue%3A%22iab%22%7D)%2Ct.iab_mouseover_sent%3D1)%2Ct._startUIT())%3AsetTimeout(e%2C200))%7D())%7D%2C500)%2Clisten(document%2C%22mousemove%22%2Cthis.isActive)))%7D%2C_handleMouseOut%3Afunction(e)%7Bif(%22y%22%3D%3D%3De.getAttribute(%22glm-uit-hvrng%22)%26%26this.elements_moused_over)%7Bvar%20t%3Dthis%3Bthis.elements_moused_over--%2Ce.removeAttribute(%22glm-uit-hvrng%22)%2Cthis.last_hover%3D%2Bnew%20Date%2CsetTimeout(function()%7Bt.elements_moused_over%7C%7C(t._stopUIT()%2Cunlisten(document%2C%22mousemove%22%2Ct.isActive))%7D%2Cthis.HOVER_THRESHOLD%2B1)%7D%7D%2Cattach%3Afunction(e)%7Bthis.art_started%7C%7C(this.ref.fire(%22mode-timer%22%2C%7Bname%3A%22art%22%7D)%2Cthis.art_started%3D1)%2Clisten(e%2C%22mouseover%22%2Cthis.bound_mouseover_fn)%2Clisten(e%2C%22mouseout%22%2Cthis.bound_mouseout_fn)%7D%2Cdetach%3Afunction(e)%7Bunlisten(e%2C%22mouseover%22%2Cthis.bound_mouseover_fn)%2Cunlisten(e%2C%22mouseout%22%2Cthis.bound_mouseout_fn)%2C%22y%22%3D%3D%3De.getAttribute(%22glm-uit-hvrng%22)%26%26this.bound_mouseout_fn(%7Btarget%3Ae%7D)%7D%7D%2Cexports%5B%22default%22%5D%3DHoverTracker%2Cmodule.exports%3Dexports%5B%22default%22%5D%3B%0A%0A%7D%2C%7B%7D%5D%2C2%3A%5Bfunction(require%2Cmodule%2Cexports)%7B%0A%22use%20strict%22%3BObject.defineProperty(exports%2C%22__esModule%22%2C%7Bvalue%3A!0%7D)%3Bvar%20iframed%3D0%2Cbad_iframe%3D0%3Bself!%3Dtop%26%26(window.inDapIF%3D%3D%3D!0%26%26window.pub_iframe%3Fiframed%3D1%3A(bad_iframe%3D1%2Cwindow.console%26%26window.console.log(%22Not%20in%20friendly%20iframe%22)))%3Bvar%20inIframe%3Diframed%3Bexports.inIframe%3DinIframe%3Bvar%20unfriendlyIframe%3Dbad_iframe%3Bexports.unfriendlyIframe%3DunfriendlyIframe%3B%0A%0A%7D%2C%7B%7D%5D%2C3%3A%5Bfunction(require%2Cmodule%2Cexports)%7B%0A%22use%20strict%22%3Bfunction%20_interopRequireDefault(e)%7Breturn%20e%26%26e.__esModule%3Fe%3A%7B%22default%22%3Ae%7D%7Dvar%20_hover%3Drequire(%22.%2Fhover%22)%2C_hover2%3D_interopRequireDefault(_hover)%2C_iframe%3Drequire(%22.%2Fiframe%22)%2Cwin%3D_iframe.inIframe%3Ftop%3Awindow%2Cdoc%3Dwin.document%2CisConfirmed%2Cupdate_timeout%2Cto_track%3D%5B%5D%2Ctracking_started%3D!1%2Cundef%3Bwindow.ModeBehaviors%3Dwindow.ModeBehaviors%7C%7C%7B%7D%2Cwindow.ModeBehaviors.UITBehaviour%3D%7Battached%3Afunction()%7Bvar%20e%3Dnew%20_hover2%5B%22default%22%5D(this)%3Be.attach(this)%7D%7D%3B%0A%0A%7D%2C%7B%22.%2Fhover%22%3A1%2C%22.%2Fiframe%22%3A2%7D%5D%7D%2C%7B%7D%2C%5B3%5D)%0A%2F%2F%23%20sourceMappingURL%3Dindex.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttp%3A%2F%2Ffileserver.glam.com%2Fwebcomponents%2Flatest%2Fmode-core%2Fmode-core.html-2.js%0A
1 ms
javascript;charset=utf-8,(function%20e(t%2Cn%2Cr)%7Bfunction%20s(o%2Cu)%7Bif(!n%5Bo%5D)%7Bif(!t%5Bo%5D)%7Bvar%20a%3Dtypeof%20require%3D%3D%22function%22%26%26require%3Bif(!u%26%26a)return%20a(o%2C!0)%3Bif(i)return%20i(o%2C!0)%3Bvar%20f%3Dnew%20Error(%22Cannot%20find%20module%20'%22%2Bo%2B%22'%22)%3Bthrow%20f.code%3D%22MODULE_NOT_FOUND%22%2Cf%7Dvar%20l%3Dn%5Bo%5D%3D%7Bexports%3A%7B%7D%7D%3Bt%5Bo%5D%5B0%5D.call(l.exports%2Cfunction(e)%7Bvar%20n%3Dt%5Bo%5D%5B1%5D%5Be%5D%3Breturn%20s(n%3Fn%3Ae)%7D%2Cl%2Cl.exports%2Ce%2Ct%2Cn%2Cr)%7Dreturn%20n%5Bo%5D.exports%7Dvar%20i%3Dtypeof%20require%3D%3D%22function%22%26%26require%3Bfor(var%20o%3D0%3Bo%3Cr.length%3Bo%2B%2B)s(r%5Bo%5D)%3Breturn%20s%7D)(%7B1%3A%5Bfunction(require%2Cmodule%2Cexports)%7B%0A(function%20(process%2Cglobal)%7B%0A%20%2F*!%0A%20%20*%20https%3A%2F%2Fgithub.com%2Fpaulmillr%2Fes6-shim%0A%20%20*%20%40license%20es6-shim%20Copyright%202013-2015%20by%20Paul%20Miller%20(http%3A%2F%2Fpaulmillr.com)%0A%20%20*%20%20%20and%20contributors%2C%20%20MIT%20License%0A%20%20*%20es6-shim%3A%20v0.33.13%0A%20%20*%20see%20https%3A%2F%2Fgithub.com%2Fpaulmillr%2Fes6-shim%2Fblob%2F0.33.13%2FLICENSE%0A%20%20*%20Details%20and%20documentation%3A%0A%20%20*%20https%3A%2F%2Fgithub.com%2Fpaulmillr%2Fes6-shim%2F%0A%20%20*%2F%0A%0A%2F%2F%20UMD%20(Universal%20Module%20Definition)%0A%2F%2F%20see%20https%3A%2F%2Fgithub.com%2Fumdjs%2Fumd%2Fblob%2Fmaster%2FreturnExports.js%0A(function%20(root%2C%20factory)%20%7B%0A%20%20%2F*global%20define%2C%20module%2C%20exports%20*%2F%0A%20%20if%20(typeof%20define%20%3D%3D%3D%20'function'%20%26%26%20define.amd)%20%7B%0A%20%20%20%20%2F%2F%20AMD.%20Register%20as%20an%20anonymous%20module.%0A%20%20%20%20define(factory)%3B%0A%20%20%7D%20else%20if%20(typeof%20exports%20%3D%3D%3D%20'object')%20%7B%0A%20%20%20%20%2F%2F%20Node.%20Does%20not%20work%20with%20strict%20CommonJS%2C%20but%0A%20%20%20%20%2F%2F%20only%20CommonJS-like%20enviroments%20that%20support%20module.exports%2C%0A%20%20%20%20%2F%2F%20like%20Node.%0A%20%20%20%20module.exports%20%3D%20factory()%3B%0A%20%20%7D%20else%20%7B%0A%20%20%20%20%2F%2F%20Browser%20globals%20(root%20is%20window)%0A%20%20%20%20root.returnExports%20%3D%20factory()%3B%0A%20%20%7D%0A%7D(this%2C%20function%20()%20%7B%0A%20%20'use%20strict'%3B%0A%0A%20%20var%20_apply%20%3D%20Function.call.bind(Function.apply)%3B%0A%20%20var%20_call%20%3D%20Function.call.bind(Function.call)%3B%0A%20%20var%20isArray%20%3D%20Array.isArray%3B%0A%0A%20%20var%20not%20%3D%20function%20notThunker(func)%20%7B%0A%20%20%20%20return%20function%20notThunk()%20%7B%20return%20!_apply(func%2C%20this%2C%20arguments)%3B%20%7D%3B%0A%20%20%7D%3B%0A%20%20var%20throwsError%20%3D%20function%20(func)%20%7B%0A%20%20%20%20try%20%7B%0A%20%20%20%20%20%20func()%3B%0A%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%20%20var%20valueOrFalseIfThrows%20%3D%20function%20valueOrFalseIfThrows(func)%20%7B%0A%20%20%20%20try%20%7B%0A%20%20%20%20%20%20return%20func()%3B%0A%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20var%20isCallableWithoutNew%20%3D%20not(throwsError)%3B%0A%20%20var%20arePropertyDescriptorsSupported%20%3D%20function%20()%20%7B%0A%20%20%20%20%2F%2F%20if%20Object.defineProperty%20exists%20but%20throws%2C%20it's%20IE%208%0A%20%20%20%20return%20!throwsError(function%20()%20%7B%20Object.defineProperty(%7B%7D%2C%20'x'%2C%20%7B%20get%3A%20function%20()%20%7B%7D%20%7D)%3B%20%7D)%3B%0A%20%20%7D%3B%0A%20%20var%20supportsDescriptors%20%3D%20!!Object.defineProperty%20%26%26%20arePropertyDescriptorsSupported()%3B%0A%20%20var%20functionsHaveNames%20%3D%20(function%20foo()%20%7B%7D).name%20%3D%3D%3D%20'foo'%3B%0A%0A%20%20var%20_forEach%20%3D%20Function.call.bind(Array.prototype.forEach)%3B%0A%20%20var%20_reduce%20%3D%20Function.call.bind(Array.prototype.reduce)%3B%0A%20%20var%20_filter%20%3D%20Function.call.bind(Array.prototype.filter)%3B%0A%20%20var%20_some%20%3D%20Function.call.bind(Array.prototype.some)%3B%0A%0A%20%20var%20defineProperty%20%3D%20function%20(object%2C%20name%2C%20value%2C%20force)%20%7B%0A%20%20%20%20if%20(!force%20%26%26%20name%20in%20object)%20%7B%20return%3B%20%7D%0A%20%20%20%20if%20(supportsDescriptors)%20%7B%0A%20%20%20%20%20%20Object.defineProperty(object%2C%20name%2C%20%7B%0A%20%20%20%20%20%20%20%20configurable%3A%20true%2C%0A%20%20%20%20%20%20%20%20enumerable%3A%20false%2C%0A%20%20%20%20%20%20%20%20writable%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20value%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20object%5Bname%5D%20%3D%20value%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20%2F%2F%20Define%20configurable%2C%20writable%20and%20non-enumerable%20props%0A%20%20%2F%2F%20if%20they%20don%E2%80%99t%20exist.%0A%20%20var%20defineProperties%20%3D%20function%20(object%2C%20map)%20%7B%0A%20%20%20%20_forEach(Object.keys(map)%2C%20function%20(name)%20%7B%0A%20%20%20%20%20%20var%20method%20%3D%20map%5Bname%5D%3B%0A%20%20%20%20%20%20defineProperty(object%2C%20name%2C%20method%2C%20false)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%3B%0A%0A%20%20%2F%2F%20Simple%20shim%20for%20Object.create%20on%20ES3%20browsers%0A%20%20%2F%2F%20(unlike%20real%20shim%2C%20no%20attempt%20to%20support%20%60prototype%20%3D%3D%3D%20null%60)%0A%20%20var%20create%20%3D%20Object.create%20%7C%7C%20function%20(prototype%2C%20properties)%20%7B%0A%20%20%20%20var%20Prototype%20%3D%20function%20Prototype()%20%7B%7D%3B%0A%20%20%20%20Prototype.prototype%20%3D%20prototype%3B%0A%20%20%20%20var%20object%20%3D%20new%20Prototype()%3B%0A%20%20%20%20if%20(typeof%20properties%20!%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20Object.keys(properties).forEach(function%20(key)%20%7B%0A%20%20%20%20%20%20%20%20Value.defineByDescriptor(object%2C%20key%2C%20properties%5Bkey%5D)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20object%3B%0A%20%20%7D%3B%0A%0A%20%20var%20supportsSubclassing%20%3D%20function%20(C%2C%20f)%20%7B%0A%20%20%20%20if%20(!Object.setPrototypeOf)%20%7B%20return%20false%3B%20%2F*%20skip%20test%20on%20IE%20%3C%2011%20*%2F%20%7D%0A%20%20%20%20return%20valueOrFalseIfThrows(function%20()%20%7B%0A%20%20%20%20%20%20var%20Sub%20%3D%20function%20Subclass(arg)%20%7B%0A%20%20%20%20%20%20%20%20var%20o%20%3D%20new%20C(arg)%3B%0A%20%20%20%20%20%20%20%20Object.setPrototypeOf(o%2C%20Subclass.prototype)%3B%0A%20%20%20%20%20%20%20%20return%20o%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20Object.setPrototypeOf(Sub%2C%20C)%3B%0A%20%20%20%20%20%20Sub.prototype%20%3D%20create(C.prototype%2C%20%7B%0A%20%20%20%20%20%20%20%20constructor%3A%20%7B%20value%3A%20Sub%20%7D%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20return%20f(Sub)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%3B%0A%0A%20%20var%20getGlobal%20%3D%20function%20()%20%7B%0A%20%20%20%20%2F*%20global%20self%2C%20window%2C%20global%20*%2F%0A%20%20%20%20%2F%2F%20the%20only%20reliable%20means%20to%20get%20the%20global%20object%20is%0A%20%20%20%20%2F%2F%20%60Function('return%20this')()%60%0A%20%20%20%20%2F%2F%20However%2C%20this%20causes%20CSP%20violations%20in%20Chrome%20apps.%0A%20%20%20%20if%20(typeof%20self%20!%3D%3D%20'undefined')%20%7B%20return%20self%3B%20%7D%0A%20%20%20%20if%20(typeof%20window%20!%3D%3D%20'undefined')%20%7B%20return%20window%3B%20%7D%0A%20%20%20%20if%20(typeof%20global%20!%3D%3D%20'undefined')%20%7B%20return%20global%3B%20%7D%0A%20%20%20%20throw%20new%20Error('unable%20to%20locate%20global%20object')%3B%0A%20%20%7D%3B%0A%0A%20%20var%20globals%20%3D%20getGlobal()%3B%0A%20%20var%20globalIsFinite%20%3D%20globals.isFinite%3B%0A%20%20var%20_indexOf%20%3D%20Function.call.bind(String.prototype.indexOf)%3B%0A%20%20var%20_toString%20%3D%20Function.call.bind(Object.prototype.toString)%3B%0A%20%20var%20_concat%20%3D%20Function.call.bind(Array.prototype.concat)%3B%0A%20%20var%20_strSlice%20%3D%20Function.call.bind(String.prototype.slice)%3B%0A%20%20var%20_push%20%3D%20Function.call.bind(Array.prototype.push)%3B%0A%20%20var%20_pushApply%20%3D%20Function.apply.bind(Array.prototype.push)%3B%0A%20%20var%20_shift%20%3D%20Function.call.bind(Array.prototype.shift)%3B%0A%20%20var%20_max%20%3D%20Math.max%3B%0A%20%20var%20_min%20%3D%20Math.min%3B%0A%20%20var%20_floor%20%3D%20Math.floor%3B%0A%20%20var%20_abs%20%3D%20Math.abs%3B%0A%20%20var%20_log%20%3D%20Math.log%3B%0A%20%20var%20_sqrt%20%3D%20Math.sqrt%3B%0A%20%20var%20_hasOwnProperty%20%3D%20Function.call.bind(Object.prototype.hasOwnProperty)%3B%0A%20%20var%20ArrayIterator%3B%20%2F%2F%20make%20our%20implementation%20private%0A%20%20var%20noop%20%3D%20function%20()%20%7B%7D%3B%0A%0A%20%20var%20Symbol%20%3D%20globals.Symbol%20%7C%7C%20%7B%7D%3B%0A%20%20var%20symbolSpecies%20%3D%20Symbol.species%20%7C%7C%20'%40%40species'%3B%0A%0A%20%20var%20numberIsNaN%20%3D%20Number.isNaN%20%7C%7C%20function%20isNaN(value)%20%7B%0A%20%20%20%20%2F%2F%20NaN%20!%3D%3D%20NaN%2C%20but%20they%20are%20identical.%0A%20%20%20%20%2F%2F%20NaNs%20are%20the%20only%20non-reflexive%20value%2C%20i.e.%2C%20if%20x%20!%3D%3D%20x%2C%0A%20%20%20%20%2F%2F%20then%20x%20is%20NaN.%0A%20%20%20%20%2F%2F%20isNaN%20is%20broken%3A%20it%20converts%20its%20argument%20to%20number%2C%20so%0A%20%20%20%20%2F%2F%20isNaN('foo')%20%3D%3E%20true%0A%20%20%20%20return%20value%20!%3D%3D%20value%3B%0A%20%20%7D%3B%0A%20%20var%20numberIsFinite%20%3D%20Number.isFinite%20%7C%7C%20function%20isFinite(value)%20%7B%0A%20%20%20%20return%20typeof%20value%20%3D%3D%3D%20'number'%20%26%26%20globalIsFinite(value)%3B%0A%20%20%7D%3B%0A%0A%20%20%2F%2F%20taken%20directly%20from%20https%3A%2F%2Fgithub.com%2Fljharb%2Fis-arguments%2Fblob%2Fmaster%2Findex.js%0A%20%20%2F%2F%20can%20be%20replaced%20with%20require('is-arguments')%20if%20we%20ever%20use%20a%20build%20process%20instead%0A%20%20var%20isStandardArguments%20%3D%20function%20isArguments(value)%20%7B%0A%20%20%20%20return%20_toString(value)%20%3D%3D%3D%20'%5Bobject%20Arguments%5D'%3B%0A%20%20%7D%3B%0A%20%20var%20isLegacyArguments%20%3D%20function%20isArguments(value)%20%7B%0A%20%20%20%20return%20value%20!%3D%3D%20null%20%26%26%0A%20%20%20%20%20%20typeof%20value%20%3D%3D%3D%20'object'%20%26%26%0A%20%20%20%20%20%20typeof%20value.length%20%3D%3D%3D%20'number'%20%26%26%0A%20%20%20%20%20%20value.length%20%3E%3D%200%20%26%26%0A%20%20%20%20%20%20_toString(value)%20!%3D%3D%20'%5Bobject%20Array%5D'%20%26%26%0A%20%20%20%20%20%20_toString(value.callee)%20%3D%3D%3D%20'%5Bobject%20Function%5D'%3B%0A%20%20%7D%3B%0A%20%20var%20isArguments%20%3D%20isStandardArguments(arguments)%20%3F%20isStandardArguments%20%3A%20isLegacyArguments%3B%0A%0A%20%20var%20Type%20%3D%20%7B%0A%20%20%20%20primitive%3A%20function%20(x)%20%7B%20return%20x%20%3D%3D%3D%20null%20%7C%7C%20(typeof%20x%20!%3D%3D%20'function'%20%26%26%20typeof%20x%20!%3D%3D%20'object')%3B%20%7D%2C%0A%20%20%20%20object%3A%20function%20(x)%20%7B%20return%20x%20!%3D%3D%20null%20%26%26%20typeof%20x%20%3D%3D%3D%20'object'%3B%20%7D%2C%0A%20%20%20%20string%3A%20function%20(x)%20%7B%20return%20_toString(x)%20%3D%3D%3D%20'%5Bobject%20String%5D'%3B%20%7D%2C%0A%20%20%20%20regex%3A%20function%20(x)%20%7B%20return%20_toString(x)%20%3D%3D%3D%20'%5Bobject%20RegExp%5D'%3B%20%7D%2C%0A%20%20%20%20symbol%3A%20function%20(x)%20%7B%0A%20%20%20%20%20%20return%20typeof%20globals.Symbol%20%3D%3D%3D%20'function'%20%26%26%20typeof%20x%20%3D%3D%3D%20'symbol'%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20%2F%2F%20This%20is%20a%20private%20name%20in%20the%20es6%20spec%2C%20equal%20to%20'%5BSymbol.iterator%5D'%0A%20%20%2F%2F%20we're%20going%20to%20use%20an%20arbitrary%20_-prefixed%20name%20to%20make%20our%20shims%0A%20%20%2F%2F%20work%20properly%20with%20each%20other%2C%20even%20though%20we%20don't%20have%20full%20Iterator%0A%20%20%2F%2F%20support.%20%20That%20is%2C%20%60Array.from(map.keys())%60%20will%20work%2C%20but%20we%20don't%0A%20%20%2F%2F%20pretend%20to%20export%20a%20%22real%22%20Iterator%20interface.%0A%20%20var%20%24iterator%24%20%3D%20Type.symbol(Symbol.iterator)%20%3F%20Symbol.iterator%20%3A%20'_es6-shim%20iterator_'%3B%0A%20%20%2F%2F%20Firefox%20ships%20a%20partial%20implementation%20using%20the%20name%20%40%40iterator.%0A%20%20%2F%2F%20https%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D907077%23c14%0A%20%20%2F%2F%20So%20use%20that%20name%20if%20we%20detect%20it.%0A%20%20if%20(globals.Set%20%26%26%20typeof%20new%20globals.Set()%5B'%40%40iterator'%5D%20%3D%3D%3D%20'function')%20%7B%0A%20%20%20%20%24iterator%24%20%3D%20'%40%40iterator'%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20Reflect%0A%20%20if%20(!globals.Reflect)%20%7B%0A%20%20%20%20defineProperty(globals%2C%20'Reflect'%2C%20%7B%7D)%3B%0A%20%20%7D%0A%20%20var%20Reflect%20%3D%20globals.Reflect%3B%0A%0A%20%20var%20ES%20%3D%20%7B%0A%20%20%20%20%2F%2F%20https%3A%2F%2Fpeople.mozilla.org%2F~jorendorff%2Fes6-draft.html%23sec-call-f-v-args%0A%20%20%20%20Call%3A%20function%20Call(F%2C%20V)%20%7B%0A%20%20%20%20%20%20var%20args%20%3D%20arguments.length%20%3E%202%20%3F%20arguments%5B2%5D%20%3A%20%5B%5D%3B%0A%20%20%20%20%20%20if%20(!ES.IsCallable(F))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError(F%20%2B%20'%20is%20not%20a%20function')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20_apply(F%2C%20V%2C%20args)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20RequireObjectCoercible%3A%20function%20(x%2C%20optMessage)%20%7B%0A%20%20%20%20%20%20%2F*%20jshint%20eqnull%3Atrue%20*%2F%0A%20%20%20%20%20%20if%20(x%20%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError(optMessage%20%7C%7C%20'Cannot%20call%20method%20on%20'%20%2B%20x)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20TypeIsObject%3A%20function%20(x)%20%7B%0A%20%20%20%20%20%20%2F*%20jshint%20eqnull%3Atrue%20*%2F%0A%20%20%20%20%20%20%2F%2F%20this%20is%20expensive%20when%20it%20returns%20false%3B%20use%20this%20function%0A%20%20%20%20%20%20%2F%2F%20when%20you%20expect%20it%20to%20return%20true%20in%20the%20common%20case.%0A%20%20%20%20%20%20return%20x%20!%3D%20null%20%26%26%20Object(x)%20%3D%3D%3D%20x%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ToObject%3A%20function%20(o%2C%20optMessage)%20%7B%0A%20%20%20%20%20%20ES.RequireObjectCoercible(o%2C%20optMessage)%3B%0A%20%20%20%20%20%20return%20Object(o)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20IsCallable%3A%20function%20(x)%20%7B%0A%20%20%20%20%20%20%2F%2F%20some%20versions%20of%20IE%20say%20that%20typeof%20%2Fabc%2F%20%3D%3D%3D%20'function'%0A%20%20%20%20%20%20return%20typeof%20x%20%3D%3D%3D%20'function'%20%26%26%20_toString(x)%20%3D%3D%3D%20'%5Bobject%20Function%5D'%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20IsConstructor%3A%20function%20(x)%20%7B%0A%20%20%20%20%20%20%2F%2F%20We%20can't%20tell%20callables%20from%20constructors%20in%20ES5%0A%20%20%20%20%20%20return%20ES.IsCallable(x)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ToInt32%3A%20function%20(x)%20%7B%0A%20%20%20%20%20%20return%20ES.ToNumber(x)%20%3E%3E%200%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ToUint32%3A%20function%20(x)%20%7B%0A%20%20%20%20%20%20return%20ES.ToNumber(x)%20%3E%3E%3E%200%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ToNumber%3A%20function%20(value)%20%7B%0A%20%20%20%20%20%20if%20(_toString(value)%20%3D%3D%3D%20'%5Bobject%20Symbol%5D')%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Cannot%20convert%20a%20Symbol%20value%20to%20a%20number')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20%2Bvalue%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ToInteger%3A%20function%20(value)%20%7B%0A%20%20%20%20%20%20var%20number%20%3D%20ES.ToNumber(value)%3B%0A%20%20%20%20%20%20if%20(numberIsNaN(number))%20%7B%20return%200%3B%20%7D%0A%20%20%20%20%20%20if%20(number%20%3D%3D%3D%200%20%7C%7C%20!numberIsFinite(number))%20%7B%20return%20number%3B%20%7D%0A%20%20%20%20%20%20return%20(number%20%3E%200%20%3F%201%20%3A%20-1)%20*%20_floor(_abs(number))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ToLength%3A%20function%20(value)%20%7B%0A%20%20%20%20%20%20var%20len%20%3D%20ES.ToInteger(value)%3B%0A%20%20%20%20%20%20if%20(len%20%3C%3D%200)%20%7B%20return%200%3B%20%7D%20%2F%2F%20includes%20converting%20-0%20to%20%2B0%0A%20%20%20%20%20%20if%20(len%20%3E%20Number.MAX_SAFE_INTEGER)%20%7B%20return%20Number.MAX_SAFE_INTEGER%3B%20%7D%0A%20%20%20%20%20%20return%20len%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20SameValue%3A%20function%20(a%2C%20b)%20%7B%0A%20%20%20%20%20%20if%20(a%20%3D%3D%3D%20b)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%200%20%3D%3D%3D%20-0%2C%20but%20they%20are%20not%20identical.%0A%20%20%20%20%20%20%20%20if%20(a%20%3D%3D%3D%200)%20%7B%20return%201%20%2F%20a%20%3D%3D%3D%201%20%2F%20b%3B%20%7D%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%20return%20numberIsNaN(a)%20%26%26%20numberIsNaN(b)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20SameValueZero%3A%20function%20(a%2C%20b)%20%7B%0A%20%20%20%20%20%20%2F%2F%20same%20as%20SameValue%20except%20for%20SameValueZero(%2B0%2C%20-0)%20%3D%3D%20true%0A%20%20%20%20%20%20return%20(a%20%3D%3D%3D%20b)%20%7C%7C%20(numberIsNaN(a)%20%26%26%20numberIsNaN(b))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20IsIterable%3A%20function%20(o)%20%7B%0A%20%20%20%20%20%20return%20ES.TypeIsObject(o)%20%26%26%20(typeof%20o%5B%24iterator%24%5D%20!%3D%3D%20'undefined'%20%7C%7C%20isArguments(o))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20GetIterator%3A%20function%20(o)%20%7B%0A%20%20%20%20%20%20if%20(isArguments(o))%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20special%20case%20support%20for%20%60arguments%60%0A%20%20%20%20%20%20%20%20return%20new%20ArrayIterator(o%2C%20'value')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20itFn%20%3D%20ES.GetMethod(o%2C%20%24iterator%24)%3B%0A%20%20%20%20%20%20if%20(!ES.IsCallable(itFn))%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20Better%20diagnostics%20if%20itFn%20is%20null%20or%20undefined%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('value%20is%20not%20an%20iterable')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20it%20%3D%20_call(itFn%2C%20o)%3B%0A%20%20%20%20%20%20if%20(!ES.TypeIsObject(it))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('bad%20iterator')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20it%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20GetMethod%3A%20function%20(o%2C%20p)%20%7B%0A%20%20%20%20%20%20var%20func%20%3D%20ES.ToObject(o)%5Bp%5D%3B%0A%20%20%20%20%20%20if%20(func%20%3D%3D%3D%20void%200%20%7C%7C%20func%20%3D%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20return%20void%200%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!ES.IsCallable(func))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Method%20not%20callable%3A%20'%20%2B%20p)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20func%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20IteratorComplete%3A%20function%20(iterResult)%20%7B%0A%20%20%20%20%20%20return%20!!(iterResult.done)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20IteratorClose%3A%20function%20(iterator%2C%20completionIsThrow)%20%7B%0A%20%20%20%20%20%20var%20returnMethod%20%3D%20ES.GetMethod(iterator%2C%20'return')%3B%0A%20%20%20%20%20%20if%20(returnMethod%20%3D%3D%3D%20void%200)%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%20innerResult%2C%20innerException%3B%0A%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20innerResult%20%3D%20_call(returnMethod%2C%20iterator)%3B%0A%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20innerException%20%3D%20e%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(completionIsThrow)%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(innerException)%20%7B%0A%20%20%20%20%20%20%20%20throw%20innerException%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!ES.TypeIsObject(innerResult))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError(%22Iterator's%20return%20method%20returned%20a%20non-object.%22)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20IteratorNext%3A%20function%20(it)%20%7B%0A%20%20%20%20%20%20var%20result%20%3D%20arguments.length%20%3E%201%20%3F%20it.next(arguments%5B1%5D)%20%3A%20it.next()%3B%0A%20%20%20%20%20%20if%20(!ES.TypeIsObject(result))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('bad%20iterator')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20result%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20IteratorStep%3A%20function%20(it)%20%7B%0A%20%20%20%20%20%20var%20result%20%3D%20ES.IteratorNext(it)%3B%0A%20%20%20%20%20%20var%20done%20%3D%20ES.IteratorComplete(result)%3B%0A%20%20%20%20%20%20return%20done%20%3F%20false%20%3A%20result%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20Construct%3A%20function%20(C%2C%20args%2C%20newTarget%2C%20isES6internal)%20%7B%0A%20%20%20%20%20%20var%20target%20%3D%20typeof%20newTarget%20%3D%3D%3D%20'undefined'%20%3F%20C%20%3A%20newTarget%3B%0A%0A%20%20%20%20%20%20if%20(!isES6internal)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20Try%20to%20use%20Reflect.construct%20if%20available%0A%20%20%20%20%20%20%20%20return%20Reflect.construct(C%2C%20args%2C%20target)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%2F%2F%20OK%2C%20we%20have%20to%20fake%20it.%20%20This%20will%20only%20work%20if%20the%0A%20%20%20%20%20%20%2F%2F%20C.%5B%5BConstructorKind%5D%5D%20%3D%3D%20%22base%22%20--%20but%20that's%20the%20only%0A%20%20%20%20%20%20%2F%2F%20kind%20we%20can%20make%20in%20ES5%20code%20anyway.%0A%0A%20%20%20%20%20%20%2F%2F%20OrdinaryCreateFromConstructor(target%2C%20%22%25ObjectPrototype%25%22)%0A%20%20%20%20%20%20var%20proto%20%3D%20target.prototype%3B%0A%20%20%20%20%20%20if%20(!ES.TypeIsObject(proto))%20%7B%0A%20%20%20%20%20%20%20%20proto%20%3D%20Object.prototype%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20obj%20%3D%20create(proto)%3B%0A%20%20%20%20%20%20%2F%2F%20Call%20the%20constructor.%0A%20%20%20%20%20%20var%20result%20%3D%20ES.Call(C%2C%20obj%2C%20args)%3B%0A%20%20%20%20%20%20return%20ES.TypeIsObject(result)%20%3F%20result%20%3A%20obj%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20SpeciesConstructor%3A%20function%20(O%2C%20defaultConstructor)%20%7B%0A%20%20%20%20%20%20var%20C%20%3D%20O.constructor%3B%0A%20%20%20%20%20%20if%20(C%20%3D%3D%3D%20void%200)%20%7B%0A%20%20%20%20%20%20%20%20return%20defaultConstructor%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!ES.TypeIsObject(C))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Bad%20constructor')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20S%20%3D%20C%5BsymbolSpecies%5D%3B%0A%20%20%20%20%20%20if%20(S%20%3D%3D%3D%20void%200%20%7C%7C%20S%20%3D%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20return%20defaultConstructor%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!ES.IsConstructor(S))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Bad%20%40%40species')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20S%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20CreateHTML%3A%20function%20(string%2C%20tag%2C%20attribute%2C%20value)%20%7B%0A%20%20%20%20%20%20var%20S%20%3D%20String(string)%3B%0A%20%20%20%20%20%20var%20p1%20%3D%20'%3C'%20%2B%20tag%3B%0A%20%20%20%20%20%20if%20(attribute%20!%3D%3D%20'')%20%7B%0A%20%20%20%20%20%20%20%20var%20V%20%3D%20String(value)%3B%0A%20%20%20%20%20%20%20%20var%20escapedV%20%3D%20V.replace(%2F%22%2Fg%2C%20'%26quot%3B')%3B%0A%20%20%20%20%20%20%20%20p1%20%2B%3D%20'%20'%20%2B%20attribute%20%2B%20'%3D%22'%20%2B%20escapedV%20%2B%20'%22'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20p2%20%3D%20p1%20%2B%20'%3E'%3B%0A%20%20%20%20%20%20var%20p3%20%3D%20p2%20%2B%20S%3B%0A%20%20%20%20%20%20return%20p3%20%2B%20'%3C%2F'%20%2B%20tag%20%2B%20'%3E'%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20var%20Value%20%3D%20%7B%0A%20%20%20%20getter%3A%20function%20(object%2C%20name%2C%20getter)%20%7B%0A%20%20%20%20%20%20if%20(!supportsDescriptors)%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('getters%20require%20true%20ES5%20support')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20Object.defineProperty(object%2C%20name%2C%20%7B%0A%20%20%20%20%20%20%20%20configurable%3A%20true%2C%0A%20%20%20%20%20%20%20%20enumerable%3A%20false%2C%0A%20%20%20%20%20%20%20%20get%3A%20getter%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20proxy%3A%20function%20(originalObject%2C%20key%2C%20targetObject)%20%7B%0A%20%20%20%20%20%20if%20(!supportsDescriptors)%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('getters%20require%20true%20ES5%20support')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20originalDescriptor%20%3D%20Object.getOwnPropertyDescriptor(originalObject%2C%20key)%3B%0A%20%20%20%20%20%20Object.defineProperty(targetObject%2C%20key%2C%20%7B%0A%20%20%20%20%20%20%20%20configurable%3A%20originalDescriptor.configurable%2C%0A%20%20%20%20%20%20%20%20enumerable%3A%20originalDescriptor.enumerable%2C%0A%20%20%20%20%20%20%20%20get%3A%20function%20getKey()%20%7B%20return%20originalObject%5Bkey%5D%3B%20%7D%2C%0A%20%20%20%20%20%20%20%20set%3A%20function%20setKey(value)%20%7B%20originalObject%5Bkey%5D%20%3D%20value%3B%20%7D%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%2C%0A%20%20%20%20redefine%3A%20function%20(object%2C%20property%2C%20newValue)%20%7B%0A%20%20%20%20%20%20if%20(supportsDescriptors)%20%7B%0A%20%20%20%20%20%20%20%20var%20descriptor%20%3D%20Object.getOwnPropertyDescriptor(object%2C%20property)%3B%0A%20%20%20%20%20%20%20%20descriptor.value%20%3D%20newValue%3B%0A%20%20%20%20%20%20%20%20Object.defineProperty(object%2C%20property%2C%20descriptor)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20object%5Bproperty%5D%20%3D%20newValue%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20defineByDescriptor%3A%20function%20(object%2C%20property%2C%20descriptor)%20%7B%0A%20%20%20%20%20%20if%20(supportsDescriptors)%20%7B%0A%20%20%20%20%20%20%20%20Object.defineProperty(object%2C%20property%2C%20descriptor)%3B%0A%20%20%20%20%20%20%7D%20else%20if%20('value'%20in%20descriptor)%20%7B%0A%20%20%20%20%20%20%20%20object%5Bproperty%5D%20%3D%20descriptor.value%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20preserveToString%3A%20function%20(target%2C%20source)%20%7B%0A%20%20%20%20%20%20if%20(source%20%26%26%20ES.IsCallable(source.toString))%20%7B%0A%20%20%20%20%20%20%20%20defineProperty(target%2C%20'toString'%2C%20source.toString.bind(source)%2C%20true)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20var%20wrapConstructor%20%3D%20function%20wrapConstructor(original%2C%20replacement%2C%20keysToSkip)%20%7B%0A%20%20%20%20Value.preserveToString(replacement%2C%20original)%3B%0A%20%20%20%20if%20(Object.setPrototypeOf)%20%7B%0A%20%20%20%20%20%20%2F%2F%20sets%20up%20proper%20prototype%20chain%20where%20possible%0A%20%20%20%20%20%20Object.setPrototypeOf(original%2C%20replacement)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(supportsDescriptors)%20%7B%0A%20%20%20%20%20%20_forEach(Object.getOwnPropertyNames(original)%2C%20function%20(key)%20%7B%0A%20%20%20%20%20%20%20%20if%20(key%20in%20noop%20%7C%7C%20keysToSkip%5Bkey%5D)%20%7B%20return%3B%20%7D%0A%20%20%20%20%20%20%20%20Value.proxy(original%2C%20key%2C%20replacement)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20_forEach(Object.keys(original)%2C%20function%20(key)%20%7B%0A%20%20%20%20%20%20%20%20if%20(key%20in%20noop%20%7C%7C%20keysToSkip%5Bkey%5D)%20%7B%20return%3B%20%7D%0A%20%20%20%20%20%20%20%20replacement%5Bkey%5D%20%3D%20original%5Bkey%5D%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20replacement.prototype%20%3D%20original.prototype%3B%0A%20%20%20%20Value.redefine(original.prototype%2C%20'constructor'%2C%20replacement)%3B%0A%20%20%7D%3B%0A%0A%20%20var%20defaultSpeciesGetter%20%3D%20function%20()%20%7B%20return%20this%3B%20%7D%3B%0A%20%20var%20addDefaultSpecies%20%3D%20function%20(C)%20%7B%0A%20%20%20%20if%20(supportsDescriptors%20%26%26%20!_hasOwnProperty(C%2C%20symbolSpecies))%20%7B%0A%20%20%20%20%20%20Value.getter(C%2C%20symbolSpecies%2C%20defaultSpeciesGetter)%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20var%20overrideNative%20%3D%20function%20overrideNative(object%2C%20property%2C%20replacement)%20%7B%0A%20%20%20%20var%20original%20%3D%20object%5Bproperty%5D%3B%0A%20%20%20%20defineProperty(object%2C%20property%2C%20replacement%2C%20true)%3B%0A%20%20%20%20Value.preserveToString(object%5Bproperty%5D%2C%20original)%3B%0A%20%20%7D%3B%0A%0A%20%20var%20addIterator%20%3D%20function%20(prototype%2C%20impl)%20%7B%0A%20%20%20%20var%20implementation%20%3D%20impl%20%7C%7C%20function%20iterator()%20%7B%20return%20this%3B%20%7D%3B%0A%20%20%20%20defineProperty(prototype%2C%20%24iterator%24%2C%20implementation)%3B%0A%20%20%20%20if%20(!prototype%5B%24iterator%24%5D%20%26%26%20Type.symbol(%24iterator%24))%20%7B%0A%20%20%20%20%20%20%2F%2F%20implementations%20are%20buggy%20when%20%24iterator%24%20is%20a%20Symbol%0A%20%20%20%20%20%20prototype%5B%24iterator%24%5D%20%3D%20implementation%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20var%20createDataProperty%20%3D%20function%20createDataProperty(object%2C%20name%2C%20value)%20%7B%0A%20%20%20%20if%20(supportsDescriptors)%20%7B%0A%20%20%20%20%20%20Object.defineProperty(object%2C%20name%2C%20%7B%0A%20%20%20%20%20%20%20%20configurable%3A%20true%2C%0A%20%20%20%20%20%20%20%20enumerable%3A%20true%2C%0A%20%20%20%20%20%20%20%20writable%3A%20true%2C%0A%20%20%20%20%20%20%20%20value%3A%20value%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20object%5Bname%5D%20%3D%20value%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%20%20var%20createDataPropertyOrThrow%20%3D%20function%20createDataPropertyOrThrow(object%2C%20name%2C%20value)%20%7B%0A%20%20%20%20createDataProperty(object%2C%20name%2C%20value)%3B%0A%20%20%20%20if%20(!ES.SameValue(object%5Bname%5D%2C%20value))%20%7B%0A%20%20%20%20%20%20throw%20new%20TypeError('property%20is%20nonconfigurable')%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20var%20emulateES6construct%20%3D%20function%20(o%2C%20defaultNewTarget%2C%20defaultProto%2C%20slots)%20%7B%0A%20%20%20%20%2F%2F%20This%20is%20an%20es5%20approximation%20to%20es6%20construct%20semantics.%20%20in%20es6%2C%0A%20%20%20%20%2F%2F%20'new%20Foo'%20invokes%20Foo.%5B%5BConstruct%5D%5D%20which%20(for%20almost%20all%20objects)%0A%20%20%20%20%2F%2F%20just%20sets%20the%20internal%20variable%20NewTarget%20(in%20es6%20syntax%20%60new.target%60)%0A%20%20%20%20%2F%2F%20to%20Foo%20and%20then%20returns%20Foo().%0A%0A%20%20%20%20%2F%2F%20Many%20ES6%20object%20then%20have%20constructors%20of%20the%20form%3A%0A%20%20%20%20%2F%2F%201.%20If%20NewTarget%20is%20undefined%2C%20throw%20a%20TypeError%20exception%0A%20%20%20%20%2F%2F%202.%20Let%20xxx%20by%20OrdinaryCreateFromConstructor(NewTarget%2C%20yyy%2C%20zzz)%0A%0A%20%20%20%20%2F%2F%20So%20we're%20going%20to%20emulate%20those%20first%20two%20steps.%0A%20%20%20%20if%20(!ES.TypeIsObject(o))%20%7B%0A%20%20%20%20%20%20throw%20new%20TypeError('Constructor%20requires%20%60new%60%3A%20'%20%2B%20defaultNewTarget.name)%3B%0A%20%20%20%20%7D%0A%20%20%20%20var%20proto%20%3D%20defaultNewTarget.prototype%3B%0A%20%20%20%20if%20(!ES.TypeIsObject(proto))%20%7B%0A%20%20%20%20%20%20proto%20%3D%20defaultProto%3B%0A%20%20%20%20%7D%0A%20%20%20%20var%20obj%20%3D%20create(proto)%3B%0A%20%20%20%20for%20(var%20name%20in%20slots)%20%7B%0A%20%20%20%20%20%20if%20(_hasOwnProperty(slots%2C%20name))%20%7B%0A%20%20%20%20%20%20%20%20var%20value%20%3D%20slots%5Bname%5D%3B%0A%20%20%20%20%20%20%20%20defineProperty(obj%2C%20name%2C%20value%2C%20true)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20return%20obj%3B%0A%20%20%7D%3B%0A%0A%20%20%2F%2F%20Firefox%2031%20reports%20this%20function's%20length%20as%200%0A%20%20%2F%2F%20https%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1062484%0A%20%20if%20(String.fromCodePoint%20%26%26%20String.fromCodePoint.length%20!%3D%3D%201)%20%7B%0A%20%20%20%20var%20originalFromCodePoint%20%3D%20String.fromCodePoint%3B%0A%20%20%20%20overrideNative(String%2C%20'fromCodePoint'%2C%20function%20fromCodePoint(codePoints)%20%7B%20return%20_apply(originalFromCodePoint%2C%20this%2C%20arguments)%3B%20%7D)%3B%0A%20%20%7D%0A%0A%20%20var%20StringShims%20%3D%20%7B%0A%20%20%20%20fromCodePoint%3A%20function%20fromCodePoint(codePoints)%20%7B%0A%20%20%20%20%20%20var%20result%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20var%20next%3B%0A%20%20%20%20%20%20for%20(var%20i%20%3D%200%2C%20length%20%3D%20arguments.length%3B%20i%20%3C%20length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20next%20%3D%20Number(arguments%5Bi%5D)%3B%0A%20%20%20%20%20%20%20%20if%20(!ES.SameValue(next%2C%20ES.ToInteger(next))%20%7C%7C%20next%20%3C%200%20%7C%7C%20next%20%3E%200x10FFFF)%20%7B%0A%20%20%20%20%20%20%20%20%20%20throw%20new%20RangeError('Invalid%20code%20point%20'%20%2B%20next)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20if%20(next%20%3C%200x10000)%20%7B%0A%20%20%20%20%20%20%20%20%20%20_push(result%2C%20String.fromCharCode(next))%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20next%20-%3D%200x10000%3B%0A%20%20%20%20%20%20%20%20%20%20_push(result%2C%20String.fromCharCode((next%20%3E%3E%2010)%20%2B%200xD800))%3B%0A%20%20%20%20%20%20%20%20%20%20_push(result%2C%20String.fromCharCode((next%20%25%200x400)%20%2B%200xDC00))%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%20result.join('')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20raw%3A%20function%20raw(callSite)%20%7B%0A%20%20%20%20%20%20var%20cooked%20%3D%20ES.ToObject(callSite%2C%20'bad%20callSite')%3B%0A%20%20%20%20%20%20var%20rawString%20%3D%20ES.ToObject(cooked.raw%2C%20'bad%20raw%20value')%3B%0A%20%20%20%20%20%20var%20len%20%3D%20rawString.length%3B%0A%20%20%20%20%20%20var%20literalsegments%20%3D%20ES.ToLength(len)%3B%0A%20%20%20%20%20%20if%20(literalsegments%20%3C%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20return%20''%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20var%20stringElements%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20var%20nextIndex%20%3D%200%3B%0A%20%20%20%20%20%20var%20nextKey%2C%20next%2C%20nextSeg%2C%20nextSub%3B%0A%20%20%20%20%20%20while%20(nextIndex%20%3C%20literalsegments)%20%7B%0A%20%20%20%20%20%20%20%20nextKey%20%3D%20String(nextIndex)%3B%0A%20%20%20%20%20%20%20%20nextSeg%20%3D%20String(rawString%5BnextKey%5D)%3B%0A%20%20%20%20%20%20%20%20_push(stringElements%2C%20nextSeg)%3B%0A%20%20%20%20%20%20%20%20if%20(nextIndex%20%2B%201%20%3E%3D%20literalsegments)%20%7B%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%20%20next%20%3D%20nextIndex%20%2B%201%20%3C%20arguments.length%20%3F%20arguments%5BnextIndex%20%2B%201%5D%20%3A%20''%3B%0A%20%20%20%20%20%20%20%20nextSub%20%3D%20String(next)%3B%0A%20%20%20%20%20%20%20%20_push(stringElements%2C%20nextSub)%3B%0A%20%20%20%20%20%20%20%20nextIndex%20%2B%3D%201%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20stringElements.join('')%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%20%20if%20(String.raw%20%26%26%20String.raw(%7B%20raw%3A%20%7B%200%3A%20'x'%2C%201%3A%20'y'%2C%20length%3A%202%20%7D%20%7D)%20!%3D%3D%20'xy')%20%7B%0A%20%20%20%20%2F%2F%20IE%2011%20TP%20has%20a%20broken%20String.raw%20implementation%0A%20%20%20%20overrideNative(String%2C%20'raw'%2C%20StringShims.raw)%3B%0A%20%20%7D%0A%20%20defineProperties(String%2C%20StringShims)%3B%0A%0A%20%20%2F%2F%20Fast%20repeat%2C%20uses%20the%20%60Exponentiation%20by%20squaring%60%20algorithm.%0A%20%20%2F%2F%20Perf%3A%20http%3A%2F%2Fjsperf.com%2Fstring-repeat2%2F2%0A%20%20var%20stringRepeat%20%3D%20function%20repeat(s%2C%20times)%20%7B%0A%20%20%20%20if%20(times%20%3C%201)%20%7B%20return%20''%3B%20%7D%0A%20%20%20%20if%20(times%20%25%202)%20%7B%20return%20repeat(s%2C%20times%20-%201)%20%2B%20s%3B%20%7D%0A%20%20%20%20var%20half%20%3D%20repeat(s%2C%20times%20%2F%202)%3B%0A%20%20%20%20return%20half%20%2B%20half%3B%0A%20%20%7D%3B%0A%20%20var%20stringMaxLength%20%3D%20Infinity%3B%0A%0A%20%20var%20StringPrototypeShims%20%3D%20%7B%0A%20%20%20%20repeat%3A%20function%20repeat(times)%20%7B%0A%20%20%20%20%20%20ES.RequireObjectCoercible(this)%3B%0A%20%20%20%20%20%20var%20thisStr%20%3D%20String(this)%3B%0A%20%20%20%20%20%20var%20numTimes%20%3D%20ES.ToInteger(times)%3B%0A%20%20%20%20%20%20if%20(numTimes%20%3C%200%20%7C%7C%20numTimes%20%3E%3D%20stringMaxLength)%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20RangeError('repeat%20count%20must%20be%20less%20than%20infinity%20and%20not%20overflow%20maximum%20string%20size')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20stringRepeat(thisStr%2C%20numTimes)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20startsWith%3A%20function%20startsWith(searchString)%20%7B%0A%20%20%20%20%20%20ES.RequireObjectCoercible(this)%3B%0A%20%20%20%20%20%20var%20thisStr%20%3D%20String(this)%3B%0A%20%20%20%20%20%20if%20(Type.regex(searchString))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Cannot%20call%20method%20%22startsWith%22%20with%20a%20regex')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20searchStr%20%3D%20String(searchString)%3B%0A%20%20%20%20%20%20var%20startArg%20%3D%20arguments.length%20%3E%201%20%3F%20arguments%5B1%5D%20%3A%20void%200%3B%0A%20%20%20%20%20%20var%20start%20%3D%20_max(ES.ToInteger(startArg)%2C%200)%3B%0A%20%20%20%20%20%20return%20_strSlice(thisStr%2C%20start%2C%20start%20%2B%20searchStr.length)%20%3D%3D%3D%20searchStr%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20endsWith%3A%20function%20endsWith(searchString)%20%7B%0A%20%20%20%20%20%20ES.RequireObjectCoercible(this)%3B%0A%20%20%20%20%20%20var%20thisStr%20%3D%20String(this)%3B%0A%20%20%20%20%20%20if%20(Type.regex(searchString))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Cannot%20call%20method%20%22endsWith%22%20with%20a%20regex')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20searchStr%20%3D%20String(searchString)%3B%0A%20%20%20%20%20%20var%20thisLen%20%3D%20thisStr.length%3B%0A%20%20%20%20%20%20var%20posArg%20%3D%20arguments.length%20%3E%201%20%3F%20arguments%5B1%5D%20%3A%20void%200%3B%0A%20%20%20%20%20%20var%20pos%20%3D%20typeof%20posArg%20%3D%3D%3D%20'undefined'%20%3F%20thisLen%20%3A%20ES.ToInteger(posArg)%3B%0A%20%20%20%20%20%20var%20end%20%3D%20_min(_max(pos%2C%200)%2C%20thisLen)%3B%0A%20%20%20%20%20%20return%20_strSlice(thisStr%2C%20end%20-%20searchStr.length%2C%20end)%20%3D%3D%3D%20searchStr%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20includes%3A%20function%20includes(searchString)%20%7B%0A%20%20%20%20%20%20if%20(Type.regex(searchString))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('%22includes%22%20does%20not%20accept%20a%20RegExp')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20position%3B%0A%20%20%20%20%20%20if%20(arguments.length%20%3E%201)%20%7B%0A%20%20%20%20%20%20%20%20position%20%3D%20arguments%5B1%5D%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%2F%2F%20Somehow%20this%20trick%20makes%20method%20100%25%20compat%20with%20the%20spec.%0A%20%20%20%20%20%20return%20_indexOf(this%2C%20searchString%2C%20position)%20!%3D%3D%20-1%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20codePointAt%3A%20function%20codePointAt(pos)%20%7B%0A%20%20%20%20%20%20ES.RequireObjectCoercible(this)%3B%0A%20%20%20%20%20%20var%20thisStr%20%3D%20String(this)%3B%0A%20%20%20%20%20%20var%20position%20%3D%20ES.ToInteger(pos)%3B%0A%20%20%20%20%20%20var%20length%20%3D%20thisStr.length%3B%0A%20%20%20%20%20%20if%20(position%20%3E%3D%200%20%26%26%20position%20%3C%20length)%20%7B%0A%20%20%20%20%20%20%20%20var%20first%20%3D%20thisStr.charCodeAt(position)%3B%0A%20%20%20%20%20%20%20%20var%20isEnd%20%3D%20(position%20%2B%201%20%3D%3D%3D%20length)%3B%0A%20%20%20%20%20%20%20%20if%20(first%20%3C%200xD800%20%7C%7C%20first%20%3E%200xDBFF%20%7C%7C%20isEnd)%20%7B%20return%20first%3B%20%7D%0A%20%20%20%20%20%20%20%20var%20second%20%3D%20thisStr.charCodeAt(position%20%2B%201)%3B%0A%20%20%20%20%20%20%20%20if%20(second%20%3C%200xDC00%20%7C%7C%20second%20%3E%200xDFFF)%20%7B%20return%20first%3B%20%7D%0A%20%20%20%20%20%20%20%20return%20((first%20-%200xD800)%20*%201024)%20%2B%20(second%20-%200xDC00)%20%2B%200x10000%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%20%20if%20(String.prototype.includes%20%26%26%20'a'.includes('a'%2C%20Infinity)%20!%3D%3D%20false)%20%7B%0A%20%20%20%20overrideNative(String.prototype%2C%20'includes'%2C%20StringPrototypeShims.includes)%3B%0A%20%20%7D%0A%0A%20%20if%20(String.prototype.startsWith%20%26%26%20String.prototype.endsWith)%20%7B%0A%20%20%20%20var%20startsWithRejectsRegex%20%3D%20throwsError(function%20()%20%7B%0A%20%20%20%20%20%20%2F*%20throws%20if%20spec-compliant%20*%2F%0A%20%20%20%20%20%20'%2Fa%2F'.startsWith(%2Fa%2F)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20var%20startsWithHandlesInfinity%20%3D%20'abc'.startsWith('a'%2C%20Infinity)%20%3D%3D%3D%20false%3B%0A%20%20%20%20if%20(!startsWithRejectsRegex%20%7C%7C%20!startsWithHandlesInfinity)%20%7B%0A%20%20%20%20%20%20%2F%2F%20Firefox%20(%3C%2037%3F)%20and%20IE%2011%20TP%20have%20a%20noncompliant%20startsWith%20implementation%0A%20%20%20%20%20%20overrideNative(String.prototype%2C%20'startsWith'%2C%20StringPrototypeShims.startsWith)%3B%0A%20%20%20%20%20%20overrideNative(String.prototype%2C%20'endsWith'%2C%20StringPrototypeShims.endsWith)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20defineProperties(String.prototype%2C%20StringPrototypeShims)%3B%0A%0A%20%20%2F%2F%20whitespace%20from%3A%20http%3A%2F%2Fes5.github.io%2F%23x15.5.4.20%0A%20%20%2F%2F%20implementation%20from%20https%3A%2F%2Fgithub.com%2Fes-shims%2Fes5-shim%2Fblob%2Fv3.4.0%2Fes5-shim.js%23L1304-L1324%0A%20%20var%20ws%20%3D%20%5B%0A%20%20%20%20'%5Cx09%5Cx0A%5Cx0B%5Cx0C%5Cx0D%5Cx20%5CxA0%5Cu1680%5Cu180E%5Cu2000%5Cu2001%5Cu2002%5Cu2003'%2C%0A%20%20%20%20'%5Cu2004%5Cu2005%5Cu2006%5Cu2007%5Cu2008%5Cu2009%5Cu200A%5Cu202F%5Cu205F%5Cu3000%5Cu2028'%2C%0A%20%20%20%20'%5Cu2029%5CuFEFF'%0A%20%20%5D.join('')%3B%0A%20%20var%20trimRegexp%20%3D%20new%20RegExp('(%5E%5B'%20%2B%20ws%20%2B%20'%5D%2B)%7C(%5B'%20%2B%20ws%20%2B%20'%5D%2B%24)'%2C%20'g')%3B%0A%20%20var%20trimShim%20%3D%20function%20trim()%20%7B%0A%20%20%20%20if%20(typeof%20this%20%3D%3D%3D%20'undefined'%20%7C%7C%20this%20%3D%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20throw%20new%20TypeError(%22can't%20convert%20%22%20%2B%20this%20%2B%20'%20to%20object')%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20String(this).replace(trimRegexp%2C%20'')%3B%0A%20%20%7D%3B%0A%20%20var%20nonWS%20%3D%20%5B'%5Cu0085'%2C%20'%5Cu200b'%2C%20'%5Cufffe'%5D.join('')%3B%0A%20%20var%20nonWSregex%20%3D%20new%20RegExp('%5B'%20%2B%20nonWS%20%2B%20'%5D'%2C%20'g')%3B%0A%20%20var%20isBadHexRegex%20%3D%20%2F%5E%5B%5C-%2B%5D0x%5B0-9a-f%5D%2B%24%2Fi%3B%0A%20%20var%20hasStringTrimBug%20%3D%20nonWS.trim().length%20!%3D%3D%20nonWS.length%3B%0A%20%20defineProperty(String.prototype%2C%20'trim'%2C%20trimShim%2C%20hasStringTrimBug)%3B%0A%0A%20%20%2F%2F%20see%20https%3A%2F%2Fpeople.mozilla.org%2F~jorendorff%2Fes6-draft.html%23sec-string.prototype-%40%40iterator%0A%20%20var%20StringIterator%20%3D%20function%20(s)%20%7B%0A%20%20%20%20ES.RequireObjectCoercible(s)%3B%0A%20%20%20%20this._s%20%3D%20String(s)%3B%0A%20%20%20%20this._i%20%3D%200%3B%0A%20%20%7D%3B%0A%20%20StringIterator.prototype.next%20%3D%20function%20()%20%7B%0A%20%20%20%20var%20s%20%3D%20this._s%2C%20i%20%3D%20this._i%3B%0A%20%20%20%20if%20(typeof%20s%20%3D%3D%3D%20'undefined'%20%7C%7C%20i%20%3E%3D%20s.length)%20%7B%0A%20%20%20%20%20%20this._s%20%3D%20void%200%3B%0A%20%20%20%20%20%20return%20%7B%20value%3A%20void%200%2C%20done%3A%20true%20%7D%3B%0A%20%20%20%20%7D%0A%20%20%20%20var%20first%20%3D%20s.charCodeAt(i)%2C%20second%2C%20len%3B%0A%20%20%20%20if%20(first%20%3C%200xD800%20%7C%7C%20first%20%3E%200xDBFF%20%7C%7C%20(i%20%2B%201)%20%3D%3D%3D%20s.length)%20%7B%0A%20%20%20%20%20%20len%20%3D%201%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20second%20%3D%20s.charCodeAt(i%20%2B%201)%3B%0A%20%20%20%20%20%20len%20%3D%20(second%20%3C%200xDC00%20%7C%7C%20second%20%3E%200xDFFF)%20%3F%201%20%3A%202%3B%0A%20%20%20%20%7D%0A%20%20%20%20this._i%20%3D%20i%20%2B%20len%3B%0A%20%20%20%20return%20%7B%20value%3A%20s.substr(i%2C%20len)%2C%20done%3A%20false%20%7D%3B%0A%20%20%7D%3B%0A%20%20addIterator(StringIterator.prototype)%3B%0A%20%20addIterator(String.prototype%2C%20function%20()%20%7B%0A%20%20%20%20return%20new%20StringIterator(this)%3B%0A%20%20%7D)%3B%0A%0A%20%20var%20ArrayShims%20%3D%20%7B%0A%20%20%20%20from%3A%20function%20from(items)%20%7B%0A%20%20%20%20%20%20var%20C%20%3D%20this%3B%0A%20%20%20%20%20%20var%20mapFn%20%3D%20arguments.length%20%3E%201%20%3F%20arguments%5B1%5D%20%3A%20void%200%3B%0A%20%20%20%20%20%20var%20mapping%2C%20T%3B%0A%20%20%20%20%20%20if%20(mapFn%20%3D%3D%3D%20void%200)%20%7B%0A%20%20%20%20%20%20%20%20mapping%20%3D%20false%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20if%20(!ES.IsCallable(mapFn))%20%7B%0A%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Array.from%3A%20when%20provided%2C%20the%20second%20argument%20must%20be%20a%20function')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20T%20%3D%20arguments.length%20%3E%202%20%3F%20arguments%5B2%5D%20%3A%20void%200%3B%0A%20%20%20%20%20%20%20%20mapping%20%3D%20true%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20Note%20that%20that%20Arrays%20will%20use%20ArrayIterator%3A%0A%20%20%20%20%20%20%2F%2F%20https%3A%2F%2Fbugs.ecmascript.org%2Fshow_bug.cgi%3Fid%3D2416%0A%20%20%20%20%20%20var%20usingIterator%20%3D%20typeof%20(isArguments(items)%20%7C%7C%20ES.GetMethod(items%2C%20%24iterator%24))%20!%3D%3D%20'undefined'%3B%0A%0A%20%20%20%20%20%20var%20length%2C%20result%2C%20i%3B%0A%20%20%20%20%20%20if%20(usingIterator)%20%7B%0A%20%20%20%20%20%20%20%20result%20%3D%20ES.IsConstructor(C)%20%3F%20Object(new%20C())%20%3A%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20var%20iterator%20%3D%20ES.GetIterator(items)%3B%0A%20%20%20%20%20%20%20%20var%20next%2C%20nextValue%3B%0A%0A%20%20%20%20%20%20%20%20i%20%3D%200%3B%0A%20%20%20%20%20%20%20%20while%20(true)%20%7B%0A%20%20%20%20%20%20%20%20%20%20next%20%3D%20ES.IteratorStep(iterator)%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(next%20%3D%3D%3D%20false)%20%7B%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%20%20nextValue%20%3D%20next.value%3B%0A%20%20%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(mapping)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20nextValue%20%3D%20T%20%3D%3D%3D%20undefined%20%3F%20mapFn(nextValue%2C%20i)%20%3A%20_call(mapFn%2C%20T%2C%20nextValue%2C%20i)%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%20result%5Bi%5D%20%3D%20nextValue%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20ES.IteratorClose(iterator%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20e%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20i%20%2B%3D%201%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20length%20%3D%20i%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20var%20arrayLike%20%3D%20ES.ToObject(items)%3B%0A%20%20%20%20%20%20%20%20length%20%3D%20ES.ToLength(arrayLike.length)%3B%0A%20%20%20%20%20%20%20%20result%20%3D%20ES.IsConstructor(C)%20%3F%20Object(new%20C(length))%20%3A%20new%20Array(length)%3B%0A%20%20%20%20%20%20%20%20var%20value%3B%0A%20%20%20%20%20%20%20%20for%20(i%20%3D%200%3B%20i%20%3C%20length%3B%20%2B%2Bi)%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%20%3D%20arrayLike%5Bi%5D%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(mapping)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20value%20%3D%20T%20!%3D%3D%20undefined%20%3F%20_call(mapFn%2C%20T%2C%20value%2C%20i)%20%3A%20mapFn(value%2C%20i)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20result%5Bi%5D%20%3D%20value%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%20result.length%20%3D%20length%3B%0A%20%20%20%20%20%20return%20result%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20of%3A%20function%20of()%20%7B%0A%20%20%20%20%20%20var%20len%20%3D%20arguments.length%3B%0A%20%20%20%20%20%20var%20C%20%3D%20this%3B%0A%20%20%20%20%20%20var%20A%20%3D%20isArray(C)%20%7C%7C%20!ES.IsCallable(C)%20%3F%20new%20Array(len)%20%3A%20ES.Construct(C%2C%20%5Blen%5D)%3B%0A%20%20%20%20%20%20for%20(var%20k%20%3D%200%3B%20k%20%3C%20len%3B%20%2B%2Bk)%20%7B%0A%20%20%20%20%20%20%20%20createDataPropertyOrThrow(A%2C%20k%2C%20arguments%5Bk%5D)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20A.length%20%3D%20len%3B%0A%20%20%20%20%20%20return%20A%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%20%20defineProperties(Array%2C%20ArrayShims)%3B%0A%20%20addDefaultSpecies(Array)%3B%0A%0A%20%20%2F%2F%20Given%20an%20argument%20x%2C%20it%20will%20return%20an%20IteratorResult%20object%2C%0A%20%20%2F%2F%20with%20value%20set%20to%20x%20and%20done%20to%20false.%0A%20%20%2F%2F%20Given%20no%20arguments%2C%20it%20will%20return%20an%20iterator%20completion%20object.%0A%20%20var%20iteratorResult%20%3D%20function%20(x)%20%7B%0A%20%20%20%20return%20%7B%20value%3A%20x%2C%20done%3A%20arguments.length%20%3D%3D%3D%200%20%7D%3B%0A%20%20%7D%3B%0A%0A%20%20%2F%2F%20Our%20ArrayIterator%20is%20private%3B%20see%0A%20%20%2F%2F%20https%3A%2F%2Fgithub.com%2Fpaulmillr%2Fes6-shim%2Fissues%2F252%0A%20%20ArrayIterator%20%3D%20function%20(array%2C%20kind)%20%7B%0A%20%20%20%20%20%20this.i%20%3D%200%3B%0A%20%20%20%20%20%20this.array%20%3D%20array%3B%0A%20%20%20%20%20%20this.kind%20%3D%20kind%3B%0A%20%20%7D%3B%0A%0A%20%20defineProperties(ArrayIterator.prototype%2C%20%7B%0A%20%20%20%20next%3A%20function%20()%20%7B%0A%20%20%20%20%20%20var%20i%20%3D%20this.i%2C%20array%20%3D%20this.array%3B%0A%20%20%20%20%20%20if%20(!(this%20instanceof%20ArrayIterator))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Not%20an%20ArrayIterator')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(typeof%20array%20!%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20%20%20var%20len%20%3D%20ES.ToLength(array.length)%3B%0A%20%20%20%20%20%20%20%20for%20(%3B%20i%20%3C%20len%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20kind%20%3D%20this.kind%3B%0A%20%20%20%20%20%20%20%20%20%20var%20retval%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(kind%20%3D%3D%3D%20'key')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20retval%20%3D%20i%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(kind%20%3D%3D%3D%20'value')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20retval%20%3D%20array%5Bi%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(kind%20%3D%3D%3D%20'entry')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20retval%20%3D%20%5Bi%2C%20array%5Bi%5D%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20this.i%20%3D%20i%20%2B%201%3B%0A%20%20%20%20%20%20%20%20%20%20return%20%7B%20value%3A%20retval%2C%20done%3A%20false%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%20%20this.array%20%3D%20void%200%3B%0A%20%20%20%20%20%20return%20%7B%20value%3A%20void%200%2C%20done%3A%20true%20%7D%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%20%20addIterator(ArrayIterator.prototype)%3B%0A%0A%20%20var%20getAllKeys%20%3D%20function%20getAllKeys(object)%20%7B%0A%20%20%20%20var%20keys%20%3D%20%5B%5D%3B%0A%0A%20%20%20%20for%20(var%20key%20in%20object)%20%7B%0A%20%20%20%20%20%20_push(keys%2C%20key)%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20keys%3B%0A%20%20%7D%3B%0A%0A%20%20var%20ObjectIterator%20%3D%20function%20(object%2C%20kind)%20%7B%0A%20%20%20%20defineProperties(this%2C%20%7B%0A%20%20%20%20%20%20object%3A%20object%2C%0A%20%20%20%20%20%20array%3A%20getAllKeys(object)%2C%0A%20%20%20%20%20%20kind%3A%20kind%0A%20%20%20%20%7D)%3B%0A%20%20%7D%3B%0A%0A%20%20defineProperties(ObjectIterator.prototype%2C%20%7B%0A%20%20%20%20next%3A%20function%20next()%20%7B%0A%20%20%20%20%20%20var%20key%3B%0A%20%20%20%20%20%20var%20array%20%3D%20this.array%3B%0A%0A%20%20%20%20%20%20if%20(!(this%20instanceof%20ObjectIterator))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Not%20an%20ObjectIterator')%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20Find%20next%20key%20in%20the%20object%0A%20%20%20%20%20%20while%20(array.length%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20key%20%3D%20_shift(array)%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20The%20candidate%20key%20isn't%20defined%20on%20object.%0A%20%20%20%20%20%20%20%20%2F%2F%20Must%20have%20been%20deleted%2C%20or%20object%5B%5BPrototype%5D%5D%0A%20%20%20%20%20%20%20%20%2F%2F%20has%20been%20modified.%0A%20%20%20%20%20%20%20%20if%20(!(key%20in%20this.object))%20%7B%0A%20%20%20%20%20%20%20%20%20%20continue%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20if%20(this.kind%20%3D%3D%3D%20'key')%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20iteratorResult(key)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(this.kind%20%3D%3D%3D%20'value')%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20iteratorResult(this.object%5Bkey%5D)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20iteratorResult(%5Bkey%2C%20this.object%5Bkey%5D%5D)%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%20return%20iteratorResult()%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%20%20addIterator(ObjectIterator.prototype)%3B%0A%0A%20%20%2F%2F%20note%3A%20this%20is%20positioned%20here%20because%20it%20depends%20on%20ArrayIterator%0A%20%20var%20arrayOfSupportsSubclassing%20%3D%20Array.of%20%3D%3D%3D%20ArrayShims.of%20%7C%7C%20(function%20()%20%7B%0A%20%20%20%20%2F%2F%20Detects%20a%20bug%20in%20Webkit%20nightly%20r181886%0A%20%20%20%20var%20Foo%20%3D%20function%20Foo(len)%20%7B%20this.length%20%3D%20len%3B%20%7D%3B%0A%20%20%20%20Foo.prototype%20%3D%20%5B%5D%3B%0A%20%20%20%20var%20fooArr%20%3D%20Array.of.apply(Foo%2C%20%5B1%2C%202%5D)%3B%0A%20%20%20%20return%20fooArr%20instanceof%20Foo%20%26%26%20fooArr.length%20%3D%3D%3D%202%3B%0A%20%20%7D())%3B%0A%20%20if%20(!arrayOfSupportsSubclassing)%20%7B%0A%20%20%20%20overrideNative(Array%2C%20'of'%2C%20ArrayShims.of)%3B%0A%20%20%7D%0A%0A%20%20var%20ArrayPrototypeShims%20%3D%20%7B%0A%20%20%20%20copyWithin%3A%20function%20copyWithin(target%2C%20start)%20%7B%0A%20%20%20%20%20%20var%20end%20%3D%20arguments%5B2%5D%3B%20%2F%2F%20copyWithin.length%20must%20be%202%0A%20%20%20%20%20%20var%20o%20%3D%20ES.ToObject(this)%3B%0A%20%20%20%20%20%20var%20len%20%3D%20ES.ToLength(o.length)%3B%0A%20%20%20%20%20%20var%20relativeTarget%20%3D%20ES.ToInteger(target)%3B%0A%20%20%20%20%20%20var%20relativeStart%20%3D%20ES.ToInteger(start)%3B%0A%20%20%20%20%20%20var%20to%20%3D%20relativeTarget%20%3C%200%20%3F%20_max(len%20%2B%20relativeTarget%2C%200)%20%3A%20_min(relativeTarget%2C%20len)%3B%0A%20%20%20%20%20%20var%20from%20%3D%20relativeStart%20%3C%200%20%3F%20_max(len%20%2B%20relativeStart%2C%200)%20%3A%20_min(relativeStart%2C%20len)%3B%0A%20%20%20%20%20%20end%20%3D%20typeof%20end%20%3D%3D%3D%20'undefined'%20%3F%20len%20%3A%20ES.ToInteger(end)%3B%0A%20%20%20%20%20%20var%20fin%20%3D%20end%20%3C%200%20%3F%20_max(len%20%2B%20end%2C%200)%20%3A%20_min(end%2C%20len)%3B%0A%20%20%20%20%20%20var%20count%20%3D%20_min(fin%20-%20from%2C%20len%20-%20to)%3B%0A%20%20%20%20%20%20var%20direction%20%3D%201%3B%0A%20%20%20%20%20%20if%20(from%20%3C%20to%20%26%26%20to%20%3C%20(from%20%2B%20count))%20%7B%0A%20%20%20%20%20%20%20%20direction%20%3D%20-1%3B%0A%20%20%20%20%20%20%20%20from%20%2B%3D%20count%20-%201%3B%0A%20%20%20%20%20%20%20%20to%20%2B%3D%20count%20-%201%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20while%20(count%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20if%20(_hasOwnProperty(o%2C%20from))%20%7B%0A%20%20%20%20%20%20%20%20%20%20o%5Bto%5D%20%3D%20o%5Bfrom%5D%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20delete%20o%5Bfrom%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20from%20%2B%3D%20direction%3B%0A%20%20%20%20%20%20%20%20to%20%2B%3D%20direction%3B%0A%20%20%20%20%20%20%20%20count%20-%3D%201%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20o%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20fill%3A%20function%20fill(value)%20%7B%0A%20%20%20%20%20%20var%20start%20%3D%20arguments.length%20%3E%201%20%3F%20arguments%5B1%5D%20%3A%20void%200%3B%0A%20%20%20%20%20%20var%20end%20%3D%20arguments.length%20%3E%202%20%3F%20arguments%5B2%5D%20%3A%20void%200%3B%0A%20%20%20%20%20%20var%20O%20%3D%20ES.ToObject(this)%3B%0A%20%20%20%20%20%20var%20len%20%3D%20ES.ToLength(O.length)%3B%0A%20%20%20%20%20%20start%20%3D%20ES.ToInteger(typeof%20start%20%3D%3D%3D%20'undefined'%20%3F%200%20%3A%20start)%3B%0A%20%20%20%20%20%20end%20%3D%20ES.ToInteger(typeof%20end%20%3D%3D%3D%20'undefined'%20%3F%20len%20%3A%20end)%3B%0A%0A%20%20%20%20%20%20var%20relativeStart%20%3D%20start%20%3C%200%20%3F%20_max(len%20%2B%20start%2C%200)%20%3A%20_min(start%2C%20len)%3B%0A%20%20%20%20%20%20var%20relativeEnd%20%3D%20end%20%3C%200%20%3F%20len%20%2B%20end%20%3A%20end%3B%0A%0A%20%20%20%20%20%20for%20(var%20i%20%3D%20relativeStart%3B%20i%20%3C%20len%20%26%26%20i%20%3C%20relativeEnd%3B%20%2B%2Bi)%20%7B%0A%20%20%20%20%20%20%20%20O%5Bi%5D%20%3D%20value%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20O%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20find%3A%20function%20find(predicate)%20%7B%0A%20%20%20%20%20%20var%20list%20%3D%20ES.ToObject(this)%3B%0A%20%20%20%20%20%20var%20length%20%3D%20ES.ToLength(list.length)%3B%0A%20%20%20%20%20%20if%20(!ES.IsCallable(predicate))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Array%23find%3A%20predicate%20must%20be%20a%20function')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20thisArg%20%3D%20arguments.length%20%3E%201%20%3F%20arguments%5B1%5D%20%3A%20null%3B%0A%20%20%20%20%20%20for%20(var%20i%20%3D%200%2C%20value%3B%20i%20%3C%20length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20value%20%3D%20list%5Bi%5D%3B%0A%20%20%20%20%20%20%20%20if%20(thisArg)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(_call(predicate%2C%20thisArg%2C%20value%2C%20i%2C%20list))%20%7B%20return%20value%3B%20%7D%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(predicate(value%2C%20i%2C%20list))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20value%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%20findIndex%3A%20function%20findIndex(predicate)%20%7B%0A%20%20%20%20%20%20var%20list%20%3D%20ES.ToObject(this)%3B%0A%20%20%20%20%20%20var%20length%20%3D%20ES.ToLength(list.length)%3B%0A%20%20%20%20%20%20if%20(!ES.IsCallable(predicate))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Array%23findIndex%3A%20predicate%20must%20be%20a%20function')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20thisArg%20%3D%20arguments.length%20%3E%201%20%3F%20arguments%5B1%5D%20%3A%20null%3B%0A%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20if%20(thisArg)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(_call(predicate%2C%20thisArg%2C%20list%5Bi%5D%2C%20i%2C%20list))%20%7B%20return%20i%3B%20%7D%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(predicate(list%5Bi%5D%2C%20i%2C%20list))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20i%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%20-1%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20keys%3A%20function%20keys()%20%7B%0A%20%20%20%20%20%20return%20new%20ArrayIterator(this%2C%20'key')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20values%3A%20function%20values()%20%7B%0A%20%20%20%20%20%20return%20new%20ArrayIterator(this%2C%20'value')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20entries%3A%20function%20entries()%20%7B%0A%20%20%20%20%20%20return%20new%20ArrayIterator(this%2C%20'entry')%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%20%20%2F%2F%20Safari%207.1%20defines%20Array%23keys%20and%20Array%23entries%20natively%2C%0A%20%20%2F%2F%20but%20the%20resulting%20ArrayIterator%20objects%20don't%20have%20a%20%22next%22%20method.%0A%20%20if%20(Array.prototype.keys%20%26%26%20!ES.IsCallable(%5B1%5D.keys().next))%20%7B%0A%20%20%20%20delete%20Array.prototype.keys%3B%0A%20%20%7D%0A%20%20if%20(Array.prototype.entries%20%26%26%20!ES.IsCallable(%5B1%5D.entries().next))%20%7B%0A%20%20%20%20delete%20Array.prototype.entries%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20Chrome%2038%20defines%20Array%23keys%20and%20Array%23entries%2C%20and%20Array%23%40%40iterator%2C%20but%20not%20Array%23values%0A%20%20if%20(Array.prototype.keys%20%26%26%20Array.prototype.entries%20%26%26%20!Array.prototype.values%20%26%26%20Array.prototype%5B%24iterator%24%5D)%20%7B%0A%20%20%20%20defineProperties(Array.prototype%2C%20%7B%0A%20%20%20%20%20%20values%3A%20Array.prototype%5B%24iterator%24%5D%0A%20%20%20%20%7D)%3B%0A%20%20%20%20if%20(Type.symbol(Symbol.unscopables))%20%7B%0A%20%20%20%20%20%20Array.prototype%5BSymbol.unscopables%5D.values%20%3D%20true%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20%2F%2F%20Chrome%2040%20defines%20Array%23values%20with%20the%20incorrect%20name%2C%20although%20Array%23%7Bkeys%2Centries%7D%20have%20the%20correct%20name%0A%20%20if%20(functionsHaveNames%20%26%26%20Array.prototype.values%20%26%26%20Array.prototype.values.name%20!%3D%3D%20'values')%20%7B%0A%20%20%20%20var%20originalArrayPrototypeValues%20%3D%20Array.prototype.values%3B%0A%20%20%20%20overrideNative(Array.prototype%2C%20'values'%2C%20function%20values()%20%7B%20return%20_call(originalArrayPrototypeValues%2C%20this)%3B%20%7D)%3B%0A%20%20%20%20defineProperty(Array.prototype%2C%20%24iterator%24%2C%20Array.prototype.values%2C%20true)%3B%0A%20%20%7D%0A%20%20defineProperties(Array.prototype%2C%20ArrayPrototypeShims)%3B%0A%0A%20%20addIterator(Array.prototype%2C%20function%20()%20%7B%20return%20this.values()%3B%20%7D)%3B%0A%20%20%2F%2F%20Chrome%20defines%20keys%2Fvalues%2Fentries%20on%20Array%2C%20but%20doesn't%20give%20us%0A%20%20%2F%2F%20any%20way%20to%20identify%20its%20iterator.%20%20So%20add%20our%20own%20shimmed%20field.%0A%20%20if%20(Object.getPrototypeOf)%20%7B%0A%20%20%20%20addIterator(Object.getPrototypeOf(%5B%5D.values()))%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20note%3A%20this%20is%20positioned%20here%20because%20it%20relies%20on%20Array%23entries%0A%20%20var%20arrayFromSwallowsNegativeLengths%20%3D%20(function%20()%20%7B%0A%20%20%20%20%2F%2F%20Detects%20a%20Firefox%20bug%20in%20v32%0A%20%20%20%20%2F%2F%20https%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1063993%0A%20%20%20%20return%20valueOrFalseIfThrows(function%20()%20%7B%20return%20Array.from(%7B%20length%3A%20-1%20%7D).length%20%3D%3D%3D%200%3B%20%7D)%3B%0A%20%20%7D())%3B%0A%20%20var%20arrayFromHandlesIterables%20%3D%20(function%20()%20%7B%0A%20%20%20%20%2F%2F%20Detects%20a%20bug%20in%20Webkit%20nightly%20r181886%0A%20%20%20%20var%20arr%20%3D%20Array.from(%5B0%5D.entries())%3B%0A%20%20%20%20return%20arr.length%20%3D%3D%3D%201%20%26%26%20isArray(arr%5B0%5D)%20%26%26%20arr%5B0%5D%5B0%5D%20%3D%3D%3D%200%20%26%26%20arr%5B0%5D%5B1%5D%20%3D%3D%3D%200%3B%0A%20%20%7D())%3B%0A%20%20if%20(!arrayFromSwallowsNegativeLengths%20%7C%7C%20!arrayFromHandlesIterables)%20%7B%0A%20%20%20%20overrideNative(Array%2C%20'from'%2C%20ArrayShims.from)%3B%0A%20%20%7D%0A%20%20var%20arrayFromHandlesUndefinedMapFunction%20%3D%20(function%20()%20%7B%0A%20%20%20%20%2F%2F%20Microsoft%20Edge%20v0.11%20throws%20if%20the%20mapFn%20argument%20is%20*provided*%20but%20undefined%2C%0A%20%20%20%20%2F%2F%20but%20the%20spec%20doesn't%20care%20if%20it's%20provided%20or%20not%20-%20undefined%20doesn't%20throw.%0A%20%20%20%20return%20valueOrFalseIfThrows(function%20()%20%7B%20return%20Array.from(%5B0%5D%2C%20undefined)%3B%20%7D)%3B%0A%20%20%7D())%3B%0A%20%20if%20(!arrayFromHandlesUndefinedMapFunction)%20%7B%0A%20%20%20%20var%20origArrayFrom%20%3D%20Array.from%3B%0A%20%20%20%20overrideNative(Array%2C%20'from'%2C%20function%20from(items)%20%7B%0A%20%20%20%20%20%20if%20(arguments.length%20%3E%200%20%26%26%20typeof%20arguments%5B1%5D%20!%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20%20%20return%20_apply(origArrayFrom%2C%20this%2C%20arguments)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20return%20_call(origArrayFrom%2C%20this%2C%20items)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%0A%20%20var%20toLengthsCorrectly%20%3D%20function%20(method%2C%20reversed)%20%7B%0A%20%20%20%20var%20obj%20%3D%20%7B%20length%3A%20-1%20%7D%3B%0A%20%20%20%20obj%5Breversed%20%3F%20((-1%20%3E%3E%3E%200)%20-%201)%20%3A%200%5D%20%3D%20true%3B%0A%20%20%20%20return%20valueOrFalseIfThrows(function%20()%20%7B%0A%20%20%20%20%20%20_call(method%2C%20obj%2C%20function%20()%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20note%3A%20in%20nonconforming%20browsers%2C%20this%20will%20be%20called%0A%20%20%20%20%20%20%20%20%2F%2F%20-1%20%3E%3E%3E%200%20times%2C%20which%20is%204294967295%2C%20so%20the%20throw%20matters.%0A%20%20%20%20%20%20%20%20throw%20new%20RangeError('should%20not%20reach%20here')%3B%0A%20%20%20%20%20%20%7D%2C%20%5B%5D)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%3B%0A%20%20if%20(!toLengthsCorrectly(Array.prototype.forEach))%20%7B%0A%20%20%20%20var%20originalForEach%20%3D%20Array.prototype.forEach%3B%0A%20%20%20%20overrideNative(Array.prototype%2C%20'forEach'%2C%20function%20forEach(callbackFn)%20%7B%0A%20%20%20%20%20%20return%20_apply(originalForEach%2C%20this.length%20%3E%3D%200%20%3F%20this%20%3A%20%5B%5D%2C%20arguments)%3B%0A%20%20%20%20%7D%2C%20true)%3B%0A%20%20%7D%0A%20%20if%20(!toLengthsCorrectly(Array.prototype.map))%20%7B%0A%20%20%20%20var%20originalMap%20%3D%20Array.prototype.map%3B%0A%20%20%20%20overrideNative(Array.prototype%2C%20'map'%2C%20function%20map(callbackFn)%20%7B%0A%20%20%20%20%20%20return%20_apply(originalMap%2C%20this.length%20%3E%3D%200%20%3F%20this%20%3A%20%5B%5D%2C%20arguments)%3B%0A%20%20%20%20%7D%2C%20true)%3B%0A%20%20%7D%0A%20%20if%20(!toLengthsCorrectly(Array.prototype.filter))%20%7B%0A%20%20%20%20var%20originalFilter%20%3D%20Array.prototype.filter%3B%0A%20%20%20%20overrideNative(Array.prototype%2C%20'filter'%2C%20function%20filter(callbackFn)%20%7B%0A%20%20%20%20%20%20return%20_apply(originalFilter%2C%20this.length%20%3E%3D%200%20%3F%20this%20%3A%20%5B%5D%2C%20arguments)%3B%0A%20%20%20%20%7D%2C%20true)%3B%0A%20%20%7D%0A%20%20if%20(!toLengthsCorrectly(Array.prototype.some))%20%7B%0A%20%20%20%20var%20originalSome%20%3D%20Array.prototype.some%3B%0A%20%20%20%20overrideNative(Array.prototype%2C%20'some'%2C%20function%20some(callbackFn)%20%7B%0A%20%20%20%20%20%20return%20_apply(originalSome%2C%20this.length%20%3E%3D%200%20%3F%20this%20%3A%20%5B%5D%2C%20arguments)%3B%0A%20%20%20%20%7D%2C%20true)%3B%0A%20%20%7D%0A%20%20if%20(!toLengthsCorrectly(Array.prototype.every))%20%7B%0A%20%20%20%20var%20originalEvery%20%3D%20Array.prototype.every%3B%0A%20%20%20%20overrideNative(Array.prototype%2C%20'every'%2C%20function%20every(callbackFn)%20%7B%0A%20%20%20%20%20%20return%20_apply(originalEvery%2C%20this.length%20%3E%3D%200%20%3F%20this%20%3A%20%5B%5D%2C%20arguments)%3B%0A%20%20%20%20%7D%2C%20true)%3B%0A%20%20%7D%0A%20%20if%20(!toLengthsCorrectly(Array.prototype.reduce))%20%7B%0A%20%20%20%20var%20originalReduce%20%3D%20Array.prototype.reduce%3B%0A%20%20%20%20overrideNative(Array.prototype%2C%20'reduce'%2C%20function%20reduce(callbackFn)%20%7B%0A%20%20%20%20%20%20return%20_apply(originalReduce%2C%20this.length%20%3E%3D%200%20%3F%20this%20%3A%20%5B%5D%2C%20arguments)%3B%0A%20%20%20%20%7D%2C%20true)%3B%0A%20%20%7D%0A%20%20if%20(!toLengthsCorrectly(Array.prototype.reduceRight%2C%20true))%20%7B%0A%20%20%20%20var%20originalReduceRight%20%3D%20Array.prototype.reduceRight%3B%0A%20%20%20%20overrideNative(Array.prototype%2C%20'reduceRight'%2C%20function%20reduceRight(callbackFn)%20%7B%0A%20%20%20%20%20%20return%20_apply(originalReduceRight%2C%20this.length%20%3E%3D%200%20%3F%20this%20%3A%20%5B%5D%2C%20arguments)%3B%0A%20%20%20%20%7D%2C%20true)%3B%0A%20%20%7D%0A%0A%20%20var%20lacksOctalSupport%20%3D%20Number('0o10')%20!%3D%3D%208%3B%0A%20%20var%20lacksBinarySupport%20%3D%20Number('0b10')%20!%3D%3D%202%3B%0A%20%20var%20trimsNonWhitespace%20%3D%20_some(nonWS%2C%20function%20(c)%20%7B%0A%20%20%20%20return%20Number(c%20%2B%200%20%2B%20c)%20%3D%3D%3D%200%3B%0A%20%20%7D)%3B%0A%20%20if%20(lacksOctalSupport%20%7C%7C%20lacksBinarySupport%20%7C%7C%20trimsNonWhitespace)%20%7B%0A%20%20%20%20var%20OrigNumber%20%3D%20Number%3B%0A%20%20%20%20var%20binaryRegex%20%3D%20%2F%5E0b%5B01%5D%2B%24%2Fi%3B%0A%20%20%20%20var%20octalRegex%20%3D%20%2F%5E0o%5B0-7%5D%2B%24%2Fi%3B%0A%20%20%20%20%2F%2F%20Note%20that%20in%20IE%208%2C%20RegExp.prototype.test%20doesn't%20seem%20to%20exist%3A%20ie%2C%20%22test%22%20is%20an%20own%20property%20of%20regexes.%20wtf.%0A%20%20%20%20var%20isBinary%20%3D%20binaryRegex.test.bind(binaryRegex)%3B%0A%20%20%20%20var%20isOctal%20%3D%20octalRegex.test.bind(octalRegex)%3B%0A%20%20%20%20var%20toPrimitive%20%3D%20function%20(O)%20%7B%20%2F%2F%20need%20to%20replace%20this%20with%20%60es-to-primitive%2Fes6%60%0A%20%20%20%20%20%20var%20result%3B%0A%20%20%20%20%20%20if%20(typeof%20O.valueOf%20%3D%3D%3D%20'function')%20%7B%0A%20%20%20%20%20%20%20%20result%20%3D%20O.valueOf()%3B%0A%20%20%20%20%20%20%20%20if%20(Type.primitive(result))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20result%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(typeof%20O.toString%20%3D%3D%3D%20'function')%20%7B%0A%20%20%20%20%20%20%20%20result%20%3D%20O.toString()%3B%0A%20%20%20%20%20%20%20%20if%20(Type.primitive(result))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20result%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%20throw%20new%20TypeError('No%20default%20value')%3B%0A%20%20%20%20%7D%3B%0A%20%20%20%20var%20hasNonWS%20%3D%20nonWSregex.test.bind(nonWSregex)%3B%0A%20%20%20%20var%20isBadHex%20%3D%20isBadHexRegex.test.bind(isBadHexRegex)%3B%0A%20%20%20%20var%20NumberShim%20%3D%20(function%20()%20%7B%0A%20%20%20%20%20%20%2F%2F%20this%20is%20wrapped%20in%20an%20IIFE%20because%20of%20IE%206-8's%20wacky%20scoping%20issues%20with%20named%20function%20expressions.%0A%20%20%20%20%20%20var%20NumberShim%20%3D%20function%20Number(value)%20%7B%0A%20%20%20%20%20%20%20%20var%20primValue%3B%0A%20%20%20%20%20%20%20%20if%20(arguments.length%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20primValue%20%3D%20Type.primitive(value)%20%3F%20value%20%3A%20toPrimitive(value%2C%20'number')%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20primValue%20%3D%200%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(typeof%20primValue%20%3D%3D%3D%20'string')%20%7B%0A%20%20%20%20%20%20%20%20%20%20primValue%20%3D%20_call(trimShim%2C%20primValue)%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(isBinary(primValue))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20primValue%20%3D%20parseInt(_strSlice(primValue%2C%202)%2C%202)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(isOctal(primValue))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20primValue%20%3D%20parseInt(_strSlice(primValue%2C%202)%2C%208)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(hasNonWS(primValue)%20%7C%7C%20isBadHex(primValue))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20primValue%20%3D%20NaN%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%20var%20receiver%20%3D%20this%3B%0A%20%20%20%20%20%20%20%20var%20valueOfSucceeds%20%3D%20valueOrFalseIfThrows(function%20()%20%7B%0A%20%20%20%20%20%20%20%20%20%20OrigNumber.prototype.valueOf.call(receiver)%3B%0A%20%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20if%20(receiver%20instanceof%20NumberShim%20%26%26%20!valueOfSucceeds)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20new%20OrigNumber(primValue)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%2F*%20jshint%20newcap%3A%20false%20*%2F%0A%20%20%20%20%20%20%20%20return%20OrigNumber(primValue)%3B%0A%20%20%20%20%20%20%20%20%2F*%20jshint%20newcap%3A%20true%20*%2F%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20return%20NumberShim%3B%0A%20%20%20%20%7D())%3B%0A%20%20%20%20wrapConstructor(OrigNumber%2C%20NumberShim%2C%20%7B%7D)%3B%0A%20%20%20%20%2F*globals%20Number%3A%20true%20*%2F%0A%20%20%20%20%2F*%20eslint-disable%20no-undef%20*%2F%0A%20%20%20%20Number%20%3D%20NumberShim%3B%0A%20%20%20%20Value.redefine(globals%2C%20'Number'%2C%20NumberShim)%3B%0A%20%20%20%20%2F*%20eslint-enable%20no-undef%20*%2F%0A%20%20%20%20%2F*globals%20Number%3A%20false%20*%2F%0A%20%20%7D%0A%0A%20%20var%20maxSafeInteger%20%3D%20Math.pow(2%2C%2053)%20-%201%3B%0A%20%20defineProperties(Number%2C%20%7B%0A%20%20%20%20MAX_SAFE_INTEGER%3A%20maxSafeInteger%2C%0A%20%20%20%20MIN_SAFE_INTEGER%3A%20-maxSafeInteger%2C%0A%20%20%20%20EPSILON%3A%202.220446049250313e-16%2C%0A%0A%20%20%20%20parseInt%3A%20globals.parseInt%2C%0A%20%20%20%20parseFloat%3A%20globals.parseFloat%2C%0A%0A%20%20%20%20isFinite%3A%20numberIsFinite%2C%0A%0A%20%20%20%20isInteger%3A%20function%20isInteger(value)%20%7B%0A%20%20%20%20%20%20return%20numberIsFinite(value)%20%26%26%20ES.ToInteger(value)%20%3D%3D%3D%20value%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20isSafeInteger%3A%20function%20isSafeInteger(value)%20%7B%0A%20%20%20%20%20%20return%20Number.isInteger(value)%20%26%26%20_abs(value)%20%3C%3D%20Number.MAX_SAFE_INTEGER%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20isNaN%3A%20numberIsNaN%0A%20%20%7D)%3B%0A%20%20%2F%2F%20Firefox%2037%20has%20a%20conforming%20Number.parseInt%2C%20but%20it's%20not%20%3D%3D%3D%20to%20the%20global%20parseInt%20(fixed%20in%20v40)%0A%20%20defineProperty(Number%2C%20'parseInt'%2C%20globals.parseInt%2C%20Number.parseInt%20!%3D%3D%20globals.parseInt)%3B%0A%0A%20%20%2F%2F%20Work%20around%20bugs%20in%20Array%23find%20and%20Array%23findIndex%20--%20early%0A%20%20%2F%2F%20implementations%20skipped%20holes%20in%20sparse%20arrays.%20(Note%20that%20the%0A%20%20%2F%2F%20implementations%20of%20find%2FfindIndex%20indirectly%20use%20shimmed%0A%20%20%2F%2F%20methods%20of%20Number%2C%20so%20this%20test%20has%20to%20happen%20down%20here.)%0A%20%20%2F*jshint%20elision%3A%20true%20*%2F%0A%20%20%2F*%20eslint-disable%20no-sparse-arrays%20*%2F%0A%20%20if%20(!%5B%2C%201%5D.find(function%20(item%2C%20idx)%20%7B%20return%20idx%20%3D%3D%3D%200%3B%20%7D))%20%7B%0A%20%20%20%20overrideNative(Array.prototype%2C%20'find'%2C%20ArrayPrototypeShims.find)%3B%0A%20%20%7D%0A%20%20if%20(%5B%2C%201%5D.findIndex(function%20(item%2C%20idx)%20%7B%20return%20idx%20%3D%3D%3D%200%3B%20%7D)%20!%3D%3D%200)%20%7B%0A%20%20%20%20overrideNative(Array.prototype%2C%20'findIndex'%2C%20ArrayPrototypeShims.findIndex)%3B%0A%20%20%7D%0A%20%20%2F*%20eslint-enable%20no-sparse-arrays%20*%2F%0A%20%20%2F*jshint%20elision%3A%20false%20*%2F%0A%0A%20%20var%20isEnumerableOn%20%3D%20Function.bind.call(Function.bind%2C%20Object.prototype.propertyIsEnumerable)%3B%0A%20%20var%20sliceArgs%20%3D%20function%20sliceArgs()%20%7B%0A%20%20%20%20%2F%2F%20per%20https%3A%2F%2Fgithub.com%2Fpetkaantonov%2Fbluebird%2Fwiki%2FOptimization-killers%2332-leaking-arguments%0A%20%20%20%20%2F%2F%20and%20https%3A%2F%2Fgist.github.com%2FWebReflection%2F4327762cb87a8c634a29%0A%20%20%20%20var%20initial%20%3D%20Number(this)%3B%0A%20%20%20%20var%20len%20%3D%20arguments.length%3B%0A%20%20%20%20var%20desiredArgCount%20%3D%20len%20-%20initial%3B%0A%20%20%20%20var%20args%20%3D%20new%20Array(desiredArgCount%20%3C%200%20%3F%200%20%3A%20desiredArgCount)%3B%0A%20%20%20%20for%20(var%20i%20%3D%20initial%3B%20i%20%3C%20len%3B%20%2B%2Bi)%20%7B%0A%20%20%20%20%20%20args%5Bi%20-%20initial%5D%20%3D%20arguments%5Bi%5D%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20args%3B%0A%20%20%7D%3B%0A%20%20var%20assignTo%20%3D%20function%20assignTo(source)%20%7B%0A%20%20%20%20return%20function%20assignToSource(target%2C%20key)%20%7B%0A%20%20%20%20%20%20target%5Bkey%5D%20%3D%20source%5Bkey%5D%3B%0A%20%20%20%20%20%20return%20target%3B%0A%20%20%20%20%7D%3B%0A%20%20%7D%3B%0A%20%20var%20assignReducer%20%3D%20function%20(target%2C%20source)%20%7B%0A%20%20%20%20var%20keys%20%3D%20Object.keys(Object(source))%3B%0A%20%20%20%20var%20symbols%3B%0A%20%20%20%20if%20(ES.IsCallable(Object.getOwnPropertySymbols))%20%7B%0A%20%20%20%20%20%20symbols%20%3D%20_filter(Object.getOwnPropertySymbols(Object(source))%2C%20isEnumerableOn(source))%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20_reduce(_concat(keys%2C%20symbols%20%7C%7C%20%5B%5D)%2C%20assignTo(source)%2C%20target)%3B%0A%20%20%7D%3B%0A%0A%20%20var%20ObjectShims%20%3D%20%7B%0A%20%20%20%20%2F%2F%2019.1.3.1%0A%20%20%20%20assign%3A%20function%20(target%2C%20source)%20%7B%0A%20%20%20%20%20%20var%20to%20%3D%20ES.ToObject(target%2C%20'Cannot%20convert%20undefined%20or%20null%20to%20object')%3B%0A%20%20%20%20%20%20return%20_reduce(_apply(sliceArgs%2C%201%2C%20arguments)%2C%20assignReducer%2C%20to)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20Added%20in%20WebKit%20in%20https%3A%2F%2Fbugs.webkit.org%2Fshow_bug.cgi%3Fid%3D143865%0A%20%20%20%20is%3A%20function%20is(a%2C%20b)%20%7B%0A%20%20%20%20%20%20return%20ES.SameValue(a%2C%20b)%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%20%20var%20assignHasPendingExceptions%20%3D%20Object.assign%20%26%26%20Object.preventExtensions%20%26%26%20(function%20()%20%7B%0A%20%20%20%20%2F%2F%20Firefox%2037%20still%20has%20%22pending%20exception%22%20logic%20in%20its%20Object.assign%20implementation%2C%0A%20%20%20%20%2F%2F%20which%20is%2072%25%20slower%20than%20our%20shim%2C%20and%20Firefox%2040's%20native%20implementation.%0A%20%20%20%20var%20thrower%20%3D%20Object.preventExtensions(%7B%201%3A%202%20%7D)%3B%0A%20%20%20%20try%20%7B%0A%20%20%20%20%20%20Object.assign(thrower%2C%20'xy')%3B%0A%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20return%20thrower%5B1%5D%20%3D%3D%3D%20'y'%3B%0A%20%20%20%20%7D%0A%20%20%7D())%3B%0A%20%20if%20(assignHasPendingExceptions)%20%7B%0A%20%20%20%20overrideNative(Object%2C%20'assign'%2C%20ObjectShims.assign)%3B%0A%20%20%7D%0A%20%20defineProperties(Object%2C%20ObjectShims)%3B%0A%0A%20%20if%20(supportsDescriptors)%20%7B%0A%20%20%20%20var%20ES5ObjectShims%20%3D%20%7B%0A%20%20%20%20%20%20%2F%2F%2019.1.3.9%0A%20%20%20%20%20%20%2F%2F%20shim%20from%20https%3A%2F%2Fgist.github.com%2FWebReflection%2F5593554%0A%20%20%20%20%20%20setPrototypeOf%3A%20(function%20(Object%2C%20magic)%20%7B%0A%20%20%20%20%20%20%20%20var%20set%3B%0A%0A%20%20%20%20%20%20%20%20var%20checkArgs%20%3D%20function%20(O%2C%20proto)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!ES.TypeIsObject(O))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('cannot%20set%20prototype%20on%20a%20non-object')%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(!(proto%20%3D%3D%3D%20null%20%7C%7C%20ES.TypeIsObject(proto)))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('can%20only%20set%20prototype%20to%20an%20object%20or%20null'%20%2B%20proto)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20%20%20var%20setPrototypeOf%20%3D%20function%20(O%2C%20proto)%20%7B%0A%20%20%20%20%20%20%20%20%20%20checkArgs(O%2C%20proto)%3B%0A%20%20%20%20%20%20%20%20%20%20_call(set%2C%20O%2C%20proto)%3B%0A%20%20%20%20%20%20%20%20%20%20return%20O%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20this%20works%20already%20in%20Firefox%20and%20Safari%0A%20%20%20%20%20%20%20%20%20%20set%20%3D%20Object.getOwnPropertyDescriptor(Object.prototype%2C%20magic).set%3B%0A%20%20%20%20%20%20%20%20%20%20_call(set%2C%20%7B%7D%2C%20null)%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(Object.prototype%20!%3D%3D%20%7B%7D%5Bmagic%5D)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20IE%20%3C%2011%20cannot%20be%20shimmed%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%20%2F%2F%20probably%20Chrome%20or%20some%20old%20Mobile%20stock%20browser%0A%20%20%20%20%20%20%20%20%20%20set%20%3D%20function%20(proto)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20this%5Bmagic%5D%20%3D%20proto%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20please%20note%20that%20this%20will%20**not**%20work%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20in%20those%20browsers%20that%20do%20not%20inherit%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20__proto__%20by%20mistake%20from%20Object.prototype%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20in%20these%20cases%20we%20should%20probably%20throw%20an%20error%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20or%20at%20least%20be%20informed%20about%20the%20issue%0A%20%20%20%20%20%20%20%20%20%20setPrototypeOf.polyfill%20%3D%20setPrototypeOf(%0A%20%20%20%20%20%20%20%20%20%20%20%20setPrototypeOf(%7B%7D%2C%20null)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20Object.prototype%0A%20%20%20%20%20%20%20%20%20%20)%20instanceof%20Object%3B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20setPrototypeOf.polyfill%20%3D%3D%3D%20true%20means%20it%20works%20as%20meant%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20setPrototypeOf.polyfill%20%3D%3D%3D%20false%20means%20it's%20not%20100%25%20reliable%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20setPrototypeOf.polyfill%20%3D%3D%3D%20undefined%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20or%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20setPrototypeOf.polyfill%20%3D%3D%20%20null%20means%20it's%20not%20a%20polyfill%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20which%20means%20it%20works%20as%20expected%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20we%20can%20even%20delete%20Object.prototype.__proto__%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%20setPrototypeOf%3B%0A%20%20%20%20%20%20%7D(Object%2C%20'__proto__'))%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20defineProperties(Object%2C%20ES5ObjectShims)%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20Workaround%20bug%20in%20Opera%2012%20where%20setPrototypeOf(x%2C%20null)%20doesn't%20work%2C%0A%20%20%2F%2F%20but%20Object.create(null)%20does.%0A%20%20if%20(Object.setPrototypeOf%20%26%26%20Object.getPrototypeOf%20%26%26%0A%20%20%20%20%20%20Object.getPrototypeOf(Object.setPrototypeOf(%7B%7D%2C%20null))%20!%3D%3D%20null%20%26%26%0A%20%20%20%20%20%20Object.getPrototypeOf(Object.create(null))%20%3D%3D%3D%20null)%20%7B%0A%20%20%20%20(function%20()%20%7B%0A%20%20%20%20%20%20var%20FAKENULL%20%3D%20Object.create(null)%3B%0A%20%20%20%20%20%20var%20gpo%20%3D%20Object.getPrototypeOf%2C%20spo%20%3D%20Object.setPrototypeOf%3B%0A%20%20%20%20%20%20Object.getPrototypeOf%20%3D%20function%20(o)%20%7B%0A%20%20%20%20%20%20%20%20var%20result%20%3D%20gpo(o)%3B%0A%20%20%20%20%20%20%20%20return%20result%20%3D%3D%3D%20FAKENULL%20%3F%20null%20%3A%20result%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20Object.setPrototypeOf%20%3D%20function%20(o%2C%20p)%20%7B%0A%20%20%20%20%20%20%20%20var%20proto%20%3D%20p%20%3D%3D%3D%20null%20%3F%20FAKENULL%20%3A%20p%3B%0A%20%20%20%20%20%20%20%20return%20spo(o%2C%20proto)%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20Object.setPrototypeOf.polyfill%20%3D%20false%3B%0A%20%20%20%20%7D())%3B%0A%20%20%7D%0A%0A%20%20var%20objectKeysAcceptsPrimitives%20%3D%20!throwsError(function%20()%20%7B%20Object.keys('foo')%3B%20%7D)%3B%0A%20%20if%20(!objectKeysAcceptsPrimitives)%20%7B%0A%20%20%20%20var%20originalObjectKeys%20%3D%20Object.keys%3B%0A%20%20%20%20overrideNative(Object%2C%20'keys'%2C%20function%20keys(value)%20%7B%0A%20%20%20%20%20%20return%20originalObjectKeys(ES.ToObject(value))%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%0A%20%20if%20(Object.getOwnPropertyNames)%20%7B%0A%20%20%20%20var%20objectGOPNAcceptsPrimitives%20%3D%20!throwsError(function%20()%20%7B%20Object.getOwnPropertyNames('foo')%3B%20%7D)%3B%0A%20%20%20%20if%20(!objectGOPNAcceptsPrimitives)%20%7B%0A%20%20%20%20%20%20var%20cachedWindowNames%20%3D%20typeof%20window%20%3D%3D%3D%20'object'%20%3F%20Object.getOwnPropertyNames(window)%20%3A%20%5B%5D%3B%0A%20%20%20%20%20%20var%20originalObjectGetOwnPropertyNames%20%3D%20Object.getOwnPropertyNames%3B%0A%20%20%20%20%20%20overrideNative(Object%2C%20'getOwnPropertyNames'%2C%20function%20getOwnPropertyNames(value)%20%7B%0A%20%20%20%20%20%20%20%20var%20val%20%3D%20ES.ToObject(value)%3B%0A%20%20%20%20%20%20%20%20if%20(_toString(val)%20%3D%3D%3D%20'%5Bobject%20Window%5D')%20%7B%0A%20%20%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20originalObjectGetOwnPropertyNames(val)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20IE%20bug%20where%20layout%20engine%20calls%20userland%20gOPN%20for%20cross-domain%20%60window%60%20objects%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20_concat(%5B%5D%2C%20cachedWindowNames)%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%20originalObjectGetOwnPropertyNames(val)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20if%20(Object.getOwnPropertyDescriptor)%20%7B%0A%20%20%20%20var%20objectGOPDAcceptsPrimitives%20%3D%20!throwsError(function%20()%20%7B%20Object.getOwnPropertyDescriptor('foo'%2C%20'bar')%3B%20%7D)%3B%0A%20%20%20%20if%20(!objectGOPDAcceptsPrimitives)%20%7B%0A%20%20%20%20%20%20var%20originalObjectGetOwnPropertyDescriptor%20%3D%20Object.getOwnPropertyDescriptor%3B%0A%20%20%20%20%20%20overrideNative(Object%2C%20'getOwnPropertyDescriptor'%2C%20function%20getOwnPropertyDescriptor(value%2C%20property)%20%7B%0A%20%20%20%20%20%20%20%20return%20originalObjectGetOwnPropertyDescriptor(ES.ToObject(value)%2C%20property)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20if%20(Object.seal)%20%7B%0A%20%20%20%20var%20objectSealAcceptsPrimitives%20%3D%20!throwsError(function%20()%20%7B%20Object.seal('foo')%3B%20%7D)%3B%0A%20%20%20%20if%20(!objectSealAcceptsPrimitives)%20%7B%0A%20%20%20%20%20%20var%20originalObjectSeal%20%3D%20Object.seal%3B%0A%20%20%20%20%20%20overrideNative(Object%2C%20'seal'%2C%20function%20seal(value)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!Type.object(value))%20%7B%20return%20value%3B%20%7D%0A%20%20%20%20%20%20%20%20return%20originalObjectSeal(value)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20if%20(Object.isSealed)%20%7B%0A%20%20%20%20var%20objectIsSealedAcceptsPrimitives%20%3D%20!throwsError(function%20()%20%7B%20Object.isSealed('foo')%3B%20%7D)%3B%0A%20%20%20%20if%20(!objectIsSealedAcceptsPrimitives)%20%7B%0A%20%20%20%20%20%20var%20originalObjectIsSealed%20%3D%20Object.isSealed%3B%0A%20%20%20%20%20%20overrideNative(Object%2C%20'isSealed'%2C%20function%20isSealed(value)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!Type.object(value))%20%7B%20return%20true%3B%20%7D%0A%20%20%20%20%20%20%20%20return%20originalObjectIsSealed(value)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20if%20(Object.freeze)%20%7B%0A%20%20%20%20var%20objectFreezeAcceptsPrimitives%20%3D%20!throwsError(function%20()%20%7B%20Object.freeze('foo')%3B%20%7D)%3B%0A%20%20%20%20if%20(!objectFreezeAcceptsPrimitives)%20%7B%0A%20%20%20%20%20%20var%20originalObjectFreeze%20%3D%20Object.freeze%3B%0A%20%20%20%20%20%20overrideNative(Object%2C%20'freeze'%2C%20function%20freeze(value)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!Type.object(value))%20%7B%20return%20value%3B%20%7D%0A%20%20%20%20%20%20%20%20return%20originalObjectFreeze(value)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20if%20(Object.isFrozen)%20%7B%0A%20%20%20%20var%20objectIsFrozenAcceptsPrimitives%20%3D%20!throwsError(function%20()%20%7B%20Object.isFrozen('foo')%3B%20%7D)%3B%0A%20%20%20%20if%20(!objectIsFrozenAcceptsPrimitives)%20%7B%0A%20%20%20%20%20%20var%20originalObjectIsFrozen%20%3D%20Object.isFrozen%3B%0A%20%20%20%20%20%20overrideNative(Object%2C%20'isFrozen'%2C%20function%20isFrozen(value)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!Type.object(value))%20%7B%20return%20true%3B%20%7D%0A%20%20%20%20%20%20%20%20return%20originalObjectIsFrozen(value)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20if%20(Object.preventExtensions)%20%7B%0A%20%20%20%20var%20objectPreventExtensionsAcceptsPrimitives%20%3D%20!throwsError(function%20()%20%7B%20Object.preventExtensions('foo')%3B%20%7D)%3B%0A%20%20%20%20if%20(!objectPreventExtensionsAcceptsPrimitives)%20%7B%0A%20%20%20%20%20%20var%20originalObjectPreventExtensions%20%3D%20Object.preventExtensions%3B%0A%20%20%20%20%20%20overrideNative(Object%2C%20'preventExtensions'%2C%20function%20preventExtensions(value)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!Type.object(value))%20%7B%20return%20value%3B%20%7D%0A%20%20%20%20%20%20%20%20return%20originalObjectPreventExtensions(value)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20if%20(Object.isExtensible)%20%7B%0A%20%20%20%20var%20objectIsExtensibleAcceptsPrimitives%20%3D%20!throwsError(function%20()%20%7B%20Object.isExtensible('foo')%3B%20%7D)%3B%0A%20%20%20%20if%20(!objectIsExtensibleAcceptsPrimitives)%20%7B%0A%20%20%20%20%20%20var%20originalObjectIsExtensible%20%3D%20Object.isExtensible%3B%0A%20%20%20%20%20%20overrideNative(Object%2C%20'isExtensible'%2C%20function%20isExtensible(value)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!Type.object(value))%20%7B%20return%20false%3B%20%7D%0A%20%20%20%20%20%20%20%20return%20originalObjectIsExtensible(value)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20if%20(Object.getPrototypeOf)%20%7B%0A%20%20%20%20var%20objectGetProtoAcceptsPrimitives%20%3D%20!throwsError(function%20()%20%7B%20Object.getPrototypeOf('foo')%3B%20%7D)%3B%0A%20%20%20%20if%20(!objectGetProtoAcceptsPrimitives)%20%7B%0A%20%20%20%20%20%20var%20originalGetProto%20%3D%20Object.getPrototypeOf%3B%0A%20%20%20%20%20%20overrideNative(Object%2C%20'getPrototypeOf'%2C%20function%20getPrototypeOf(value)%20%7B%0A%20%20%20%20%20%20%20%20return%20originalGetProto(ES.ToObject(value))%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20var%20hasFlags%20%3D%20supportsDescriptors%20%26%26%20(function%20()%20%7B%0A%20%20%20%20var%20desc%20%3D%20Object.getOwnPropertyDescriptor(RegExp.prototype%2C%20'flags')%3B%0A%20%20%20%20return%20desc%20%26%26%20ES.IsCallable(desc.get)%3B%0A%20%20%7D())%3B%0A%20%20if%20(supportsDescriptors%20%26%26%20!hasFlags)%20%7B%0A%20%20%20%20var%20regExpFlagsGetter%20%3D%20function%20flags()%20%7B%0A%20%20%20%20%20%20if%20(!ES.TypeIsObject(this))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Method%20called%20on%20incompatible%20type%3A%20must%20be%20an%20object.')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20result%20%3D%20''%3B%0A%20%20%20%20%20%20if%20(this.global)%20%7B%0A%20%20%20%20%20%20%20%20result%20%2B%3D%20'g'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(this.ignoreCase)%20%7B%0A%20%20%20%20%20%20%20%20result%20%2B%3D%20'i'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(this.multiline)%20%7B%0A%20%20%20%20%20%20%20%20result%20%2B%3D%20'm'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(this.unicode)%20%7B%0A%20%20%20%20%20%20%20%20result%20%2B%3D%20'u'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(this.sticky)%20%7B%0A%20%20%20%20%20%20%20%20result%20%2B%3D%20'y'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20result%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20Value.getter(RegExp.prototype%2C%20'flags'%2C%20regExpFlagsGetter)%3B%0A%20%20%7D%0A%0A%20%20var%20regExpSupportsFlagsWithRegex%20%3D%20valueOrFalseIfThrows(function%20()%20%7B%0A%20%20%20%20return%20String(new%20RegExp(%2Fa%2Fg%2C%20'i'))%20%3D%3D%3D%20'%2Fa%2Fi'%3B%0A%20%20%7D)%3B%0A%0A%20%20if%20(!regExpSupportsFlagsWithRegex%20%26%26%20supportsDescriptors)%20%7B%0A%20%20%20%20var%20OrigRegExp%20%3D%20RegExp%3B%0A%20%20%20%20var%20RegExpShim%20%3D%20(function%20()%20%7B%0A%20%20%20%20%20%20return%20function%20RegExp(pattern%2C%20flags)%20%7B%0A%20%20%20%20%20%20%20%20var%20calledWithNew%20%3D%20this%20instanceof%20RegExp%3B%0A%20%20%20%20%20%20%20%20if%20(!calledWithNew%20%26%26%20(Type.regex(pattern)%20%7C%7C%20(pattern%20%26%26%20pattern.constructor%20%3D%3D%3D%20RegExp)))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20pattern%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(Type.regex(pattern)%20%26%26%20Type.string(flags))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20new%20RegExp(pattern.source%2C%20flags)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%20new%20OrigRegExp(pattern%2C%20flags)%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%7D())%3B%0A%20%20%20%20wrapConstructor(OrigRegExp%2C%20RegExpShim%2C%20%7B%0A%20%20%20%20%20%20%24input%3A%20true%20%2F%2F%20Chrome%20%3C%20v39%20%26%20Opera%20%3C%2026%20have%20a%20nonstandard%20%22%24input%22%20property%0A%20%20%20%20%7D)%3B%0A%20%20%20%20%2F*globals%20RegExp%3A%20true%20*%2F%0A%20%20%20%20%2F*%20eslint-disable%20no-undef%20*%2F%0A%20%20%20%20RegExp%20%3D%20RegExpShim%3B%0A%20%20%20%20Value.redefine(globals%2C%20'RegExp'%2C%20RegExpShim)%3B%0A%20%20%20%20%2F*%20eslint-enable%20no-undef%20*%2F%0A%20%20%20%20%2F*globals%20RegExp%3A%20false%20*%2F%0A%20%20%7D%0A%0A%20%20if%20(supportsDescriptors)%20%7B%0A%20%20%20%20var%20regexGlobals%20%3D%20%7B%0A%20%20%20%20%20%20input%3A%20'%24_'%2C%0A%20%20%20%20%20%20lastMatch%3A%20'%24%26'%2C%0A%20%20%20%20%20%20lastParen%3A%20'%24%2B'%2C%0A%20%20%20%20%20%20leftContext%3A%20'%24%60'%2C%0A%20%20%20%20%20%20rightContext%3A%20'%24%5C''%0A%20%20%20%20%7D%3B%0A%20%20%20%20_forEach(Object.keys(regexGlobals)%2C%20function%20(prop)%20%7B%0A%20%20%20%20%20%20if%20(prop%20in%20RegExp%20%26%26%20!(regexGlobals%5Bprop%5D%20in%20RegExp))%20%7B%0A%20%20%20%20%20%20%20%20Value.getter(RegExp%2C%20regexGlobals%5Bprop%5D%2C%20function%20get()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20RegExp%5Bprop%5D%3B%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)%3B%0A%20%20%7D%0A%20%20addDefaultSpecies(RegExp)%3B%0A%0A%20%20var%20inverseEpsilon%20%3D%201%20%2F%20Number.EPSILON%3B%0A%20%20var%20roundTiesToEven%20%3D%20function%20roundTiesToEven(n)%20%7B%0A%20%20%20%20%2F%2F%20Even%20though%20this%20reduces%20down%20to%20%60return%20n%60%2C%20it%20takes%20advantage%20of%20built-in%20rounding.%0A%20%20%20%20return%20(n%20%2B%20inverseEpsilon)%20-%20inverseEpsilon%3B%0A%20%20%7D%3B%0A%20%20var%20BINARY_32_EPSILON%20%3D%20Math.pow(2%2C%20-23)%3B%0A%20%20var%20BINARY_32_MAX_VALUE%20%3D%20Math.pow(2%2C%20127)%20*%20(2%20-%20BINARY_32_EPSILON)%3B%0A%20%20var%20BINARY_32_MIN_VALUE%20%3D%20Math.pow(2%2C%20-126)%3B%0A%20%20var%20numberCLZ%20%3D%20Number.prototype.clz%3B%0A%20%20delete%20Number.prototype.clz%3B%20%2F%2F%20Safari%208%20has%20Number%23clz%0A%0A%20%20var%20MathShims%20%3D%20%7B%0A%20%20%20%20acosh%3A%20function%20acosh(value)%20%7B%0A%20%20%20%20%20%20var%20x%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20if%20(Number.isNaN(x)%20%7C%7C%20value%20%3C%201)%20%7B%20return%20NaN%3B%20%7D%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%201)%20%7B%20return%200%3B%20%7D%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%20Infinity)%20%7B%20return%20x%3B%20%7D%0A%20%20%20%20%20%20return%20_log(x%20%2F%20Math.E%20%2B%20_sqrt(x%20%2B%201)%20*%20_sqrt(x%20-%201)%20%2F%20Math.E)%20%2B%201%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20asinh%3A%20function%20asinh(value)%20%7B%0A%20%20%20%20%20%20var%20x%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%200%20%7C%7C%20!globalIsFinite(x))%20%7B%0A%20%20%20%20%20%20%20%20return%20x%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20x%20%3C%200%20%3F%20-Math.asinh(-x)%20%3A%20_log(x%20%2B%20_sqrt(x%20*%20x%20%2B%201))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20atanh%3A%20function%20atanh(value)%20%7B%0A%20%20%20%20%20%20var%20x%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20if%20(Number.isNaN(x)%20%7C%7C%20x%20%3C%20-1%20%7C%7C%20x%20%3E%201)%20%7B%0A%20%20%20%20%20%20%20%20return%20NaN%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%20-1)%20%7B%20return%20-Infinity%3B%20%7D%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%201)%20%7B%20return%20Infinity%3B%20%7D%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%200)%20%7B%20return%20x%3B%20%7D%0A%20%20%20%20%20%20return%200.5%20*%20_log((1%20%2B%20x)%20%2F%20(1%20-%20x))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20cbrt%3A%20function%20cbrt(value)%20%7B%0A%20%20%20%20%20%20var%20x%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%200)%20%7B%20return%20x%3B%20%7D%0A%20%20%20%20%20%20var%20negate%20%3D%20x%20%3C%200%2C%20result%3B%0A%20%20%20%20%20%20if%20(negate)%20%7B%20x%20%3D%20-x%3B%20%7D%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%20Infinity)%20%7B%0A%20%20%20%20%20%20%20%20result%20%3D%20Infinity%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20result%20%3D%20Math.exp(_log(x)%20%2F%203)%3B%0A%20%20%20%20%20%20%20%20%2F%2F%20from%20http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCube_root%23Numerical_methods%0A%20%20%20%20%20%20%20%20result%20%3D%20(x%20%2F%20(result%20*%20result)%20%2B%20(2%20*%20result))%20%2F%203%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20negate%20%3F%20-result%20%3A%20result%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20clz32%3A%20function%20clz32(value)%20%7B%0A%20%20%20%20%20%20%2F%2F%20See%20https%3A%2F%2Fbugs.ecmascript.org%2Fshow_bug.cgi%3Fid%3D2465%0A%20%20%20%20%20%20var%20x%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20var%20number%20%3D%20ES.ToUint32(x)%3B%0A%20%20%20%20%20%20if%20(number%20%3D%3D%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20return%2032%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20numberCLZ%20%3F%20_call(numberCLZ%2C%20number)%20%3A%2031%20-%20_floor(_log(number%20%2B%200.5)%20*%20Math.LOG2E)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20cosh%3A%20function%20cosh(value)%20%7B%0A%20%20%20%20%20%20var%20x%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%200)%20%7B%20return%201%3B%20%7D%20%2F%2F%20%2B0%20or%20-0%0A%20%20%20%20%20%20if%20(Number.isNaN(x))%20%7B%20return%20NaN%3B%20%7D%0A%20%20%20%20%20%20if%20(!globalIsFinite(x))%20%7B%20return%20Infinity%3B%20%7D%0A%20%20%20%20%20%20if%20(x%20%3C%200)%20%7B%20x%20%3D%20-x%3B%20%7D%0A%20%20%20%20%20%20if%20(x%20%3E%2021)%20%7B%20return%20Math.exp(x)%20%2F%202%3B%20%7D%0A%20%20%20%20%20%20return%20(Math.exp(x)%20%2B%20Math.exp(-x))%20%2F%202%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20expm1%3A%20function%20expm1(value)%20%7B%0A%20%20%20%20%20%20var%20x%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%20-Infinity)%20%7B%20return%20-1%3B%20%7D%0A%20%20%20%20%20%20if%20(!globalIsFinite(x)%20%7C%7C%20x%20%3D%3D%3D%200)%20%7B%20return%20x%3B%20%7D%0A%20%20%20%20%20%20if%20(_abs(x)%20%3E%200.5)%20%7B%0A%20%20%20%20%20%20%20%20return%20Math.exp(x)%20-%201%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%2F%2F%20A%20more%20precise%20approximation%20using%20Taylor%20series%20expansion%0A%20%20%20%20%20%20%2F%2F%20from%20https%3A%2F%2Fgithub.com%2Fpaulmillr%2Fes6-shim%2Fissues%2F314%23issuecomment-70293986%0A%20%20%20%20%20%20var%20t%20%3D%20x%3B%0A%20%20%20%20%20%20var%20sum%20%3D%200%3B%0A%20%20%20%20%20%20var%20n%20%3D%201%3B%0A%20%20%20%20%20%20while%20(sum%20%2B%20t%20!%3D%3D%20sum)%20%7B%0A%20%20%20%20%20%20%20%20sum%20%2B%3D%20t%3B%0A%20%20%20%20%20%20%20%20n%20%2B%3D%201%3B%0A%20%20%20%20%20%20%20%20t%20*%3D%20x%20%2F%20n%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20sum%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20hypot%3A%20function%20hypot(x%2C%20y)%20%7B%0A%20%20%20%20%20%20var%20result%20%3D%200%3B%0A%20%20%20%20%20%20var%20largest%20%3D%200%3B%0A%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20arguments.length%3B%20%2B%2Bi)%20%7B%0A%20%20%20%20%20%20%20%20var%20value%20%3D%20_abs(Number(arguments%5Bi%5D))%3B%0A%20%20%20%20%20%20%20%20if%20(largest%20%3C%20value)%20%7B%0A%20%20%20%20%20%20%20%20%20%20result%20*%3D%20(largest%20%2F%20value)%20*%20(largest%20%2F%20value)%3B%0A%20%20%20%20%20%20%20%20%20%20result%20%2B%3D%201%3B%0A%20%20%20%20%20%20%20%20%20%20largest%20%3D%20value%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20result%20%2B%3D%20(value%20%3E%200%20%3F%20(value%20%2F%20largest)%20*%20(value%20%2F%20largest)%20%3A%20value)%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%20largest%20%3D%3D%3D%20Infinity%20%3F%20Infinity%20%3A%20largest%20*%20_sqrt(result)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20log2%3A%20function%20log2(value)%20%7B%0A%20%20%20%20%20%20return%20_log(value)%20*%20Math.LOG2E%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20log10%3A%20function%20log10(value)%20%7B%0A%20%20%20%20%20%20return%20_log(value)%20*%20Math.LOG10E%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20log1p%3A%20function%20log1p(value)%20%7B%0A%20%20%20%20%20%20var%20x%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20if%20(x%20%3C%20-1%20%7C%7C%20Number.isNaN(x))%20%7B%20return%20NaN%3B%20%7D%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%200%20%7C%7C%20x%20%3D%3D%3D%20Infinity)%20%7B%20return%20x%3B%20%7D%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%20-1)%20%7B%20return%20-Infinity%3B%20%7D%0A%0A%20%20%20%20%20%20return%20(1%20%2B%20x)%20-%201%20%3D%3D%3D%200%20%3F%20x%20%3A%20x%20*%20(_log(1%20%2B%20x)%20%2F%20((1%20%2B%20x)%20-%201))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20sign%3A%20function%20sign(value)%20%7B%0A%20%20%20%20%20%20var%20number%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20if%20(number%20%3D%3D%3D%200)%20%7B%20return%20number%3B%20%7D%0A%20%20%20%20%20%20if%20(Number.isNaN(number))%20%7B%20return%20number%3B%20%7D%0A%20%20%20%20%20%20return%20number%20%3C%200%20%3F%20-1%20%3A%201%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20sinh%3A%20function%20sinh(value)%20%7B%0A%20%20%20%20%20%20var%20x%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20if%20(!globalIsFinite(x)%20%7C%7C%20x%20%3D%3D%3D%200)%20%7B%20return%20x%3B%20%7D%0A%0A%20%20%20%20%20%20if%20(_abs(x)%20%3C%201)%20%7B%0A%20%20%20%20%20%20%20%20return%20(Math.expm1(x)%20-%20Math.expm1(-x))%20%2F%202%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20(Math.exp(x%20-%201)%20-%20Math.exp(-x%20-%201))%20*%20Math.E%20%2F%202%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20tanh%3A%20function%20tanh(value)%20%7B%0A%20%20%20%20%20%20var%20x%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20if%20(Number.isNaN(x)%20%7C%7C%20x%20%3D%3D%3D%200)%20%7B%20return%20x%3B%20%7D%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%20Infinity)%20%7B%20return%201%3B%20%7D%0A%20%20%20%20%20%20if%20(x%20%3D%3D%3D%20-Infinity)%20%7B%20return%20-1%3B%20%7D%0A%20%20%20%20%20%20var%20a%20%3D%20Math.expm1(x)%3B%0A%20%20%20%20%20%20var%20b%20%3D%20Math.expm1(-x)%3B%0A%20%20%20%20%20%20if%20(a%20%3D%3D%3D%20Infinity)%20%7B%20return%201%3B%20%7D%0A%20%20%20%20%20%20if%20(b%20%3D%3D%3D%20Infinity)%20%7B%20return%20-1%3B%20%7D%0A%20%20%20%20%20%20return%20(a%20-%20b)%20%2F%20(Math.exp(x)%20%2B%20Math.exp(-x))%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20trunc%3A%20function%20trunc(value)%20%7B%0A%20%20%20%20%20%20var%20x%20%3D%20Number(value)%3B%0A%20%20%20%20%20%20return%20x%20%3C%200%20%3F%20-_floor(-x)%20%3A%20_floor(x)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20imul%3A%20function%20imul(x%2C%20y)%20%7B%0A%20%20%20%20%20%20%2F%2F%20taken%20from%20https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FMath%2Fimul%0A%20%20%20%20%20%20var%20a%20%3D%20ES.ToUint32(x)%3B%0A%20%20%20%20%20%20var%20b%20%3D%20ES.ToUint32(y)%3B%0A%20%20%20%20%20%20var%20ah%20%3D%20(a%20%3E%3E%3E%2016)%20%26%200xffff%3B%0A%20%20%20%20%20%20var%20al%20%3D%20a%20%26%200xffff%3B%0A%20%20%20%20%20%20var%20bh%20%3D%20(b%20%3E%3E%3E%2016)%20%26%200xffff%3B%0A%20%20%20%20%20%20var%20bl%20%3D%20b%20%26%200xffff%3B%0A%20%20%20%20%20%20%2F%2F%20the%20shift%20by%200%20fixes%20the%20sign%20on%20the%20high%20part%0A%20%20%20%20%20%20%2F%2F%20the%20final%20%7C0%20converts%20the%20unsigned%20value%20into%20a%20signed%20value%0A%20%20%20%20%20%20return%20((al%20*%20bl)%20%2B%20(((ah%20*%20bl%20%2B%20al%20*%20bh)%20%3C%3C%2016)%20%3E%3E%3E%200)%20%7C%200)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20fround%3A%20function%20fround(x)%20%7B%0A%20%20%20%20%20%20var%20v%20%3D%20Number(x)%3B%0A%20%20%20%20%20%20if%20(v%20%3D%3D%3D%200%20%7C%7C%20v%20%3D%3D%3D%20Infinity%20%7C%7C%20v%20%3D%3D%3D%20-Infinity%20%7C%7C%20numberIsNaN(v))%20%7B%0A%20%20%20%20%20%20%20%20return%20v%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20sign%20%3D%20Math.sign(v)%3B%0A%20%20%20%20%20%20var%20abs%20%3D%20_abs(v)%3B%0A%20%20%20%20%20%20if%20(abs%20%3C%20BINARY_32_MIN_VALUE)%20%7B%0A%20%20%20%20%20%20%20%20return%20sign%20*%20roundTiesToEven(abs%20%2F%20BINARY_32_MIN_VALUE%20%2F%20BINARY_32_EPSILON)%20*%20BINARY_32_MIN_VALUE%20*%20BINARY_32_EPSILON%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%2F%2F%20Veltkamp's%20splitting%20(%3F)%0A%20%20%20%20%20%20var%20a%20%3D%20(1%20%2B%20BINARY_32_EPSILON%20%2F%20Number.EPSILON)%20*%20abs%3B%0A%20%20%20%20%20%20var%20result%20%3D%20a%20-%20(a%20-%20abs)%3B%0A%20%20%20%20%20%20if%20(result%20%3E%20BINARY_32_MAX_VALUE%20%7C%7C%20numberIsNaN(result))%20%7B%0A%20%20%20%20%20%20%20%20return%20sign%20*%20Infinity%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20sign%20*%20result%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%20%20defineProperties(Math%2C%20MathShims)%3B%0A%20%20%2F%2F%20IE%2011%20TP%20has%20an%20imprecise%20log1p%3A%20reports%20Math.log1p(-1e-17)%20as%200%0A%20%20defineProperty(Math%2C%20'log1p'%2C%20MathShims.log1p%2C%20Math.log1p(-1e-17)%20!%3D%3D%20-1e-17)%3B%0A%20%20%2F%2F%20IE%2011%20TP%20has%20an%20imprecise%20asinh%3A%20reports%20Math.asinh(-1e7)%20as%20not%20exactly%20equal%20to%20-Math.asinh(1e7)%0A%20%20defineProperty(Math%2C%20'asinh'%2C%20MathShims.asinh%2C%20Math.asinh(-1e7)%20!%3D%3D%20-Math.asinh(1e7))%3B%0A%20%20%2F%2F%20Chrome%2040%20has%20an%20imprecise%20Math.tanh%20with%20very%20small%20numbers%0A%20%20defineProperty(Math%2C%20'tanh'%2C%20MathShims.tanh%2C%20Math.tanh(-2e-17)%20!%3D%3D%20-2e-17)%3B%0A%20%20%2F%2F%20Chrome%2040%20loses%20Math.acosh%20precision%20with%20high%20numbers%0A%20%20defineProperty(Math%2C%20'acosh'%2C%20MathShims.acosh%2C%20Math.acosh(Number.MAX_VALUE)%20%3D%3D%3D%20Infinity)%3B%0A%20%20%2F%2F%20Firefox%2038%20on%20Windows%0A%20%20defineProperty(Math%2C%20'cbrt'%2C%20MathShims.cbrt%2C%20Math.abs(1%20-%20Math.cbrt(1e-300)%20%2F%201e-100)%20%2F%20Number.EPSILON%20%3E%208)%3B%0A%20%20%2F%2F%20node%200.11%20has%20an%20imprecise%20Math.sinh%20with%20very%20small%20numbers%0A%20%20defineProperty(Math%2C%20'sinh'%2C%20MathShims.sinh%2C%20Math.sinh(-2e-17)%20!%3D%3D%20-2e-17)%3B%0A%20%20%2F%2F%20FF%2035%20on%20Linux%20reports%2022025.465794806725%20for%20Math.expm1(10)%0A%20%20var%20expm1OfTen%20%3D%20Math.expm1(10)%3B%0A%20%20defineProperty(Math%2C%20'expm1'%2C%20MathShims.expm1%2C%20expm1OfTen%20%3E%2022025.465794806719%20%7C%7C%20expm1OfTen%20%3C%2022025.4657948067165168)%3B%0A%0A%20%20var%20origMathRound%20%3D%20Math.round%3B%0A%20%20%2F%2F%20breaks%20in%20e.g.%20Safari%208%2C%20Internet%20Explorer%2011%2C%20Opera%2012%0A%20%20var%20roundHandlesBoundaryConditions%20%3D%20Math.round(0.5%20-%20Number.EPSILON%20%2F%204)%20%3D%3D%3D%200%20%26%26%20Math.round(-0.5%20%2B%20Number.EPSILON%20%2F%203.99)%20%3D%3D%3D%201%3B%0A%0A%20%20%2F%2F%20When%20engines%20use%20Math.floor(x%20%2B%200.5)%20internally%2C%20Math.round%20can%20be%20buggy%20for%20large%20integers.%0A%20%20%2F%2F%20This%20behavior%20should%20be%20governed%20by%20%22round%20to%20nearest%2C%20ties%20to%20even%20mode%22%0A%20%20%2F%2F%20see%20https%3A%2F%2Fpeople.mozilla.org%2F~jorendorff%2Fes6-draft.html%23sec-ecmascript-language-types-number-type%0A%20%20%2F%2F%20These%20are%20the%20boundary%20cases%20where%20it%20breaks.%0A%20%20var%20smallestPositiveNumberWhereRoundBreaks%20%3D%20inverseEpsilon%20%2B%201%3B%0A%20%20var%20largestPositiveNumberWhereRoundBreaks%20%3D%202%20*%20inverseEpsilon%20-%201%3B%0A%20%20var%20roundDoesNotIncreaseIntegers%20%3D%20%5BsmallestPositiveNumberWhereRoundBreaks%2C%20largestPositiveNumberWhereRoundBreaks%5D.every(function%20(num)%20%7B%0A%20%20%20%20return%20Math.round(num)%20%3D%3D%3D%20num%3B%0A%20%20%7D)%3B%0A%20%20defineProperty(Math%2C%20'round'%2C%20function%20round(x)%20%7B%0A%20%20%20%20var%20floor%20%3D%20_floor(x)%3B%0A%20%20%20%20var%20ceil%20%3D%20floor%20%3D%3D%3D%20-1%20%3F%20-0%20%3A%20floor%20%2B%201%3B%0A%20%20%20%20return%20x%20-%20floor%20%3C%200.5%20%3F%20floor%20%3A%20ceil%3B%0A%20%20%7D%2C%20!roundHandlesBoundaryConditions%20%7C%7C%20!roundDoesNotIncreaseIntegers)%3B%0A%20%20Value.preserveToString(Math.round%2C%20origMathRound)%3B%0A%0A%20%20var%20origImul%20%3D%20Math.imul%3B%0A%20%20if%20(Math.imul(0xffffffff%2C%205)%20!%3D%3D%20-5)%20%7B%0A%20%20%20%20%2F%2F%20Safari%206.1%2C%20at%20least%2C%20reports%20%220%22%20for%20this%20value%0A%20%20%20%20Math.imul%20%3D%20MathShims.imul%3B%0A%20%20%20%20Value.preserveToString(Math.imul%2C%20origImul)%3B%0A%20%20%7D%0A%20%20if%20(Math.imul.length%20!%3D%3D%202)%20%7B%0A%20%20%20%20%2F%2F%20Safari%208.0.4%20has%20a%20length%20of%201%0A%20%20%20%20%2F%2F%20fixed%20in%20https%3A%2F%2Fbugs.webkit.org%2Fshow_bug.cgi%3Fid%3D143658%0A%20%20%20%20overrideNative(Math%2C%20'imul'%2C%20function%20imul(x%2C%20y)%20%7B%0A%20%20%20%20%20%20return%20_apply(origImul%2C%20Math%2C%20arguments)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20Promises%0A%20%20%2F%2F%20Simplest%20possible%20implementation%3B%20use%20a%203rd-party%20library%20if%20you%0A%20%20%2F%2F%20want%20the%20best%20possible%20speed%20and%2For%20long%20stack%20traces.%0A%20%20var%20PromiseShim%20%3D%20(function%20()%20%7B%0A%20%20%20%20var%20setTimeout%20%3D%20globals.setTimeout%3B%0A%20%20%20%20%2F%2F%20some%20environments%20don't%20have%20setTimeout%20-%20no%20way%20to%20shim%20here.%0A%20%20%20%20if%20(typeof%20setTimeout%20!%3D%3D%20'function'%20%26%26%20typeof%20setTimeout%20!%3D%3D%20'object')%20%7B%20return%3B%20%7D%0A%0A%20%20%20%20ES.IsPromise%20%3D%20function%20(promise)%20%7B%0A%20%20%20%20%20%20if%20(!ES.TypeIsObject(promise))%20%7B%0A%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(typeof%20promise._promise%20%3D%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20%20%20return%20false%3B%20%2F%2F%20uninitialized%2C%20or%20missing%20our%20hidden%20field.%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20%2F%2F%20%22PromiseCapability%22%20in%20the%20spec%20is%20what%20most%20promise%20implementations%0A%20%20%20%20%2F%2F%20call%20a%20%22deferred%22.%0A%20%20%20%20var%20PromiseCapability%20%3D%20function%20(C)%20%7B%0A%20%20%20%20%20%20if%20(!ES.IsConstructor(C))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Bad%20promise%20constructor')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20capability%20%3D%20this%3B%0A%20%20%20%20%20%20var%20resolver%20%3D%20function%20(resolve%2C%20reject)%20%7B%0A%20%20%20%20%20%20%20%20if%20(capability.resolve%20!%3D%3D%20void%200%20%7C%7C%20capability.reject%20!%3D%3D%20void%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Bad%20Promise%20implementation!')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20capability.resolve%20%3D%20resolve%3B%0A%20%20%20%20%20%20%20%20capability.reject%20%3D%20reject%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20capability.promise%20%3D%20new%20C(resolver)%3B%0A%20%20%20%20%20%20if%20(!(ES.IsCallable(capability.resolve)%20%26%26%20ES.IsCallable(capability.reject)))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Bad%20promise%20constructor')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20%2F%2F%20find%20an%20appropriate%20setImmediate-alike%0A%20%20%20%20var%20makeZeroTimeout%3B%0A%20%20%20%20%2F*global%20window%20*%2F%0A%20%20%20%20if%20(typeof%20window%20!%3D%3D%20'undefined'%20%26%26%20ES.IsCallable(window.postMessage))%20%7B%0A%20%20%20%20%20%20makeZeroTimeout%20%3D%20function%20()%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20from%20http%3A%2F%2Fdbaron.org%2Flog%2F20100309-faster-timeouts%0A%20%20%20%20%20%20%20%20var%20timeouts%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20var%20messageName%20%3D%20'zero-timeout-message'%3B%0A%20%20%20%20%20%20%20%20var%20setZeroTimeout%20%3D%20function%20(fn)%20%7B%0A%20%20%20%20%20%20%20%20%20%20_push(timeouts%2C%20fn)%3B%0A%20%20%20%20%20%20%20%20%20%20window.postMessage(messageName%2C%20'*')%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20var%20handleMessage%20%3D%20function%20(event)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(event.source%20%3D%3D%3D%20window%20%26%26%20event.data%20%3D%3D%3D%20messageName)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20event.stopPropagation()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(timeouts.length%20%3D%3D%3D%200)%20%7B%20return%3B%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20fn%20%3D%20_shift(timeouts)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20fn()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20window.addEventListener('message'%2C%20handleMessage%2C%20true)%3B%0A%20%20%20%20%20%20%20%20return%20setZeroTimeout%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%7D%0A%20%20%20%20var%20makePromiseAsap%20%3D%20function%20()%20%7B%0A%20%20%20%20%20%20%2F%2F%20An%20efficient%20task-scheduler%20based%20on%20a%20pre-existing%20Promise%0A%20%20%20%20%20%20%2F%2F%20implementation%2C%20which%20we%20can%20use%20even%20if%20we%20override%20the%0A%20%20%20%20%20%20%2F%2F%20global%20Promise%20below%20(in%20order%20to%20workaround%20bugs)%0A%20%20%20%20%20%20%2F%2F%20https%3A%2F%2Fgithub.com%2FRaynos%2Fobserv-hash%2Fissues%2F2%23issuecomment-35857671%0A%20%20%20%20%20%20var%20P%20%3D%20globals.Promise%3B%0A%20%20%20%20%20%20return%20P%20%26%26%20P.resolve%20%26%26%20function%20(task)%20%7B%0A%20%20%20%20%20%20%20%20return%20P.resolve().then(task)%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%7D%3B%0A%20%20%20%20%2F*global%20process%20*%2F%0A%20%20%20%20%2F*%20jscs%3Adisable%20disallowMultiLineTernary%20*%2F%0A%20%20%20%20var%20enqueue%20%3D%20ES.IsCallable(globals.setImmediate)%20%3F%0A%20%20%20%20%20%20globals.setImmediate.bind(globals)%20%3A%0A%20%20%20%20%20%20typeof%20process%20%3D%3D%3D%20'object'%20%26%26%20process.nextTick%20%3F%20process.nextTick%20%3A%0A%20%20%20%20%20%20makePromiseAsap()%20%7C%7C%0A%20%20%20%20%20%20(ES.IsCallable(makeZeroTimeout)%20%3F%20makeZeroTimeout()%20%3A%0A%20%20%20%20%20%20function%20(task)%20%7B%20setTimeout(task%2C%200)%3B%20%7D)%3B%20%2F%2F%20fallback%0A%20%20%20%20%2F*%20jscs%3Aenable%20disallowMultiLineTernary%20*%2F%0A%0A%20%20%20%20%2F%2F%20Constants%20for%20Promise%20implementation%0A%20%20%20%20var%20PROMISE_IDENTITY%20%3D%201%3B%0A%20%20%20%20var%20PROMISE_THROWER%20%3D%202%3B%0A%20%20%20%20var%20PROMISE_PENDING%20%3D%203%3B%0A%20%20%20%20var%20PROMISE_FULFILLED%20%3D%204%3B%0A%20%20%20%20var%20PROMISE_REJECTED%20%3D%205%3B%0A%0A%20%20%20%20var%20promiseReactionJob%20%3D%20function%20(reaction%2C%20argument)%20%7B%0A%20%20%20%20%20%20var%20promiseCapability%20%3D%20reaction.capabilities%3B%0A%20%20%20%20%20%20var%20handler%20%3D%20reaction.handler%3B%0A%20%20%20%20%20%20var%20handlerResult%2C%20handlerException%20%3D%20false%2C%20f%3B%0A%20%20%20%20%20%20if%20(handler%20%3D%3D%3D%20PROMISE_IDENTITY)%20%7B%0A%20%20%20%20%20%20%20%20handlerResult%20%3D%20argument%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(handler%20%3D%3D%3D%20PROMISE_THROWER)%20%7B%0A%20%20%20%20%20%20%20%20handlerResult%20%3D%20argument%3B%0A%20%20%20%20%20%20%20%20handlerException%20%3D%20true%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20handlerResult%20%3D%20handler(argument)%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20handlerResult%20%3D%20e%3B%0A%20%20%20%20%20%20%20%20%20%20handlerException%20%3D%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%20%20f%20%3D%20handlerException%20%3F%20promiseCapability.reject%20%3A%20promiseCapability.resolve%3B%0A%20%20%20%20%20%20f(handlerResult)%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20triggerPromiseReactions%20%3D%20function%20(reactions%2C%20argument)%20%7B%0A%20%20%20%20%20%20_forEach(reactions%2C%20function%20(reaction)%20%7B%0A%20%20%20%20%20%20%20%20enqueue(function%20()%20%7B%0A%20%20%20%20%20%20%20%20%20%20promiseReactionJob(reaction%2C%20argument)%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20fulfillPromise%20%3D%20function%20(promise%2C%20value)%20%7B%0A%20%20%20%20%20%20var%20_promise%20%3D%20promise._promise%3B%0A%20%20%20%20%20%20var%20reactions%20%3D%20_promise.fulfillReactions%3B%0A%20%20%20%20%20%20_promise.result%20%3D%20value%3B%0A%20%20%20%20%20%20_promise.fulfillReactions%20%3D%20void%200%3B%0A%20%20%20%20%20%20_promise.rejectReactions%20%3D%20void%200%3B%0A%20%20%20%20%20%20_promise.state%20%3D%20PROMISE_FULFILLED%3B%0A%20%20%20%20%20%20triggerPromiseReactions(reactions%2C%20value)%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20rejectPromise%20%3D%20function%20(promise%2C%20reason)%20%7B%0A%20%20%20%20%20%20var%20_promise%20%3D%20promise._promise%3B%0A%20%20%20%20%20%20var%20reactions%20%3D%20_promise.rejectReactions%3B%0A%20%20%20%20%20%20_promise.result%20%3D%20reason%3B%0A%20%20%20%20%20%20_promise.fulfillReactions%20%3D%20void%200%3B%0A%20%20%20%20%20%20_promise.rejectReactions%20%3D%20void%200%3B%0A%20%20%20%20%20%20_promise.state%20%3D%20PROMISE_REJECTED%3B%0A%20%20%20%20%20%20triggerPromiseReactions(reactions%2C%20reason)%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20createResolvingFunctions%20%3D%20function%20(promise)%20%7B%0A%20%20%20%20%20%20var%20alreadyResolved%20%3D%20false%3B%0A%20%20%20%20%20%20var%20resolve%20%3D%20function%20(resolution)%20%7B%0A%20%20%20%20%20%20%20%20var%20then%3B%0A%20%20%20%20%20%20%20%20if%20(alreadyResolved)%20%7B%20return%3B%20%7D%0A%20%20%20%20%20%20%20%20alreadyResolved%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20if%20(resolution%20%3D%3D%3D%20promise)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20rejectPromise(promise%2C%20new%20TypeError('Self%20resolution'))%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(!ES.TypeIsObject(resolution))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20fulfillPromise(promise%2C%20resolution)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20then%20%3D%20resolution.then%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20rejectPromise(promise%2C%20e)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(!ES.IsCallable(then))%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20fulfillPromise(promise%2C%20resolution)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20enqueue(function%20()%20%7B%0A%20%20%20%20%20%20%20%20%20%20promiseResolveThenableJob(promise%2C%20resolution%2C%20then)%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20var%20reject%20%3D%20function%20(reason)%20%7B%0A%20%20%20%20%20%20%20%20if%20(alreadyResolved)%20%7B%20return%3B%20%7D%0A%20%20%20%20%20%20%20%20alreadyResolved%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20return%20rejectPromise(promise%2C%20reason)%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20return%20%7B%20resolve%3A%20resolve%2C%20reject%3A%20reject%20%7D%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20promiseResolveThenableJob%20%3D%20function%20(promise%2C%20thenable%2C%20then)%20%7B%0A%20%20%20%20%20%20var%20resolvingFunctions%20%3D%20createResolvingFunctions(promise)%3B%0A%20%20%20%20%20%20var%20resolve%20%3D%20resolvingFunctions.resolve%3B%0A%20%20%20%20%20%20var%20reject%20%3D%20resolvingFunctions.reject%3B%0A%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20_call(then%2C%20thenable%2C%20resolve%2C%20reject)%3B%0A%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20reject(e)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20%2F%2F%20This%20is%20a%20common%20step%20in%20many%20Promise%20methods%0A%20%20%20%20var%20getPromiseSpecies%20%3D%20function%20(C)%20%7B%0A%20%20%20%20%20%20if%20(!ES.TypeIsObject(C))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('Promise%20is%20not%20object')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20S%20%3D%20C%5BsymbolSpecies%5D%3B%0A%20%20%20%20%20%20if%20(S%20!%3D%3D%20void%200%20%26%26%20S%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20return%20S%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20C%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20Promise%24prototype%3B%0A%20%20%20%20var%20Promise%20%3D%20(function%20()%20%7B%0A%20%20%20%20%20%20var%20PromiseShim%20%3D%20function%20Promise(resolver)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!(this%20instanceof%20PromiseShim))%20%7B%0A%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Constructor%20Promise%20requires%20%22new%22')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(this%20%26%26%20this._promise)%20%7B%0A%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Bad%20construction')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%2F%2F%20see%20https%3A%2F%2Fbugs.ecmascript.org%2Fshow_bug.cgi%3Fid%3D2482%0A%20%20%20%20%20%20%20%20if%20(!ES.IsCallable(resolver))%20%7B%0A%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('not%20a%20valid%20resolver')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20var%20promise%20%3D%20emulateES6construct(this%2C%20PromiseShim%2C%20Promise%24prototype%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20_promise%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20result%3A%20void%200%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20state%3A%20PROMISE_PENDING%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20fulfillReactions%3A%20%5B%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20rejectReactions%3A%20%5B%5D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20var%20resolvingFunctions%20%3D%20createResolvingFunctions(promise)%3B%0A%20%20%20%20%20%20%20%20var%20reject%20%3D%20resolvingFunctions.reject%3B%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20resolver(resolvingFunctions.resolve%2C%20reject)%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20reject(e)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%20promise%3B%0A%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20return%20PromiseShim%3B%0A%20%20%20%20%7D())%3B%0A%20%20%20%20Promise%24prototype%20%3D%20Promise.prototype%3B%0A%0A%20%20%20%20var%20_promiseAllResolver%20%3D%20function%20(index%2C%20values%2C%20capability%2C%20remaining)%20%7B%0A%20%20%20%20%20%20var%20alreadyCalled%20%3D%20false%3B%0A%20%20%20%20%20%20return%20function%20(x)%20%7B%0A%20%20%20%20%20%20%20%20if%20(alreadyCalled)%20%7B%20return%3B%20%7D%0A%20%20%20%20%20%20%20%20alreadyCalled%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20values%5Bindex%5D%20%3D%20x%3B%0A%20%20%20%20%20%20%20%20if%20((--remaining.count)%20%3D%3D%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20resolve%20%3D%20capability.resolve%3B%0A%20%20%20%20%20%20%20%20%20%20resolve(values)%3B%20%2F%2F%20call%20w%2F%20this%3D%3D%3Dundefined%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%0A%20%20%20%20var%20performPromiseAll%20%3D%20function%20(iteratorRecord%2C%20C%2C%20resultCapability)%20%7B%0A%20%20%20%20%20%20var%20it%20%3D%20iteratorRecord.iterator%3B%0A%20%20%20%20%20%20var%20values%20%3D%20%5B%5D%2C%20remaining%20%3D%20%7B%20count%3A%201%20%7D%2C%20next%2C%20nextValue%3B%0A%20%20%20%20%20%20var%20index%20%3D%200%3B%0A%20%20%20%20%20%20while%20(true)%20%7B%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20next%20%3D%20ES.IteratorStep(it)%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(next%20%3D%3D%3D%20false)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20iteratorRecord.done%20%3D%20true%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%20%20nextValue%20%3D%20next.value%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20iteratorRecord.done%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%20throw%20e%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20values%5Bindex%5D%20%3D%20void%200%3B%0A%20%20%20%20%20%20%20%20var%20nextPromise%20%3D%20C.resolve(nextValue)%3B%0A%20%20%20%20%20%20%20%20var%20resolveElement%20%3D%20_promiseAllResolver(%0A%20%20%20%20%20%20%20%20%20%20index%2C%20values%2C%20resultCapability%2C%20remaining%0A%20%20%20%20%20%20%20%20)%3B%0A%20%20%20%20%20%20%20%20remaining.count%20%2B%3D%201%3B%0A%20%20%20%20%20%20%20%20nextPromise.then(resolveElement%2C%20resultCapability.reject)%3B%0A%20%20%20%20%20%20%20%20index%20%2B%3D%201%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20((--remaining.count)%20%3D%3D%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20var%20resolve%20%3D%20resultCapability.resolve%3B%0A%20%20%20%20%20%20%20%20resolve(values)%3B%20%2F%2F%20call%20w%2F%20this%3D%3D%3Dundefined%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20resultCapability.promise%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20performPromiseRace%20%3D%20function%20(iteratorRecord%2C%20C%2C%20resultCapability)%20%7B%0A%20%20%20%20%20%20var%20it%20%3D%20iteratorRecord.iterator%2C%20next%2C%20nextValue%2C%20nextPromise%3B%0A%20%20%20%20%20%20while%20(true)%20%7B%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20next%20%3D%20ES.IteratorStep(it)%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(next%20%3D%3D%3D%20false)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20NOTE%3A%20If%20iterable%20has%20no%20items%2C%20resulting%20promise%20will%20never%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20resolve%3B%20see%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20https%3A%2F%2Fgithub.com%2Fdomenic%2Fpromises-unwrapping%2Fissues%2F75%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20https%3A%2F%2Fbugs.ecmascript.org%2Fshow_bug.cgi%3Fid%3D2515%0A%20%20%20%20%20%20%20%20%20%20%20%20iteratorRecord.done%20%3D%20true%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%20%20nextValue%20%3D%20next.value%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20iteratorRecord.done%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%20throw%20e%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20nextPromise%20%3D%20C.resolve(nextValue)%3B%0A%20%20%20%20%20%20%20%20nextPromise.then(resultCapability.resolve%2C%20resultCapability.reject)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20resultCapability.promise%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20defineProperties(Promise%2C%20%7B%0A%20%20%20%20%20%20all%3A%20function%20all(iterable)%20%7B%0A%20%20%20%20%20%20%20%20var%20C%20%3D%20getPromiseSpecies(this)%3B%0A%20%20%20%20%20%20%20%20var%20capability%20%3D%20new%20PromiseCapability(C)%3B%0A%20%20%20%20%20%20%20%20var%20iterator%2C%20iteratorRecord%3B%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20iterator%20%3D%20ES.GetIterator(iterable)%3B%0A%20%20%20%20%20%20%20%20%20%20iteratorRecord%20%3D%20%7B%20iterator%3A%20iterator%2C%20done%3A%20false%20%7D%3B%0A%20%20%20%20%20%20%20%20%20%20return%20performPromiseAll(iteratorRecord%2C%20C%2C%20capability)%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20exception%20%3D%20e%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(iteratorRecord%20%26%26%20!iteratorRecord.done)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20ES.IteratorClose(iterator%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%20(ee)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20exception%20%3D%20ee%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%20var%20reject%20%3D%20capability.reject%3B%0A%20%20%20%20%20%20%20%20%20%20reject(exception)%3B%0A%20%20%20%20%20%20%20%20%20%20return%20capability.promise%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%20race%3A%20function%20race(iterable)%20%7B%0A%20%20%20%20%20%20%20%20var%20C%20%3D%20getPromiseSpecies(this)%3B%0A%20%20%20%20%20%20%20%20var%20capability%20%3D%20new%20PromiseCapability(C)%3B%0A%20%20%20%20%20%20%20%20var%20iterator%2C%20iteratorRecord%3B%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20iterator%20%3D%20ES.GetIterator(iterable)%3B%0A%20%20%20%20%20%20%20%20%20%20iteratorRecord%20%3D%20%7B%20iterator%3A%20iterator%2C%20done%3A%20false%20%7D%3B%0A%20%20%20%20%20%20%20%20%20%20return%20performPromiseRace(iteratorRecord%2C%20C%2C%20capability)%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20exception%20%3D%20e%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(iteratorRecord%20%26%26%20!iteratorRecord.done)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20ES.IteratorClose(iterator%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%20(ee)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20exception%20%3D%20ee%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%20var%20reject%20%3D%20capability.reject%3B%0A%20%20%20%20%20%20%20%20%20%20reject(exception)%3B%0A%20%20%20%20%20%20%20%20%20%20return%20capability.promise%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%20reject%3A%20function%20reject(reason)%20%7B%0A%20%20%20%20%20%20%20%20var%20C%20%3D%20this%3B%0A%20%20%20%20%20%20%20%20var%20capability%20%3D%20new%20PromiseCapability(C)%3B%0A%20%20%20%20%20%20%20%20var%20rejectFunc%20%3D%20capability.reject%3B%0A%20%20%20%20%20%20%20%20rejectFunc(reason)%3B%20%2F%2F%20call%20with%20this%3D%3D%3Dundefined%0A%20%20%20%20%20%20%20%20return%20capability.promise%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20resolve%3A%20function%20resolve(v)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20See%20https%3A%2F%2Fesdiscuss.org%2Ftopic%2Ffixing-promise-resolve%20for%20spec%0A%20%20%20%20%20%20%20%20var%20C%20%3D%20this%3B%0A%20%20%20%20%20%20%20%20if%20(ES.IsPromise(v))%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20constructor%20%3D%20v.constructor%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(constructor%20%3D%3D%3D%20C)%20%7B%20return%20v%3B%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20var%20capability%20%3D%20new%20PromiseCapability(C)%3B%0A%20%20%20%20%20%20%20%20var%20resolveFunc%20%3D%20capability.resolve%3B%0A%20%20%20%20%20%20%20%20resolveFunc(v)%3B%20%2F%2F%20call%20with%20this%3D%3D%3Dundefined%0A%20%20%20%20%20%20%20%20return%20capability.promise%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%0A%20%20%20%20defineProperties(Promise%24prototype%2C%20%7B%0A%20%20%20%20%20%20'catch'%3A%20function%20(onRejected)%20%7B%0A%20%20%20%20%20%20%20%20return%20this.then(void%200%2C%20onRejected)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20then%3A%20function%20then(onFulfilled%2C%20onRejected)%20%7B%0A%20%20%20%20%20%20%20%20var%20promise%20%3D%20this%3B%0A%20%20%20%20%20%20%20%20if%20(!ES.IsPromise(promise))%20%7B%20throw%20new%20TypeError('not%20a%20promise')%3B%20%7D%0A%20%20%20%20%20%20%20%20var%20C%20%3D%20ES.SpeciesConstructor(promise%2C%20Promise)%3B%0A%20%20%20%20%20%20%20%20var%20resultCapability%20%3D%20new%20PromiseCapability(C)%3B%0A%20%20%20%20%20%20%20%20%2F%2F%20PerformPromiseThen(promise%2C%20onFulfilled%2C%20onRejected%2C%20resultCapability)%0A%20%20%20%20%20%20%20%20var%20fulfillReaction%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20capabilities%3A%20resultCapability%2C%0A%20%20%20%20%20%20%20%20%20%20handler%3A%20ES.IsCallable(onFulfilled)%20%3F%20onFulfilled%20%3A%20PROMISE_IDENTITY%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20var%20rejectReaction%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20capabilities%3A%20resultCapability%2C%0A%20%20%20%20%20%20%20%20%20%20handler%3A%20ES.IsCallable(onRejected)%20%3F%20onRejected%20%3A%20PROMISE_THROWER%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20var%20_promise%20%3D%20promise._promise%3B%0A%20%20%20%20%20%20%20%20var%20value%3B%0A%20%20%20%20%20%20%20%20if%20(_promise.state%20%3D%3D%3D%20PROMISE_PENDING)%20%7B%0A%20%20%20%20%20%20%20%20%20%20_push(_promise.fulfillReactions%2C%20fulfillReaction)%3B%0A%20%20%20%20%20%20%20%20%20%20_push(_promise.rejectReactions%2C%20rejectReaction)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(_promise.state%20%3D%3D%3D%20PROMISE_FULFILLED)%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%20%3D%20_promise.result%3B%0A%20%20%20%20%20%20%20%20%20%20enqueue(function%20()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20promiseReactionJob(fulfillReaction%2C%20value)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20(_promise.state%20%3D%3D%3D%20PROMISE_REJECTED)%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%20%3D%20_promise.result%3B%0A%20%20%20%20%20%20%20%20%20%20enqueue(function%20()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20promiseReactionJob(rejectReaction%2C%20value)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('unexpected%20Promise%20state')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%20resultCapability.promise%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%0A%20%20%20%20return%20Promise%3B%0A%20%20%7D())%3B%0A%0A%20%20%2F%2F%20Chrome's%20native%20Promise%20has%20extra%20methods%20that%20it%20shouldn't%20have.%20Let's%20remove%20them.%0A%20%20if%20(globals.Promise)%20%7B%0A%20%20%20%20delete%20globals.Promise.accept%3B%0A%20%20%20%20delete%20globals.Promise.defer%3B%0A%20%20%20%20delete%20globals.Promise.prototype.chain%3B%0A%20%20%7D%0A%0A%20%20if%20(typeof%20PromiseShim%20%3D%3D%3D%20'function')%20%7B%0A%20%20%20%20%2F%2F%20export%20the%20Promise%20constructor.%0A%20%20%20%20defineProperties(globals%2C%20%7B%20Promise%3A%20PromiseShim%20%7D)%3B%0A%20%20%20%20%2F%2F%20In%20Chrome%2033%20(and%20thereabouts)%20Promise%20is%20defined%2C%20but%20the%0A%20%20%20%20%2F%2F%20implementation%20is%20buggy%20in%20a%20number%20of%20ways.%20%20Let's%20check%20subclassing%0A%20%20%20%20%2F%2F%20support%20to%20see%20if%20we%20have%20a%20buggy%20implementation.%0A%20%20%20%20var%20promiseSupportsSubclassing%20%3D%20supportsSubclassing(globals.Promise%2C%20function%20(S)%20%7B%0A%20%20%20%20%20%20return%20S.resolve(42).then(function%20()%20%7B%7D)%20instanceof%20S%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20var%20promiseIgnoresNonFunctionThenCallbacks%20%3D%20!throwsError(function%20()%20%7B%20globals.Promise.reject(42).then(null%2C%205).then(null%2C%20noop)%3B%20%7D)%3B%0A%20%20%20%20var%20promiseRequiresObjectContext%20%3D%20throwsError(function%20()%20%7B%20globals.Promise.call(3%2C%20noop)%3B%20%7D)%3B%0A%20%20%20%20%2F%2F%20Promise.resolve()%20was%20errata'ed%20late%20in%20the%20ES6%20process.%0A%20%20%20%20%2F%2F%20See%3A%20https%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1170742%0A%20%20%20%20%2F%2F%20%20%20%20%20%20https%3A%2F%2Fcode.google.com%2Fp%2Fv8%2Fissues%2Fdetail%3Fid%3D4161%0A%20%20%20%20%2F%2F%20It%20serves%20as%20a%20proxy%20for%20a%20number%20of%20other%20bugs%20in%20early%20Promise%0A%20%20%20%20%2F%2F%20implementations.%0A%20%20%20%20var%20promiseResolveBroken%20%3D%20(function%20(Promise)%20%7B%0A%20%20%20%20%20%20var%20p%20%3D%20Promise.resolve(5)%3B%0A%20%20%20%20%20%20p.constructor%20%3D%20%7B%7D%3B%0A%20%20%20%20%20%20var%20p2%20%3D%20Promise.resolve(p)%3B%0A%20%20%20%20%20%20return%20(p%20%3D%3D%3D%20p2)%3B%20%2F%2F%20This%20*should*%20be%20false!%0A%20%20%20%20%7D(globals.Promise))%3B%0A%20%20%20%20if%20(!promiseSupportsSubclassing%20%7C%7C%20!promiseIgnoresNonFunctionThenCallbacks%20%7C%7C%0A%20%20%20%20%20%20%20%20!promiseRequiresObjectContext%20%7C%7C%20promiseResolveBroken)%20%7B%0A%20%20%20%20%20%20%2F*globals%20Promise%3A%20true%20*%2F%0A%20%20%20%20%20%20%2F*%20eslint-disable%20no-undef%20*%2F%0A%20%20%20%20%20%20Promise%20%3D%20PromiseShim%3B%0A%20%20%20%20%20%20%2F*%20eslint-enable%20no-undef%20*%2F%0A%20%20%20%20%20%20%2F*globals%20Promise%3A%20false%20*%2F%0A%20%20%20%20%20%20overrideNative(globals%2C%20'Promise'%2C%20PromiseShim)%3B%0A%20%20%20%20%7D%0A%20%20%20%20addDefaultSpecies(Promise)%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20Map%20and%20Set%20require%20a%20true%20ES5%20environment%0A%20%20%2F%2F%20Their%20fast%20path%20also%20requires%20that%20the%20environment%20preserve%0A%20%20%2F%2F%20property%20insertion%20order%2C%20which%20is%20not%20guaranteed%20by%20the%20spec.%0A%20%20var%20testOrder%20%3D%20function%20(a)%20%7B%0A%20%20%20%20var%20b%20%3D%20Object.keys(_reduce(a%2C%20function%20(o%2C%20k)%20%7B%0A%20%20%20%20%20%20o%5Bk%5D%20%3D%20true%3B%0A%20%20%20%20%20%20return%20o%3B%0A%20%20%20%20%7D%2C%20%7B%7D))%3B%0A%20%20%20%20return%20a.join('%3A')%20%3D%3D%3D%20b.join('%3A')%3B%0A%20%20%7D%3B%0A%20%20var%20preservesInsertionOrder%20%3D%20testOrder(%5B'z'%2C%20'a'%2C%20'bb'%5D)%3B%0A%20%20%2F%2F%20some%20engines%20(eg%2C%20Chrome)%20only%20preserve%20insertion%20order%20for%20string%20keys%0A%20%20var%20preservesNumericInsertionOrder%20%3D%20testOrder(%5B'z'%2C%201%2C%20'a'%2C%20'3'%2C%202%5D)%3B%0A%0A%20%20if%20(supportsDescriptors)%20%7B%0A%0A%20%20%20%20var%20fastkey%20%3D%20function%20fastkey(key)%20%7B%0A%20%20%20%20%20%20if%20(!preservesInsertionOrder)%20%7B%0A%20%20%20%20%20%20%20%20return%20null%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20type%20%3D%20typeof%20key%3B%0A%20%20%20%20%20%20if%20(type%20%3D%3D%3D%20'undefined'%20%7C%7C%20key%20%3D%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20return%20'%5E'%20%2B%20String(key)%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(type%20%3D%3D%3D%20'string')%20%7B%0A%20%20%20%20%20%20%20%20return%20'%24'%20%2B%20key%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(type%20%3D%3D%3D%20'number')%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20note%20that%20-0%20will%20get%20coerced%20to%20%220%22%20when%20used%20as%20a%20property%20key%0A%20%20%20%20%20%20%20%20if%20(!preservesNumericInsertionOrder)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20'n'%20%2B%20key%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%20key%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(type%20%3D%3D%3D%20'boolean')%20%7B%0A%20%20%20%20%20%20%20%20return%20'b'%20%2B%20key%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20null%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20emptyObject%20%3D%20function%20emptyObject()%20%7B%0A%20%20%20%20%20%20%2F%2F%20accomodate%20some%20older%20not-quite-ES5%20browsers%0A%20%20%20%20%20%20return%20Object.create%20%3F%20Object.create(null)%20%3A%20%7B%7D%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20addIterableToMap%20%3D%20function%20addIterableToMap(MapConstructor%2C%20map%2C%20iterable)%20%7B%0A%20%20%20%20%20%20if%20(isArray(iterable)%20%7C%7C%20Type.string(iterable))%20%7B%0A%20%20%20%20%20%20%20%20_forEach(iterable%2C%20function%20(entry)%20%7B%0A%20%20%20%20%20%20%20%20%20%20map.set(entry%5B0%5D%2C%20entry%5B1%5D)%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(iterable%20instanceof%20MapConstructor)%20%7B%0A%20%20%20%20%20%20%20%20_call(MapConstructor.prototype.forEach%2C%20iterable%2C%20function%20(value%2C%20key)%20%7B%0A%20%20%20%20%20%20%20%20%20%20map.set(key%2C%20value)%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20var%20iter%2C%20adder%3B%0A%20%20%20%20%20%20%20%20if%20(iterable%20!%3D%3D%20null%20%26%26%20typeof%20iterable%20!%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20%20%20%20%20adder%20%3D%20map.set%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(!ES.IsCallable(adder))%20%7B%20throw%20new%20TypeError('bad%20map')%3B%20%7D%0A%20%20%20%20%20%20%20%20%20%20iter%20%3D%20ES.GetIterator(iterable)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(typeof%20iter%20!%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20%20%20%20%20while%20(true)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20next%20%3D%20ES.IteratorStep(iter)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(next%20%3D%3D%3D%20false)%20%7B%20break%3B%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20nextItem%20%3D%20next.value%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(!ES.TypeIsObject(nextItem))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('expected%20iterable%20of%20pairs')%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%20_call(adder%2C%20map%2C%20nextItem%5B0%5D%2C%20nextItem%5B1%5D)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20ES.IteratorClose(iter%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20throw%20e%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%3B%0A%20%20%20%20var%20addIterableToSet%20%3D%20function%20addIterableToSet(SetConstructor%2C%20set%2C%20iterable)%20%7B%0A%20%20%20%20%20%20if%20(isArray(iterable)%20%7C%7C%20Type.string(iterable))%20%7B%0A%20%20%20%20%20%20%20%20_forEach(iterable%2C%20function%20(value)%20%7B%0A%20%20%20%20%20%20%20%20%20%20set.add(value)%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(iterable%20instanceof%20SetConstructor)%20%7B%0A%20%20%20%20%20%20%20%20_call(SetConstructor.prototype.forEach%2C%20iterable%2C%20function%20(value)%20%7B%0A%20%20%20%20%20%20%20%20%20%20set.add(value)%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20var%20iter%2C%20adder%3B%0A%20%20%20%20%20%20%20%20if%20(iterable%20!%3D%3D%20null%20%26%26%20typeof%20iterable%20!%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20%20%20%20%20adder%20%3D%20set.add%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(!ES.IsCallable(adder))%20%7B%20throw%20new%20TypeError('bad%20set')%3B%20%7D%0A%20%20%20%20%20%20%20%20%20%20iter%20%3D%20ES.GetIterator(iterable)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20(typeof%20iter%20!%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20%20%20%20%20while%20(true)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20next%20%3D%20ES.IteratorStep(iter)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(next%20%3D%3D%3D%20false)%20%7B%20break%3B%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20nextValue%20%3D%20next.value%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20_call(adder%2C%20set%2C%20nextValue)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20ES.IteratorClose(iter%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20throw%20e%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%3B%0A%0A%20%20%20%20var%20collectionShims%20%3D%20%7B%0A%20%20%20%20%20%20Map%3A%20(function%20()%20%7B%0A%0A%20%20%20%20%20%20%20%20var%20empty%20%3D%20%7B%7D%3B%0A%0A%20%20%20%20%20%20%20%20var%20MapEntry%20%3D%20function%20MapEntry(key%2C%20value)%20%7B%0A%20%20%20%20%20%20%20%20%20%20this.key%20%3D%20key%3B%0A%20%20%20%20%20%20%20%20%20%20this.value%20%3D%20value%3B%0A%20%20%20%20%20%20%20%20%20%20this.next%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%20%20this.prev%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20%20%20MapEntry.prototype.isRemoved%20%3D%20function%20isRemoved()%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20this.key%20%3D%3D%3D%20empty%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20%20%20var%20isMap%20%3D%20function%20isMap(map)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20!!map._es6map%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20%20%20var%20requireMapSlot%20%3D%20function%20requireMapSlot(map%2C%20method)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!ES.TypeIsObject(map)%20%7C%7C%20!isMap(map))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Method%20Map.prototype.'%20%2B%20method%20%2B%20'%20called%20on%20incompatible%20receiver%20'%20%2B%20String(map))%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20%20%20var%20MapIterator%20%3D%20function%20MapIterator(map%2C%20kind)%20%7B%0A%20%20%20%20%20%20%20%20%20%20requireMapSlot(map%2C%20'%5B%5BMapIterator%5D%5D')%3B%0A%20%20%20%20%20%20%20%20%20%20this.head%20%3D%20map._head%3B%0A%20%20%20%20%20%20%20%20%20%20this.i%20%3D%20this.head%3B%0A%20%20%20%20%20%20%20%20%20%20this.kind%20%3D%20kind%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20%20%20MapIterator.prototype%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20next%3A%20function%20next()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20i%20%3D%20this.i%2C%20kind%20%3D%20this.kind%2C%20head%20%3D%20this.head%2C%20result%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(typeof%20this.i%20%3D%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20%7B%20value%3A%20void%200%2C%20done%3A%20true%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%20%20while%20(i.isRemoved()%20%26%26%20i%20!%3D%3D%20head)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20back%20up%20off%20of%20removed%20entries%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20i%20%3D%20i.prev%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%20%2F%2F%20advance%20to%20next%20unreturned%20element.%0A%20%20%20%20%20%20%20%20%20%20%20%20while%20(i.next%20!%3D%3D%20head)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20i%20%3D%20i.next%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(!i.isRemoved())%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(kind%20%3D%3D%3D%20'key')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20result%20%3D%20i.key%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(kind%20%3D%3D%3D%20'value')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20result%20%3D%20i.value%3B%0A%20%20%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%20%20result%20%3D%20%5Bi.key%2C%20i.value%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.i%20%3D%20i%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20%7B%20value%3A%20result%2C%20done%3A%20false%20%7D%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%20%20%2F%2F%20once%20the%20iterator%20is%20done%2C%20it%20is%20done%20forever.%0A%20%20%20%20%20%20%20%20%20%20%20%20this.i%20%3D%20void%200%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20%7B%20value%3A%20void%200%2C%20done%3A%20true%20%7D%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20addIterator(MapIterator.prototype)%3B%0A%0A%20%20%20%20%20%20%20%20var%20Map%24prototype%3B%0A%20%20%20%20%20%20%20%20var%20MapShim%20%3D%20function%20Map()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!(this%20instanceof%20Map))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Constructor%20Map%20requires%20%22new%22')%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%20%26%26%20this._es6map)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Bad%20construction')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20var%20map%20%3D%20emulateES6construct(this%2C%20Map%2C%20Map%24prototype%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20_es6map%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_head%3A%20null%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_storage%3A%20emptyObject()%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_size%3A%200%0A%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20%20%20var%20head%20%3D%20new%20MapEntry(null%2C%20null)%3B%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20circular%20doubly-linked%20list.%0A%20%20%20%20%20%20%20%20%20%20head.next%20%3D%20head.prev%20%3D%20head%3B%0A%20%20%20%20%20%20%20%20%20%20map._head%20%3D%20head%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Optionally%20initialize%20map%20from%20iterable%0A%20%20%20%20%20%20%20%20%20%20if%20(arguments.length%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20addIterableToMap(Map%2C%20map%2C%20arguments%5B0%5D)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20return%20map%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20Map%24prototype%20%3D%20MapShim.prototype%3B%0A%0A%20%20%20%20%20%20%20%20Value.getter(Map%24prototype%2C%20'size'%2C%20function%20()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(typeof%20this._size%20%3D%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('size%20method%20called%20on%20incompatible%20Map')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20return%20this._size%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20defineProperties(Map%24prototype%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20get%3A%20function%20get(key)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireMapSlot(this%2C%20'get')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20fkey%20%3D%20fastkey(key)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(fkey%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20fast%20O(1)%20path%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20entry%20%3D%20this._storage%5Bfkey%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(entry)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20entry.value%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%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%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20head%20%3D%20this._head%2C%20i%20%3D%20head%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20while%20((i%20%3D%20i.next)%20!%3D%3D%20head)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(ES.SameValueZero(i.key%2C%20key))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20i.value%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%2C%0A%0A%20%20%20%20%20%20%20%20%20%20has%3A%20function%20has(key)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireMapSlot(this%2C%20'has')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20fkey%20%3D%20fastkey(key)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(fkey%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20fast%20O(1)%20path%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20typeof%20this._storage%5Bfkey%5D%20!%3D%3D%20'undefined'%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%20var%20head%20%3D%20this._head%2C%20i%20%3D%20head%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20while%20((i%20%3D%20i.next)%20!%3D%3D%20head)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(ES.SameValueZero(i.key%2C%20key))%20%7B%0A%20%20%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%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%20%20return%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20set%3A%20function%20set(key%2C%20value)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireMapSlot(this%2C%20'set')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20head%20%3D%20this._head%2C%20i%20%3D%20head%2C%20entry%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20fkey%20%3D%20fastkey(key)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(fkey%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20fast%20O(1)%20path%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(typeof%20this._storage%5Bfkey%5D%20!%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._storage%5Bfkey%5D.value%20%3D%20value%3B%0A%20%20%20%20%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%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20entry%20%3D%20this._storage%5Bfkey%5D%20%3D%20new%20MapEntry(key%2C%20value)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20i%20%3D%20head.prev%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20fall%20through%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%20%20while%20((i%20%3D%20i.next)%20!%3D%3D%20head)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(ES.SameValueZero(i.key%2C%20key))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20i.value%20%3D%20value%3B%0A%20%20%20%20%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%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%20%20entry%20%3D%20entry%20%7C%7C%20new%20MapEntry(key%2C%20value)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(ES.SameValue(-0%2C%20key))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20entry.key%20%3D%20%2B0%3B%20%2F%2F%20coerce%20-0%20to%20%2B0%20in%20entry%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%20entry.next%20%3D%20this._head%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20entry.prev%20%3D%20this._head.prev%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20entry.prev.next%20%3D%20entry%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20entry.next.prev%20%3D%20entry%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._size%20%2B%3D%201%3B%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%2C%0A%0A%20%20%20%20%20%20%20%20%20%20'delete'%3A%20function%20(key)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireMapSlot(this%2C%20'delete')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20head%20%3D%20this._head%2C%20i%20%3D%20head%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20fkey%20%3D%20fastkey(key)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(fkey%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20fast%20O(1)%20path%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(typeof%20this._storage%5Bfkey%5D%20%3D%3D%3D%20'undefined')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20false%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%20i%20%3D%20this._storage%5Bfkey%5D.prev%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20delete%20this._storage%5Bfkey%5D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20fall%20through%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%20while%20((i%20%3D%20i.next)%20!%3D%3D%20head)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(ES.SameValueZero(i.key%2C%20key))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20i.key%20%3D%20i.value%20%3D%20empty%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20i.prev.next%20%3D%20i.next%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20i.next.prev%20%3D%20i.prev%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._size%20-%3D%201%3B%0A%20%20%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%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%20%20return%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20clear%3A%20function%20clear()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireMapSlot(this%2C%20'clear')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._size%20%3D%200%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this._storage%20%3D%20emptyObject()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20head%20%3D%20this._head%2C%20i%20%3D%20head%2C%20p%20%3D%20i.next%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20while%20((i%20%3D%20p)%20!%3D%3D%20head)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20i.key%20%3D%20i.value%20%3D%20empty%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20p%20%3D%20i.next%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20i.next%20%3D%20i.prev%20%3D%20head%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%20head.next%20%3D%20head.prev%20%3D%20head%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20keys%3A%20function%20keys()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireMapSlot(this%2C%20'keys')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20new%20MapIterator(this%2C%20'key')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20values%3A%20function%20values()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireMapSlot(this%2C%20'values')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20new%20MapIterator(this%2C%20'value')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20entries%3A%20function%20entries()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireMapSlot(this%2C%20'entries')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20new%20MapIterator(this%2C%20'key%2Bvalue')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20forEach%3A%20function%20forEach(callback)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireMapSlot(this%2C%20'forEach')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20context%20%3D%20arguments.length%20%3E%201%20%3F%20arguments%5B1%5D%20%3A%20null%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20it%20%3D%20this.entries()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20(var%20entry%20%3D%20it.next()%3B%20!entry.done%3B%20entry%20%3D%20it.next())%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(context)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20_call(callback%2C%20context%2C%20entry.value%5B1%5D%2C%20entry.value%5B0%5D%2C%20this)%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%20callback(entry.value%5B1%5D%2C%20entry.value%5B0%5D%2C%20this)%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)%3B%0A%20%20%20%20%20%20%20%20addIterator(Map%24prototype%2C%20Map%24prototype.entries)%3B%0A%0A%20%20%20%20%20%20%20%20return%20MapShim%3B%0A%20%20%20%20%20%20%7D())%2C%0A%0A%20%20%20%20%20%20Set%3A%20(function%20()%20%7B%0A%20%20%20%20%20%20%20%20var%20isSet%20%3D%20function%20isSet(set)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20set._es6set%20%26%26%20typeof%20set._storage%20!%3D%3D%20'undefined'%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20var%20requireSetSlot%20%3D%20function%20requireSetSlot(set%2C%20method)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!ES.TypeIsObject(set)%20%7C%7C%20!isSet(set))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20https%3A%2F%2Fgithub.com%2Fpaulmillr%2Fes6-shim%2Fissues%2F176%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Set.prototype.'%20%2B%20method%20%2B%20'%20called%20on%20incompatible%20receiver%20'%20%2B%20String(set))%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Creating%20a%20Map%20is%20expensive.%20%20To%20speed%20up%20the%20common%20case%20of%0A%20%20%20%20%20%20%20%20%2F%2F%20Sets%20containing%20only%20string%20or%20numeric%20keys%2C%20we%20use%20an%20object%0A%20%20%20%20%20%20%20%20%2F%2F%20as%20backing%20storage%20and%20lazily%20create%20a%20full%20Map%20only%20when%0A%20%20%20%20%20%20%20%20%2F%2F%20required.%0A%20%20%20%20%20%20%20%20var%20Set%24prototype%3B%0A%20%20%20%20%20%20%20%20var%20SetShim%20%3D%20function%20Set()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!(this%20instanceof%20Set))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Constructor%20Set%20requires%20%22new%22')%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%20%26%26%20this._es6set)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Bad%20construction')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20var%20set%20%3D%20emulateES6construct(this%2C%20Set%2C%20Set%24prototype%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20_es6set%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20'%5B%5BSetData%5D%5D'%3A%20null%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20_storage%3A%20emptyObject()%0A%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(!set._es6set)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('bad%20set')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20%2F%2F%20Optionally%20initialize%20Set%20from%20iterable%0A%20%20%20%20%20%20%20%20%20%20if%20(arguments.length%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20addIterableToSet(Set%2C%20set%2C%20arguments%5B0%5D)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20return%20set%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20Set%24prototype%20%3D%20SetShim.prototype%3B%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20Switch%20from%20the%20object%20backing%20storage%20to%20a%20full%20Map.%0A%20%20%20%20%20%20%20%20var%20ensureMap%20%3D%20function%20ensureMap(set)%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!set%5B'%5B%5BSetData%5D%5D'%5D)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20m%20%3D%20set%5B'%5B%5BSetData%5D%5D'%5D%20%3D%20new%20collectionShims.Map()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20_forEach(Object.keys(set._storage)%2C%20function%20(key)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20k%20%3D%20key%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(k%20%3D%3D%3D%20'%5Enull')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20k%20%3D%20null%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(k%20%3D%3D%3D%20'%5Eundefined')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20k%20%3D%20void%200%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%20first%20%3D%20k.charAt(0)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(first%20%3D%3D%3D%20'%24')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20k%20%3D%20_strSlice(k%2C%201)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(first%20%3D%3D%3D%20'n')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20k%20%3D%20%2B_strSlice(k%2C%201)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20if%20(first%20%3D%3D%3D%20'b')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20k%20%3D%20k%20%3D%3D%3D%20'btrue'%3B%0A%20%20%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%20%20k%20%3D%20%2Bk%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%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20m.set(k%2C%20k)%3B%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%20set._storage%20%3D%20null%3B%20%2F%2F%20free%20old%20backing%20storage%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%3B%0A%0A%20%20%20%20%20%20%20%20Value.getter(SetShim.prototype%2C%20'size'%2C%20function%20()%20%7B%0A%20%20%20%20%20%20%20%20%20%20requireSetSlot(this%2C%20'size')%3B%0A%20%20%20%20%20%20%20%20%20%20ensureMap(this)%3B%0A%20%20%20%20%20%20%20%20%20%20return%20this%5B'%5B%5BSetData%5D%5D'%5D.size%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20defineProperties(SetShim.prototype%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20has%3A%20function%20has(key)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireSetSlot(this%2C%20'has')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20fkey%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this._storage%20%26%26%20(fkey%20%3D%20fastkey(key))%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20!!this._storage%5Bfkey%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%20%20ensureMap(this)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20this%5B'%5B%5BSetData%5D%5D'%5D.has(key)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20add%3A%20function%20add(key)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireSetSlot(this%2C%20'add')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20fkey%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this._storage%20%26%26%20(fkey%20%3D%20fastkey(key))%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._storage%5Bfkey%5D%20%3D%20true%3B%0A%20%20%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%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20ensureMap(this)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this%5B'%5B%5BSetData%5D%5D'%5D.set(key%2C%20key)%3B%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%2C%0A%0A%20%20%20%20%20%20%20%20%20%20'delete'%3A%20function%20(key)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireSetSlot(this%2C%20'delete')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20fkey%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this._storage%20%26%26%20(fkey%20%3D%20fastkey(key))%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20hasFKey%20%3D%20_hasOwnProperty(this._storage%2C%20fkey)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20(delete%20this._storage%5Bfkey%5D)%20%26%26%20hasFKey%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%20ensureMap(this)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20this%5B'%5B%5BSetData%5D%5D'%5D%5B'delete'%5D(key)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20clear%3A%20function%20clear()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireSetSlot(this%2C%20'clear')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(this._storage)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20this._storage%20%3D%20emptyObject()%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%5B'%5B%5BSetData%5D%5D'%5D.clear()%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%20values%3A%20function%20values()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireSetSlot(this%2C%20'values')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20ensureMap(this)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20this%5B'%5B%5BSetData%5D%5D'%5D.values()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20entries%3A%20function%20entries()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireSetSlot(this%2C%20'entries')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20ensureMap(this)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20this%5B'%5B%5BSetData%5D%5D'%5D.entries()%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20forEach%3A%20function%20forEach(callback)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20requireSetSlot(this%2C%20'forEach')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20context%20%3D%20arguments.length%20%3E%201%20%3F%20arguments%5B1%5D%20%3A%20null%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20entireSet%20%3D%20this%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20ensureMap(entireSet)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20this%5B'%5B%5BSetData%5D%5D'%5D.forEach(function%20(value%2C%20key)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(context)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20_call(callback%2C%20context%2C%20key%2C%20key%2C%20entireSet)%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%20callback(key%2C%20key%2C%20entireSet)%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)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20defineProperty(SetShim.prototype%2C%20'keys'%2C%20SetShim.prototype.values%2C%20true)%3B%0A%20%20%20%20%20%20%20%20addIterator(SetShim.prototype%2C%20SetShim.prototype.values)%3B%0A%0A%20%20%20%20%20%20%20%20return%20SetShim%3B%0A%20%20%20%20%20%20%7D())%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20if%20(globals.Map%20%7C%7C%20globals.Set)%20%7B%0A%20%20%20%20%20%20%2F%2F%20Safari%208%2C%20for%20example%2C%20doesn't%20accept%20an%20iterable.%0A%20%20%20%20%20%20var%20mapAcceptsArguments%20%3D%20valueOrFalseIfThrows(function%20()%20%7B%20return%20new%20Map(%5B%5B1%2C%202%5D%5D).get(1)%20%3D%3D%3D%202%3B%20%7D)%3B%0A%20%20%20%20%20%20if%20(!mapAcceptsArguments)%20%7B%0A%20%20%20%20%20%20%20%20var%20OrigMapNoArgs%20%3D%20globals.Map%3B%0A%20%20%20%20%20%20%20%20globals.Map%20%3D%20function%20Map()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!(this%20instanceof%20Map))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Constructor%20Map%20requires%20%22new%22')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20var%20m%20%3D%20new%20OrigMapNoArgs()%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(arguments.length%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20addIterableToMap(Map%2C%20m%2C%20arguments%5B0%5D)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20Object.setPrototypeOf(m%2C%20globals.Map.prototype)%3B%0A%20%20%20%20%20%20%20%20%20%20defineProperty(m%2C%20'constructor'%2C%20Map%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%20%20return%20m%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20globals.Map.prototype%20%3D%20create(OrigMapNoArgs.prototype)%3B%0A%20%20%20%20%20%20%20%20Value.preserveToString(globals.Map%2C%20OrigMapNoArgs)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20testMap%20%3D%20new%20Map()%3B%0A%20%20%20%20%20%20var%20mapUsesSameValueZero%20%3D%20(function%20(m)%20%7B%0A%20%20%20%20%20%20%20%20m%5B'delete'%5D(0)%3B%0A%20%20%20%20%20%20%20%20m%5B'delete'%5D(-0)%3B%0A%20%20%20%20%20%20%20%20m.set(0%2C%203)%3B%0A%20%20%20%20%20%20%20%20m.get(-0%2C%204)%3B%0A%20%20%20%20%20%20%20%20return%20m.get(0)%20%3D%3D%3D%203%20%26%26%20m.get(-0)%20%3D%3D%3D%204%3B%0A%20%20%20%20%20%20%7D(testMap))%3B%0A%20%20%20%20%20%20var%20mapSupportsChaining%20%3D%20testMap.set(1%2C%202)%20%3D%3D%3D%20testMap%3B%0A%20%20%20%20%20%20if%20(!mapUsesSameValueZero%20%7C%7C%20!mapSupportsChaining)%20%7B%0A%20%20%20%20%20%20%20%20var%20origMapSet%20%3D%20Map.prototype.set%3B%0A%20%20%20%20%20%20%20%20overrideNative(Map.prototype%2C%20'set'%2C%20function%20set(k%2C%20v)%20%7B%0A%20%20%20%20%20%20%20%20%20%20_call(origMapSet%2C%20this%2C%20k%20%3D%3D%3D%200%20%3F%200%20%3A%20k%2C%20v)%3B%0A%20%20%20%20%20%20%20%20%20%20return%20this%3B%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%20if%20(!mapUsesSameValueZero)%20%7B%0A%20%20%20%20%20%20%20%20var%20origMapGet%20%3D%20Map.prototype.get%3B%0A%20%20%20%20%20%20%20%20var%20origMapHas%20%3D%20Map.prototype.has%3B%0A%20%20%20%20%20%20%20%20defineProperties(Map.prototype%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20get%3A%20function%20get(k)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20_call(origMapGet%2C%20this%2C%20k%20%3D%3D%3D%200%20%3F%200%20%3A%20k)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20has%3A%20function%20has(k)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20_call(origMapHas%2C%20this%2C%20k%20%3D%3D%3D%200%20%3F%200%20%3A%20k)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%20true)%3B%0A%20%20%20%20%20%20%20%20Value.preserveToString(Map.prototype.get%2C%20origMapGet)%3B%0A%20%20%20%20%20%20%20%20Value.preserveToString(Map.prototype.has%2C%20origMapHas)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20testSet%20%3D%20new%20Set()%3B%0A%20%20%20%20%20%20var%20setUsesSameValueZero%20%3D%20(function%20(s)%20%7B%0A%20%20%20%20%20%20%20%20s%5B'delete'%5D(0)%3B%0A%20%20%20%20%20%20%20%20s.add(-0)%3B%0A%20%20%20%20%20%20%20%20return%20!s.has(0)%3B%0A%20%20%20%20%20%20%7D(testSet))%3B%0A%20%20%20%20%20%20var%20setSupportsChaining%20%3D%20testSet.add(1)%20%3D%3D%3D%20testSet%3B%0A%20%20%20%20%20%20if%20(!setUsesSameValueZero%20%7C%7C%20!setSupportsChaining)%20%7B%0A%20%20%20%20%20%20%20%20var%20origSetAdd%20%3D%20Set.prototype.add%3B%0A%20%20%20%20%20%20%20%20Set.prototype.add%20%3D%20function%20add(v)%20%7B%0A%20%20%20%20%20%20%20%20%20%20_call(origSetAdd%2C%20this%2C%20v%20%3D%3D%3D%200%20%3F%200%20%3A%20v)%3B%0A%20%20%20%20%20%20%20%20%20%20return%20this%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20Value.preserveToString(Set.prototype.add%2C%20origSetAdd)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(!setUsesSameValueZero)%20%7B%0A%20%20%20%20%20%20%20%20var%20origSetHas%20%3D%20Set.prototype.has%3B%0A%20%20%20%20%20%20%20%20Set.prototype.has%20%3D%20function%20has(v)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20_call(origSetHas%2C%20this%2C%20v%20%3D%3D%3D%200%20%3F%200%20%3A%20v)%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20Value.preserveToString(Set.prototype.has%2C%20origSetHas)%3B%0A%20%20%20%20%20%20%20%20var%20origSetDel%20%3D%20Set.prototype%5B'delete'%5D%3B%0A%20%20%20%20%20%20%20%20Set.prototype%5B'delete'%5D%20%3D%20function%20SetDelete(v)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20_call(origSetDel%2C%20this%2C%20v%20%3D%3D%3D%200%20%3F%200%20%3A%20v)%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20Value.preserveToString(Set.prototype%5B'delete'%5D%2C%20origSetDel)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20mapSupportsSubclassing%20%3D%20supportsSubclassing(globals.Map%2C%20function%20(M)%20%7B%0A%20%20%20%20%20%20%20%20var%20m%20%3D%20new%20M(%5B%5D)%3B%0A%20%20%20%20%20%20%20%20%2F%2F%20Firefox%2032%20is%20ok%20with%20the%20instantiating%20the%20subclass%20but%20will%0A%20%20%20%20%20%20%20%20%2F%2F%20throw%20when%20the%20map%20is%20used.%0A%20%20%20%20%20%20%20%20m.set(42%2C%2042)%3B%0A%20%20%20%20%20%20%20%20return%20m%20instanceof%20M%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20var%20mapFailsToSupportSubclassing%20%3D%20Object.setPrototypeOf%20%26%26%20!mapSupportsSubclassing%3B%20%2F%2F%20without%20Object.setPrototypeOf%2C%20subclassing%20is%20not%20possible%0A%20%20%20%20%20%20var%20mapRequiresNew%20%3D%20(function%20()%20%7B%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20!(globals.Map()%20instanceof%20globals.Map)%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20e%20instanceof%20TypeError%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%20%20if%20(globals.Map.length%20!%3D%3D%200%20%7C%7C%20mapFailsToSupportSubclassing%20%7C%7C%20!mapRequiresNew)%20%7B%0A%20%20%20%20%20%20%20%20var%20OrigMap%20%3D%20globals.Map%3B%0A%20%20%20%20%20%20%20%20globals.Map%20%3D%20function%20Map()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!(this%20instanceof%20Map))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Constructor%20Map%20requires%20%22new%22')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20var%20m%20%3D%20new%20OrigMap()%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(arguments.length%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20addIterableToMap(Map%2C%20m%2C%20arguments%5B0%5D)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20Object.setPrototypeOf(m%2C%20Map.prototype)%3B%0A%20%20%20%20%20%20%20%20%20%20defineProperty(m%2C%20'constructor'%2C%20Map%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%20%20return%20m%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20globals.Map.prototype%20%3D%20OrigMap.prototype%3B%0A%20%20%20%20%20%20%20%20Value.preserveToString(globals.Map%2C%20OrigMap)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20setSupportsSubclassing%20%3D%20supportsSubclassing(globals.Set%2C%20function%20(S)%20%7B%0A%20%20%20%20%20%20%20%20var%20s%20%3D%20new%20S(%5B%5D)%3B%0A%20%20%20%20%20%20%20%20s.add(42%2C%2042)%3B%0A%20%20%20%20%20%20%20%20return%20s%20instanceof%20S%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20var%20setFailsToSupportSubclassing%20%3D%20Object.setPrototypeOf%20%26%26%20!setSupportsSubclassing%3B%20%2F%2F%20without%20Object.setPrototypeOf%2C%20subclassing%20is%20not%20possible%0A%20%20%20%20%20%20var%20setRequiresNew%20%3D%20(function%20()%20%7B%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20!(globals.Set()%20instanceof%20globals.Set)%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20e%20instanceof%20TypeError%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%20%20if%20(globals.Set.length%20!%3D%3D%200%20%7C%7C%20setFailsToSupportSubclassing%20%7C%7C%20!setRequiresNew)%20%7B%0A%20%20%20%20%20%20%20%20var%20OrigSet%20%3D%20globals.Set%3B%0A%20%20%20%20%20%20%20%20globals.Set%20%3D%20function%20Set()%20%7B%0A%20%20%20%20%20%20%20%20%20%20if%20(!(this%20instanceof%20Set))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('Constructor%20Set%20requires%20%22new%22')%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20var%20s%20%3D%20new%20OrigSet()%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(arguments.length%20%3E%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20addIterableToSet(Set%2C%20s%2C%20arguments%5B0%5D)%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20Object.setPrototypeOf(s%2C%20Set.prototype)%3B%0A%20%20%20%20%20%20%20%20%20%20defineProperty(s%2C%20'constructor'%2C%20Set%2C%20true)%3B%0A%20%20%20%20%20%20%20%20%20%20return%20s%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20globals.Set.prototype%20%3D%20OrigSet.prototype%3B%0A%20%20%20%20%20%20%20%20Value.preserveToString(globals.Set%2C%20OrigSet)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20mapIterationThrowsStopIterator%20%3D%20!valueOrFalseIfThrows(function%20()%20%7B%0A%20%20%20%20%20%20%20%20return%20(new%20Map()).keys().next().done%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%2F*%0A%20%20%20%20%20%20%20%20-%20In%20Firefox%20%3C%2023%2C%20Map%23size%20is%20a%20function.%0A%20%20%20%20%20%20%20%20-%20In%20all%20current%20Firefox%2C%20Set%23entries%2Fkeys%2Fvalues%20%26%20Map%23clear%20do%20not%20exist%0A%20%20%20%20%20%20%20%20-%20https%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D869996%0A%20%20%20%20%20%20%20%20-%20In%20Firefox%2024%2C%20Map%20and%20Set%20do%20not%20implement%20forEach%0A%20%20%20%20%20%20%20%20-%20In%20Firefox%2025%20at%20least%2C%20Map%20and%20Set%20are%20callable%20without%20%22new%22%0A%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20if%20(%0A%20%20%20%20%20%20%20%20typeof%20globals.Map.prototype.clear%20!%3D%3D%20'function'%20%7C%7C%0A%20%20%20%20%20%20%20%20new%20globals.Set().size%20!%3D%3D%200%20%7C%7C%0A%20%20%20%20%20%20%20%20new%20globals.Map().size%20!%3D%3D%200%20%7C%7C%0A%20%20%20%20%20%20%20%20typeof%20globals.Map.prototype.keys%20!%3D%3D%20'function'%20%7C%7C%0A%20%20%20%20%20%20%20%20typeof%20globals.Set.prototype.keys%20!%3D%3D%20'function'%20%7C%7C%0A%20%20%20%20%20%20%20%20typeof%20globals.Map.prototype.forEach%20!%3D%3D%20'function'%20%7C%7C%0A%20%20%20%20%20%20%20%20typeof%20globals.Set.prototype.forEach%20!%3D%3D%20'function'%20%7C%7C%0A%20%20%20%20%20%20%20%20isCallableWithoutNew(globals.Map)%20%7C%7C%0A%20%20%20%20%20%20%20%20isCallableWithoutNew(globals.Set)%20%7C%7C%0A%20%20%20%20%20%20%20%20typeof%20(new%20globals.Map().keys().next)%20!%3D%3D%20'function'%20%7C%7C%20%2F%2F%20Safari%208%0A%20%20%20%20%20%20%20%20mapIterationThrowsStopIterator%20%7C%7C%20%2F%2F%20Firefox%2025%0A%20%20%20%20%20%20%20%20!mapSupportsSubclassing%0A%20%20%20%20%20%20)%20%7B%0A%20%20%20%20%20%20%20%20delete%20globals.Map%3B%20%2F%2F%20necessary%20to%20overwrite%20in%20Safari%208%0A%20%20%20%20%20%20%20%20delete%20globals.Set%3B%20%2F%2F%20necessary%20to%20overwrite%20in%20Safari%208%0A%20%20%20%20%20%20%20%20defineProperties(globals%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20Map%3A%20collectionShims.Map%2C%0A%20%20%20%20%20%20%20%20%20%20Set%3A%20collectionShims.Set%0A%20%20%20%20%20%20%20%20%7D%2C%20true)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20if%20(globals.Set.prototype.keys%20!%3D%3D%20globals.Set.prototype.values)%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20Fixed%20in%20WebKit%20with%20https%3A%2F%2Fbugs.webkit.org%2Fshow_bug.cgi%3Fid%3D144190%0A%20%20%20%20%20%20%20%20defineProperty(globals.Set.prototype%2C%20'keys'%2C%20globals.Set.prototype.values%2C%20true)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%2F%2F%20Shim%20incomplete%20iterator%20implementations.%0A%20%20%20%20%20%20addIterator(Object.getPrototypeOf((new%20globals.Map()).keys()))%3B%0A%20%20%20%20%20%20addIterator(Object.getPrototypeOf((new%20globals.Set()).keys()))%3B%0A%0A%20%20%20%20%20%20if%20(functionsHaveNames%20%26%26%20globals.Set.prototype.has.name%20!%3D%3D%20'has')%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20Microsoft%20Edge%20v0.11.10074.0%20is%20missing%20a%20name%20on%20Set%23has%0A%20%20%20%20%20%20%20%20var%20anonymousSetHas%20%3D%20globals.Set.prototype.has%3B%0A%20%20%20%20%20%20%20%20overrideNative(globals.Set.prototype%2C%20'has'%2C%20function%20has(key)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20_call(anonymousSetHas%2C%20this%2C%20key)%3B%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%20%20defineProperties(globals%2C%20collectionShims)%3B%0A%20%20%20%20addDefaultSpecies(globals.Map)%3B%0A%20%20%20%20addDefaultSpecies(globals.Set)%3B%0A%20%20%7D%0A%0A%20%20var%20throwUnlessTargetIsObject%20%3D%20function%20throwUnlessTargetIsObject(target)%20%7B%0A%20%20%20%20if%20(!ES.TypeIsObject(target))%20%7B%0A%20%20%20%20%20%20throw%20new%20TypeError('target%20must%20be%20an%20object')%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20%2F%2F%20Some%20Reflect%20methods%20are%20basically%20the%20same%20as%0A%20%20%2F%2F%20those%20on%20the%20Object%20global%2C%20except%20that%20a%20TypeError%20is%20thrown%20if%0A%20%20%2F%2F%20target%20isn't%20an%20object.%20As%20well%20as%20returning%20a%20boolean%20indicating%0A%20%20%2F%2F%20the%20success%20of%20the%20operation.%0A%20%20var%20ReflectShims%20%3D%20%7B%0A%20%20%20%20%2F%2F%20Apply%20method%20in%20a%20functional%20form.%0A%20%20%20%20apply%3A%20function%20apply()%20%7B%0A%20%20%20%20%20%20return%20_apply(ES.Call%2C%20null%2C%20arguments)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20New%20operator%20in%20a%20functional%20form.%0A%20%20%20%20construct%3A%20function%20construct(constructor%2C%20args)%20%7B%0A%20%20%20%20%20%20if%20(!ES.IsConstructor(constructor))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('First%20argument%20must%20be%20a%20constructor.')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20newTarget%20%3D%20arguments.length%20%3C%203%20%3F%20constructor%20%3A%20arguments%5B2%5D%3B%0A%20%20%20%20%20%20if%20(!ES.IsConstructor(newTarget))%20%7B%0A%20%20%20%20%20%20%20%20throw%20new%20TypeError('new.target%20must%20be%20a%20constructor.')%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20ES.Construct(constructor%2C%20args%2C%20newTarget%2C%20'internal')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20%2F%2F%20When%20deleting%20a%20non-existent%20or%20configurable%20property%2C%0A%20%20%20%20%2F%2F%20true%20is%20returned.%0A%20%20%20%20%2F%2F%20When%20attempting%20to%20delete%20a%20non-configurable%20property%2C%0A%20%20%20%20%2F%2F%20it%20will%20return%20false.%0A%20%20%20%20deleteProperty%3A%20function%20deleteProperty(target%2C%20key)%20%7B%0A%20%20%20%20%20%20throwUnlessTargetIsObject(target)%3B%0A%20%20%20%20%20%20if%20(supportsDescriptors)%20%7B%0A%20%20%20%20%20%20%20%20var%20desc%20%3D%20Object.getOwnPropertyDescriptor(target%2C%20key)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(desc%20%26%26%20!desc.configurable)%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%0A%20%20%20%20%20%20%2F%2F%20Will%20return%20true.%0A%20%20%20%20%20%20return%20delete%20target%5Bkey%5D%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20enumerate%3A%20function%20enumerate(target)%20%7B%0A%20%20%20%20%20%20throwUnlessTargetIsObject(target)%3B%0A%20%20%20%20%20%20return%20new%20ObjectIterator(target%2C%20'key')%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20has%3A%20function%20has(target%2C%20key)%20%7B%0A%20%20%20%20%20%20throwUnlessTargetIsObject(target)%3B%0A%20%20%20%20%20%20return%20key%20in%20target%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%0A%20%20if%20(Object.getOwnPropertyNames)%20%7B%0A%20%20%20%20Object.assign(ReflectShims%2C%20%7B%0A%20%20%20%20%20%20%2F%2F%20Basically%20the%20result%20of%20calling%20the%20internal%20%5B%5BOwnPropertyKeys%5D%5D.%0A%20%20%20%20%20%20%2F%2F%20Concatenating%20propertyNames%20and%20propertySymbols%20should%20do%20the%20trick.%0A%20%20%20%20%20%20%2F%2F%20This%20should%20continue%20to%20work%20together%20with%20a%20Symbol%20shim%0A%20%20%20%20%20%20%2F%2F%20which%20overrides%20Object.getOwnPropertyNames%20and%20implements%0A%20%20%20%20%20%20%2F%2F%20Object.getOwnPropertySymbols.%0A%20%20%20%20%20%20ownKeys%3A%20function%20ownKeys(target)%20%7B%0A%20%20%20%20%20%20%20%20throwUnlessTargetIsObject(target)%3B%0A%20%20%20%20%20%20%20%20var%20keys%20%3D%20Object.getOwnPropertyNames(target)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(ES.IsCallable(Object.getOwnPropertySymbols))%20%7B%0A%20%20%20%20%20%20%20%20%20%20_pushApply(keys%2C%20Object.getOwnPropertySymbols(target))%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20keys%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%0A%20%20var%20callAndCatchException%20%3D%20function%20ConvertExceptionToBoolean(func)%20%7B%0A%20%20%20%20return%20!throwsError(func)%3B%0A%20%20%7D%3B%0A%0A%20%20if%20(Object.preventExtensions)%20%7B%0A%20%20%20%20Object.assign(ReflectShims%2C%20%7B%0A%20%20%20%20%20%20isExtensible%3A%20function%20isExtensible(target)%20%7B%0A%20%20%20%20%20%20%20%20throwUnlessTargetIsObject(target)%3B%0A%20%20%20%20%20%20%20%20return%20Object.isExtensible(target)%3B%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20preventExtensions%3A%20function%20preventExtensions(target)%20%7B%0A%20%20%20%20%20%20%20%20throwUnlessTargetIsObject(target)%3B%0A%20%20%20%20%20%20%20%20return%20callAndCatchException(function%20()%20%7B%0A%20%20%20%20%20%20%20%20%20%20Object.preventExtensions(target)%3B%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)%3B%0A%20%20%7D%0A%0A%20%20if%20(supportsDescriptors)%20%7B%0A%20%20%20%20var%20internalGet%20%3D%20function%20get(target%2C%20key%2C%20receiver)%20%7B%0A%20%20%20%20%20%20var%20desc%20%3D%20Object.getOwnPropertyDescriptor(target%2C%20key)%3B%0A%0A%20%20%20%20%20%20if%20(!desc)%20%7B%0A%20%20%20%20%20%20%20%20var%20parent%20%3D%20Object.getPrototypeOf(target)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(parent%20%3D%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20undefined%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20return%20internalGet(parent%2C%20key%2C%20receiver)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20if%20('value'%20in%20desc)%20%7B%0A%20%20%20%20%20%20%20%20return%20desc.value%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20if%20(desc.get)%20%7B%0A%20%20%20%20%20%20%20%20return%20_call(desc.get%2C%20receiver)%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20return%20undefined%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20internalSet%20%3D%20function%20set(target%2C%20key%2C%20value%2C%20receiver)%20%7B%0A%20%20%20%20%20%20var%20desc%20%3D%20Object.getOwnPropertyDescriptor(target%2C%20key)%3B%0A%0A%20%20%20%20%20%20if%20(!desc)%20%7B%0A%20%20%20%20%20%20%20%20var%20parent%20%3D%20Object.getPrototypeOf(target)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(parent%20!%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20internalSet(parent%2C%20key%2C%20value%2C%20receiver)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20desc%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20value%3A%20void%200%2C%0A%20%20%20%20%20%20%20%20%20%20writable%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20enumerable%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20configurable%3A%20true%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20if%20('value'%20in%20desc)%20%7B%0A%20%20%20%20%20%20%20%20if%20(!desc.writable)%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%20if%20(!ES.TypeIsObject(receiver))%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%20var%20existingDesc%20%3D%20Object.getOwnPropertyDescriptor(receiver%2C%20key)%3B%0A%0A%20%20%20%20%20%20%20%20if%20(existingDesc)%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20Reflect.defineProperty(receiver%2C%20key%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20value%0A%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20return%20Reflect.defineProperty(receiver%2C%20key%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20value%3A%20value%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20writable%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20enumerable%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20configurable%3A%20true%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%0A%20%20%20%20%20%20if%20(desc.set)%20%7B%0A%20%20%20%20%20%20%20%20_call(desc.set%2C%20receiver%2C%20value)%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%20return%20false%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20Object.assign(ReflectShims%2C%20%7B%0A%20%20%20%20%20%20defineProperty%3A%20function%20defineProperty(target%2C%20propertyKey%2C%20attributes)%20%7B%0A%20%20%20%20%20%20%20%20throwUnlessTargetIsObject(target)%3B%0A%20%20%20%20%20%20%20%20return%20callAndCatchException(function%20()%20%7B%0A%20%20%20%20%20%20%20%20%20%20Object.defineProperty(target%2C%20propertyKey%2C%20attributes)%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20getOwnPropertyDescriptor%3A%20function%20getOwnPropertyDescriptor(target%2C%20propertyKey)%20%7B%0A%20%20%20%20%20%20%20%20throwUnlessTargetIsObject(target)%3B%0A%20%20%20%20%20%20%20%20return%20Object.getOwnPropertyDescriptor(target%2C%20propertyKey)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%2F%2F%20Syntax%20in%20a%20functional%20form.%0A%20%20%20%20%20%20get%3A%20function%20get(target%2C%20key)%20%7B%0A%20%20%20%20%20%20%20%20throwUnlessTargetIsObject(target)%3B%0A%20%20%20%20%20%20%20%20var%20receiver%20%3D%20arguments.length%20%3E%202%20%3F%20arguments%5B2%5D%20%3A%20target%3B%0A%0A%20%20%20%20%20%20%20%20return%20internalGet(target%2C%20key%2C%20receiver)%3B%0A%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20set%3A%20function%20set(target%2C%20key%2C%20value)%20%7B%0A%20%20%20%20%20%20%20%20throwUnlessTargetIsObject(target)%3B%0A%20%20%20%20%20%20%20%20var%20receiver%20%3D%20arguments.length%20%3E%203%20%3F%20arguments%5B3%5D%20%3A%20target%3B%0A%0A%20%20%20%20%20%20%20%20return%20internalSet(target%2C%20key%2C%20value%2C%20receiver)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%0A%20%20if%20(Object.getPrototypeOf)%20%7B%0A%20%20%20%20var%20objectDotGetPrototypeOf%20%3D%20Object.getPrototypeOf%3B%0A%20%20%20%20ReflectShims.getPrototypeOf%20%3D%20function%20getPrototypeOf(target)%20%7B%0A%20%20%20%20%20%20throwUnlessTargetIsObject(target)%3B%0A%20%20%20%20%20%20return%20objectDotGetPrototypeOf(target)%3B%0A%20%20%20%20%7D%3B%0A%20%20%7D%0A%0A%20%20if%20(Object.setPrototypeOf%20%26%26%20ReflectShims.getPrototypeOf)%20%7B%0A%20%20%20%20var%20willCreateCircularPrototype%20%3D%20function%20(object%2C%20lastProto)%20%7B%0A%20%20%20%20%20%20var%20proto%20%3D%20lastProto%3B%0A%20%20%20%20%20%20while%20(proto)%20%7B%0A%20%20%20%20%20%20%20%20if%20(object%20%3D%3D%3D%20proto)%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%20%20%20%20%20%20%20%20proto%20%3D%20ReflectShims.getPrototypeOf(proto)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20Object.assign(ReflectShims%2C%20%7B%0A%20%20%20%20%20%20%2F%2F%20Sets%20the%20prototype%20of%20the%20given%20object.%0A%20%20%20%20%20%20%2F%2F%20Returns%20true%20on%20success%2C%20otherwise%20false.%0A%20%20%20%20%20%20setPrototypeOf%3A%20function%20setPrototypeOf(object%2C%20proto)%20%7B%0A%20%20%20%20%20%20%20%20throwUnlessTargetIsObject(object)%3B%0A%20%20%20%20%20%20%20%20if%20(proto%20!%3D%3D%20null%20%26%26%20!ES.TypeIsObject(proto))%20%7B%0A%20%20%20%20%20%20%20%20%20%20throw%20new%20TypeError('proto%20must%20be%20an%20object%20or%20null')%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%2F%2F%20If%20they%20already%20are%20the%20same%2C%20we're%20done.%0A%20%20%20%20%20%20%20%20if%20(proto%20%3D%3D%3D%20Reflect.getPrototypeOf(object))%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%20%2F%2F%20Cannot%20alter%20prototype%20if%20object%20not%20extensible.%0A%20%20%20%20%20%20%20%20if%20(Reflect.isExtensible%20%26%26%20!Reflect.isExtensible(object))%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%20%2F%2F%20Ensure%20that%20we%20do%20not%20create%20a%20circular%20prototype%20chain.%0A%20%20%20%20%20%20%20%20if%20(willCreateCircularPrototype(object%2C%20proto))%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%20Object.setPrototypeOf(object%2C%20proto)%3B%0A%0A%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%20%20var%20defineOrOverrideReflectProperty%20%3D%20function%20(key%2C%20shim)%20%7B%0A%20%20%20%20if%20(!ES.IsCallable(globals.Reflect%5Bkey%5D))%20%7B%0A%20%20%20%20%20%20defineProperty(globals.Reflect%2C%20key%2C%20shim)%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20var%20acceptsPrimitives%20%3D%20valueOrFalseIfThrows(function%20()%20%7B%0A%20%20%20%20%20%20%20%20globals.Reflect%5Bkey%5D(1)%3B%0A%20%20%20%20%20%20%20%20globals.Reflect%5Bkey%5D(NaN)%3B%0A%20%20%20%20%20%20%20%20globals.Reflect%5Bkey%5D(true)%3B%0A%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20if%20(acceptsPrimitives)%20%7B%0A%20%20%20%20%20%20%20%20overrideNative(globals.Reflect%2C%20key%2C%20shim)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%20%20Object.keys(ReflectShims).forEach(function%20(key)%20%7B%0A%20%20%20%20defineOrOverrideReflectProperty(key%2C%20ReflectShims%5Bkey%5D)%3B%0A%20%20%7D)%3B%0A%20%20if%20(functionsHaveNames%20%26%26%20globals.Reflect.getPrototypeOf.name%20!%3D%3D%20'getPrototypeOf')%20%7B%0A%20%20%20%20var%20originalReflectGetProto%20%3D%20globals.Reflect.getPrototypeOf%3B%0A%20%20%20%20overrideNative(globals.Reflect%2C%20'getPrototypeOf'%2C%20function%20getPrototypeOf(target)%20%7B%0A%20%20%20%20%20%20return%20_call(originalReflectGetProto%2C%20globals.Reflect%2C%20target)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%20%20if%20(globals.Reflect.setPrototypeOf)%20%7B%0A%20%20%20%20if%20(valueOrFalseIfThrows(function%20()%20%7B%0A%20%20%20%20%20%20globals.Reflect.setPrototypeOf(1%2C%20%7B%7D)%3B%0A%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%7D))%20%7B%0A%20%20%20%20%20%20overrideNative(globals.Reflect%2C%20'setPrototypeOf'%2C%20ReflectShims.setPrototypeOf)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20if%20(globals.Reflect.defineProperty)%20%7B%0A%20%20%20%20if%20(!valueOrFalseIfThrows(function%20()%20%7B%0A%20%20%20%20%20%20var%20basic%20%3D%20!globals.Reflect.defineProperty(1%2C%20'test'%2C%20%7B%20value%3A%201%20%7D)%3B%0A%20%20%20%20%20%20%2F%2F%20%22extensible%22%20fails%20on%20Edge%200.12%0A%20%20%20%20%20%20var%20extensible%20%3D%20typeof%20Object.preventExtensions%20!%3D%3D%20'function'%20%7C%7C%20!globals.Reflect.defineProperty(Object.preventExtensions(%7B%7D)%2C%20'test'%2C%20%7B%7D)%3B%0A%20%20%20%20%20%20return%20basic%20%26%26%20extensible%3B%0A%20%20%20%20%7D))%20%7B%0A%20%20%20%20%20%20overrideNative(globals.Reflect%2C%20'defineProperty'%2C%20ReflectShims.defineProperty)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20if%20(globals.Reflect.construct)%20%7B%0A%20%20%20%20if%20(!valueOrFalseIfThrows(function%20()%20%7B%0A%20%20%20%20%20%20var%20F%20%3D%20function%20F()%20%7B%7D%3B%0A%20%20%20%20%20%20return%20globals.Reflect.construct(function%20()%20%7B%7D%2C%20%5B%5D%2C%20F)%20instanceof%20F%3B%0A%20%20%20%20%7D))%20%7B%0A%20%20%20%20%20%20overrideNative(globals.Reflect%2C%20'construct'%2C%20ReflectShims.construct)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%0A%20%20if%20(String(new%20Date(NaN))%20!%3D%3D%20'Invalid%20Date')%20%7B%0A%20%20%20%20var%20dateToString%20%3D%20Date.prototype.toString%3B%0A%20%20%20%20var%20shimmedDateToString%20%3D%20function%20toString()%20%7B%0A%20%20%20%20%20%20var%20valueOf%20%3D%20%2Bthis%3B%0A%20%20%20%20%20%20if%20(valueOf%20!%3D%3D%20valueOf)%20%7B%0A%20%20%20%20%20%20%20%20return%20'Invalid%20Date'%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20_call(dateToString%2C%20this)%3B%0A%20%20%20%20%7D%3B%0A%20%20%20%20overrideNative(Date.prototype%2C%20'toString'%2C%20shimmedDateToString)%3B%0A%20%20%7D%0A%0A%20%20%2F%2F%20Annex%20B%20HTML%20methods%0A%20%20%2F%2F%20https%3A%2F%2Fpeople.mozilla.org%2F~jorendorff%2Fes6-draft.html%23sec-additional-properties-of-the-string.prototype-object%0A%20%20var%20stringHTMLshims%20%3D%20%7B%0A%20%20%20%20anchor%3A%20function%20anchor(name)%20%7B%20return%20ES.CreateHTML(this%2C%20'a'%2C%20'name'%2C%20name)%3B%20%7D%2C%0A%20%20%20%20big%3A%20function%20big()%20%7B%20return%20ES.CreateHTML(this%2C%20'big'%2C%20''%2C%20'')%3B%20%7D%2C%0A%20%20%20%20blink%3A%20function%20blink()%20%7B%20return%20ES.CreateHTML(this%2C%20'blink'%2C%20''%2C%20'')%3B%20%7D%2C%0A%20%20%20%20bold%3A%20function%20bold()%20%7B%20return%20ES.CreateHTML(this%2C%20'b'%2C%20''%2C%20'')%3B%20%7D%2C%0A%20%20%20%20fixed%3A%20function%20fixed()%20%7B%20return%20ES.CreateHTML(this%2C%20'tt'%2C%20''%2C%20'')%3B%20%7D%2C%0A%20%20%20%20fontcolor%3A%20function%20fontcolor(color)%20%7B%20return%20ES.CreateHTML(this%2C%20'font'%2C%20'color'%2C%20color)%3B%20%7D%2C%0A%20%20%20%20fontsize%3A%20function%20fontsize(size)%20%7B%20return%20ES.CreateHTML(this%2C%20'font'%2C%20'size'%2C%20size)%3B%20%7D%2C%0A%20%20%20%20italics%3A%20function%20italics()%20%7B%20return%20ES.CreateHTML(this%2C%20'i'%2C%20''%2C%20'')%3B%20%7D%2C%0A%20%20%20%20link%3A%20function%20link(url)%20%7B%20return%20ES.CreateHTML(this%2C%20'a'%2C%20'href'%2C%20url)%3B%20%7D%2C%0A%20%20%20%20small%3A%20function%20small()%20%7B%20return%20ES.CreateHTML(this%2C%20'small'%2C%20''%2C%20'')%3B%20%7D%2C%0A%20%20%20%20strike%3A%20function%20strike()%20%7B%20return%20ES.CreateHTML(this%2C%20'strike'%2C%20''%2C%20'')%3B%20%7D%2C%0A%20%20%20%20sub%3A%20function%20sub()%20%7B%20return%20ES.CreateHTML(this%2C%20'sub'%2C%20''%2C%20'')%3B%20%7D%2C%0A%20%20%20%20sup%3A%20function%20sub()%20%7B%20return%20ES.CreateHTML(this%2C%20'sup'%2C%20''%2C%20'')%3B%20%7D%0A%20%20%7D%3B%0A%20%20_forEach(Object.keys(stringHTMLshims)%2C%20function%20(key)%20%7B%0A%20%20%20%20var%20method%20%3D%20String.prototype%5Bkey%5D%3B%0A%20%20%20%20var%20shouldOverwrite%20%3D%20false%3B%0A%20%20%20%20if%20(ES.IsCallable(method))%20%7B%0A%20%20%20%20%20%20var%20output%20%3D%20_call(method%2C%20''%2C%20'%20%22%20')%3B%0A%20%20%20%20%20%20var%20quotesCount%20%3D%20_concat(%5B%5D%2C%20output.match(%2F%22%2Fg)).length%3B%0A%20%20%20%20%20%20shouldOverwrite%20%3D%20output%20!%3D%3D%20output.toLowerCase()%20%7C%7C%20quotesCount%20%3E%202%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20shouldOverwrite%20%3D%20true%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(shouldOverwrite)%20%7B%0A%20%20%20%20%20%20overrideNative(String.prototype%2C%20key%2C%20stringHTMLshims%5Bkey%5D)%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%0A%20%20var%20JSONstringifiesSymbols%20%3D%20(function%20()%20%7B%0A%20%20%20%20%2F%2F%20Microsoft%20Edge%20v0.12%20stringifies%20Symbols%20incorrectly%0A%20%20%20%20if%20(!Type.symbol(Symbol.iterator))%20%7B%20return%20false%3B%20%7D%20%2F%2F%20Symbols%20are%20not%20supported%0A%20%20%20%20var%20stringify%20%3D%20typeof%20JSON%20%3D%3D%3D%20'object'%20%26%26%20typeof%20JSON.stringify%20%3D%3D%3D%20'function'%20%3F%20JSON.stringify%20%3A%20null%3B%0A%20%20%20%20if%20(!stringify)%20%7B%20return%20false%3B%20%7D%20%2F%2F%20JSON.stringify%20is%20not%20supported%0A%20%20%20%20if%20(typeof%20stringify(Symbol())%20!%3D%3D%20'undefined')%20%7B%20return%20true%3B%20%7D%20%2F%2F%20Symbols%20should%20become%20%60undefined%60%0A%20%20%20%20if%20(stringify(%5BSymbol()%5D)%20!%3D%3D%20'%5Bnull%5D')%20%7B%20return%20true%3B%20%7D%20%2F%2F%20Symbols%20in%20arrays%20should%20become%20%60null%60%0A%20%20%20%20var%20obj%20%3D%20%7B%20a%3A%20Symbol()%20%7D%3B%0A%20%20%20%20obj%5BSymbol()%5D%20%3D%20true%3B%0A%20%20%20%20if%20(stringify(obj)%20!%3D%3D%20'%7B%7D')%20%7B%20return%20true%3B%20%7D%20%2F%2F%20Symbol-valued%20keys%20*and*%20Symbol-valued%20properties%20should%20be%20omitted%0A%20%20%20%20return%20false%3B%0A%20%20%7D())%3B%0A%20%20var%20JSONstringifyAcceptsObjectSymbol%20%3D%20valueOrFalseIfThrows(function%20()%20%7B%0A%20%20%20%20%2F%2F%20Chrome%2045%20throws%20on%20stringifying%20object%20symbols%0A%20%20%20%20if%20(!Type.symbol(Symbol.iterator))%20%7B%20return%20true%3B%20%7D%20%2F%2F%20Symbols%20are%20not%20supported%0A%20%20%20%20return%20JSON.stringify(Object(Symbol()))%20%3D%3D%3D%20'%7B%7D'%20%26%26%20JSON.stringify(%5BObject(Symbol())%5D)%20%3D%3D%3D%20'%5B%7B%7D%5D'%3B%0A%20%20%7D)%3B%0A%20%20if%20(JSONstringifiesSymbols%20%7C%7C%20!JSONstringifyAcceptsObjectSymbol)%20%7B%0A%20%20%20%20var%20origStringify%20%3D%20JSON.stringify%3B%0A%20%20%20%20overrideNative(JSON%2C%20'stringify'%2C%20function%20stringify(value)%20%7B%0A%20%20%20%20%20%20if%20(typeof%20value%20%3D%3D%3D%20'symbol')%20%7B%20return%3B%20%7D%0A%20%20%20%20%20%20var%20replacer%3B%0A%20%20%20%20%20%20if%20(arguments.length%20%3E%201)%20%7B%0A%20%20%20%20%20%20%20%20replacer%20%3D%20arguments%5B1%5D%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20var%20args%20%3D%20%5Bvalue%5D%3B%0A%20%20%20%20%20%20if%20(!isArray(replacer))%20%7B%0A%20%20%20%20%20%20%20%20var%20replaceFn%20%3D%20ES.IsCallable(replacer)%20%3F%20replacer%20%3A%20null%3B%0A%20%20%20%20%20%20%20%20var%20wrappedReplacer%20%3D%20function%20(key%2C%20val)%20%7B%0A%20%20%20%20%20%20%20%20%20%20var%20parsedValue%20%3D%20replacer%20%3F%20_call(replacer%2C%20this%2C%20key%2C%20val)%20%3A%20val%3B%0A%20%20%20%20%20%20%20%20%20%20if%20(typeof%20parsedValue%20!%3D%3D%20'symbol')%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(Type.symbol(parsedValue))%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20assignTo(%7B%7D)(parsedValue)%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%20return%20parsedValue%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%3B%0A%20%20%20%20%20%20%20%20args.push(wrappedReplacer)%3B%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%2F%2F%20create%20wrapped%20replacer%20that%20handles%20an%20array%20replacer%3F%0A%20%20%20%20%20%20%20%20args.push(replacer)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(arguments.length%20%3E%202)%20%7B%0A%20%20%20%20%20%20%20%20args.push(arguments%5B2%5D)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20return%20origStringify.apply(this%2C%20args)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%0A%20%20return%20globals%3B%0A%7D))%3B%0A%0A%7D).call(this%2Crequire('_process')%2Ctypeof%20global%20!%3D%3D%20%22undefined%22%20%3F%20global%20%3A%20typeof%20self%20!%3D%3D%20%22undefined%22%20%3F%20self%20%3A%20typeof%20window%20!%3D%3D%20%22undefined%22%20%3F%20window%20%3A%20%7B%7D)%0A%0A%7D%2C%7B%22_process%22%3A2%7D%5D%2C2%3A%5Bfunction(require%2Cmodule%2Cexports)%7B%0A%2F%2F%20shim%20for%20using%20process%20in%20browser%0A%0Avar%20process%20%3D%20module.exports%20%3D%20%7B%7D%3B%0Avar%20queue%20%3D%20%5B%5D%3B%0Avar%20draining%20%3D%20false%3B%0Avar%20currentQueue%3B%0Avar%20queueIndex%20%3D%20-1%3B%0A%0Afunction%20cleanUpNextTick()%20%7B%0A%20%20%20%20draining%20%3D%20false%3B%0A%20%20%20%20if%20(currentQueue.length)%20%7B%0A%20%20%20%20%20%20%20%20queue%20%3D%20currentQueue.concat(queue)%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20queueIndex%20%3D%20-1%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(queue.length)%20%7B%0A%20%20%20%20%20%20%20%20drainQueue()%3B%0A%20%20%20%20%7D%0A%7D%0A%0Afunction%20drainQueue()%20%7B%0A%20%20%20%20if%20(draining)%20%7B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%20%20%20%20var%20timeout%20%3D%20setTimeout(cleanUpNextTick)%3B%0A%20%20%20%20draining%20%3D%20true%3B%0A%0A%20%20%20%20var%20len%20%3D%20queue.length%3B%0A%20%20%20%20while(len)%20%7B%0A%20%20%20%20%20%20%20%20currentQueue%20%3D%20queue%3B%0A%20%20%20%20%20%20%20%20queue%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20%20%20while%20(%2B%2BqueueIndex%20%3C%20len)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(currentQueue)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20currentQueue%5BqueueIndex%5D.run()%3B%0A%20%20%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%20queueIndex%20%3D%20-1%3B%0A%20%20%20%20%20%20%20%20len%20%3D%20queue.length%3B%0A%20%20%20%20%7D%0A%20%20%20%20currentQueue%20%3D%20null%3B%0A%20%20%20%20draining%20%3D%20false%3B%0A%20%20%20%20clearTimeout(timeout)%3B%0A%7D%0A%0Aprocess.nextTick%20%3D%20function%20(fun)%20%7B%0A%20%20%20%20var%20args%20%3D%20new%20Array(arguments.length%20-%201)%3B%0A%20%20%20%20if%20(arguments.length%20%3E%201)%20%7B%0A%20%20%20%20%20%20%20%20for%20(var%20i%20%3D%201%3B%20i%20%3C%20arguments.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20args%5Bi%20-%201%5D%20%3D%20arguments%5Bi%5D%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20queue.push(new%20Item(fun%2C%20args))%3B%0A%20%20%20%20if%20(queue.length%20%3D%3D%3D%201%20%26%26%20!draining)%20%7B%0A%20%20%20%20%20%20%20%20setTimeout(drainQueue%2C%200)%3B%0A%20%20%20%20%7D%0A%7D%3B%0A%0A%2F%2F%20v8%20likes%20predictible%20objects%0Afunction%20Item(fun%2C%20array)%20%7B%0A%20%20%20%20this.fun%20%3D%20fun%3B%0A%20%20%20%20this.array%20%3D%20array%3B%0A%7D%0AItem.prototype.run%20%3D%20function%20()%20%7B%0A%20%20%20%20this.fun.apply(null%2C%20this.array)%3B%0A%7D%3B%0Aprocess.title%20%3D%20'browser'%3B%0Aprocess.browser%20%3D%20true%3B%0Aprocess.env%20%3D%20%7B%7D%3B%0Aprocess.argv%20%3D%20%5B%5D%3B%0Aprocess.version%20%3D%20''%3B%20%2F%2F%20empty%20string%20to%20avoid%20regexp%20issues%0Aprocess.versions%20%3D%20%7B%7D%3B%0A%0Afunction%20noop()%20%7B%7D%0A%0Aprocess.on%20%3D%20noop%3B%0Aprocess.addListener%20%3D%20noop%3B%0Aprocess.once%20%3D%20noop%3B%0Aprocess.off%20%3D%20noop%3B%0Aprocess.removeListener%20%3D%20noop%3B%0Aprocess.removeAllListeners%20%3D%20noop%3B%0Aprocess.emit%20%3D%20noop%3B%0A%0Aprocess.binding%20%3D%20function%20(name)%20%7B%0A%20%20%20%20throw%20new%20Error('process.binding%20is%20not%20supported')%3B%0A%7D%3B%0A%0Aprocess.cwd%20%3D%20function%20()%20%7B%20return%20'%2F'%20%7D%3B%0Aprocess.chdir%20%3D%20function%20(dir)%20%7B%0A%20%20%20%20throw%20new%20Error('process.chdir%20is%20not%20supported')%3B%0A%7D%3B%0Aprocess.umask%20%3D%20function()%20%7B%20return%200%3B%20%7D%3B%0A%0A%7D%2C%7B%7D%5D%2C3%3A%5Bfunction(require%2Cmodule%2Cexports)%7B%0A%22use%20strict%22%3Brequire(%22es6-shim%22)%3Bvar%20builders%3Dnew%20Map%3Bbuilders.set(%22default%22%2Cfunction(e%2Cr)%7Bvar%20t%3Ddocument.createElement(e.type)%3Bfor(var%20i%20in%20e.properties)t%5Bi%5D%3De.properties%5Bi%5D%3Bif(e.children)for(var%20n%3D0%3Bn%3Ce.children.length%3Bn%2B%2B)%7Bvar%20s%3Dr.create(e.children%5Bn%5D)%3Bt.appendChild(s)%7Dreturn%20t%7D)%2CPolymer(%7Bis%3A%22mode-element%22%2Cregister%3Afunction(e%2Cr)%7Bbuilders.set(e%2Cr)%7D%2Ccreate%3Afunction(e)%7Bvar%20r%3Dvoid%200%3Breturn(r%3Dbuilders.has(e.type)%3Fbuilders.get(e.type)%3Abuilders.get(%22default%22))(e%2Cthis)%7D%7D)%3B%0A%0A%7D%2C%7B%22es6-shim%22%3A1%7D%5D%7D%2C%7B%7D%2C%5B3%5D)%0A%2F%2F%23%20sourceMappingURL%3Dindex.js.map%0A%0A%2F%2F%23%20sourceURL%3Dhttp%3A%2F%2Ffileserver.glam.com%2Fwebcomponents%2Flatest%2Fmode-core%2Fmode-core.html-3.js%0A
7 ms
javascript;charset=utf-8,%0A%0A%20%20Polymer(%7B%0A%0A%20%20%20%20is%3A%20'mode-link'%2C%0A%0A%20%20%20%20extends%3A%20'a'%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%20event%20value%20passed%20to%20%60mode-metrics%60%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20trackingId%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''%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%20ctPrefix%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''%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*%20The%20event%20name%20passed%20to%20%60mode-metrics%60%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20trackingName%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'exit'%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%20set%20will%20open%20a%20new%20window%20instead%20of%20a%20tab%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20openWindow%3A%20Boolean%2C%0A%0A%20%20%20%20%20%20%2F**%0A%20%20%20%20%20%20%20*%20Options%20when%20opening%20a%20window.%0A%20%20%20%20%20%20%20*%20Same%20as%20for%20%5Bwindow.open%5D(https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FAPI%2FWindow%2Fopen)%0A%20%20%20%20%20%20%20*%2F%0A%20%20%20%20%20%20windowOpts%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'width%3D800%2Cheight%3D600'%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*%20The%20%60mode-counter%60%20event%20is%20fired%20whenever%20the%20element%20is%20clicked.%0A%20%20%20%20%20*%20This%20will%20be%20picked%20up%20by%20a%20parent%20%60%60%3Cmode-metrics%3E%60%60%20element%0A%20%20%20%20%20*%0A%20%20%20%20%20*%20%40event%20mode-counter%0A%20%20%20%20%20*%20%40detail%20%7B%7Bname%3A%20String%2C%20value%3A%20String%7D%7D%0A%20%20%20%20%20*%2F%0A%0A%20%20%20%20listeners%3A%20%7B%0A%20%20%20%20%20%20'tap'%3A%20'_onTap'%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20ready%3A%20function()%20%7B%0A%20%20%20%20%20%20this.addEventListener('click'%2C%20function(ev)%20%7B%0A%20%20%20%20%20%20%20%20ev.preventDefault()%3B%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20_onTap%3A%20function(e)%20%7B%0A%20%20%20%20%20%20if(this.openWindow)%20%7B%0A%20%20%20%20%20%20%20%20window.open(this.ctPrefix%2Bthis.href%2C%20%22%22%2C%20this.windowOpts)%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20window.open(this.ctPrefix%2Bthis.href%2C%20%22_blank%22)%0A%20%20%20%20%20%20%7D%0A%09%09%09this.fire('mode-counter'%2C%20%7Bname%3A%20this.trackingName%2C%20value%3A%20this.trackingId%7D)%3B%0A%20%20%20%20%7D%0A%0A%20%20%7D)%3B%0A%0A%0A%2F%2F%23%20sourceURL%3Dhttp%3A%2F%2Ffileserver.glam.com%2Fwebcomponents%2Flatest%2Fmode-core%2Fmode-core.html-4.js%0A
8 ms
lifeisbutadish.com 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
<frame> or <iframe> elements do not have a title
Links do not have a discernible name
lifeisbutadish.com best practices score
Trust and Safety
Impact
Issue
Does not use HTTPS
Ensure CSP is effective against XSS attacks
General
Impact
Issue
Detected JavaScript libraries
Browser errors were logged to the console
Missing source maps for large first-party JavaScript
Issues were logged in the Issues panel in Chrome Devtools
lifeisbutadish.com SEO score
Crawling and Indexing
To appear in search results, crawlers need access to your app.
Impact
Issue
Links are not crawlable
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
Tap targets are not sized appropriately
EN
EN
UTF-8
Language claimed in HTML meta tag should match the language actually used on the web page. Otherwise Lifeisbutadish.com can be misinterpreted by Google and other search engines. Our service has detected that English is used on the page, and it matches the claimed language. Our system also found out that Lifeisbutadish.com 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.
lifeisbutadish.com
Open Graph description is not detected on the main page of Life Is But A Dish. 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: