OLD | NEW |
1 // Generated by dart2js, the Dart to JavaScript compiler. | 1 // Generated by dart2js, the Dart to JavaScript compiler. |
2 // The code supports the following hooks: | 2 (function($){function dart(){this.x=0}var A=new dart |
3 // dartPrint(message) - if this function is defined it is called | 3 delete A.x |
4 // instead of the Dart [print] method. | 4 var B=new dart |
5 // dartMainRunner(main) - if this function is defined, the Dart [main] | 5 delete B.x |
6 // method will not be invoked directly. | 6 var C=new dart |
7 // Instead, a closure that will invoke [main] is | 7 delete C.x |
8 // passed to [dartMainRunner]. | 8 var D=new dart |
9 (function($) { | 9 delete D.x |
10 var A = {}; | 10 var E=new dart |
11 delete A.x; | 11 delete E.x |
12 var B = {}; | 12 var F=new dart |
13 delete B.x; | 13 delete F.x |
14 var C = {}; | 14 var G=new dart |
15 delete C.x; | 15 delete G.x |
16 var D = {}; | 16 var H=new dart |
17 delete D.x; | 17 delete H.x |
18 var E = {}; | 18 var J=new dart |
19 delete E.x; | 19 delete J.x |
20 var F = {}; | 20 var K=new dart |
21 delete F.x; | 21 delete K.x |
22 var G = {}; | 22 var L=new dart |
23 delete G.x; | 23 delete L.x |
24 var H = {}; | 24 var M=new dart |
25 delete H.x; | 25 delete M.x |
26 var J = {}; | 26 var N=new dart |
27 delete J.x; | 27 delete N.x |
28 var K = {}; | 28 var O=new dart |
29 delete K.x; | 29 delete O.x |
30 var L = {}; | 30 var P=new dart |
31 delete L.x; | 31 delete P.x |
32 var M = {}; | 32 var Q=new dart |
33 delete M.x; | 33 delete Q.x |
34 var N = {}; | 34 var R=new dart |
35 delete N.x; | 35 delete R.x |
36 var O = {}; | 36 var S=new dart |
37 delete O.x; | 37 delete S.x |
38 var P = {}; | 38 var T=new dart |
39 delete P.x; | 39 delete T.x |
40 var Q = {}; | 40 var U=new dart |
41 delete Q.x; | 41 delete U.x |
42 var R = {}; | 42 var V=new dart |
43 delete R.x; | 43 delete V.x |
44 var S = {}; | 44 var W=new dart |
45 delete S.x; | 45 delete W.x |
46 var T = {}; | 46 var X=new dart |
47 delete T.x; | 47 delete X.x |
48 var U = {}; | 48 var Y=new dart |
49 delete U.x; | 49 delete Y.x |
50 var V = {}; | 50 var Z=new dart |
51 delete V.x; | 51 delete Z.x |
52 var W = {}; | 52 function I(){} |
53 delete W.x; | 53 init() |
54 var X = {}; | 54 $=I.p |
55 delete X.x; | 55 ;(function(a){"use strict" |
56 var Y = {}; | 56 function map(b){b={x:b} |
57 delete Y.x; | 57 delete b.x |
58 var Z = {}; | 58 return b}function processStatics(a3){for(var h in a3){if(!u.call(a3,h))continue |
59 delete Z.x; | 59 if(h==="^")continue |
60 function Isolate() {} | 60 var g=a3[h] |
61 init(); | 61 var f=h.substring(0,1) |
| 62 var e |
| 63 if(f==="+"){v[e]=h.substring(1) |
| 64 var d=a3[h] |
| 65 if(d>0)a3[e].$reflectable=d |
| 66 if(g&&g.length)init.typeInformation[e]=g}else if(f==="@"){h=h.substring(1) |
| 67 $[h]["@"]=g}else if(f==="*"){n[e].$defaultValues=g |
| 68 var c=a3.$methodsWithOptionalArguments |
| 69 if(!c){a3.$methodsWithOptionalArguments=c={}}c[h]=e}else if(typeof g==="function
"){n[e=h]=g |
| 70 i.push(h) |
| 71 init.globalFunctions[h]=g}else if(g.constructor===Array){addStubs(n,g,h,true,a3,
i)}else{e=h |
| 72 var b={} |
| 73 var a0 |
| 74 for(var a1 in g){if(!u.call(g,a1))continue |
| 75 f=a1.substring(0,1) |
| 76 if(a1==="static"){processStatics(init.statics[h]=g[a1])}else if(f==="+"){w[a0]=a
1.substring(1) |
| 77 var d=g[a1] |
| 78 if(d>0)g[a0].$reflectable=d}else if(f==="@"&&a1!=="@"){b[a1.substring(1)]["@"]=g
[a1]}else if(f==="*"){b[a0].$defaultValues=g[a1] |
| 79 var c=b.$methodsWithOptionalArguments |
| 80 if(!c){b.$methodsWithOptionalArguments=c={}}c[a1]=a0}else{var a2=g[a1] |
| 81 if(a1!=="^"&&a2!=null&&a2.constructor===Array&&a1!=="<>"){addStubs(b,a2,a1,false
,g,[])}else{b[a0=a1]=a2}}}$$[h]=[n,b] |
| 82 j.push(h)}}}function addStubs(b3,b4,b5,b6,b7,b8){var h,g=[b7[b5]=b3[b5]=h=b4[0]] |
| 83 h.$stubName=b5 |
| 84 b8.push(b5) |
| 85 for(var f=0;f<b4.length;f+=2){h=b4[f+1] |
| 86 if(typeof h!="function")break |
| 87 h.$stubName=b4[f+2] |
| 88 g.push(h) |
| 89 if(h.$stubName){b7[h.$stubName]=b3[h.$stubName]=h |
| 90 b8.push(h.$stubName)}}for(var e=0;e<g.length;f++,e++){g[e].$callName=b4[f+1]}var
d=b4[++f] |
| 91 b4=b4.slice(++f) |
| 92 var c=b4[0] |
| 93 var b=c>>1 |
| 94 var a0=(c&1)===1 |
| 95 var a1=c===3 |
| 96 var a2=c===1 |
| 97 var a3=b4[1] |
| 98 var a4=a3>>1 |
| 99 var a5=(a3&1)===1 |
| 100 var a6=b+a4!=g[0].length |
| 101 var a7=b4[2] |
| 102 var a8=2*a4+b+3 |
| 103 var a9=b4.length>a8 |
| 104 if(d){h=tearOff(g,b4,b6,b5,a6) |
| 105 b3[b5].$getter=h |
| 106 h.$getterStub=true |
| 107 if(b6)init.globalFunctions[b5]=h |
| 108 b7[d]=b3[d]=h |
| 109 g.push(h) |
| 110 if(d)b8.push(d) |
| 111 h.$stubName=d |
| 112 h.$callName=null |
| 113 if(a6)init.interceptedNames[d]=true}if(a9){for(var e=0;e<g.length;e++){g[e].$ref
lectable=1 |
| 114 g[e].$reflectionInfo=b4}var b0=b6?init.mangledGlobalNames:init.mangledNames |
| 115 var b1=b4[a8] |
| 116 var b2=b1 |
| 117 if(d)b0[d]=b2 |
| 118 if(a1){b2+="="}else if(!a2){b2+=":"+b+":"+a4}b0[b5]=b2 |
| 119 g[0].$reflectionName=b2 |
| 120 g[0].$metadataIndex=a8+1 |
| 121 if(a4)b3[b1+"*"]=g[0]}}function tearOffGetterNoCsp(b,c,d,e){return e?new Functio
n("funcs","reflectionInfo","name","H","c","return function tearOff_"+d+z+++"(x)
{"+"if (c === null) c = H.qm("+"this, funcs, reflectionInfo, false, [x], name);"
+"return new c(this, funcs[0], x, name);"+"}")(b,c,d,H,null):new Function("funcs
","reflectionInfo","name","H","c","return function tearOff_"+d+z+++"() {"+"if (c
=== null) c = H.qm("+"this, funcs, reflectionInfo, false, [], name);"+"return n
ew c(this, funcs[0], null, name);"+"}")(b,c,d,H,null)}function tearOffGetterCsp(
b,c,d,e){var h=null |
| 122 return e?function(f){if(h===null)h=H.qm(this,b,c,false,[f],d) |
| 123 return new h(this,b[0],f,d)}:function(){if(h===null)h=H.qm(this,b,c,false,[],d) |
| 124 return new h(this,b[0],null,d)}}function tearOff(b,c,d,e,f){var h |
| 125 return d?function(){if(h===void 0)h=H.qm(this,b,c,true,[],e).prototype |
| 126 return h}:y(b,c,e,f)}var z=0 |
| 127 var y=typeof dart_precompiled=="function"?tearOffGetterCsp:tearOffGetterNoCsp |
| 128 if(!init.libraries)init.libraries=[] |
| 129 if(!init.mangledNames)init.mangledNames=map() |
| 130 if(!init.mangledGlobalNames)init.mangledGlobalNames=map() |
| 131 if(!init.statics)init.statics=map() |
| 132 if(!init.typeInformation)init.typeInformation=map() |
| 133 if(!init.globalFunctions)init.globalFunctions=map() |
| 134 if(!init.interceptedNames)init.interceptedNames=map() |
| 135 var x=init.libraries |
| 136 var w=init.mangledNames |
| 137 var v=init.mangledGlobalNames |
| 138 var u=Object.prototype.hasOwnProperty |
| 139 var t=a.length |
| 140 for(var s=0;s<t;s++){var r=a[s] |
| 141 var q=r[0] |
| 142 var p=r[1] |
| 143 var o=r[2] |
| 144 var n=r[3] |
| 145 var m=r[4] |
| 146 var l=!!r[5] |
| 147 var k=m&&m["^"] |
| 148 var j=[] |
| 149 var i=[] |
| 150 processStatics(m) |
| 151 x.push([q,p,j,i,o,k,l,n])}})([["","file:///Users/kathyw/Spot/one-hour-codelab/we
b/1-blankbadge/piratebadge.dart",,A,{ |
| 152 "^":"", |
| 153 E2:function(){}},1],]) |
| 154 $.libraries_to_load = {} |
| 155 $.yj=0 |
| 156 $.mJ=null |
| 157 $.P4=null |
62 | 158 |
63 $ = Isolate.$isolateProperties; | 159 init.functionAliases={} |
64 // Method closures | 160 init.metadata=[];$=null |
65 (function (reflectionData) { | 161 I = I.$finishIsolateConstructor(I) |
66 function map(x){x={x:x};delete x.x;return x} | 162 $=new I() |
67 if (!init.libraries) init.libraries = []; | |
68 if (!init.mangledNames) init.mangledNames = map(); | |
69 if (!init.mangledGlobalNames) init.mangledGlobalNames = map(); | |
70 if (!init.statics) init.statics = map(); | |
71 if (!init.interfaces) init.interfaces = map(); | |
72 if (!init.globalFunctions) init.globalFunctions = map(); | |
73 var libraries = init.libraries; | |
74 var mangledNames = init.mangledNames; | |
75 var mangledGlobalNames = init.mangledGlobalNames; | |
76 var hasOwnProperty = Object.prototype.hasOwnProperty; | |
77 var length = reflectionData.length; | |
78 for (var i = 0; i < length; i++) { | |
79 var data = reflectionData[i]; | |
80 var name = data[0]; | |
81 var uri = data[1]; | |
82 var metadata = data[2]; | |
83 var globalObject = data[3]; | |
84 var descriptor = data[4]; | |
85 var isRoot = !!data[5]; | |
86 var fields = descriptor && descriptor[""]; | |
87 var classes = []; | |
88 var functions = []; | |
89 function processStatics(descriptor) { | |
90 for (var property in descriptor) { | |
91 if (!hasOwnProperty.call(descriptor, property)) continue; | |
92 if (property === "") continue; | |
93 var element = descriptor[property]; | |
94 var firstChar = property.substring(0, 1); | |
95 var previousProperty; | |
96 if (firstChar === "+") { | |
97 mangledGlobalNames[previousProperty] = property.substring(1); | |
98 if (descriptor[property] == 1) descriptor[previousProperty].$reflectab
le = 1; | |
99 if (element && element.length) init.interfaces[previousProperty] = ele
ment; | |
100 } else if (firstChar === "@") { | |
101 property = property.substring(1); | |
102 $[property]["@"] = element; | |
103 } else if (firstChar === "*") { | |
104 globalObject[previousProperty].$defaultValues = element; | |
105 var optionalMethods = descriptor.$methodsWithOptionalArguments; | |
106 if (!optionalMethods) { | |
107 descriptor.$methodsWithOptionalArguments = optionalMethods = {} | |
108 } | |
109 optionalMethods[property] = previousProperty; | |
110 } else if (typeof element === "function") { | |
111 globalObject[previousProperty = property] = element; | |
112 functions.push(property); | |
113 init.globalFunctions[property] = element; | |
114 } else { | |
115 previousProperty = property; | |
116 var newDesc = {}; | |
117 var previousProp; | |
118 for (var prop in element) { | |
119 if (!hasOwnProperty.call(element, prop)) continue; | |
120 firstChar = prop.substring(0, 1); | |
121 if (prop === "static") { | |
122 processStatics(init.statics[property] = element[prop]); | |
123 } else if (firstChar === "+") { | |
124 mangledNames[previousProp] = prop.substring(1); | |
125 if (element[prop] == 1) element[previousProp].$reflectable = 1; | |
126 } else if (firstChar === "@" && prop !== "@") { | |
127 newDesc[prop.substring(1)]["@"] = element[prop]; | |
128 } else if (firstChar === "*") { | |
129 newDesc[previousProp].$defaultValues = element[prop]; | |
130 var optionalMethods = newDesc.$methodsWithOptionalArguments; | |
131 if (!optionalMethods) { | |
132 newDesc.$methodsWithOptionalArguments = optionalMethods={} | |
133 } | |
134 optionalMethods[prop] = previousProp; | |
135 } else { | |
136 newDesc[previousProp = prop] = element[prop]; | |
137 } | |
138 } | |
139 $$[property] = [globalObject, newDesc]; | |
140 classes.push(property); | |
141 } | |
142 } | |
143 } | |
144 processStatics(descriptor); | |
145 libraries.push([name, uri, classes, functions, metadata, fields, isRoot, | |
146 globalObject]); | |
147 } | |
148 })([ | |
149 ["", "piratebadge.dart", , A, { | |
150 main: function() { | |
151 }}, | |
152 1], | |
153 ]); | |
154 // Static function getters | |
155 // Runtime type support | |
156 // getInterceptor methods | |
157 $.initNativeDispatchFlag = null; | |
158 | |
159 init.functionAliases = {}; | |
160 ; | |
161 init.metadata = []; | |
162 $ = null; | |
163 Isolate = Isolate.$finishIsolateConstructor(Isolate); | |
164 $ = new Isolate(); | |
165 function convertToFastObject(properties) { | 163 function convertToFastObject(properties) { |
166 function MyClass() {}; | 164 function MyClass() {}; |
167 MyClass.prototype = properties; | 165 MyClass.prototype = properties; |
168 new MyClass(); | 166 new MyClass(); |
169 return properties; | 167 return properties; |
170 } | 168 } |
171 A = convertToFastObject(A); | 169 A = convertToFastObject(A) |
172 B = convertToFastObject(B); | 170 B = convertToFastObject(B) |
173 C = convertToFastObject(C); | 171 C = convertToFastObject(C) |
174 D = convertToFastObject(D); | 172 D = convertToFastObject(D) |
175 E = convertToFastObject(E); | 173 E = convertToFastObject(E) |
176 F = convertToFastObject(F); | 174 F = convertToFastObject(F) |
177 G = convertToFastObject(G); | 175 G = convertToFastObject(G) |
178 H = convertToFastObject(H); | 176 H = convertToFastObject(H) |
179 J = convertToFastObject(J); | 177 J = convertToFastObject(J) |
180 K = convertToFastObject(K); | 178 K = convertToFastObject(K) |
181 L = convertToFastObject(L); | 179 L = convertToFastObject(L) |
182 M = convertToFastObject(M); | 180 M = convertToFastObject(M) |
183 N = convertToFastObject(N); | 181 N = convertToFastObject(N) |
184 O = convertToFastObject(O); | 182 O = convertToFastObject(O) |
185 P = convertToFastObject(P); | 183 P = convertToFastObject(P) |
186 Q = convertToFastObject(Q); | 184 Q = convertToFastObject(Q) |
187 R = convertToFastObject(R); | 185 R = convertToFastObject(R) |
188 S = convertToFastObject(S); | 186 S = convertToFastObject(S) |
189 T = convertToFastObject(T); | 187 T = convertToFastObject(T) |
190 U = convertToFastObject(U); | 188 U = convertToFastObject(U) |
191 V = convertToFastObject(V); | 189 V = convertToFastObject(V) |
192 W = convertToFastObject(W); | 190 W = convertToFastObject(W) |
193 X = convertToFastObject(X); | 191 X = convertToFastObject(X) |
194 Y = convertToFastObject(Y); | 192 Y = convertToFastObject(Y) |
195 Z = convertToFastObject(Z); | 193 Z = convertToFastObject(Z) |
196 // BEGIN invoke [main]. | |
197 ;(function (callback) { | 194 ;(function (callback) { |
198 if (typeof document === "undefined") { | 195 if (typeof document === "undefined") { |
199 callback(null); | 196 callback(null); |
200 return; | 197 return; |
201 } | 198 } |
202 if (document.currentScript) { | 199 if (document.currentScript) { |
203 callback(document.currentScript); | 200 callback(document.currentScript); |
204 return; | 201 return; |
205 } | 202 } |
206 | 203 |
207 var scripts = document.scripts; | 204 var scripts = document.scripts; |
208 function onLoad(event) { | 205 function onLoad(event) { |
209 for (var i = 0; i < scripts.length; ++i) { | 206 for (var i = 0; i < scripts.length; ++i) { |
210 scripts[i].removeEventListener("load", onLoad, false); | 207 scripts[i].removeEventListener("load", onLoad, false); |
211 } | 208 } |
212 callback(event.target); | 209 callback(event.target); |
213 } | 210 } |
214 for (var i = 0; i < scripts.length; ++i) { | 211 for (var i = 0; i < scripts.length; ++i) { |
215 scripts[i].addEventListener("load", onLoad, false); | 212 scripts[i].addEventListener("load", onLoad, false); |
216 } | 213 } |
217 })(function(currentScript) { | 214 })(function(currentScript) { |
218 init.currentScript = currentScript; | 215 init.currentScript = currentScript; |
219 | 216 |
220 if (typeof dartMainRunner === "function") { | 217 if (typeof dartMainRunner === "function") { |
221 dartMainRunner(function() { A.main(); }); | 218 dartMainRunner(A.E2, []); |
222 } else { | 219 } else { |
223 A.main(); | 220 A.E2([]); |
224 } | 221 } |
225 }); | 222 }) |
226 // END invoke [main]. | 223 function init(){I.p={} |
227 function init() { | 224 I.$lazy=function(a,b,c,d,e){var z={} |
228 Isolate.$isolateProperties = {}; | 225 var y={} |
229 Isolate.$lazy = function(prototype, staticName, fieldName, getterName, lazyVal
ue) { | 226 a[c]=z |
230 var sentinelUndefined = {}; | 227 a[d]=function(){var x=$[c] |
231 var sentinelInProgress = {}; | 228 try{if(x===z){$[c]=y |
232 prototype[fieldName] = sentinelUndefined; | 229 try{x=$[c]=e()}finally{if(x===z)if($[c]===y)$[c]=null}}else{if(x===y)H.eQ(b)}ret
urn x}finally{$[d]=function(){return this[c]}}}} |
233 prototype[getterName] = function() { | 230 I.$finishIsolateConstructor=function(a){var z=a.p |
234 var result = $[fieldName]; | 231 function Isolate(){var y=Object.prototype.hasOwnProperty |
235 try { | 232 for(var x in z)if(y.call(z,x))this[x]=z[x] |
236 if (result === sentinelUndefined) { | 233 function ForceEfficientMap(){}ForceEfficientMap.prototype=this |
237 $[fieldName] = sentinelInProgress; | 234 new ForceEfficientMap()}Isolate.prototype=a.prototype |
238 try { | 235 Isolate.prototype.constructor=Isolate |
239 result = $[fieldName] = lazyValue(); | 236 Isolate.p=z |
240 } finally { | 237 return Isolate}} |
241 if (result === sentinelUndefined) { | |
242 if ($[fieldName] === sentinelInProgress) { | |
243 $[fieldName] = null; | |
244 } | |
245 } | |
246 } | |
247 } else { | |
248 if (result === sentinelInProgress) | |
249 H.throwCyclicInit(staticName); | |
250 } | |
251 return result; | |
252 } finally { | |
253 $[getterName] = function() { | |
254 return this[fieldName]; | |
255 }; | |
256 } | |
257 }; | |
258 }; | |
259 Isolate.$finishIsolateConstructor = function(oldIsolate) { | |
260 var isolateProperties = oldIsolate.$isolateProperties; | |
261 function Isolate() { | |
262 var hasOwnProperty = Object.prototype.hasOwnProperty; | |
263 for (var staticName in isolateProperties) | |
264 if (hasOwnProperty.call(isolateProperties, staticName)) | |
265 this[staticName] = isolateProperties[staticName]; | |
266 function ForceEfficientMap() { | |
267 } | |
268 ForceEfficientMap.prototype = this; | |
269 new ForceEfficientMap(); | |
270 } | |
271 Isolate.prototype = oldIsolate.prototype; | |
272 Isolate.prototype.constructor = Isolate; | |
273 Isolate.$isolateProperties = isolateProperties; | |
274 return Isolate; | |
275 }; | |
276 } | |
277 })() | 238 })() |
278 | |
279 //# sourceMappingURL=piratebadge.dart.js.map | |
280 //@ sourceMappingURL=piratebadge.dart.js.map | |
OLD | NEW |