OLD | NEW |
| (Empty) |
1 // Generated by dart2js, the Dart to JavaScript compiler. | |
2 // The code supports the following hooks: | |
3 // dartPrint(message) - if this function is defined it is called | |
4 // instead of the Dart [print] method. | |
5 // dartMainRunner(main) - if this function is defined, the Dart [main] | |
6 // method will not be invoked directly. | |
7 // Instead, a closure that will invoke [main] is | |
8 // passed to [dartMainRunner]. | |
9 (function($) { | |
10 var A = {}; | |
11 delete A.x; | |
12 var B = {}; | |
13 delete B.x; | |
14 var C = {}; | |
15 delete C.x; | |
16 var D = {}; | |
17 delete D.x; | |
18 var E = {}; | |
19 delete E.x; | |
20 var F = {}; | |
21 delete F.x; | |
22 var G = {}; | |
23 delete G.x; | |
24 var H = {}; | |
25 delete H.x; | |
26 var J = {}; | |
27 delete J.x; | |
28 var K = {}; | |
29 delete K.x; | |
30 var L = {}; | |
31 delete L.x; | |
32 var M = {}; | |
33 delete M.x; | |
34 var N = {}; | |
35 delete N.x; | |
36 var O = {}; | |
37 delete O.x; | |
38 var P = {}; | |
39 delete P.x; | |
40 var Q = {}; | |
41 delete Q.x; | |
42 var R = {}; | |
43 delete R.x; | |
44 var S = {}; | |
45 delete S.x; | |
46 var T = {}; | |
47 delete T.x; | |
48 var U = {}; | |
49 delete U.x; | |
50 var V = {}; | |
51 delete V.x; | |
52 var W = {}; | |
53 delete W.x; | |
54 var X = {}; | |
55 delete X.x; | |
56 var Y = {}; | |
57 delete Y.x; | |
58 var Z = {}; | |
59 delete Z.x; | |
60 function Isolate() {} | |
61 init(); | |
62 | |
63 $ = Isolate.$isolateProperties; | |
64 var $$ = {}; | |
65 | |
66 // Native classes | |
67 // Method closures | |
68 $$.BoundClosure$i0 = [H, {"": "BoundClosure;_self,__js_helper$_target,_receiver,
__js_helper$_name", | |
69 call$0: function() { | |
70 return this.__js_helper$_target.call(this._self, this._receiver); | |
71 } | |
72 }]; | |
73 | |
74 $$.BoundClosure$1 = [H, {"": "BoundClosure;_self,__js_helper$_target,_receiver,_
_js_helper$_name", | |
75 call$1: function(p0) { | |
76 return this.__js_helper$_target.call(this._self, p0); | |
77 }, | |
78 $is_args1: true | |
79 }]; | |
80 | |
81 $$.BoundClosure$2 = [P, {"": "BoundClosure;_self,__js_helper$_target,_receiver,_
_js_helper$_name", | |
82 call$2: function(p0, p1) { | |
83 return this.__js_helper$_target.call(this._self, p0, p1); | |
84 }, | |
85 call$1: function(p0) { | |
86 return this.call$2(p0, null); | |
87 }, | |
88 $is_args2: true, | |
89 $is_args1: true | |
90 }]; | |
91 | |
92 $$.BoundClosure$0 = [P, {"": "BoundClosure;_self,__js_helper$_target,_receiver,_
_js_helper$_name", | |
93 call$0: function() { | |
94 return this.__js_helper$_target.call(this._self); | |
95 } | |
96 }]; | |
97 | |
98 $$.Closure$2 = [H, {"": "Closure;call$2,$name", $is_args2: true}]; | |
99 | |
100 $$.Closure$0 = [H, {"": "Closure;call$0,$name"}]; | |
101 | |
102 $$.Closure$7 = [H, {"": "Closure;call$7,$name"}]; | |
103 | |
104 $$.Closure$1 = [P, {"": "Closure;call$1,$name", $is_args1: true}]; | |
105 | |
106 $$.Closure$20 = [P, {"": "Closure;call$2,$name", | |
107 call$1: function(p0) { | |
108 return this.call$2(p0, null); | |
109 }, | |
110 $is_args2: true, | |
111 $is_args1: true | |
112 }]; | |
113 | |
114 (function (reflectionData) { | |
115 function map(x){x={x:x};delete x.x;return x} | |
116 if (!init.libraries) init.libraries = []; | |
117 if (!init.mangledNames) init.mangledNames = map(); | |
118 if (!init.mangledGlobalNames) init.mangledGlobalNames = map(); | |
119 if (!init.statics) init.statics = map(); | |
120 if (!init.typeInformation) init.typeInformation = map(); | |
121 if (!init.globalFunctions) init.globalFunctions = map(); | |
122 var libraries = init.libraries; | |
123 var mangledNames = init.mangledNames; | |
124 var mangledGlobalNames = init.mangledGlobalNames; | |
125 var hasOwnProperty = Object.prototype.hasOwnProperty; | |
126 var length = reflectionData.length; | |
127 for (var i = 0; i < length; i++) { | |
128 var data = reflectionData[i]; | |
129 var name = data[0]; | |
130 var uri = data[1]; | |
131 var metadata = data[2]; | |
132 var globalObject = data[3]; | |
133 var descriptor = data[4]; | |
134 var isRoot = !!data[5]; | |
135 var fields = descriptor && descriptor[""]; | |
136 var classes = []; | |
137 var functions = []; | |
138 function processStatics(descriptor) { | |
139 for (var property in descriptor) { | |
140 if (!hasOwnProperty.call(descriptor, property)) continue; | |
141 if (property === "") continue; | |
142 var element = descriptor[property]; | |
143 var firstChar = property.substring(0, 1); | |
144 var previousProperty; | |
145 if (firstChar === "+") { | |
146 mangledGlobalNames[previousProperty] = property.substring(1); | |
147 if (descriptor[property] == 1) descriptor[previousProperty].$reflectab
le = 1; | |
148 if (element && element.length) init.typeInformation[previousProperty]
= element; | |
149 } else if (firstChar === "@") { | |
150 property = property.substring(1); | |
151 $[property]["@"] = element; | |
152 } else if (firstChar === "*") { | |
153 globalObject[previousProperty].$defaultValues = element; | |
154 var optionalMethods = descriptor.$methodsWithOptionalArguments; | |
155 if (!optionalMethods) { | |
156 descriptor.$methodsWithOptionalArguments = optionalMethods = {} | |
157 } | |
158 optionalMethods[property] = previousProperty; | |
159 } else if (typeof element === "function") { | |
160 globalObject[previousProperty = property] = element; | |
161 functions.push(property); | |
162 init.globalFunctions[property] = element; | |
163 } else { | |
164 previousProperty = property; | |
165 var newDesc = {}; | |
166 var previousProp; | |
167 for (var prop in element) { | |
168 if (!hasOwnProperty.call(element, prop)) continue; | |
169 firstChar = prop.substring(0, 1); | |
170 if (prop === "static") { | |
171 processStatics(init.statics[property] = element[prop]); | |
172 } else if (firstChar === "+") { | |
173 mangledNames[previousProp] = prop.substring(1); | |
174 if (element[prop] == 1) element[previousProp].$reflectable = 1; | |
175 } else if (firstChar === "@" && prop !== "@") { | |
176 newDesc[prop.substring(1)]["@"] = element[prop]; | |
177 } else if (firstChar === "*") { | |
178 newDesc[previousProp].$defaultValues = element[prop]; | |
179 var optionalMethods = newDesc.$methodsWithOptionalArguments; | |
180 if (!optionalMethods) { | |
181 newDesc.$methodsWithOptionalArguments = optionalMethods={} | |
182 } | |
183 optionalMethods[prop] = previousProp; | |
184 } else { | |
185 newDesc[previousProp = prop] = element[prop]; | |
186 } | |
187 } | |
188 $$[property] = [globalObject, newDesc]; | |
189 classes.push(property); | |
190 } | |
191 } | |
192 } | |
193 processStatics(descriptor); | |
194 libraries.push([name, uri, classes, functions, metadata, fields, isRoot, | |
195 globalObject]); | |
196 } | |
197 })([ | |
198 ["_foreign_helper", "dart:_foreign_helper", , H, { | |
199 JS_CONST: {"": "Object;code"}}], | |
200 ["_interceptors", "dart:_interceptors", , J, { | |
201 getInterceptor: function(object) { | |
202 return void 0; | |
203 }, | |
204 | |
205 makeDispatchRecord: function(interceptor, proto, extension, indexability) { | |
206 return {i: interceptor, p: proto, e: extension, x: indexability}; | |
207 }, | |
208 | |
209 getNativeInterceptor: function(object) { | |
210 var record, proto, objectProto, interceptor; | |
211 record = object[init.dispatchPropertyName]; | |
212 if (record == null) | |
213 if ($.initNativeDispatchFlag == null) { | |
214 H.initNativeDispatch(); | |
215 record = object[init.dispatchPropertyName]; | |
216 } | |
217 if (record != null) { | |
218 proto = record.p; | |
219 if (false === proto) | |
220 return record.i; | |
221 if (true === proto) | |
222 return object; | |
223 objectProto = Object.getPrototypeOf(object); | |
224 if (proto === objectProto) | |
225 return record.i; | |
226 if (record.e === objectProto) | |
227 throw H.wrapException(P.UnimplementedError$("Return interceptor for " + H.
S(proto(object, record)))); | |
228 } | |
229 interceptor = H.lookupAndCacheInterceptor(object); | |
230 if (interceptor == null) | |
231 return C.UnknownJavaScriptObject_methods; | |
232 return interceptor; | |
233 }, | |
234 | |
235 Interceptor: {"": "Object;", | |
236 $eq: function(receiver, other) { | |
237 return receiver === other; | |
238 }, | |
239 get$hashCode: function(receiver) { | |
240 return H.Primitives_objectHashCode(receiver); | |
241 }, | |
242 toString$0: function(receiver) { | |
243 return H.Primitives_objectToString(receiver); | |
244 }, | |
245 "%": "CanvasGradient|CanvasPattern|DOMError|FileError|MediaError|MediaKeyError
|Navigator|NavigatorUserMediaError|PositionError|SQLError|SVGAnimatedLength|SVGA
nimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedString" | |
246 }, | |
247 | |
248 JSBool: {"": "bool/Interceptor;", | |
249 toString$0: function(receiver) { | |
250 return String(receiver); | |
251 }, | |
252 get$hashCode: function(receiver) { | |
253 return receiver ? 519018 : 218159; | |
254 }, | |
255 $isbool: true | |
256 }, | |
257 | |
258 JSNull: {"": "Interceptor;", | |
259 $eq: function(receiver, other) { | |
260 return null == other; | |
261 }, | |
262 toString$0: function(receiver) { | |
263 return "null"; | |
264 }, | |
265 get$hashCode: function(receiver) { | |
266 return 0; | |
267 } | |
268 }, | |
269 | |
270 JavaScriptObject: {"": "Interceptor;", | |
271 get$hashCode: function(_) { | |
272 return 0; | |
273 } | |
274 }, | |
275 | |
276 PlainJavaScriptObject: {"": "JavaScriptObject;"}, | |
277 | |
278 UnknownJavaScriptObject: {"": "JavaScriptObject;"}, | |
279 | |
280 JSArray: {"": "List/Interceptor;", | |
281 forEach$1: function(receiver, f) { | |
282 return H.IterableMixinWorkaround_forEach(receiver, f); | |
283 }, | |
284 elementAt$1: function(receiver, index) { | |
285 if (index < 0 || index >= receiver.length) | |
286 throw H.ioore(receiver, index); | |
287 return receiver[index]; | |
288 }, | |
289 toString$0: function(receiver) { | |
290 return H.IterableMixinWorkaround_toStringIterable(receiver, "[", "]"); | |
291 }, | |
292 get$iterator: function(receiver) { | |
293 return new H.ListIterator(receiver, receiver.length, 0, null); | |
294 }, | |
295 get$hashCode: function(receiver) { | |
296 return H.Primitives_objectHashCode(receiver); | |
297 }, | |
298 get$length: function(receiver) { | |
299 return receiver.length; | |
300 }, | |
301 $index: function(receiver, index) { | |
302 if (typeof index !== "number" || Math.floor(index) !== index) | |
303 throw H.wrapException(new P.ArgumentError(index)); | |
304 if (index >= receiver.length || index < 0) | |
305 throw H.wrapException(P.RangeError$value(index)); | |
306 return receiver[index]; | |
307 }, | |
308 $indexSet: function(receiver, index, value) { | |
309 if (!!receiver.immutable$list) | |
310 H.throwExpression(P.UnsupportedError$("indexed set")); | |
311 if (typeof index !== "number" || Math.floor(index) !== index) | |
312 throw H.wrapException(new P.ArgumentError(index)); | |
313 if (index >= receiver.length || index < 0) | |
314 throw H.wrapException(P.RangeError$value(index)); | |
315 receiver[index] = value; | |
316 }, | |
317 $isList: true, | |
318 $asList: null, | |
319 $isList: true, | |
320 $isEfficientLength: true | |
321 }, | |
322 | |
323 JSMutableArray: {"": "JSArray;", $isJSMutableArray: true, | |
324 $asJSArray: function() { | |
325 return [null]; | |
326 }, | |
327 $asList: function() { | |
328 return [null]; | |
329 } | |
330 }, | |
331 | |
332 JSFixedArray: {"": "JSMutableArray;"}, | |
333 | |
334 JSExtendableArray: {"": "JSMutableArray;"}, | |
335 | |
336 JSNumber: {"": "num/Interceptor;", | |
337 remainder$1: function(receiver, b) { | |
338 return receiver % b; | |
339 }, | |
340 toInt$0: function(receiver) { | |
341 var t1; | |
342 if (receiver >= -2147483648 && receiver <= 2147483647) | |
343 return receiver | 0; | |
344 if (isFinite(receiver)) { | |
345 t1 = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver); | |
346 return t1 + 0; | |
347 } | |
348 throw H.wrapException(P.UnsupportedError$('' + receiver)); | |
349 }, | |
350 toString$0: function(receiver) { | |
351 if (receiver === 0 && 1 / receiver < 0) | |
352 return "-0.0"; | |
353 else | |
354 return "" + receiver; | |
355 }, | |
356 get$hashCode: function(receiver) { | |
357 return receiver & 0x1FFFFFFF; | |
358 }, | |
359 $add: function(receiver, other) { | |
360 return receiver + other; | |
361 }, | |
362 $tdiv: function(receiver, other) { | |
363 if ((receiver | 0) === receiver && (other | 0) === other && 0 !== other && -
1 !== other) | |
364 return receiver / other | 0; | |
365 else | |
366 return this._slowTdiv$1(receiver, other); | |
367 }, | |
368 _slowTdiv$1: function(receiver, other) { | |
369 return this.toInt$0(receiver / other); | |
370 }, | |
371 $shr: function(receiver, other) { | |
372 if (other < 0) | |
373 throw H.wrapException(new P.ArgumentError(other)); | |
374 if (receiver > 0) { | |
375 if (other > 31) | |
376 return 0; | |
377 return receiver >>> other; | |
378 } | |
379 if (other > 31) | |
380 other = 31; | |
381 return receiver >> other >>> 0; | |
382 }, | |
383 $lt: function(receiver, other) { | |
384 if (typeof other !== "number") | |
385 throw H.wrapException(new P.ArgumentError(other)); | |
386 return receiver < other; | |
387 }, | |
388 $gt: function(receiver, other) { | |
389 if (typeof other !== "number") | |
390 throw H.wrapException(new P.ArgumentError(other)); | |
391 return receiver > other; | |
392 }, | |
393 $ge: function(receiver, other) { | |
394 if (typeof other !== "number") | |
395 throw H.wrapException(new P.ArgumentError(other)); | |
396 return receiver >= other; | |
397 }, | |
398 $isnum: true, | |
399 static: { | |
400 "": "JSNumber__MIN_INT32,JSNumber__MAX_INT32", | |
401 } | |
402 | |
403 }, | |
404 | |
405 JSInt: {"": "int/JSNumber;", $isnum: true, $isint: true}, | |
406 | |
407 JSDouble: {"": "double/JSNumber;", $isnum: true}, | |
408 | |
409 JSString: {"": "String/Interceptor;", | |
410 codeUnitAt$1: function(receiver, index) { | |
411 if (typeof index !== "number" || Math.floor(index) !== index) | |
412 throw H.wrapException(P.ArgumentError$(index)); | |
413 if (index < 0) | |
414 throw H.wrapException(P.RangeError$value(index)); | |
415 if (index >= receiver.length) | |
416 throw H.wrapException(P.RangeError$value(index)); | |
417 return receiver.charCodeAt(index); | |
418 }, | |
419 $add: function(receiver, other) { | |
420 if (typeof other !== "string") | |
421 throw H.wrapException(new P.ArgumentError(other)); | |
422 return receiver + other; | |
423 }, | |
424 substring$2: function(receiver, startIndex, endIndex) { | |
425 if (endIndex == null) | |
426 endIndex = receiver.length; | |
427 if (typeof endIndex !== "number" || Math.floor(endIndex) !== endIndex) | |
428 H.throwExpression(P.ArgumentError$(endIndex)); | |
429 if (startIndex < 0) | |
430 throw H.wrapException(P.RangeError$value(startIndex)); | |
431 if (typeof endIndex !== "number") | |
432 throw H.iae(endIndex); | |
433 if (startIndex > endIndex) | |
434 throw H.wrapException(P.RangeError$value(startIndex)); | |
435 if (endIndex > receiver.length) | |
436 throw H.wrapException(P.RangeError$value(endIndex)); | |
437 return receiver.substring(startIndex, endIndex); | |
438 }, | |
439 substring$1: function($receiver, startIndex) { | |
440 return this.substring$2($receiver, startIndex, null); | |
441 }, | |
442 get$isEmpty: function(receiver) { | |
443 return receiver.length === 0; | |
444 }, | |
445 toString$0: function(receiver) { | |
446 return receiver; | |
447 }, | |
448 get$hashCode: function(receiver) { | |
449 var t1, hash, i; | |
450 for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { | |
451 hash = 536870911 & hash + receiver.charCodeAt(i); | |
452 hash = 536870911 & hash + ((524287 & hash) << 10 >>> 0); | |
453 hash ^= hash >> 6; | |
454 } | |
455 hash = 536870911 & hash + ((67108863 & hash) << 3 >>> 0); | |
456 hash ^= hash >> 11; | |
457 return 536870911 & hash + ((16383 & hash) << 15 >>> 0); | |
458 }, | |
459 get$length: function(receiver) { | |
460 return receiver.length; | |
461 }, | |
462 $index: function(receiver, index) { | |
463 if (typeof index !== "number" || Math.floor(index) !== index) | |
464 throw H.wrapException(new P.ArgumentError(index)); | |
465 if (index >= receiver.length || index < 0) | |
466 throw H.wrapException(P.RangeError$value(index)); | |
467 return receiver[index]; | |
468 }, | |
469 $isString: true | |
470 }}], | |
471 ["_isolate_helper", "dart:_isolate_helper", , H, { | |
472 _callInIsolate: function(isolate, $function) { | |
473 var result = isolate.eval$1($function); | |
474 $globalState.topEventLoop.run$0(); | |
475 return result; | |
476 }, | |
477 | |
478 startRootIsolate: function(entry) { | |
479 var rootContext; | |
480 $globalState = H._Manager$(entry); | |
481 if ($globalState.isWorker === true) | |
482 return; | |
483 rootContext = H._IsolateContext$(); | |
484 $globalState.rootContext = rootContext; | |
485 $globalState.currentContext = rootContext; | |
486 if (!!entry.$is_args1) | |
487 rootContext.eval$1(new H.startRootIsolate_closure(entry)); | |
488 else if (!!entry.$is_args2) | |
489 rootContext.eval$1(new H.startRootIsolate_closure0(entry)); | |
490 else | |
491 rootContext.eval$1(entry); | |
492 $globalState.topEventLoop.run$0(); | |
493 }, | |
494 | |
495 IsolateNatives_computeThisScript: function() { | |
496 var currentScript = init.currentScript; | |
497 if (currentScript != null) | |
498 return String(currentScript.src); | |
499 if (typeof version == "function" && typeof os == "object" && "system" in os) | |
500 return H.IsolateNatives_computeThisScriptD8(); | |
501 if (typeof version == "function" && typeof system == "function") | |
502 return thisFilename(); | |
503 return; | |
504 }, | |
505 | |
506 IsolateNatives_computeThisScriptD8: function() { | |
507 var stack, matches; | |
508 stack = new Error().stack; | |
509 if (stack == null) { | |
510 stack = (function() {try { throw new Error() } catch(e) { return e.stack }})
(); | |
511 if (stack == null) | |
512 throw H.wrapException(P.UnsupportedError$("No stack trace")); | |
513 } | |
514 matches = stack.match(new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "m"))
; | |
515 if (matches != null) | |
516 return matches[1]; | |
517 matches = stack.match(new RegExp("^[^@]*@(.*):[0-9]*$", "m")); | |
518 if (matches != null) | |
519 return matches[1]; | |
520 throw H.wrapException(P.UnsupportedError$("Cannot extract URI from \"" + stack
+ "\"")); | |
521 }, | |
522 | |
523 IsolateNatives__processWorkerMessage: function(sender, e) { | |
524 var msg, t1, functionName, entryPoint, args, message, isSpawnUri, replyTo, con
text, t2; | |
525 msg = H._deserializeMessage(e.data); | |
526 t1 = J.getInterceptor$asx(msg); | |
527 switch (t1.$index(msg, "command")) { | |
528 case "start": | |
529 $globalState.currentManagerId = t1.$index(msg, "id"); | |
530 functionName = t1.$index(msg, "functionName"); | |
531 entryPoint = functionName == null ? $globalState.entry : init.globalFuncti
ons[functionName]; | |
532 args = t1.$index(msg, "args"); | |
533 message = H._deserializeMessage(t1.$index(msg, "msg")); | |
534 isSpawnUri = t1.$index(msg, "isSpawnUri"); | |
535 replyTo = H._deserializeMessage(t1.$index(msg, "replyTo")); | |
536 context = H._IsolateContext$(); | |
537 $globalState.topEventLoop.events._add$1(new H._IsolateEvent(context, new H
.IsolateNatives__processWorkerMessage_closure(entryPoint, args, message, isSpawn
Uri, replyTo), "worker-start")); | |
538 $globalState.currentContext = context; | |
539 $globalState.topEventLoop.run$0(); | |
540 break; | |
541 case "spawn-worker": | |
542 H.IsolateNatives__spawnWorker(t1.$index(msg, "functionName"), t1.$index(ms
g, "uri"), t1.$index(msg, "args"), t1.$index(msg, "msg"), t1.$index(msg, "isSpaw
nUri"), t1.$index(msg, "replyPort")); | |
543 break; | |
544 case "message": | |
545 if (t1.$index(msg, "port") != null) | |
546 t1.$index(msg, "port").send$1(t1.$index(msg, "msg")); | |
547 $globalState.topEventLoop.run$0(); | |
548 break; | |
549 case "close": | |
550 t1 = $globalState.managers; | |
551 t2 = $.get$IsolateNatives_workerIds(); | |
552 t1.remove$1(t1, t2.$index(t2, sender)); | |
553 sender.terminate(); | |
554 $globalState.topEventLoop.run$0(); | |
555 break; | |
556 case "log": | |
557 H.IsolateNatives__log(t1.$index(msg, "msg")); | |
558 break; | |
559 case "print": | |
560 if ($globalState.isWorker === true) { | |
561 t1 = $globalState.mainManager; | |
562 t2 = H._serializeMessage(H.fillLiteralMap(["command", "print", "msg", ms
g], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null))); | |
563 t1.toString; | |
564 self.postMessage(t2); | |
565 } else | |
566 P.print(t1.$index(msg, "msg")); | |
567 break; | |
568 case "error": | |
569 throw H.wrapException(t1.$index(msg, "msg")); | |
570 default: | |
571 } | |
572 }, | |
573 | |
574 IsolateNatives__log: function(msg) { | |
575 var trace, t1, t2, exception; | |
576 if ($globalState.isWorker === true) { | |
577 t1 = $globalState.mainManager; | |
578 t2 = H._serializeMessage(H.fillLiteralMap(["command", "log", "msg", msg], P.
LinkedHashMap_LinkedHashMap(null, null, null, null, null))); | |
579 t1.toString; | |
580 self.postMessage(t2); | |
581 } else | |
582 try { | |
583 $.get$globalThis().console.log(msg); | |
584 } catch (exception) { | |
585 H.unwrapException(exception); | |
586 trace = new H._StackTrace(exception, null); | |
587 throw H.wrapException(P.Exception_Exception(trace)); | |
588 } | |
589 | |
590 }, | |
591 | |
592 IsolateNatives__startIsolate: function(topLevel, args, message, isSpawnUri, repl
yTo) { | |
593 var t1; | |
594 H.Primitives_initializeStatics($globalState.currentContext.id); | |
595 $.lazyPort = H.ReceivePortImpl$(); | |
596 t1 = $.lazyPort; | |
597 t1.toString; | |
598 replyTo.send$1(["spawned", new H._NativeJsSendPort(t1, $globalState.currentCon
text.id)]); | |
599 if (isSpawnUri !== true) | |
600 topLevel.call$1(message); | |
601 else { | |
602 t1 = J.getInterceptor(topLevel); | |
603 if (!!t1.$is_args2) | |
604 topLevel.call$2(args, message); | |
605 else if (!!t1.$is_args1) | |
606 topLevel.call$1(args); | |
607 else | |
608 topLevel.call$0(); | |
609 } | |
610 }, | |
611 | |
612 IsolateNatives__spawnWorker: function(functionName, uri, args, message, isSpawnU
ri, replyPort) { | |
613 var worker, t1, workerId; | |
614 if (uri == null) | |
615 uri = $.get$IsolateNatives_thisScript(); | |
616 worker = new Worker(uri); | |
617 worker.onmessage = function(e) { H.IsolateNatives__processWorkerMessage$closur
e.call$2(worker, e); }; | |
618 t1 = $globalState; | |
619 workerId = t1.nextManagerId; | |
620 t1.nextManagerId = workerId + 1; | |
621 t1 = $.get$IsolateNatives_workerIds(); | |
622 t1.$indexSet(t1, worker, workerId); | |
623 t1 = $globalState.managers; | |
624 t1.$indexSet(t1, workerId, worker); | |
625 worker.postMessage(H._serializeMessage(H.fillLiteralMap(["command", "start", "
id", workerId, "replyTo", H._serializeMessage(replyPort), "args", args, "msg", H
._serializeMessage(message), "isSpawnUri", isSpawnUri, "functionName", functionN
ame], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null)))); | |
626 }, | |
627 | |
628 _waitForPendingPorts: function(message, callback) { | |
629 var finder = H._PendingSendPortFinder$(); | |
630 finder.traverse$1(message); | |
631 P.Future_wait(finder.ports).then$1(new H._waitForPendingPorts_closure(callback
)); | |
632 }, | |
633 | |
634 _serializeMessage: function(message) { | |
635 var t1; | |
636 if ($globalState.supportsWorkers === true) { | |
637 t1 = new H._JsSerializer(0, new H._MessageTraverserVisitedMap()); | |
638 t1._visited = new H._JsVisitedMap(null); | |
639 return t1.traverse$1(message); | |
640 } else { | |
641 t1 = new H._JsCopier(new H._MessageTraverserVisitedMap()); | |
642 t1._visited = new H._JsVisitedMap(null); | |
643 return t1.traverse$1(message); | |
644 } | |
645 }, | |
646 | |
647 _deserializeMessage: function(message) { | |
648 if ($globalState.supportsWorkers === true) | |
649 return new H._JsDeserializer(null).deserialize$1(message); | |
650 else | |
651 return message; | |
652 }, | |
653 | |
654 _MessageTraverser_isPrimitive: function(x) { | |
655 return x == null || typeof x === "string" || typeof x === "number" || typeof x
=== "boolean"; | |
656 }, | |
657 | |
658 _Deserializer_isPrimitive: function(x) { | |
659 return x == null || typeof x === "string" || typeof x === "number" || typeof x
=== "boolean"; | |
660 }, | |
661 | |
662 startRootIsolate_closure: {"": "Closure;entry_0", | |
663 call$0: function() { | |
664 this.entry_0.call$1([]); | |
665 } | |
666 }, | |
667 | |
668 startRootIsolate_closure0: {"": "Closure;entry_1", | |
669 call$0: function() { | |
670 this.entry_1.call$2([], null); | |
671 } | |
672 }, | |
673 | |
674 _Manager: {"": "Object;nextIsolateId,currentManagerId,nextManagerId,currentConte
xt,rootContext,topEventLoop,fromCommandLine,isWorker,supportsWorkers,isolates,ma
inManager,managers,entry", | |
675 _nativeDetectEnvironment$0: function() { | |
676 var t1, t2; | |
677 t1 = $.get$globalWindow() == null; | |
678 t2 = $.get$globalWorker(); | |
679 this.isWorker = t1 && $.get$globalPostMessageDefined() === true; | |
680 if (this.isWorker !== true) | |
681 t2 = t2 != null && $.get$IsolateNatives_thisScript() != null; | |
682 else | |
683 t2 = true; | |
684 this.supportsWorkers = t2; | |
685 this.fromCommandLine = t1 && this.isWorker !== true; | |
686 }, | |
687 _nativeInitWorkerMessageHandler$0: function() { | |
688 var $function = function (e) { H.IsolateNatives__processWorkerMessage$closur
e.call$2(this.mainManager, e); }; | |
689 $.get$globalThis().onmessage = $function; | |
690 $.get$globalThis().dartPrint = function (object) {}; | |
691 }, | |
692 _Manager$1: function(entry) { | |
693 this._nativeDetectEnvironment$0(); | |
694 this.topEventLoop = new H._EventLoop(P.ListQueue$(null, H._IsolateEvent), 0)
; | |
695 this.isolates = P.LinkedHashMap_LinkedHashMap(null, null, null, J.JSInt, H._
IsolateContext); | |
696 this.managers = P.LinkedHashMap_LinkedHashMap(null, null, null, J.JSInt, nul
l); | |
697 if (this.isWorker === true) { | |
698 this.mainManager = new H._MainManagerStub(); | |
699 this._nativeInitWorkerMessageHandler$0(); | |
700 } | |
701 }, | |
702 static: { | |
703 _Manager$: function(entry) { | |
704 var t1 = new H._Manager(0, 0, 1, null, null, null, null, null, null, null, nul
l, null, entry); | |
705 t1._Manager$1(entry); | |
706 return t1; | |
707 }} | |
708 | |
709 }, | |
710 | |
711 _IsolateContext: {"": "Object;id,ports,isolateStatics<", | |
712 eval$1: function(code) { | |
713 var old, result; | |
714 old = $globalState.currentContext; | |
715 $globalState.currentContext = this; | |
716 $ = this.isolateStatics; | |
717 result = null; | |
718 try { | |
719 result = code.call$0(); | |
720 } finally { | |
721 $globalState.currentContext = old; | |
722 if (old != null) | |
723 $ = old.get$isolateStatics(); | |
724 } | |
725 return result; | |
726 }, | |
727 lookup$1: function(portId) { | |
728 var t1 = this.ports; | |
729 return t1.$index(t1, portId); | |
730 }, | |
731 register$2: function(_, portId, port) { | |
732 var t1; | |
733 if (this.ports.containsKey$1(portId)) | |
734 throw H.wrapException(P.Exception_Exception("Registry: ports must be regis
tered only once.")); | |
735 t1 = this.ports; | |
736 t1.$indexSet(t1, portId, port); | |
737 t1 = $globalState.isolates; | |
738 t1.$indexSet(t1, this.id, this); | |
739 }, | |
740 unregister$1: function(portId) { | |
741 var t1 = this.ports; | |
742 t1.remove$1(t1, portId); | |
743 if (this.ports._collection$_length === 0) { | |
744 t1 = $globalState.isolates; | |
745 t1.remove$1(t1, this.id); | |
746 } | |
747 }, | |
748 _IsolateContext$0: function() { | |
749 var t1, t2; | |
750 t1 = $globalState; | |
751 t2 = t1.nextIsolateId; | |
752 t1.nextIsolateId = t2 + 1; | |
753 this.id = t2; | |
754 this.ports = P.LinkedHashMap_LinkedHashMap(null, null, null, J.JSInt, P.Rece
ivePort); | |
755 this.isolateStatics = new Isolate(); | |
756 }, | |
757 static: { | |
758 _IsolateContext$: function() { | |
759 var t1 = new H._IsolateContext(null, null, null); | |
760 t1._IsolateContext$0(); | |
761 return t1; | |
762 }} | |
763 | |
764 }, | |
765 | |
766 _EventLoop: {"": "Object;events,activeTimerCount", | |
767 dequeue$0: function() { | |
768 var t1 = this.events; | |
769 if (t1._head === t1._tail) | |
770 return; | |
771 return t1.removeFirst$0(); | |
772 }, | |
773 checkOpenReceivePortsFromCommandLine$0: function() { | |
774 if ($globalState.rootContext != null && $globalState.isolates.containsKey$1(
$globalState.rootContext.id) && $globalState.fromCommandLine === true && $global
State.rootContext.ports._collection$_length === 0) | |
775 throw H.wrapException(P.Exception_Exception("Program exited with open Rece
ivePorts.")); | |
776 }, | |
777 runIteration$0: function() { | |
778 var $event, t1, t2; | |
779 $event = this.dequeue$0(); | |
780 if ($event == null) { | |
781 this.checkOpenReceivePortsFromCommandLine$0(); | |
782 t1 = $globalState; | |
783 if (t1.isWorker === true && t1.isolates._collection$_length === 0 && t1.to
pEventLoop.activeTimerCount === 0) { | |
784 t1 = t1.mainManager; | |
785 t2 = H._serializeMessage(H.fillLiteralMap(["command", "close"], P.Linked
HashMap_LinkedHashMap(null, null, null, null, null))); | |
786 t1.toString; | |
787 self.postMessage(t2); | |
788 } | |
789 return false; | |
790 } | |
791 $event.process$0(); | |
792 return true; | |
793 }, | |
794 _runHelper$0: function() { | |
795 if ($.get$globalWindow() != null) | |
796 new H._EventLoop__runHelper_next(this).call$0(); | |
797 else | |
798 for (; this.runIteration$0();) | |
799 ; | |
800 }, | |
801 run$0: function() { | |
802 var e, trace, exception, t1, t2; | |
803 if ($globalState.isWorker !== true) | |
804 this._runHelper$0(); | |
805 else | |
806 try { | |
807 this._runHelper$0(); | |
808 } catch (exception) { | |
809 t1 = H.unwrapException(exception); | |
810 e = t1; | |
811 trace = new H._StackTrace(exception, null); | |
812 t1 = $globalState.mainManager; | |
813 t2 = H._serializeMessage(H.fillLiteralMap(["command", "error", "msg", H.
S(e) + "\n" + H.S(trace)], P.LinkedHashMap_LinkedHashMap(null, null, null, null,
null))); | |
814 t1.toString; | |
815 self.postMessage(t2); | |
816 } | |
817 | |
818 } | |
819 }, | |
820 | |
821 _EventLoop__runHelper_next: {"": "Closure;this_0", | |
822 call$0: function() { | |
823 if (!this.this_0.runIteration$0()) | |
824 return; | |
825 P.Timer_Timer(C.Duration_0, this); | |
826 } | |
827 }, | |
828 | |
829 _IsolateEvent: {"": "Object;isolate,fn,message", | |
830 process$0: function() { | |
831 this.isolate.eval$1(this.fn); | |
832 } | |
833 }, | |
834 | |
835 _MainManagerStub: {"": "Object;"}, | |
836 | |
837 IsolateNatives__processWorkerMessage_closure: {"": "Closure;entryPoint_0,args_1,
message_2,isSpawnUri_3,replyTo_4", | |
838 call$0: function() { | |
839 H.IsolateNatives__startIsolate(this.entryPoint_0, this.args_1, this.message_
2, this.isSpawnUri_3, this.replyTo_4); | |
840 } | |
841 }, | |
842 | |
843 _BaseSendPort: {"": "Object;", $isSendPort: true}, | |
844 | |
845 _NativeJsSendPort: {"": "_BaseSendPort;_receivePort,_isolateId", | |
846 send$1: function(message) { | |
847 H._waitForPendingPorts(message, new H._NativeJsSendPort_send_closure(this, m
essage)); | |
848 }, | |
849 $eq: function(_, other) { | |
850 var t1; | |
851 if (other == null) | |
852 return false; | |
853 t1 = J.getInterceptor(other); | |
854 return typeof other === "object" && other !== null && !!t1.$is_NativeJsSendP
ort && J.$eq(this._receivePort, other._receivePort); | |
855 }, | |
856 get$hashCode: function(_) { | |
857 return this._receivePort.get$_id(); | |
858 }, | |
859 $is_NativeJsSendPort: true, | |
860 $isSendPort: true | |
861 }, | |
862 | |
863 _NativeJsSendPort_send_closure: {"": "Closure;this_1,message_2", | |
864 call$0: function() { | |
865 var t1, t2, t3, t4, isolate, shouldSerialize, msg; | |
866 t1 = {}; | |
867 t2 = $globalState.isolates; | |
868 t3 = this.this_1; | |
869 t4 = t3._isolateId; | |
870 isolate = t2.$index(t2, t4); | |
871 if (isolate == null) | |
872 return; | |
873 if ((t3._receivePort.get$_controller()._state & 4) !== 0) | |
874 return; | |
875 shouldSerialize = $globalState.currentContext != null && $globalState.curren
tContext.id !== t4; | |
876 msg = this.message_2; | |
877 t1.msg_0 = msg; | |
878 if (shouldSerialize) | |
879 t1.msg_0 = H._serializeMessage(t1.msg_0); | |
880 t2 = $globalState.topEventLoop; | |
881 t4 = "receive " + H.S(msg); | |
882 t2.events._add$1(new H._IsolateEvent(isolate, new H._NativeJsSendPort_send__
closure(t1, t3, shouldSerialize), t4)); | |
883 } | |
884 }, | |
885 | |
886 _NativeJsSendPort_send__closure: {"": "Closure;box_0,this_3,shouldSerialize_4", | |
887 call$0: function() { | |
888 var t1, t2; | |
889 t1 = this.this_3._receivePort; | |
890 if ((t1.get$_controller()._state & 4) === 0) { | |
891 if (this.shouldSerialize_4) { | |
892 t2 = this.box_0; | |
893 t2.msg_0 = H._deserializeMessage(t2.msg_0); | |
894 } | |
895 t1 = t1._controller; | |
896 t2 = this.box_0.msg_0; | |
897 if (t1._state >= 4) | |
898 H.throwExpression(t1._badEventState$0()); | |
899 t1._async$_add$1(t2); | |
900 } | |
901 } | |
902 }, | |
903 | |
904 _WorkerSendPort: {"": "_BaseSendPort;_workerId,_receivePortId,_isolateId", | |
905 send$1: function(message) { | |
906 H._waitForPendingPorts(message, new H._WorkerSendPort_send_closure(this, mes
sage)); | |
907 }, | |
908 $eq: function(_, other) { | |
909 var t1; | |
910 if (other == null) | |
911 return false; | |
912 t1 = J.getInterceptor(other); | |
913 return typeof other === "object" && other !== null && !!t1.$is_WorkerSendPor
t && J.$eq(this._workerId, other._workerId) && J.$eq(this._isolateId, other._iso
lateId) && J.$eq(this._receivePortId, other._receivePortId); | |
914 }, | |
915 get$hashCode: function(_) { | |
916 var t1, t2, t3; | |
917 t1 = this._workerId; | |
918 if (typeof t1 !== "number") | |
919 throw t1.$shl(); | |
920 t2 = this._isolateId; | |
921 if (typeof t2 !== "number") | |
922 throw t2.$shl(); | |
923 t3 = this._receivePortId; | |
924 if (typeof t3 !== "number") | |
925 throw H.iae(t3); | |
926 return (t1 << 16 ^ t2 << 8 ^ t3) >>> 0; | |
927 }, | |
928 $is_WorkerSendPort: true, | |
929 $isSendPort: true | |
930 }, | |
931 | |
932 _WorkerSendPort_send_closure: {"": "Closure;this_0,message_1", | |
933 call$0: function() { | |
934 var t1, workerMessage, t2, manager; | |
935 t1 = this.this_0; | |
936 workerMessage = H._serializeMessage(H.fillLiteralMap(["command", "message",
"port", t1, "msg", this.message_1], P.LinkedHashMap_LinkedHashMap(null, null, nu
ll, null, null))); | |
937 if ($globalState.isWorker === true) { | |
938 $globalState.mainManager.toString; | |
939 self.postMessage(workerMessage); | |
940 } else { | |
941 t2 = $globalState.managers; | |
942 manager = t2.$index(t2, t1._workerId); | |
943 if (manager != null) | |
944 manager.postMessage(workerMessage); | |
945 } | |
946 } | |
947 }, | |
948 | |
949 ReceivePortImpl: {"": "Stream;_id<,_controller<", | |
950 listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone,
onError) { | |
951 var t1 = this._controller; | |
952 t1.toString; | |
953 t1 = new P._ControllerStream(t1); | |
954 H.setRuntimeTypeInfo(t1, [null]); | |
955 return t1.listen$4$cancelOnError$onDone$onError(onData, cancelOnError, onDon
e, onError); | |
956 }, | |
957 close$0: function(_) { | |
958 var t1 = this._controller; | |
959 if ((t1._state & 4) !== 0) | |
960 return; | |
961 t1.close$0(t1); | |
962 $globalState.currentContext.unregister$1(this._id); | |
963 }, | |
964 get$close: function(_receiver) { | |
965 return new H.BoundClosure$i0(this, H.ReceivePortImpl.prototype.close$0, _rec
eiver, "close$0"); | |
966 }, | |
967 ReceivePortImpl$0: function() { | |
968 this._controller = P.StreamController_StreamController(this.get$close(this),
null, null, null, true, null); | |
969 var t1 = $globalState.currentContext; | |
970 t1.register$2(t1, this._id, this); | |
971 }, | |
972 static: { | |
973 "": "ReceivePortImpl__nextFreeId", | |
974 ReceivePortImpl$: function() { | |
975 var t1 = $.ReceivePortImpl__nextFreeId; | |
976 $.ReceivePortImpl__nextFreeId = t1 + 1; | |
977 t1 = new H.ReceivePortImpl(t1, null); | |
978 t1.ReceivePortImpl$0(); | |
979 return t1; | |
980 }} | |
981 | |
982 }, | |
983 | |
984 _waitForPendingPorts_closure: {"": "Closure;callback_0", | |
985 call$1: function(_) { | |
986 return this.callback_0.call$0(); | |
987 }, | |
988 $is_args1: true | |
989 }, | |
990 | |
991 _PendingSendPortFinder: {"": "_MessageTraverser;ports,_visited", | |
992 visitPrimitive$1: function(x) { | |
993 }, | |
994 visitList$1: function(list) { | |
995 var t1 = this._visited; | |
996 if (t1.$index(t1, list) != null) | |
997 return; | |
998 t1 = this._visited; | |
999 t1.$indexSet(t1, list, true); | |
1000 J.forEach$1$ax(list, this.get$_dispatch()); | |
1001 }, | |
1002 visitMap$1: function(map) { | |
1003 var t1 = this._visited; | |
1004 if (t1.$index(t1, map) != null) | |
1005 return; | |
1006 t1 = this._visited; | |
1007 t1.$indexSet(t1, map, true); | |
1008 t1 = map.get$values(map); | |
1009 t1.forEach$1(t1, this.get$_dispatch()); | |
1010 }, | |
1011 visitSendPort$1: function(port) { | |
1012 }, | |
1013 _PendingSendPortFinder$0: function() { | |
1014 this._visited = new H._JsVisitedMap(null); | |
1015 }, | |
1016 static: { | |
1017 _PendingSendPortFinder$: function() { | |
1018 var t1 = new H._PendingSendPortFinder([], new H._MessageTraverserVisitedMap())
; | |
1019 t1._PendingSendPortFinder$0(); | |
1020 return t1; | |
1021 }} | |
1022 | |
1023 }, | |
1024 | |
1025 _JsSerializer: {"": "_Serializer;_nextFreeRefId,_visited", | |
1026 visitSendPort$1: function(x) { | |
1027 if (!!x.$is_NativeJsSendPort) | |
1028 return ["sendport", $globalState.currentManagerId, x._isolateId, x._receiv
ePort.get$_id()]; | |
1029 if (!!x.$is_WorkerSendPort) | |
1030 return ["sendport", x._workerId, x._isolateId, x._receivePortId]; | |
1031 throw H.wrapException("Illegal underlying port " + H.S(x)); | |
1032 } | |
1033 }, | |
1034 | |
1035 _JsCopier: {"": "_Copier;_visited", | |
1036 visitSendPort$1: function(x) { | |
1037 if (!!x.$is_NativeJsSendPort) | |
1038 return new H._NativeJsSendPort(x._receivePort, x._isolateId); | |
1039 if (!!x.$is_WorkerSendPort) | |
1040 return new H._WorkerSendPort(x._workerId, x._receivePortId, x._isolateId); | |
1041 throw H.wrapException("Illegal underlying port " + H.S(x)); | |
1042 } | |
1043 }, | |
1044 | |
1045 _JsDeserializer: {"": "_Deserializer;_deserialized", | |
1046 deserializeSendPort$1: function(list) { | |
1047 var t1, managerId, isolateId, receivePortId, isolate, receivePort; | |
1048 t1 = J.getInterceptor$asx(list); | |
1049 managerId = t1.$index(list, 1); | |
1050 isolateId = t1.$index(list, 2); | |
1051 receivePortId = t1.$index(list, 3); | |
1052 if (J.$eq(managerId, $globalState.currentManagerId)) { | |
1053 t1 = $globalState.isolates; | |
1054 isolate = t1.$index(t1, isolateId); | |
1055 if (isolate == null) | |
1056 return; | |
1057 receivePort = isolate.lookup$1(receivePortId); | |
1058 if (receivePort == null) | |
1059 return; | |
1060 return new H._NativeJsSendPort(receivePort, isolateId); | |
1061 } else | |
1062 return new H._WorkerSendPort(managerId, receivePortId, isolateId); | |
1063 } | |
1064 }, | |
1065 | |
1066 _JsVisitedMap: {"": "Object;tagged", | |
1067 $index: function(_, object) { | |
1068 return object.__MessageTraverser__attached_info__; | |
1069 }, | |
1070 $indexSet: function(_, object, info) { | |
1071 this.tagged.push(object); | |
1072 object.__MessageTraverser__attached_info__ = info; | |
1073 }, | |
1074 reset$0: function(_) { | |
1075 this.tagged = P.List_List(null, null); | |
1076 }, | |
1077 cleanup$0: function() { | |
1078 var $length, i, t1; | |
1079 for ($length = this.tagged.length, i = 0; i < $length; ++i) { | |
1080 t1 = this.tagged; | |
1081 if (i >= t1.length) | |
1082 throw H.ioore(t1, i); | |
1083 t1[i].__MessageTraverser__attached_info__ = null; | |
1084 } | |
1085 this.tagged = null; | |
1086 } | |
1087 }, | |
1088 | |
1089 _MessageTraverserVisitedMap: {"": "Object;", | |
1090 $index: function(_, object) { | |
1091 return; | |
1092 }, | |
1093 $indexSet: function(_, object, info) { | |
1094 }, | |
1095 reset$0: function(_) { | |
1096 }, | |
1097 cleanup$0: function() { | |
1098 } | |
1099 }, | |
1100 | |
1101 _MessageTraverser: {"": "Object;", | |
1102 traverse$1: function(x) { | |
1103 var result, t1; | |
1104 if (H._MessageTraverser_isPrimitive(x)) | |
1105 return this.visitPrimitive$1(x); | |
1106 t1 = this._visited; | |
1107 t1.reset$0(t1); | |
1108 result = null; | |
1109 try { | |
1110 result = this._dispatch$1(x); | |
1111 } finally { | |
1112 this._visited.cleanup$0(); | |
1113 } | |
1114 return result; | |
1115 }, | |
1116 _dispatch$1: function(x) { | |
1117 var t1; | |
1118 if (x == null || typeof x === "string" || typeof x === "number" || typeof x
=== "boolean") | |
1119 return this.visitPrimitive$1(x); | |
1120 t1 = J.getInterceptor(x); | |
1121 if (typeof x === "object" && x !== null && (x.constructor === Array || !!t1.
$isList)) | |
1122 return this.visitList$1(x); | |
1123 if (typeof x === "object" && x !== null && !!t1.$isMap) | |
1124 return this.visitMap$1(x); | |
1125 if (typeof x === "object" && x !== null && !!t1.$isSendPort) | |
1126 return this.visitSendPort$1(x); | |
1127 return this.visitObject$1(x); | |
1128 }, | |
1129 get$_dispatch: function() { | |
1130 return new H.BoundClosure$1(this, H._MessageTraverser.prototype._dispatch$1,
null, "_dispatch$1"); | |
1131 }, | |
1132 visitObject$1: function(x) { | |
1133 throw H.wrapException("Message serialization: Illegal value " + H.S(x) + " p
assed"); | |
1134 } | |
1135 }, | |
1136 | |
1137 _Copier: {"": "_MessageTraverser;", | |
1138 visitPrimitive$1: function(x) { | |
1139 return x; | |
1140 }, | |
1141 visitList$1: function(list) { | |
1142 var t1, copy, len, i; | |
1143 t1 = this._visited; | |
1144 copy = t1.$index(t1, list); | |
1145 if (copy != null) | |
1146 return copy; | |
1147 len = J.get$length$asx(list); | |
1148 copy = P.List_List(len, null); | |
1149 t1 = this._visited; | |
1150 t1.$indexSet(t1, list, copy); | |
1151 for (i = 0; i < len; ++i) { | |
1152 if (i >= list.length) | |
1153 throw H.ioore(list, i); | |
1154 t1 = this._dispatch$1(list[i]); | |
1155 if (i >= len) | |
1156 throw H.ioore(copy, i); | |
1157 copy[i] = t1; | |
1158 } | |
1159 return copy; | |
1160 }, | |
1161 visitMap$1: function(map) { | |
1162 var t1, t2; | |
1163 t1 = {}; | |
1164 t2 = this._visited; | |
1165 t1.copy_0 = t2.$index(t2, map); | |
1166 t2 = t1.copy_0; | |
1167 if (t2 != null) | |
1168 return t2; | |
1169 t1.copy_0 = P.LinkedHashMap_LinkedHashMap(null, null, null, null, null); | |
1170 t2 = this._visited; | |
1171 t2.$indexSet(t2, map, t1.copy_0); | |
1172 map.forEach$1(map, new H._Copier_visitMap_closure(t1, this)); | |
1173 return t1.copy_0; | |
1174 } | |
1175 }, | |
1176 | |
1177 _Copier_visitMap_closure: {"": "Closure;box_0,this_1", | |
1178 call$2: function(key, val) { | |
1179 var t1 = this.this_1; | |
1180 J.$indexSet$ax(this.box_0.copy_0, t1._dispatch$1(key), t1._dispatch$1(val)); | |
1181 }, | |
1182 $is_args2: true | |
1183 }, | |
1184 | |
1185 _Serializer: {"": "_MessageTraverser;", | |
1186 visitPrimitive$1: function(x) { | |
1187 return x; | |
1188 }, | |
1189 visitList$1: function(list) { | |
1190 var t1, copyId, id; | |
1191 t1 = this._visited; | |
1192 copyId = t1.$index(t1, list); | |
1193 if (copyId != null) | |
1194 return ["ref", copyId]; | |
1195 id = this._nextFreeRefId; | |
1196 this._nextFreeRefId = id + 1; | |
1197 t1 = this._visited; | |
1198 t1.$indexSet(t1, list, id); | |
1199 return ["list", id, this._serializeList$1(list)]; | |
1200 }, | |
1201 visitMap$1: function(map) { | |
1202 var t1, copyId, id, keys; | |
1203 t1 = this._visited; | |
1204 copyId = t1.$index(t1, map); | |
1205 if (copyId != null) | |
1206 return ["ref", copyId]; | |
1207 id = this._nextFreeRefId; | |
1208 this._nextFreeRefId = id + 1; | |
1209 t1 = this._visited; | |
1210 t1.$indexSet(t1, map, id); | |
1211 t1 = map.get$keys(); | |
1212 keys = this._serializeList$1(P.List_List$from(t1, true, H.getRuntimeTypeArgu
ment(t1, "IterableBase", 0))); | |
1213 t1 = map.get$values(map); | |
1214 return ["map", id, keys, this._serializeList$1(P.List_List$from(t1, true, H.
getRuntimeTypeArgument(t1, "IterableBase", 0)))]; | |
1215 }, | |
1216 _serializeList$1: function(list) { | |
1217 var len, result, i, t1; | |
1218 len = J.get$length$asx(list); | |
1219 result = P.List_List(len, null); | |
1220 for (i = 0; i < len; ++i) { | |
1221 if (i >= list.length) | |
1222 throw H.ioore(list, i); | |
1223 t1 = this._dispatch$1(list[i]); | |
1224 if (i >= len) | |
1225 throw H.ioore(result, i); | |
1226 result[i] = t1; | |
1227 } | |
1228 return result; | |
1229 } | |
1230 }, | |
1231 | |
1232 _Deserializer: {"": "Object;", | |
1233 deserialize$1: function(x) { | |
1234 if (H._Deserializer_isPrimitive(x)) | |
1235 return x; | |
1236 this._deserialized = P.HashMap_HashMap(null, null, null, null, null); | |
1237 return this._deserializeHelper$1(x); | |
1238 }, | |
1239 _deserializeHelper$1: function(x) { | |
1240 var t1, id; | |
1241 if (x == null || typeof x === "string" || typeof x === "number" || typeof x
=== "boolean") | |
1242 return x; | |
1243 t1 = J.getInterceptor$asx(x); | |
1244 switch (t1.$index(x, 0)) { | |
1245 case "ref": | |
1246 id = t1.$index(x, 1); | |
1247 t1 = this._deserialized; | |
1248 return t1.$index(t1, id); | |
1249 case "list": | |
1250 return this._deserializeList$1(x); | |
1251 case "map": | |
1252 return this._deserializeMap$1(x); | |
1253 case "sendport": | |
1254 return this.deserializeSendPort$1(x); | |
1255 default: | |
1256 return this.deserializeObject$1(x); | |
1257 } | |
1258 }, | |
1259 _deserializeList$1: function(x) { | |
1260 var t1, id, dartList, len, i; | |
1261 t1 = J.getInterceptor$asx(x); | |
1262 id = t1.$index(x, 1); | |
1263 dartList = t1.$index(x, 2); | |
1264 t1 = this._deserialized; | |
1265 t1.$indexSet(t1, id, dartList); | |
1266 t1 = J.getInterceptor$asx(dartList); | |
1267 len = t1.get$length(dartList); | |
1268 if (typeof len !== "number") | |
1269 throw H.iae(len); | |
1270 i = 0; | |
1271 for (; i < len; ++i) | |
1272 t1.$indexSet(dartList, i, this._deserializeHelper$1(t1.$index(dartList, i)
)); | |
1273 return dartList; | |
1274 }, | |
1275 _deserializeMap$1: function(x) { | |
1276 var result, t1, id, t2, keys, values, len, i; | |
1277 result = P.LinkedHashMap_LinkedHashMap(null, null, null, null, null); | |
1278 t1 = J.getInterceptor$asx(x); | |
1279 id = t1.$index(x, 1); | |
1280 t2 = this._deserialized; | |
1281 t2.$indexSet(t2, id, result); | |
1282 keys = t1.$index(x, 2); | |
1283 values = t1.$index(x, 3); | |
1284 t1 = J.getInterceptor$asx(keys); | |
1285 len = t1.get$length(keys); | |
1286 if (typeof len !== "number") | |
1287 throw H.iae(len); | |
1288 t2 = J.getInterceptor$asx(values); | |
1289 i = 0; | |
1290 for (; i < len; ++i) | |
1291 result.$indexSet(result, this._deserializeHelper$1(t1.$index(keys, i)), th
is._deserializeHelper$1(t2.$index(values, i))); | |
1292 return result; | |
1293 }, | |
1294 deserializeObject$1: function(x) { | |
1295 throw H.wrapException("Unexpected serialized object"); | |
1296 } | |
1297 }, | |
1298 | |
1299 TimerImpl: {"": "Object;_once,_inEventLoop,_handle", | |
1300 TimerImpl$2: function(milliseconds, callback) { | |
1301 var t1, t2; | |
1302 if (milliseconds === 0) | |
1303 t1 = $.get$globalThis().setTimeout == null || $globalState.isWorker === tr
ue; | |
1304 else | |
1305 t1 = false; | |
1306 if (t1) { | |
1307 this._handle = 1; | |
1308 t1 = $globalState.topEventLoop; | |
1309 t2 = $globalState.currentContext; | |
1310 t1.events._add$1(new H._IsolateEvent(t2, new H.TimerImpl_internalCallback(
this, callback), "timer")); | |
1311 this._inEventLoop = true; | |
1312 } else if ($.get$globalThis().setTimeout != null) { | |
1313 t1 = $globalState.topEventLoop; | |
1314 t1.activeTimerCount = t1.activeTimerCount + 1; | |
1315 this._handle = $.get$globalThis().setTimeout(H.convertDartClosureToJS(new
H.TimerImpl_internalCallback0(this, callback), 0), milliseconds); | |
1316 } else | |
1317 throw H.wrapException(P.UnsupportedError$("Timer greater than 0.")); | |
1318 }, | |
1319 static: { | |
1320 TimerImpl$: function(milliseconds, callback) { | |
1321 var t1 = new H.TimerImpl(true, false, null); | |
1322 t1.TimerImpl$2(milliseconds, callback); | |
1323 return t1; | |
1324 }} | |
1325 | |
1326 }, | |
1327 | |
1328 TimerImpl_internalCallback: {"": "Closure;this_0,callback_1", | |
1329 call$0: function() { | |
1330 this.this_0._handle = null; | |
1331 this.callback_1.call$0(); | |
1332 } | |
1333 }, | |
1334 | |
1335 TimerImpl_internalCallback0: {"": "Closure;this_2,callback_3", | |
1336 call$0: function() { | |
1337 this.this_2._handle = null; | |
1338 var t1 = $globalState.topEventLoop; | |
1339 t1.activeTimerCount = t1.activeTimerCount - 1; | |
1340 this.callback_3.call$0(); | |
1341 } | |
1342 }}], | |
1343 ["_js_helper", "dart:_js_helper", , H, { | |
1344 isJsIndexable: function(object, record) { | |
1345 var result, t1; | |
1346 if (record != null) { | |
1347 result = record.x; | |
1348 if (result != null) | |
1349 return result; | |
1350 } | |
1351 t1 = J.getInterceptor(object); | |
1352 return typeof object === "object" && object !== null && !!t1.$isJavaScriptInde
xingBehavior; | |
1353 }, | |
1354 | |
1355 S: function(value) { | |
1356 var res; | |
1357 if (typeof value === "string") | |
1358 return value; | |
1359 if (typeof value === "number") { | |
1360 if (value !== 0) | |
1361 return "" + value; | |
1362 } else if (true === value) | |
1363 return "true"; | |
1364 else if (false === value) | |
1365 return "false"; | |
1366 else if (value == null) | |
1367 return "null"; | |
1368 res = J.toString$0(value); | |
1369 if (typeof res !== "string") | |
1370 throw H.wrapException(P.ArgumentError$(value)); | |
1371 return res; | |
1372 }, | |
1373 | |
1374 Primitives_initializeStatics: function(id) { | |
1375 $.Primitives_mirrorFunctionCacheName = $.Primitives_mirrorFunctionCacheName +
("_" + H.S(id)); | |
1376 $.Primitives_mirrorInvokeCacheName = $.Primitives_mirrorInvokeCacheName + ("_"
+ H.S(id)); | |
1377 }, | |
1378 | |
1379 Primitives_objectHashCode: function(object) { | |
1380 var hash = object.$identityHash; | |
1381 if (hash == null) { | |
1382 hash = Math.random() * 0x3fffffff | 0; | |
1383 object.$identityHash = hash; | |
1384 } | |
1385 return hash; | |
1386 }, | |
1387 | |
1388 Primitives_objectTypeName: function(object) { | |
1389 var $name, decompiled; | |
1390 $name = C.JS_CONST_86y(J.getInterceptor(object)); | |
1391 if ($name === "Object") { | |
1392 decompiled = String(object.constructor).match(/^\s*function\s*(\S*)\s*\(/)[1
]; | |
1393 if (typeof decompiled === "string") | |
1394 $name = decompiled; | |
1395 } | |
1396 if (J.getInterceptor$s($name).codeUnitAt$1($name, 0) === 36) | |
1397 $name = C.JSString_methods.substring$1($name, 1); | |
1398 return $name + H.joinArguments(H.getRuntimeTypeInfo(object), 0, null); | |
1399 }, | |
1400 | |
1401 Primitives_objectToString: function(object) { | |
1402 return "Instance of '" + H.Primitives_objectTypeName(object) + "'"; | |
1403 }, | |
1404 | |
1405 Primitives_newFixedList: function($length) { | |
1406 var result = new Array($length); | |
1407 result.fixed$length = true; | |
1408 return result; | |
1409 }, | |
1410 | |
1411 Primitives__fromCharCodeApply: function(array) { | |
1412 var end, t1, result, i, subarray, t2; | |
1413 end = array.length; | |
1414 for (t1 = end <= 500, result = "", i = 0; i < end; i += 500) { | |
1415 if (t1) | |
1416 subarray = array; | |
1417 else { | |
1418 t2 = i + 500; | |
1419 t2 = t2 < end ? t2 : end; | |
1420 subarray = array.slice(i, t2); | |
1421 } | |
1422 result += String.fromCharCode.apply(null, subarray); | |
1423 } | |
1424 return result; | |
1425 }, | |
1426 | |
1427 Primitives_stringFromCodePoints: function(codePoints) { | |
1428 var a, t1, i; | |
1429 a = []; | |
1430 a.$builtinTypeInfo = [J.JSInt]; | |
1431 for (t1 = new H.ListIterator(codePoints, codePoints.length, 0, null); t1.moveN
ext$0();) { | |
1432 i = t1._current; | |
1433 if (typeof i !== "number" || Math.floor(i) !== i) | |
1434 throw H.wrapException(new P.ArgumentError(i)); | |
1435 if (i <= 65535) | |
1436 a.push(i); | |
1437 else if (i <= 1114111) { | |
1438 a.push(55296 + (C.JSInt_methods.$shr(i - 65536, 10) & 1023)); | |
1439 a.push(56320 + (i & 1023)); | |
1440 } else | |
1441 throw H.wrapException(new P.ArgumentError(i)); | |
1442 } | |
1443 return H.Primitives__fromCharCodeApply(a); | |
1444 }, | |
1445 | |
1446 Primitives_stringFromCharCodes: function(charCodes) { | |
1447 var t1, i; | |
1448 for (t1 = new H.ListIterator(charCodes, charCodes.length, 0, null); t1.moveNex
t$0();) { | |
1449 i = t1._current; | |
1450 if (typeof i !== "number" || Math.floor(i) !== i) | |
1451 throw H.wrapException(new P.ArgumentError(i)); | |
1452 if (i < 0) | |
1453 throw H.wrapException(new P.ArgumentError(i)); | |
1454 if (i > 65535) | |
1455 return H.Primitives_stringFromCodePoints(charCodes); | |
1456 } | |
1457 return H.Primitives__fromCharCodeApply(charCodes); | |
1458 }, | |
1459 | |
1460 Primitives_getProperty: function(object, key) { | |
1461 if (object == null || typeof object === "boolean" || typeof object === "number
" || typeof object === "string") | |
1462 throw H.wrapException(new P.ArgumentError(object)); | |
1463 return object[key]; | |
1464 }, | |
1465 | |
1466 Primitives_setProperty: function(object, key, value) { | |
1467 if (object == null || typeof object === "boolean" || typeof object === "number
" || typeof object === "string") | |
1468 throw H.wrapException(new P.ArgumentError(object)); | |
1469 object[key] = value; | |
1470 }, | |
1471 | |
1472 iae: function(argument) { | |
1473 throw H.wrapException(P.ArgumentError$(argument)); | |
1474 }, | |
1475 | |
1476 ioore: function(receiver, index) { | |
1477 if (receiver == null) | |
1478 J.get$length$asx(receiver); | |
1479 if (typeof index !== "number" || Math.floor(index) !== index) | |
1480 H.iae(index); | |
1481 throw H.wrapException(P.RangeError$value(index)); | |
1482 }, | |
1483 | |
1484 wrapException: function(ex) { | |
1485 var wrapper; | |
1486 if (ex == null) | |
1487 ex = new P.NullThrownError(); | |
1488 wrapper = new Error(); | |
1489 wrapper.dartException = ex; | |
1490 if ("defineProperty" in Object) { | |
1491 Object.defineProperty(wrapper, "message", { get: H.toStringWrapper$closure.c
all$0 }); | |
1492 wrapper.name = ""; | |
1493 } else | |
1494 wrapper.toString = H.toStringWrapper$closure.call$0; | |
1495 return wrapper; | |
1496 }, | |
1497 | |
1498 toStringWrapper: function() { | |
1499 return J.toString$0(this.dartException); | |
1500 }, | |
1501 | |
1502 throwExpression: function(ex) { | |
1503 throw H.wrapException(ex); | |
1504 }, | |
1505 | |
1506 unwrapException: function(ex) { | |
1507 var t1, message, number, ieErrorCode, t2, t3, t4, nullLiteralCall, t5, t6, t7,
t8, t9, match; | |
1508 t1 = new H.unwrapException_saveStackTrace(ex); | |
1509 if (ex == null) | |
1510 return; | |
1511 if (typeof ex !== "object") | |
1512 return ex; | |
1513 if ("dartException" in ex) | |
1514 return t1.call$1(ex.dartException); | |
1515 else if (!("message" in ex)) | |
1516 return ex; | |
1517 message = ex.message; | |
1518 if ("number" in ex && typeof ex.number == "number") { | |
1519 number = ex.number; | |
1520 ieErrorCode = number & 65535; | |
1521 if ((C.JSInt_methods.$shr(number, 16) & 8191) === 10) | |
1522 switch (ieErrorCode) { | |
1523 case 438: | |
1524 return t1.call$1(H.JsNoSuchMethodError$(H.S(message) + " (Error " + ie
ErrorCode + ")", null)); | |
1525 case 445: | |
1526 case 5007: | |
1527 t2 = H.S(message) + " (Error " + ieErrorCode + ")"; | |
1528 return t1.call$1(new H.NullError(t2, null)); | |
1529 default: | |
1530 } | |
1531 } | |
1532 if (ex instanceof TypeError) { | |
1533 t2 = $.get$TypeErrorDecoder_noSuchMethodPattern(); | |
1534 t3 = $.get$TypeErrorDecoder_notClosurePattern(); | |
1535 t4 = $.get$TypeErrorDecoder_nullCallPattern(); | |
1536 nullLiteralCall = $.get$TypeErrorDecoder_nullLiteralCallPattern(); | |
1537 t5 = $.get$TypeErrorDecoder_undefinedCallPattern(); | |
1538 t6 = $.get$TypeErrorDecoder_undefinedLiteralCallPattern(); | |
1539 t7 = $.get$TypeErrorDecoder_nullPropertyPattern(); | |
1540 $.get$TypeErrorDecoder_nullLiteralPropertyPattern(); | |
1541 t8 = $.get$TypeErrorDecoder_undefinedPropertyPattern(); | |
1542 t9 = $.get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); | |
1543 match = t2.matchTypeError$1(message); | |
1544 if (match != null) | |
1545 return t1.call$1(H.JsNoSuchMethodError$(message, match)); | |
1546 else { | |
1547 match = t3.matchTypeError$1(message); | |
1548 if (match != null) { | |
1549 match.method = "call"; | |
1550 return t1.call$1(H.JsNoSuchMethodError$(message, match)); | |
1551 } else { | |
1552 match = t4.matchTypeError$1(message); | |
1553 if (match == null) { | |
1554 match = nullLiteralCall.matchTypeError$1(message); | |
1555 if (match == null) { | |
1556 match = t5.matchTypeError$1(message); | |
1557 if (match == null) { | |
1558 match = t6.matchTypeError$1(message); | |
1559 if (match == null) { | |
1560 match = t7.matchTypeError$1(message); | |
1561 if (match == null) { | |
1562 match = nullLiteralCall.matchTypeError$1(message); | |
1563 if (match == null) { | |
1564 match = t8.matchTypeError$1(message); | |
1565 if (match == null) { | |
1566 match = t9.matchTypeError$1(message); | |
1567 t2 = match != null; | |
1568 } else | |
1569 t2 = true; | |
1570 } else | |
1571 t2 = true; | |
1572 } else | |
1573 t2 = true; | |
1574 } else | |
1575 t2 = true; | |
1576 } else | |
1577 t2 = true; | |
1578 } else | |
1579 t2 = true; | |
1580 } else | |
1581 t2 = true; | |
1582 if (t2) { | |
1583 t2 = match == null ? null : match.method; | |
1584 return t1.call$1(new H.NullError(message, t2)); | |
1585 } | |
1586 } | |
1587 } | |
1588 t2 = typeof message === "string" ? message : ""; | |
1589 return t1.call$1(new H.UnknownJsTypeError(t2)); | |
1590 } | |
1591 if (ex instanceof RangeError) { | |
1592 if (typeof message === "string" && message.indexOf("call stack") !== -1) | |
1593 return new P.StackOverflowError(); | |
1594 return t1.call$1(new P.ArgumentError(null)); | |
1595 } | |
1596 if (typeof InternalError == "function" && ex instanceof InternalError) | |
1597 if (typeof message === "string" && message === "too much recursion") | |
1598 return new P.StackOverflowError(); | |
1599 return ex; | |
1600 }, | |
1601 | |
1602 objectHashCode: function(object) { | |
1603 if (object == null || typeof object != 'object') | |
1604 return J.get$hashCode$(object); | |
1605 else | |
1606 return H.Primitives_objectHashCode(object); | |
1607 }, | |
1608 | |
1609 fillLiteralMap: function(keyValuePairs, result) { | |
1610 var $length, index, index0, index1; | |
1611 $length = keyValuePairs.length; | |
1612 for (index = 0; index < $length; index = index1) { | |
1613 index0 = index + 1; | |
1614 index1 = index0 + 1; | |
1615 result.$indexSet(result, keyValuePairs[index], keyValuePairs[index0]); | |
1616 } | |
1617 return result; | |
1618 }, | |
1619 | |
1620 invokeClosure: function(closure, isolate, numberOfArguments, arg1, arg2, arg3, a
rg4) { | |
1621 var t1 = J.getInterceptor(numberOfArguments); | |
1622 if (t1.$eq(numberOfArguments, 0)) | |
1623 return H._callInIsolate(isolate, new H.invokeClosure_closure(closure)); | |
1624 else if (t1.$eq(numberOfArguments, 1)) | |
1625 return H._callInIsolate(isolate, new H.invokeClosure_closure0(closure, arg1)
); | |
1626 else if (t1.$eq(numberOfArguments, 2)) | |
1627 return H._callInIsolate(isolate, new H.invokeClosure_closure1(closure, arg1,
arg2)); | |
1628 else if (t1.$eq(numberOfArguments, 3)) | |
1629 return H._callInIsolate(isolate, new H.invokeClosure_closure2(closure, arg1,
arg2, arg3)); | |
1630 else if (t1.$eq(numberOfArguments, 4)) | |
1631 return H._callInIsolate(isolate, new H.invokeClosure_closure3(closure, arg1,
arg2, arg3, arg4)); | |
1632 else | |
1633 throw H.wrapException(P.Exception_Exception("Unsupported number of arguments
for wrapped closure")); | |
1634 }, | |
1635 | |
1636 convertDartClosureToJS: function(closure, arity) { | |
1637 var $function; | |
1638 if (closure == null) | |
1639 return; | |
1640 $function = closure.$identity; | |
1641 if (!!$function) | |
1642 return $function; | |
1643 $function = (function(closure, arity, context, invoke) { return function(a1,
a2, a3, a4) { return invoke(closure, context, arity, a1, a2, a3, a4); };})(
closure,arity,$globalState.currentContext,H.invokeClosure$closure.call$7); | |
1644 closure.$identity = $function; | |
1645 return $function; | |
1646 }, | |
1647 | |
1648 throwCyclicInit: function(staticName) { | |
1649 throw H.wrapException(P.CyclicInitializationError$("Cyclic initialization for
static " + H.S(staticName))); | |
1650 }, | |
1651 | |
1652 setRuntimeTypeInfo: function(target, typeInfo) { | |
1653 if (target != null) | |
1654 target.$builtinTypeInfo = typeInfo; | |
1655 return target; | |
1656 }, | |
1657 | |
1658 getRuntimeTypeInfo: function(target) { | |
1659 if (target == null) | |
1660 return; | |
1661 return target.$builtinTypeInfo; | |
1662 }, | |
1663 | |
1664 getRuntimeTypeArguments: function(target, substitutionName) { | |
1665 return H.substitute(target["$as" + H.S(substitutionName)], H.getRuntimeTypeInf
o(target)); | |
1666 }, | |
1667 | |
1668 getRuntimeTypeArgument: function(target, substitutionName, index) { | |
1669 var $arguments = H.getRuntimeTypeArguments(target, substitutionName); | |
1670 return $arguments == null ? null : $arguments[index]; | |
1671 }, | |
1672 | |
1673 getRuntimeTypeAsString: function(runtimeType, onTypeVariable) { | |
1674 return runtimeType[0].builtin$cls + H.joinArguments(runtimeType, 1, onTypeVari
able); | |
1675 }, | |
1676 | |
1677 runtimeTypeToString: function(type, onTypeVariable) { | |
1678 if (type == null) | |
1679 return "dynamic"; | |
1680 else if (typeof type === "object" && type !== null && type.constructor === Arr
ay) | |
1681 return H.getRuntimeTypeAsString(type, onTypeVariable); | |
1682 else if (typeof type == "function") | |
1683 return type.builtin$cls; | |
1684 else if (typeof type === "number" && Math.floor(type) === type) | |
1685 return C.JSInt_methods.toString$0(type); | |
1686 else | |
1687 return; | |
1688 }, | |
1689 | |
1690 joinArguments: function(types, startIndex, onTypeVariable) { | |
1691 var buffer, index, firstArgument, allDynamic, argument, str; | |
1692 if (types == null) | |
1693 return ""; | |
1694 buffer = P.StringBuffer$(""); | |
1695 for (index = startIndex, firstArgument = true, allDynamic = true; index < type
s.length; ++index) { | |
1696 if (firstArgument) | |
1697 firstArgument = false; | |
1698 else | |
1699 buffer._contents = buffer._contents + ", "; | |
1700 argument = types[index]; | |
1701 if (argument != null) | |
1702 allDynamic = false; | |
1703 str = H.runtimeTypeToString(argument, onTypeVariable); | |
1704 str = typeof str === "string" ? str : H.S(str); | |
1705 buffer._contents = buffer._contents + str; | |
1706 } | |
1707 return allDynamic ? "" : "<" + H.S(buffer) + ">"; | |
1708 }, | |
1709 | |
1710 substitute: function(substitution, $arguments) { | |
1711 if (typeof substitution === "object" && substitution !== null && substitution.
constructor === Array) | |
1712 $arguments = substitution; | |
1713 else if (typeof substitution == "function") { | |
1714 substitution = H.invokeOn(substitution, null, $arguments); | |
1715 if (typeof substitution === "object" && substitution !== null && substitutio
n.constructor === Array) | |
1716 $arguments = substitution; | |
1717 else if (typeof substitution == "function") | |
1718 $arguments = H.invokeOn(substitution, null, $arguments); | |
1719 } | |
1720 return $arguments; | |
1721 }, | |
1722 | |
1723 computeSignature: function(signature, context, contextName) { | |
1724 return H.invokeOn(signature, context, H.getRuntimeTypeArguments(context, conte
xtName)); | |
1725 }, | |
1726 | |
1727 invokeOn: function($function, receiver, $arguments) { | |
1728 return $function.apply(receiver, $arguments); | |
1729 }, | |
1730 | |
1731 toStringForNativeObject: function(obj) { | |
1732 var t1 = $.getTagFunction; | |
1733 return "Instance of " + (t1 == null ? "<Unknown>" : t1.call$1(obj)); | |
1734 }, | |
1735 | |
1736 hashCodeForNativeObject: function(object) { | |
1737 return H.Primitives_objectHashCode(object); | |
1738 }, | |
1739 | |
1740 defineProperty: function(obj, property, value) { | |
1741 Object.defineProperty(obj, property, {value: value, enumerable: false, writabl
e: true, configurable: true}); | |
1742 }, | |
1743 | |
1744 lookupAndCacheInterceptor: function(obj) { | |
1745 var tag, record, interceptor, interceptorClass, mark, t1; | |
1746 tag = $.getTagFunction.call$1(obj); | |
1747 record = $.dispatchRecordsForInstanceTags[tag]; | |
1748 if (record != null) { | |
1749 Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumer
able: false, writable: true, configurable: true}); | |
1750 return record.i; | |
1751 } | |
1752 interceptor = $.interceptorsForUncacheableTags[tag]; | |
1753 if (interceptor != null) | |
1754 return interceptor; | |
1755 interceptorClass = init.interceptorsByTag[tag]; | |
1756 if (interceptorClass == null) { | |
1757 tag = $.alternateTagFunction.call$2(obj, tag); | |
1758 if (tag != null) { | |
1759 record = $.dispatchRecordsForInstanceTags[tag]; | |
1760 if (record != null) { | |
1761 Object.defineProperty(obj, init.dispatchPropertyName, {value: record, en
umerable: false, writable: true, configurable: true}); | |
1762 return record.i; | |
1763 } | |
1764 interceptor = $.interceptorsForUncacheableTags[tag]; | |
1765 if (interceptor != null) | |
1766 return interceptor; | |
1767 interceptorClass = init.interceptorsByTag[tag]; | |
1768 } | |
1769 } | |
1770 if (interceptorClass == null) | |
1771 return; | |
1772 interceptor = interceptorClass.prototype; | |
1773 mark = tag[0]; | |
1774 if (mark === "!") { | |
1775 record = H.makeLeafDispatchRecord(interceptor); | |
1776 $.dispatchRecordsForInstanceTags[tag] = record; | |
1777 Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumer
able: false, writable: true, configurable: true}); | |
1778 return record.i; | |
1779 } | |
1780 if (mark === "~") { | |
1781 $.interceptorsForUncacheableTags[tag] = interceptor; | |
1782 return interceptor; | |
1783 } | |
1784 if (mark === "-") { | |
1785 t1 = H.makeLeafDispatchRecord(interceptor); | |
1786 Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName,
{value: t1, enumerable: false, writable: true, configurable: true}); | |
1787 return t1.i; | |
1788 } | |
1789 if (mark === "+") | |
1790 return H.patchInteriorProto(obj, interceptor); | |
1791 if (mark === "*") | |
1792 throw H.wrapException(P.UnimplementedError$(tag)); | |
1793 if (init.leafTags[tag] === true) { | |
1794 t1 = H.makeLeafDispatchRecord(interceptor); | |
1795 Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName,
{value: t1, enumerable: false, writable: true, configurable: true}); | |
1796 return t1.i; | |
1797 } else | |
1798 return H.patchInteriorProto(obj, interceptor); | |
1799 }, | |
1800 | |
1801 patchInteriorProto: function(obj, interceptor) { | |
1802 var proto, record; | |
1803 proto = Object.getPrototypeOf(obj); | |
1804 record = J.makeDispatchRecord(interceptor, proto, null, null); | |
1805 Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumer
able: false, writable: true, configurable: true}); | |
1806 return interceptor; | |
1807 }, | |
1808 | |
1809 makeLeafDispatchRecord: function(interceptor) { | |
1810 return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScr
iptIndexingBehavior); | |
1811 }, | |
1812 | |
1813 makeDefaultDispatchRecord: function(tag, interceptorClass, proto) { | |
1814 var interceptor = interceptorClass.prototype; | |
1815 if (init.leafTags[tag] === true) | |
1816 return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaS
criptIndexingBehavior); | |
1817 else | |
1818 return J.makeDispatchRecord(interceptor, proto, null, null); | |
1819 }, | |
1820 | |
1821 initNativeDispatch: function() { | |
1822 if (true === $.initNativeDispatchFlag) | |
1823 return; | |
1824 $.initNativeDispatchFlag = true; | |
1825 H.initNativeDispatchContinue(); | |
1826 }, | |
1827 | |
1828 initNativeDispatchContinue: function() { | |
1829 var map, tags, i, tag, proto, record, interceptorClass; | |
1830 $.dispatchRecordsForInstanceTags = Object.create(null); | |
1831 $.interceptorsForUncacheableTags = Object.create(null); | |
1832 H.initHooks(); | |
1833 map = init.interceptorsByTag; | |
1834 tags = Object.getOwnPropertyNames(map); | |
1835 if (typeof window != "undefined") { | |
1836 window; | |
1837 for (i = 0; i < tags.length; ++i) { | |
1838 tag = tags[i]; | |
1839 proto = $.prototypeForTagFunction.call$1(tag); | |
1840 if (proto != null) { | |
1841 record = H.makeDefaultDispatchRecord(tag, map[tag], proto); | |
1842 if (record != null) | |
1843 Object.defineProperty(proto, init.dispatchPropertyName, {value: record
, enumerable: false, writable: true, configurable: true}); | |
1844 } | |
1845 } | |
1846 } | |
1847 for (i = 0; i < tags.length; ++i) { | |
1848 tag = tags[i]; | |
1849 if (/^[A-Za-z_]/.test(tag)) { | |
1850 interceptorClass = map[tag]; | |
1851 map["!" + tag] = interceptorClass; | |
1852 map["~" + tag] = interceptorClass; | |
1853 map["-" + tag] = interceptorClass; | |
1854 map["+" + tag] = interceptorClass; | |
1855 map["*" + tag] = interceptorClass; | |
1856 } | |
1857 } | |
1858 }, | |
1859 | |
1860 initHooks: function() { | |
1861 var hooks, transformers, i, transformer, getTag, getUnknownTag, prototypeForTa
g; | |
1862 hooks = C.JS_CONST_TtD(); | |
1863 hooks = H.applyHooksTransformer(C.JS_CONST_0, H.applyHooksTransformer(C.JS_CON
ST_Fs4, H.applyHooksTransformer(C.JS_CONST_Fs4, H.applyHooksTransformer(C.JS_CON
ST_rD3, H.applyHooksTransformer(C.JS_CONST_6qb, H.applyHooksTransformer(C.JS_CON
ST_Cbr(C.JS_CONST_86y), hooks)))))); | |
1864 if (typeof dartNativeDispatchHooksTransformer != "undefined") { | |
1865 transformers = dartNativeDispatchHooksTransformer; | |
1866 if (typeof transformers == "function") | |
1867 transformers = [transformers]; | |
1868 if (transformers.constructor == Array) | |
1869 for (i = 0; i < transformers.length; ++i) { | |
1870 transformer = transformers[i]; | |
1871 if (typeof transformer == "function") | |
1872 hooks = transformer(hooks) || hooks; | |
1873 } | |
1874 } | |
1875 getTag = hooks.getTag; | |
1876 getUnknownTag = hooks.getUnknownTag; | |
1877 prototypeForTag = hooks.prototypeForTag; | |
1878 $.getTagFunction = new H.initHooks_closure(getTag); | |
1879 $.alternateTagFunction = new H.initHooks_closure0(getUnknownTag); | |
1880 $.prototypeForTagFunction = new H.initHooks_closure1(prototypeForTag); | |
1881 }, | |
1882 | |
1883 applyHooksTransformer: function(transformer, hooks) { | |
1884 return transformer(hooks) || hooks; | |
1885 }, | |
1886 | |
1887 TypeErrorDecoder: {"": "Object;_pattern,_arguments,_argumentsExpr,_expr,_method,
_receiver", | |
1888 matchTypeError$1: function(message) { | |
1889 var match, result, t1; | |
1890 match = new RegExp(this._pattern).exec(message); | |
1891 if (match == null) | |
1892 return; | |
1893 result = {}; | |
1894 t1 = this._arguments; | |
1895 if (t1 !== -1) | |
1896 result.arguments = match[t1 + 1]; | |
1897 t1 = this._argumentsExpr; | |
1898 if (t1 !== -1) | |
1899 result.argumentsExpr = match[t1 + 1]; | |
1900 t1 = this._expr; | |
1901 if (t1 !== -1) | |
1902 result.expr = match[t1 + 1]; | |
1903 t1 = this._method; | |
1904 if (t1 !== -1) | |
1905 result.method = match[t1 + 1]; | |
1906 t1 = this._receiver; | |
1907 if (t1 !== -1) | |
1908 result.receiver = match[t1 + 1]; | |
1909 return result; | |
1910 }, | |
1911 static: { | |
1912 "": "TypeErrorDecoder_noSuchMethodPattern,TypeErrorDecoder_notClosurePattern,Typ
eErrorDecoder_nullCallPattern,TypeErrorDecoder_nullLiteralCallPattern,TypeErrorD
ecoder_undefinedCallPattern,TypeErrorDecoder_undefinedLiteralCallPattern,TypeErr
orDecoder_nullPropertyPattern,TypeErrorDecoder_nullLiteralPropertyPattern,TypeEr
rorDecoder_undefinedPropertyPattern,TypeErrorDecoder_undefinedLiteralPropertyPat
tern", | |
1913 TypeErrorDecoder_extractPattern: function(message) { | |
1914 var match, $arguments, argumentsExpr, expr, method, receiver; | |
1915 message = message.replace(String({}), '$receiver$').replace(new RegExp("[[\\]{
}()*+?.\\\\^$|]", 'g'), '\\$&'); | |
1916 match = message.match(/\\\$[a-zA-Z]+\\\$/g); | |
1917 if (match == null) | |
1918 match = []; | |
1919 $arguments = match.indexOf("\\$arguments\\$"); | |
1920 argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); | |
1921 expr = match.indexOf("\\$expr\\$"); | |
1922 method = match.indexOf("\\$method\\$"); | |
1923 receiver = match.indexOf("\\$receiver\\$"); | |
1924 return new H.TypeErrorDecoder(message.replace('\\$arguments\\$', '((?:x|[^x])*
)').replace('\\$argumentsExpr\\$', '((?:x|[^x])*)').replace('\\$expr\\$', '((?:x
|[^x])*)').replace('\\$method\\$', '((?:x|[^x])*)').replace('\\$receiver\\$', '(
(?:x|[^x])*)'), $arguments, argumentsExpr, expr, method, receiver); | |
1925 }, | |
1926 | |
1927 TypeErrorDecoder_provokeCallErrorOn: function(expression) { | |
1928 return function($expr$) { | |
1929 var $argumentsExpr$ = '$arguments$' | |
1930 try { | |
1931 $expr$.$method$($argumentsExpr$); | |
1932 } catch (e) { | |
1933 return e.message; | |
1934 } | |
1935 }(expression); | |
1936 }, | |
1937 | |
1938 TypeErrorDecoder_provokeCallErrorOnNull: function() { | |
1939 return function() { | |
1940 var $argumentsExpr$ = '$arguments$' | |
1941 try { | |
1942 null.$method$($argumentsExpr$); | |
1943 } catch (e) { | |
1944 return e.message; | |
1945 } | |
1946 }(); | |
1947 }, | |
1948 | |
1949 TypeErrorDecoder_provokeCallErrorOnUndefined: function() { | |
1950 return function() { | |
1951 var $argumentsExpr$ = '$arguments$' | |
1952 try { | |
1953 (void 0).$method$($argumentsExpr$); | |
1954 } catch (e) { | |
1955 return e.message; | |
1956 } | |
1957 }(); | |
1958 }, | |
1959 | |
1960 TypeErrorDecoder_provokePropertyErrorOn: function(expression) { | |
1961 return function($expr$) { | |
1962 try { | |
1963 $expr$.$method$; | |
1964 } catch (e) { | |
1965 return e.message; | |
1966 } | |
1967 }(expression); | |
1968 }, | |
1969 | |
1970 TypeErrorDecoder_provokePropertyErrorOnNull: function() { | |
1971 return function() { | |
1972 try { | |
1973 null.$method$; | |
1974 } catch (e) { | |
1975 return e.message; | |
1976 } | |
1977 }(); | |
1978 }, | |
1979 | |
1980 TypeErrorDecoder_provokePropertyErrorOnUndefined: function() { | |
1981 return function() { | |
1982 try { | |
1983 (void 0).$method$; | |
1984 } catch (e) { | |
1985 return e.message; | |
1986 } | |
1987 }(); | |
1988 }} | |
1989 | |
1990 }, | |
1991 | |
1992 NullError: {"": "Error;_message,_method", | |
1993 toString$0: function(_) { | |
1994 var t1 = this._method; | |
1995 if (t1 == null) | |
1996 return "NullError: " + H.S(this._message); | |
1997 return "NullError: Cannot call \"" + H.S(t1) + "\" on null"; | |
1998 }, | |
1999 $isError: true | |
2000 }, | |
2001 | |
2002 JsNoSuchMethodError: {"": "Error;_message,_method,_receiver", | |
2003 toString$0: function(_) { | |
2004 var t1, t2; | |
2005 t1 = this._method; | |
2006 if (t1 == null) | |
2007 return "NoSuchMethodError: " + H.S(this._message); | |
2008 t2 = this._receiver; | |
2009 if (t2 == null) | |
2010 return "NoSuchMethodError: Cannot call \"" + t1 + "\" (" + H.S(this._messa
ge) + ")"; | |
2011 return "NoSuchMethodError: Cannot call \"" + t1 + "\" on \"" + t2 + "\" (" +
H.S(this._message) + ")"; | |
2012 }, | |
2013 $isError: true, | |
2014 static: { | |
2015 JsNoSuchMethodError$: function(_message, match) { | |
2016 var t1, t2; | |
2017 t1 = match == null; | |
2018 t2 = t1 ? null : match.method; | |
2019 t1 = t1 ? null : match.receiver; | |
2020 return new H.JsNoSuchMethodError(_message, t2, t1); | |
2021 }} | |
2022 | |
2023 }, | |
2024 | |
2025 UnknownJsTypeError: {"": "Error;_message", | |
2026 toString$0: function(_) { | |
2027 var t1 = this._message; | |
2028 return C.JSString_methods.get$isEmpty(t1) ? "Error" : "Error: " + t1; | |
2029 } | |
2030 }, | |
2031 | |
2032 unwrapException_saveStackTrace: {"": "Closure;ex_0", | |
2033 call$1: function(error) { | |
2034 var t1 = J.getInterceptor(error); | |
2035 if (typeof error === "object" && error !== null && !!t1.$isError) | |
2036 if (error.$thrownJsError == null) | |
2037 error.$thrownJsError = this.ex_0; | |
2038 return error; | |
2039 }, | |
2040 $is_args1: true | |
2041 }, | |
2042 | |
2043 _StackTrace: {"": "Object;_exception,_trace", | |
2044 toString$0: function(_) { | |
2045 var t1, trace; | |
2046 t1 = this._trace; | |
2047 if (t1 != null) | |
2048 return t1; | |
2049 t1 = this._exception; | |
2050 trace = typeof t1 === "object" ? t1.stack : null; | |
2051 t1 = trace == null ? "" : trace; | |
2052 this._trace = t1; | |
2053 return t1; | |
2054 } | |
2055 }, | |
2056 | |
2057 invokeClosure_closure: {"": "Closure;closure_0", | |
2058 call$0: function() { | |
2059 return this.closure_0.call$0(); | |
2060 } | |
2061 }, | |
2062 | |
2063 invokeClosure_closure0: {"": "Closure;closure_1,arg1_2", | |
2064 call$0: function() { | |
2065 return this.closure_1.call$1(this.arg1_2); | |
2066 } | |
2067 }, | |
2068 | |
2069 invokeClosure_closure1: {"": "Closure;closure_3,arg1_4,arg2_5", | |
2070 call$0: function() { | |
2071 return this.closure_3.call$2(this.arg1_4, this.arg2_5); | |
2072 } | |
2073 }, | |
2074 | |
2075 invokeClosure_closure2: {"": "Closure;closure_6,arg1_7,arg2_8,arg3_9", | |
2076 call$0: function() { | |
2077 return this.closure_6.call$3(this.arg1_7, this.arg2_8, this.arg3_9); | |
2078 } | |
2079 }, | |
2080 | |
2081 invokeClosure_closure3: {"": "Closure;closure_10,arg1_11,arg2_12,arg3_13,arg4_14
", | |
2082 call$0: function() { | |
2083 return this.closure_10.call$4(this.arg1_11, this.arg2_12, this.arg3_13, this
.arg4_14); | |
2084 } | |
2085 }, | |
2086 | |
2087 Closure: {"": "Object;", | |
2088 toString$0: function(_) { | |
2089 return "Closure"; | |
2090 } | |
2091 }, | |
2092 | |
2093 BoundClosure: {"": "Closure;_self,__js_helper$_target,_receiver,__js_helper$_nam
e", | |
2094 $eq: function(_, other) { | |
2095 var t1; | |
2096 if (other == null) | |
2097 return false; | |
2098 if (this === other) | |
2099 return true; | |
2100 t1 = J.getInterceptor(other); | |
2101 if (typeof other !== "object" || other === null || !t1.$isBoundClosure) | |
2102 return false; | |
2103 return this._self === other._self && this.__js_helper$_target === other.__js
_helper$_target && this._receiver === other._receiver; | |
2104 }, | |
2105 get$hashCode: function(_) { | |
2106 var t1, receiverHashCode; | |
2107 t1 = this._receiver; | |
2108 if (t1 == null) | |
2109 receiverHashCode = H.Primitives_objectHashCode(this._self); | |
2110 else | |
2111 receiverHashCode = typeof t1 !== "object" ? J.get$hashCode$(t1) : H.Primit
ives_objectHashCode(t1); | |
2112 return (receiverHashCode ^ H.Primitives_objectHashCode(this.__js_helper$_tar
get)) >>> 0; | |
2113 }, | |
2114 $isBoundClosure: true | |
2115 }, | |
2116 | |
2117 initHooks_closure: {"": "Closure;getTag_0", | |
2118 call$1: function(o) { | |
2119 return this.getTag_0(o); | |
2120 }, | |
2121 $is_args1: true | |
2122 }, | |
2123 | |
2124 initHooks_closure0: {"": "Closure;getUnknownTag_1", | |
2125 call$2: function(o, tag) { | |
2126 return this.getUnknownTag_1(o, tag); | |
2127 }, | |
2128 $is_args2: true | |
2129 }, | |
2130 | |
2131 initHooks_closure1: {"": "Closure;prototypeForTag_2", | |
2132 call$1: function(tag) { | |
2133 return this.prototypeForTag_2(tag); | |
2134 }, | |
2135 $is_args1: true | |
2136 }}], | |
2137 ["dart._collection.dev", "dart:_collection-dev", , H, { | |
2138 Arrays_copy: function(src, srcStart, dst, dstStart, count) { | |
2139 var i, j, t1; | |
2140 if (srcStart < dstStart) | |
2141 for (i = srcStart + count - 1, j = dstStart + count - 1; i >= srcStart; --i,
--j) { | |
2142 if (i < 0 || i >= src.length) | |
2143 throw H.ioore(src, i); | |
2144 C.JSArray_methods.$indexSet(dst, j, src[i]); | |
2145 } | |
2146 else | |
2147 for (t1 = srcStart + count, j = dstStart, i = srcStart; i < t1; ++i, ++j) { | |
2148 if (i < 0 || i >= src.length) | |
2149 throw H.ioore(src, i); | |
2150 C.JSArray_methods.$indexSet(dst, j, src[i]); | |
2151 } | |
2152 }, | |
2153 | |
2154 IterableMixinWorkaround_forEach: function(iterable, f) { | |
2155 var t1; | |
2156 for (t1 = new H.ListIterator(iterable, iterable.length, 0, null); t1.moveNext$
0();) | |
2157 f.call$1(t1._current); | |
2158 }, | |
2159 | |
2160 IterableMixinWorkaround_toStringIterable: function(iterable, leftDelimiter, righ
tDelimiter) { | |
2161 var result, i, t1; | |
2162 for (i = 0; i < $.get$IterableMixinWorkaround__toStringList().length; ++i) { | |
2163 t1 = $.get$IterableMixinWorkaround__toStringList(); | |
2164 if (i >= t1.length) | |
2165 throw H.ioore(t1, i); | |
2166 if (t1[i] === iterable) | |
2167 return H.S(leftDelimiter) + "..." + H.S(rightDelimiter); | |
2168 } | |
2169 result = P.StringBuffer$(""); | |
2170 try { | |
2171 $.get$IterableMixinWorkaround__toStringList().push(iterable); | |
2172 result.write$1(leftDelimiter); | |
2173 result.writeAll$2(iterable, ", "); | |
2174 result.write$1(rightDelimiter); | |
2175 } finally { | |
2176 t1 = $.get$IterableMixinWorkaround__toStringList(); | |
2177 if (0 >= t1.length) | |
2178 throw H.ioore(t1, 0); | |
2179 t1.pop(); | |
2180 } | |
2181 return result.get$_contents(); | |
2182 }, | |
2183 | |
2184 IterableMixinWorkaround__rangeCheck: function(list, start, end) { | |
2185 if (start < 0 || start > list.length) | |
2186 throw H.wrapException(P.RangeError$range(start, 0, list.length)); | |
2187 if (end < start || end > list.length) | |
2188 throw H.wrapException(P.RangeError$range(end, start, list.length)); | |
2189 }, | |
2190 | |
2191 IterableMixinWorkaround_setRangeList: function(list, start, end, from, skipCount
) { | |
2192 var $length; | |
2193 H.IterableMixinWorkaround__rangeCheck(list, start, end); | |
2194 $length = end - start; | |
2195 if ($length === 0) | |
2196 return; | |
2197 if (skipCount < 0) | |
2198 throw H.wrapException(new P.ArgumentError(skipCount)); | |
2199 if (skipCount + $length > from.length) | |
2200 throw H.wrapException(P.StateError$("Not enough elements")); | |
2201 H.Arrays_copy(from, skipCount, list, start, $length); | |
2202 }, | |
2203 | |
2204 printToConsole: function(line) { | |
2205 if (typeof dartPrint == "function") { | |
2206 dartPrint(line); | |
2207 return; | |
2208 } | |
2209 if (typeof console == "object" && typeof console.log == "function") { | |
2210 console.log(line); | |
2211 return; | |
2212 } | |
2213 if (typeof window == "object") | |
2214 return; | |
2215 if (typeof print == "function") { | |
2216 print(line); | |
2217 return; | |
2218 } | |
2219 throw "Unable to print message: " + String(line); | |
2220 }, | |
2221 | |
2222 Symbol_getName: function(symbol) { | |
2223 return symbol.get$_name(); | |
2224 }, | |
2225 | |
2226 ListIterator: {"": "Object;_iterable,_length,_index,_current", | |
2227 get$current: function() { | |
2228 return this._current; | |
2229 }, | |
2230 moveNext$0: function() { | |
2231 var t1, t2, $length, t3; | |
2232 t1 = this._iterable; | |
2233 t2 = J.getInterceptor$asx(t1); | |
2234 $length = t2.get$length(t1); | |
2235 if (this._length !== $length) | |
2236 throw H.wrapException(P.ConcurrentModificationError$(t1)); | |
2237 t3 = this._index; | |
2238 if (t3 >= $length) { | |
2239 this._current = null; | |
2240 return false; | |
2241 } | |
2242 this._current = t2.elementAt$1(t1, t3); | |
2243 this._index = this._index + 1; | |
2244 return true; | |
2245 } | |
2246 }, | |
2247 | |
2248 MappedIterable: {"": "IterableBase;_iterable,_f", | |
2249 get$iterator: function(_) { | |
2250 var t1 = this._iterable; | |
2251 t1 = t1.get$iterator(t1); | |
2252 t1 = new H.MappedIterator(null, t1, this._f); | |
2253 H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "MappedIterable", 0
), H.getRuntimeTypeArgument(this, "MappedIterable", 1)]); | |
2254 return t1; | |
2255 }, | |
2256 get$length: function(_) { | |
2257 var t1 = this._iterable; | |
2258 return t1.get$length(t1); | |
2259 }, | |
2260 $asIterableBase: function($S, $T) { | |
2261 return [$T]; | |
2262 }, | |
2263 static: { | |
2264 MappedIterable_MappedIterable: function(iterable, $function, $S, $T) { | |
2265 var t1; | |
2266 if (!!iterable.$isEfficientLength) { | |
2267 t1 = new H.EfficientLengthMappedIterable(iterable, $function); | |
2268 H.setRuntimeTypeInfo(t1, [$S, $T]); | |
2269 return t1; | |
2270 } | |
2271 t1 = new H.MappedIterable(iterable, $function); | |
2272 H.setRuntimeTypeInfo(t1, [$S, $T]); | |
2273 return t1; | |
2274 }} | |
2275 | |
2276 }, | |
2277 | |
2278 EfficientLengthMappedIterable: {"": "MappedIterable;_iterable,_f", $asMappedIter
able: null, $isEfficientLength: true}, | |
2279 | |
2280 MappedIterator: {"": "Iterator;_current,_iterator,_f", | |
2281 _f$1: function(arg0) { | |
2282 return this._f.call$1(arg0); | |
2283 }, | |
2284 moveNext$0: function() { | |
2285 var t1 = this._iterator; | |
2286 if (t1.moveNext$0()) { | |
2287 this._current = this._f$1(t1.get$current()); | |
2288 return true; | |
2289 } | |
2290 this._current = null; | |
2291 return false; | |
2292 }, | |
2293 get$current: function() { | |
2294 return this._current; | |
2295 }, | |
2296 $asIterator: function($S, $T) { | |
2297 return [$T]; | |
2298 } | |
2299 }, | |
2300 | |
2301 FixedLengthListMixin: {"": "Object;"}}], | |
2302 ["dart.async", "dart:async", , P, { | |
2303 _invokeErrorHandler: function(errorHandler, error, stackTrace) { | |
2304 var t1 = J.getInterceptor(errorHandler); | |
2305 if (!!t1.$is_args2) | |
2306 return errorHandler.call$2(error, stackTrace); | |
2307 else | |
2308 return errorHandler.call$1(error); | |
2309 }, | |
2310 | |
2311 _registerErrorHandler: function(errorHandler, zone) { | |
2312 var t1 = J.getInterceptor(errorHandler); | |
2313 zone.toString; | |
2314 if (!!t1.$is_args2) | |
2315 return errorHandler; | |
2316 else | |
2317 return errorHandler; | |
2318 }, | |
2319 | |
2320 Future_wait: function(futures) { | |
2321 var t1, t2, t3, future, pos, t4, t5, result, completer; | |
2322 t1 = {}; | |
2323 t1.completer_0 = null; | |
2324 t1.values_1 = null; | |
2325 t2 = new P.Future_wait_handleError(t1); | |
2326 t1.remaining_2 = 0; | |
2327 for (t3 = new H.ListIterator(futures, futures.length, 0, null); t3.moveNext$0(
);) { | |
2328 future = t3._current; | |
2329 pos = t1.remaining_2; | |
2330 t1.remaining_2 = pos + 1; | |
2331 t4 = future.catchError$1(t2); | |
2332 t5 = $.Zone__current; | |
2333 t5.toString; | |
2334 result = new P._Future(0, t5, null, null, new P.Future_wait_closure(t1, pos)
, null, P._registerErrorHandler(null, t5), null); | |
2335 result.$builtinTypeInfo = [null]; | |
2336 t4._addListener$1(result); | |
2337 } | |
2338 t2 = t1.remaining_2; | |
2339 if (t2 === 0) | |
2340 return P._Future$immediate(C.List_empty, null); | |
2341 t1.values_1 = P.List_List(t2, null); | |
2342 t2 = J.JSArray; | |
2343 completer = new P._AsyncCompleter(P._Future$(t2)); | |
2344 H.setRuntimeTypeInfo(completer, [t2]); | |
2345 t1.completer_0 = completer; | |
2346 return t1.completer_0.future; | |
2347 }, | |
2348 | |
2349 _asyncRunCallback: function() { | |
2350 var callback, t1, exception, milliseconds; | |
2351 for (; t1 = $.get$_asyncCallbacks(), t1._head !== t1._tail;) { | |
2352 callback = $.get$_asyncCallbacks().removeFirst$0(); | |
2353 try { | |
2354 callback.call$0(); | |
2355 } catch (exception) { | |
2356 H.unwrapException(exception); | |
2357 milliseconds = C.JSNumber_methods.$tdiv(C.Duration_0._duration, 1000); | |
2358 H.TimerImpl$(milliseconds < 0 ? 0 : milliseconds, P._asyncRunCallback$clos
ure); | |
2359 throw exception; | |
2360 } | |
2361 | |
2362 } | |
2363 $._callbacksAreEnqueued = false; | |
2364 }, | |
2365 | |
2366 _scheduleAsyncCallback: function(callback) { | |
2367 $.get$_asyncCallbacks()._add$1(callback); | |
2368 if (!$._callbacksAreEnqueued) { | |
2369 P._createTimer(C.Duration_0, P._asyncRunCallback$closure); | |
2370 $._callbacksAreEnqueued = true; | |
2371 } | |
2372 }, | |
2373 | |
2374 scheduleMicrotask: function(callback) { | |
2375 var t1 = $.Zone__current; | |
2376 if (t1 === C.C__RootZone) { | |
2377 t1.toString; | |
2378 P._scheduleAsyncCallback(callback); | |
2379 return; | |
2380 } | |
2381 P._scheduleAsyncCallback(t1.bindCallback$2$runGuarded(callback, true)); | |
2382 }, | |
2383 | |
2384 StreamController_StreamController: function(onCancel, onListen, onPause, onResum
e, sync, $T) { | |
2385 var t1; | |
2386 if (sync) { | |
2387 t1 = new P._SyncStreamController(onListen, onPause, onResume, onCancel, null
, 0, null); | |
2388 H.setRuntimeTypeInfo(t1, [$T]); | |
2389 } else { | |
2390 t1 = new P._AsyncStreamController(onListen, onPause, onResume, onCancel, nul
l, 0, null); | |
2391 H.setRuntimeTypeInfo(t1, [$T]); | |
2392 } | |
2393 return t1; | |
2394 }, | |
2395 | |
2396 _runGuarded: function(notificationHandler) { | |
2397 var result, e, s, t1, t2, exception; | |
2398 if (notificationHandler == null) | |
2399 return; | |
2400 try { | |
2401 result = notificationHandler.call$0(); | |
2402 t1 = result; | |
2403 t2 = J.getInterceptor(t1); | |
2404 if (typeof t1 === "object" && t1 !== null && !!t2.$isFuture) | |
2405 return result; | |
2406 return; | |
2407 } catch (exception) { | |
2408 t1 = H.unwrapException(exception); | |
2409 e = t1; | |
2410 s = new H._StackTrace(exception, null); | |
2411 t1 = $.Zone__current; | |
2412 t1.toString; | |
2413 P._rootHandleUncaughtError(t1, null, t1, e, s); | |
2414 } | |
2415 | |
2416 }, | |
2417 | |
2418 _nullDataHandler: function(value) { | |
2419 }, | |
2420 | |
2421 _nullErrorHandler: function(error, stackTrace) { | |
2422 var t1 = $.Zone__current; | |
2423 t1.toString; | |
2424 P._rootHandleUncaughtError(t1, null, t1, error, stackTrace); | |
2425 }, | |
2426 | |
2427 _nullDoneHandler: function() { | |
2428 }, | |
2429 | |
2430 _runUserCode: function(userCode, onSuccess, onError) { | |
2431 var e, s, exception, t1; | |
2432 try { | |
2433 onSuccess.call$1(userCode.call$0()); | |
2434 } catch (exception) { | |
2435 t1 = H.unwrapException(exception); | |
2436 e = t1; | |
2437 s = new H._StackTrace(exception, null); | |
2438 onError.call$2(e, s); | |
2439 } | |
2440 | |
2441 }, | |
2442 | |
2443 _cancelAndError: function(subscription, future, error, stackTrace) { | |
2444 var cancelFuture, t1; | |
2445 cancelFuture = subscription.cancel$0(); | |
2446 t1 = J.getInterceptor(cancelFuture); | |
2447 if (typeof cancelFuture === "object" && cancelFuture !== null && !!t1.$isFutur
e) | |
2448 cancelFuture.whenComplete$1(new P._cancelAndError_closure(future, error, sta
ckTrace)); | |
2449 else | |
2450 future._completeError$2(error, stackTrace); | |
2451 }, | |
2452 | |
2453 _cancelAndErrorClosure: function(subscription, future) { | |
2454 return new P._cancelAndErrorClosure_closure(subscription, future); | |
2455 }, | |
2456 | |
2457 Timer_Timer: function(duration, callback) { | |
2458 var t1 = $.Zone__current; | |
2459 if (t1 === C.C__RootZone) { | |
2460 t1.toString; | |
2461 return P._createTimer(duration, callback); | |
2462 } | |
2463 return P._createTimer(duration, t1.bindCallback$2$runGuarded(callback, true)); | |
2464 }, | |
2465 | |
2466 _createTimer: function(duration, callback) { | |
2467 var milliseconds = C.JSNumber_methods.$tdiv(duration._duration, 1000); | |
2468 return H.TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback); | |
2469 }, | |
2470 | |
2471 _rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) { | |
2472 P._rootRun($self, null, $self, new P._rootHandleUncaughtError_closure(error, s
tackTrace)); | |
2473 }, | |
2474 | |
2475 _rootRun: function($self, $parent, zone, f) { | |
2476 var old, t1, t2; | |
2477 t1 = $.Zone__current; | |
2478 t2 = zone; | |
2479 if (t1 == null ? t2 == null : t1 === t2) | |
2480 return f.call$0(); | |
2481 old = t1; | |
2482 try { | |
2483 $.Zone__current = zone; | |
2484 t1 = f.call$0(); | |
2485 return t1; | |
2486 } finally { | |
2487 $.Zone__current = old; | |
2488 } | |
2489 }, | |
2490 | |
2491 _rootRunUnary: function($self, $parent, zone, f, arg) { | |
2492 var old, t1, t2; | |
2493 t1 = $.Zone__current; | |
2494 t2 = zone; | |
2495 if (t1 == null ? t2 == null : t1 === t2) | |
2496 return f.call$1(arg); | |
2497 old = t1; | |
2498 try { | |
2499 $.Zone__current = zone; | |
2500 t1 = f.call$1(arg); | |
2501 return t1; | |
2502 } finally { | |
2503 $.Zone__current = old; | |
2504 } | |
2505 }, | |
2506 | |
2507 _AsyncError: {"": "Object;error>,stackTrace<", $isError: true}, | |
2508 | |
2509 Future: {"": "Object;", $isFuture: true}, | |
2510 | |
2511 Future_wait_handleError: {"": "Closure;box_0", | |
2512 call$1: function(error) { | |
2513 var t1 = this.box_0; | |
2514 if (t1.values_1 != null) { | |
2515 t1.values_1 = null; | |
2516 t1.completer_0.completeError$1(error); | |
2517 } | |
2518 return; | |
2519 }, | |
2520 $is_args1: true | |
2521 }, | |
2522 | |
2523 Future_wait_closure: {"": "Closure;box_0,pos_1", | |
2524 call$1: function(value) { | |
2525 var t1, t2, t3; | |
2526 t1 = this.box_0; | |
2527 t2 = t1.values_1; | |
2528 if (t2 == null) | |
2529 return; | |
2530 t3 = this.pos_1; | |
2531 if (t3 < 0 || t3 >= t2.length) | |
2532 throw H.ioore(t2, t3); | |
2533 t2[t3] = value; | |
2534 t1.remaining_2 = t1.remaining_2 - 1; | |
2535 if (t1.remaining_2 === 0) { | |
2536 t2 = t1.completer_0; | |
2537 t1 = t1.values_1; | |
2538 t2 = t2.future; | |
2539 if (t2._state !== 0) | |
2540 H.throwExpression(P.StateError$("Future already completed")); | |
2541 t2._asyncComplete$1(t1); | |
2542 } | |
2543 }, | |
2544 $is_args1: true | |
2545 }, | |
2546 | |
2547 _Completer: {"": "Object;"}, | |
2548 | |
2549 _AsyncCompleter: {"": "_Completer;future", | |
2550 completeError$2: function(error, stackTrace) { | |
2551 var t1; | |
2552 if (error == null) | |
2553 throw H.wrapException(new P.ArgumentError("Error must not be null")); | |
2554 t1 = this.future; | |
2555 if (t1._state !== 0) | |
2556 throw H.wrapException(P.StateError$("Future already completed")); | |
2557 t1._asyncCompleteError$2(error, stackTrace); | |
2558 }, | |
2559 completeError$1: function(error) { | |
2560 return this.completeError$2(error, null); | |
2561 }, | |
2562 $as_Completer: null | |
2563 }, | |
2564 | |
2565 _Future: {"": "Object;_state,_zone<,_resultOrListeners,_nextListener<,_onValueCa
llback,_errorTestCallback,_onErrorCallback,_whenCompleteActionCallback", | |
2566 get$_isComplete: function() { | |
2567 return this._state >= 4; | |
2568 }, | |
2569 get$_hasError: function() { | |
2570 return this._state === 8; | |
2571 }, | |
2572 set$_isChained: function(value) { | |
2573 if (value) | |
2574 this._state = 2; | |
2575 else | |
2576 this._state = 0; | |
2577 }, | |
2578 get$_onValue: function() { | |
2579 return this._state === 2 ? null : this._onValueCallback; | |
2580 }, | |
2581 _onValue$1: function(arg0) { | |
2582 return this.get$_onValue().call$1(arg0); | |
2583 }, | |
2584 get$_whenCompleteAction: function() { | |
2585 return this._state === 2 ? null : this._whenCompleteActionCallback; | |
2586 }, | |
2587 _whenCompleteAction$0: function() { | |
2588 return this.get$_whenCompleteAction().call$0(); | |
2589 }, | |
2590 then$2$onError: function(f, onError) { | |
2591 var result = P._Future$_then(f, onError, null); | |
2592 this._addListener$1(result); | |
2593 return result; | |
2594 }, | |
2595 then$1: function(f) { | |
2596 return this.then$2$onError(f, null); | |
2597 }, | |
2598 catchError$2$test: function(onError, test) { | |
2599 var result = P._Future$_catchError(onError, test, null); | |
2600 this._addListener$1(result); | |
2601 return result; | |
2602 }, | |
2603 catchError$1: function(onError) { | |
2604 return this.catchError$2$test(onError, null); | |
2605 }, | |
2606 whenComplete$1: function(action) { | |
2607 var result = P._Future$_whenComplete(action, H.getRuntimeTypeArgument(this,
"_Future", 0)); | |
2608 this._addListener$1(result); | |
2609 return result; | |
2610 }, | |
2611 get$_value: function() { | |
2612 return this._resultOrListeners; | |
2613 }, | |
2614 get$_error: function() { | |
2615 return this._resultOrListeners; | |
2616 }, | |
2617 _setValue$1: function(value) { | |
2618 this._state = 4; | |
2619 this._resultOrListeners = value; | |
2620 }, | |
2621 _setError$2: function(error, stackTrace) { | |
2622 this._state = 8; | |
2623 this._resultOrListeners = new P._AsyncError(error, stackTrace); | |
2624 }, | |
2625 _addListener$1: function(listener) { | |
2626 if (this._state >= 4) { | |
2627 this._zone.toString; | |
2628 P._scheduleAsyncCallback(new P._Future__addListener_closure(this, listener
)); | |
2629 } else { | |
2630 listener._nextListener = this._resultOrListeners; | |
2631 this._resultOrListeners = listener; | |
2632 } | |
2633 }, | |
2634 _removeListeners$0: function() { | |
2635 var current, prev, next; | |
2636 current = this._resultOrListeners; | |
2637 this._resultOrListeners = null; | |
2638 for (prev = null; current != null; prev = current, current = next) { | |
2639 next = current.get$_nextListener(); | |
2640 current._nextListener = prev; | |
2641 } | |
2642 return prev; | |
2643 }, | |
2644 _complete$1: function(value) { | |
2645 var t1, listeners; | |
2646 t1 = J.getInterceptor(value); | |
2647 if (typeof value === "object" && value !== null && !!t1.$isFuture) { | |
2648 P._Future__chainFutures(value, this); | |
2649 return; | |
2650 } | |
2651 listeners = this._removeListeners$0(); | |
2652 this._setValue$1(value); | |
2653 P._Future__propagateToListeners(this, listeners); | |
2654 }, | |
2655 _completeError$2: function(error, stackTrace) { | |
2656 var listeners = this._removeListeners$0(); | |
2657 this._setError$2(error, stackTrace); | |
2658 P._Future__propagateToListeners(this, listeners); | |
2659 }, | |
2660 get$_completeError: function() { | |
2661 return new P.BoundClosure$2(this, P._Future.prototype._completeError$2, null
, "_completeError$2"); | |
2662 }, | |
2663 _asyncComplete$1: function(value) { | |
2664 if (this._state !== 0) | |
2665 H.throwExpression(P.StateError$("Future already completed")); | |
2666 this._state = 1; | |
2667 this._zone.toString; | |
2668 P._scheduleAsyncCallback(new P._Future__asyncComplete_closure(this, value)); | |
2669 }, | |
2670 _asyncCompleteError$2: function(error, stackTrace) { | |
2671 if (this._state !== 0) | |
2672 H.throwExpression(P.StateError$("Future already completed")); | |
2673 this._state = 1; | |
2674 this._zone.toString; | |
2675 P._scheduleAsyncCallback(new P._Future__asyncCompleteError_closure(this, err
or, stackTrace)); | |
2676 }, | |
2677 _async$_Future$immediate$1: function(value, $T) { | |
2678 this._asyncComplete$1(value); | |
2679 }, | |
2680 $is_Future: true, | |
2681 $isFuture: true, | |
2682 static: { | |
2683 "": "_Future__INCOMPLETE,_Future__PENDING_COMPLETE,_Future__CHAINED,_Future__VAL
UE,_Future__ERROR", | |
2684 _Future$: function($T) { | |
2685 var t1 = new P._Future(0, $.Zone__current, null, null, null, null, null, null)
; | |
2686 H.setRuntimeTypeInfo(t1, [$T]); | |
2687 return t1; | |
2688 }, | |
2689 | |
2690 _Future$immediate: function(value, $T) { | |
2691 var t1 = new P._Future(0, $.Zone__current, null, null, null, null, null, null)
; | |
2692 H.setRuntimeTypeInfo(t1, [$T]); | |
2693 t1._async$_Future$immediate$1(value, $T); | |
2694 return t1; | |
2695 }, | |
2696 | |
2697 _Future$_then: function(onValueCallback, onErrorCallback, $T) { | |
2698 var t1 = $.Zone__current; | |
2699 t1.toString; | |
2700 t1 = new P._Future(0, t1, null, null, onValueCallback, null, P._registerErrorH
andler(onErrorCallback, t1), null); | |
2701 H.setRuntimeTypeInfo(t1, [$T]); | |
2702 return t1; | |
2703 }, | |
2704 | |
2705 _Future$_catchError: function(onErrorCallback, errorTestCallback, $T) { | |
2706 var t1, t2; | |
2707 t1 = $.Zone__current; | |
2708 t2 = P._registerErrorHandler(onErrorCallback, t1); | |
2709 t1.toString; | |
2710 t2 = new P._Future(0, t1, null, null, null, errorTestCallback, t2, null); | |
2711 H.setRuntimeTypeInfo(t2, [$T]); | |
2712 return t2; | |
2713 }, | |
2714 | |
2715 _Future$_whenComplete: function(whenCompleteActionCallback, $T) { | |
2716 var t1 = $.Zone__current; | |
2717 t1.toString; | |
2718 t1 = new P._Future(0, t1, null, null, null, null, null, whenCompleteActionCall
back); | |
2719 H.setRuntimeTypeInfo(t1, [$T]); | |
2720 return t1; | |
2721 }, | |
2722 | |
2723 _Future__chainFutures: function(source, target) { | |
2724 var t1; | |
2725 target._state = 2; | |
2726 t1 = J.getInterceptor(source); | |
2727 if (typeof source === "object" && source !== null && !!t1.$is_Future) | |
2728 if (source._state >= 4) | |
2729 P._Future__propagateToListeners(source, target); | |
2730 else | |
2731 source._addListener$1(target); | |
2732 else | |
2733 source.then$2$onError(new P._Future__chainFutures_closure(target), new P._Fu
ture__chainFutures_closure0(target)); | |
2734 }, | |
2735 | |
2736 _Future__propagateMultipleListeners: function(source, listeners) { | |
2737 var listeners0; | |
2738 do { | |
2739 listeners0 = listeners.get$_nextListener(); | |
2740 listeners._nextListener = null; | |
2741 P._Future__propagateToListeners(source, listeners); | |
2742 if (listeners0 != null) { | |
2743 listeners = listeners0; | |
2744 continue; | |
2745 } else | |
2746 break; | |
2747 } while (true); | |
2748 }, | |
2749 | |
2750 _Future__propagateToListeners: function(source, listeners) { | |
2751 var t1, t2, hasError, asyncError, t3, t4, t5, chainSource, listeners0; | |
2752 t1 = {}; | |
2753 t1.source_4 = source; | |
2754 for (; true;) { | |
2755 t2 = {}; | |
2756 if (!t1.source_4.get$_isComplete()) | |
2757 return; | |
2758 hasError = t1.source_4.get$_hasError(); | |
2759 if (hasError && listeners == null) { | |
2760 t2 = t1.source_4; | |
2761 asyncError = t2.get$_error(); | |
2762 t2 = t2._zone; | |
2763 t3 = J.get$error$x(asyncError); | |
2764 t4 = asyncError.get$stackTrace(); | |
2765 t2.toString; | |
2766 P._rootHandleUncaughtError(t2, null, t2, t3, t4); | |
2767 return; | |
2768 } | |
2769 if (listeners == null) | |
2770 return; | |
2771 if (listeners._nextListener != null) { | |
2772 P._Future__propagateMultipleListeners(t1.source_4, listeners); | |
2773 return; | |
2774 } | |
2775 if (hasError) { | |
2776 t3 = t1.source_4.get$_zone(); | |
2777 t4 = listeners._zone; | |
2778 t3.toString; | |
2779 t4.toString; | |
2780 t3 = t4 == null ? t3 != null : t4 !== t3; | |
2781 } else | |
2782 t3 = false; | |
2783 if (t3) { | |
2784 t2 = t1.source_4; | |
2785 asyncError = t2.get$_error(); | |
2786 t2 = t2._zone; | |
2787 t3 = J.get$error$x(asyncError); | |
2788 t4 = asyncError.get$stackTrace(); | |
2789 t2.toString; | |
2790 P._rootHandleUncaughtError(t2, null, t2, t3, t4); | |
2791 return; | |
2792 } | |
2793 t3 = $.Zone__current; | |
2794 t4 = listeners._zone; | |
2795 if (t3 == null ? t4 != null : t3 !== t4) { | |
2796 t4.toString; | |
2797 P._rootRun(t4, null, t4, new P._Future__propagateToListeners_closure(t1, l
isteners)); | |
2798 return; | |
2799 } | |
2800 t2.listenerHasValue_1 = null; | |
2801 t2.listenerValueOrError_2 = null; | |
2802 t2.isPropagationAborted_3 = false; | |
2803 t4.toString; | |
2804 P._rootRun(t4, null, t4, new P._Future__propagateToListeners_closure0(t1, t2
, hasError, listeners)); | |
2805 if (t2.isPropagationAborted_3) | |
2806 return; | |
2807 t3 = t2.listenerHasValue_1 === true; | |
2808 if (t3) { | |
2809 t4 = t2.listenerValueOrError_2; | |
2810 t5 = J.getInterceptor(t4); | |
2811 t5 = typeof t4 === "object" && t4 !== null && !!t5.$isFuture; | |
2812 t4 = t5; | |
2813 } else | |
2814 t4 = false; | |
2815 if (t4) { | |
2816 chainSource = t2.listenerValueOrError_2; | |
2817 t2 = J.getInterceptor(chainSource); | |
2818 if (typeof chainSource === "object" && chainSource !== null && !!t2.$is_Fu
ture && chainSource._state >= 4) { | |
2819 listeners._state = 2; | |
2820 t1.source_4 = chainSource; | |
2821 continue; | |
2822 } | |
2823 P._Future__chainFutures(chainSource, listeners); | |
2824 return; | |
2825 } | |
2826 if (t3) { | |
2827 listeners0 = listeners._removeListeners$0(); | |
2828 t2 = t2.listenerValueOrError_2; | |
2829 listeners._state = 4; | |
2830 listeners._resultOrListeners = t2; | |
2831 } else { | |
2832 listeners0 = listeners._removeListeners$0(); | |
2833 asyncError = t2.listenerValueOrError_2; | |
2834 t2 = J.get$error$x(asyncError); | |
2835 t3 = asyncError.get$stackTrace(); | |
2836 listeners._state = 8; | |
2837 listeners._resultOrListeners = new P._AsyncError(t2, t3); | |
2838 } | |
2839 t1.source_4 = listeners; | |
2840 listeners = listeners0; | |
2841 } | |
2842 }} | |
2843 | |
2844 }, | |
2845 | |
2846 _Future__addListener_closure: {"": "Closure;this_0,listener_1", | |
2847 call$0: function() { | |
2848 P._Future__propagateToListeners(this.this_0, this.listener_1); | |
2849 } | |
2850 }, | |
2851 | |
2852 _Future__chainFutures_closure: {"": "Closure;target_0", | |
2853 call$1: function(value) { | |
2854 this.target_0._complete$1(value); | |
2855 }, | |
2856 $is_args1: true | |
2857 }, | |
2858 | |
2859 _Future__chainFutures_closure0: {"": "Closure;target_1", | |
2860 call$2: function(error, stackTrace) { | |
2861 this.target_1._completeError$2(error, stackTrace); | |
2862 }, | |
2863 call$1: function(error) { | |
2864 return this.call$2(error, null); | |
2865 }, | |
2866 $is_args2: true, | |
2867 $is_args1: true | |
2868 }, | |
2869 | |
2870 _Future__asyncComplete_closure: {"": "Closure;this_0,value_1", | |
2871 call$0: function() { | |
2872 this.this_0._complete$1(this.value_1); | |
2873 } | |
2874 }, | |
2875 | |
2876 _Future__asyncCompleteError_closure: {"": "Closure;this_0,error_1,stackTrace_2", | |
2877 call$0: function() { | |
2878 this.this_0._completeError$2(this.error_1, this.stackTrace_2); | |
2879 } | |
2880 }, | |
2881 | |
2882 _Future__propagateToListeners_closure: {"": "Closure;box_2,listener_3", | |
2883 call$0: function() { | |
2884 P._Future__propagateToListeners(this.box_2.source_4, this.listener_3); | |
2885 } | |
2886 }, | |
2887 | |
2888 _Future__propagateToListeners_closure0: {"": "Closure;box_2,box_1,hasError_4,lis
tener_5", | |
2889 call$0: function() { | |
2890 var t1, value, asyncError, test, matchesTest, errorCallback, e, s, t2, t3, t
4, exception; | |
2891 t1 = {}; | |
2892 try { | |
2893 t2 = this.box_2; | |
2894 if (!this.hasError_4) { | |
2895 value = t2.source_4.get$_value(); | |
2896 t2 = this.listener_5; | |
2897 t3 = t2._state === 2 ? null : t2._onValueCallback; | |
2898 t4 = this.box_1; | |
2899 if (t3 != null) { | |
2900 t4.listenerValueOrError_2 = t2._onValue$1(value); | |
2901 t4.listenerHasValue_1 = true; | |
2902 } else { | |
2903 t4.listenerValueOrError_2 = value; | |
2904 t4.listenerHasValue_1 = true; | |
2905 } | |
2906 } else { | |
2907 asyncError = t2.source_4.get$_error(); | |
2908 t2 = this.listener_5; | |
2909 test = t2._state === 2 ? null : t2._errorTestCallback; | |
2910 matchesTest = true; | |
2911 if (test != null) | |
2912 matchesTest = test.call$1(J.get$error$x(asyncError)); | |
2913 if (matchesTest === true) | |
2914 t3 = (t2._state === 2 ? null : t2._onErrorCallback) != null; | |
2915 else | |
2916 t3 = false; | |
2917 if (t3) { | |
2918 errorCallback = t2._state === 2 ? null : t2._onErrorCallback; | |
2919 t2 = this.box_1; | |
2920 t2.listenerValueOrError_2 = P._invokeErrorHandler(errorCallback, J.get
$error$x(asyncError), asyncError.get$stackTrace()); | |
2921 t2.listenerHasValue_1 = true; | |
2922 } else { | |
2923 t2 = this.box_1; | |
2924 t2.listenerValueOrError_2 = asyncError; | |
2925 t2.listenerHasValue_1 = false; | |
2926 } | |
2927 } | |
2928 t2 = this.listener_5; | |
2929 if ((t2._state === 2 ? null : t2._whenCompleteActionCallback) != null) { | |
2930 t1.completeResult_0 = t2._whenCompleteAction$0(); | |
2931 t3 = t1.completeResult_0; | |
2932 t4 = J.getInterceptor(t3); | |
2933 if (typeof t3 === "object" && t3 !== null && !!t4.$isFuture) { | |
2934 t2.set$_isChained(true); | |
2935 t1.completeResult_0.then$2$onError(new P._Future__propagateToListeners
__closure(this.box_2, t2), new P._Future__propagateToListeners__closure0(t1, t2)
); | |
2936 this.box_1.isPropagationAborted_3 = true; | |
2937 } | |
2938 } | |
2939 } catch (exception) { | |
2940 t1 = H.unwrapException(exception); | |
2941 e = t1; | |
2942 s = new H._StackTrace(exception, null); | |
2943 if (this.hasError_4) { | |
2944 t1 = J.get$error$x(this.box_2.source_4.get$_error()); | |
2945 t2 = e; | |
2946 t2 = t1 == null ? t2 == null : t1 === t2; | |
2947 t1 = t2; | |
2948 } else | |
2949 t1 = false; | |
2950 t2 = this.box_1; | |
2951 if (t1) | |
2952 t2.listenerValueOrError_2 = this.box_2.source_4.get$_error(); | |
2953 else | |
2954 t2.listenerValueOrError_2 = new P._AsyncError(e, s); | |
2955 this.box_1.listenerHasValue_1 = false; | |
2956 } | |
2957 | |
2958 } | |
2959 }, | |
2960 | |
2961 _Future__propagateToListeners__closure: {"": "Closure;box_2,listener_6", | |
2962 call$1: function(ignored) { | |
2963 P._Future__propagateToListeners(this.box_2.source_4, this.listener_6); | |
2964 }, | |
2965 $is_args1: true | |
2966 }, | |
2967 | |
2968 _Future__propagateToListeners__closure0: {"": "Closure;box_0,listener_7", | |
2969 call$2: function(error, stackTrace) { | |
2970 var t1, t2, t3; | |
2971 t1 = this.box_0; | |
2972 t2 = t1.completeResult_0; | |
2973 t3 = J.getInterceptor(t2); | |
2974 if (typeof t2 !== "object" || t2 === null || !t3.$is_Future) { | |
2975 t1.completeResult_0 = P._Future$(null); | |
2976 t1.completeResult_0._setError$2(error, stackTrace); | |
2977 } | |
2978 P._Future__propagateToListeners(t1.completeResult_0, this.listener_7); | |
2979 }, | |
2980 call$1: function(error) { | |
2981 return this.call$2(error, null); | |
2982 }, | |
2983 $is_args2: true, | |
2984 $is_args1: true | |
2985 }, | |
2986 | |
2987 Stream: {"": "Object;", | |
2988 forEach$1: function(_, action) { | |
2989 var t1, future; | |
2990 t1 = {}; | |
2991 future = P._Future$(null); | |
2992 t1.subscription_0 = null; | |
2993 t1.subscription_0 = this.listen$4$cancelOnError$onDone$onError(new P.Stream_
forEach_closure(t1, this, action, future), true, new P.Stream_forEach_closure0(f
uture), future.get$_completeError()); | |
2994 return future; | |
2995 }, | |
2996 get$length: function(_) { | |
2997 var t1, future; | |
2998 t1 = {}; | |
2999 future = P._Future$(J.JSInt); | |
3000 t1.count_0 = 0; | |
3001 this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1),
true, new P.Stream_length_closure0(t1, future), future.get$_completeError()); | |
3002 return future; | |
3003 } | |
3004 }, | |
3005 | |
3006 Stream_forEach_closure: {"": "Closure;box_0,this_1,action_2,future_3", | |
3007 call$1: function(element) { | |
3008 P._runUserCode(new P.Stream_forEach__closure(this.action_2, element), new P.
Stream_forEach__closure0(), P._cancelAndErrorClosure(this.box_0.subscription_0,
this.future_3)); | |
3009 }, | |
3010 $is_args1: true | |
3011 }, | |
3012 | |
3013 Stream_forEach__closure: {"": "Closure;action_4,element_5", | |
3014 call$0: function() { | |
3015 return this.action_4.call$1(this.element_5); | |
3016 } | |
3017 }, | |
3018 | |
3019 Stream_forEach__closure0: {"": "Closure;", | |
3020 call$1: function(_) { | |
3021 }, | |
3022 $is_args1: true | |
3023 }, | |
3024 | |
3025 Stream_forEach_closure0: {"": "Closure;future_6", | |
3026 call$0: function() { | |
3027 this.future_6._complete$1(null); | |
3028 } | |
3029 }, | |
3030 | |
3031 Stream_length_closure: {"": "Closure;box_0", | |
3032 call$1: function(_) { | |
3033 var t1 = this.box_0; | |
3034 t1.count_0 = t1.count_0 + 1; | |
3035 }, | |
3036 $is_args1: true | |
3037 }, | |
3038 | |
3039 Stream_length_closure0: {"": "Closure;box_0,future_1", | |
3040 call$0: function() { | |
3041 this.future_1._complete$1(this.box_0.count_0); | |
3042 } | |
3043 }, | |
3044 | |
3045 StreamSubscription: {"": "Object;"}, | |
3046 | |
3047 _StreamController: {"": "Object;", | |
3048 get$_pendingEvents: function() { | |
3049 if ((this._state & 8) === 0) | |
3050 return this._varData; | |
3051 return this._varData.get$varData(); | |
3052 }, | |
3053 _ensurePendingEvents$0: function() { | |
3054 if ((this._state & 8) === 0) { | |
3055 if (this._varData == null) | |
3056 this._varData = new P._StreamImplEvents(null, null, 0); | |
3057 return this._varData; | |
3058 } | |
3059 var t1 = this._varData.get$varData(); | |
3060 return t1; | |
3061 }, | |
3062 get$_subscription: function() { | |
3063 if ((this._state & 8) !== 0) | |
3064 return this._varData.get$varData(); | |
3065 return this._varData; | |
3066 }, | |
3067 _badEventState$0: function() { | |
3068 if ((this._state & 4) !== 0) | |
3069 return new P.StateError("Cannot add event after closing"); | |
3070 return new P.StateError("Cannot add event while adding a stream"); | |
3071 }, | |
3072 _ensureDoneFuture$0: function() { | |
3073 if (this._doneFuture == null) { | |
3074 this._doneFuture = P._Future$(null); | |
3075 if ((this._state & 2) !== 0) | |
3076 this._doneFuture._complete$1(null); | |
3077 } | |
3078 return this._doneFuture; | |
3079 }, | |
3080 close$0: function(_) { | |
3081 var t1 = this._state; | |
3082 if ((t1 & 4) !== 0) | |
3083 return this._doneFuture; | |
3084 if (t1 >= 4) | |
3085 throw H.wrapException(this._badEventState$0()); | |
3086 this._state = (t1 | 4) >>> 0; | |
3087 this._ensureDoneFuture$0(); | |
3088 t1 = this._state; | |
3089 if ((t1 & 1) !== 0) | |
3090 this._sendDone$0(); | |
3091 else if ((t1 & 3) === 0) { | |
3092 t1 = this._ensurePendingEvents$0(); | |
3093 t1.add$1(t1, C.C__DelayedDone); | |
3094 } | |
3095 return this._doneFuture; | |
3096 }, | |
3097 _async$_add$1: function(value) { | |
3098 var t1 = this._state; | |
3099 if ((t1 & 1) !== 0) | |
3100 this._sendData$1(value); | |
3101 else if ((t1 & 3) === 0) { | |
3102 t1 = this._ensurePendingEvents$0(); | |
3103 t1.add$1(t1, new P._DelayedData(value, null)); | |
3104 } | |
3105 }, | |
3106 _subscribe$1: function(cancelOnError) { | |
3107 var t1, t2, subscription, pendingEvents, addState; | |
3108 if ((this._state & 3) !== 0) | |
3109 throw H.wrapException(P.StateError$("Stream has already been listened to."
)); | |
3110 t1 = $.Zone__current; | |
3111 t2 = cancelOnError ? 1 : 0; | |
3112 subscription = new P._ControllerSubscription(this, null, null, null, t1, t2,
null, null); | |
3113 H.setRuntimeTypeInfo(subscription, [null]); | |
3114 pendingEvents = this.get$_pendingEvents(); | |
3115 this._state = (this._state | 1) >>> 0; | |
3116 if ((this._state & 8) !== 0) { | |
3117 addState = this._varData; | |
3118 addState.set$varData(subscription); | |
3119 addState.resume$0(); | |
3120 } else | |
3121 this._varData = subscription; | |
3122 subscription._setPendingEvents$1(pendingEvents); | |
3123 subscription._guardCallback$1(new P._StreamController__subscribe_closure(thi
s)); | |
3124 return subscription; | |
3125 }, | |
3126 _recordCancel$1: function(subscription) { | |
3127 var t1, future; | |
3128 if ((this._state & 8) !== 0) | |
3129 this._varData.cancel$0(); | |
3130 this._varData = null; | |
3131 this._state = (this._state & 4294967286 | 2) >>> 0; | |
3132 t1 = new P._StreamController__recordCancel_complete(this); | |
3133 future = P._runGuarded(this.get$_onCancel()); | |
3134 if (future != null) | |
3135 future = future.whenComplete$1(t1); | |
3136 else | |
3137 t1.call$0(); | |
3138 return future; | |
3139 } | |
3140 }, | |
3141 | |
3142 _StreamController__subscribe_closure: {"": "Closure;this_0", | |
3143 call$0: function() { | |
3144 P._runGuarded(this.this_0.get$_onListen()); | |
3145 } | |
3146 }, | |
3147 | |
3148 _StreamController__recordCancel_complete: {"": "Closure;this_0", | |
3149 call$0: function() { | |
3150 var t1 = this.this_0._doneFuture; | |
3151 if (t1 != null && t1._state === 0) | |
3152 t1._asyncComplete$1(null); | |
3153 } | |
3154 }, | |
3155 | |
3156 _SyncStreamControllerDispatch: {"": "Object;", | |
3157 _sendData$1: function(data) { | |
3158 this.get$_subscription()._async$_add$1(data); | |
3159 }, | |
3160 _sendDone$0: function() { | |
3161 this.get$_subscription()._close$0(); | |
3162 } | |
3163 }, | |
3164 | |
3165 _AsyncStreamControllerDispatch: {"": "Object;", | |
3166 _sendData$1: function(data) { | |
3167 this.get$_subscription()._addPending$1(new P._DelayedData(data, null)); | |
3168 }, | |
3169 _sendDone$0: function() { | |
3170 this.get$_subscription()._addPending$1(C.C__DelayedDone); | |
3171 } | |
3172 }, | |
3173 | |
3174 _AsyncStreamController: {"": "_StreamController__AsyncStreamControllerDispatch;_
onListen<,_onPause<,_onResume<,_onCancel<,_varData,_state,_doneFuture"}, | |
3175 | |
3176 _StreamController__AsyncStreamControllerDispatch: {"": "_StreamController+_Async
StreamControllerDispatch;"}, | |
3177 | |
3178 _SyncStreamController: {"": "_StreamController__SyncStreamControllerDispatch;_on
Listen<,_onPause<,_onResume<,_onCancel<,_varData,_state,_doneFuture"}, | |
3179 | |
3180 _StreamController__SyncStreamControllerDispatch: {"": "_StreamController+_SyncSt
reamControllerDispatch;"}, | |
3181 | |
3182 _ControllerStream: {"": "_StreamImpl;_async$_controller", | |
3183 _createSubscription$1: function(cancelOnError) { | |
3184 return this._async$_controller._subscribe$1(cancelOnError); | |
3185 }, | |
3186 get$hashCode: function(_) { | |
3187 return (H.Primitives_objectHashCode(this._async$_controller) ^ 892482866) >>
> 0; | |
3188 }, | |
3189 $eq: function(_, other) { | |
3190 var t1; | |
3191 if (other == null) | |
3192 return false; | |
3193 if (this === other) | |
3194 return true; | |
3195 t1 = J.getInterceptor(other); | |
3196 if (typeof other !== "object" || other === null || !t1.$is_ControllerStream) | |
3197 return false; | |
3198 return other._async$_controller === this._async$_controller; | |
3199 }, | |
3200 $is_ControllerStream: true, | |
3201 $as_StreamImpl: null | |
3202 }, | |
3203 | |
3204 _ControllerSubscription: {"": "_BufferingStreamSubscription;_async$_controller,_
async$_onData,_onError,_onDone,_zone,_state,_cancelFuture,_pending", | |
3205 _onCancel$0: function() { | |
3206 return this._async$_controller._recordCancel$1(this); | |
3207 }, | |
3208 _onPause$0: function() { | |
3209 var t1, addState; | |
3210 t1 = this._async$_controller; | |
3211 if ((t1._state & 8) !== 0) { | |
3212 addState = t1._varData; | |
3213 addState.pause$0(addState); | |
3214 } | |
3215 P._runGuarded(t1.get$_onPause()); | |
3216 }, | |
3217 get$_onPause: function() { | |
3218 return new P.BoundClosure$0(this, P._ControllerSubscription.prototype._onPau
se$0, null, "_onPause$0"); | |
3219 }, | |
3220 _onResume$0: function() { | |
3221 var t1 = this._async$_controller; | |
3222 if ((t1._state & 8) !== 0) | |
3223 t1._varData.resume$0(); | |
3224 P._runGuarded(t1.get$_onResume()); | |
3225 }, | |
3226 get$_onResume: function() { | |
3227 return new P.BoundClosure$0(this, P._ControllerSubscription.prototype._onRes
ume$0, null, "_onResume$0"); | |
3228 }, | |
3229 $as_BufferingStreamSubscription: null | |
3230 }, | |
3231 | |
3232 _EventSink: {"": "Object;"}, | |
3233 | |
3234 _BufferingStreamSubscription: {"": "Object;_async$_onData,_onError,_onDone,_zone
<,_state,_cancelFuture,_pending", | |
3235 _setPendingEvents$1: function(pendingEvents) { | |
3236 if (pendingEvents == null) | |
3237 return; | |
3238 this._pending = pendingEvents; | |
3239 if (!pendingEvents.get$isEmpty(pendingEvents)) { | |
3240 this._state = (this._state | 64) >>> 0; | |
3241 this._pending.schedule$1(this); | |
3242 } | |
3243 }, | |
3244 onData$1: function(handleData) { | |
3245 $.Zone__current.toString; | |
3246 this._async$_onData = handleData; | |
3247 }, | |
3248 onError$1: function(_, handleError) { | |
3249 this._onError = P._registerErrorHandler(handleError, $.Zone__current); | |
3250 }, | |
3251 onDone$1: function(handleDone) { | |
3252 $.Zone__current.toString; | |
3253 this._onDone = handleDone; | |
3254 }, | |
3255 pause$1: function(_, resumeSignal) { | |
3256 var t1 = this._state; | |
3257 if ((t1 & 8) !== 0) | |
3258 return; | |
3259 this._state = (t1 + 128 | 4) >>> 0; | |
3260 if (t1 < 128 && this._pending != null) | |
3261 this._pending.cancelSchedule$0(); | |
3262 if ((t1 & 4) === 0 && (this._state & 32) === 0) | |
3263 this._guardCallback$1(this.get$_onPause()); | |
3264 }, | |
3265 pause$0: function($receiver) { | |
3266 return this.pause$1($receiver, null); | |
3267 }, | |
3268 resume$0: function() { | |
3269 var t1, t2; | |
3270 t1 = this._state; | |
3271 if ((t1 & 8) !== 0) | |
3272 return; | |
3273 if (t1 >= 128) { | |
3274 this._state = t1 - 128; | |
3275 t1 = this._state; | |
3276 if (t1 < 128) { | |
3277 if ((t1 & 64) !== 0) { | |
3278 t2 = this._pending; | |
3279 t2 = !t2.get$isEmpty(t2); | |
3280 } else | |
3281 t2 = false; | |
3282 if (t2) | |
3283 this._pending.schedule$1(this); | |
3284 else { | |
3285 this._state = (t1 & 4294967291) >>> 0; | |
3286 if ((this._state & 32) === 0) | |
3287 this._guardCallback$1(this.get$_onResume()); | |
3288 } | |
3289 } | |
3290 } | |
3291 }, | |
3292 cancel$0: function() { | |
3293 this._state = (this._state & 4294967279) >>> 0; | |
3294 if ((this._state & 8) !== 0) | |
3295 return this._cancelFuture; | |
3296 this._cancel$0(); | |
3297 return this._cancelFuture; | |
3298 }, | |
3299 get$_mayResumeInput: function() { | |
3300 if (this._state < 128) { | |
3301 var t1 = this._pending; | |
3302 t1 = t1 == null || t1.get$isEmpty(t1); | |
3303 } else | |
3304 t1 = false; | |
3305 return t1; | |
3306 }, | |
3307 _cancel$0: function() { | |
3308 this._state = (this._state | 8) >>> 0; | |
3309 if ((this._state & 64) !== 0) | |
3310 this._pending.cancelSchedule$0(); | |
3311 if ((this._state & 32) === 0) | |
3312 this._pending = null; | |
3313 this._cancelFuture = this._onCancel$0(); | |
3314 }, | |
3315 _async$_add$1: function(data) { | |
3316 var t1 = this._state; | |
3317 if ((t1 & 8) !== 0) | |
3318 return; | |
3319 if (t1 < 32) | |
3320 this._sendData$1(data); | |
3321 else | |
3322 this._addPending$1(new P._DelayedData(data, null)); | |
3323 }, | |
3324 _close$0: function() { | |
3325 var t1 = this._state; | |
3326 if ((t1 & 8) !== 0) | |
3327 return; | |
3328 this._state = (t1 | 2) >>> 0; | |
3329 if (this._state < 32) | |
3330 this._sendDone$0(); | |
3331 else | |
3332 this._addPending$1(C.C__DelayedDone); | |
3333 }, | |
3334 _onPause$0: function() { | |
3335 }, | |
3336 get$_onPause: function() { | |
3337 return new P.BoundClosure$0(this, P._BufferingStreamSubscription.prototype._
onPause$0, null, "_onPause$0"); | |
3338 }, | |
3339 _onResume$0: function() { | |
3340 }, | |
3341 get$_onResume: function() { | |
3342 return new P.BoundClosure$0(this, P._BufferingStreamSubscription.prototype._
onResume$0, null, "_onResume$0"); | |
3343 }, | |
3344 _onCancel$0: function() { | |
3345 }, | |
3346 _addPending$1: function($event) { | |
3347 var pending, t1; | |
3348 pending = this._pending; | |
3349 if (pending == null) { | |
3350 pending = new P._StreamImplEvents(null, null, 0); | |
3351 this._pending = pending; | |
3352 } | |
3353 pending.add$1(pending, $event); | |
3354 t1 = this._state; | |
3355 if ((t1 & 64) === 0) { | |
3356 this._state = (t1 | 64) >>> 0; | |
3357 if (this._state < 128) | |
3358 this._pending.schedule$1(this); | |
3359 } | |
3360 }, | |
3361 _sendData$1: function(data) { | |
3362 var t1 = this._state; | |
3363 this._state = (t1 | 32) >>> 0; | |
3364 this._zone.runUnaryGuarded$2(this._async$_onData, data); | |
3365 this._state = (this._state & 4294967263) >>> 0; | |
3366 this._checkState$1((t1 & 4) !== 0); | |
3367 }, | |
3368 _sendDone$0: function() { | |
3369 var t1, t2, t3; | |
3370 t1 = new P._BufferingStreamSubscription__sendDone_sendDone(this); | |
3371 this._cancel$0(); | |
3372 this._state = (this._state | 16) >>> 0; | |
3373 t2 = this._cancelFuture; | |
3374 t3 = J.getInterceptor(t2); | |
3375 if (typeof t2 === "object" && t2 !== null && !!t3.$isFuture) | |
3376 t2.whenComplete$1(t1); | |
3377 else | |
3378 t1.call$0(); | |
3379 }, | |
3380 _guardCallback$1: function(callback) { | |
3381 var t1 = this._state; | |
3382 this._state = (t1 | 32) >>> 0; | |
3383 callback.call$0(); | |
3384 this._state = (this._state & 4294967263) >>> 0; | |
3385 this._checkState$1((t1 & 4) !== 0); | |
3386 }, | |
3387 _checkState$1: function(wasInputPaused) { | |
3388 var t1, t2, isInputPaused; | |
3389 t1 = this._state; | |
3390 if ((t1 & 64) !== 0) { | |
3391 t2 = this._pending; | |
3392 t2 = t2.get$isEmpty(t2); | |
3393 } else | |
3394 t2 = false; | |
3395 if (t2) { | |
3396 this._state = (t1 & 4294967231) >>> 0; | |
3397 if ((this._state & 4) !== 0 && this.get$_mayResumeInput()) | |
3398 this._state = (this._state & 4294967291) >>> 0; | |
3399 } | |
3400 for (; true; wasInputPaused = isInputPaused) { | |
3401 t1 = this._state; | |
3402 if ((t1 & 8) !== 0) { | |
3403 this._pending = null; | |
3404 return; | |
3405 } | |
3406 isInputPaused = (t1 & 4) !== 0; | |
3407 if (wasInputPaused === isInputPaused) | |
3408 break; | |
3409 this._state = (t1 ^ 32) >>> 0; | |
3410 if (isInputPaused) | |
3411 this._onPause$0(); | |
3412 else | |
3413 this._onResume$0(); | |
3414 this._state = (this._state & 4294967263) >>> 0; | |
3415 } | |
3416 t1 = this._state; | |
3417 if ((t1 & 64) !== 0 && t1 < 128) | |
3418 this._pending.schedule$1(this); | |
3419 }, | |
3420 static: { | |
3421 "": "_BufferingStreamSubscription__STATE_CANCEL_ON_ERROR,_BufferingStreamSubscri
ption__STATE_CLOSED,_BufferingStreamSubscription__STATE_INPUT_PAUSED,_BufferingS
treamSubscription__STATE_CANCELED,_BufferingStreamSubscription__STATE_WAIT_FOR_C
ANCEL,_BufferingStreamSubscription__STATE_IN_CALLBACK,_BufferingStreamSubscripti
on__STATE_HAS_PENDING,_BufferingStreamSubscription__STATE_PAUSE_COUNT,_Buffering
StreamSubscription__STATE_PAUSE_COUNT_SHIFT", | |
3422 } | |
3423 | |
3424 }, | |
3425 | |
3426 _BufferingStreamSubscription__sendDone_sendDone: {"": "Closure;this_0", | |
3427 call$0: function() { | |
3428 var t1, t2; | |
3429 t1 = this.this_0; | |
3430 t2 = t1._state; | |
3431 if ((t2 & 16) === 0) | |
3432 return; | |
3433 t1._state = (t2 | 42) >>> 0; | |
3434 t1._zone.runGuarded$1(t1._onDone); | |
3435 t1._state = (t1._state & 4294967263) >>> 0; | |
3436 } | |
3437 }, | |
3438 | |
3439 _StreamImpl: {"": "Stream;", | |
3440 listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone,
onError) { | |
3441 var subscription = this._createSubscription$1(true === cancelOnError); | |
3442 subscription.onData$1(onData); | |
3443 subscription.onError$1(subscription, onError); | |
3444 subscription.onDone$1(onDone); | |
3445 return subscription; | |
3446 }, | |
3447 _createSubscription$1: function(cancelOnError) { | |
3448 var t1, t2; | |
3449 t1 = $.Zone__current; | |
3450 t2 = cancelOnError ? 1 : 0; | |
3451 return new P._BufferingStreamSubscription(null, null, null, t1, t2, null, nu
ll); | |
3452 }, | |
3453 $asStream: null | |
3454 }, | |
3455 | |
3456 _DelayedEvent: {"": "Object;next@"}, | |
3457 | |
3458 _DelayedData: {"": "_DelayedEvent;value,next", | |
3459 perform$1: function(dispatch) { | |
3460 dispatch._sendData$1(this.value); | |
3461 } | |
3462 }, | |
3463 | |
3464 _DelayedDone: {"": "Object;", | |
3465 perform$1: function(dispatch) { | |
3466 dispatch._sendDone$0(); | |
3467 }, | |
3468 get$next: function() { | |
3469 return; | |
3470 }, | |
3471 set$next: function(_) { | |
3472 throw H.wrapException(P.StateError$("No events after a done.")); | |
3473 } | |
3474 }, | |
3475 | |
3476 _PendingEvents: {"": "Object;", | |
3477 schedule$1: function(dispatch) { | |
3478 var t1 = this._state; | |
3479 if (t1 === 1) | |
3480 return; | |
3481 if (t1 >= 1) { | |
3482 this._state = 1; | |
3483 return; | |
3484 } | |
3485 P.scheduleMicrotask(new P._PendingEvents_schedule_closure(this, dispatch)); | |
3486 this._state = 1; | |
3487 }, | |
3488 cancelSchedule$0: function() { | |
3489 if (this._state === 1) | |
3490 this._state = 3; | |
3491 } | |
3492 }, | |
3493 | |
3494 _PendingEvents_schedule_closure: {"": "Closure;this_0,dispatch_1", | |
3495 call$0: function() { | |
3496 var t1, oldState; | |
3497 t1 = this.this_0; | |
3498 oldState = t1._state; | |
3499 t1._state = 0; | |
3500 if (oldState === 3) | |
3501 return; | |
3502 t1.handleNext$1(this.dispatch_1); | |
3503 } | |
3504 }, | |
3505 | |
3506 _StreamImplEvents: {"": "_PendingEvents;firstPendingEvent,lastPendingEvent,_stat
e", | |
3507 get$isEmpty: function(_) { | |
3508 return this.lastPendingEvent == null; | |
3509 }, | |
3510 add$1: function(_, $event) { | |
3511 var t1 = this.lastPendingEvent; | |
3512 if (t1 == null) { | |
3513 this.lastPendingEvent = $event; | |
3514 this.firstPendingEvent = $event; | |
3515 } else { | |
3516 t1.set$next($event); | |
3517 this.lastPendingEvent = $event; | |
3518 } | |
3519 }, | |
3520 handleNext$1: function(dispatch) { | |
3521 var $event = this.firstPendingEvent; | |
3522 this.firstPendingEvent = $event.get$next(); | |
3523 if (this.firstPendingEvent == null) | |
3524 this.lastPendingEvent = null; | |
3525 $event.perform$1(dispatch); | |
3526 } | |
3527 }, | |
3528 | |
3529 _cancelAndError_closure: {"": "Closure;future_0,error_1,stackTrace_2", | |
3530 call$0: function() { | |
3531 return this.future_0._completeError$2(this.error_1, this.stackTrace_2); | |
3532 } | |
3533 }, | |
3534 | |
3535 _cancelAndErrorClosure_closure: {"": "Closure;subscription_0,future_1", | |
3536 call$2: function(error, stackTrace) { | |
3537 return P._cancelAndError(this.subscription_0, this.future_1, error, stackTra
ce); | |
3538 }, | |
3539 $is_args2: true | |
3540 }, | |
3541 | |
3542 _BaseZone: {"": "Object;", | |
3543 runGuarded$1: function(f) { | |
3544 var e, s, t1, exception; | |
3545 try { | |
3546 t1 = this.run$1(f); | |
3547 return t1; | |
3548 } catch (exception) { | |
3549 t1 = H.unwrapException(exception); | |
3550 e = t1; | |
3551 s = new H._StackTrace(exception, null); | |
3552 return this.handleUncaughtError$2(e, s); | |
3553 } | |
3554 | |
3555 }, | |
3556 runUnaryGuarded$2: function(f, arg) { | |
3557 var e, s, t1, exception; | |
3558 try { | |
3559 t1 = this.runUnary$2(f, arg); | |
3560 return t1; | |
3561 } catch (exception) { | |
3562 t1 = H.unwrapException(exception); | |
3563 e = t1; | |
3564 s = new H._StackTrace(exception, null); | |
3565 return this.handleUncaughtError$2(e, s); | |
3566 } | |
3567 | |
3568 }, | |
3569 bindCallback$2$runGuarded: function(f, runGuarded) { | |
3570 var registered = this.registerCallback$1(f); | |
3571 if (runGuarded) | |
3572 return new P._BaseZone_bindCallback_closure(this, registered); | |
3573 else | |
3574 return new P._BaseZone_bindCallback_closure0(this, registered); | |
3575 }, | |
3576 bindUnaryCallback$2$runGuarded: function(f, runGuarded) { | |
3577 var registered = this.registerUnaryCallback$1(f); | |
3578 if (runGuarded) | |
3579 return new P._BaseZone_bindUnaryCallback_closure(this, registered); | |
3580 else | |
3581 return new P._BaseZone_bindUnaryCallback_closure0(this, registered); | |
3582 } | |
3583 }, | |
3584 | |
3585 _BaseZone_bindCallback_closure: {"": "Closure;this_0,registered_1", | |
3586 call$0: function() { | |
3587 return this.this_0.runGuarded$1(this.registered_1); | |
3588 } | |
3589 }, | |
3590 | |
3591 _BaseZone_bindCallback_closure0: {"": "Closure;this_2,registered_3", | |
3592 call$0: function() { | |
3593 return this.this_2.run$1(this.registered_3); | |
3594 } | |
3595 }, | |
3596 | |
3597 _BaseZone_bindUnaryCallback_closure: {"": "Closure;this_0,registered_1", | |
3598 call$1: function(arg) { | |
3599 return this.this_0.runUnaryGuarded$2(this.registered_1, arg); | |
3600 }, | |
3601 $is_args1: true | |
3602 }, | |
3603 | |
3604 _BaseZone_bindUnaryCallback_closure0: {"": "Closure;this_2,registered_3", | |
3605 call$1: function(arg) { | |
3606 return this.this_2.runUnary$2(this.registered_3, arg); | |
3607 }, | |
3608 $is_args1: true | |
3609 }, | |
3610 | |
3611 _rootHandleUncaughtError_closure: {"": "Closure;error_0,stackTrace_1", | |
3612 call$0: function() { | |
3613 P._scheduleAsyncCallback(new P._rootHandleUncaughtError__closure(this.error_
0, this.stackTrace_1)); | |
3614 } | |
3615 }, | |
3616 | |
3617 _rootHandleUncaughtError__closure: {"": "Closure;error_2,stackTrace_3", | |
3618 call$0: function() { | |
3619 var t1, trace, t2; | |
3620 t1 = this.error_2; | |
3621 P.print("Uncaught Error: " + H.S(t1)); | |
3622 trace = this.stackTrace_3; | |
3623 if (trace == null) { | |
3624 t2 = J.getInterceptor(t1); | |
3625 t2 = typeof t1 === "object" && t1 !== null && !!t2.$isError; | |
3626 } else | |
3627 t2 = false; | |
3628 if (t2) | |
3629 trace = t1.get$stackTrace(); | |
3630 if (trace != null) | |
3631 P.print("Stack Trace: \n" + H.S(trace) + "\n"); | |
3632 throw H.wrapException(t1); | |
3633 } | |
3634 }, | |
3635 | |
3636 _RootZone: {"": "_BaseZone;", | |
3637 $index: function(_, key) { | |
3638 return; | |
3639 }, | |
3640 handleUncaughtError$2: function(error, stackTrace) { | |
3641 return P._rootHandleUncaughtError(this, null, this, error, stackTrace); | |
3642 }, | |
3643 run$1: function(f) { | |
3644 return P._rootRun(this, null, this, f); | |
3645 }, | |
3646 runUnary$2: function(f, arg) { | |
3647 return P._rootRunUnary(this, null, this, f, arg); | |
3648 }, | |
3649 registerCallback$1: function(f) { | |
3650 return f; | |
3651 }, | |
3652 registerUnaryCallback$1: function(f) { | |
3653 return f; | |
3654 } | |
3655 }}], | |
3656 ["dart.collection", "dart:collection", , P, { | |
3657 _HashSet__newHashTable: function() { | |
3658 var table = Object.create(null); | |
3659 table["<non-identifier-key>"] = table; | |
3660 delete table["<non-identifier-key>"]; | |
3661 return table; | |
3662 }, | |
3663 | |
3664 _defaultEquals: function(a, b) { | |
3665 return J.$eq(a, b); | |
3666 }, | |
3667 | |
3668 _defaultHashCode: function(a) { | |
3669 return J.get$hashCode$(a); | |
3670 }, | |
3671 | |
3672 HashMap_HashMap: function(equals, hashCode, isValidKey, $K, $V) { | |
3673 var t1 = new P._HashMap(0, null, null, null, null); | |
3674 H.setRuntimeTypeInfo(t1, [$K, $V]); | |
3675 return t1; | |
3676 }, | |
3677 | |
3678 HashSet_HashSet$identity: function($E) { | |
3679 var t1 = new P._IdentityHashSet(0, null, null, null, null); | |
3680 H.setRuntimeTypeInfo(t1, [$E]); | |
3681 return t1; | |
3682 }, | |
3683 | |
3684 _iterableToString: function(iterable) { | |
3685 var parts, t1; | |
3686 t1 = $.get$_toStringVisiting(); | |
3687 if (t1.contains$1(t1, iterable)) | |
3688 return "(...)"; | |
3689 t1 = $.get$_toStringVisiting(); | |
3690 t1.add$1(t1, iterable); | |
3691 parts = []; | |
3692 try { | |
3693 P._iterablePartsToStrings(iterable, parts); | |
3694 } finally { | |
3695 t1 = $.get$_toStringVisiting(); | |
3696 t1.remove$1(t1, iterable); | |
3697 } | |
3698 t1 = P.StringBuffer$("("); | |
3699 t1.writeAll$2(parts, ", "); | |
3700 t1.write$1(")"); | |
3701 return t1._contents; | |
3702 }, | |
3703 | |
3704 _iterablePartsToStrings: function(iterable, parts) { | |
3705 var it, $length, count, next, ultimateString, penultimateString, penultimate,
ultimate, ultimate0, elision; | |
3706 it = iterable.get$iterator(iterable); | |
3707 $length = 0; | |
3708 count = 0; | |
3709 while (true) { | |
3710 if (!($length < 80 || count < 3)) | |
3711 break; | |
3712 if (!it.moveNext$0()) | |
3713 return; | |
3714 next = H.S(it.get$current()); | |
3715 parts.push(next); | |
3716 $length += next.length + 2; | |
3717 ++count; | |
3718 } | |
3719 if (!it.moveNext$0()) { | |
3720 if (count <= 5) | |
3721 return; | |
3722 if (0 >= parts.length) | |
3723 throw H.ioore(parts, 0); | |
3724 ultimateString = parts.pop(); | |
3725 if (0 >= parts.length) | |
3726 throw H.ioore(parts, 0); | |
3727 penultimateString = parts.pop(); | |
3728 } else { | |
3729 penultimate = it.get$current(); | |
3730 ++count; | |
3731 if (!it.moveNext$0()) { | |
3732 if (count <= 4) { | |
3733 parts.push(H.S(penultimate)); | |
3734 return; | |
3735 } | |
3736 ultimateString = H.S(penultimate); | |
3737 if (0 >= parts.length) | |
3738 throw H.ioore(parts, 0); | |
3739 penultimateString = parts.pop(); | |
3740 $length += ultimateString.length + 2; | |
3741 } else { | |
3742 ultimate = it.get$current(); | |
3743 ++count; | |
3744 for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { | |
3745 ultimate0 = it.get$current(); | |
3746 ++count; | |
3747 if (count > 100) { | |
3748 while (true) { | |
3749 if (!($length > 75 && count > 3)) | |
3750 break; | |
3751 if (0 >= parts.length) | |
3752 throw H.ioore(parts, 0); | |
3753 $length -= parts.pop().length + 2; | |
3754 --count; | |
3755 } | |
3756 parts.push("..."); | |
3757 return; | |
3758 } | |
3759 } | |
3760 penultimateString = H.S(penultimate); | |
3761 ultimateString = H.S(ultimate); | |
3762 $length += ultimateString.length + penultimateString.length + 4; | |
3763 } | |
3764 } | |
3765 if (count > parts.length + 2) { | |
3766 $length += 5; | |
3767 elision = "..."; | |
3768 } else | |
3769 elision = null; | |
3770 while (true) { | |
3771 if (!($length > 80 && parts.length > 3)) | |
3772 break; | |
3773 if (0 >= parts.length) | |
3774 throw H.ioore(parts, 0); | |
3775 $length -= parts.pop().length + 2; | |
3776 if (elision == null) { | |
3777 $length += 5; | |
3778 elision = "..."; | |
3779 } | |
3780 } | |
3781 if (elision != null) | |
3782 parts.push(elision); | |
3783 parts.push(penultimateString); | |
3784 parts.push(ultimateString); | |
3785 }, | |
3786 | |
3787 LinkedHashMap_LinkedHashMap: function(equals, hashCode, isValidKey, $K, $V) { | |
3788 var t1 = new P._LinkedHashMap(0, null, null, null, null, null, 0); | |
3789 H.setRuntimeTypeInfo(t1, [$K, $V]); | |
3790 return t1; | |
3791 }, | |
3792 | |
3793 Maps_mapToString: function(m) { | |
3794 var t1, result, i, t2; | |
3795 t1 = {}; | |
3796 for (i = 0; i < $.get$Maps__toStringList().length; ++i) { | |
3797 t2 = $.get$Maps__toStringList(); | |
3798 if (i >= t2.length) | |
3799 throw H.ioore(t2, i); | |
3800 if (t2[i] === m) | |
3801 return "{...}"; | |
3802 } | |
3803 result = P.StringBuffer$(""); | |
3804 try { | |
3805 $.get$Maps__toStringList().push(m); | |
3806 result.write$1("{"); | |
3807 t1.first_0 = true; | |
3808 J.forEach$1$ax(m, new P.Maps_mapToString_closure(t1, result)); | |
3809 result.write$1("}"); | |
3810 } finally { | |
3811 t1 = $.get$Maps__toStringList(); | |
3812 if (0 >= t1.length) | |
3813 throw H.ioore(t1, 0); | |
3814 t1.pop(); | |
3815 } | |
3816 return result.get$_contents(); | |
3817 }, | |
3818 | |
3819 _HashMap: {"": "Object;_collection$_length,_strings,_nums,_rest,_keys", | |
3820 get$length: function(_) { | |
3821 return this._collection$_length; | |
3822 }, | |
3823 get$keys: function() { | |
3824 var t1 = new P.HashMapKeyIterable(this); | |
3825 H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "_HashMap", 0)]); | |
3826 return t1; | |
3827 }, | |
3828 get$values: function(_) { | |
3829 var t1 = new P.HashMapKeyIterable(this); | |
3830 H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "_HashMap", 0)]); | |
3831 return H.MappedIterable_MappedIterable(t1, new P._HashMap_values_closure(thi
s), H.getRuntimeTypeArgument(t1, "IterableBase", 0), null); | |
3832 }, | |
3833 $index: function(_, key) { | |
3834 var strings, t1, entry, nums, rest, bucket, index; | |
3835 if (typeof key === "string" && key !== "__proto__") { | |
3836 strings = this._strings; | |
3837 if (strings == null) | |
3838 t1 = null; | |
3839 else { | |
3840 entry = strings[key]; | |
3841 t1 = entry === strings ? null : entry; | |
3842 } | |
3843 return t1; | |
3844 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { | |
3845 nums = this._nums; | |
3846 if (nums == null) | |
3847 t1 = null; | |
3848 else { | |
3849 entry = nums[key]; | |
3850 t1 = entry === nums ? null : entry; | |
3851 } | |
3852 return t1; | |
3853 } else { | |
3854 rest = this._rest; | |
3855 if (rest == null) | |
3856 return; | |
3857 bucket = rest[this._computeHashCode$1(key)]; | |
3858 index = this._findBucketIndex$2(bucket, key); | |
3859 return index < 0 ? null : bucket[index + 1]; | |
3860 } | |
3861 }, | |
3862 $indexSet: function(_, key, value) { | |
3863 var strings, nums, rest, hash, bucket, index; | |
3864 if (typeof key === "string" && key !== "__proto__") { | |
3865 strings = this._strings; | |
3866 if (strings == null) { | |
3867 strings = P._HashMap__newHashTable(); | |
3868 this._strings = strings; | |
3869 } | |
3870 this._addHashTableEntry$3(strings, key, value); | |
3871 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { | |
3872 nums = this._nums; | |
3873 if (nums == null) { | |
3874 nums = P._HashMap__newHashTable(); | |
3875 this._nums = nums; | |
3876 } | |
3877 this._addHashTableEntry$3(nums, key, value); | |
3878 } else { | |
3879 rest = this._rest; | |
3880 if (rest == null) { | |
3881 rest = P._HashMap__newHashTable(); | |
3882 this._rest = rest; | |
3883 } | |
3884 hash = this._computeHashCode$1(key); | |
3885 bucket = rest[hash]; | |
3886 if (bucket == null) { | |
3887 P._HashMap__setTableEntry(rest, hash, [key, value]); | |
3888 this._collection$_length = this._collection$_length + 1; | |
3889 this._keys = null; | |
3890 } else { | |
3891 index = this._findBucketIndex$2(bucket, key); | |
3892 if (index >= 0) | |
3893 bucket[index + 1] = value; | |
3894 else { | |
3895 bucket.push(key, value); | |
3896 this._collection$_length = this._collection$_length + 1; | |
3897 this._keys = null; | |
3898 } | |
3899 } | |
3900 } | |
3901 }, | |
3902 forEach$1: function(_, action) { | |
3903 var keys, $length, i, key; | |
3904 keys = this._computeKeys$0(); | |
3905 for ($length = keys.length, i = 0; i < $length; ++i) { | |
3906 key = keys[i]; | |
3907 action.call$2(key, this.$index(this, key)); | |
3908 if (keys !== this._keys) | |
3909 throw H.wrapException(P.ConcurrentModificationError$(this)); | |
3910 } | |
3911 }, | |
3912 _computeKeys$0: function() { | |
3913 var t1, result, strings, names, entries, index, i, nums, rest, bucket, $leng
th, i0; | |
3914 t1 = this._keys; | |
3915 if (t1 != null) | |
3916 return t1; | |
3917 result = P.List_List(this._collection$_length, null); | |
3918 strings = this._strings; | |
3919 if (strings != null) { | |
3920 names = Object.getOwnPropertyNames(strings); | |
3921 entries = names.length; | |
3922 for (index = 0, i = 0; i < entries; ++i) { | |
3923 result[index] = names[i]; | |
3924 ++index; | |
3925 } | |
3926 } else | |
3927 index = 0; | |
3928 nums = this._nums; | |
3929 if (nums != null) { | |
3930 names = Object.getOwnPropertyNames(nums); | |
3931 entries = names.length; | |
3932 for (i = 0; i < entries; ++i) { | |
3933 result[index] = +names[i]; | |
3934 ++index; | |
3935 } | |
3936 } | |
3937 rest = this._rest; | |
3938 if (rest != null) { | |
3939 names = Object.getOwnPropertyNames(rest); | |
3940 entries = names.length; | |
3941 for (i = 0; i < entries; ++i) { | |
3942 bucket = rest[names[i]]; | |
3943 $length = bucket.length; | |
3944 for (i0 = 0; i0 < $length; i0 += 2) { | |
3945 result[index] = bucket[i0]; | |
3946 ++index; | |
3947 } | |
3948 } | |
3949 } | |
3950 this._keys = result; | |
3951 return result; | |
3952 }, | |
3953 _addHashTableEntry$3: function(table, key, value) { | |
3954 if (table[key] == null) { | |
3955 this._collection$_length = this._collection$_length + 1; | |
3956 this._keys = null; | |
3957 } | |
3958 P._HashMap__setTableEntry(table, key, value); | |
3959 }, | |
3960 _computeHashCode$1: function(key) { | |
3961 return J.get$hashCode$(key) & 0x3ffffff; | |
3962 }, | |
3963 _findBucketIndex$2: function(bucket, key) { | |
3964 var $length, i; | |
3965 if (bucket == null) | |
3966 return -1; | |
3967 $length = bucket.length; | |
3968 for (i = 0; i < $length; i += 2) | |
3969 if (J.$eq(bucket[i], key)) | |
3970 return i; | |
3971 return -1; | |
3972 }, | |
3973 $isMap: true, | |
3974 static: { | |
3975 _HashMap__setTableEntry: function(table, key, value) { | |
3976 if (value == null) | |
3977 table[key] = table; | |
3978 else | |
3979 table[key] = value; | |
3980 }, | |
3981 | |
3982 _HashMap__newHashTable: function() { | |
3983 var table = Object.create(null); | |
3984 P._HashMap__setTableEntry(table, "<non-identifier-key>", table); | |
3985 delete table["<non-identifier-key>"]; | |
3986 return table; | |
3987 }} | |
3988 | |
3989 }, | |
3990 | |
3991 _HashMap_values_closure: {"": "Closure;this_0", | |
3992 call$1: function(each) { | |
3993 var t1 = this.this_0; | |
3994 return t1.$index(t1, each); | |
3995 }, | |
3996 $is_args1: true | |
3997 }, | |
3998 | |
3999 HashMapKeyIterable: {"": "IterableBase;_map", | |
4000 get$length: function(_) { | |
4001 return this._map._collection$_length; | |
4002 }, | |
4003 get$iterator: function(_) { | |
4004 var t1 = this._map; | |
4005 return new P.HashMapKeyIterator(t1, t1._computeKeys$0(), 0, null); | |
4006 }, | |
4007 forEach$1: function(_, f) { | |
4008 var t1, keys, $length, i; | |
4009 t1 = this._map; | |
4010 keys = t1._computeKeys$0(); | |
4011 for ($length = keys.length, i = 0; i < $length; ++i) { | |
4012 f.call$1(keys[i]); | |
4013 if (keys !== t1._keys) | |
4014 throw H.wrapException(P.ConcurrentModificationError$(t1)); | |
4015 } | |
4016 }, | |
4017 $asIterableBase: null, | |
4018 $isEfficientLength: true | |
4019 }, | |
4020 | |
4021 HashMapKeyIterator: {"": "Object;_map,_keys,_offset,_collection$_current", | |
4022 get$current: function() { | |
4023 return this._collection$_current; | |
4024 }, | |
4025 moveNext$0: function() { | |
4026 var keys, offset, t1; | |
4027 keys = this._keys; | |
4028 offset = this._offset; | |
4029 t1 = this._map; | |
4030 if (keys !== t1._keys) | |
4031 throw H.wrapException(P.ConcurrentModificationError$(t1)); | |
4032 else if (offset >= keys.length) { | |
4033 this._collection$_current = null; | |
4034 return false; | |
4035 } else { | |
4036 this._collection$_current = keys[offset]; | |
4037 this._offset = offset + 1; | |
4038 return true; | |
4039 } | |
4040 } | |
4041 }, | |
4042 | |
4043 _LinkedHashMap: {"": "Object;_collection$_length,_strings,_nums,_rest,_first,_la
st,_modifications", | |
4044 get$length: function(_) { | |
4045 return this._collection$_length; | |
4046 }, | |
4047 get$keys: function() { | |
4048 var t1 = new P.LinkedHashMapKeyIterable(this); | |
4049 H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "_LinkedHashMap", 0
)]); | |
4050 return t1; | |
4051 }, | |
4052 get$values: function(_) { | |
4053 var t1 = new P.LinkedHashMapKeyIterable(this); | |
4054 H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "_LinkedHashMap", 0
)]); | |
4055 return H.MappedIterable_MappedIterable(t1, new P._LinkedHashMap_values_closu
re(this), H.getRuntimeTypeArgument(t1, "IterableBase", 0), null); | |
4056 }, | |
4057 containsKey$1: function(key) { | |
4058 var nums, rest; | |
4059 if ((key & 0x3ffffff) === key) { | |
4060 nums = this._nums; | |
4061 if (nums == null) | |
4062 return false; | |
4063 return nums[key] != null; | |
4064 } else { | |
4065 rest = this._rest; | |
4066 if (rest == null) | |
4067 return false; | |
4068 return this._findBucketIndex$2(rest[this._computeHashCode$1(key)], key) >=
0; | |
4069 } | |
4070 }, | |
4071 $index: function(_, key) { | |
4072 var strings, cell, nums, rest, bucket, index; | |
4073 if (typeof key === "string" && key !== "__proto__") { | |
4074 strings = this._strings; | |
4075 if (strings == null) | |
4076 return; | |
4077 cell = strings[key]; | |
4078 return cell == null ? null : cell.get$_collection$_value(); | |
4079 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { | |
4080 nums = this._nums; | |
4081 if (nums == null) | |
4082 return; | |
4083 cell = nums[key]; | |
4084 return cell == null ? null : cell.get$_collection$_value(); | |
4085 } else { | |
4086 rest = this._rest; | |
4087 if (rest == null) | |
4088 return; | |
4089 bucket = rest[this._computeHashCode$1(key)]; | |
4090 index = this._findBucketIndex$2(bucket, key); | |
4091 if (index < 0) | |
4092 return; | |
4093 return bucket[index].get$_collection$_value(); | |
4094 } | |
4095 }, | |
4096 $indexSet: function(_, key, value) { | |
4097 var strings, nums, rest, hash, bucket, index; | |
4098 if (typeof key === "string" && key !== "__proto__") { | |
4099 strings = this._strings; | |
4100 if (strings == null) { | |
4101 strings = P._LinkedHashMap__newHashTable(); | |
4102 this._strings = strings; | |
4103 } | |
4104 this._addHashTableEntry$3(strings, key, value); | |
4105 } else if (typeof key === "number" && (key & 0x3ffffff) === key) { | |
4106 nums = this._nums; | |
4107 if (nums == null) { | |
4108 nums = P._LinkedHashMap__newHashTable(); | |
4109 this._nums = nums; | |
4110 } | |
4111 this._addHashTableEntry$3(nums, key, value); | |
4112 } else { | |
4113 rest = this._rest; | |
4114 if (rest == null) { | |
4115 rest = P._LinkedHashMap__newHashTable(); | |
4116 this._rest = rest; | |
4117 } | |
4118 hash = this._computeHashCode$1(key); | |
4119 bucket = rest[hash]; | |
4120 if (bucket == null) | |
4121 rest[hash] = [this._newLinkedCell$2(key, value)]; | |
4122 else { | |
4123 index = this._findBucketIndex$2(bucket, key); | |
4124 if (index >= 0) | |
4125 bucket[index].set$_collection$_value(value); | |
4126 else | |
4127 bucket.push(this._newLinkedCell$2(key, value)); | |
4128 } | |
4129 } | |
4130 }, | |
4131 remove$1: function(_, key) { | |
4132 var rest, bucket, index, cell; | |
4133 if (typeof key === "string" && key !== "__proto__") | |
4134 return this._removeHashTableEntry$2(this._strings, key); | |
4135 else if (typeof key === "number" && (key & 0x3ffffff) === key) | |
4136 return this._removeHashTableEntry$2(this._nums, key); | |
4137 else { | |
4138 rest = this._rest; | |
4139 if (rest == null) | |
4140 return; | |
4141 bucket = rest[this._computeHashCode$1(key)]; | |
4142 index = this._findBucketIndex$2(bucket, key); | |
4143 if (index < 0) | |
4144 return; | |
4145 cell = bucket.splice(index, 1)[0]; | |
4146 this._unlinkCell$1(cell); | |
4147 return cell.get$_collection$_value(); | |
4148 } | |
4149 }, | |
4150 forEach$1: function(_, action) { | |
4151 var cell, modifications; | |
4152 cell = this._first; | |
4153 modifications = this._modifications; | |
4154 for (; cell != null;) { | |
4155 action.call$2(cell._key, cell._collection$_value); | |
4156 if (modifications !== this._modifications) | |
4157 throw H.wrapException(P.ConcurrentModificationError$(this)); | |
4158 cell = cell._next; | |
4159 } | |
4160 }, | |
4161 _addHashTableEntry$3: function(table, key, value) { | |
4162 var cell = table[key]; | |
4163 if (cell == null) | |
4164 table[key] = this._newLinkedCell$2(key, value); | |
4165 else | |
4166 cell.set$_collection$_value(value); | |
4167 }, | |
4168 _removeHashTableEntry$2: function(table, key) { | |
4169 var cell; | |
4170 if (table == null) | |
4171 return; | |
4172 cell = table[key]; | |
4173 if (cell == null) | |
4174 return; | |
4175 this._unlinkCell$1(cell); | |
4176 delete table[key]; | |
4177 return cell.get$_collection$_value(); | |
4178 }, | |
4179 _newLinkedCell$2: function(key, value) { | |
4180 var cell, last; | |
4181 cell = new P.LinkedHashMapCell(key, value, null, null); | |
4182 if (this._first == null) { | |
4183 this._last = cell; | |
4184 this._first = cell; | |
4185 } else { | |
4186 last = this._last; | |
4187 cell._previous = last; | |
4188 last._next = cell; | |
4189 this._last = cell; | |
4190 } | |
4191 this._collection$_length = this._collection$_length + 1; | |
4192 this._modifications = this._modifications + 1 & 67108863; | |
4193 return cell; | |
4194 }, | |
4195 _unlinkCell$1: function(cell) { | |
4196 var previous, next; | |
4197 previous = cell.get$_previous(); | |
4198 next = cell._next; | |
4199 if (previous == null) | |
4200 this._first = next; | |
4201 else | |
4202 previous._next = next; | |
4203 if (next == null) | |
4204 this._last = previous; | |
4205 else | |
4206 next._previous = previous; | |
4207 this._collection$_length = this._collection$_length - 1; | |
4208 this._modifications = this._modifications + 1 & 67108863; | |
4209 }, | |
4210 _computeHashCode$1: function(key) { | |
4211 return J.get$hashCode$(key) & 0x3ffffff; | |
4212 }, | |
4213 _findBucketIndex$2: function(bucket, key) { | |
4214 var $length, i; | |
4215 if (bucket == null) | |
4216 return -1; | |
4217 $length = bucket.length; | |
4218 for (i = 0; i < $length; ++i) | |
4219 if (J.$eq(bucket[i].get$_key(), key)) | |
4220 return i; | |
4221 return -1; | |
4222 }, | |
4223 toString$0: function(_) { | |
4224 return P.Maps_mapToString(this); | |
4225 }, | |
4226 $isMap: true, | |
4227 static: { | |
4228 _LinkedHashMap__newHashTable: function() { | |
4229 var table = Object.create(null); | |
4230 table["<non-identifier-key>"] = table; | |
4231 delete table["<non-identifier-key>"]; | |
4232 return table; | |
4233 }} | |
4234 | |
4235 }, | |
4236 | |
4237 _LinkedHashMap_values_closure: {"": "Closure;this_0", | |
4238 call$1: function(each) { | |
4239 var t1 = this.this_0; | |
4240 return t1.$index(t1, each); | |
4241 }, | |
4242 $is_args1: true | |
4243 }, | |
4244 | |
4245 LinkedHashMapCell: {"": "Object;_key<,_collection$_value@,_next,_previous<"}, | |
4246 | |
4247 LinkedHashMapKeyIterable: {"": "IterableBase;_map", | |
4248 get$length: function(_) { | |
4249 return this._map._collection$_length; | |
4250 }, | |
4251 get$iterator: function(_) { | |
4252 var t1 = this._map; | |
4253 t1 = new P.LinkedHashMapKeyIterator(t1, t1._modifications, null, null); | |
4254 t1._cell = t1._map._first; | |
4255 return t1; | |
4256 }, | |
4257 forEach$1: function(_, f) { | |
4258 var t1, cell, modifications; | |
4259 t1 = this._map; | |
4260 cell = t1._first; | |
4261 modifications = t1._modifications; | |
4262 for (; cell != null;) { | |
4263 f.call$1(cell._key); | |
4264 if (modifications !== t1._modifications) | |
4265 throw H.wrapException(P.ConcurrentModificationError$(t1)); | |
4266 cell = cell._next; | |
4267 } | |
4268 }, | |
4269 $asIterableBase: null, | |
4270 $isEfficientLength: true | |
4271 }, | |
4272 | |
4273 LinkedHashMapKeyIterator: {"": "Object;_map,_modifications,_cell,_collection$_cu
rrent", | |
4274 get$current: function() { | |
4275 return this._collection$_current; | |
4276 }, | |
4277 moveNext$0: function() { | |
4278 var t1 = this._map; | |
4279 if (this._modifications !== t1._modifications) | |
4280 throw H.wrapException(P.ConcurrentModificationError$(t1)); | |
4281 else { | |
4282 t1 = this._cell; | |
4283 if (t1 == null) { | |
4284 this._collection$_current = null; | |
4285 return false; | |
4286 } else { | |
4287 this._collection$_current = t1._key; | |
4288 this._cell = this._cell._next; | |
4289 return true; | |
4290 } | |
4291 } | |
4292 } | |
4293 }, | |
4294 | |
4295 _HashSet: {"": "_HashSetBase;", | |
4296 get$iterator: function(_) { | |
4297 return new P.HashSetIterator(this, this._computeElements$0(), 0, null); | |
4298 }, | |
4299 get$length: function(_) { | |
4300 return this._collection$_length; | |
4301 }, | |
4302 contains$1: function(_, object) { | |
4303 var strings, nums, rest; | |
4304 if (typeof object === "string" && object !== "__proto__") { | |
4305 strings = this._strings; | |
4306 return strings == null ? false : strings[object] != null; | |
4307 } else if (typeof object === "number" && (object & 0x3ffffff) === object) { | |
4308 nums = this._nums; | |
4309 return nums == null ? false : nums[object] != null; | |
4310 } else { | |
4311 rest = this._rest; | |
4312 if (rest == null) | |
4313 return false; | |
4314 return this._findBucketIndex$2(rest[this._computeHashCode$1(object)], obje
ct) >= 0; | |
4315 } | |
4316 }, | |
4317 lookup$1: function(object) { | |
4318 var t1, rest, bucket, index; | |
4319 if (!(typeof object === "string" && object !== "__proto__")) | |
4320 t1 = typeof object === "number" && (object & 0x3ffffff) === object; | |
4321 else | |
4322 t1 = true; | |
4323 if (t1) | |
4324 return this.contains$1(this, object) ? object : null; | |
4325 rest = this._rest; | |
4326 if (rest == null) | |
4327 return; | |
4328 bucket = rest[this._computeHashCode$1(object)]; | |
4329 index = this._findBucketIndex$2(bucket, object); | |
4330 if (index < 0) | |
4331 return; | |
4332 return J.$index$asx(bucket, index); | |
4333 }, | |
4334 add$1: function(_, element) { | |
4335 var rest, hash, bucket; | |
4336 rest = this._rest; | |
4337 if (rest == null) { | |
4338 rest = P._HashSet__newHashTable(); | |
4339 this._rest = rest; | |
4340 } | |
4341 hash = this._computeHashCode$1(element); | |
4342 bucket = rest[hash]; | |
4343 if (bucket == null) | |
4344 rest[hash] = [element]; | |
4345 else { | |
4346 if (this._findBucketIndex$2(bucket, element) >= 0) | |
4347 return false; | |
4348 bucket.push(element); | |
4349 } | |
4350 this._collection$_length = this._collection$_length + 1; | |
4351 this._elements = null; | |
4352 return true; | |
4353 }, | |
4354 remove$1: function(_, object) { | |
4355 var rest, bucket, index; | |
4356 rest = this._rest; | |
4357 if (rest == null) | |
4358 return false; | |
4359 bucket = rest[this._computeHashCode$1(object)]; | |
4360 index = this._findBucketIndex$2(bucket, object); | |
4361 if (index < 0) | |
4362 return false; | |
4363 this._collection$_length = this._collection$_length - 1; | |
4364 this._elements = null; | |
4365 bucket.splice(index, 1); | |
4366 return true; | |
4367 }, | |
4368 _computeElements$0: function() { | |
4369 var t1, result, strings, names, entries, index, i, nums, rest, bucket, $leng
th, i0; | |
4370 t1 = this._elements; | |
4371 if (t1 != null) | |
4372 return t1; | |
4373 result = P.List_List(this._collection$_length, null); | |
4374 strings = this._strings; | |
4375 if (strings != null) { | |
4376 names = Object.getOwnPropertyNames(strings); | |
4377 entries = names.length; | |
4378 for (index = 0, i = 0; i < entries; ++i) { | |
4379 result[index] = names[i]; | |
4380 ++index; | |
4381 } | |
4382 } else | |
4383 index = 0; | |
4384 nums = this._nums; | |
4385 if (nums != null) { | |
4386 names = Object.getOwnPropertyNames(nums); | |
4387 entries = names.length; | |
4388 for (i = 0; i < entries; ++i) { | |
4389 result[index] = +names[i]; | |
4390 ++index; | |
4391 } | |
4392 } | |
4393 rest = this._rest; | |
4394 if (rest != null) { | |
4395 names = Object.getOwnPropertyNames(rest); | |
4396 entries = names.length; | |
4397 for (i = 0; i < entries; ++i) { | |
4398 bucket = rest[names[i]]; | |
4399 $length = bucket.length; | |
4400 for (i0 = 0; i0 < $length; ++i0) { | |
4401 result[index] = bucket[i0]; | |
4402 ++index; | |
4403 } | |
4404 } | |
4405 } | |
4406 this._elements = result; | |
4407 return result; | |
4408 }, | |
4409 _computeHashCode$1: function(element) { | |
4410 return J.get$hashCode$(element) & 0x3ffffff; | |
4411 }, | |
4412 _findBucketIndex$2: function(bucket, element) { | |
4413 var $length, i; | |
4414 if (bucket == null) | |
4415 return -1; | |
4416 $length = bucket.length; | |
4417 for (i = 0; i < $length; ++i) | |
4418 if (J.$eq(bucket[i], element)) | |
4419 return i; | |
4420 return -1; | |
4421 }, | |
4422 $as_HashSetBase: null, | |
4423 $isEfficientLength: true | |
4424 }, | |
4425 | |
4426 _IdentityHashSet: {"": "_HashSet;_collection$_length,_strings,_nums,_rest,_eleme
nts", | |
4427 _computeHashCode$1: function(key) { | |
4428 return H.objectHashCode(key) & 0x3ffffff; | |
4429 }, | |
4430 _findBucketIndex$2: function(bucket, element) { | |
4431 var $length, i, t1; | |
4432 if (bucket == null) | |
4433 return -1; | |
4434 $length = bucket.length; | |
4435 for (i = 0; i < $length; ++i) { | |
4436 t1 = bucket[i]; | |
4437 if (t1 == null ? element == null : t1 === element) | |
4438 return i; | |
4439 } | |
4440 return -1; | |
4441 }, | |
4442 $as_HashSet: null | |
4443 }, | |
4444 | |
4445 HashSetIterator: {"": "Object;_set,_elements,_offset,_collection$_current", | |
4446 get$current: function() { | |
4447 return this._collection$_current; | |
4448 }, | |
4449 moveNext$0: function() { | |
4450 var elements, offset, t1; | |
4451 elements = this._elements; | |
4452 offset = this._offset; | |
4453 t1 = this._set; | |
4454 if (elements !== t1._elements) | |
4455 throw H.wrapException(P.ConcurrentModificationError$(t1)); | |
4456 else if (offset >= elements.length) { | |
4457 this._collection$_current = null; | |
4458 return false; | |
4459 } else { | |
4460 this._collection$_current = elements[offset]; | |
4461 this._offset = offset + 1; | |
4462 return true; | |
4463 } | |
4464 } | |
4465 }, | |
4466 | |
4467 _HashSetBase: {"": "IterableBase;", | |
4468 toString$0: function(_) { | |
4469 return H.IterableMixinWorkaround_toStringIterable(this, "{", "}"); | |
4470 }, | |
4471 $asIterableBase: null, | |
4472 $isEfficientLength: true | |
4473 }, | |
4474 | |
4475 IterableBase: {"": "Object;", | |
4476 forEach$1: function(_, f) { | |
4477 var t1; | |
4478 for (t1 = this.get$iterator(this); t1.moveNext$0();) | |
4479 f.call$1(t1.get$current()); | |
4480 }, | |
4481 get$length: function(_) { | |
4482 var it, count; | |
4483 it = this.get$iterator(this); | |
4484 for (count = 0; it.moveNext$0();) | |
4485 ++count; | |
4486 return count; | |
4487 }, | |
4488 elementAt$1: function(_, index) { | |
4489 var t1, remaining, element; | |
4490 if (index < 0) | |
4491 throw H.wrapException(P.RangeError$value(index)); | |
4492 for (t1 = this.get$iterator(this), remaining = index; t1.moveNext$0();) { | |
4493 element = t1.get$current(); | |
4494 if (remaining === 0) | |
4495 return element; | |
4496 --remaining; | |
4497 } | |
4498 throw H.wrapException(P.RangeError$value(index)); | |
4499 }, | |
4500 toString$0: function(_) { | |
4501 return P._iterableToString(this); | |
4502 } | |
4503 }, | |
4504 | |
4505 ListMixin: {"": "Object;", | |
4506 get$iterator: function(receiver) { | |
4507 return new H.ListIterator(receiver, this.get$length(receiver), 0, null); | |
4508 }, | |
4509 elementAt$1: function(receiver, index) { | |
4510 return this.$index(receiver, index); | |
4511 }, | |
4512 forEach$1: function(receiver, action) { | |
4513 var $length, i; | |
4514 $length = this.get$length(receiver); | |
4515 for (i = 0; i < $length; ++i) { | |
4516 if (i >= receiver.length) | |
4517 throw H.ioore(receiver, i); | |
4518 action.call$1(receiver[i]); | |
4519 if ($length !== receiver.length) | |
4520 throw H.wrapException(P.ConcurrentModificationError$(receiver)); | |
4521 } | |
4522 }, | |
4523 toString$0: function(receiver) { | |
4524 var result, t1; | |
4525 t1 = $.get$_toStringVisiting(); | |
4526 if (t1.contains$1(t1, receiver)) | |
4527 return "[...]"; | |
4528 result = P.StringBuffer$(""); | |
4529 try { | |
4530 t1 = $.get$_toStringVisiting(); | |
4531 t1.add$1(t1, receiver); | |
4532 result.write$1("["); | |
4533 result.writeAll$2(receiver, ", "); | |
4534 result.write$1("]"); | |
4535 } finally { | |
4536 t1 = $.get$_toStringVisiting(); | |
4537 t1.remove$1(t1, receiver); | |
4538 } | |
4539 return result.get$_contents(); | |
4540 }, | |
4541 $isList: true, | |
4542 $asList: null, | |
4543 $isEfficientLength: true | |
4544 }, | |
4545 | |
4546 Maps_mapToString_closure: {"": "Closure;box_0,result_1", | |
4547 call$2: function(k, v) { | |
4548 var t1 = this.box_0; | |
4549 if (!t1.first_0) | |
4550 this.result_1.write$1(", "); | |
4551 t1.first_0 = false; | |
4552 t1 = this.result_1; | |
4553 t1.write$1(k); | |
4554 t1.write$1(": "); | |
4555 t1.write$1(v); | |
4556 }, | |
4557 $is_args2: true | |
4558 }, | |
4559 | |
4560 ListQueue: {"": "IterableBase;_table,_head,_tail,_modificationCount", | |
4561 get$iterator: function(_) { | |
4562 return P._ListQueueIterator$(this); | |
4563 }, | |
4564 forEach$1: function(_, action) { | |
4565 var modificationCount, i, t1; | |
4566 modificationCount = this._modificationCount; | |
4567 for (i = this._head; i !== this._tail; i = (i + 1 & this._table.length - 1)
>>> 0) { | |
4568 t1 = this._table; | |
4569 if (i < 0 || i >= t1.length) | |
4570 throw H.ioore(t1, i); | |
4571 action.call$1(t1[i]); | |
4572 if (modificationCount !== this._modificationCount) | |
4573 H.throwExpression(P.ConcurrentModificationError$(this)); | |
4574 } | |
4575 }, | |
4576 get$length: function(_) { | |
4577 return (this._tail - this._head & this._table.length - 1) >>> 0; | |
4578 }, | |
4579 toString$0: function(_) { | |
4580 return H.IterableMixinWorkaround_toStringIterable(this, "{", "}"); | |
4581 }, | |
4582 removeFirst$0: function() { | |
4583 var t1, t2, t3, result; | |
4584 if (this._head === this._tail) | |
4585 throw H.wrapException(P.StateError$("No elements")); | |
4586 this._modificationCount = this._modificationCount + 1; | |
4587 t1 = this._table; | |
4588 t2 = this._head; | |
4589 t3 = t1.length; | |
4590 if (t2 < 0 || t2 >= t3) | |
4591 throw H.ioore(t1, t2); | |
4592 result = t1[t2]; | |
4593 this._head = (t2 + 1 & t3 - 1) >>> 0; | |
4594 return result; | |
4595 }, | |
4596 _add$1: function(element) { | |
4597 var t1, t2, t3; | |
4598 t1 = this._table; | |
4599 t2 = this._tail; | |
4600 t3 = t1.length; | |
4601 if (t2 < 0 || t2 >= t3) | |
4602 throw H.ioore(t1, t2); | |
4603 t1[t2] = element; | |
4604 this._tail = (t2 + 1 & t3 - 1) >>> 0; | |
4605 if (this._head === this._tail) | |
4606 this._grow$0(); | |
4607 this._modificationCount = this._modificationCount + 1; | |
4608 }, | |
4609 _grow$0: function() { | |
4610 var newTable, t1, t2, split; | |
4611 newTable = P.List_List(this._table.length * 2, H.getRuntimeTypeArgument(this
, "ListQueue", 0)); | |
4612 H.setRuntimeTypeInfo(newTable, [H.getRuntimeTypeArgument(this, "ListQueue",
0)]); | |
4613 t1 = this._table; | |
4614 t2 = this._head; | |
4615 split = t1.length - t2; | |
4616 H.IterableMixinWorkaround_setRangeList(newTable, 0, split, t1, t2); | |
4617 t1 = this._head; | |
4618 t2 = this._table; | |
4619 H.IterableMixinWorkaround_setRangeList(newTable, split, split + t1, t2, 0); | |
4620 this._head = 0; | |
4621 this._tail = this._table.length; | |
4622 this._table = newTable; | |
4623 }, | |
4624 ListQueue$1: function(initialCapacity, $E) { | |
4625 var t1 = P.List_List(8, $E); | |
4626 H.setRuntimeTypeInfo(t1, [$E]); | |
4627 this._table = t1; | |
4628 }, | |
4629 $asIterableBase: null, | |
4630 $isEfficientLength: true, | |
4631 static: { | |
4632 "": "ListQueue__INITIAL_CAPACITY", | |
4633 ListQueue$: function(initialCapacity, $E) { | |
4634 var t1 = new P.ListQueue(null, 0, 0, 0); | |
4635 H.setRuntimeTypeInfo(t1, [$E]); | |
4636 t1.ListQueue$1(initialCapacity, $E); | |
4637 return t1; | |
4638 }} | |
4639 | |
4640 }, | |
4641 | |
4642 _ListQueueIterator: {"": "Object;_queue,_end,_modificationCount,_position,_colle
ction$_current", | |
4643 get$current: function() { | |
4644 return this._collection$_current; | |
4645 }, | |
4646 moveNext$0: function() { | |
4647 var t1, t2, t3; | |
4648 t1 = this._queue; | |
4649 if (this._modificationCount !== t1._modificationCount) | |
4650 H.throwExpression(P.ConcurrentModificationError$(t1)); | |
4651 t2 = this._position; | |
4652 if (t2 === this._end) { | |
4653 this._collection$_current = null; | |
4654 return false; | |
4655 } | |
4656 t3 = t1._table; | |
4657 if (t2 < 0 || t2 >= t3.length) | |
4658 throw H.ioore(t3, t2); | |
4659 this._collection$_current = t3[t2]; | |
4660 this._position = (this._position + 1 & t1._table.length - 1) >>> 0; | |
4661 return true; | |
4662 }, | |
4663 static: { | |
4664 _ListQueueIterator$: function(queue) { | |
4665 return new P._ListQueueIterator(queue, queue._tail, queue._modificationCount,
queue._head, null); | |
4666 }} | |
4667 | |
4668 }}], | |
4669 ["dart.core", "dart:core", , P, { | |
4670 _symbolToString: function(symbol) { | |
4671 return H.Symbol_getName(symbol); | |
4672 }, | |
4673 | |
4674 Error_safeToString: function(object) { | |
4675 var buffer, t1, i, codeUnit, t2, charCodes; | |
4676 if (typeof object === "number" || typeof object === "boolean" || null == objec
t) | |
4677 return J.toString$0(object); | |
4678 if (typeof object === "string") { | |
4679 buffer = new P.StringBuffer(""); | |
4680 buffer._contents = "\""; | |
4681 for (t1 = object.length, i = 0; i < t1; ++i) { | |
4682 codeUnit = C.JSString_methods.codeUnitAt$1(object, i); | |
4683 if (codeUnit <= 31) | |
4684 if (codeUnit === 10) | |
4685 buffer._contents = buffer._contents + "\\n"; | |
4686 else if (codeUnit === 13) | |
4687 buffer._contents = buffer._contents + "\\r"; | |
4688 else if (codeUnit === 9) | |
4689 buffer._contents = buffer._contents + "\\t"; | |
4690 else { | |
4691 buffer._contents = buffer._contents + "\\x"; | |
4692 if (codeUnit < 16) | |
4693 buffer._contents = buffer._contents + "0"; | |
4694 else { | |
4695 buffer._contents = buffer._contents + "1"; | |
4696 codeUnit -= 16; | |
4697 } | |
4698 t2 = codeUnit < 10 ? 48 + codeUnit : 87 + codeUnit; | |
4699 charCodes = P.List_List$filled(1, t2, J.JSInt); | |
4700 charCodes.$builtinTypeInfo = [J.JSInt]; | |
4701 t2 = H.Primitives_stringFromCharCodes(charCodes); | |
4702 buffer._contents = buffer._contents + t2; | |
4703 } | |
4704 else if (codeUnit === 92) | |
4705 buffer._contents = buffer._contents + "\\\\"; | |
4706 else if (codeUnit === 34) | |
4707 buffer._contents = buffer._contents + "\\\""; | |
4708 else { | |
4709 charCodes = P.List_List$filled(1, codeUnit, J.JSInt); | |
4710 charCodes.$builtinTypeInfo = [J.JSInt]; | |
4711 t2 = H.Primitives_stringFromCharCodes(charCodes); | |
4712 buffer._contents = buffer._contents + t2; | |
4713 } | |
4714 } | |
4715 buffer._contents = buffer._contents + "\""; | |
4716 return buffer._contents; | |
4717 } | |
4718 return "Instance of '" + H.Primitives_objectTypeName(object) + "'"; | |
4719 }, | |
4720 | |
4721 Exception_Exception: function(message) { | |
4722 return new P._ExceptionImplementation(message); | |
4723 }, | |
4724 | |
4725 identical: function(a, b) { | |
4726 return a == null ? b == null : a === b; | |
4727 }, | |
4728 | |
4729 identityHashCode: function(object) { | |
4730 return H.objectHashCode(object); | |
4731 }, | |
4732 | |
4733 List_List: function($length, $E) { | |
4734 if ($length == null) | |
4735 return new Array(0); | |
4736 if (typeof $length !== "number" || Math.floor($length) !== $length || $length
< 0) | |
4737 throw H.wrapException(new P.ArgumentError("Length must be a positive integer
: " + H.S($length) + ".")); | |
4738 return H.Primitives_newFixedList($length); | |
4739 }, | |
4740 | |
4741 List_List$filled: function($length, fill, $E) { | |
4742 var result, t1, i; | |
4743 if ($length < 0) | |
4744 throw H.wrapException(new P.ArgumentError("Length must be a positive integer
: " + $length + ".")); | |
4745 result = H.Primitives_newFixedList($length); | |
4746 if ($length !== 0 && true) | |
4747 for (t1 = result.length, i = 0; i < t1; ++i) | |
4748 result[i] = fill; | |
4749 return result; | |
4750 }, | |
4751 | |
4752 List_List$from: function(other, growable, $E) { | |
4753 var list, t1, $length, fixedList, i; | |
4754 list = P.List_List(null, $E); | |
4755 H.setRuntimeTypeInfo(list, [$E]); | |
4756 for (t1 = J.get$iterator$ax(other); t1.moveNext$0();) | |
4757 list.push(t1.get$current()); | |
4758 if (growable) | |
4759 return list; | |
4760 $length = list.length; | |
4761 fixedList = P.List_List($length, $E); | |
4762 H.setRuntimeTypeInfo(fixedList, [$E]); | |
4763 for (t1 = list.length, i = 0; i < $length; ++i) { | |
4764 if (i >= t1) | |
4765 throw H.ioore(list, i); | |
4766 fixedList[i] = list[i]; | |
4767 } | |
4768 return fixedList; | |
4769 }, | |
4770 | |
4771 print: function(object) { | |
4772 var line = J.toString$0(object); | |
4773 H.printToConsole(line); | |
4774 }, | |
4775 | |
4776 NoSuchMethodError_toString_closure: {"": "Closure;box_0", | |
4777 call$2: function(key, value) { | |
4778 var t1 = this.box_0; | |
4779 if (t1.i_1 > 0) | |
4780 t1.sb_0.write$1(", "); | |
4781 t1.sb_0.write$1(P._symbolToString(key)); | |
4782 }, | |
4783 $is_args2: true | |
4784 }, | |
4785 | |
4786 Duration: {"": "Object;_duration", | |
4787 $add: function(_, other) { | |
4788 return P.Duration$(0, 0, C.JSNumber_methods.$add(this._duration, other.get$_
duration()), 0, 0, 0); | |
4789 }, | |
4790 $lt: function(_, other) { | |
4791 return C.JSNumber_methods.$lt(this._duration, other.get$_duration()); | |
4792 }, | |
4793 $gt: function(_, other) { | |
4794 return C.JSNumber_methods.$gt(this._duration, other.get$_duration()); | |
4795 }, | |
4796 $ge: function(_, other) { | |
4797 return C.JSNumber_methods.$ge(this._duration, other.get$_duration()); | |
4798 }, | |
4799 $eq: function(_, other) { | |
4800 var t1; | |
4801 if (other == null) | |
4802 return false; | |
4803 t1 = J.getInterceptor(other); | |
4804 if (typeof other !== "object" || other === null || !t1.$isDuration) | |
4805 return false; | |
4806 return this._duration === other._duration; | |
4807 }, | |
4808 get$hashCode: function(_) { | |
4809 return this._duration & 0x1FFFFFFF; | |
4810 }, | |
4811 toString$0: function(_) { | |
4812 var t1, t2, twoDigitMinutes, twoDigitSeconds, sixDigitUs; | |
4813 t1 = new P.Duration_toString_twoDigits(); | |
4814 t2 = this._duration; | |
4815 if (t2 < 0) | |
4816 return "-" + H.S(P.Duration$(0, 0, -t2, 0, 0, 0)); | |
4817 twoDigitMinutes = t1.call$1(C.JSNumber_methods.remainder$1(C.JSNumber_method
s.$tdiv(t2, 60000000), 60)); | |
4818 twoDigitSeconds = t1.call$1(C.JSNumber_methods.remainder$1(C.JSNumber_method
s.$tdiv(t2, 1000000), 60)); | |
4819 sixDigitUs = new P.Duration_toString_sixDigits().call$1(C.JSNumber_methods.r
emainder$1(t2, 1000000)); | |
4820 return H.S(C.JSNumber_methods.$tdiv(t2, 3600000000)) + ":" + H.S(twoDigitMin
utes) + ":" + H.S(twoDigitSeconds) + "." + H.S(sixDigitUs); | |
4821 }, | |
4822 $isDuration: true, | |
4823 static: { | |
4824 "": "Duration_MICROSECONDS_PER_MILLISECOND,Duration_MILLISECONDS_PER_SECOND,Dura
tion_SECONDS_PER_MINUTE,Duration_MINUTES_PER_HOUR,Duration_HOURS_PER_DAY,Duratio
n_MICROSECONDS_PER_SECOND,Duration_MICROSECONDS_PER_MINUTE,Duration_MICROSECONDS
_PER_HOUR,Duration_MICROSECONDS_PER_DAY,Duration_MILLISECONDS_PER_MINUTE,Duratio
n_MILLISECONDS_PER_HOUR,Duration_MILLISECONDS_PER_DAY,Duration_SECONDS_PER_HOUR,
Duration_SECONDS_PER_DAY,Duration_MINUTES_PER_DAY,Duration_ZERO", | |
4825 Duration$: function(days, hours, microseconds, milliseconds, minutes, seconds) { | |
4826 return new P.Duration(days * 86400000000 + hours * 3600000000 + minutes * 6000
0000 + seconds * 1000000 + milliseconds * 1000 + microseconds); | |
4827 }} | |
4828 | |
4829 }, | |
4830 | |
4831 Duration_toString_sixDigits: {"": "Closure;", | |
4832 call$1: function(n) { | |
4833 var t1 = J.getInterceptor$n(n); | |
4834 if (t1.$ge(n, 100000)) | |
4835 return H.S(n); | |
4836 if (t1.$ge(n, 10000)) | |
4837 return "0" + H.S(n); | |
4838 if (t1.$ge(n, 1000)) | |
4839 return "00" + H.S(n); | |
4840 if (t1.$ge(n, 100)) | |
4841 return "000" + H.S(n); | |
4842 if (t1.$gt(n, 10)) | |
4843 return "0000" + H.S(n); | |
4844 return "00000" + H.S(n); | |
4845 }, | |
4846 $is_args1: true | |
4847 }, | |
4848 | |
4849 Duration_toString_twoDigits: {"": "Closure;", | |
4850 call$1: function(n) { | |
4851 if (J.$ge$n(n, 10)) | |
4852 return H.S(n); | |
4853 return "0" + H.S(n); | |
4854 }, | |
4855 $is_args1: true | |
4856 }, | |
4857 | |
4858 Error: {"": "Object;", | |
4859 get$stackTrace: function() { | |
4860 return new H._StackTrace(this.$thrownJsError, null); | |
4861 }, | |
4862 $isError: true | |
4863 }, | |
4864 | |
4865 NullThrownError: {"": "Error;", | |
4866 toString$0: function(_) { | |
4867 return "Throw of null."; | |
4868 } | |
4869 }, | |
4870 | |
4871 ArgumentError: {"": "Error;message", | |
4872 toString$0: function(_) { | |
4873 var t1 = this.message; | |
4874 if (t1 != null) | |
4875 return "Illegal argument(s): " + H.S(t1); | |
4876 return "Illegal argument(s)"; | |
4877 }, | |
4878 static: { | |
4879 ArgumentError$: function(message) { | |
4880 return new P.ArgumentError(message); | |
4881 }} | |
4882 | |
4883 }, | |
4884 | |
4885 RangeError: {"": "ArgumentError;message", | |
4886 toString$0: function(_) { | |
4887 return "RangeError: " + H.S(this.message); | |
4888 }, | |
4889 static: { | |
4890 RangeError$value: function(value) { | |
4891 return new P.RangeError("value " + H.S(value)); | |
4892 }, | |
4893 | |
4894 RangeError$range: function(value, start, end) { | |
4895 return new P.RangeError("value " + H.S(value) + " not in range " + start + "..
" + H.S(end)); | |
4896 }} | |
4897 | |
4898 }, | |
4899 | |
4900 UnsupportedError: {"": "Error;message", | |
4901 toString$0: function(_) { | |
4902 return "Unsupported operation: " + this.message; | |
4903 }, | |
4904 static: { | |
4905 UnsupportedError$: function(message) { | |
4906 return new P.UnsupportedError(message); | |
4907 }} | |
4908 | |
4909 }, | |
4910 | |
4911 UnimplementedError: {"": "Error;message", | |
4912 toString$0: function(_) { | |
4913 var t1 = this.message; | |
4914 return t1 != null ? "UnimplementedError: " + H.S(t1) : "UnimplementedError"; | |
4915 }, | |
4916 $isError: true, | |
4917 static: { | |
4918 UnimplementedError$: function(message) { | |
4919 return new P.UnimplementedError(message); | |
4920 }} | |
4921 | |
4922 }, | |
4923 | |
4924 StateError: {"": "Error;message", | |
4925 toString$0: function(_) { | |
4926 return "Bad state: " + this.message; | |
4927 }, | |
4928 static: { | |
4929 StateError$: function(message) { | |
4930 return new P.StateError(message); | |
4931 }} | |
4932 | |
4933 }, | |
4934 | |
4935 ConcurrentModificationError: {"": "Error;modifiedObject", | |
4936 toString$0: function(_) { | |
4937 var t1 = this.modifiedObject; | |
4938 if (t1 == null) | |
4939 return "Concurrent modification during iteration."; | |
4940 return "Concurrent modification during iteration: " + H.S(P.Error_safeToStri
ng(t1)) + "."; | |
4941 }, | |
4942 static: { | |
4943 ConcurrentModificationError$: function(modifiedObject) { | |
4944 return new P.ConcurrentModificationError(modifiedObject); | |
4945 }} | |
4946 | |
4947 }, | |
4948 | |
4949 StackOverflowError: {"": "Object;", | |
4950 toString$0: function(_) { | |
4951 return "Stack Overflow"; | |
4952 }, | |
4953 get$stackTrace: function() { | |
4954 return; | |
4955 }, | |
4956 $isError: true | |
4957 }, | |
4958 | |
4959 CyclicInitializationError: {"": "Error;variableName", | |
4960 toString$0: function(_) { | |
4961 return "Reading static variable '" + this.variableName + "' during its initi
alization"; | |
4962 }, | |
4963 static: { | |
4964 CyclicInitializationError$: function(variableName) { | |
4965 return new P.CyclicInitializationError(variableName); | |
4966 }} | |
4967 | |
4968 }, | |
4969 | |
4970 _ExceptionImplementation: {"": "Object;message", | |
4971 toString$0: function(_) { | |
4972 var t1 = this.message; | |
4973 if (t1 == null) | |
4974 return "Exception"; | |
4975 return "Exception: " + H.S(t1); | |
4976 } | |
4977 }, | |
4978 | |
4979 Expando: {"": "Object;name", | |
4980 toString$0: function(_) { | |
4981 return "Expando:" + H.S(this.name); | |
4982 }, | |
4983 $index: function(_, object) { | |
4984 var values = H.Primitives_getProperty(object, "expando$values"); | |
4985 return values == null ? null : H.Primitives_getProperty(values, this._getKey
$0()); | |
4986 }, | |
4987 $indexSet: function(_, object, value) { | |
4988 var values = H.Primitives_getProperty(object, "expando$values"); | |
4989 if (values == null) { | |
4990 values = new P.Object(); | |
4991 H.Primitives_setProperty(object, "expando$values", values); | |
4992 } | |
4993 H.Primitives_setProperty(values, this._getKey$0(), value); | |
4994 }, | |
4995 _getKey$0: function() { | |
4996 var key, t1; | |
4997 key = H.Primitives_getProperty(this, "expando$key"); | |
4998 if (key == null) { | |
4999 t1 = $.Expando__keyCount; | |
5000 $.Expando__keyCount = t1 + 1; | |
5001 key = "expando$key$" + t1; | |
5002 H.Primitives_setProperty(this, "expando$key", key); | |
5003 } | |
5004 return key; | |
5005 }, | |
5006 static: { | |
5007 "": "Expando__KEY_PROPERTY_NAME,Expando__EXPANDO_PROPERTY_NAME,Expando__keyCount
", | |
5008 } | |
5009 | |
5010 }, | |
5011 | |
5012 Function: {"": "Object;"}, | |
5013 | |
5014 Iterator: {"": "Object;"}, | |
5015 | |
5016 Null: {"": "Object;", | |
5017 toString$0: function(_) { | |
5018 return "null"; | |
5019 } | |
5020 }, | |
5021 | |
5022 Object: {"": ";", | |
5023 $eq: function(_, other) { | |
5024 return this === other; | |
5025 }, | |
5026 get$hashCode: function(_) { | |
5027 return H.Primitives_objectHashCode(this); | |
5028 }, | |
5029 toString$0: function(_) { | |
5030 return H.Primitives_objectToString(this); | |
5031 } | |
5032 }, | |
5033 | |
5034 StackTrace: {"": "Object;"}, | |
5035 | |
5036 StringBuffer: {"": "Object;_contents<", | |
5037 get$length: function(_) { | |
5038 return this._contents.length; | |
5039 }, | |
5040 write$1: function(obj) { | |
5041 var str = typeof obj === "string" ? obj : H.S(obj); | |
5042 this._contents = this._contents + str; | |
5043 }, | |
5044 writeAll$2: function(objects, separator) { | |
5045 var iterator, str; | |
5046 iterator = J.get$iterator$ax(objects); | |
5047 if (!iterator.moveNext$0()) | |
5048 return; | |
5049 if (separator.length === 0) | |
5050 do { | |
5051 str = iterator.get$current(); | |
5052 str = typeof str === "string" ? str : H.S(str); | |
5053 this._contents = this._contents + str; | |
5054 } while (iterator.moveNext$0()); | |
5055 else { | |
5056 this.write$1(iterator.get$current()); | |
5057 for (; iterator.moveNext$0();) { | |
5058 this._contents = this._contents + separator; | |
5059 str = iterator.get$current(); | |
5060 str = typeof str === "string" ? str : H.S(str); | |
5061 this._contents = this._contents + str; | |
5062 } | |
5063 } | |
5064 }, | |
5065 toString$0: function(_) { | |
5066 return this._contents; | |
5067 }, | |
5068 StringBuffer$1: function($content) { | |
5069 this._contents = $content; | |
5070 }, | |
5071 static: { | |
5072 StringBuffer$: function($content) { | |
5073 var t1 = new P.StringBuffer(""); | |
5074 t1.StringBuffer$1($content); | |
5075 return t1; | |
5076 }} | |
5077 | |
5078 }, | |
5079 | |
5080 Symbol: {"": "Object;"}}], | |
5081 ["dart.dom.html", "dart:html", , W, { | |
5082 _JenkinsSmiHash_combine: function(hash, value) { | |
5083 hash = 536870911 & hash + value; | |
5084 hash = 536870911 & hash + ((524287 & hash) << 10 >>> 0); | |
5085 return (hash ^ C.JSInt_methods.$shr(hash, 6)) >>> 0; | |
5086 }, | |
5087 | |
5088 _JenkinsSmiHash_finish: function(hash) { | |
5089 hash = 536870911 & hash + ((67108863 & hash) << 3 >>> 0); | |
5090 hash = (hash ^ C.JSInt_methods.$shr(hash, 11)) >>> 0; | |
5091 return 536870911 & hash + ((16383 & hash) << 15 >>> 0); | |
5092 }, | |
5093 | |
5094 _wrapZone: function(callback) { | |
5095 var t1 = $.Zone__current; | |
5096 if (t1 === C.C__RootZone) | |
5097 return callback; | |
5098 return t1.bindUnaryCallback$2$runGuarded(callback, true); | |
5099 }, | |
5100 | |
5101 HtmlElement: {"": "Element;", "%": "HTMLAppletElement|HTMLAreaElement|HTMLBRElem
ent|HTMLBaseElement|HTMLBaseFontElement|HTMLBodyElement|HTMLButtonElement|HTMLCo
ntentElement|HTMLDListElement|HTMLDataListElement|HTMLDetailsElement|HTMLDialogE
lement|HTMLDirectoryElement|HTMLDivElement|HTMLEmbedElement|HTMLFieldSetElement|
HTMLFontElement|HTMLFrameElement|HTMLFrameSetElement|HTMLHRElement|HTMLHeadEleme
nt|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInp
utElement|HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTM
LLinkElement|HTMLMapElement|HTMLMarqueeElement|HTMLMenuElement|HTMLMetaElement|H
TMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupEl
ement|HTMLOptionElement|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|
HTMLPreElement|HTMLProgressElement|HTMLQuoteElement|HTMLScriptElement|HTMLShadow
Element|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement|HTMLTableCaptionEleme
nt|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableEl
ement|HTMLTableHeaderCellElement|HTMLTableRowElement|HTMLTableSectionElement|HTM
LTemplateElement|HTMLTextAreaElement|HTMLTitleElement|HTMLTrackElement|HTMLUList
Element|HTMLUnknownElement;HTMLElement"}, | |
5102 | |
5103 AnchorElement: {"": "HtmlElement;", | |
5104 toString$0: function(receiver) { | |
5105 return receiver.toString(); | |
5106 }, | |
5107 "%": "HTMLAnchorElement" | |
5108 }, | |
5109 | |
5110 CanvasElement: {"": "HtmlElement;", | |
5111 getContext$2: function(receiver, contextId, attrs) { | |
5112 return receiver.getContext(contextId); | |
5113 }, | |
5114 getContext$1: function($receiver, contextId) { | |
5115 return this.getContext$2($receiver, contextId, null); | |
5116 }, | |
5117 "%": "HTMLCanvasElement" | |
5118 }, | |
5119 | |
5120 CanvasRenderingContext: {"": "Interceptor;", "%": "WebGLRenderingContext;CanvasR
enderingContext"}, | |
5121 | |
5122 CanvasRenderingContext2D: {"": "CanvasRenderingContext;lineCap},lineWidth},strok
eStyle}", | |
5123 beginPath$0: function(receiver) { | |
5124 return receiver.beginPath(); | |
5125 }, | |
5126 closePath$0: function(receiver) { | |
5127 return receiver.closePath(); | |
5128 }, | |
5129 lineTo$2: function(receiver, x, y) { | |
5130 return receiver.lineTo(x, y); | |
5131 }, | |
5132 moveTo$2: function(receiver, x, y) { | |
5133 return receiver.moveTo(x, y); | |
5134 }, | |
5135 stroke$0: function(receiver) { | |
5136 return receiver.stroke(); | |
5137 }, | |
5138 "%": "CanvasRenderingContext2D" | |
5139 }, | |
5140 | |
5141 CharacterData: {"": "Node;length=", "%": "CDATASection|CharacterData|Comment|Pro
cessingInstruction|Text"}, | |
5142 | |
5143 DomException: {"": "Interceptor;", | |
5144 toString$0: function(receiver) { | |
5145 return receiver.toString(); | |
5146 }, | |
5147 "%": "DOMException" | |
5148 }, | |
5149 | |
5150 Element: {"": "Node;", | |
5151 toString$0: function(receiver) { | |
5152 return receiver.localName; | |
5153 }, | |
5154 "%": "SVGAElement|SVGAltGlyphDefElement|SVGAltGlyphElement|SVGAltGlyphItemElem
ent|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement|SVGAnimateT
ransformElement|SVGAnimationElement|SVGCircleElement|SVGClipPathElement|SVGCompo
nentTransferFunctionElement|SVGCursorElement|SVGDefsElement|SVGDescElement|SVGEl
ement|SVGEllipseElement|SVGFEBlendElement|SVGFEColorMatrixElement|SVGFEComponent
TransferElement|SVGFECompositeElement|SVGFEConvolveMatrixElement|SVGFEDiffuseLig
htingElement|SVGFEDisplacementMapElement|SVGFEDistantLightElement|SVGFEDropShado
wElement|SVGFEFloodElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement
|SVGFEFuncRElement|SVGFEGaussianBlurElement|SVGFEImageElement|SVGFEMergeElement|
SVGFEMergeNodeElement|SVGFEMorphologyElement|SVGFEOffsetElement|SVGFEPointLightE
lement|SVGFESpecularLightingElement|SVGFESpotLightElement|SVGFETileElement|SVGFE
TurbulenceElement|SVGFilterElement|SVGFontElement|SVGFontFaceElement|SVGFontFace
FormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement
|SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGlyphRefElement|SVGGradi
entElement|SVGGraphicsElement|SVGHKernElement|SVGImageElement|SVGLineElement|SVG
LinearGradientElement|SVGMPathElement|SVGMarkerElement|SVGMaskElement|SVGMetadat
aElement|SVGMissingGlyphElement|SVGPathElement|SVGPatternElement|SVGPolygonEleme
nt|SVGPolylineElement|SVGRadialGradientElement|SVGRectElement|SVGSVGElement|SVGS
criptElement|SVGSetElement|SVGStopElement|SVGStyleElement|SVGSwitchElement|SVGSy
mbolElement|SVGTSpanElement|SVGTextContentElement|SVGTextElement|SVGTextPathElem
ent|SVGTextPositioningElement|SVGTitleElement|SVGUseElement|SVGVKernElement|SVGV
iewElement;Element" | |
5155 }, | |
5156 | |
5157 ErrorEvent: {"": "Event;error=", "%": "ErrorEvent"}, | |
5158 | |
5159 Event: {"": "Interceptor;", | |
5160 preventDefault$0: function(receiver) { | |
5161 return receiver.preventDefault(); | |
5162 }, | |
5163 "%": "AudioProcessingEvent|AutocompleteErrorEvent|BeforeLoadEvent|BeforeUnload
Event|CSSFontFaceLoadEvent|CloseEvent|CustomEvent|DeviceMotionEvent|DeviceOrient
ationEvent|HashChangeEvent|IDBVersionChangeEvent|MIDIConnectionEvent|MIDIMessage
Event|MediaKeyEvent|MediaKeyMessageEvent|MediaKeyNeededEvent|MediaStreamEvent|Me
diaStreamTrackEvent|MessageEvent|MutationEvent|OfflineAudioCompletionEvent|Overf
lowEvent|PageTransitionEvent|PopStateEvent|ProgressEvent|RTCDTMFToneChangeEvent|
RTCDataChannelEvent|RTCIceCandidateEvent|ResourceProgressEvent|SecurityPolicyVio
lationEvent|SpeechInputEvent|SpeechRecognitionEvent|SpeechSynthesisEvent|Storage
Event|TrackEvent|TransitionEvent|WebGLContextEvent|WebKitAnimationEvent|WebKitTr
ansitionEvent|XMLHttpRequestProgressEvent;Event" | |
5164 }, | |
5165 | |
5166 EventTarget: {"": "Interceptor;", | |
5167 addEventListener$3: function(receiver, type, listener, useCapture) { | |
5168 return receiver.addEventListener(type, H.convertDartClosureToJS(listener, 1)
, useCapture); | |
5169 }, | |
5170 removeEventListener$3: function(receiver, type, listener, useCapture) { | |
5171 return receiver.removeEventListener(type, H.convertDartClosureToJS(listener,
1), useCapture); | |
5172 }, | |
5173 "%": "MediaStream;EventTarget" | |
5174 }, | |
5175 | |
5176 FormElement: {"": "HtmlElement;length=", "%": "HTMLFormElement"}, | |
5177 | |
5178 MediaElement: {"": "HtmlElement;error=", "%": "HTMLAudioElement|HTMLMediaElement
|HTMLVideoElement"}, | |
5179 | |
5180 Node: {"": "EventTarget;", | |
5181 toString$0: function(receiver) { | |
5182 var t1 = receiver.nodeValue; | |
5183 return t1 == null ? J.Interceptor.prototype.toString$0.call(this, receiver)
: t1; | |
5184 }, | |
5185 "%": "Attr|Document|DocumentFragment|DocumentType|Entity|HTMLDocument|Notation
|SVGDocument|ShadowRoot;Node" | |
5186 }, | |
5187 | |
5188 SelectElement: {"": "HtmlElement;length=", "%": "HTMLSelectElement"}, | |
5189 | |
5190 SpeechRecognitionError: {"": "Event;error=", "%": "SpeechRecognitionError"}, | |
5191 | |
5192 Touch: {"": "Interceptor;identifier=", "%": "Touch"}, | |
5193 | |
5194 TouchEvent: {"": "UIEvent;touches=", "%": "TouchEvent"}, | |
5195 | |
5196 TouchList: {"": "Interceptor_ListMixin_ImmutableListMixin;", | |
5197 get$length: function(receiver) { | |
5198 return receiver.length; | |
5199 }, | |
5200 $index: function(receiver, index) { | |
5201 var t1 = receiver.length; | |
5202 if (index >>> 0 !== index || index >= t1) | |
5203 throw H.wrapException(P.RangeError$range(index, 0, t1)); | |
5204 return receiver[index]; | |
5205 }, | |
5206 $indexSet: function(receiver, index, value) { | |
5207 throw H.wrapException(P.UnsupportedError$("Cannot assign element of immutabl
e List.")); | |
5208 }, | |
5209 elementAt$1: function(receiver, index) { | |
5210 if (index < 0 || index >= receiver.length) | |
5211 throw H.ioore(receiver, index); | |
5212 return receiver[index]; | |
5213 }, | |
5214 $asList: function() { | |
5215 return [W.Touch]; | |
5216 }, | |
5217 $isList: true, | |
5218 $isEfficientLength: true, | |
5219 $isJavaScriptIndexingBehavior: true, | |
5220 "%": "TouchList" | |
5221 }, | |
5222 | |
5223 UIEvent: {"": "Event;", "%": "CompositionEvent|DragEvent|FocusEvent|KeyboardEven
t|MSPointerEvent|MouseEvent|MouseScrollEvent|MouseWheelEvent|PointerEvent|SVGZoo
mEvent|TextEvent|WheelEvent;UIEvent"}, | |
5224 | |
5225 Window: {"": "EventTarget;", | |
5226 toString$0: function(receiver) { | |
5227 return receiver.toString(); | |
5228 }, | |
5229 "%": "DOMWindow|Window" | |
5230 }, | |
5231 | |
5232 _ClientRect: {"": "Interceptor;height=,left=,top=,width=", | |
5233 toString$0: function(receiver) { | |
5234 return "Rectangle (" + H.S(receiver.left) + ", " + H.S(receiver.top) + ") "
+ H.S(receiver.width) + " x " + H.S(receiver.height); | |
5235 }, | |
5236 $eq: function(receiver, other) { | |
5237 var t1, t2, t3; | |
5238 if (other == null) | |
5239 return false; | |
5240 t1 = J.getInterceptor$x(other); | |
5241 if (typeof other !== "object" || other === null || !t1.$isRectangle) | |
5242 return false; | |
5243 t2 = receiver.left; | |
5244 t3 = t1.get$left(other); | |
5245 if (t2 == null ? t3 == null : t2 === t3) { | |
5246 t2 = receiver.top; | |
5247 t3 = t1.get$top(other); | |
5248 if (t2 == null ? t3 == null : t2 === t3) { | |
5249 t2 = receiver.width; | |
5250 t3 = t1.get$width(other); | |
5251 if (t2 == null ? t3 == null : t2 === t3) { | |
5252 t2 = receiver.height; | |
5253 t1 = t1.get$height(other); | |
5254 t1 = t2 == null ? t1 == null : t2 === t1; | |
5255 } else | |
5256 t1 = false; | |
5257 } else | |
5258 t1 = false; | |
5259 } else | |
5260 t1 = false; | |
5261 return t1; | |
5262 }, | |
5263 get$hashCode: function(receiver) { | |
5264 var t1, t2, t3, t4; | |
5265 t1 = J.get$hashCode$(receiver.left); | |
5266 t2 = J.get$hashCode$(receiver.top); | |
5267 t3 = J.get$hashCode$(receiver.width); | |
5268 t4 = J.get$hashCode$(receiver.height); | |
5269 return W._JenkinsSmiHash_finish(W._JenkinsSmiHash_combine(W._JenkinsSmiHash_
combine(W._JenkinsSmiHash_combine(W._JenkinsSmiHash_combine(0, t1), t2), t3), t4
)); | |
5270 }, | |
5271 $isRectangle: true, | |
5272 $asRectangle: function() { | |
5273 return [null]; | |
5274 }, | |
5275 "%": "ClientRect|DOMRect" | |
5276 }, | |
5277 | |
5278 Interceptor_ListMixin: {"": "Interceptor+ListMixin;", $isList: true, $asList: nu
ll, $isEfficientLength: true}, | |
5279 | |
5280 Interceptor_ListMixin_ImmutableListMixin: {"": "Interceptor_ListMixin+ImmutableL
istMixin;", $asList: null, $isList: true, $isEfficientLength: true}, | |
5281 | |
5282 EventStreamProvider: {"": "Object;_eventType"}, | |
5283 | |
5284 _EventStream: {"": "Stream;", | |
5285 listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone,
onError) { | |
5286 var t1 = new W._EventStreamSubscription(0, this._target, this._eventType, W.
_wrapZone(onData), this._useCapture); | |
5287 H.setRuntimeTypeInfo(t1, [H.getRuntimeTypeArgument(this, "_EventStream", 0)]
); | |
5288 t1._tryResume$0(); | |
5289 return t1; | |
5290 }, | |
5291 $asStream: null | |
5292 }, | |
5293 | |
5294 _ElementEventStreamImpl: {"": "_EventStream;_target,_eventType,_useCapture", $as
_EventStream: null}, | |
5295 | |
5296 _EventStreamSubscription: {"": "StreamSubscription;_pauseCount,_target,_eventTyp
e,_onData,_useCapture", | |
5297 cancel$0: function() { | |
5298 if (this._target == null) | |
5299 return; | |
5300 this._unlisten$0(); | |
5301 this._target = null; | |
5302 this._onData = null; | |
5303 }, | |
5304 _tryResume$0: function() { | |
5305 var t1 = this._onData; | |
5306 if (t1 != null && this._pauseCount <= 0) | |
5307 J.addEventListener$3$x(this._target, this._eventType, t1, this._useCapture
); | |
5308 }, | |
5309 _unlisten$0: function() { | |
5310 var t1 = this._onData; | |
5311 if (t1 != null) | |
5312 J.removeEventListener$3$x(this._target, this._eventType, t1, this._useCapt
ure); | |
5313 }, | |
5314 $asStreamSubscription: null | |
5315 }, | |
5316 | |
5317 ImmutableListMixin: {"": "Object;", | |
5318 get$iterator: function(receiver) { | |
5319 return W.FixedSizeListIterator$(receiver); | |
5320 }, | |
5321 $isList: true, | |
5322 $asList: null, | |
5323 $isEfficientLength: true | |
5324 }, | |
5325 | |
5326 FixedSizeListIterator: {"": "Object;_array,_html$_length,_html$_position,_html$_
current", | |
5327 moveNext$0: function() { | |
5328 var nextPosition, t1; | |
5329 nextPosition = this._html$_position + 1; | |
5330 t1 = this._html$_length; | |
5331 if (nextPosition < t1) { | |
5332 this._html$_current = J.$index$asx(this._array, nextPosition); | |
5333 this._html$_position = nextPosition; | |
5334 return true; | |
5335 } | |
5336 this._html$_current = null; | |
5337 this._html$_position = t1; | |
5338 return false; | |
5339 }, | |
5340 get$current: function() { | |
5341 return this._html$_current; | |
5342 }, | |
5343 static: { | |
5344 FixedSizeListIterator$: function(array) { | |
5345 return new W.FixedSizeListIterator(array, J.get$length$asx(array), -1, null); | |
5346 }} | |
5347 | |
5348 }}], | |
5349 ["dart.isolate", "dart:isolate", , P, { | |
5350 ReceivePort: {"": "Object;"}}], | |
5351 ["dart.math", "dart:math", , P, { | |
5352 _JenkinsSmiHash_combine0: function(hash, value) { | |
5353 hash = 536870911 & hash + value; | |
5354 hash = 536870911 & hash + ((524287 & hash) << 10 >>> 0); | |
5355 return (hash ^ C.JSInt_methods.$shr(hash, 6)) >>> 0; | |
5356 }, | |
5357 | |
5358 _JenkinsSmiHash_finish0: function(hash) { | |
5359 hash = 536870911 & hash + ((67108863 & hash) << 3 >>> 0); | |
5360 hash = (hash ^ C.JSInt_methods.$shr(hash, 11)) >>> 0; | |
5361 return 536870911 & hash + ((16383 & hash) << 15 >>> 0); | |
5362 }, | |
5363 | |
5364 _Random: {"": "Object;", | |
5365 nextInt$1: function(max) { | |
5366 if (max < 0) | |
5367 throw H.wrapException(new P.ArgumentError("negative max: " + max)); | |
5368 if (max > 4294967295) | |
5369 max = 4294967295; | |
5370 return Math.random() * max >>> 0; | |
5371 } | |
5372 }, | |
5373 | |
5374 Point: {"": "Object;x,y", | |
5375 toString$0: function(_) { | |
5376 return "Point(" + H.S(this.x) + ", " + H.S(this.y) + ")"; | |
5377 }, | |
5378 $eq: function(_, other) { | |
5379 var t1, t2; | |
5380 if (other == null) | |
5381 return false; | |
5382 t1 = J.getInterceptor(other); | |
5383 if (typeof other !== "object" || other === null || !t1.$isPoint) | |
5384 return false; | |
5385 t1 = this.x; | |
5386 t2 = other.x; | |
5387 if (t1 == null ? t2 == null : t1 === t2) { | |
5388 t1 = this.y; | |
5389 t2 = other.y; | |
5390 t2 = t1 == null ? t2 == null : t1 === t2; | |
5391 t1 = t2; | |
5392 } else | |
5393 t1 = false; | |
5394 return t1; | |
5395 }, | |
5396 get$hashCode: function(_) { | |
5397 var t1, t2; | |
5398 t1 = J.get$hashCode$(this.x); | |
5399 t2 = J.get$hashCode$(this.y); | |
5400 return P._JenkinsSmiHash_finish0(P._JenkinsSmiHash_combine0(P._JenkinsSmiHas
h_combine0(0, t1), t2)); | |
5401 }, | |
5402 $add: function(_, other) { | |
5403 var t1, t2, t3; | |
5404 t1 = this.x; | |
5405 t2 = C.JSNumber_methods.get$x(other); | |
5406 if (typeof t1 !== "number") | |
5407 throw t1.$add(); | |
5408 t2 = C.JSNumber_methods.$add(t1, t2); | |
5409 t1 = this.y; | |
5410 t3 = C.JSNumber_methods.get$y(other); | |
5411 if (typeof t1 !== "number") | |
5412 throw t1.$add(); | |
5413 t3 = C.JSNumber_methods.$add(t1, t3); | |
5414 t3 = new P.Point(t2, t3); | |
5415 H.setRuntimeTypeInfo(t3, [H.getRuntimeTypeArgument(this, "Point", 0)]); | |
5416 return t3; | |
5417 }, | |
5418 $isPoint: true | |
5419 }, | |
5420 | |
5421 _RectangleBase: {"": "Object;", | |
5422 toString$0: function(_) { | |
5423 return "Rectangle (" + H.S(this.get$left(this)) + ", " + H.S(this.top) + ")
" + H.S(this.width) + " x " + H.S(this.height); | |
5424 }, | |
5425 $eq: function(_, other) { | |
5426 var t1, t2, t3; | |
5427 if (other == null) | |
5428 return false; | |
5429 t1 = J.getInterceptor$x(other); | |
5430 if (typeof other !== "object" || other === null || !t1.$isRectangle) | |
5431 return false; | |
5432 t2 = this.get$left(this); | |
5433 t3 = t1.get$left(other); | |
5434 if (t2 == null ? t3 == null : t2 === t3) { | |
5435 t2 = this.top; | |
5436 t3 = t1.get$top(other); | |
5437 if (t2 == null ? t3 == null : t2 === t3) { | |
5438 t2 = this.width; | |
5439 t3 = t1.get$width(other); | |
5440 if (t2 == null ? t3 == null : t2 === t3) { | |
5441 t2 = this.height; | |
5442 t1 = t1.get$height(other); | |
5443 t1 = t2 == null ? t1 == null : t2 === t1; | |
5444 } else | |
5445 t1 = false; | |
5446 } else | |
5447 t1 = false; | |
5448 } else | |
5449 t1 = false; | |
5450 return t1; | |
5451 }, | |
5452 get$hashCode: function(_) { | |
5453 var t1, t2, t3, t4; | |
5454 t1 = J.get$hashCode$(this.get$left(this)); | |
5455 t2 = J.get$hashCode$(this.top); | |
5456 t3 = J.get$hashCode$(this.width); | |
5457 t4 = J.get$hashCode$(this.height); | |
5458 return P._JenkinsSmiHash_finish0(P._JenkinsSmiHash_combine0(P._JenkinsSmiHas
h_combine0(P._JenkinsSmiHash_combine0(P._JenkinsSmiHash_combine0(0, t1), t2), t3
), t4)); | |
5459 } | |
5460 }, | |
5461 | |
5462 Rectangle: {"": "_RectangleBase;left>,top>,width>,height>", $isRectangle: true,
$asRectangle: null, $as_RectangleBase: null}}], | |
5463 ["dart.typed_data", "dart:typed_data", , P, { | |
5464 TypedData: {"": "Interceptor;", | |
5465 _invalidIndex$2: function(receiver, index, $length) { | |
5466 var t1 = J.getInterceptor$n(index); | |
5467 if (t1.$lt(index, 0) || t1.$ge(index, $length)) | |
5468 throw H.wrapException(P.RangeError$range(index, 0, $length)); | |
5469 else | |
5470 throw H.wrapException(new P.ArgumentError("Invalid list index " + H.S(inde
x))); | |
5471 }, | |
5472 "%": ";ArrayBufferView;TypedData_ListMixin|TypedData_ListMixin_FixedLengthList
Mixin" | |
5473 }, | |
5474 | |
5475 Uint8List: {"": "TypedData_ListMixin_FixedLengthListMixin;", | |
5476 get$length: function(receiver) { | |
5477 return C.JS_CONST_ZYJ(receiver); | |
5478 }, | |
5479 $index: function(receiver, index) { | |
5480 var t1, t2; | |
5481 t1 = C.JS_CONST_ZYJ(receiver); | |
5482 if (!(index >>> 0 != index)) { | |
5483 if (typeof index !== "number") | |
5484 throw index.$ge(); | |
5485 t2 = index >= t1; | |
5486 } else | |
5487 t2 = true; | |
5488 if (t2) | |
5489 this._invalidIndex$2(receiver, index, t1); | |
5490 return receiver[index]; | |
5491 }, | |
5492 $indexSet: function(receiver, index, value) { | |
5493 var t1 = C.JS_CONST_ZYJ(receiver); | |
5494 if (index >>> 0 != index || J.$ge$n(index, t1)) | |
5495 this._invalidIndex$2(receiver, index, t1); | |
5496 receiver[index] = value; | |
5497 }, | |
5498 $asList: function() { | |
5499 return [J.JSInt]; | |
5500 }, | |
5501 $isList: true, | |
5502 $isEfficientLength: true, | |
5503 $isJavaScriptIndexingBehavior: true, | |
5504 "%": ";Uint8Array" | |
5505 }, | |
5506 | |
5507 TypedData_ListMixin: {"": "TypedData+ListMixin;", $isList: true, $asList: null,
$isEfficientLength: true}, | |
5508 | |
5509 TypedData_ListMixin_FixedLengthListMixin: {"": "TypedData_ListMixin+FixedLengthL
istMixin;", $asList: null}}], | |
5510 ["multi_touch", "index.dart", , Y, { | |
5511 main: function() { | |
5512 Y.CanvasDrawer$(document.querySelector("#example")); | |
5513 }, | |
5514 | |
5515 CanvasDrawer: {"": "Object;canvas,ctxt,offset,lines", | |
5516 preDraw$1: function($event) { | |
5517 var t1 = J.getInterceptor$x($event); | |
5518 t1.preventDefault$0($event); | |
5519 J.forEach$1$ax(t1.get$touches($event), new Y.CanvasDrawer_preDraw_closure(th
is)); | |
5520 }, | |
5521 get$preDraw: function() { | |
5522 return new H.BoundClosure$1(this, Y.CanvasDrawer.prototype.preDraw$1, null,
"preDraw$1"); | |
5523 }, | |
5524 draw$1: function($event) { | |
5525 var t1 = J.getInterceptor$x($event); | |
5526 t1.preventDefault$0($event); | |
5527 J.forEach$1$ax(t1.get$touches($event), new Y.CanvasDrawer_draw_closure(this)
); | |
5528 }, | |
5529 get$draw: function() { | |
5530 return new H.BoundClosure$1(this, Y.CanvasDrawer.prototype.draw$1, null, "dr
aw$1"); | |
5531 }, | |
5532 move$3: function(_id, changeX, changeY) { | |
5533 var t1 = this.lines; | |
5534 J.set$strokeStyle$x(this.ctxt, J.$index$asx(t1.$index(t1, _id), "color")); | |
5535 J.beginPath$0$x(this.ctxt); | |
5536 J.moveTo$2$x(this.ctxt, J.$index$asx(t1.$index(t1, _id), "x"), J.$index$asx(
t1.$index(t1, _id), "y")); | |
5537 J.lineTo$2$x(this.ctxt, J.$add$ns(J.$index$asx(t1.$index(t1, _id), "x"), cha
ngeX), J.$add$ns(J.$index$asx(t1.$index(t1, _id), "y"), changeY)); | |
5538 J.stroke$0$x(this.ctxt); | |
5539 J.closePath$0$x(this.ctxt); | |
5540 return H.fillLiteralMap(["x", J.$add$ns(J.$index$asx(t1.$index(t1, _id), "x"
), changeX), "y", J.$add$ns(J.$index$asx(t1.$index(t1, _id), "y"), changeY)], P.
LinkedHashMap_LinkedHashMap(null, null, null, null, null)); | |
5541 }, | |
5542 CanvasDrawer$1: function(canvas) { | |
5543 var t1, t2, t3; | |
5544 t1 = this.canvas; | |
5545 this.ctxt = J.getContext$1$x(t1, "2d"); | |
5546 t1.width = window.innerWidth; | |
5547 t1.height = window.innerHeight; | |
5548 J.set$lineWidth$x(this.ctxt, C.JSNumber_methods.toInt$0(Math.ceil(Math.rando
m() * 10))); | |
5549 J.set$lineCap$x(this.ctxt, "round"); | |
5550 t2 = new P.Rectangle(t1.offsetLeft, t1.offsetTop, t1.offsetWidth, t1.offsetH
eight); | |
5551 H.setRuntimeTypeInfo(t2, [null]); | |
5552 this.offset = t2; | |
5553 t2 = new W._ElementEventStreamImpl(t1, C.EventStreamProvider_touchstart._eve
ntType, false); | |
5554 H.setRuntimeTypeInfo(t2, [null]); | |
5555 t3 = this.get$preDraw(); | |
5556 t3 = new W._EventStreamSubscription(0, t2._target, t2._eventType, W._wrapZon
e(t3), t2._useCapture); | |
5557 H.setRuntimeTypeInfo(t3, [H.getRuntimeTypeArgument(t2, "_EventStream", 0)]); | |
5558 t3._tryResume$0(); | |
5559 t1 = new W._ElementEventStreamImpl(t1, C.EventStreamProvider_touchmove._even
tType, false); | |
5560 H.setRuntimeTypeInfo(t1, [null]); | |
5561 t3 = this.get$draw(); | |
5562 t3 = new W._EventStreamSubscription(0, t1._target, t1._eventType, W._wrapZon
e(t3), t1._useCapture); | |
5563 H.setRuntimeTypeInfo(t3, [H.getRuntimeTypeArgument(t1, "_EventStream", 0)]); | |
5564 t3._tryResume$0(); | |
5565 }, | |
5566 static: { | |
5567 "": "CanvasDrawer_colors", | |
5568 CanvasDrawer$: function(canvas) { | |
5569 var t1 = new Y.CanvasDrawer(canvas, null, null, H.fillLiteralMap([], P.LinkedH
ashMap_LinkedHashMap(null, null, null, null, null))); | |
5570 t1.CanvasDrawer$1(canvas); | |
5571 return t1; | |
5572 }} | |
5573 | |
5574 }, | |
5575 | |
5576 CanvasDrawer_preDraw_closure: {"": "Closure;this_0", | |
5577 call$1: function(touch) { | |
5578 var t1, t2, t3, t4, t5, t6, t7; | |
5579 t1 = this.this_0; | |
5580 t2 = t1.lines; | |
5581 t3 = J.get$identifier$x(touch); | |
5582 t4 = new P.Point(touch.pageX, touch.pageY); | |
5583 H.setRuntimeTypeInfo(t4, [null]); | |
5584 t4 = t4.x; | |
5585 t5 = t1.offset.left; | |
5586 if (typeof t4 !== "number") | |
5587 throw t4.$sub(); | |
5588 if (typeof t5 !== "number") | |
5589 throw H.iae(t5); | |
5590 t6 = new P.Point(touch.pageX, touch.pageY); | |
5591 H.setRuntimeTypeInfo(t6, [null]); | |
5592 t6 = t6.y; | |
5593 t1 = t1.offset.top; | |
5594 if (typeof t6 !== "number") | |
5595 throw t6.$sub(); | |
5596 if (typeof t1 !== "number") | |
5597 throw H.iae(t1); | |
5598 t7 = C.C__Random.nextInt$1(6); | |
5599 if (t7 < 0 || t7 >= 6) | |
5600 throw H.ioore(C.List_kmp, t7); | |
5601 t2.$indexSet(t2, t3, H.fillLiteralMap(["x", t4 - t5, "y", t6 - t1, "color",
C.List_kmp[t7]], P.LinkedHashMap_LinkedHashMap(null, null, null, null, null))); | |
5602 }, | |
5603 $is_args1: true | |
5604 }, | |
5605 | |
5606 CanvasDrawer_draw_closure: {"": "Closure;this_0", | |
5607 call$1: function(touch) { | |
5608 var _id, t1, t2, t3, t4, t5, t6, t7, t8, ret; | |
5609 _id = J.get$identifier$x(touch); | |
5610 t1 = this.this_0; | |
5611 t2 = new P.Point(touch.pageX, touch.pageY); | |
5612 H.setRuntimeTypeInfo(t2, [null]); | |
5613 t2 = t2.x; | |
5614 t3 = t1.offset.left; | |
5615 if (typeof t2 !== "number") | |
5616 throw t2.$sub(); | |
5617 if (typeof t3 !== "number") | |
5618 throw H.iae(t3); | |
5619 t4 = t1.lines; | |
5620 t5 = J.$index$asx(t4.$index(t4, _id), "x"); | |
5621 if (typeof t5 !== "number") | |
5622 throw H.iae(t5); | |
5623 t6 = new P.Point(touch.pageX, touch.pageY); | |
5624 H.setRuntimeTypeInfo(t6, [null]); | |
5625 t6 = t6.y; | |
5626 t7 = t1.offset.top; | |
5627 if (typeof t6 !== "number") | |
5628 throw t6.$sub(); | |
5629 if (typeof t7 !== "number") | |
5630 throw H.iae(t7); | |
5631 t8 = J.$index$asx(t4.$index(t4, _id), "y"); | |
5632 if (typeof t8 !== "number") | |
5633 throw H.iae(t8); | |
5634 ret = t1.move$3(_id, t2 - t3 - t5, t6 - t7 - t8); | |
5635 J.$indexSet$ax(t4.$index(t4, _id), "x", ret.$index(ret, "x")); | |
5636 J.$indexSet$ax(t4.$index(t4, _id), "y", ret.$index(ret, "y")); | |
5637 }, | |
5638 $is_args1: true | |
5639 }}, | |
5640 1], | |
5641 ]); | |
5642 Isolate.$finishClasses($$, $, null); | |
5643 $$ = null; | |
5644 | |
5645 // Static function getters | |
5646 init.globalFunctions.IsolateNatives__processWorkerMessage$closure = H.IsolateNat
ives__processWorkerMessage$closure = new H.Closure$2(H.IsolateNatives__processWo
rkerMessage, "IsolateNatives__processWorkerMessage$closure"); | |
5647 init.globalFunctions.toStringWrapper$closure = H.toStringWrapper$closure = new H
.Closure$0(H.toStringWrapper, "toStringWrapper$closure"); | |
5648 init.globalFunctions.invokeClosure$closure = H.invokeClosure$closure = new H.Clo
sure$7(H.invokeClosure, "invokeClosure$closure"); | |
5649 init.globalFunctions._asyncRunCallback$closure = P._asyncRunCallback$closure = n
ew H.Closure$0(P._asyncRunCallback, "_asyncRunCallback$closure"); | |
5650 init.globalFunctions._nullDataHandler$closure = P._nullDataHandler$closure = new
P.Closure$1(P._nullDataHandler, "_nullDataHandler$closure"); | |
5651 init.globalFunctions._nullErrorHandler$closure = P._nullErrorHandler$closure = n
ew P.Closure$20(P._nullErrorHandler, "_nullErrorHandler$closure"); | |
5652 init.globalFunctions._nullDoneHandler$closure = P._nullDoneHandler$closure = new
H.Closure$0(P._nullDoneHandler, "_nullDoneHandler$closure"); | |
5653 init.globalFunctions._defaultEquals$closure = P._defaultEquals$closure = new H.C
losure$2(P._defaultEquals, "_defaultEquals$closure"); | |
5654 init.globalFunctions._defaultHashCode$closure = P._defaultHashCode$closure = new
P.Closure$1(P._defaultHashCode, "_defaultHashCode$closure"); | |
5655 init.globalFunctions.identical$closure = P.identical$closure = new H.Closure$2(P
.identical, "identical$closure"); | |
5656 init.globalFunctions.identityHashCode$closure = P.identityHashCode$closure = new
P.Closure$1(P.identityHashCode, "identityHashCode$closure"); | |
5657 init.globalFunctions.main$closure = Y.main$closure = new H.Closure$0(Y.main, "ma
in$closure"); | |
5658 // Runtime type support | |
5659 W.Touch.$isObject = true; | |
5660 J.JSInt.$isint = true; | |
5661 J.JSInt.$isObject = true; | |
5662 J.JSString.$isString = true; | |
5663 J.JSString.$isObject = true; | |
5664 J.JSNumber.$isObject = true; | |
5665 P.Duration.$isObject = true; | |
5666 W.TouchEvent.$isTouchEvent = true; | |
5667 W.TouchEvent.$isObject = true; | |
5668 P.ReceivePort.$isObject = true; | |
5669 H._IsolateEvent.$isObject = true; | |
5670 H._IsolateContext.$isObject = true; | |
5671 J.JSArray.$isObject = true; | |
5672 P.Symbol.$isSymbol = true; | |
5673 P.Symbol.$isObject = true; | |
5674 P.StackTrace.$isStackTrace = true; | |
5675 P.StackTrace.$isObject = true; | |
5676 P.Object.$isObject = true; | |
5677 P.Function.$isFunction = true; | |
5678 P.Function.$isObject = true; | |
5679 J.JSBool.$isbool = true; | |
5680 J.JSBool.$isObject = true; | |
5681 P._EventSink.$is_EventSink = true; | |
5682 P._EventSink.$isObject = true; | |
5683 P.Future.$isFuture = true; | |
5684 P.Future.$isObject = true; | |
5685 P.StreamSubscription.$isStreamSubscription = true; | |
5686 P.StreamSubscription.$isObject = true; | |
5687 // getInterceptor methods | |
5688 J.getInterceptor = function(receiver) { | |
5689 if (typeof receiver == "number") { | |
5690 if (Math.floor(receiver) == receiver) | |
5691 return J.JSInt.prototype; | |
5692 return J.JSDouble.prototype; | |
5693 } | |
5694 if (typeof receiver == "string") | |
5695 return J.JSString.prototype; | |
5696 if (receiver == null) | |
5697 return J.JSNull.prototype; | |
5698 if (typeof receiver == "boolean") | |
5699 return J.JSBool.prototype; | |
5700 if (receiver.constructor == Array) | |
5701 return J.JSArray.prototype; | |
5702 if (typeof receiver != "object") | |
5703 return receiver; | |
5704 if (receiver instanceof P.Object) | |
5705 return receiver; | |
5706 return J.getNativeInterceptor(receiver); | |
5707 }; | |
5708 J.getInterceptor$asx = function(receiver) { | |
5709 if (typeof receiver == "string") | |
5710 return J.JSString.prototype; | |
5711 if (receiver == null) | |
5712 return receiver; | |
5713 if (receiver.constructor == Array) | |
5714 return J.JSArray.prototype; | |
5715 if (typeof receiver != "object") | |
5716 return receiver; | |
5717 if (receiver instanceof P.Object) | |
5718 return receiver; | |
5719 return J.getNativeInterceptor(receiver); | |
5720 }; | |
5721 J.getInterceptor$ax = function(receiver) { | |
5722 if (receiver == null) | |
5723 return receiver; | |
5724 if (receiver.constructor == Array) | |
5725 return J.JSArray.prototype; | |
5726 if (typeof receiver != "object") | |
5727 return receiver; | |
5728 if (receiver instanceof P.Object) | |
5729 return receiver; | |
5730 return J.getNativeInterceptor(receiver); | |
5731 }; | |
5732 J.getInterceptor$n = function(receiver) { | |
5733 if (typeof receiver == "number") | |
5734 return J.JSNumber.prototype; | |
5735 if (receiver == null) | |
5736 return receiver; | |
5737 if (!(receiver instanceof P.Object)) | |
5738 return J.UnknownJavaScriptObject.prototype; | |
5739 return receiver; | |
5740 }; | |
5741 J.getInterceptor$ns = function(receiver) { | |
5742 if (typeof receiver == "number") | |
5743 return J.JSNumber.prototype; | |
5744 if (typeof receiver == "string") | |
5745 return J.JSString.prototype; | |
5746 if (receiver == null) | |
5747 return receiver; | |
5748 if (!(receiver instanceof P.Object)) | |
5749 return J.UnknownJavaScriptObject.prototype; | |
5750 return receiver; | |
5751 }; | |
5752 J.getInterceptor$s = function(receiver) { | |
5753 if (typeof receiver == "string") | |
5754 return J.JSString.prototype; | |
5755 if (receiver == null) | |
5756 return receiver; | |
5757 if (!(receiver instanceof P.Object)) | |
5758 return J.UnknownJavaScriptObject.prototype; | |
5759 return receiver; | |
5760 }; | |
5761 J.getInterceptor$x = function(receiver) { | |
5762 if (receiver == null) | |
5763 return receiver; | |
5764 if (typeof receiver != "object") | |
5765 return receiver; | |
5766 if (receiver instanceof P.Object) | |
5767 return receiver; | |
5768 return J.getNativeInterceptor(receiver); | |
5769 }; | |
5770 C.C__DelayedDone = new P._DelayedDone(); | |
5771 C.C__Random = new P._Random(); | |
5772 C.C__RootZone = new P._RootZone(); | |
5773 C.Duration_0 = new P.Duration(0); | |
5774 C.EventStreamProvider_touchmove = new W.EventStreamProvider("touchmove"); | |
5775 C.EventStreamProvider_touchstart = new W.EventStreamProvider("touchstart"); | |
5776 C.JSArray_methods = J.JSArray.prototype; | |
5777 C.JSInt_methods = J.JSInt.prototype; | |
5778 C.JSNumber_methods = J.JSNumber.prototype; | |
5779 C.JSString_methods = J.JSString.prototype; | |
5780 C.JS_CONST_0 = function(hooks) { | |
5781 if (typeof dartExperimentalFixupGetTag != "function") return hooks; | |
5782 hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); | |
5783 }; | |
5784 C.JS_CONST_6qb = function(hooks) { | |
5785 var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; | |
5786 if (userAgent.indexOf("Firefox") == -1) return hooks; | |
5787 var getTag = hooks.getTag; | |
5788 var quickMap = { | |
5789 "BeforeUnloadEvent": "Event", | |
5790 "DataTransfer": "Clipboard", | |
5791 "GeoGeolocation": "Geolocation", | |
5792 "WorkerMessageEvent": "MessageEvent", | |
5793 "XMLDocument": "Document"}; | |
5794 function getTagFirefox(o) { | |
5795 var tag = getTag(o); | |
5796 return quickMap[tag] || tag; | |
5797 } | |
5798 hooks.getTag = getTagFirefox; | |
5799 }; | |
5800 C.JS_CONST_86y = function getTagFallback(o) { | |
5801 if (o == null) return "Null"; | |
5802 var constructor = o.constructor; | |
5803 if (typeof constructor == "function") { | |
5804 var name = constructor.builtin$cls; | |
5805 if (typeof name == "string") return name; | |
5806 name = constructor.name; | |
5807 if (typeof name == "string" | |
5808 && name !== "" | |
5809 && name !== "Object" | |
5810 && name !== "Function.prototype") { | |
5811 return name; | |
5812 } | |
5813 } | |
5814 var s = Object.prototype.toString.call(o); | |
5815 return s.substring(8, s.length - 1); | |
5816 }; | |
5817 C.JS_CONST_Cbr = function(getTagFallback) { | |
5818 return function(hooks) { | |
5819 if (typeof navigator != "object") return hooks; | |
5820 var userAgent = navigator.userAgent; | |
5821 if (userAgent.indexOf("Chrome") >= 0 || | |
5822 userAgent.indexOf("DumpRenderTree") >= 0) { | |
5823 return hooks; | |
5824 } | |
5825 hooks.getTag = getTagFallback; | |
5826 }; | |
5827 }; | |
5828 C.JS_CONST_Fs4 = function(hooks) { return hooks; } | |
5829 ; | |
5830 C.JS_CONST_TtD = function() { | |
5831 function typeNameInChrome(obj) { return obj.constructor.name; } | |
5832 function getUnknownTag(object, tag) { | |
5833 if (/^HTML[A-Z].*Element$/.test(tag)) { | |
5834 var name = Object.prototype.toString.call(object); | |
5835 if (name == "[object Object]") return null; | |
5836 return "HTMLElement"; | |
5837 } | |
5838 } | |
5839 function getUnknownTagGenericBrowser(object, tag) { | |
5840 if (object instanceof HTMLElement) return "HTMLElement"; | |
5841 return getUnknownTag(object, tag); | |
5842 } | |
5843 function prototypeForTag(tag) { | |
5844 if (typeof window == "undefined") return null; | |
5845 if (typeof window[tag] == "undefined") return null; | |
5846 var constructor = window[tag]; | |
5847 if (typeof constructor != "function") return null; | |
5848 return constructor.prototype; | |
5849 } | |
5850 function discriminator(tag) { return null; } | |
5851 var isBrowser = typeof navigator == "object"; | |
5852 return { | |
5853 getTag: typeNameInChrome, | |
5854 getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, | |
5855 prototypeForTag: prototypeForTag, | |
5856 discriminator: discriminator }; | |
5857 }; | |
5858 C.JS_CONST_ZYJ = ((typeof version == "function" && typeof os == "object" &&
"system" in os) | |
5859 || (typeof navigator == "object" | |
5860 && navigator.userAgent.indexOf('Chrome') != -1)) | |
5861 ? function(x) { return x.$dartCachedLength || x.length; } | |
5862 : function(x) { return x.length; }; | |
5863 ; | |
5864 C.JS_CONST_rD3 = function(hooks) { | |
5865 var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; | |
5866 if (userAgent.indexOf("Trident/") == -1) return hooks; | |
5867 var getTag = hooks.getTag; | |
5868 var quickMap = { | |
5869 "BeforeUnloadEvent": "Event", | |
5870 "DataTransfer": "Clipboard", | |
5871 "HTMLDDElement": "HTMLElement", | |
5872 "HTMLDTElement": "HTMLElement", | |
5873 "HTMLPhraseElement": "HTMLElement", | |
5874 "Position": "Geoposition" | |
5875 }; | |
5876 function getTagIE(o) { | |
5877 var tag = getTag(o); | |
5878 var newTag = quickMap[tag]; | |
5879 if (newTag) return newTag; | |
5880 if (tag == "Document") { | |
5881 if (!!o.xmlVersion) return "!Document"; | |
5882 return "!HTMLDocument"; | |
5883 } | |
5884 if (tag == "Object") { | |
5885 if (window.DataView && (o instanceof window.DataView)) return "DataView"; | |
5886 } | |
5887 return tag; | |
5888 } | |
5889 function prototypeForTagIE(tag) { | |
5890 if (tag == "Document") return null; | |
5891 var constructor = window[tag]; | |
5892 if (constructor == null) return null; | |
5893 return constructor.prototype; | |
5894 } | |
5895 hooks.getTag = getTagIE; | |
5896 hooks.prototypeForTag = prototypeForTagIE; | |
5897 }; | |
5898 Isolate.makeConstantList = function(list) { | |
5899 list.immutable$list = true; | |
5900 list.fixed$length = true; | |
5901 return list; | |
5902 }; | |
5903 C.List_empty = Isolate.makeConstantList([]); | |
5904 C.List_kmp = Isolate.makeConstantList(["red", "green", "yellow", "blue", "magent
a", "orangered"]); | |
5905 C.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; | |
5906 $.lazyPort = null; | |
5907 $.ReceivePortImpl__nextFreeId = 1; | |
5908 $.Primitives_mirrorFunctionCacheName = "$cachedFunction"; | |
5909 $.Primitives_mirrorInvokeCacheName = "$cachedInvocation"; | |
5910 $.getTagFunction = null; | |
5911 $.alternateTagFunction = null; | |
5912 $.prototypeForTagFunction = null; | |
5913 $.dispatchRecordsForInstanceTags = null; | |
5914 $.interceptorsForUncacheableTags = null; | |
5915 $.initNativeDispatchFlag = null; | |
5916 $.printToZone = null; | |
5917 $._callbacksAreEnqueued = false; | |
5918 $.Zone__current = C.C__RootZone; | |
5919 $.Expando__keyCount = 0; | |
5920 $.Device__isOpera = null; | |
5921 $.Device__isWebKit = null; | |
5922 J.$add$ns = function(receiver, a0) { | |
5923 if (typeof receiver == "number" && typeof a0 == "number") | |
5924 return receiver + a0; | |
5925 return J.getInterceptor$ns(receiver).$add(receiver, a0); | |
5926 }; | |
5927 J.$eq = function(receiver, a0) { | |
5928 if (receiver == null) | |
5929 return a0 == null; | |
5930 if (typeof receiver != "object") | |
5931 return a0 != null && receiver === a0; | |
5932 return J.getInterceptor(receiver).$eq(receiver, a0); | |
5933 }; | |
5934 J.$ge$n = function(receiver, a0) { | |
5935 if (typeof receiver == "number" && typeof a0 == "number") | |
5936 return receiver >= a0; | |
5937 return J.getInterceptor$n(receiver).$ge(receiver, a0); | |
5938 }; | |
5939 J.$index$asx = function(receiver, a0) { | |
5940 if (receiver.constructor == Array || typeof receiver == "string" || H.isJsInde
xable(receiver, receiver[init.dispatchPropertyName])) | |
5941 if (a0 >>> 0 === a0 && a0 < receiver.length) | |
5942 return receiver[a0]; | |
5943 return J.getInterceptor$asx(receiver).$index(receiver, a0); | |
5944 }; | |
5945 J.$indexSet$ax = function(receiver, a0, a1) { | |
5946 if ((receiver.constructor == Array || H.isJsIndexable(receiver, receiver[init.
dispatchPropertyName])) && !receiver.immutable$list && a0 >>> 0 === a0 && a0 < r
eceiver.length) | |
5947 return receiver[a0] = a1; | |
5948 return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); | |
5949 }; | |
5950 J.addEventListener$3$x = function(receiver, a0, a1, a2) { | |
5951 return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); | |
5952 }; | |
5953 J.beginPath$0$x = function(receiver) { | |
5954 return J.getInterceptor$x(receiver).beginPath$0(receiver); | |
5955 }; | |
5956 J.closePath$0$x = function(receiver) { | |
5957 return J.getInterceptor$x(receiver).closePath$0(receiver); | |
5958 }; | |
5959 J.forEach$1$ax = function(receiver, a0) { | |
5960 return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); | |
5961 }; | |
5962 J.get$error$x = function(receiver) { | |
5963 return J.getInterceptor$x(receiver).get$error(receiver); | |
5964 }; | |
5965 J.get$hashCode$ = function(receiver) { | |
5966 return J.getInterceptor(receiver).get$hashCode(receiver); | |
5967 }; | |
5968 J.get$identifier$x = function(receiver) { | |
5969 return J.getInterceptor$x(receiver).get$identifier(receiver); | |
5970 }; | |
5971 J.get$iterator$ax = function(receiver) { | |
5972 return J.getInterceptor$ax(receiver).get$iterator(receiver); | |
5973 }; | |
5974 J.get$length$asx = function(receiver) { | |
5975 return J.getInterceptor$asx(receiver).get$length(receiver); | |
5976 }; | |
5977 J.getContext$1$x = function(receiver, a0) { | |
5978 return J.getInterceptor$x(receiver).getContext$1(receiver, a0); | |
5979 }; | |
5980 J.lineTo$2$x = function(receiver, a0, a1) { | |
5981 return J.getInterceptor$x(receiver).lineTo$2(receiver, a0, a1); | |
5982 }; | |
5983 J.moveTo$2$x = function(receiver, a0, a1) { | |
5984 return J.getInterceptor$x(receiver).moveTo$2(receiver, a0, a1); | |
5985 }; | |
5986 J.removeEventListener$3$x = function(receiver, a0, a1, a2) { | |
5987 return J.getInterceptor$x(receiver).removeEventListener$3(receiver, a0, a1, a2
); | |
5988 }; | |
5989 J.set$lineCap$x = function(receiver, value) { | |
5990 return J.getInterceptor$x(receiver).set$lineCap(receiver, value); | |
5991 }; | |
5992 J.set$lineWidth$x = function(receiver, value) { | |
5993 return J.getInterceptor$x(receiver).set$lineWidth(receiver, value); | |
5994 }; | |
5995 J.set$strokeStyle$x = function(receiver, value) { | |
5996 return J.getInterceptor$x(receiver).set$strokeStyle(receiver, value); | |
5997 }; | |
5998 J.stroke$0$x = function(receiver) { | |
5999 return J.getInterceptor$x(receiver).stroke$0(receiver); | |
6000 }; | |
6001 J.toString$0 = function(receiver) { | |
6002 return J.getInterceptor(receiver).toString$0(receiver); | |
6003 }; | |
6004 Isolate.$lazy($, "globalThis", "globalThis", "get$globalThis", function() { | |
6005 return function() { return this; }(); | |
6006 }); | |
6007 Isolate.$lazy($, "globalWindow", "globalWindow", "get$globalWindow", function()
{ | |
6008 return $.get$globalThis().window; | |
6009 }); | |
6010 Isolate.$lazy($, "globalWorker", "globalWorker", "get$globalWorker", function()
{ | |
6011 return $.get$globalThis().Worker; | |
6012 }); | |
6013 Isolate.$lazy($, "globalPostMessageDefined", "globalPostMessageDefined", "get$gl
obalPostMessageDefined", function() { | |
6014 return $.get$globalThis().postMessage !== void 0; | |
6015 }); | |
6016 Isolate.$lazy($, "thisScript", "IsolateNatives_thisScript", "get$IsolateNatives_
thisScript", function() { | |
6017 return H.IsolateNatives_computeThisScript(); | |
6018 }); | |
6019 Isolate.$lazy($, "workerIds", "IsolateNatives_workerIds", "get$IsolateNatives_wo
rkerIds", function() { | |
6020 return new P.Expando(null); | |
6021 }); | |
6022 Isolate.$lazy($, "noSuchMethodPattern", "TypeErrorDecoder_noSuchMethodPattern",
"get$TypeErrorDecoder_noSuchMethodPattern", function() { | |
6023 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
({ toString: function() { return "$receiver$"; } })); | |
6024 }); | |
6025 Isolate.$lazy($, "notClosurePattern", "TypeErrorDecoder_notClosurePattern", "get
$TypeErrorDecoder_notClosurePattern", function() { | |
6026 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
({ $method$: null, toString: function() { return "$receiver$"; } })); | |
6027 }); | |
6028 Isolate.$lazy($, "nullCallPattern", "TypeErrorDecoder_nullCallPattern", "get$Typ
eErrorDecoder_nullCallPattern", function() { | |
6029 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
(null)); | |
6030 }); | |
6031 Isolate.$lazy($, "nullLiteralCallPattern", "TypeErrorDecoder_nullLiteralCallPatt
ern", "get$TypeErrorDecoder_nullLiteralCallPattern", function() { | |
6032 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
Null()); | |
6033 }); | |
6034 Isolate.$lazy($, "undefinedCallPattern", "TypeErrorDecoder_undefinedCallPattern"
, "get$TypeErrorDecoder_undefinedCallPattern", function() { | |
6035 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
(void 0)); | |
6036 }); | |
6037 Isolate.$lazy($, "undefinedLiteralCallPattern", "TypeErrorDecoder_undefinedLiter
alCallPattern", "get$TypeErrorDecoder_undefinedLiteralCallPattern", function() { | |
6038 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn
Undefined()); | |
6039 }); | |
6040 Isolate.$lazy($, "nullPropertyPattern", "TypeErrorDecoder_nullPropertyPattern",
"get$TypeErrorDecoder_nullPropertyPattern", function() { | |
6041 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErr
orOn(null)); | |
6042 }); | |
6043 Isolate.$lazy($, "nullLiteralPropertyPattern", "TypeErrorDecoder_nullLiteralProp
ertyPattern", "get$TypeErrorDecoder_nullLiteralPropertyPattern", function() { | |
6044 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErr
orOnNull()); | |
6045 }); | |
6046 Isolate.$lazy($, "undefinedPropertyPattern", "TypeErrorDecoder_undefinedProperty
Pattern", "get$TypeErrorDecoder_undefinedPropertyPattern", function() { | |
6047 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErr
orOn(void 0)); | |
6048 }); | |
6049 Isolate.$lazy($, "undefinedLiteralPropertyPattern", "TypeErrorDecoder_undefinedL
iteralPropertyPattern", "get$TypeErrorDecoder_undefinedLiteralPropertyPattern",
function() { | |
6050 return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErr
orOnUndefined()); | |
6051 }); | |
6052 Isolate.$lazy($, "_toStringList", "IterableMixinWorkaround__toStringList", "get$
IterableMixinWorkaround__toStringList", function() { | |
6053 return P.List_List(null, null); | |
6054 }); | |
6055 Isolate.$lazy($, "_asyncCallbacks", "_asyncCallbacks", "get$_asyncCallbacks", fu
nction() { | |
6056 return P.ListQueue$(null, {func: "void_", void: true}); | |
6057 }); | |
6058 Isolate.$lazy($, "_toStringVisiting", "_toStringVisiting", "get$_toStringVisitin
g", function() { | |
6059 return P.HashSet_HashSet$identity(null); | |
6060 }); | |
6061 Isolate.$lazy($, "_toStringList", "Maps__toStringList", "get$Maps__toStringList"
, function() { | |
6062 return P.List_List(null, null); | |
6063 }); | |
6064 // Native classes | |
6065 | |
6066 init.functionAliases = {}; | |
6067 ; | |
6068 init.metadata = []; | |
6069 $ = null; | |
6070 Isolate = Isolate.$finishIsolateConstructor(Isolate); | |
6071 $ = new Isolate(); | |
6072 function convertToFastObject(properties) { | |
6073 function MyClass() {}; | |
6074 MyClass.prototype = properties; | |
6075 new MyClass(); | |
6076 return properties; | |
6077 } | |
6078 A = convertToFastObject(A); | |
6079 B = convertToFastObject(B); | |
6080 C = convertToFastObject(C); | |
6081 D = convertToFastObject(D); | |
6082 E = convertToFastObject(E); | |
6083 F = convertToFastObject(F); | |
6084 G = convertToFastObject(G); | |
6085 H = convertToFastObject(H); | |
6086 J = convertToFastObject(J); | |
6087 K = convertToFastObject(K); | |
6088 L = convertToFastObject(L); | |
6089 M = convertToFastObject(M); | |
6090 N = convertToFastObject(N); | |
6091 O = convertToFastObject(O); | |
6092 P = convertToFastObject(P); | |
6093 Q = convertToFastObject(Q); | |
6094 R = convertToFastObject(R); | |
6095 S = convertToFastObject(S); | |
6096 T = convertToFastObject(T); | |
6097 U = convertToFastObject(U); | |
6098 V = convertToFastObject(V); | |
6099 W = convertToFastObject(W); | |
6100 X = convertToFastObject(X); | |
6101 Y = convertToFastObject(Y); | |
6102 Z = convertToFastObject(Z); | |
6103 !function() { | |
6104 var objectProto = Object.prototype; | |
6105 for (var i = 0;; i++) { | |
6106 var property = "___dart_dispatch_record_ZxYxX_0_"; | |
6107 if (i > 0) | |
6108 property = rootProperty + "_" + i; | |
6109 if (!(property in objectProto)) | |
6110 return init.dispatchPropertyName = property; | |
6111 } | |
6112 }(); | |
6113 // BEGIN invoke [main]. | |
6114 ;(function (callback) { | |
6115 if (typeof document === "undefined") { | |
6116 callback(null); | |
6117 return; | |
6118 } | |
6119 if (document.currentScript) { | |
6120 callback(document.currentScript); | |
6121 return; | |
6122 } | |
6123 | |
6124 var scripts = document.scripts; | |
6125 function onLoad(event) { | |
6126 for (var i = 0; i < scripts.length; ++i) { | |
6127 scripts[i].removeEventListener("load", onLoad, false); | |
6128 } | |
6129 callback(event.target); | |
6130 } | |
6131 for (var i = 0; i < scripts.length; ++i) { | |
6132 scripts[i].addEventListener("load", onLoad, false); | |
6133 } | |
6134 })(function(currentScript) { | |
6135 init.currentScript = currentScript; | |
6136 | |
6137 if (typeof dartMainRunner === "function") { | |
6138 dartMainRunner(function() { H.startRootIsolate(Y.main$closure); }); | |
6139 } else { | |
6140 H.startRootIsolate(Y.main$closure); | |
6141 } | |
6142 }); | |
6143 // END invoke [main]. | |
6144 function init() { | |
6145 Isolate.$isolateProperties = {}; | |
6146 function generateAccessor(field, accessors, cls) { | |
6147 var len = field.length; | |
6148 var code = field.charCodeAt(len - 1); | |
6149 var reflectable = false; | |
6150 if (code == 45) { | |
6151 len--; | |
6152 code = field.charCodeAt(len - 1); | |
6153 field = field.substring(0, len); | |
6154 reflectable = true; | |
6155 } | |
6156 code = code >= 60 && code <= 64 ? code - 59 : code >= 123 && code <= 126 ? c
ode - 117 : code >= 37 && code <= 43 ? code - 27 : 0; | |
6157 if (code) { | |
6158 var getterCode = code & 3; | |
6159 var setterCode = code >> 2; | |
6160 var accessorName = field = field.substring(0, len - 1); | |
6161 var divider = field.indexOf(":"); | |
6162 if (divider > 0) { | |
6163 accessorName = field.substring(0, divider); | |
6164 field = field.substring(divider + 1); | |
6165 } | |
6166 if (getterCode) { | |
6167 var args = getterCode & 2 ? "receiver" : ""; | |
6168 var receiver = getterCode & 1 ? "this" : "receiver"; | |
6169 var body = "return " + receiver + "." + field; | |
6170 var property = cls + ".prototype.get$" + accessorName + "="; | |
6171 var fn = "function(" + args + "){" + body + "}"; | |
6172 if (reflectable) | |
6173 accessors.push(property + "$reflectable(" + fn + ");\n"); | |
6174 else | |
6175 accessors.push(property + fn + ";\n"); | |
6176 } | |
6177 if (setterCode) { | |
6178 var args = setterCode & 2 ? "receiver, value" : "value"; | |
6179 var receiver = setterCode & 1 ? "this" : "receiver"; | |
6180 var body = receiver + "." + field + " = value"; | |
6181 var property = cls + ".prototype.set$" + accessorName + "="; | |
6182 var fn = "function(" + args + "){" + body + "}"; | |
6183 if (reflectable) | |
6184 accessors.push(property + "$reflectable(" + fn + ");\n"); | |
6185 else | |
6186 accessors.push(property + fn + ";\n"); | |
6187 } | |
6188 } | |
6189 return field; | |
6190 } | |
6191 Isolate.$isolateProperties.$generateAccessor = generateAccessor; | |
6192 function defineClass(name, cls, fields) { | |
6193 var accessors = []; | |
6194 var str = "function " + cls + "("; | |
6195 var body = ""; | |
6196 for (var i = 0; i < fields.length; i++) { | |
6197 if (i != 0) | |
6198 str += ", "; | |
6199 var field = generateAccessor(fields[i], accessors, cls); | |
6200 var parameter = "parameter_" + field; | |
6201 str += parameter; | |
6202 body += "this." + field + " = " + parameter + ";\n"; | |
6203 } | |
6204 str += ") {\n" + body + "}\n"; | |
6205 str += cls + ".builtin$cls=\"" + name + "\";\n"; | |
6206 str += "$desc=$collectedClasses." + cls + ";\n"; | |
6207 str += "if($desc instanceof Array) $desc = $desc[1];\n"; | |
6208 str += cls + ".prototype = $desc;\n"; | |
6209 if (typeof defineClass.name != "string") { | |
6210 str += cls + ".name=\"" + cls + "\";\n"; | |
6211 } | |
6212 str += accessors.join(""); | |
6213 return str; | |
6214 } | |
6215 var inheritFrom = function() { | |
6216 function tmp() { | |
6217 } | |
6218 var hasOwnProperty = Object.prototype.hasOwnProperty; | |
6219 return function(constructor, superConstructor) { | |
6220 tmp.prototype = superConstructor.prototype; | |
6221 var object = new tmp(); | |
6222 var properties = constructor.prototype; | |
6223 for (var member in properties) | |
6224 if (hasOwnProperty.call(properties, member)) | |
6225 object[member] = properties[member]; | |
6226 object.constructor = constructor; | |
6227 constructor.prototype = object; | |
6228 return object; | |
6229 }; | |
6230 }(); | |
6231 Isolate.$finishClasses = function(collectedClasses, isolateProperties, existin
gIsolateProperties) { | |
6232 var pendingClasses = {}; | |
6233 if (!init.allClasses) | |
6234 init.allClasses = {}; | |
6235 var allClasses = init.allClasses; | |
6236 var hasOwnProperty = Object.prototype.hasOwnProperty; | |
6237 if (typeof dart_precompiled == "function") { | |
6238 var constructors = dart_precompiled(collectedClasses); | |
6239 } else { | |
6240 var combinedConstructorFunction = "function $reflectable(fn){fn.$reflectab
le=1;return fn};\n" + "var $desc;\n"; | |
6241 var constructorsList = []; | |
6242 } | |
6243 for (var cls in collectedClasses) { | |
6244 if (hasOwnProperty.call(collectedClasses, cls)) { | |
6245 var desc = collectedClasses[cls]; | |
6246 if (desc instanceof Array) | |
6247 desc = desc[1]; | |
6248 var classData = desc[""], supr, name = cls, fields = classData; | |
6249 if (typeof classData == "string") { | |
6250 var split = classData.split("/"); | |
6251 if (split.length == 2) { | |
6252 name = split[0]; | |
6253 fields = split[1]; | |
6254 } | |
6255 } | |
6256 var s = fields.split(";"); | |
6257 fields = s[1] == "" ? [] : s[1].split(","); | |
6258 supr = s[0]; | |
6259 if (supr && supr.indexOf("+") > 0) { | |
6260 s = supr.split("+"); | |
6261 supr = s[0]; | |
6262 var mixin = collectedClasses[s[1]]; | |
6263 if (mixin instanceof Array) | |
6264 mixin = mixin[1]; | |
6265 for (var d in mixin) { | |
6266 if (hasOwnProperty.call(mixin, d) && !hasOwnProperty.call(desc, d)) | |
6267 desc[d] = mixin[d]; | |
6268 } | |
6269 } | |
6270 if (typeof dart_precompiled != "function") { | |
6271 combinedConstructorFunction += defineClass(name, cls, fields); | |
6272 constructorsList.push(cls); | |
6273 } | |
6274 if (supr) | |
6275 pendingClasses[cls] = supr; | |
6276 } | |
6277 } | |
6278 if (typeof dart_precompiled != "function") { | |
6279 combinedConstructorFunction += "return [\n " + constructorsList.join(",\n
") + "\n]"; | |
6280 var constructors = new Function("$collectedClasses", combinedConstructorFu
nction)(collectedClasses); | |
6281 combinedConstructorFunction = null; | |
6282 } | |
6283 for (var i = 0; i < constructors.length; i++) { | |
6284 var constructor = constructors[i]; | |
6285 var cls = constructor.name; | |
6286 var desc = collectedClasses[cls]; | |
6287 var globalObject = isolateProperties; | |
6288 if (desc instanceof Array) { | |
6289 globalObject = desc[0] || isolateProperties; | |
6290 desc = desc[1]; | |
6291 } | |
6292 allClasses[cls] = constructor; | |
6293 globalObject[cls] = constructor; | |
6294 } | |
6295 constructors = null; | |
6296 var finishedClasses = {}; | |
6297 init.interceptorsByTag = Object.create(null); | |
6298 init.leafTags = {}; | |
6299 function finishClass(cls) { | |
6300 var hasOwnProperty = Object.prototype.hasOwnProperty; | |
6301 if (hasOwnProperty.call(finishedClasses, cls)) | |
6302 return; | |
6303 finishedClasses[cls] = true; | |
6304 var superclass = pendingClasses[cls]; | |
6305 if (!superclass || typeof superclass != "string") | |
6306 return; | |
6307 finishClass(superclass); | |
6308 var constructor = allClasses[cls]; | |
6309 var superConstructor = allClasses[superclass]; | |
6310 if (!superConstructor) | |
6311 superConstructor = existingIsolateProperties[superclass]; | |
6312 var prototype = inheritFrom(constructor, superConstructor); | |
6313 if (hasOwnProperty.call(prototype, "%")) { | |
6314 var nativeSpec = prototype["%"].split(";"); | |
6315 if (nativeSpec[0]) { | |
6316 var tags = nativeSpec[0].split("|"); | |
6317 for (var i = 0; i < tags.length; i++) { | |
6318 init.interceptorsByTag[tags[i]] = constructor; | |
6319 init.leafTags[tags[i]] = true; | |
6320 } | |
6321 } | |
6322 if (nativeSpec[1]) { | |
6323 tags = nativeSpec[1].split("|"); | |
6324 if (nativeSpec[2]) { | |
6325 var subclasses = nativeSpec[2].split("|"); | |
6326 for (var i = 0; i < subclasses.length; i++) { | |
6327 var subclass = allClasses[subclasses[i]]; | |
6328 subclass.$nativeSuperclassTag = tags[0]; | |
6329 } | |
6330 } | |
6331 for (i = 0; i < tags.length; i++) { | |
6332 init.interceptorsByTag[tags[i]] = constructor; | |
6333 init.leafTags[tags[i]] = false; | |
6334 } | |
6335 } | |
6336 } | |
6337 } | |
6338 for (var cls in pendingClasses) | |
6339 finishClass(cls); | |
6340 }; | |
6341 Isolate.$lazy = function(prototype, staticName, fieldName, getterName, lazyVal
ue) { | |
6342 var sentinelUndefined = {}; | |
6343 var sentinelInProgress = {}; | |
6344 prototype[fieldName] = sentinelUndefined; | |
6345 prototype[getterName] = function() { | |
6346 var result = $[fieldName]; | |
6347 try { | |
6348 if (result === sentinelUndefined) { | |
6349 $[fieldName] = sentinelInProgress; | |
6350 try { | |
6351 result = $[fieldName] = lazyValue(); | |
6352 } finally { | |
6353 if (result === sentinelUndefined) { | |
6354 if ($[fieldName] === sentinelInProgress) { | |
6355 $[fieldName] = null; | |
6356 } | |
6357 } | |
6358 } | |
6359 } else { | |
6360 if (result === sentinelInProgress) | |
6361 H.throwCyclicInit(staticName); | |
6362 } | |
6363 return result; | |
6364 } finally { | |
6365 $[getterName] = function() { | |
6366 return this[fieldName]; | |
6367 }; | |
6368 } | |
6369 }; | |
6370 }; | |
6371 Isolate.$finishIsolateConstructor = function(oldIsolate) { | |
6372 var isolateProperties = oldIsolate.$isolateProperties; | |
6373 function Isolate() { | |
6374 var hasOwnProperty = Object.prototype.hasOwnProperty; | |
6375 for (var staticName in isolateProperties) | |
6376 if (hasOwnProperty.call(isolateProperties, staticName)) | |
6377 this[staticName] = isolateProperties[staticName]; | |
6378 function ForceEfficientMap() { | |
6379 } | |
6380 ForceEfficientMap.prototype = this; | |
6381 new ForceEfficientMap(); | |
6382 } | |
6383 Isolate.prototype = oldIsolate.prototype; | |
6384 Isolate.prototype.constructor = Isolate; | |
6385 Isolate.$isolateProperties = isolateProperties; | |
6386 Isolate.$finishClasses = oldIsolate.$finishClasses; | |
6387 Isolate.makeConstantList = oldIsolate.makeConstantList; | |
6388 return Isolate; | |
6389 }; | |
6390 } | |
6391 })() | |
6392 | |
6393 //# sourceMappingURL=out.js.map | |
6394 //@ sourceMappingURL=out.js.map | |
OLD | NEW |