Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Side by Side Diff: src/site/codelabs/darrrt/examples/6-piratebadge_json/piratebadge.dart.js

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

Powered by Google App Engine
This is Rietveld 408576698