From f86f1575d67cfadce1390243d678ce026dd53bab Mon Sep 17 00:00:00 2001 From: Ryo Ota Date: Sun, 1 Jul 2018 11:55:18 +0900 Subject: [PATCH] Fix it to work --- app.dart | 20 + pubspec.lock | 2 + pubspec.yaml | 2 +- web/scripts/comics.dart.js | 9034 ++++++++++++++++++++++++++++++++++++ 4 files changed, 9057 insertions(+), 1 deletion(-) create mode 100644 web/scripts/comics.dart.js diff --git a/app.dart b/app.dart index 5403a28..2ac12c2 100644 --- a/app.dart +++ b/app.dart @@ -92,6 +92,26 @@ class Public { } static handler(req) { + HttpResponse res = req.response; + + String ext = req.uri.path.split('.').last; + switch (ext) { + case 'css': + res.headers.contentType = + new ContentType("text", "css", charset: "utf-8"); + break; + case 'dart': + res.headers.contentType = + new ContentType("application", "dart", charset: "utf-8"); + break; + case 'js': + res.headers.contentType = + new ContentType("application", "javascript", charset: "utf-8"); + break; + default: + res.headers.contentType = ContentType.HTML; + } + var file = new File(req.session['path']); var stream = file.openRead(); stream.pipe(req.response); diff --git a/pubspec.lock b/pubspec.lock index 2bd4af0..ded2a8a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,3 +37,5 @@ packages: description: uuid source: hosted version: "0.2.2" +sdks: + dart: ">=1.0.0 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 8624eb1..5d6ec60 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,4 +1,4 @@ -name: Dart Comics +name: dart_comics dependencies: dirty: any uuid: any diff --git a/web/scripts/comics.dart.js b/web/scripts/comics.dart.js new file mode 100644 index 0000000..5d8f3ce --- /dev/null +++ b/web/scripts/comics.dart.js @@ -0,0 +1,9034 @@ +// Generated by dart2js, the Dart to JavaScript compiler version: 1.24.3. +// The code supports the following hooks: +// dartPrint(message): +// if this function is defined it is called instead of the Dart [print] +// method. +// +// dartMainRunner(main, args): +// if this function is defined, the Dart [main] method will not be invoked +// directly. Instead, a closure that will invoke [main], and its arguments +// [args] is passed to [dartMainRunner]. +// +// dartDeferredLibraryLoader(uri, successCallback, errorCallback): +// if this function is defined, it will be called when a deferred library +// is loaded. It should load and eval the javascript of `uri`, and call +// successCallback. If it fails to do so, it should call errorCallback with +// an error. +// +// defaultPackagesBase: +// Override the location where `package:` uris are resolved from. By default +// they are resolved under "packages/" from the current window location. +(function() { + // /* ::norenaming:: */ + var supportsDirectProtoAccess = function() { + var cls = function() { + }; + cls.prototype = {p: {}}; + var object = new cls(); + if (!(object.__proto__ && object.__proto__.p === cls.prototype.p)) + return false; + try { + if (typeof navigator != "undefined" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome/") >= 0) + return true; + if (typeof version == "function" && version.length == 0) { + var v = version(); + if (/^\d+\.\d+\.\d+\.\d+$/.test(v)) + return true; + } + } catch (_) { + } + return false; + }(); + function map(x) { + x = Object.create(null); + x.x = 0; + delete x.x; + return x; + } + // The global objects start as so-called "slow objects". For V8, this + // means that it won't try to make map transitions as we add properties + // to these objects. Later on, we attempt to turn these objects into + // fast objects by calling "convertToFastObject" (see + // [emitConvertToFastObjectFunction]). + var A = map(); + var B = map(); + var C = map(); + var D = map(); + var E = map(); + var F = map(); + var G = map(); + var H = map(); + var J = map(); + var K = map(); + var L = map(); + var M = map(); + var N = map(); + var O = map(); + var P = map(); + var Q = map(); + var R = map(); + var S = map(); + var T = map(); + var U = map(); + var V = map(); + var W = map(); + var X = map(); + var Y = map(); + var Z = map(); + function Isolate() { + } + init(); + // Constructors are generated at runtime. + function setupProgram(programData, typesOffset) { + "use strict"; + function generateAccessor(fieldDescriptor, accessors, cls) { + var fieldInformation = fieldDescriptor.split("-"); + var field = fieldInformation[0]; + var len = field.length; + var code = field.charCodeAt(len - 1); + var reflectable; + if (fieldInformation.length > 1) + reflectable = true; + else + reflectable = false; + code = code >= 60 && code <= 64 ? code - 59 : code >= 123 && code <= 126 ? code - 117 : code >= 37 && code <= 43 ? code - 27 : 0; + if (code) { + var getterCode = code & 3; + var setterCode = code >> 2; + var accessorName = field = field.substring(0, len - 1); + var divider = field.indexOf(":"); + if (divider > 0) { + accessorName = field.substring(0, divider); + field = field.substring(divider + 1); + } + if (getterCode) { + var args = getterCode & 2 ? "receiver" : ""; + var receiver = getterCode & 1 ? "this" : "receiver"; + var body = "return " + receiver + "." + field; + var property = cls + ".prototype.get$" + accessorName + "="; + var fn = "function(" + args + "){" + body + "}"; + if (reflectable) + accessors.push(property + "$reflectable(" + fn + ");\n"); + else + accessors.push(property + fn + ";\n"); + } + if (setterCode) { + var args = setterCode & 2 ? "receiver, value" : "value"; + var receiver = setterCode & 1 ? "this" : "receiver"; + var body = receiver + "." + field + " = value"; + var property = cls + ".prototype.set$" + accessorName + "="; + var fn = "function(" + args + "){" + body + "}"; + if (reflectable) + accessors.push(property + "$reflectable(" + fn + ");\n"); + else + accessors.push(property + fn + ";\n"); + } + } + return field; + } + function defineClass(name, fields) { + var accessors = []; + var str = "function " + name + "("; + var body = ""; + var fieldNames = ""; + for (var i = 0; i < fields.length; i++) { + if (i != 0) + str += ", "; + var field = generateAccessor(fields[i], accessors, name); + fieldNames += "'" + field + "',"; + var parameter = "p_" + field; + str += parameter; + body += "this." + field + " = " + parameter + ";\n"; + } + if (supportsDirectProtoAccess) + body += "this." + "$deferredAction" + "();"; + str += ") {\n" + body + "}\n"; + str += name + ".builtin$cls=\"" + name + "\";\n"; + str += "$desc=$collectedClasses." + name + "[1];\n"; + str += name + ".prototype = $desc;\n"; + if (typeof defineClass.name != "string") + str += name + ".name=\"" + name + "\";\n"; + str += name + "." + "$__fields__" + "=[" + fieldNames + "];\n"; + str += accessors.join(""); + return str; + } + init.createNewIsolate = function() { + return new Isolate(); + }; + init.classIdExtractor = function(o) { + return o.constructor.name; + }; + init.classFieldsExtractor = function(o) { + var fieldNames = o.constructor.$__fields__; + if (!fieldNames) + return []; + var result = []; + result.length = fieldNames.length; + for (var i = 0; i < fieldNames.length; i++) + result[i] = o[fieldNames[i]]; + return result; + }; + init.instanceFromClassId = function(name) { + return new init.allClasses[name](); + }; + init.initializeEmptyInstance = function(name, o, fields) { + init.allClasses[name].apply(o, fields); + return o; + }; + var inheritFrom = supportsDirectProtoAccess ? function(constructor, superConstructor) { + var prototype = constructor.prototype; + prototype.__proto__ = superConstructor.prototype; + prototype.constructor = constructor; + prototype["$is" + constructor.name] = constructor; + return convertToFastObject(prototype); + } : function() { + function tmp() { + } + return function(constructor, superConstructor) { + tmp.prototype = superConstructor.prototype; + var object = new tmp(); + convertToSlowObject(object); + var properties = constructor.prototype; + var members = Object.keys(properties); + for (var i = 0; i < members.length; i++) { + var member = members[i]; + object[member] = properties[member]; + } + object["$is" + constructor.name] = constructor; + object.constructor = constructor; + constructor.prototype = object; + return object; + }; + }(); + function finishClasses(processedClasses) { + var allClasses = init.allClasses; + processedClasses.combinedConstructorFunction += "return [\n" + processedClasses.constructorsList.join(",\n ") + "\n]"; + var constructors = new Function("$collectedClasses", processedClasses.combinedConstructorFunction)(processedClasses.collected); + processedClasses.combinedConstructorFunction = null; + for (var i = 0; i < constructors.length; i++) { + var constructor = constructors[i]; + var cls = constructor.name; + var desc = processedClasses.collected[cls]; + var globalObject = desc[0]; + desc = desc[1]; + allClasses[cls] = constructor; + globalObject[cls] = constructor; + } + constructors = null; + var finishedClasses = init.finishedClasses; + function finishClass(cls) { + if (finishedClasses[cls]) + return; + finishedClasses[cls] = true; + var superclass = processedClasses.pending[cls]; + if (superclass && superclass.indexOf("+") > 0) { + var s = superclass.split("+"); + superclass = s[0]; + var mixinClass = s[1]; + finishClass(mixinClass); + var mixin = allClasses[mixinClass]; + var mixinPrototype = mixin.prototype; + var clsPrototype = allClasses[cls].prototype; + var properties = Object.keys(mixinPrototype); + for (var i = 0; i < properties.length; i++) { + var d = properties[i]; + if (!hasOwnProperty.call(clsPrototype, d)) + clsPrototype[d] = mixinPrototype[d]; + } + } + if (!superclass || typeof superclass != "string") { + var constructor = allClasses[cls]; + var prototype = constructor.prototype; + prototype.constructor = constructor; + prototype.$isObject = constructor; + prototype.$deferredAction = function() { + }; + return; + } + finishClass(superclass); + var superConstructor = allClasses[superclass]; + if (!superConstructor) + superConstructor = existingIsolateProperties[superclass]; + var constructor = allClasses[cls]; + var prototype = inheritFrom(constructor, superConstructor); + if (mixinPrototype) + prototype.$deferredAction = mixinDeferredActionHelper(mixinPrototype, prototype); + if (Object.prototype.hasOwnProperty.call(prototype, "%")) { + var nativeSpec = prototype["%"].split(";"); + if (nativeSpec[0]) { + var tags = nativeSpec[0].split("|"); + for (var i = 0; i < tags.length; i++) { + init.interceptorsByTag[tags[i]] = constructor; + init.leafTags[tags[i]] = true; + } + } + if (nativeSpec[1]) { + tags = nativeSpec[1].split("|"); + if (nativeSpec[2]) { + var subclasses = nativeSpec[2].split("|"); + for (var i = 0; i < subclasses.length; i++) { + var subclass = allClasses[subclasses[i]]; + subclass.$nativeSuperclassTag = tags[0]; + } + } + for (i = 0; i < tags.length; i++) { + init.interceptorsByTag[tags[i]] = constructor; + init.leafTags[tags[i]] = false; + } + } + prototype.$deferredAction(); + } + if (prototype.$isInterceptor) + prototype.$deferredAction(); + } + var properties = Object.keys(processedClasses.pending); + for (var i = 0; i < properties.length; i++) + finishClass(properties[i]); + } + function finishAddStubsHelper() { + var prototype = this; + while (!prototype.hasOwnProperty("$deferredAction")) + prototype = prototype.__proto__; + delete prototype.$deferredAction; + var properties = Object.keys(prototype); + for (var index = 0; index < properties.length; index++) { + var property = properties[index]; + var firstChar = property.charCodeAt(0); + var elem; + if (property !== "^" && property !== "$reflectable" && firstChar !== 43 && firstChar !== 42 && (elem = prototype[property]) != null && elem.constructor === Array && property !== "<>") + addStubs(prototype, elem, property, false, []); + } + convertToFastObject(prototype); + prototype = prototype.__proto__; + prototype.$deferredAction(); + } + function mixinDeferredActionHelper(mixinPrototype, targetPrototype) { + var chain; + if (targetPrototype.hasOwnProperty("$deferredAction")) + chain = targetPrototype.$deferredAction; + return function foo() { + if (!supportsDirectProtoAccess) + return; + var prototype = this; + while (!prototype.hasOwnProperty("$deferredAction")) + prototype = prototype.__proto__; + if (chain) + prototype.$deferredAction = chain; + else { + delete prototype.$deferredAction; + convertToFastObject(prototype); + } + mixinPrototype.$deferredAction(); + prototype.$deferredAction(); + }; + } + function processClassData(cls, descriptor, processedClasses) { + descriptor = convertToSlowObject(descriptor); + var previousProperty; + var properties = Object.keys(descriptor); + var hasDeferredWork = false; + var shouldDeferWork = supportsDirectProtoAccess && cls != "Object"; + for (var i = 0; i < properties.length; i++) { + var property = properties[i]; + var firstChar = property.charCodeAt(0); + if (property === "static") { + processStatics(init.statics[cls] = descriptor.static, processedClasses); + delete descriptor.static; + } else if (firstChar === 43) { + mangledNames[previousProperty] = property.substring(1); + var flag = descriptor[property]; + if (flag > 0) + descriptor[previousProperty].$reflectable = flag; + } else if (firstChar === 42) { + descriptor[previousProperty].$defaultValues = descriptor[property]; + var optionalMethods = descriptor.$methodsWithOptionalArguments; + if (!optionalMethods) + descriptor.$methodsWithOptionalArguments = optionalMethods = {}; + optionalMethods[property] = previousProperty; + } else { + var elem = descriptor[property]; + if (property !== "^" && elem != null && elem.constructor === Array && property !== "<>") + if (shouldDeferWork) + hasDeferredWork = true; + else + addStubs(descriptor, elem, property, false, []); + else + previousProperty = property; + } + } + if (hasDeferredWork) + descriptor.$deferredAction = finishAddStubsHelper; + var classData = descriptor["^"], split, supr, fields = classData; + var s = fields.split(";"); + fields = s[1] ? s[1].split(",") : []; + supr = s[0]; + split = supr.split(":"); + if (split.length == 2) { + supr = split[0]; + var functionSignature = split[1]; + if (functionSignature) + descriptor.$signature = function(s) { + return function() { + return init.types[s]; + }; + }(functionSignature); + } + if (supr) + processedClasses.pending[cls] = supr; + processedClasses.combinedConstructorFunction += defineClass(cls, fields); + processedClasses.constructorsList.push(cls); + processedClasses.collected[cls] = [globalObject, descriptor]; + classes.push(cls); + } + function processStatics(descriptor, processedClasses) { + var properties = Object.keys(descriptor); + for (var i = 0; i < properties.length; i++) { + var property = properties[i]; + if (property === "^") + continue; + var element = descriptor[property]; + var firstChar = property.charCodeAt(0); + var previousProperty; + if (firstChar === 43) { + mangledGlobalNames[previousProperty] = property.substring(1); + var flag = descriptor[property]; + if (flag > 0) + descriptor[previousProperty].$reflectable = flag; + if (element && element.length) + init.typeInformation[previousProperty] = element; + } else if (firstChar === 42) { + globalObject[previousProperty].$defaultValues = element; + var optionalMethods = descriptor.$methodsWithOptionalArguments; + if (!optionalMethods) + descriptor.$methodsWithOptionalArguments = optionalMethods = {}; + optionalMethods[property] = previousProperty; + } else if (typeof element === "function") { + globalObject[previousProperty = property] = element; + functions.push(property); + init.globalFunctions[property] = element; + } else if (element.constructor === Array) + addStubs(globalObject, element, property, true, functions); + else { + previousProperty = property; + processClassData(property, element, processedClasses); + } + } + } + function addStubs(prototype, array, name, isStatic, functions) { + var index = 0, alias = array[index], f; + if (typeof alias == "string") + f = array[++index]; + else { + f = alias; + alias = name; + } + var funcs = [prototype[name] = prototype[alias] = f]; + f.$stubName = name; + functions.push(name); + for (index++; index < array.length; index++) { + f = array[index]; + if (typeof f != "function") + break; + if (!isStatic) + f.$stubName = array[++index]; + funcs.push(f); + if (f.$stubName) { + prototype[f.$stubName] = f; + functions.push(f.$stubName); + } + } + for (var i = 0; i < funcs.length; index++, i++) + funcs[i].$callName = array[index]; + var getterStubName = array[index]; + array = array.slice(++index); + var requiredParameterInfo = array[0]; + var requiredParameterCount = requiredParameterInfo >> 1; + var isAccessor = (requiredParameterInfo & 1) === 1; + var isSetter = requiredParameterInfo === 3; + var isGetter = requiredParameterInfo === 1; + var optionalParameterInfo = array[1]; + var optionalParameterCount = optionalParameterInfo >> 1; + var optionalParametersAreNamed = (optionalParameterInfo & 1) === 1; + var isIntercepted = requiredParameterCount + optionalParameterCount != funcs[0].length; + var functionTypeIndex = array[2]; + if (typeof functionTypeIndex == "number") + array[2] = functionTypeIndex + typesOffset; + var unmangledNameIndex = 2 * optionalParameterCount + requiredParameterCount + 3; + if (getterStubName) { + f = tearOff(funcs, array, isStatic, name, isIntercepted); + prototype[name].$getter = f; + f.$getterStub = true; + if (isStatic) { + init.globalFunctions[name] = f; + functions.push(getterStubName); + } + prototype[getterStubName] = f; + funcs.push(f); + f.$stubName = getterStubName; + f.$callName = null; + } + } + function tearOffGetter(funcs, reflectionInfo, name, isIntercepted) { + return isIntercepted ? new Function("funcs", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "(x) {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, reflectionInfo, false, [x], name);" + "return new c(this, funcs[0], x, name);" + "}")(funcs, reflectionInfo, name, H, null) : new Function("funcs", "reflectionInfo", "name", "H", "c", "return function tearOff_" + name + functionCounter++ + "() {" + "if (c === null) c = " + "H.closureFromTearOff" + "(" + "this, funcs, reflectionInfo, false, [], name);" + "return new c(this, funcs[0], null, name);" + "}")(funcs, reflectionInfo, name, H, null); + } + function tearOff(funcs, reflectionInfo, isStatic, name, isIntercepted) { + var cache; + return isStatic ? function() { + if (cache === void 0) + cache = H.closureFromTearOff(this, funcs, reflectionInfo, true, [], name).prototype; + return cache; + } : tearOffGetter(funcs, reflectionInfo, name, isIntercepted); + } + var functionCounter = 0; + if (!init.libraries) + init.libraries = []; + if (!init.mangledNames) + init.mangledNames = map(); + if (!init.mangledGlobalNames) + init.mangledGlobalNames = map(); + if (!init.statics) + init.statics = map(); + if (!init.typeInformation) + init.typeInformation = map(); + if (!init.globalFunctions) + init.globalFunctions = map(); + var libraries = init.libraries; + var mangledNames = init.mangledNames; + var mangledGlobalNames = init.mangledGlobalNames; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var length = programData.length; + var processedClasses = map(); + processedClasses.collected = map(); + processedClasses.pending = map(); + processedClasses.constructorsList = []; + processedClasses.combinedConstructorFunction = "function $reflectable(fn){fn.$reflectable=1;return fn};\n" + "var $desc;\n"; + for (var i = 0; i < length; i++) { + var data = programData[i]; + var name = data[0]; + var uri = data[1]; + var metadata = data[2]; + var globalObject = data[3]; + var descriptor = data[4]; + var isRoot = !!data[5]; + var fields = descriptor && descriptor["^"]; + if (fields instanceof Array) + fields = fields[0]; + var classes = []; + var functions = []; + processStatics(descriptor, processedClasses); + libraries.push([name, uri, classes, functions, metadata, fields, isRoot, globalObject]); + } + finishClasses(processedClasses); + } + Isolate.functionThatReturnsNull = function() { + }; + var dart = [["_foreign_helper", "dart:_foreign_helper",, H, { + "^": "", + JS_CONST: { + "^": "Object;code" + } + }], ["_interceptors", "dart:_interceptors",, J, { + "^": "", + getInterceptor: function(object) { + return void 0; + }, + makeDispatchRecord: function(interceptor, proto, extension, indexability) { + return {i: interceptor, p: proto, e: extension, x: indexability}; + }, + getNativeInterceptor: function(object) { + var record, proto, objectProto, $constructor, interceptor; + record = object[init.dispatchPropertyName]; + if (record == null) + if ($.initNativeDispatchFlag == null) { + H.initNativeDispatch(); + record = object[init.dispatchPropertyName]; + } + if (record != null) { + proto = record.p; + if (false === proto) + return record.i; + if (true === proto) + return object; + objectProto = Object.getPrototypeOf(object); + if (proto === objectProto) + return record.i; + if (record.e === objectProto) + throw H.wrapException(new P.UnimplementedError("Return interceptor for " + H.S(proto(object, record)))); + } + $constructor = object.constructor; + interceptor = $constructor == null ? null : $constructor[$.$get$JS_INTEROP_INTERCEPTOR_TAG()]; + if (interceptor != null) + return interceptor; + interceptor = H.lookupAndCacheInterceptor(object); + if (interceptor != null) + return interceptor; + if (typeof object == "function") + return C.JavaScriptFunction_methods; + proto = Object.getPrototypeOf(object); + if (proto == null) + return C.PlainJavaScriptObject_methods; + if (proto === Object.prototype) + return C.PlainJavaScriptObject_methods; + if (typeof $constructor == "function") { + Object.defineProperty($constructor, $.$get$JS_INTEROP_INTERCEPTOR_TAG(), {value: C.UnknownJavaScriptObject_methods, enumerable: false, writable: true, configurable: true}); + return C.UnknownJavaScriptObject_methods; + } + return C.UnknownJavaScriptObject_methods; + }, + Interceptor: { + "^": "Object;", + $eq: function(receiver, other) { + return receiver === other; + }, + get$hashCode: function(receiver) { + return H.Primitives_objectHashCode(receiver); + }, + toString$0: ["super$Interceptor$toString", function(receiver) { + return H.Primitives_objectToHumanReadableString(receiver); + }], + "%": "Blob|DOMError|DOMImplementation|File|FileError|MediaError|NavigatorUserMediaError|PositionError|Range|SQLError|SVGAnimatedLength|SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedString" + }, + JSBool: { + "^": "Interceptor;", + toString$0: function(receiver) { + return String(receiver); + }, + get$hashCode: function(receiver) { + return receiver ? 519018 : 218159; + }, + $isbool: 1 + }, + JSNull: { + "^": "Interceptor;", + $eq: function(receiver, other) { + return null == other; + }, + toString$0: function(receiver) { + return "null"; + }, + get$hashCode: function(receiver) { + return 0; + } + }, + JavaScriptObject: { + "^": "Interceptor;", + get$hashCode: function(receiver) { + return 0; + }, + toString$0: ["super$JavaScriptObject$toString", function(receiver) { + return String(receiver); + }], + $isJSObject: 1 + }, + PlainJavaScriptObject: { + "^": "JavaScriptObject;" + }, + UnknownJavaScriptObject: { + "^": "JavaScriptObject;" + }, + JavaScriptFunction: { + "^": "JavaScriptObject;", + toString$0: function(receiver) { + var dartClosure = receiver[$.$get$DART_CLOSURE_PROPERTY_NAME()]; + return dartClosure == null ? this.super$JavaScriptObject$toString(receiver) : J.toString$0$(dartClosure); + }, + $signature: function() { + return {func: 1, opt: [,,,,,,,,,,,,,,,,]}; + } + }, + JSArray: { + "^": "Interceptor;$ti", + checkMutable$1: function(receiver, reason) { + if (!!receiver.immutable$list) + throw H.wrapException(new P.UnsupportedError(reason)); + }, + checkGrowable$1: function(receiver, reason) { + if (!!receiver.fixed$length) + throw H.wrapException(new P.UnsupportedError(reason)); + }, + add$1: function(receiver, value) { + this.checkGrowable$1(receiver, "add"); + receiver.push(value); + }, + forEach$1: function(receiver, f) { + var end, i; + end = receiver.length; + for (i = 0; i < end; ++i) { + f.call$1(receiver[i]); + if (receiver.length !== end) + throw H.wrapException(new P.ConcurrentModificationError(receiver)); + } + }, + map$1: function(receiver, f) { + return new H.MappedListIterable(receiver, f, [H.getTypeArgumentByIndex(receiver, 0), null]); + }, + elementAt$1: function(receiver, index) { + if (index < 0 || index >= receiver.length) + return H.ioore(receiver, index); + return receiver[index]; + }, + sublist$2: function(receiver, start, end) { + var t1 = receiver.length; + if (start > t1) + throw H.wrapException(P.RangeError$range(start, 0, receiver.length, "start", null)); + if (end < start || end > receiver.length) + throw H.wrapException(P.RangeError$range(end, start, receiver.length, "end", null)); + if (start === end) + return H.setRuntimeTypeInfo([], [H.getTypeArgumentByIndex(receiver, 0)]); + return H.setRuntimeTypeInfo(receiver.slice(start, end), [H.getTypeArgumentByIndex(receiver, 0)]); + }, + get$first: function(receiver) { + if (receiver.length > 0) + return receiver[0]; + throw H.wrapException(H.IterableElementError_noElement()); + }, + setRange$4: function(receiver, start, end, iterable, skipCount) { + var $length, i, t1; + this.checkMutable$1(receiver, "setRange"); + P.RangeError_checkValidRange(start, end, receiver.length, null, null, null); + $length = end - start; + if ($length === 0) + return; + if (skipCount < 0) + H.throwExpression(P.RangeError$range(skipCount, 0, null, "skipCount", null)); + if (skipCount + $length > iterable.length) + throw H.wrapException(H.IterableElementError_tooFew()); + if (skipCount < start) + for (i = $length - 1; i >= 0; --i) { + t1 = skipCount + i; + if (t1 < 0 || t1 >= iterable.length) + return H.ioore(iterable, t1); + receiver[start + i] = iterable[t1]; + } + else + for (i = 0; i < $length; ++i) { + t1 = skipCount + i; + if (t1 < 0 || t1 >= iterable.length) + return H.ioore(iterable, t1); + receiver[start + i] = iterable[t1]; + } + }, + any$1: function(receiver, test) { + var end, i; + end = receiver.length; + for (i = 0; i < end; ++i) { + if (test.call$1(receiver[i]) === true) + return true; + if (receiver.length !== end) + throw H.wrapException(new P.ConcurrentModificationError(receiver)); + } + return false; + }, + contains$1: function(receiver, other) { + var i; + for (i = 0; i < receiver.length; ++i) + if (J.$eq$(receiver[i], other)) + return true; + return false; + }, + toString$0: function(receiver) { + return P.IterableBase_iterableToFullString(receiver, "[", "]"); + }, + get$iterator: function(receiver) { + return new J.ArrayIterator(receiver, receiver.length, 0, null); + }, + get$hashCode: function(receiver) { + return H.Primitives_objectHashCode(receiver); + }, + get$length: function(receiver) { + return receiver.length; + }, + set$length: function(receiver, newLength) { + this.checkGrowable$1(receiver, "set length"); + if (newLength < 0) + throw H.wrapException(P.RangeError$range(newLength, 0, null, "newLength", null)); + receiver.length = newLength; + }, + $index: function(receiver, index) { + if (typeof index !== "number" || Math.floor(index) !== index) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + if (index >= receiver.length || index < 0) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $indexSet: function(receiver, index, value) { + this.checkMutable$1(receiver, "indexed set"); + if (typeof index !== "number" || Math.floor(index) !== index) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + if (index >= receiver.length || index < 0) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + receiver[index] = value; + }, + $isJSIndexable: 1, + $asJSIndexable: Isolate.functionThatReturnsNull, + $isList: 1, + $asList: null, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: null + }, + JSUnmodifiableArray: { + "^": "JSArray;$ti" + }, + ArrayIterator: { + "^": "Object;__interceptors$_iterable,__interceptors$_length,_index,__interceptors$_current", + get$current: function() { + return this.__interceptors$_current; + }, + moveNext$0: function() { + var t1, $length, t2; + t1 = this.__interceptors$_iterable; + $length = t1.length; + if (this.__interceptors$_length !== $length) + throw H.wrapException(H.throwConcurrentModificationError(t1)); + t2 = this._index; + if (t2 >= $length) { + this.__interceptors$_current = null; + return false; + } + this.__interceptors$_current = t1[t2]; + this._index = t2 + 1; + return true; + } + }, + JSNumber: { + "^": "Interceptor;", + toString$0: function(receiver) { + if (receiver === 0 && 1 / receiver < 0) + return "-0.0"; + else + return "" + receiver; + }, + get$hashCode: function(receiver) { + return receiver & 0x1FFFFFFF; + }, + $add: function(receiver, other) { + if (typeof other !== "number") + throw H.wrapException(H.argumentErrorValue(other)); + return receiver + other; + }, + _tdivFast$1: function(receiver, other) { + return (receiver | 0) === receiver ? receiver / other | 0 : this._tdivSlow$1(receiver, other); + }, + _tdivSlow$1: function(receiver, other) { + var quotient = receiver / other; + if (quotient >= -2147483648 && quotient <= 2147483647) + return quotient | 0; + if (quotient > 0) { + if (quotient !== 1 / 0) + return Math.floor(quotient); + } else if (quotient > -1 / 0) + return Math.ceil(quotient); + throw H.wrapException(new P.UnsupportedError("Result of truncating division is " + H.S(quotient) + ": " + H.S(receiver) + " ~/ " + other)); + }, + _shrOtherPositive$1: function(receiver, other) { + var t1; + if (receiver > 0) + t1 = other > 31 ? 0 : receiver >>> other; + else { + t1 = other > 31 ? 31 : other; + t1 = receiver >> t1 >>> 0; + } + return t1; + }, + $lt: function(receiver, other) { + if (typeof other !== "number") + throw H.wrapException(H.argumentErrorValue(other)); + return receiver < other; + }, + $isnum: 1 + }, + JSInt: { + "^": "JSNumber;", + $isnum: 1, + $isint: 1 + }, + JSDouble: { + "^": "JSNumber;", + $isnum: 1 + }, + JSString: { + "^": "Interceptor;", + codeUnitAt$1: function(receiver, index) { + if (index < 0) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + if (index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + return receiver.charCodeAt(index); + }, + _codeUnitAt$1: function(receiver, index) { + if (index >= receiver.length) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + return receiver.charCodeAt(index); + }, + $add: function(receiver, other) { + if (typeof other !== "string") + throw H.wrapException(P.ArgumentError$value(other, null, null)); + return receiver + other; + }, + startsWith$2: function(receiver, pattern, index) { + var endIndex; + if (index > receiver.length) + throw H.wrapException(P.RangeError$range(index, 0, receiver.length, null, null)); + endIndex = index + pattern.length; + if (endIndex > receiver.length) + return false; + return pattern === receiver.substring(index, endIndex); + }, + startsWith$1: function($receiver, pattern) { + return this.startsWith$2($receiver, pattern, 0); + }, + substring$2: function(receiver, startIndex, endIndex) { + if (endIndex == null) + endIndex = receiver.length; + H.checkInt(endIndex); + if (startIndex < 0) + throw H.wrapException(P.RangeError$value(startIndex, null, null)); + if (typeof endIndex !== "number") + return H.iae(endIndex); + if (startIndex > endIndex) + throw H.wrapException(P.RangeError$value(startIndex, null, null)); + if (endIndex > receiver.length) + throw H.wrapException(P.RangeError$value(endIndex, null, null)); + return receiver.substring(startIndex, endIndex); + }, + substring$1: function($receiver, startIndex) { + return this.substring$2($receiver, startIndex, null); + }, + toLowerCase$0: function(receiver) { + return receiver.toLowerCase(); + }, + trim$0: function(receiver) { + var result, endIndex, startIndex, t1, endIndex0; + result = receiver.trim(); + endIndex = result.length; + if (endIndex === 0) + return result; + if (this._codeUnitAt$1(result, 0) === 133) { + startIndex = J.JSString__skipLeadingWhitespace(result, 1); + if (startIndex === endIndex) + return ""; + } else + startIndex = 0; + t1 = endIndex - 1; + endIndex0 = this.codeUnitAt$1(result, t1) === 133 ? J.JSString__skipTrailingWhitespace(result, t1) : endIndex; + if (startIndex === 0 && endIndex0 === endIndex) + return result; + return result.substring(startIndex, endIndex0); + }, + toString$0: function(receiver) { + return receiver; + }, + get$hashCode: function(receiver) { + var t1, hash, i; + for (t1 = receiver.length, hash = 0, i = 0; i < t1; ++i) { + hash = 536870911 & hash + receiver.charCodeAt(i); + hash = 536870911 & hash + ((524287 & hash) << 10); + hash ^= hash >> 6; + } + hash = 536870911 & hash + ((67108863 & hash) << 3); + hash ^= hash >> 11; + return 536870911 & hash + ((16383 & hash) << 15); + }, + get$length: function(receiver) { + return receiver.length; + }, + $index: function(receiver, index) { + if (typeof index !== "number" || Math.floor(index) !== index) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + if (index >= receiver.length || index < 0) + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $isJSIndexable: 1, + $asJSIndexable: Isolate.functionThatReturnsNull, + $isString: 1, + static: { + JSString__isWhitespace: function(codeUnit) { + if (codeUnit < 256) + switch (codeUnit) { + case 9: + case 10: + case 11: + case 12: + case 13: + case 32: + case 133: + case 160: + return true; + default: + return false; + } + switch (codeUnit) { + case 5760: + case 8192: + case 8193: + case 8194: + case 8195: + case 8196: + case 8197: + case 8198: + case 8199: + case 8200: + case 8201: + case 8202: + case 8232: + case 8233: + case 8239: + case 8287: + case 12288: + case 65279: + return true; + default: + return false; + } + }, + JSString__skipLeadingWhitespace: function(string, index) { + var t1, codeUnit; + for (t1 = string.length; index < t1;) { + codeUnit = C.JSString_methods._codeUnitAt$1(string, index); + if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) + break; + ++index; + } + return index; + }, + JSString__skipTrailingWhitespace: function(string, index) { + var index0, codeUnit; + for (; index > 0; index = index0) { + index0 = index - 1; + codeUnit = C.JSString_methods.codeUnitAt$1(string, index0); + if (codeUnit !== 32 && codeUnit !== 13 && !J.JSString__isWhitespace(codeUnit)) + break; + } + return index; + } + } + } + }], ["dart._internal", "dart:_internal",, H, { + "^": "", + IterableElementError_noElement: function() { + return new P.StateError("No element"); + }, + IterableElementError_tooMany: function() { + return new P.StateError("Too many elements"); + }, + IterableElementError_tooFew: function() { + return new P.StateError("Too few elements"); + }, + EfficientLengthIterable: { + "^": "Iterable;$ti", + $asEfficientLengthIterable: null + }, + ListIterable: { + "^": "EfficientLengthIterable;$ti", + get$iterator: function(_) { + return new H.ListIterator(this, this.get$length(this), 0, null); + }, + forEach$1: function(_, action) { + var $length, i; + $length = this.get$length(this); + for (i = 0; i < $length; ++i) { + action.call$1(this.elementAt$1(0, i)); + if ($length !== this.get$length(this)) + throw H.wrapException(new P.ConcurrentModificationError(this)); + } + }, + where$1: function(_, test) { + return this.super$Iterable$where(0, test); + }, + map$1: function(_, f) { + return new H.MappedListIterable(this, f, [H.getRuntimeTypeArgument(this, "ListIterable", 0), null]); + }, + toList$1$growable: function(_, growable) { + var result, i, t1; + result = H.setRuntimeTypeInfo([], [H.getRuntimeTypeArgument(this, "ListIterable", 0)]); + C.JSArray_methods.set$length(result, this.get$length(this)); + for (i = 0; i < this.get$length(this); ++i) { + t1 = this.elementAt$1(0, i); + if (i >= result.length) + return H.ioore(result, i); + result[i] = t1; + } + return result; + }, + toList$0: function($receiver) { + return this.toList$1$growable($receiver, true); + } + }, + ListIterator: { + "^": "Object;_iterable,__internal$_length,__internal$_index,__internal$_current", + get$current: function() { + return this.__internal$_current; + }, + moveNext$0: function() { + var t1, t2, $length, t3; + t1 = this._iterable; + t2 = J.getInterceptor$asx(t1); + $length = t2.get$length(t1); + if (this.__internal$_length !== $length) + throw H.wrapException(new P.ConcurrentModificationError(t1)); + t3 = this.__internal$_index; + if (t3 >= $length) { + this.__internal$_current = null; + return false; + } + this.__internal$_current = t2.elementAt$1(t1, t3); + ++this.__internal$_index; + return true; + } + }, + MappedIterable: { + "^": "Iterable;_iterable,_f,$ti", + get$iterator: function(_) { + return new H.MappedIterator(null, J.get$iterator$ax(this._iterable), this._f, this.$ti); + }, + get$length: function(_) { + return J.get$length$asx(this._iterable); + }, + $asIterable: function($S, $T) { + return [$T]; + }, + static: { + MappedIterable_MappedIterable: function(iterable, $function, $S, $T) { + if (!!iterable.$isEfficientLengthIterable) + return new H.EfficientLengthMappedIterable(iterable, $function, [$S, $T]); + return new H.MappedIterable(iterable, $function, [$S, $T]); + } + } + }, + EfficientLengthMappedIterable: { + "^": "MappedIterable;_iterable,_f,$ti", + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function($S, $T) { + return [$T]; + } + }, + MappedIterator: { + "^": "Iterator;__internal$_current,_iterator,_f,$ti", + moveNext$0: function() { + var t1 = this._iterator; + if (t1.moveNext$0()) { + this.__internal$_current = this._f.call$1(t1.get$current()); + return true; + } + this.__internal$_current = null; + return false; + }, + get$current: function() { + return this.__internal$_current; + } + }, + MappedListIterable: { + "^": "ListIterable;_source,_f,$ti", + get$length: function(_) { + return J.get$length$asx(this._source); + }, + elementAt$1: function(_, index) { + return this._f.call$1(J.elementAt$1$ax(this._source, index)); + }, + $asListIterable: function($S, $T) { + return [$T]; + }, + $asEfficientLengthIterable: function($S, $T) { + return [$T]; + }, + $asIterable: function($S, $T) { + return [$T]; + } + }, + WhereIterable: { + "^": "Iterable;_iterable,_f,$ti", + get$iterator: function(_) { + return new H.WhereIterator(J.get$iterator$ax(this._iterable), this._f, this.$ti); + }, + map$1: function(_, f) { + return new H.MappedIterable(this, f, [H.getTypeArgumentByIndex(this, 0), null]); + } + }, + WhereIterator: { + "^": "Iterator;_iterator,_f,$ti", + moveNext$0: function() { + var t1, t2; + for (t1 = this._iterator, t2 = this._f; t1.moveNext$0();) + if (t2.call$1(t1.get$current()) === true) + return true; + return false; + }, + get$current: function() { + return this._iterator.get$current(); + } + }, + FixedLengthListMixin: { + "^": "Object;$ti", + set$length: function(receiver, newLength) { + throw H.wrapException(new P.UnsupportedError("Cannot change the length of a fixed-length list")); + }, + add$1: function(receiver, value) { + throw H.wrapException(new P.UnsupportedError("Cannot add to a fixed-length list")); + } + } + }], ["_isolate_helper", "dart:_isolate_helper",, H, { + "^": "", + _callInIsolate: function(isolate, $function) { + var result = isolate.eval$1($function); + if (!init.globalState.currentContext._isExecutingEvent) + init.globalState.topEventLoop.run$0(); + return result; + }, + startRootIsolate: function(entry, args) { + var t1, t2, t3, t4, t5, rootContext; + t1 = {}; + t1.args = args; + if (args == null) { + args = []; + t1.args = args; + t2 = args; + } else + t2 = args; + if (!J.getInterceptor(t2).$isList) + throw H.wrapException(P.ArgumentError$("Arguments to main must be a List: " + H.S(t2))); + init.globalState = new H._Manager(0, 0, 1, null, null, null, null, null, null, null, null, null, entry); + t2 = init.globalState; + t3 = self.window == null; + t4 = self.Worker; + t5 = t3 && !!self.postMessage; + t2.isWorker = t5; + t5 = !t5; + if (t5) + t4 = t4 != null && $.$get$IsolateNatives_thisScript() != null; + else + t4 = true; + t2.supportsWorkers = t4; + t2.fromCommandLine = t3 && t5; + t2.topEventLoop = new H._EventLoop(P.ListQueue$(null, H._IsolateEvent), 0); + t3 = P.int; + t2.isolates = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t3, H._IsolateContext]); + t2.managers = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t3, null]); + if (t2.isWorker === true) { + t4 = new H._MainManagerStub(); + t2.mainManager = t4; + self.onmessage = function(f, a) { + return function(e) { + f(a, e); + }; + }(H.IsolateNatives__processWorkerMessage, t4); + self.dartPrint = self.dartPrint || function(serialize) { + return function(object) { + if (self.console && self.console.log) + self.console.log(object); + else + self.postMessage(serialize(object)); + }; + }(H._Manager__serializePrintMessage); + } + if (init.globalState.isWorker === true) + return; + t2 = init.globalState.nextIsolateId++; + t4 = P.LinkedHashSet_LinkedHashSet(null, null, null, t3); + t5 = new H.RawReceivePortImpl(0, null, false); + rootContext = new H._IsolateContext(t2, new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t3, H.RawReceivePortImpl]), t4, init.createNewIsolate(), t5, new H.CapabilityImpl(H.random64()), new H.CapabilityImpl(H.random64()), false, false, [], P.LinkedHashSet_LinkedHashSet(null, null, null, null), null, null, false, true, P.LinkedHashSet_LinkedHashSet(null, null, null, null)); + t4.add$1(0, 0); + rootContext._addRegistration$2(0, t5); + init.globalState.rootContext = rootContext; + init.globalState.currentContext = rootContext; + if (H.functionTypeTest(entry, {func: 1, args: [,]})) + rootContext.eval$1(new H.startRootIsolate_closure(t1, entry)); + else if (H.functionTypeTest(entry, {func: 1, args: [,,]})) + rootContext.eval$1(new H.startRootIsolate_closure0(t1, entry)); + else + rootContext.eval$1(entry); + init.globalState.topEventLoop.run$0(); + }, + IsolateNatives_computeThisScript: function() { + var currentScript = init.currentScript; + if (currentScript != null) + return String(currentScript.src); + if (init.globalState.isWorker === true) + return H.IsolateNatives_computeThisScriptFromTrace(); + return; + }, + IsolateNatives_computeThisScriptFromTrace: function() { + var stack, matches; + stack = new Error().stack; + if (stack == null) { + stack = function() { + try { + throw new Error(); + } catch (e) { + return e.stack; + } + }(); + if (stack == null) + throw H.wrapException(new P.UnsupportedError("No stack trace")); + } + matches = stack.match(new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$", "m")); + if (matches != null) + return matches[1]; + matches = stack.match(new RegExp("^[^@]*@(.*):[0-9]*$", "m")); + if (matches != null) + return matches[1]; + throw H.wrapException(new P.UnsupportedError('Cannot extract URI from "' + stack + '"')); + }, + IsolateNatives__processWorkerMessage: function(sender, e) { + var msg, t1, functionName, entryPoint, args, message, isSpawnUri, startPaused, replyTo, t2, t3, t4, context; + msg = new H._Deserializer(true, []).deserialize$1(e.data); + t1 = J.getInterceptor$asx(msg); + switch (t1.$index(msg, "command")) { + case "start": + init.globalState.currentManagerId = t1.$index(msg, "id"); + functionName = t1.$index(msg, "functionName"); + entryPoint = functionName == null ? init.globalState.entry : init.globalFunctions[functionName](); + args = t1.$index(msg, "args"); + message = new H._Deserializer(true, []).deserialize$1(t1.$index(msg, "msg")); + isSpawnUri = t1.$index(msg, "isSpawnUri"); + startPaused = t1.$index(msg, "startPaused"); + replyTo = new H._Deserializer(true, []).deserialize$1(t1.$index(msg, "replyTo")); + t1 = init.globalState.nextIsolateId++; + t2 = P.int; + t3 = P.LinkedHashSet_LinkedHashSet(null, null, null, t2); + t4 = new H.RawReceivePortImpl(0, null, false); + context = new H._IsolateContext(t1, new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t2, H.RawReceivePortImpl]), t3, init.createNewIsolate(), t4, new H.CapabilityImpl(H.random64()), new H.CapabilityImpl(H.random64()), false, false, [], P.LinkedHashSet_LinkedHashSet(null, null, null, null), null, null, false, true, P.LinkedHashSet_LinkedHashSet(null, null, null, null)); + t3.add$1(0, 0); + context._addRegistration$2(0, t4); + init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(context, new H.IsolateNatives__processWorkerMessage_closure(entryPoint, args, message, isSpawnUri, startPaused, replyTo), "worker-start")); + init.globalState.currentContext = context; + init.globalState.topEventLoop.run$0(); + break; + case "spawn-worker": + break; + case "message": + if (t1.$index(msg, "port") != null) + J.send$1$x(t1.$index(msg, "port"), t1.$index(msg, "msg")); + init.globalState.topEventLoop.run$0(); + break; + case "close": + init.globalState.managers.remove$1(0, $.$get$IsolateNatives_workerIds().$index(0, sender)); + sender.terminate(); + init.globalState.topEventLoop.run$0(); + break; + case "log": + H.IsolateNatives__log(t1.$index(msg, "msg")); + break; + case "print": + if (init.globalState.isWorker === true) { + t1 = init.globalState.mainManager; + t2 = P.LinkedHashMap__makeLiteral(["command", "print", "msg", msg]); + t2 = new H._Serializer(true, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.int)).serialize$1(t2); + t1.toString; + self.postMessage(t2); + } else + P.print(t1.$index(msg, "msg")); + break; + case "error": + throw H.wrapException(t1.$index(msg, "msg")); + } + }, + IsolateNatives__log: function(msg) { + var trace, t1, t2, exception; + if (init.globalState.isWorker === true) { + t1 = init.globalState.mainManager; + t2 = P.LinkedHashMap__makeLiteral(["command", "log", "msg", msg]); + t2 = new H._Serializer(true, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.int)).serialize$1(t2); + t1.toString; + self.postMessage(t2); + } else + try { + self.console.log(msg); + } catch (exception) { + H.unwrapException(exception); + trace = H.getTraceFromException(exception); + t1 = P.Exception_Exception(trace); + throw H.wrapException(t1); + } + }, + IsolateNatives__startIsolate: function(topLevel, args, message, isSpawnUri, startPaused, replyTo) { + var context, t1, t2, t3; + context = init.globalState.currentContext; + t1 = context.id; + $.Primitives_mirrorFunctionCacheName = $.Primitives_mirrorFunctionCacheName + ("_" + t1); + $.Primitives_mirrorInvokeCacheName = $.Primitives_mirrorInvokeCacheName + ("_" + t1); + t1 = context.controlPort; + t2 = init.globalState.currentContext.id; + t3 = context.pauseCapability; + J.send$1$x(replyTo, ["spawned", new H._NativeJsSendPort(t1, t2), t3, context.terminateCapability]); + t2 = new H.IsolateNatives__startIsolate_runStartFunction(topLevel, args, message, isSpawnUri, context); + if (startPaused === true) { + context.addPause$2(t3, t3); + init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(context, t2, "start isolate")); + } else + t2.call$0(); + }, + _clone: function(message) { + return new H._Deserializer(true, []).deserialize$1(new H._Serializer(false, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.int)).serialize$1(message)); + }, + startRootIsolate_closure: { + "^": "Closure:0;_box_0,entry", + call$0: function() { + this.entry.call$1(this._box_0.args); + } + }, + startRootIsolate_closure0: { + "^": "Closure:0;_box_0,entry", + call$0: function() { + this.entry.call$2(this._box_0.args, null); + } + }, + _Manager: { + "^": "Object;nextIsolateId,currentManagerId,nextManagerId,currentContext,rootContext,topEventLoop,fromCommandLine,isWorker,supportsWorkers,isolates,mainManager,managers,entry", + static: { + _Manager__serializePrintMessage: function(object) { + var t1 = P.LinkedHashMap__makeLiteral(["command", "print", "msg", object]); + return new H._Serializer(true, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.int)).serialize$1(t1); + } + } + }, + _IsolateContext: { + "^": "Object;id>,ports,weakPorts,isolateStatics<,controlPort<,pauseCapability,terminateCapability,initialized,isPaused,delayedEvents,pauseTokens,doneHandlers,_scheduledControlEvents,_isExecutingEvent,errorsAreFatal,errorPorts", + addPause$2: function(authentification, resume) { + if (!this.pauseCapability.$eq(0, authentification)) + return; + if (this.pauseTokens.add$1(0, resume) && !this.isPaused) + this.isPaused = true; + this._updateGlobalState$0(); + }, + removePause$1: function(resume) { + var t1, t2, $event, t3, t4, t5; + if (!this.isPaused) + return; + t1 = this.pauseTokens; + t1.remove$1(0, resume); + if (t1._collection$_length === 0) { + for (t1 = this.delayedEvents; t2 = t1.length, t2 !== 0;) { + if (0 >= t2) + return H.ioore(t1, -1); + $event = t1.pop(); + t2 = init.globalState.topEventLoop.events; + t3 = t2._head; + t4 = t2._table; + t5 = t4.length; + t3 = (t3 - 1 & t5 - 1) >>> 0; + t2._head = t3; + if (t3 < 0 || t3 >= t5) + return H.ioore(t4, t3); + t4[t3] = $event; + if (t3 === t2._tail) + t2._grow$0(); + ++t2._modificationCount; + } + this.isPaused = false; + } + this._updateGlobalState$0(); + }, + addDoneListener$2: function(responsePort, response) { + var t1, i, t2; + if (this.doneHandlers == null) + this.doneHandlers = []; + for (t1 = J.getInterceptor(responsePort), i = 0; t2 = this.doneHandlers, i < t2.length; i += 2) + if (t1.$eq(responsePort, t2[i])) { + t1 = this.doneHandlers; + t2 = i + 1; + if (t2 >= t1.length) + return H.ioore(t1, t2); + t1[t2] = response; + return; + } + t2.push(responsePort); + this.doneHandlers.push(response); + }, + removeDoneListener$1: function(responsePort) { + var t1, i, t2; + if (this.doneHandlers == null) + return; + for (t1 = J.getInterceptor(responsePort), i = 0; t2 = this.doneHandlers, i < t2.length; i += 2) + if (t1.$eq(responsePort, t2[i])) { + t1 = this.doneHandlers; + t2 = i + 2; + t1.toString; + if (typeof t1 !== "object" || t1 === null || !!t1.fixed$length) + H.throwExpression(new P.UnsupportedError("removeRange")); + P.RangeError_checkValidRange(i, t2, t1.length, null, null, null); + t1.splice(i, t2 - i); + return; + } + }, + setErrorsFatal$2: function(authentification, errorsAreFatal) { + if (!this.terminateCapability.$eq(0, authentification)) + return; + this.errorsAreFatal = errorsAreFatal; + }, + handlePing$3: function(responsePort, pingType, response) { + var t1 = J.getInterceptor(pingType); + if (!t1.$eq(pingType, 0)) + t1 = t1.$eq(pingType, 1) && !this._isExecutingEvent; + else + t1 = true; + if (t1) { + J.send$1$x(responsePort, response); + return; + } + t1 = this._scheduledControlEvents; + if (t1 == null) { + t1 = P.ListQueue$(null, null); + this._scheduledControlEvents = t1; + } + t1._add$1(new H._IsolateContext_handlePing_respond(responsePort, response)); + }, + handleKill$2: function(authentification, priority) { + var t1; + if (!this.terminateCapability.$eq(0, authentification)) + return; + t1 = J.getInterceptor(priority); + if (!t1.$eq(priority, 0)) + t1 = t1.$eq(priority, 1) && !this._isExecutingEvent; + else + t1 = true; + if (t1) { + this.kill$0(); + return; + } + t1 = this._scheduledControlEvents; + if (t1 == null) { + t1 = P.ListQueue$(null, null); + this._scheduledControlEvents = t1; + } + t1._add$1(this.get$kill()); + }, + handleUncaughtError$2: function(error, stackTrace) { + var t1, message, t2; + t1 = this.errorPorts; + if (t1._collection$_length === 0) { + if (this.errorsAreFatal === true && this === init.globalState.rootContext) + return; + if (self.console && self.console.error) + self.console.error(error, stackTrace); + else { + P.print(error); + if (stackTrace != null) + P.print(stackTrace); + } + return; + } + message = new Array(2); + message.fixed$length = Array; + message[0] = J.toString$0$(error); + message[1] = stackTrace == null ? null : J.toString$0$(stackTrace); + for (t2 = new P._LinkedHashSetIterator(t1, t1._collection$_modifications, null, null), t2._collection$_cell = t1._collection$_first; t2.moveNext$0();) + J.send$1$x(t2._collection$_current, message); + }, + eval$1: function(code) { + var old, result, oldIsExecutingEvent, e, s, exception, t1; + old = init.globalState.currentContext; + init.globalState.currentContext = this; + $ = this.isolateStatics; + result = null; + oldIsExecutingEvent = this._isExecutingEvent; + this._isExecutingEvent = true; + try { + result = code.call$0(); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + this.handleUncaughtError$2(e, s); + if (this.errorsAreFatal === true) { + this.kill$0(); + if (this === init.globalState.rootContext) + throw exception; + } + } finally { + this._isExecutingEvent = oldIsExecutingEvent; + init.globalState.currentContext = old; + if (old != null) + $ = old.get$isolateStatics(); + if (this._scheduledControlEvents != null) + for (; t1 = this._scheduledControlEvents, !t1.get$isEmpty(t1);) + this._scheduledControlEvents.removeFirst$0().call$0(); + } + return result; + }, + lookup$1: function(portId) { + return this.ports.$index(0, portId); + }, + _addRegistration$2: function(portId, port) { + var t1 = this.ports; + if (t1.containsKey$1(portId)) + throw H.wrapException(P.Exception_Exception("Registry: ports must be registered only once.")); + t1.$indexSet(0, portId, port); + }, + _updateGlobalState$0: function() { + var t1 = this.ports; + if (t1.get$length(t1) - this.weakPorts._collection$_length > 0 || this.isPaused || !this.initialized) + init.globalState.isolates.$indexSet(0, this.id, this); + else + this.kill$0(); + }, + kill$0: [function() { + var t1, t2, i, responsePort, t3; + t1 = this._scheduledControlEvents; + if (t1 != null) + t1.clear$0(0); + for (t1 = this.ports, t2 = t1.get$values(t1), t2 = t2.get$iterator(t2); t2.moveNext$0();) + t2.get$current()._close$0(); + t1.clear$0(0); + this.weakPorts.clear$0(0); + init.globalState.isolates.remove$1(0, this.id); + this.errorPorts.clear$0(0); + if (this.doneHandlers != null) { + for (i = 0; t1 = this.doneHandlers, t2 = t1.length, i < t2; i += 2) { + responsePort = t1[i]; + t3 = i + 1; + if (t3 >= t2) + return H.ioore(t1, t3); + J.send$1$x(responsePort, t1[t3]); + } + this.doneHandlers = null; + } + }, "call$0", "get$kill", 0, 0, 2] + }, + _IsolateContext_handlePing_respond: { + "^": "Closure:2;responsePort,response", + call$0: function() { + J.send$1$x(this.responsePort, this.response); + } + }, + _EventLoop: { + "^": "Object;events,_activeJsAsyncCount", + dequeue$0: function() { + var t1 = this.events; + if (t1._head === t1._tail) + return; + return t1.removeFirst$0(); + }, + runIteration$0: function() { + var $event, t1, t2; + $event = this.dequeue$0(); + if ($event == null) { + if (init.globalState.rootContext != null) + if (init.globalState.isolates.containsKey$1(init.globalState.rootContext.id)) + if (init.globalState.fromCommandLine === true) { + t1 = init.globalState.rootContext.ports; + t1 = t1.get$isEmpty(t1); + } else + t1 = false; + else + t1 = false; + else + t1 = false; + if (t1) + H.throwExpression(P.Exception_Exception("Program exited with open ReceivePorts.")); + t1 = init.globalState; + if (t1.isWorker === true) { + t2 = t1.isolates; + t2 = t2.get$isEmpty(t2) && t1.topEventLoop._activeJsAsyncCount === 0; + } else + t2 = false; + if (t2) { + t1 = t1.mainManager; + t2 = P.LinkedHashMap__makeLiteral(["command", "close"]); + t2 = new H._Serializer(true, new P._LinkedIdentityHashMap(0, null, null, null, null, null, 0, [null, P.int])).serialize$1(t2); + t1.toString; + self.postMessage(t2); + } + return false; + } + $event.process$0(); + return true; + }, + _runHelper$0: function() { + if (self.window != null) + new H._EventLoop__runHelper_next(this).call$0(); + else + for (; this.runIteration$0();) + ; + }, + run$0: function() { + var e, trace, exception, t1, t2; + if (init.globalState.isWorker !== true) + this._runHelper$0(); + else + try { + this._runHelper$0(); + } catch (exception) { + e = H.unwrapException(exception); + trace = H.getTraceFromException(exception); + t1 = init.globalState.mainManager; + t2 = P.LinkedHashMap__makeLiteral(["command", "error", "msg", H.S(e) + "\n" + H.S(trace)]); + t2 = new H._Serializer(true, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.int)).serialize$1(t2); + t1.toString; + self.postMessage(t2); + } + } + }, + _EventLoop__runHelper_next: { + "^": "Closure:2;$this", + call$0: function() { + if (!this.$this.runIteration$0()) + return; + P.Timer_Timer(C.Duration_0, this); + } + }, + _IsolateEvent: { + "^": "Object;isolate,fn,message", + process$0: function() { + var t1 = this.isolate; + if (t1.isPaused) { + t1.delayedEvents.push(this); + return; + } + t1.eval$1(this.fn); + } + }, + _MainManagerStub: { + "^": "Object;" + }, + IsolateNatives__processWorkerMessage_closure: { + "^": "Closure:0;entryPoint,args,message,isSpawnUri,startPaused,replyTo", + call$0: function() { + H.IsolateNatives__startIsolate(this.entryPoint, this.args, this.message, this.isSpawnUri, this.startPaused, this.replyTo); + } + }, + IsolateNatives__startIsolate_runStartFunction: { + "^": "Closure:2;topLevel,args,message,isSpawnUri,context", + call$0: function() { + var t1, t2; + t1 = this.context; + t1.initialized = true; + if (this.isSpawnUri !== true) + this.topLevel.call$1(this.message); + else { + t2 = this.topLevel; + if (H.functionTypeTest(t2, {func: 1, args: [,,]})) + t2.call$2(this.args, this.message); + else if (H.functionTypeTest(t2, {func: 1, args: [,]})) + t2.call$1(this.args); + else + t2.call$0(); + } + t1._updateGlobalState$0(); + } + }, + _BaseSendPort: { + "^": "Object;" + }, + _NativeJsSendPort: { + "^": "_BaseSendPort;_receivePort,_isolateId", + send$1: function(_, message) { + var isolate, t1, msg; + isolate = init.globalState.isolates.$index(0, this._isolateId); + if (isolate == null) + return; + t1 = this._receivePort; + if (t1.get$_isClosed()) + return; + msg = H._clone(message); + if (isolate.get$controlPort() === t1) { + t1 = J.getInterceptor$asx(msg); + switch (t1.$index(msg, 0)) { + case "pause": + isolate.addPause$2(t1.$index(msg, 1), t1.$index(msg, 2)); + break; + case "resume": + isolate.removePause$1(t1.$index(msg, 1)); + break; + case "add-ondone": + isolate.addDoneListener$2(t1.$index(msg, 1), t1.$index(msg, 2)); + break; + case "remove-ondone": + isolate.removeDoneListener$1(t1.$index(msg, 1)); + break; + case "set-errors-fatal": + isolate.setErrorsFatal$2(t1.$index(msg, 1), t1.$index(msg, 2)); + break; + case "ping": + isolate.handlePing$3(t1.$index(msg, 1), t1.$index(msg, 2), t1.$index(msg, 3)); + break; + case "kill": + isolate.handleKill$2(t1.$index(msg, 1), t1.$index(msg, 2)); + break; + case "getErrors": + t1 = t1.$index(msg, 1); + isolate.errorPorts.add$1(0, t1); + break; + case "stopErrors": + t1 = t1.$index(msg, 1); + isolate.errorPorts.remove$1(0, t1); + break; + } + return; + } + init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(isolate, new H._NativeJsSendPort_send_closure(this, msg), "receive")); + }, + $eq: function(_, other) { + if (other == null) + return false; + return other instanceof H._NativeJsSendPort && J.$eq$(this._receivePort, other._receivePort); + }, + get$hashCode: function(_) { + return this._receivePort.get$_id(); + } + }, + _NativeJsSendPort_send_closure: { + "^": "Closure:0;$this,msg", + call$0: function() { + var t1 = this.$this._receivePort; + if (!t1.get$_isClosed()) + t1.__isolate_helper$_add$1(this.msg); + } + }, + _WorkerSendPort: { + "^": "_BaseSendPort;_workerId,_receivePortId,_isolateId", + send$1: function(_, message) { + var t1, workerMessage, manager; + t1 = P.LinkedHashMap__makeLiteral(["command", "message", "port", this, "msg", message]); + workerMessage = new H._Serializer(true, P._LinkedIdentityHashMap__LinkedIdentityHashMap$es6(null, P.int)).serialize$1(t1); + if (init.globalState.isWorker === true) { + init.globalState.mainManager.toString; + self.postMessage(workerMessage); + } else { + manager = init.globalState.managers.$index(0, this._workerId); + if (manager != null) + manager.postMessage(workerMessage); + } + }, + $eq: function(_, other) { + if (other == null) + return false; + return other instanceof H._WorkerSendPort && J.$eq$(this._workerId, other._workerId) && J.$eq$(this._isolateId, other._isolateId) && J.$eq$(this._receivePortId, other._receivePortId); + }, + get$hashCode: function(_) { + var t1, t2, t3; + t1 = this._workerId; + if (typeof t1 !== "number") + return t1.$shl(); + t2 = this._isolateId; + if (typeof t2 !== "number") + return t2.$shl(); + t3 = this._receivePortId; + if (typeof t3 !== "number") + return H.iae(t3); + return (t1 << 16 ^ t2 << 8 ^ t3) >>> 0; + } + }, + RawReceivePortImpl: { + "^": "Object;_id<,_handler,_isClosed<", + _close$0: function() { + this._isClosed = true; + this._handler = null; + }, + __isolate_helper$_add$1: function(dataEvent) { + if (this._isClosed) + return; + this._handler.call$1(dataEvent); + }, + $isRawReceivePort: 1 + }, + TimerImpl: { + "^": "Object;_once,_inEventLoop,_handle", + TimerImpl$2: function(milliseconds, callback) { + var t1, t2; + if (milliseconds === 0) + t1 = self.setTimeout == null || init.globalState.isWorker === true; + else + t1 = false; + if (t1) { + this._handle = 1; + t1 = init.globalState.topEventLoop; + t2 = init.globalState.currentContext; + t1.events._add$1(new H._IsolateEvent(t2, new H.TimerImpl_internalCallback(this, callback), "timer")); + this._inEventLoop = true; + } else if (self.setTimeout != null) { + ++init.globalState.topEventLoop._activeJsAsyncCount; + this._handle = self.setTimeout(H.convertDartClosureToJS(new H.TimerImpl_internalCallback0(this, callback), 0), milliseconds); + } else + throw H.wrapException(new P.UnsupportedError("Timer greater than 0.")); + }, + static: { + TimerImpl$: function(milliseconds, callback) { + var t1 = new H.TimerImpl(true, false, null); + t1.TimerImpl$2(milliseconds, callback); + return t1; + } + } + }, + TimerImpl_internalCallback: { + "^": "Closure:2;$this,callback", + call$0: function() { + this.$this._handle = null; + this.callback.call$0(); + } + }, + TimerImpl_internalCallback0: { + "^": "Closure:2;$this,callback", + call$0: function() { + this.$this._handle = null; + --init.globalState.topEventLoop._activeJsAsyncCount; + this.callback.call$0(); + } + }, + CapabilityImpl: { + "^": "Object;_id<", + get$hashCode: function(_) { + var hash = this._id; + if (typeof hash !== "number") + return hash.$shr(); + hash = C.JSNumber_methods._shrOtherPositive$1(hash, 0) ^ C.JSNumber_methods._tdivFast$1(hash, 4294967296); + hash = (~hash >>> 0) + (hash << 15 >>> 0) & 4294967295; + hash = ((hash ^ hash >>> 12) >>> 0) * 5 & 4294967295; + hash = ((hash ^ hash >>> 4) >>> 0) * 2057 & 4294967295; + return (hash ^ hash >>> 16) >>> 0; + }, + $eq: function(_, other) { + var t1, t2; + if (other == null) + return false; + if (other === this) + return true; + if (other instanceof H.CapabilityImpl) { + t1 = this._id; + t2 = other._id; + return t1 == null ? t2 == null : t1 === t2; + } + return false; + } + }, + _Serializer: { + "^": "Object;_serializeSendPorts,serializedObjectIds", + serialize$1: [function(x) { + var t1, serializationId, serializeTearOff, t2, $name; + if (x == null || typeof x === "string" || typeof x === "number" || typeof x === "boolean") + return x; + t1 = this.serializedObjectIds; + serializationId = t1.$index(0, x); + if (serializationId != null) + return ["ref", serializationId]; + t1.$indexSet(0, x, t1.get$length(t1)); + t1 = J.getInterceptor(x); + if (!!t1.$isNativeByteBuffer) + return ["buffer", x]; + if (!!t1.$isNativeTypedData) + return ["typed", x]; + if (!!t1.$isJSIndexable) + return this.serializeJSIndexable$1(x); + if (!!t1.$isInternalMap) { + serializeTearOff = this.get$serialize(); + t2 = x.get$keys(); + t2 = H.MappedIterable_MappedIterable(t2, serializeTearOff, H.getRuntimeTypeArgument(t2, "Iterable", 0), null); + t2 = P.List_List$from(t2, true, H.getRuntimeTypeArgument(t2, "Iterable", 0)); + t1 = t1.get$values(x); + t1 = H.MappedIterable_MappedIterable(t1, serializeTearOff, H.getRuntimeTypeArgument(t1, "Iterable", 0), null); + return ["map", t2, P.List_List$from(t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0))]; + } + if (!!t1.$isJSObject) + return this.serializeJSObject$1(x); + if (!!t1.$isInterceptor) + this.unsupported$1(x); + if (!!t1.$isRawReceivePort) + this.unsupported$2(x, "RawReceivePorts can't be transmitted:"); + if (!!t1.$is_NativeJsSendPort) + return this.serializeJsSendPort$1(x); + if (!!t1.$is_WorkerSendPort) + return this.serializeWorkerSendPort$1(x); + if (!!t1.$isClosure) { + $name = x.$static_name; + if ($name == null) + this.unsupported$2(x, "Closures can't be transmitted:"); + return ["function", $name]; + } + if (!!t1.$isCapabilityImpl) + return ["capability", x._id]; + if (!(x instanceof P.Object)) + this.unsupported$1(x); + return ["dart", init.classIdExtractor(x), this.serializeArrayInPlace$1(init.classFieldsExtractor(x))]; + }, "call$1", "get$serialize", 2, 0, 1], + unsupported$2: function(x, message) { + throw H.wrapException(new P.UnsupportedError((message == null ? "Can't transmit:" : message) + " " + H.S(x))); + }, + unsupported$1: function(x) { + return this.unsupported$2(x, null); + }, + serializeJSIndexable$1: function(indexable) { + var serialized = this.serializeArray$1(indexable); + if (!!indexable.fixed$length) + return ["fixed", serialized]; + if (!indexable.fixed$length) + return ["extendable", serialized]; + if (!indexable.immutable$list) + return ["mutable", serialized]; + if (indexable.constructor === Array) + return ["const", serialized]; + this.unsupported$2(indexable, "Can't serialize indexable: "); + }, + serializeArray$1: function(x) { + var serialized, i, t1; + serialized = []; + C.JSArray_methods.set$length(serialized, x.length); + for (i = 0; i < x.length; ++i) { + t1 = this.serialize$1(x[i]); + if (i >= serialized.length) + return H.ioore(serialized, i); + serialized[i] = t1; + } + return serialized; + }, + serializeArrayInPlace$1: function(x) { + var i; + for (i = 0; i < x.length; ++i) + C.JSArray_methods.$indexSet(x, i, this.serialize$1(x[i])); + return x; + }, + serializeJSObject$1: function(x) { + var keys, values, i, t1; + if (!!x.constructor && x.constructor !== Object) + this.unsupported$2(x, "Only plain JS Objects are supported:"); + keys = Object.keys(x); + values = []; + C.JSArray_methods.set$length(values, keys.length); + for (i = 0; i < keys.length; ++i) { + t1 = this.serialize$1(x[keys[i]]); + if (i >= values.length) + return H.ioore(values, i); + values[i] = t1; + } + return ["js-object", keys, values]; + }, + serializeWorkerSendPort$1: function(x) { + if (this._serializeSendPorts) + return ["sendport", x._workerId, x._isolateId, x._receivePortId]; + return ["raw sendport", x]; + }, + serializeJsSendPort$1: function(x) { + if (this._serializeSendPorts) + return ["sendport", init.globalState.currentManagerId, x._isolateId, x._receivePort.get$_id()]; + return ["raw sendport", x]; + } + }, + _Deserializer: { + "^": "Object;_adjustSendPorts,deserializedObjects", + deserialize$1: [function(x) { + var serializationId, t1, result, classId, fields, emptyInstance; + if (x == null || typeof x === "string" || typeof x === "number" || typeof x === "boolean") + return x; + if (typeof x !== "object" || x === null || x.constructor !== Array) + throw H.wrapException(P.ArgumentError$("Bad serialized message: " + H.S(x))); + switch (C.JSArray_methods.get$first(x)) { + case "ref": + if (1 >= x.length) + return H.ioore(x, 1); + serializationId = x[1]; + t1 = this.deserializedObjects; + if (serializationId >>> 0 !== serializationId || serializationId >= t1.length) + return H.ioore(t1, serializationId); + return t1[serializationId]; + case "buffer": + if (1 >= x.length) + return H.ioore(x, 1); + result = x[1]; + this.deserializedObjects.push(result); + return result; + case "typed": + if (1 >= x.length) + return H.ioore(x, 1); + result = x[1]; + this.deserializedObjects.push(result); + return result; + case "fixed": + if (1 >= x.length) + return H.ioore(x, 1); + result = x[1]; + this.deserializedObjects.push(result); + t1 = H.setRuntimeTypeInfo(this.deserializeArrayInPlace$1(result), [null]); + t1.fixed$length = Array; + return t1; + case "extendable": + if (1 >= x.length) + return H.ioore(x, 1); + result = x[1]; + this.deserializedObjects.push(result); + return H.setRuntimeTypeInfo(this.deserializeArrayInPlace$1(result), [null]); + case "mutable": + if (1 >= x.length) + return H.ioore(x, 1); + result = x[1]; + this.deserializedObjects.push(result); + return this.deserializeArrayInPlace$1(result); + case "const": + if (1 >= x.length) + return H.ioore(x, 1); + result = x[1]; + this.deserializedObjects.push(result); + t1 = H.setRuntimeTypeInfo(this.deserializeArrayInPlace$1(result), [null]); + t1.fixed$length = Array; + return t1; + case "map": + return this.deserializeMap$1(x); + case "sendport": + return this.deserializeSendPort$1(x); + case "raw sendport": + if (1 >= x.length) + return H.ioore(x, 1); + result = x[1]; + this.deserializedObjects.push(result); + return result; + case "js-object": + return this.deserializeJSObject$1(x); + case "function": + if (1 >= x.length) + return H.ioore(x, 1); + result = init.globalFunctions[x[1]](); + this.deserializedObjects.push(result); + return result; + case "capability": + if (1 >= x.length) + return H.ioore(x, 1); + return new H.CapabilityImpl(x[1]); + case "dart": + t1 = x.length; + if (1 >= t1) + return H.ioore(x, 1); + classId = x[1]; + if (2 >= t1) + return H.ioore(x, 2); + fields = x[2]; + emptyInstance = init.instanceFromClassId(classId); + this.deserializedObjects.push(emptyInstance); + this.deserializeArrayInPlace$1(fields); + return init.initializeEmptyInstance(classId, emptyInstance, fields); + default: + throw H.wrapException("couldn't deserialize: " + H.S(x)); + } + }, "call$1", "get$deserialize", 2, 0, 1], + deserializeArrayInPlace$1: function(x) { + var t1, i, t2; + t1 = J.getInterceptor$asx(x); + i = 0; + while (true) { + t2 = t1.get$length(x); + if (typeof t2 !== "number") + return H.iae(t2); + if (!(i < t2)) + break; + t1.$indexSet(x, i, this.deserialize$1(t1.$index(x, i))); + ++i; + } + return x; + }, + deserializeMap$1: function(x) { + var t1, keys, values, result, t2, i; + t1 = x.length; + if (1 >= t1) + return H.ioore(x, 1); + keys = x[1]; + if (2 >= t1) + return H.ioore(x, 2); + values = x[2]; + result = P.LinkedHashMap__makeEmpty(); + this.deserializedObjects.push(result); + keys = J.map$1$ax(keys, this.get$deserialize()).toList$0(0); + for (t1 = J.getInterceptor$asx(keys), t2 = J.getInterceptor$asx(values), i = 0; i < t1.get$length(keys); ++i) { + if (i >= keys.length) + return H.ioore(keys, i); + result.$indexSet(0, keys[i], this.deserialize$1(t2.$index(values, i))); + } + return result; + }, + deserializeSendPort$1: function(x) { + var t1, managerId, isolateId, receivePortId, isolate, receivePort, result; + t1 = x.length; + if (1 >= t1) + return H.ioore(x, 1); + managerId = x[1]; + if (2 >= t1) + return H.ioore(x, 2); + isolateId = x[2]; + if (3 >= t1) + return H.ioore(x, 3); + receivePortId = x[3]; + if (J.$eq$(managerId, init.globalState.currentManagerId)) { + isolate = init.globalState.isolates.$index(0, isolateId); + if (isolate == null) + return; + receivePort = isolate.lookup$1(receivePortId); + if (receivePort == null) + return; + result = new H._NativeJsSendPort(receivePort, isolateId); + } else + result = new H._WorkerSendPort(managerId, receivePortId, isolateId); + this.deserializedObjects.push(result); + return result; + }, + deserializeJSObject$1: function(x) { + var t1, keys, values, o, t2, i, t3; + t1 = x.length; + if (1 >= t1) + return H.ioore(x, 1); + keys = x[1]; + if (2 >= t1) + return H.ioore(x, 2); + values = x[2]; + o = {}; + this.deserializedObjects.push(o); + t1 = J.getInterceptor$asx(keys); + t2 = J.getInterceptor$asx(values); + i = 0; + while (true) { + t3 = t1.get$length(keys); + if (typeof t3 !== "number") + return H.iae(t3); + if (!(i < t3)) + break; + o[t1.$index(keys, i)] = this.deserialize$1(t2.$index(values, i)); + ++i; + } + return o; + } + } + }], ["_js_helper", "dart:_js_helper",, H, { + "^": "", + getType: function(index) { + return init.types[index]; + }, + isJsIndexable: function(object, record) { + var result; + if (record != null) { + result = record.x; + if (result != null) + return result; + } + return !!J.getInterceptor(object).$isJavaScriptIndexingBehavior; + }, + S: function(value) { + var res; + if (typeof value === "string") + return value; + if (typeof value === "number") { + if (value !== 0) + return "" + value; + } else if (true === value) + return "true"; + else if (false === value) + return "false"; + else if (value == null) + return "null"; + res = J.toString$0$(value); + if (typeof res !== "string") + throw H.wrapException(H.argumentErrorValue(value)); + return res; + }, + Primitives_objectHashCode: function(object) { + var hash = object.$identityHash; + if (hash == null) { + hash = Math.random() * 0x3fffffff | 0; + object.$identityHash = hash; + } + return hash; + }, + Primitives__parseIntError: function(source, handleError) { + throw H.wrapException(new P.FormatException(source, null, null)); + }, + Primitives_parseInt: function(source, radix, handleError) { + var match, decimalMatch; + match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source); + if (match == null) + return H.Primitives__parseIntError(source, handleError); + if (3 >= match.length) + return H.ioore(match, 3); + decimalMatch = match[3]; + if (decimalMatch != null) + return parseInt(source, 10); + if (match[2] != null) + return parseInt(source, 16); + return H.Primitives__parseIntError(source, handleError); + }, + Primitives__parseDoubleError: function(source, handleError) { + throw H.wrapException(new P.FormatException("Invalid double", source, null)); + }, + Primitives_parseDouble: function(source, handleError) { + var result, trimmed; + if (!/^\s*[+-]?(?:Infinity|NaN|(?:\.\d+|\d+(?:\.\d*)?)(?:[eE][+-]?\d+)?)\s*$/.test(source)) + return H.Primitives__parseDoubleError(source, handleError); + result = parseFloat(source); + if (isNaN(result)) { + trimmed = C.JSString_methods.trim$0(source); + if (trimmed === "NaN" || trimmed === "+NaN" || trimmed === "-NaN") + return result; + return H.Primitives__parseDoubleError(source, handleError); + } + return result; + }, + Primitives_objectTypeName: function(object) { + var interceptor, interceptorConstructor, interceptorConstructorName, $name, dispatchName, objectConstructor, match, decompiledName; + interceptor = J.getInterceptor(object); + interceptorConstructor = interceptor.constructor; + if (typeof interceptorConstructor == "function") { + interceptorConstructorName = interceptorConstructor.name; + $name = typeof interceptorConstructorName === "string" ? interceptorConstructorName : null; + } else + $name = null; + if ($name == null || interceptor === C.Interceptor_methods || !!J.getInterceptor(object).$isUnknownJavaScriptObject) { + dispatchName = C.JS_CONST_u2C(object); + if (dispatchName === "Object") { + objectConstructor = object.constructor; + if (typeof objectConstructor == "function") { + match = String(objectConstructor).match(/^\s*function\s*([\w$]*)\s*\(/); + decompiledName = match == null ? null : match[1]; + if (typeof decompiledName === "string" && /^\w+$/.test(decompiledName)) + $name = decompiledName; + } + if ($name == null) + $name = dispatchName; + } else + $name = dispatchName; + } + $name = $name; + if ($name.length > 1 && C.JSString_methods._codeUnitAt$1($name, 0) === 36) + $name = C.JSString_methods.substring$1($name, 1); + return function(str, names) { + return str.replace(/[^<,> ]+/g, function(m) { + return names[m] || m; + }); + }($name + H.joinArguments(H.getRuntimeTypeInfo(object), 0, null), init.mangledGlobalNames); + }, + Primitives_objectToHumanReadableString: function(object) { + return "Instance of '" + H.Primitives_objectTypeName(object) + "'"; + }, + Primitives__fromCharCodeApply: function(array) { + var end, result, i, i0, chunkEnd; + end = array.length; + if (end <= 500) + return String.fromCharCode.apply(null, array); + for (result = "", i = 0; i < end; i = i0) { + i0 = i + 500; + chunkEnd = i0 < end ? i0 : end; + result += String.fromCharCode.apply(null, array.slice(i, chunkEnd)); + } + return result; + }, + Primitives_stringFromCodePoints: function(codePoints) { + var a, t1, _i, i; + a = H.setRuntimeTypeInfo([], [P.int]); + for (t1 = codePoints.length, _i = 0; _i < codePoints.length; codePoints.length === t1 || (0, H.throwConcurrentModificationError)(codePoints), ++_i) { + i = codePoints[_i]; + if (typeof i !== "number" || Math.floor(i) !== i) + throw H.wrapException(H.argumentErrorValue(i)); + if (i <= 65535) + a.push(i); + else if (i <= 1114111) { + a.push(55296 + (C.JSInt_methods._shrOtherPositive$1(i - 65536, 10) & 1023)); + a.push(56320 + (i & 1023)); + } else + throw H.wrapException(H.argumentErrorValue(i)); + } + return H.Primitives__fromCharCodeApply(a); + }, + Primitives_stringFromCharCodes: function(charCodes) { + var t1, _i, t2, i; + for (t1 = charCodes.length, _i = 0; t2 = charCodes.length, _i < t2; t2 === t1 || (0, H.throwConcurrentModificationError)(charCodes), ++_i) { + i = charCodes[_i]; + if (typeof i !== "number" || Math.floor(i) !== i) + throw H.wrapException(H.argumentErrorValue(i)); + if (i < 0) + throw H.wrapException(H.argumentErrorValue(i)); + if (i > 65535) + return H.Primitives_stringFromCodePoints(charCodes); + } + return H.Primitives__fromCharCodeApply(charCodes); + }, + Primitives_getProperty: function(object, key) { + if (object == null || typeof object === "boolean" || typeof object === "number" || typeof object === "string") + throw H.wrapException(H.argumentErrorValue(object)); + return object[key]; + }, + Primitives_setProperty: function(object, key, value) { + if (object == null || typeof object === "boolean" || typeof object === "number" || typeof object === "string") + throw H.wrapException(H.argumentErrorValue(object)); + object[key] = value; + }, + iae: function(argument) { + throw H.wrapException(H.argumentErrorValue(argument)); + }, + ioore: function(receiver, index) { + if (receiver == null) + J.get$length$asx(receiver); + throw H.wrapException(H.diagnoseIndexError(receiver, index)); + }, + diagnoseIndexError: function(indexable, index) { + var $length, t1; + if (typeof index !== "number" || Math.floor(index) !== index) + return new P.ArgumentError(true, index, "index", null); + $length = J.get$length$asx(indexable); + if (!(index < 0)) { + if (typeof $length !== "number") + return H.iae($length); + t1 = index >= $length; + } else + t1 = true; + if (t1) + return P.IndexError$(index, indexable, "index", null, $length); + return P.RangeError$value(index, "index", null); + }, + argumentErrorValue: function(object) { + return new P.ArgumentError(true, object, null, null); + }, + checkInt: function(value) { + if (typeof value !== "number" || Math.floor(value) !== value) + throw H.wrapException(H.argumentErrorValue(value)); + return value; + }, + wrapException: function(ex) { + var wrapper; + if (ex == null) + ex = new P.NullThrownError(); + wrapper = new Error(); + wrapper.dartException = ex; + if ("defineProperty" in Object) { + Object.defineProperty(wrapper, "message", {get: H.toStringWrapper}); + wrapper.name = ""; + } else + wrapper.toString = H.toStringWrapper; + return wrapper; + }, + toStringWrapper: function() { + return J.toString$0$(this.dartException); + }, + throwExpression: function(ex) { + throw H.wrapException(ex); + }, + throwConcurrentModificationError: function(collection) { + throw H.wrapException(new P.ConcurrentModificationError(collection)); + }, + unwrapException: function(ex) { + var t1, message, number, ieErrorCode, t2, nsme, notClosure, nullCall, nullLiteralCall, undefCall, undefLiteralCall, nullProperty, undefProperty, undefLiteralProperty, match; + t1 = new H.unwrapException_saveStackTrace(ex); + if (ex == null) + return; + if (typeof ex !== "object") + return ex; + if ("dartException" in ex) + return t1.call$1(ex.dartException); + else if (!("message" in ex)) + return ex; + message = ex.message; + if ("number" in ex && typeof ex.number == "number") { + number = ex.number; + ieErrorCode = number & 65535; + if ((C.JSInt_methods._shrOtherPositive$1(number, 16) & 8191) === 10) + switch (ieErrorCode) { + case 438: + return t1.call$1(H.JsNoSuchMethodError$(H.S(message) + " (Error " + ieErrorCode + ")", null)); + case 445: + case 5007: + t2 = H.S(message) + " (Error " + ieErrorCode + ")"; + return t1.call$1(new H.NullError(t2, null)); + } + } + if (ex instanceof TypeError) { + nsme = $.$get$TypeErrorDecoder_noSuchMethodPattern(); + notClosure = $.$get$TypeErrorDecoder_notClosurePattern(); + nullCall = $.$get$TypeErrorDecoder_nullCallPattern(); + nullLiteralCall = $.$get$TypeErrorDecoder_nullLiteralCallPattern(); + undefCall = $.$get$TypeErrorDecoder_undefinedCallPattern(); + undefLiteralCall = $.$get$TypeErrorDecoder_undefinedLiteralCallPattern(); + nullProperty = $.$get$TypeErrorDecoder_nullPropertyPattern(); + $.$get$TypeErrorDecoder_nullLiteralPropertyPattern(); + undefProperty = $.$get$TypeErrorDecoder_undefinedPropertyPattern(); + undefLiteralProperty = $.$get$TypeErrorDecoder_undefinedLiteralPropertyPattern(); + match = nsme.matchTypeError$1(message); + if (match != null) + return t1.call$1(H.JsNoSuchMethodError$(message, match)); + else { + match = notClosure.matchTypeError$1(message); + if (match != null) { + match.method = "call"; + return t1.call$1(H.JsNoSuchMethodError$(message, match)); + } else { + match = nullCall.matchTypeError$1(message); + if (match == null) { + match = nullLiteralCall.matchTypeError$1(message); + if (match == null) { + match = undefCall.matchTypeError$1(message); + if (match == null) { + match = undefLiteralCall.matchTypeError$1(message); + if (match == null) { + match = nullProperty.matchTypeError$1(message); + if (match == null) { + match = nullLiteralCall.matchTypeError$1(message); + if (match == null) { + match = undefProperty.matchTypeError$1(message); + if (match == null) { + match = undefLiteralProperty.matchTypeError$1(message); + t2 = match != null; + } else + t2 = true; + } else + t2 = true; + } else + t2 = true; + } else + t2 = true; + } else + t2 = true; + } else + t2 = true; + } else + t2 = true; + if (t2) + return t1.call$1(new H.NullError(message, match == null ? null : match.method)); + } + } + return t1.call$1(new H.UnknownJsTypeError(typeof message === "string" ? message : "")); + } + if (ex instanceof RangeError) { + if (typeof message === "string" && message.indexOf("call stack") !== -1) + return new P.StackOverflowError(); + message = function(ex) { + try { + return String(ex); + } catch (e) { + } + return null; + }(ex); + return t1.call$1(new P.ArgumentError(false, null, null, typeof message === "string" ? message.replace(/^RangeError:\s*/, "") : message)); + } + if (typeof InternalError == "function" && ex instanceof InternalError) + if (typeof message === "string" && message === "too much recursion") + return new P.StackOverflowError(); + return ex; + }, + getTraceFromException: function(exception) { + var trace; + if (exception == null) + return new H._StackTrace(exception, null); + trace = exception.$cachedTrace; + if (trace != null) + return trace; + return exception.$cachedTrace = new H._StackTrace(exception, null); + }, + objectHashCode: function(object) { + if (object == null || typeof object != 'object') + return J.get$hashCode$(object); + else + return H.Primitives_objectHashCode(object); + }, + fillLiteralMap: function(keyValuePairs, result) { + var $length, index, index0, index1; + $length = keyValuePairs.length; + for (index = 0; index < $length; index = index1) { + index0 = index + 1; + index1 = index0 + 1; + result.$indexSet(0, keyValuePairs[index], keyValuePairs[index0]); + } + return result; + }, + invokeClosure: function(closure, isolate, numberOfArguments, arg1, arg2, arg3, arg4) { + switch (numberOfArguments) { + case 0: + return H._callInIsolate(isolate, new H.invokeClosure_closure(closure)); + case 1: + return H._callInIsolate(isolate, new H.invokeClosure_closure0(closure, arg1)); + case 2: + return H._callInIsolate(isolate, new H.invokeClosure_closure1(closure, arg1, arg2)); + case 3: + return H._callInIsolate(isolate, new H.invokeClosure_closure2(closure, arg1, arg2, arg3)); + case 4: + return H._callInIsolate(isolate, new H.invokeClosure_closure3(closure, arg1, arg2, arg3, arg4)); + } + throw H.wrapException(P.Exception_Exception("Unsupported number of arguments for wrapped closure")); + }, + convertDartClosureToJS: function(closure, arity) { + var $function; + if (closure == null) + return; + $function = closure.$identity; + if (!!$function) + return $function; + $function = function(closure, arity, context, invoke) { + return function(a1, a2, a3, a4) { + return invoke(closure, context, arity, a1, a2, a3, a4); + }; + }(closure, arity, init.globalState.currentContext, H.invokeClosure); + closure.$identity = $function; + return $function; + }, + Closure_fromTearOff: function(receiver, functions, reflectionInfo, isStatic, jsArguments, propertyName) { + var $function, callName, functionType, $prototype, $constructor, t1, isIntercepted, trampoline, signatureFunction, getReceiver, i, stub, stubCallName, t2; + $function = functions[0]; + callName = $function.$callName; + if (!!J.getInterceptor(reflectionInfo).$isList) { + $function.$reflectionInfo = reflectionInfo; + functionType = H.ReflectionInfo_ReflectionInfo($function).functionType; + } else + functionType = reflectionInfo; + $prototype = isStatic ? Object.create(new H.StaticClosure().constructor.prototype) : Object.create(new H.BoundClosure(null, null, null, null).constructor.prototype); + $prototype.$initialize = $prototype.constructor; + if (isStatic) + $constructor = function() { + this.$initialize(); + }; + else { + t1 = $.Closure_functionCounter; + $.Closure_functionCounter = J.$add$ns(t1, 1); + $constructor = new Function("a,b,c,d" + t1, "this.$initialize(a,b,c,d" + t1 + ")"); + } + $prototype.constructor = $constructor; + $constructor.prototype = $prototype; + if (!isStatic) { + isIntercepted = jsArguments.length == 1 && true; + trampoline = H.Closure_forwardCallTo(receiver, $function, isIntercepted); + trampoline.$reflectionInfo = reflectionInfo; + } else { + $prototype.$static_name = propertyName; + trampoline = $function; + isIntercepted = false; + } + if (typeof functionType == "number") + signatureFunction = function(getType, t) { + return function() { + return getType(t); + }; + }(H.getType, functionType); + else if (typeof functionType == "function") + if (isStatic) + signatureFunction = functionType; + else { + getReceiver = isIntercepted ? H.BoundClosure_receiverOf : H.BoundClosure_selfOf; + signatureFunction = function(f, r) { + return function() { + return f.apply({$receiver: r(this)}, arguments); + }; + }(functionType, getReceiver); + } + else + throw H.wrapException("Error in reflectionInfo."); + $prototype.$signature = signatureFunction; + $prototype[callName] = trampoline; + for (t1 = functions.length, i = 1; i < t1; ++i) { + stub = functions[i]; + stubCallName = stub.$callName; + if (stubCallName != null) { + t2 = isStatic ? stub : H.Closure_forwardCallTo(receiver, stub, isIntercepted); + $prototype[stubCallName] = t2; + } + } + $prototype["call*"] = trampoline; + $prototype.$requiredArgCount = $function.$requiredArgCount; + $prototype.$defaultValues = $function.$defaultValues; + return $constructor; + }, + Closure_cspForwardCall: function(arity, isSuperCall, stubName, $function) { + var getSelf = H.BoundClosure_selfOf; + switch (isSuperCall ? -1 : arity) { + case 0: + return function(n, S) { + return function() { + return S(this)[n](); + }; + }(stubName, getSelf); + case 1: + return function(n, S) { + return function(a) { + return S(this)[n](a); + }; + }(stubName, getSelf); + case 2: + return function(n, S) { + return function(a, b) { + return S(this)[n](a, b); + }; + }(stubName, getSelf); + case 3: + return function(n, S) { + return function(a, b, c) { + return S(this)[n](a, b, c); + }; + }(stubName, getSelf); + case 4: + return function(n, S) { + return function(a, b, c, d) { + return S(this)[n](a, b, c, d); + }; + }(stubName, getSelf); + case 5: + return function(n, S) { + return function(a, b, c, d, e) { + return S(this)[n](a, b, c, d, e); + }; + }(stubName, getSelf); + default: + return function(f, s) { + return function() { + return f.apply(s(this), arguments); + }; + }($function, getSelf); + } + }, + Closure_forwardCallTo: function(receiver, $function, isIntercepted) { + var stubName, arity, lookedUpFunction, t1, t2, selfName, $arguments; + if (isIntercepted) + return H.Closure_forwardInterceptedCallTo(receiver, $function); + stubName = $function.$stubName; + arity = $function.length; + lookedUpFunction = receiver[stubName]; + t1 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction; + t2 = !t1 || arity >= 27; + if (t2) + return H.Closure_cspForwardCall(arity, !t1, stubName, $function); + if (arity === 0) { + t1 = $.Closure_functionCounter; + $.Closure_functionCounter = J.$add$ns(t1, 1); + selfName = "self" + H.S(t1); + t1 = "return function(){var " + selfName + " = this."; + t2 = $.BoundClosure_selfFieldNameCache; + if (t2 == null) { + t2 = H.BoundClosure_computeFieldNamed("self"); + $.BoundClosure_selfFieldNameCache = t2; + } + return new Function(t1 + H.S(t2) + ";return " + selfName + "." + H.S(stubName) + "();}")(); + } + $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(","); + t1 = $.Closure_functionCounter; + $.Closure_functionCounter = J.$add$ns(t1, 1); + $arguments += H.S(t1); + t1 = "return function(" + $arguments + "){return this."; + t2 = $.BoundClosure_selfFieldNameCache; + if (t2 == null) { + t2 = H.BoundClosure_computeFieldNamed("self"); + $.BoundClosure_selfFieldNameCache = t2; + } + return new Function(t1 + H.S(t2) + "." + H.S(stubName) + "(" + $arguments + ");}")(); + }, + Closure_cspForwardInterceptedCall: function(arity, isSuperCall, $name, $function) { + var getSelf, getReceiver; + getSelf = H.BoundClosure_selfOf; + getReceiver = H.BoundClosure_receiverOf; + switch (isSuperCall ? -1 : arity) { + case 0: + throw H.wrapException(new H.RuntimeError("Intercepted function with no arguments.")); + case 1: + return function(n, s, r) { + return function() { + return s(this)[n](r(this)); + }; + }($name, getSelf, getReceiver); + case 2: + return function(n, s, r) { + return function(a) { + return s(this)[n](r(this), a); + }; + }($name, getSelf, getReceiver); + case 3: + return function(n, s, r) { + return function(a, b) { + return s(this)[n](r(this), a, b); + }; + }($name, getSelf, getReceiver); + case 4: + return function(n, s, r) { + return function(a, b, c) { + return s(this)[n](r(this), a, b, c); + }; + }($name, getSelf, getReceiver); + case 5: + return function(n, s, r) { + return function(a, b, c, d) { + return s(this)[n](r(this), a, b, c, d); + }; + }($name, getSelf, getReceiver); + case 6: + return function(n, s, r) { + return function(a, b, c, d, e) { + return s(this)[n](r(this), a, b, c, d, e); + }; + }($name, getSelf, getReceiver); + default: + return function(f, s, r, a) { + return function() { + a = [r(this)]; + Array.prototype.push.apply(a, arguments); + return f.apply(s(this), a); + }; + }($function, getSelf, getReceiver); + } + }, + Closure_forwardInterceptedCallTo: function(receiver, $function) { + var selfField, t1, stubName, arity, lookedUpFunction, t2, t3, $arguments; + selfField = H.BoundClosure_selfFieldName(); + t1 = $.BoundClosure_receiverFieldNameCache; + if (t1 == null) { + t1 = H.BoundClosure_computeFieldNamed("receiver"); + $.BoundClosure_receiverFieldNameCache = t1; + } + stubName = $function.$stubName; + arity = $function.length; + lookedUpFunction = receiver[stubName]; + t2 = $function == null ? lookedUpFunction == null : $function === lookedUpFunction; + t3 = !t2 || arity >= 28; + if (t3) + return H.Closure_cspForwardInterceptedCall(arity, !t2, stubName, $function); + if (arity === 1) { + t1 = "return function(){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + H.S(t1) + ");"; + t2 = $.Closure_functionCounter; + $.Closure_functionCounter = J.$add$ns(t2, 1); + return new Function(t1 + H.S(t2) + "}")(); + } + $arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity - 1).join(","); + t1 = "return function(" + $arguments + "){return this." + H.S(selfField) + "." + H.S(stubName) + "(this." + H.S(t1) + ", " + $arguments + ");"; + t2 = $.Closure_functionCounter; + $.Closure_functionCounter = J.$add$ns(t2, 1); + return new Function(t1 + H.S(t2) + "}")(); + }, + closureFromTearOff: function(receiver, functions, reflectionInfo, isStatic, jsArguments, $name) { + var t1; + functions.fixed$length = Array; + if (!!J.getInterceptor(reflectionInfo).$isList) { + reflectionInfo.fixed$length = Array; + t1 = reflectionInfo; + } else + t1 = reflectionInfo; + return H.Closure_fromTearOff(receiver, functions, t1, !!isStatic, jsArguments, $name); + }, + extractFunctionTypeObjectFrom: function(o) { + var interceptor = J.getInterceptor(o); + return "$signature" in interceptor ? interceptor.$signature() : null; + }, + functionTypeTest: function(value, functionTypeRti) { + var functionTypeObject; + if (value == null) + return false; + functionTypeObject = H.extractFunctionTypeObjectFrom(value); + return functionTypeObject == null ? false : H.isFunctionSubtype(functionTypeObject, functionTypeRti); + }, + throwCyclicInit: function(staticName) { + throw H.wrapException(new P.CyclicInitializationError(staticName)); + }, + random64: function() { + return (Math.random() * 0x100000000 >>> 0) + (Math.random() * 0x100000000 >>> 0) * 4294967296; + }, + getIsolateAffinityTag: function($name) { + return init.getIsolateTag($name); + }, + setRuntimeTypeInfo: function(target, rti) { + target.$ti = rti; + return target; + }, + getRuntimeTypeInfo: function(target) { + if (target == null) + return; + return target.$ti; + }, + getRuntimeTypeArguments: function(target, substitutionName) { + return H.substitute(target["$as" + H.S(substitutionName)], H.getRuntimeTypeInfo(target)); + }, + getRuntimeTypeArgument: function(target, substitutionName, index) { + var $arguments = H.getRuntimeTypeArguments(target, substitutionName); + return $arguments == null ? null : $arguments[index]; + }, + getTypeArgumentByIndex: function(target, index) { + var rti = H.getRuntimeTypeInfo(target); + return rti == null ? null : rti[index]; + }, + runtimeTypeToString: function(rti, onTypeVariable) { + var typedefInfo; + if (rti == null) + return "dynamic"; + if (typeof rti === "object" && rti !== null && rti.constructor === Array) + return rti[0].builtin$cls + H.joinArguments(rti, 1, onTypeVariable); + if (typeof rti == "function") + return rti.builtin$cls; + if (typeof rti === "number" && Math.floor(rti) === rti) + return H.S(rti); + if (typeof rti.func != "undefined") { + typedefInfo = rti.typedef; + if (typedefInfo != null) + return H.runtimeTypeToString(typedefInfo, onTypeVariable); + return H._functionRtiToString(rti, onTypeVariable); + } + return "unknown-reified-type"; + }, + _functionRtiToString: function(rti, onTypeVariable) { + var returnTypeText, $arguments, t1, argumentsText, sep, _i, argument, optionalArguments, namedArguments, t2, $name; + returnTypeText = !!rti.v ? "void" : H.runtimeTypeToString(rti.ret, onTypeVariable); + if ("args" in rti) { + $arguments = rti.args; + for (t1 = $arguments.length, argumentsText = "", sep = "", _i = 0; _i < t1; ++_i, sep = ", ") { + argument = $arguments[_i]; + argumentsText = argumentsText + sep + H.runtimeTypeToString(argument, onTypeVariable); + } + } else { + argumentsText = ""; + sep = ""; + } + if ("opt" in rti) { + optionalArguments = rti.opt; + argumentsText += sep + "["; + for (t1 = optionalArguments.length, sep = "", _i = 0; _i < t1; ++_i, sep = ", ") { + argument = optionalArguments[_i]; + argumentsText = argumentsText + sep + H.runtimeTypeToString(argument, onTypeVariable); + } + argumentsText += "]"; + } + if ("named" in rti) { + namedArguments = rti.named; + argumentsText += sep + "{"; + for (t1 = H.extractKeys(namedArguments), t2 = t1.length, sep = "", _i = 0; _i < t2; ++_i, sep = ", ") { + $name = t1[_i]; + argumentsText = argumentsText + sep + H.runtimeTypeToString(namedArguments[$name], onTypeVariable) + (" " + H.S($name)); + } + argumentsText += "}"; + } + return "(" + argumentsText + ") => " + returnTypeText; + }, + joinArguments: function(types, startIndex, onTypeVariable) { + var buffer, index, firstArgument, allDynamic, t1, argument; + if (types == null) + return ""; + buffer = new P.StringBuffer(""); + for (index = startIndex, firstArgument = true, allDynamic = true, t1 = ""; index < types.length; ++index) { + if (firstArgument) + firstArgument = false; + else + buffer._contents = t1 + ", "; + argument = types[index]; + if (argument != null) + allDynamic = false; + t1 = buffer._contents += H.runtimeTypeToString(argument, onTypeVariable); + } + return allDynamic ? "" : "<" + buffer.toString$0(0) + ">"; + }, + substitute: function(substitution, $arguments) { + if (substitution == null) + return $arguments; + substitution = substitution.apply(null, $arguments); + if (substitution == null) + return; + if (typeof substitution === "object" && substitution !== null && substitution.constructor === Array) + return substitution; + if (typeof substitution == "function") + return substitution.apply(null, $arguments); + return $arguments; + }, + checkSubtype: function(object, isField, checks, asField) { + var $arguments, interceptor; + if (object == null) + return false; + $arguments = H.getRuntimeTypeInfo(object); + interceptor = J.getInterceptor(object); + if (interceptor[isField] == null) + return false; + return H.areSubtypes(H.substitute(interceptor[asField], $arguments), checks); + }, + areSubtypes: function(s, t) { + var len, i; + if (s == null || t == null) + return true; + len = s.length; + for (i = 0; i < len; ++i) + if (!H.isSubtype(s[i], t[i])) + return false; + return true; + }, + computeSignature: function(signature, context, contextName) { + return signature.apply(context, H.getRuntimeTypeArguments(context, contextName)); + }, + isSubtype: function(s, t) { + var t1, typeOfS, t2, typeOfT, typeOfTString, substitution; + if (s === t) + return true; + if (s == null || t == null) + return true; + if (s.builtin$cls === "Null") + return true; + if ('func' in t) + return H.isFunctionSubtype(s, t); + if ('func' in s) + return t.builtin$cls === "Function" || t.builtin$cls === "Object"; + t1 = typeof s === "object" && s !== null && s.constructor === Array; + typeOfS = t1 ? s[0] : s; + t2 = typeof t === "object" && t !== null && t.constructor === Array; + typeOfT = t2 ? t[0] : t; + if (typeOfT !== typeOfS) { + typeOfTString = H.runtimeTypeToString(typeOfT, null); + if (!('$is' + typeOfTString in typeOfS.prototype)) + return false; + substitution = typeOfS.prototype["$as" + typeOfTString]; + } else + substitution = null; + if (!t1 && substitution == null || !t2) + return true; + t1 = t1 ? s.slice(1) : null; + t2 = t.slice(1); + return H.areSubtypes(H.substitute(substitution, t1), t2); + }, + areAssignable: function(s, t, allowShorter) { + var t1, sLength, tLength, i, t2; + t1 = t == null; + if (t1 && s == null) + return true; + if (t1) + return allowShorter; + if (s == null) + return false; + sLength = s.length; + tLength = t.length; + if (allowShorter) { + if (sLength < tLength) + return false; + } else if (sLength !== tLength) + return false; + for (i = 0; i < tLength; ++i) { + t1 = s[i]; + t2 = t[i]; + if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) + return false; + } + return true; + }, + areAssignableMaps: function(s, t) { + var t1, names, i, $name, tType, sType; + if (t == null) + return true; + if (s == null) + return false; + t1 = Object.getOwnPropertyNames(t); + t1.fixed$length = Array; + names = t1; + for (t1 = names.length, i = 0; i < t1; ++i) { + $name = names[i]; + if (!Object.hasOwnProperty.call(s, $name)) + return false; + tType = t[$name]; + sType = s[$name]; + if (!(H.isSubtype(tType, sType) || H.isSubtype(sType, tType))) + return false; + } + return true; + }, + isFunctionSubtype: function(s, t) { + var sReturnType, tReturnType, sParameterTypes, tParameterTypes, sOptionalParameterTypes, tOptionalParameterTypes, sParametersLen, tParametersLen, sOptionalParametersLen, tOptionalParametersLen, pos, t1, t2, tPos, sPos; + if (!('func' in s)) + return false; + if ("v" in s) { + if (!("v" in t) && "ret" in t) + return false; + } else if (!("v" in t)) { + sReturnType = s.ret; + tReturnType = t.ret; + if (!(H.isSubtype(sReturnType, tReturnType) || H.isSubtype(tReturnType, sReturnType))) + return false; + } + sParameterTypes = s.args; + tParameterTypes = t.args; + sOptionalParameterTypes = s.opt; + tOptionalParameterTypes = t.opt; + sParametersLen = sParameterTypes != null ? sParameterTypes.length : 0; + tParametersLen = tParameterTypes != null ? tParameterTypes.length : 0; + sOptionalParametersLen = sOptionalParameterTypes != null ? sOptionalParameterTypes.length : 0; + tOptionalParametersLen = tOptionalParameterTypes != null ? tOptionalParameterTypes.length : 0; + if (sParametersLen > tParametersLen) + return false; + if (sParametersLen + sOptionalParametersLen < tParametersLen + tOptionalParametersLen) + return false; + if (sParametersLen === tParametersLen) { + if (!H.areAssignable(sParameterTypes, tParameterTypes, false)) + return false; + if (!H.areAssignable(sOptionalParameterTypes, tOptionalParameterTypes, true)) + return false; + } else { + for (pos = 0; pos < sParametersLen; ++pos) { + t1 = sParameterTypes[pos]; + t2 = tParameterTypes[pos]; + if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) + return false; + } + for (tPos = pos, sPos = 0; tPos < tParametersLen; ++sPos, ++tPos) { + t1 = sOptionalParameterTypes[sPos]; + t2 = tParameterTypes[tPos]; + if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) + return false; + } + for (tPos = 0; tPos < tOptionalParametersLen; ++sPos, ++tPos) { + t1 = sOptionalParameterTypes[sPos]; + t2 = tOptionalParameterTypes[tPos]; + if (!(H.isSubtype(t1, t2) || H.isSubtype(t2, t1))) + return false; + } + } + return H.areAssignableMaps(s.named, t.named); + }, + toStringForNativeObject: function(obj) { + var t1 = $.getTagFunction; + return "Instance of " + (t1 == null ? "" : t1.call$1(obj)); + }, + hashCodeForNativeObject: function(object) { + return H.Primitives_objectHashCode(object); + }, + defineProperty: function(obj, property, value) { + Object.defineProperty(obj, property, {value: value, enumerable: false, writable: true, configurable: true}); + }, + lookupAndCacheInterceptor: function(obj) { + var tag, record, interceptor, interceptorClass, mark, t1; + tag = $.getTagFunction.call$1(obj); + record = $.dispatchRecordsForInstanceTags[tag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + interceptor = $.interceptorsForUncacheableTags[tag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[tag]; + if (interceptorClass == null) { + tag = $.alternateTagFunction.call$2(obj, tag); + if (tag != null) { + record = $.dispatchRecordsForInstanceTags[tag]; + if (record != null) { + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + interceptor = $.interceptorsForUncacheableTags[tag]; + if (interceptor != null) + return interceptor; + interceptorClass = init.interceptorsByTag[tag]; + } + } + if (interceptorClass == null) + return; + interceptor = interceptorClass.prototype; + mark = tag[0]; + if (mark === "!") { + record = H.makeLeafDispatchRecord(interceptor); + $.dispatchRecordsForInstanceTags[tag] = record; + Object.defineProperty(obj, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + return record.i; + } + if (mark === "~") { + $.interceptorsForUncacheableTags[tag] = interceptor; + return interceptor; + } + if (mark === "-") { + t1 = H.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } + if (mark === "+") + return H.patchInteriorProto(obj, interceptor); + if (mark === "*") + throw H.wrapException(new P.UnimplementedError(tag)); + if (init.leafTags[tag] === true) { + t1 = H.makeLeafDispatchRecord(interceptor); + Object.defineProperty(Object.getPrototypeOf(obj), init.dispatchPropertyName, {value: t1, enumerable: false, writable: true, configurable: true}); + return t1.i; + } else + return H.patchInteriorProto(obj, interceptor); + }, + patchInteriorProto: function(obj, interceptor) { + var proto = Object.getPrototypeOf(obj); + Object.defineProperty(proto, init.dispatchPropertyName, {value: J.makeDispatchRecord(interceptor, proto, null, null), enumerable: false, writable: true, configurable: true}); + return interceptor; + }, + makeLeafDispatchRecord: function(interceptor) { + return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); + }, + makeDefaultDispatchRecord: function(tag, interceptorClass, proto) { + var interceptor = interceptorClass.prototype; + if (init.leafTags[tag] === true) + return J.makeDispatchRecord(interceptor, false, null, !!interceptor.$isJavaScriptIndexingBehavior); + else + return J.makeDispatchRecord(interceptor, proto, null, null); + }, + initNativeDispatch: function() { + if (true === $.initNativeDispatchFlag) + return; + $.initNativeDispatchFlag = true; + H.initNativeDispatchContinue(); + }, + initNativeDispatchContinue: function() { + var map, tags, fun, i, tag, proto, record, interceptorClass; + $.dispatchRecordsForInstanceTags = Object.create(null); + $.interceptorsForUncacheableTags = Object.create(null); + H.initHooks(); + map = init.interceptorsByTag; + tags = Object.getOwnPropertyNames(map); + if (typeof window != "undefined") { + window; + fun = function() { + }; + for (i = 0; i < tags.length; ++i) { + tag = tags[i]; + proto = $.prototypeForTagFunction.call$1(tag); + if (proto != null) { + record = H.makeDefaultDispatchRecord(tag, map[tag], proto); + if (record != null) { + Object.defineProperty(proto, init.dispatchPropertyName, {value: record, enumerable: false, writable: true, configurable: true}); + fun.prototype = proto; + } + } + } + } + for (i = 0; i < tags.length; ++i) { + tag = tags[i]; + if (/^[A-Za-z_]/.test(tag)) { + interceptorClass = map[tag]; + map["!" + tag] = interceptorClass; + map["~" + tag] = interceptorClass; + map["-" + tag] = interceptorClass; + map["+" + tag] = interceptorClass; + map["*" + tag] = interceptorClass; + } + } + }, + initHooks: function() { + var hooks, transformers, i, transformer, getTag, getUnknownTag, prototypeForTag; + hooks = C.JS_CONST_bDt(); + hooks = H.applyHooksTransformer(C.JS_CONST_0, H.applyHooksTransformer(C.JS_CONST_rr7, H.applyHooksTransformer(C.JS_CONST_Fs4, H.applyHooksTransformer(C.JS_CONST_Fs4, H.applyHooksTransformer(C.JS_CONST_gkc, H.applyHooksTransformer(C.JS_CONST_4hp, H.applyHooksTransformer(C.JS_CONST_QJm(C.JS_CONST_u2C), hooks))))))); + if (typeof dartNativeDispatchHooksTransformer != "undefined") { + transformers = dartNativeDispatchHooksTransformer; + if (typeof transformers == "function") + transformers = [transformers]; + if (transformers.constructor == Array) + for (i = 0; i < transformers.length; ++i) { + transformer = transformers[i]; + if (typeof transformer == "function") + hooks = transformer(hooks) || hooks; + } + } + getTag = hooks.getTag; + getUnknownTag = hooks.getUnknownTag; + prototypeForTag = hooks.prototypeForTag; + $.getTagFunction = new H.initHooks_closure(getTag); + $.alternateTagFunction = new H.initHooks_closure0(getUnknownTag); + $.prototypeForTagFunction = new H.initHooks_closure1(prototypeForTag); + }, + applyHooksTransformer: function(transformer, hooks) { + return transformer(hooks) || hooks; + }, + ReflectionInfo: { + "^": "Object;jsFunction,data,isAccessor,requiredParameterCount,optionalParameterCount,areOptionalParametersNamed,functionType,cachedSortedIndices", + static: { + ReflectionInfo_ReflectionInfo: function(jsFunction) { + var data, requiredParametersInfo, optionalParametersInfo; + data = jsFunction.$reflectionInfo; + if (data == null) + return; + data.fixed$length = Array; + data = data; + requiredParametersInfo = data[0]; + optionalParametersInfo = data[1]; + return new H.ReflectionInfo(jsFunction, data, (requiredParametersInfo & 1) === 1, requiredParametersInfo >> 1, optionalParametersInfo >> 1, (optionalParametersInfo & 1) === 1, data[2], null); + } + } + }, + TypeErrorDecoder: { + "^": "Object;_pattern,_arguments,_argumentsExpr,_expr,_method,_receiver", + matchTypeError$1: function(message) { + var match, result, t1; + match = new RegExp(this._pattern).exec(message); + if (match == null) + return; + result = Object.create(null); + t1 = this._arguments; + if (t1 !== -1) + result.arguments = match[t1 + 1]; + t1 = this._argumentsExpr; + if (t1 !== -1) + result.argumentsExpr = match[t1 + 1]; + t1 = this._expr; + if (t1 !== -1) + result.expr = match[t1 + 1]; + t1 = this._method; + if (t1 !== -1) + result.method = match[t1 + 1]; + t1 = this._receiver; + if (t1 !== -1) + result.receiver = match[t1 + 1]; + return result; + }, + static: { + TypeErrorDecoder_extractPattern: function(message) { + var match, $arguments, argumentsExpr, expr, method, receiver; + message = message.replace(String({}), '$receiver$').replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"); + match = message.match(/\\\$[a-zA-Z]+\\\$/g); + if (match == null) + match = []; + $arguments = match.indexOf("\\$arguments\\$"); + argumentsExpr = match.indexOf("\\$argumentsExpr\\$"); + expr = match.indexOf("\\$expr\\$"); + method = match.indexOf("\\$method\\$"); + receiver = match.indexOf("\\$receiver\\$"); + return new H.TypeErrorDecoder(message.replace(new RegExp('\\\\\\$arguments\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$', 'g'), '((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$', 'g'), '((?:x|[^x])*)'), $arguments, argumentsExpr, expr, method, receiver); + }, + TypeErrorDecoder_provokeCallErrorOn: function(expression) { + return function($expr$) { + var $argumentsExpr$ = '$arguments$'; + try { + $expr$.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }(expression); + }, + TypeErrorDecoder_provokePropertyErrorOn: function(expression) { + return function($expr$) { + try { + $expr$.$method$; + } catch (e) { + return e.message; + } + }(expression); + } + } + }, + NullError: { + "^": "Error;_message,_method", + toString$0: function(_) { + var t1 = this._method; + if (t1 == null) + return "NullError: " + H.S(this._message); + return "NullError: method not found: '" + H.S(t1) + "' on null"; + } + }, + JsNoSuchMethodError: { + "^": "Error;_message,_method,_receiver", + toString$0: function(_) { + var t1, t2; + t1 = this._method; + if (t1 == null) + return "NoSuchMethodError: " + H.S(this._message); + t2 = this._receiver; + if (t2 == null) + return "NoSuchMethodError: method not found: '" + t1 + "' (" + H.S(this._message) + ")"; + return "NoSuchMethodError: method not found: '" + t1 + "' on '" + t2 + "' (" + H.S(this._message) + ")"; + }, + static: { + JsNoSuchMethodError$: function(_message, match) { + var t1, t2; + t1 = match == null; + t2 = t1 ? null : match.method; + return new H.JsNoSuchMethodError(_message, t2, t1 ? null : match.receiver); + } + } + }, + UnknownJsTypeError: { + "^": "Error;_message", + toString$0: function(_) { + var t1 = this._message; + return t1.length === 0 ? "Error" : "Error: " + t1; + } + }, + unwrapException_saveStackTrace: { + "^": "Closure:1;ex", + call$1: function(error) { + if (!!J.getInterceptor(error).$isError) + if (error.$thrownJsError == null) + error.$thrownJsError = this.ex; + return error; + } + }, + _StackTrace: { + "^": "Object;_exception,_trace", + toString$0: function(_) { + var t1, trace; + t1 = this._trace; + if (t1 != null) + return t1; + t1 = this._exception; + trace = t1 !== null && typeof t1 === "object" ? t1.stack : null; + t1 = trace == null ? "" : trace; + this._trace = t1; + return t1; + } + }, + invokeClosure_closure: { + "^": "Closure:0;closure", + call$0: function() { + return this.closure.call$0(); + } + }, + invokeClosure_closure0: { + "^": "Closure:0;closure,arg1", + call$0: function() { + return this.closure.call$1(this.arg1); + } + }, + invokeClosure_closure1: { + "^": "Closure:0;closure,arg1,arg2", + call$0: function() { + return this.closure.call$2(this.arg1, this.arg2); + } + }, + invokeClosure_closure2: { + "^": "Closure:0;closure,arg1,arg2,arg3", + call$0: function() { + return this.closure.call$3(this.arg1, this.arg2, this.arg3); + } + }, + invokeClosure_closure3: { + "^": "Closure:0;closure,arg1,arg2,arg3,arg4", + call$0: function() { + return this.closure.call$4(this.arg1, this.arg2, this.arg3, this.arg4); + } + }, + Closure: { + "^": "Object;", + toString$0: function(_) { + return "Closure '" + H.Primitives_objectTypeName(this).trim() + "'"; + }, + get$$call: function() { + return this; + }, + get$$call: function() { + return this; + } + }, + TearOffClosure: { + "^": "Closure;" + }, + StaticClosure: { + "^": "TearOffClosure;", + toString$0: function(_) { + var $name = this.$static_name; + if ($name == null) + return "Closure of unknown static method"; + return "Closure '" + $name + "'"; + } + }, + BoundClosure: { + "^": "TearOffClosure;_self,_target,_receiver,_name", + $eq: function(_, other) { + if (other == null) + return false; + if (this === other) + return true; + if (!(other instanceof H.BoundClosure)) + return false; + return this._self === other._self && this._target === other._target && this._receiver === other._receiver; + }, + get$hashCode: function(_) { + var t1, receiverHashCode; + t1 = this._receiver; + if (t1 == null) + receiverHashCode = H.Primitives_objectHashCode(this._self); + else + receiverHashCode = typeof t1 !== "object" ? J.get$hashCode$(t1) : H.Primitives_objectHashCode(t1); + t1 = H.Primitives_objectHashCode(this._target); + if (typeof receiverHashCode !== "number") + return receiverHashCode.$xor(); + return (receiverHashCode ^ t1) >>> 0; + }, + toString$0: function(_) { + var receiver = this._receiver; + if (receiver == null) + receiver = this._self; + return "Closure '" + H.S(this._name) + "' of " + H.Primitives_objectToHumanReadableString(receiver); + }, + static: { + BoundClosure_selfOf: function(closure) { + return closure._self; + }, + BoundClosure_receiverOf: function(closure) { + return closure._receiver; + }, + BoundClosure_selfFieldName: function() { + var t1 = $.BoundClosure_selfFieldNameCache; + if (t1 == null) { + t1 = H.BoundClosure_computeFieldNamed("self"); + $.BoundClosure_selfFieldNameCache = t1; + } + return t1; + }, + BoundClosure_computeFieldNamed: function(fieldName) { + var template, t1, names, i, $name; + template = new H.BoundClosure("self", "target", "receiver", "name"); + t1 = Object.getOwnPropertyNames(template); + t1.fixed$length = Array; + names = t1; + for (t1 = names.length, i = 0; i < t1; ++i) { + $name = names[i]; + if (template[$name] === fieldName) + return $name; + } + } + } + }, + RuntimeError: { + "^": "Error;message", + toString$0: function(_) { + return "RuntimeError: " + H.S(this.message); + } + }, + JsLinkedHashMap: { + "^": "Object;_length,_strings,_nums,_rest,_first,_last,_modifications,$ti", + get$length: function(_) { + return this._length; + }, + get$isEmpty: function(_) { + return this._length === 0; + }, + get$keys: function() { + return new H.LinkedHashMapKeyIterable(this, [H.getTypeArgumentByIndex(this, 0)]); + }, + get$values: function(_) { + return H.MappedIterable_MappedIterable(this.get$keys(), new H.JsLinkedHashMap_values_closure(this), H.getTypeArgumentByIndex(this, 0), H.getTypeArgumentByIndex(this, 1)); + }, + containsKey$1: function(key) { + var strings, nums; + if (typeof key === "string") { + strings = this._strings; + if (strings == null) + return false; + return this._containsTableEntry$2(strings, key); + } else if (typeof key === "number" && (key & 0x3ffffff) === key) { + nums = this._nums; + if (nums == null) + return false; + return this._containsTableEntry$2(nums, key); + } else + return this.internalContainsKey$1(key); + }, + internalContainsKey$1: function(key) { + var rest = this._rest; + if (rest == null) + return false; + return this.internalFindBucketIndex$2(this._getTableBucket$2(rest, this.internalComputeHashCode$1(key)), key) >= 0; + }, + $index: function(_, key) { + var strings, cell, nums; + if (typeof key === "string") { + strings = this._strings; + if (strings == null) + return; + cell = this._getTableCell$2(strings, key); + return cell == null ? null : cell.get$hashMapCellValue(); + } else if (typeof key === "number" && (key & 0x3ffffff) === key) { + nums = this._nums; + if (nums == null) + return; + cell = this._getTableCell$2(nums, key); + return cell == null ? null : cell.get$hashMapCellValue(); + } else + return this.internalGet$1(key); + }, + internalGet$1: function(key) { + var rest, bucket, index; + rest = this._rest; + if (rest == null) + return; + bucket = this._getTableBucket$2(rest, this.internalComputeHashCode$1(key)); + index = this.internalFindBucketIndex$2(bucket, key); + if (index < 0) + return; + return bucket[index].get$hashMapCellValue(); + }, + $indexSet: function(_, key, value) { + var strings, nums, rest, hash, bucket, index; + if (typeof key === "string") { + strings = this._strings; + if (strings == null) { + strings = this._newHashTable$0(); + this._strings = strings; + } + this._addHashTableEntry$3(strings, key, value); + } else if (typeof key === "number" && (key & 0x3ffffff) === key) { + nums = this._nums; + if (nums == null) { + nums = this._newHashTable$0(); + this._nums = nums; + } + this._addHashTableEntry$3(nums, key, value); + } else { + rest = this._rest; + if (rest == null) { + rest = this._newHashTable$0(); + this._rest = rest; + } + hash = this.internalComputeHashCode$1(key); + bucket = this._getTableBucket$2(rest, hash); + if (bucket == null) + this._setTableEntry$3(rest, hash, [this._newLinkedCell$2(key, value)]); + else { + index = this.internalFindBucketIndex$2(bucket, key); + if (index >= 0) + bucket[index].set$hashMapCellValue(value); + else + bucket.push(this._newLinkedCell$2(key, value)); + } + } + }, + remove$1: function(_, key) { + if (typeof key === "string") + return this._removeHashTableEntry$2(this._strings, key); + else if (typeof key === "number" && (key & 0x3ffffff) === key) + return this._removeHashTableEntry$2(this._nums, key); + else + return this.internalRemove$1(key); + }, + internalRemove$1: function(key) { + var rest, bucket, index, cell; + rest = this._rest; + if (rest == null) + return; + bucket = this._getTableBucket$2(rest, this.internalComputeHashCode$1(key)); + index = this.internalFindBucketIndex$2(bucket, key); + if (index < 0) + return; + cell = bucket.splice(index, 1)[0]; + this._unlinkCell$1(cell); + return cell.get$hashMapCellValue(); + }, + clear$0: function(_) { + if (this._length > 0) { + this._last = null; + this._first = null; + this._rest = null; + this._nums = null; + this._strings = null; + this._length = 0; + this._modifications = this._modifications + 1 & 67108863; + } + }, + forEach$1: function(_, action) { + var cell, modifications; + cell = this._first; + modifications = this._modifications; + for (; cell != null;) { + action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); + if (modifications !== this._modifications) + throw H.wrapException(new P.ConcurrentModificationError(this)); + cell = cell._next; + } + }, + _addHashTableEntry$3: function(table, key, value) { + var cell = this._getTableCell$2(table, key); + if (cell == null) + this._setTableEntry$3(table, key, this._newLinkedCell$2(key, value)); + else + cell.set$hashMapCellValue(value); + }, + _removeHashTableEntry$2: function(table, key) { + var cell; + if (table == null) + return; + cell = this._getTableCell$2(table, key); + if (cell == null) + return; + this._unlinkCell$1(cell); + this._deleteTableEntry$2(table, key); + return cell.get$hashMapCellValue(); + }, + _newLinkedCell$2: function(key, value) { + var cell, last; + cell = new H.LinkedHashMapCell(key, value, null, null); + if (this._first == null) { + this._last = cell; + this._first = cell; + } else { + last = this._last; + cell._previous = last; + last._next = cell; + this._last = cell; + } + ++this._length; + this._modifications = this._modifications + 1 & 67108863; + return cell; + }, + _unlinkCell$1: function(cell) { + var previous, next; + previous = cell.get$_previous(); + next = cell._next; + if (previous == null) + this._first = next; + else + previous._next = next; + if (next == null) + this._last = previous; + else + next._previous = previous; + --this._length; + this._modifications = this._modifications + 1 & 67108863; + }, + internalComputeHashCode$1: function(key) { + return J.get$hashCode$(key) & 0x3ffffff; + }, + internalFindBucketIndex$2: function(bucket, key) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i].get$hashMapCellKey(), key)) + return i; + return -1; + }, + toString$0: function(_) { + return P.Maps_mapToString(this); + }, + _getTableCell$2: function(table, key) { + return table[key]; + }, + _getTableBucket$2: function(table, key) { + return table[key]; + }, + _setTableEntry$3: function(table, key, value) { + table[key] = value; + }, + _deleteTableEntry$2: function(table, key) { + delete table[key]; + }, + _containsTableEntry$2: function(table, key) { + return this._getTableCell$2(table, key) != null; + }, + _newHashTable$0: function() { + var table = Object.create(null); + this._setTableEntry$3(table, "", table); + this._deleteTableEntry$2(table, ""); + return table; + }, + $isInternalMap: 1, + $isMap: 1 + }, + JsLinkedHashMap_values_closure: { + "^": "Closure:1;$this", + call$1: function(each) { + return this.$this.$index(0, each); + } + }, + LinkedHashMapCell: { + "^": "Object;hashMapCellKey<,hashMapCellValue@,_next,_previous<" + }, + LinkedHashMapKeyIterable: { + "^": "EfficientLengthIterable;_map,$ti", + get$length: function(_) { + return this._map._length; + }, + get$iterator: function(_) { + var t1, t2; + t1 = this._map; + t2 = new H.LinkedHashMapKeyIterator(t1, t1._modifications, null, null); + t2._cell = t1._first; + return t2; + }, + forEach$1: function(_, f) { + var t1, cell, modifications; + t1 = this._map; + cell = t1._first; + modifications = t1._modifications; + for (; cell != null;) { + f.call$1(cell.hashMapCellKey); + if (modifications !== t1._modifications) + throw H.wrapException(new P.ConcurrentModificationError(t1)); + cell = cell._next; + } + } + }, + LinkedHashMapKeyIterator: { + "^": "Object;_map,_modifications,_cell,_current", + get$current: function() { + return this._current; + }, + moveNext$0: function() { + var t1 = this._map; + if (this._modifications !== t1._modifications) + throw H.wrapException(new P.ConcurrentModificationError(t1)); + else { + t1 = this._cell; + if (t1 == null) { + this._current = null; + return false; + } else { + this._current = t1.hashMapCellKey; + this._cell = t1._next; + return true; + } + } + } + }, + initHooks_closure: { + "^": "Closure:1;getTag", + call$1: function(o) { + return this.getTag(o); + } + }, + initHooks_closure0: { + "^": "Closure:6;getUnknownTag", + call$2: function(o, tag) { + return this.getUnknownTag(o, tag); + } + }, + initHooks_closure1: { + "^": "Closure:7;prototypeForTag", + call$1: function(tag) { + return this.prototypeForTag(tag); + } + } + }], ["dart._js_names", "dart:_js_names",, H, { + "^": "", + extractKeys: function(victim) { + var t1 = H.setRuntimeTypeInfo(victim ? Object.keys(victim) : [], [null]); + t1.fixed$length = Array; + return t1; + } + }], ["dart2js._js_primitives", "dart:_js_primitives",, H, { + "^": "", + printString: function(string) { + if (typeof dartPrint == "function") { + dartPrint(string); + return; + } + if (typeof console == "object" && typeof console.log != "undefined") { + console.log(string); + return; + } + if (typeof window == "object") + return; + if (typeof print == "function") { + print(string); + return; + } + throw "Unable to print message: " + String(string); + } + }], ["dart.typed_data.implementation", "dart:_native_typed_data",, H, { + "^": "", + NativeByteBuffer: { + "^": "Interceptor;", + $isNativeByteBuffer: 1, + "%": "ArrayBuffer" + }, + NativeTypedData: { + "^": "Interceptor;", + $isNativeTypedData: 1, + "%": "DataView;ArrayBufferView;NativeTypedArray|NativeTypedArray_ListMixin|NativeTypedArray_ListMixin_FixedLengthListMixin|NativeTypedArrayOfDouble|NativeTypedArray_ListMixin0|NativeTypedArray_ListMixin_FixedLengthListMixin0|NativeTypedArrayOfInt" + }, + NativeTypedArray: { + "^": "NativeTypedData;", + get$length: function(receiver) { + return receiver.length; + }, + $isJavaScriptIndexingBehavior: 1, + $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull, + $isJSIndexable: 1, + $asJSIndexable: Isolate.functionThatReturnsNull + }, + NativeTypedArrayOfDouble: { + "^": "NativeTypedArray_ListMixin_FixedLengthListMixin;", + $index: function(receiver, index) { + if (index >>> 0 !== index || index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $indexSet: function(receiver, index, value) { + if (index >>> 0 !== index || index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + receiver[index] = value; + } + }, + NativeTypedArray_ListMixin: { + "^": "NativeTypedArray+ListMixin;", + $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull, + $asJSIndexable: Isolate.functionThatReturnsNull, + $asList: function() { + return [P.double]; + }, + $asEfficientLengthIterable: function() { + return [P.double]; + }, + $isList: 1, + $isEfficientLengthIterable: 1 + }, + NativeTypedArray_ListMixin_FixedLengthListMixin: { + "^": "NativeTypedArray_ListMixin+FixedLengthListMixin;", + $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull, + $asJSIndexable: Isolate.functionThatReturnsNull, + $asList: function() { + return [P.double]; + }, + $asEfficientLengthIterable: function() { + return [P.double]; + } + }, + NativeTypedArrayOfInt: { + "^": "NativeTypedArray_ListMixin_FixedLengthListMixin0;", + $indexSet: function(receiver, index, value) { + if (index >>> 0 !== index || index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + receiver[index] = value; + }, + $isList: 1, + $asList: function() { + return [P.int]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [P.int]; + } + }, + NativeTypedArray_ListMixin0: { + "^": "NativeTypedArray+ListMixin;", + $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull, + $asJSIndexable: Isolate.functionThatReturnsNull, + $asList: function() { + return [P.int]; + }, + $asEfficientLengthIterable: function() { + return [P.int]; + }, + $isList: 1, + $isEfficientLengthIterable: 1 + }, + NativeTypedArray_ListMixin_FixedLengthListMixin0: { + "^": "NativeTypedArray_ListMixin0+FixedLengthListMixin;", + $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull, + $asJSIndexable: Isolate.functionThatReturnsNull, + $asList: function() { + return [P.int]; + }, + $asEfficientLengthIterable: function() { + return [P.int]; + } + }, + NativeFloat32List: { + "^": "NativeTypedArrayOfDouble;", + $isList: 1, + $asList: function() { + return [P.double]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [P.double]; + }, + "%": "Float32Array" + }, + NativeFloat64List: { + "^": "NativeTypedArrayOfDouble;", + $isList: 1, + $asList: function() { + return [P.double]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [P.double]; + }, + "%": "Float64Array" + }, + NativeInt16List: { + "^": "NativeTypedArrayOfInt;", + $index: function(receiver, index) { + if (index >>> 0 !== index || index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $isList: 1, + $asList: function() { + return [P.int]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [P.int]; + }, + "%": "Int16Array" + }, + NativeInt32List: { + "^": "NativeTypedArrayOfInt;", + $index: function(receiver, index) { + if (index >>> 0 !== index || index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $isList: 1, + $asList: function() { + return [P.int]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [P.int]; + }, + "%": "Int32Array" + }, + NativeInt8List: { + "^": "NativeTypedArrayOfInt;", + $index: function(receiver, index) { + if (index >>> 0 !== index || index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $isList: 1, + $asList: function() { + return [P.int]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [P.int]; + }, + "%": "Int8Array" + }, + NativeUint16List: { + "^": "NativeTypedArrayOfInt;", + $index: function(receiver, index) { + if (index >>> 0 !== index || index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $isList: 1, + $asList: function() { + return [P.int]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [P.int]; + }, + "%": "Uint16Array" + }, + NativeUint32List: { + "^": "NativeTypedArrayOfInt;", + $index: function(receiver, index) { + if (index >>> 0 !== index || index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $isList: 1, + $asList: function() { + return [P.int]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [P.int]; + }, + "%": "Uint32Array" + }, + NativeUint8ClampedList: { + "^": "NativeTypedArrayOfInt;", + get$length: function(receiver) { + return receiver.length; + }, + $index: function(receiver, index) { + if (index >>> 0 !== index || index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $isList: 1, + $asList: function() { + return [P.int]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [P.int]; + }, + "%": "CanvasPixelArray|Uint8ClampedArray" + }, + NativeUint8List: { + "^": "NativeTypedArrayOfInt;", + get$length: function(receiver) { + return receiver.length; + }, + $index: function(receiver, index) { + if (index >>> 0 !== index || index >= receiver.length) + H.throwExpression(H.diagnoseIndexError(receiver, index)); + return receiver[index]; + }, + $isList: 1, + $asList: function() { + return [P.int]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [P.int]; + }, + "%": ";Uint8Array" + } + }], ["dart.async", "dart:async",, P, { + "^": "", + _AsyncRun__initializeScheduleImmediate: function() { + var t1, div, span; + t1 = {}; + if (self.scheduleImmediate != null) + return P.async__AsyncRun__scheduleImmediateJsOverride$closure(); + if (self.MutationObserver != null && self.document != null) { + div = self.document.createElement("div"); + span = self.document.createElement("span"); + t1.storedCallback = null; + new self.MutationObserver(H.convertDartClosureToJS(new P._AsyncRun__initializeScheduleImmediate_internalCallback(t1), 1)).observe(div, {childList: true}); + return new P._AsyncRun__initializeScheduleImmediate_closure(t1, div, span); + } else if (self.setImmediate != null) + return P.async__AsyncRun__scheduleImmediateWithSetImmediate$closure(); + return P.async__AsyncRun__scheduleImmediateWithTimer$closure(); + }, + _AsyncRun__scheduleImmediateJsOverride: [function(callback) { + ++init.globalState.topEventLoop._activeJsAsyncCount; + self.scheduleImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateJsOverride_internalCallback(callback), 0)); + }, "call$1", "async__AsyncRun__scheduleImmediateJsOverride$closure", 2, 0, 3], + _AsyncRun__scheduleImmediateWithSetImmediate: [function(callback) { + ++init.globalState.topEventLoop._activeJsAsyncCount; + self.setImmediate(H.convertDartClosureToJS(new P._AsyncRun__scheduleImmediateWithSetImmediate_internalCallback(callback), 0)); + }, "call$1", "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", 2, 0, 3], + _AsyncRun__scheduleImmediateWithTimer: [function(callback) { + P.Timer__createTimer(C.Duration_0, callback); + }, "call$1", "async__AsyncRun__scheduleImmediateWithTimer$closure", 2, 0, 3], + _registerErrorHandler: function(errorHandler, zone) { + if (H.functionTypeTest(errorHandler, {func: 1, args: [P.Null, P.Null]})) { + zone.toString; + return errorHandler; + } else { + zone.toString; + return errorHandler; + } + }, + _microtaskLoop: function() { + var t1, t2; + for (; t1 = $._nextCallback, t1 != null;) { + $._lastPriorityCallback = null; + t2 = t1.get$next(); + $._nextCallback = t2; + if (t2 == null) + $._lastCallback = null; + t1.get$callback().call$0(); + } + }, + _startMicrotaskLoop: [function() { + $._isInCallbackLoop = true; + try { + P._microtaskLoop(); + } finally { + $._lastPriorityCallback = null; + $._isInCallbackLoop = false; + if ($._nextCallback != null) + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure()); + } + }, "call$0", "async___startMicrotaskLoop$closure", 0, 0, 2], + _scheduleAsyncCallback: function(callback) { + var newEntry = new P._AsyncCallbackEntry(callback, null); + if ($._nextCallback == null) { + $._lastCallback = newEntry; + $._nextCallback = newEntry; + if (!$._isInCallbackLoop) + $.$get$_AsyncRun__scheduleImmediateClosure().call$1(P.async___startMicrotaskLoop$closure()); + } else { + $._lastCallback.next = newEntry; + $._lastCallback = newEntry; + } + }, + _schedulePriorityAsyncCallback: function(callback) { + var t1, entry, t2; + t1 = $._nextCallback; + if (t1 == null) { + P._scheduleAsyncCallback(callback); + $._lastPriorityCallback = $._lastCallback; + return; + } + entry = new P._AsyncCallbackEntry(callback, null); + t2 = $._lastPriorityCallback; + if (t2 == null) { + entry.next = t1; + $._lastPriorityCallback = entry; + $._nextCallback = entry; + } else { + entry.next = t2.next; + t2.next = entry; + $._lastPriorityCallback = entry; + if (entry.next == null) + $._lastCallback = entry; + } + }, + scheduleMicrotask: function(callback) { + var currentZone = $.Zone__current; + if (C.C__RootZone === currentZone) { + P._rootScheduleMicrotask(null, null, C.C__RootZone, callback); + return; + } + currentZone.toString; + P._rootScheduleMicrotask(null, null, currentZone, currentZone.bindCallback$2$runGuarded(callback, true)); + }, + _runUserCode: function(userCode, onSuccess, onError) { + var e, s, replacement, error, stackTrace, exception, error0; + try { + onSuccess.call$1(userCode.call$0()); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + $.Zone__current.toString; + replacement = null; + if (replacement == null) + onError.call$2(e, s); + else { + error0 = J.get$error$x(replacement); + error = error0; + stackTrace = replacement.get$stackTrace(); + onError.call$2(error, stackTrace); + } + } + }, + _cancelAndError: function(subscription, future, error, stackTrace) { + var cancelFuture = subscription.cancel$0(); + if (!!J.getInterceptor(cancelFuture).$isFuture && cancelFuture !== $.$get$Future__nullFuture()) + cancelFuture.whenComplete$1(new P._cancelAndError_closure(future, error, stackTrace)); + else + future._completeError$2(error, stackTrace); + }, + _cancelAndErrorClosure: function(subscription, future) { + return new P._cancelAndErrorClosure_closure(subscription, future); + }, + _addErrorWithReplacement: function(sink, error, stackTrace) { + $.Zone__current.toString; + sink._addError$2(error, stackTrace); + }, + Timer_Timer: function(duration, callback) { + var t1 = $.Zone__current; + if (t1 === C.C__RootZone) { + t1.toString; + return P.Timer__createTimer(duration, callback); + } + return P.Timer__createTimer(duration, t1.bindCallback$2$runGuarded(callback, true)); + }, + Timer__createTimer: function(duration, callback) { + var milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000); + return H.TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback); + }, + Zone_current: function() { + return $.Zone__current; + }, + _rootHandleUncaughtError: function($self, $parent, zone, error, stackTrace) { + var t1 = {}; + t1.error = error; + P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(t1, stackTrace)); + }, + _rootRun: function($self, $parent, zone, f) { + var old, t1; + t1 = $.Zone__current; + if (t1 === zone) + return f.call$0(); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$0(); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRunUnary: function($self, $parent, zone, f, arg) { + var old, t1; + t1 = $.Zone__current; + if (t1 === zone) + return f.call$1(arg); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$1(arg); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootRunBinary: function($self, $parent, zone, f, arg1, arg2) { + var old, t1; + t1 = $.Zone__current; + if (t1 === zone) + return f.call$2(arg1, arg2); + $.Zone__current = zone; + old = t1; + try { + t1 = f.call$2(arg1, arg2); + return t1; + } finally { + $.Zone__current = old; + } + }, + _rootScheduleMicrotask: function($self, $parent, zone, f) { + var t1 = C.C__RootZone !== zone; + if (t1) + f = zone.bindCallback$2$runGuarded(f, !(!t1 || false)); + P._scheduleAsyncCallback(f); + }, + _AsyncRun__initializeScheduleImmediate_internalCallback: { + "^": "Closure:1;_box_0", + call$1: function(_) { + var t1, f; + --init.globalState.topEventLoop._activeJsAsyncCount; + t1 = this._box_0; + f = t1.storedCallback; + t1.storedCallback = null; + f.call$0(); + } + }, + _AsyncRun__initializeScheduleImmediate_closure: { + "^": "Closure:8;_box_0,div,span", + call$1: function(callback) { + var t1, t2; + ++init.globalState.topEventLoop._activeJsAsyncCount; + this._box_0.storedCallback = callback; + t1 = this.div; + t2 = this.span; + t1.firstChild ? t1.removeChild(t2) : t1.appendChild(t2); + } + }, + _AsyncRun__scheduleImmediateJsOverride_internalCallback: { + "^": "Closure:0;callback", + call$0: function() { + --init.globalState.topEventLoop._activeJsAsyncCount; + this.callback.call$0(); + } + }, + _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: { + "^": "Closure:0;callback", + call$0: function() { + --init.globalState.topEventLoop._activeJsAsyncCount; + this.callback.call$0(); + } + }, + _FutureListener: { + "^": "Object;_nextListener<,result,state,callback,errorCallback", + get$_zone: function() { + return this.result._zone; + }, + get$handlesValue: function() { + return (this.state & 1) !== 0; + }, + get$handlesError: function() { + return (this.state & 2) !== 0; + }, + get$handlesComplete: function() { + return this.state === 8; + }, + handleValue$1: function(sourceResult) { + return this.result._zone.runUnary$2(this.callback, sourceResult); + }, + matchesErrorTest$1: function(asyncError) { + if (this.state !== 6) + return true; + return this.result._zone.runUnary$2(this.callback, J.get$error$x(asyncError)); + }, + handleError$1: function(asyncError) { + var t1, t2, t3; + t1 = this.errorCallback; + t2 = J.getInterceptor$x(asyncError); + t3 = this.result._zone; + if (H.functionTypeTest(t1, {func: 1, args: [,,]})) + return t3.runBinary$3(t1, t2.get$error(asyncError), asyncError.get$stackTrace()); + else + return t3.runUnary$2(t1, t2.get$error(asyncError)); + }, + handleWhenComplete$0: function() { + return this.result._zone.run$1(this.callback); + } + }, + _Future: { + "^": "Object;_state<,_zone,_resultOrListeners<,$ti", + get$_isChained: function() { + return this._state === 2; + }, + get$_isComplete: function() { + return this._state >= 4; + }, + then$2$onError: function(f, onError) { + var currentZone, result; + currentZone = $.Zone__current; + if (currentZone !== C.C__RootZone) { + currentZone.toString; + if (onError != null) + onError = P._registerErrorHandler(onError, currentZone); + } + result = new P._Future(0, currentZone, null, [null]); + this._addListener$1(new P._FutureListener(null, result, onError == null ? 1 : 3, f, onError)); + return result; + }, + then$1: function(f) { + return this.then$2$onError(f, null); + }, + whenComplete$1: function(action) { + var t1, result; + t1 = $.Zone__current; + result = new P._Future(0, t1, null, this.$ti); + if (t1 !== C.C__RootZone) + t1.toString; + this._addListener$1(new P._FutureListener(null, result, 8, action, null)); + return result; + }, + _addListener$1: function(listener) { + var t1, source; + t1 = this._state; + if (t1 <= 1) { + listener._nextListener = this._resultOrListeners; + this._resultOrListeners = listener; + } else { + if (t1 === 2) { + source = this._resultOrListeners; + if (!source.get$_isComplete()) { + source._addListener$1(listener); + return; + } + this._state = source._state; + this._resultOrListeners = source._resultOrListeners; + } + t1 = this._zone; + t1.toString; + P._rootScheduleMicrotask(null, null, t1, new P._Future__addListener_closure(this, listener)); + } + }, + _prependListeners$1: function(listeners) { + var _box_0, t1, existingListeners, cursor, source; + _box_0 = {}; + _box_0.listeners = listeners; + if (listeners == null) + return; + t1 = this._state; + if (t1 <= 1) { + existingListeners = this._resultOrListeners; + this._resultOrListeners = listeners; + if (existingListeners != null) { + for (cursor = listeners; cursor.get$_nextListener() != null;) + cursor = cursor._nextListener; + cursor._nextListener = existingListeners; + } + } else { + if (t1 === 2) { + source = this._resultOrListeners; + if (!source.get$_isComplete()) { + source._prependListeners$1(listeners); + return; + } + this._state = source._state; + this._resultOrListeners = source._resultOrListeners; + } + _box_0.listeners = this._reverseListeners$1(listeners); + t1 = this._zone; + t1.toString; + P._rootScheduleMicrotask(null, null, t1, new P._Future__prependListeners_closure(_box_0, this)); + } + }, + _removeListeners$0: function() { + var current = this._resultOrListeners; + this._resultOrListeners = null; + return this._reverseListeners$1(current); + }, + _reverseListeners$1: function(listeners) { + var current, prev, next; + for (current = listeners, prev = null; current != null; prev = current, current = next) { + next = current.get$_nextListener(); + current._nextListener = prev; + } + return prev; + }, + _complete$1: function(value) { + var t1, listeners; + t1 = this.$ti; + if (H.checkSubtype(value, "$isFuture", t1, "$asFuture")) + if (H.checkSubtype(value, "$is_Future", t1, null)) + P._Future__chainCoreFuture(value, this); + else + P._Future__chainForeignFuture(value, this); + else { + listeners = this._removeListeners$0(); + this._state = 4; + this._resultOrListeners = value; + P._Future__propagateToListeners(this, listeners); + } + }, + _completeError$2: [function(error, stackTrace) { + var listeners = this._removeListeners$0(); + this._state = 8; + this._resultOrListeners = new P.AsyncError(error, stackTrace); + P._Future__propagateToListeners(this, listeners); + }, function(error) { + return this._completeError$2(error, null); + }, "_completeError$1", "call$2", "call$1", "get$_completeError", 2, 2, 9, 0], + _Future$value$1: function(value, $T) { + this._state = 4; + this._resultOrListeners = value; + }, + $isFuture: 1, + static: { + _Future__chainForeignFuture: function(source, target) { + var e, s, exception; + target._state = 1; + try { + source.then$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target)); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(target, e, s)); + } + }, + _Future__chainCoreFuture: function(source, target) { + var t1, current, listeners; + for (; source.get$_isChained();) + source = source._resultOrListeners; + t1 = source.get$_isComplete(); + current = target._resultOrListeners; + if (t1) { + target._resultOrListeners = null; + listeners = target._reverseListeners$1(current); + target._state = source._state; + target._resultOrListeners = source._resultOrListeners; + P._Future__propagateToListeners(target, listeners); + } else { + target._state = 2; + target._resultOrListeners = source; + source._prependListeners$1(current); + } + }, + _Future__propagateToListeners: function(source, listeners) { + var _box_1, t1, _box_0, hasError, asyncError, t2, t3, listeners0, sourceResult, zone, oldZone, result, current; + _box_1 = {}; + _box_1.source = source; + for (t1 = source; true;) { + _box_0 = {}; + hasError = t1._state === 8; + if (listeners == null) { + if (hasError) { + asyncError = t1._resultOrListeners; + t1 = t1._zone; + t2 = J.get$error$x(asyncError); + t3 = asyncError.get$stackTrace(); + t1.toString; + P._rootHandleUncaughtError(null, null, t1, t2, t3); + } + return; + } + for (; listeners.get$_nextListener() != null; listeners = listeners0) { + listeners0 = listeners._nextListener; + listeners._nextListener = null; + P._Future__propagateToListeners(_box_1.source, listeners); + } + sourceResult = _box_1.source._resultOrListeners; + _box_0.listenerHasError = hasError; + _box_0.listenerValueOrError = sourceResult; + t1 = !hasError; + if (!t1 || listeners.get$handlesValue() || listeners.get$handlesComplete()) { + zone = listeners.get$_zone(); + if (hasError) { + t2 = _box_1.source._zone; + t2.toString; + t2 = t2 == null ? zone == null : t2 === zone; + if (!t2) + zone.toString; + else + t2 = true; + t2 = !t2; + } else + t2 = false; + if (t2) { + t1 = _box_1.source; + asyncError = t1._resultOrListeners; + t1 = t1._zone; + t2 = J.get$error$x(asyncError); + t3 = asyncError.get$stackTrace(); + t1.toString; + P._rootHandleUncaughtError(null, null, t1, t2, t3); + return; + } + oldZone = $.Zone__current; + if (oldZone == null ? zone != null : oldZone !== zone) + $.Zone__current = zone; + else + oldZone = null; + if (listeners.get$handlesComplete()) + new P._Future__propagateToListeners_handleWhenCompleteCallback(_box_1, _box_0, hasError, listeners).call$0(); + else if (t1) { + if (listeners.get$handlesValue()) + new P._Future__propagateToListeners_handleValueCallback(_box_0, listeners, sourceResult).call$0(); + } else if (listeners.get$handlesError()) + new P._Future__propagateToListeners_handleError(_box_1, _box_0, listeners).call$0(); + if (oldZone != null) + $.Zone__current = oldZone; + t1 = _box_0.listenerValueOrError; + if (!!J.getInterceptor(t1).$isFuture) { + result = listeners.result; + if (t1._state >= 4) { + current = result._resultOrListeners; + result._resultOrListeners = null; + listeners = result._reverseListeners$1(current); + result._state = t1._state; + result._resultOrListeners = t1._resultOrListeners; + _box_1.source = t1; + continue; + } else + P._Future__chainCoreFuture(t1, result); + return; + } + } + result = listeners.result; + listeners = result._removeListeners$0(); + t1 = _box_0.listenerHasError; + t2 = _box_0.listenerValueOrError; + if (!t1) { + result._state = 4; + result._resultOrListeners = t2; + } else { + result._state = 8; + result._resultOrListeners = t2; + } + _box_1.source = result; + t1 = result; + } + } + } + }, + _Future__addListener_closure: { + "^": "Closure:0;$this,listener", + call$0: function() { + P._Future__propagateToListeners(this.$this, this.listener); + } + }, + _Future__prependListeners_closure: { + "^": "Closure:0;_box_0,$this", + call$0: function() { + P._Future__propagateToListeners(this.$this, this._box_0.listeners); + } + }, + _Future__chainForeignFuture_closure: { + "^": "Closure:1;target", + call$1: function(value) { + var t1 = this.target; + t1._state = 0; + t1._complete$1(value); + } + }, + _Future__chainForeignFuture_closure0: { + "^": "Closure:10;target", + call$2: function(error, stackTrace) { + this.target._completeError$2(error, stackTrace); + }, + call$1: function(error) { + return this.call$2(error, null); + } + }, + _Future__chainForeignFuture_closure1: { + "^": "Closure:0;target,e,s", + call$0: function() { + this.target._completeError$2(this.e, this.s); + } + }, + _Future__propagateToListeners_handleWhenCompleteCallback: { + "^": "Closure:2;_box_1,_box_0,hasError,listener", + call$0: function() { + var completeResult, e, s, exception, t1, t2, originalSource; + completeResult = null; + try { + completeResult = this.listener.handleWhenComplete$0(); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + if (this.hasError) { + t1 = J.get$error$x(this._box_1.source._resultOrListeners); + t2 = e; + t2 = t1 == null ? t2 == null : t1 === t2; + t1 = t2; + } else + t1 = false; + t2 = this._box_0; + if (t1) + t2.listenerValueOrError = this._box_1.source._resultOrListeners; + else + t2.listenerValueOrError = new P.AsyncError(e, s); + t2.listenerHasError = true; + return; + } + if (!!J.getInterceptor(completeResult).$isFuture) { + if (completeResult instanceof P._Future && completeResult.get$_state() >= 4) { + if (completeResult.get$_state() === 8) { + t1 = this._box_0; + t1.listenerValueOrError = completeResult.get$_resultOrListeners(); + t1.listenerHasError = true; + } + return; + } + originalSource = this._box_1.source; + t1 = this._box_0; + t1.listenerValueOrError = completeResult.then$1(new P._Future__propagateToListeners_handleWhenCompleteCallback_closure(originalSource)); + t1.listenerHasError = false; + } + } + }, + _Future__propagateToListeners_handleWhenCompleteCallback_closure: { + "^": "Closure:1;originalSource", + call$1: function(_) { + return this.originalSource; + } + }, + _Future__propagateToListeners_handleValueCallback: { + "^": "Closure:2;_box_0,listener,sourceResult", + call$0: function() { + var e, s, exception, t1; + try { + this._box_0.listenerValueOrError = this.listener.handleValue$1(this.sourceResult); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + t1 = this._box_0; + t1.listenerValueOrError = new P.AsyncError(e, s); + t1.listenerHasError = true; + } + } + }, + _Future__propagateToListeners_handleError: { + "^": "Closure:2;_box_1,_box_0,listener", + call$0: function() { + var asyncError, e, s, t1, t2, exception, t3, t4; + try { + asyncError = this._box_1.source._resultOrListeners; + t1 = this.listener; + if (t1.matchesErrorTest$1(asyncError) === true && t1.errorCallback != null) { + t2 = this._box_0; + t2.listenerValueOrError = t1.handleError$1(asyncError); + t2.listenerHasError = false; + } + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + t1 = this._box_1; + t2 = J.get$error$x(t1.source._resultOrListeners); + t3 = e; + t4 = this._box_0; + if (t2 == null ? t3 == null : t2 === t3) + t4.listenerValueOrError = t1.source._resultOrListeners; + else + t4.listenerValueOrError = new P.AsyncError(e, s); + t4.listenerHasError = true; + } + } + }, + _AsyncCallbackEntry: { + "^": "Object;callback<,next@" + }, + Stream: { + "^": "Object;$ti", + map$1: function(_, convert) { + return new P._MapStream(convert, this, [H.getRuntimeTypeArgument(this, "Stream", 0), null]); + }, + forEach$1: function(_, action) { + var t1, future; + t1 = {}; + future = new P._Future(0, $.Zone__current, null, [null]); + t1.subscription = null; + t1.subscription = this.listen$4$cancelOnError$onDone$onError(new P.Stream_forEach_closure(t1, this, action, future), true, new P.Stream_forEach_closure0(future), future.get$_completeError()); + return future; + }, + get$length: function(_) { + var t1, future; + t1 = {}; + future = new P._Future(0, $.Zone__current, null, [P.int]); + t1.count = 0; + this.listen$4$cancelOnError$onDone$onError(new P.Stream_length_closure(t1), true, new P.Stream_length_closure0(t1, future), future.get$_completeError()); + return future; + }, + toList$0: function(_) { + var t1, result, future; + t1 = H.getRuntimeTypeArgument(this, "Stream", 0); + result = H.setRuntimeTypeInfo([], [t1]); + future = new P._Future(0, $.Zone__current, null, [[P.List, t1]]); + this.listen$4$cancelOnError$onDone$onError(new P.Stream_toList_closure(this, result), true, new P.Stream_toList_closure0(result, future), future.get$_completeError()); + return future; + } + }, + Stream_forEach_closure: { + "^": "Closure;_box_0,$this,action,future", + call$1: function(element) { + P._runUserCode(new P.Stream_forEach__closure(this.action, element), new P.Stream_forEach__closure0(), P._cancelAndErrorClosure(this._box_0.subscription, this.future)); + }, + $signature: function() { + return H.computeSignature(function(T) { + return {func: 1, args: [T]}; + }, this.$this, "Stream"); + } + }, + Stream_forEach__closure: { + "^": "Closure:0;action,element", + call$0: function() { + return this.action.call$1(this.element); + } + }, + Stream_forEach__closure0: { + "^": "Closure:1;", + call$1: function(_) { + } + }, + Stream_forEach_closure0: { + "^": "Closure:0;future", + call$0: function() { + this.future._complete$1(null); + } + }, + Stream_length_closure: { + "^": "Closure:1;_box_0", + call$1: function(_) { + ++this._box_0.count; + } + }, + Stream_length_closure0: { + "^": "Closure:0;_box_0,future", + call$0: function() { + this.future._complete$1(this._box_0.count); + } + }, + Stream_toList_closure: { + "^": "Closure;$this,result", + call$1: function(data) { + this.result.push(data); + }, + $signature: function() { + return H.computeSignature(function(T) { + return {func: 1, args: [T]}; + }, this.$this, "Stream"); + } + }, + Stream_toList_closure0: { + "^": "Closure:0;result,future", + call$0: function() { + this.future._complete$1(this.result); + } + }, + StreamSubscription: { + "^": "Object;$ti" + }, + _BufferingStreamSubscription: { + "^": "Object;_state<,$ti", + pause$1: function(_, resumeSignal) { + var t1 = this._state; + if ((t1 & 8) !== 0) + return; + this._state = (t1 + 128 | 4) >>> 0; + if (t1 < 128 && this._pending != null) + this._pending.cancelSchedule$0(); + if ((t1 & 4) === 0 && (this._state & 32) === 0) + this._guardCallback$1(this.get$_onPause()); + }, + pause$0: function($receiver) { + return this.pause$1($receiver, null); + }, + resume$0: function() { + var t1 = this._state; + if ((t1 & 8) !== 0) + return; + if (t1 >= 128) { + t1 -= 128; + this._state = t1; + if (t1 < 128) { + if ((t1 & 64) !== 0) { + t1 = this._pending; + t1 = !t1.get$isEmpty(t1); + } else + t1 = false; + if (t1) + this._pending.schedule$1(this); + else { + t1 = (this._state & 4294967291) >>> 0; + this._state = t1; + if ((t1 & 32) === 0) + this._guardCallback$1(this.get$_onResume()); + } + } + } + }, + cancel$0: function() { + var t1 = (this._state & 4294967279) >>> 0; + this._state = t1; + if ((t1 & 8) === 0) + this._cancel$0(); + t1 = this._cancelFuture; + return t1 == null ? $.$get$Future__nullFuture() : t1; + }, + _cancel$0: function() { + var t1 = (this._state | 8) >>> 0; + this._state = t1; + if ((t1 & 64) !== 0) + this._pending.cancelSchedule$0(); + if ((this._state & 32) === 0) + this._pending = null; + this._cancelFuture = this._onCancel$0(); + }, + _async$_add$1: ["super$_BufferingStreamSubscription$_add", function(data) { + var t1 = this._state; + if ((t1 & 8) !== 0) + return; + if (t1 < 32) + this._sendData$1(data); + else + this._addPending$1(new P._DelayedData(data, null, [H.getRuntimeTypeArgument(this, "_BufferingStreamSubscription", 0)])); + }], + _addError$2: ["super$_BufferingStreamSubscription$_addError", function(error, stackTrace) { + var t1 = this._state; + if ((t1 & 8) !== 0) + return; + if (t1 < 32) + this._sendError$2(error, stackTrace); + else + this._addPending$1(new P._DelayedError(error, stackTrace, null)); + }], + _async$_close$0: function() { + var t1 = this._state; + if ((t1 & 8) !== 0) + return; + t1 = (t1 | 2) >>> 0; + this._state = t1; + if (t1 < 32) + this._sendDone$0(); + else + this._addPending$1(C.C__DelayedDone); + }, + _onPause$0: [function() { + }, "call$0", "get$_onPause", 0, 0, 2], + _onResume$0: [function() { + }, "call$0", "get$_onResume", 0, 0, 2], + _onCancel$0: function() { + return; + }, + _addPending$1: function($event) { + var pending, t1; + pending = this._pending; + if (pending == null) { + pending = new P._StreamImplEvents(null, null, 0, [H.getRuntimeTypeArgument(this, "_BufferingStreamSubscription", 0)]); + this._pending = pending; + } + pending.add$1(0, $event); + t1 = this._state; + if ((t1 & 64) === 0) { + t1 = (t1 | 64) >>> 0; + this._state = t1; + if (t1 < 128) + this._pending.schedule$1(this); + } + }, + _sendData$1: function(data) { + var t1 = this._state; + this._state = (t1 | 32) >>> 0; + this._zone.runUnaryGuarded$2(this._async$_onData, data); + this._state = (this._state & 4294967263) >>> 0; + this._checkState$1((t1 & 4) !== 0); + }, + _sendError$2: function(error, stackTrace) { + var t1, t2; + t1 = this._state; + t2 = new P._BufferingStreamSubscription__sendError_sendError(this, error, stackTrace); + if ((t1 & 1) !== 0) { + this._state = (t1 | 16) >>> 0; + this._cancel$0(); + t1 = this._cancelFuture; + if (!!J.getInterceptor(t1).$isFuture && t1 !== $.$get$Future__nullFuture()) + t1.whenComplete$1(t2); + else + t2.call$0(); + } else { + t2.call$0(); + this._checkState$1((t1 & 4) !== 0); + } + }, + _sendDone$0: function() { + var t1, t2; + t1 = new P._BufferingStreamSubscription__sendDone_sendDone(this); + this._cancel$0(); + this._state = (this._state | 16) >>> 0; + t2 = this._cancelFuture; + if (!!J.getInterceptor(t2).$isFuture && t2 !== $.$get$Future__nullFuture()) + t2.whenComplete$1(t1); + else + t1.call$0(); + }, + _guardCallback$1: function(callback) { + var t1 = this._state; + this._state = (t1 | 32) >>> 0; + callback.call$0(); + this._state = (this._state & 4294967263) >>> 0; + this._checkState$1((t1 & 4) !== 0); + }, + _checkState$1: function(wasInputPaused) { + var t1, isInputPaused; + if ((this._state & 64) !== 0) { + t1 = this._pending; + t1 = t1.get$isEmpty(t1); + } else + t1 = false; + if (t1) { + t1 = (this._state & 4294967231) >>> 0; + this._state = t1; + if ((t1 & 4) !== 0) + if (t1 < 128) { + t1 = this._pending; + t1 = t1 == null || t1.get$isEmpty(t1); + } else + t1 = false; + else + t1 = false; + if (t1) + this._state = (this._state & 4294967291) >>> 0; + } + for (; true; wasInputPaused = isInputPaused) { + t1 = this._state; + if ((t1 & 8) !== 0) { + this._pending = null; + return; + } + isInputPaused = (t1 & 4) !== 0; + if (wasInputPaused === isInputPaused) + break; + this._state = (t1 ^ 32) >>> 0; + if (isInputPaused) + this._onPause$0(); + else + this._onResume$0(); + this._state = (this._state & 4294967263) >>> 0; + } + t1 = this._state; + if ((t1 & 64) !== 0 && t1 < 128) + this._pending.schedule$1(this); + }, + _BufferingStreamSubscription$4: function(onData, onError, onDone, cancelOnError, $T) { + var t1 = this._zone; + t1.toString; + this._async$_onData = onData; + this._onError = P._registerErrorHandler(onError, t1); + this._onDone = onDone; + } + }, + _BufferingStreamSubscription__sendError_sendError: { + "^": "Closure:2;$this,error,stackTrace", + call$0: function() { + var t1, t2, t3, t4, t5, t6; + t1 = this.$this; + t2 = t1._state; + if ((t2 & 8) !== 0 && (t2 & 16) === 0) + return; + t1._state = (t2 | 32) >>> 0; + t2 = t1._onError; + t3 = H.functionTypeTest(t2, {func: 1, args: [P.Object, P.StackTrace]}); + t4 = t1._zone; + t5 = this.error; + t6 = t1._onError; + if (t3) + t4.runBinaryGuarded$3(t6, t5, this.stackTrace); + else + t4.runUnaryGuarded$2(t6, t5); + t1._state = (t1._state & 4294967263) >>> 0; + } + }, + _BufferingStreamSubscription__sendDone_sendDone: { + "^": "Closure:2;$this", + call$0: function() { + var t1, t2; + t1 = this.$this; + t2 = t1._state; + if ((t2 & 16) === 0) + return; + t1._state = (t2 | 42) >>> 0; + t1._zone.runGuarded$1(t1._onDone); + t1._state = (t1._state & 4294967263) >>> 0; + } + }, + _DelayedEvent: { + "^": "Object;next@" + }, + _DelayedData: { + "^": "_DelayedEvent;value,next,$ti", + perform$1: function(dispatch) { + dispatch._sendData$1(this.value); + } + }, + _DelayedError: { + "^": "_DelayedEvent;error>,stackTrace<,next", + perform$1: function(dispatch) { + dispatch._sendError$2(this.error, this.stackTrace); + } + }, + _DelayedDone: { + "^": "Object;", + perform$1: function(dispatch) { + dispatch._sendDone$0(); + }, + get$next: function() { + return; + }, + set$next: function(_) { + throw H.wrapException(new P.StateError("No events after a done.")); + } + }, + _PendingEvents: { + "^": "Object;_state<", + schedule$1: function(dispatch) { + var t1 = this._state; + if (t1 === 1) + return; + if (t1 >= 1) { + this._state = 1; + return; + } + P.scheduleMicrotask(new P._PendingEvents_schedule_closure(this, dispatch)); + this._state = 1; + }, + cancelSchedule$0: function() { + if (this._state === 1) + this._state = 3; + } + }, + _PendingEvents_schedule_closure: { + "^": "Closure:0;$this,dispatch", + call$0: function() { + var t1, oldState, $event, t2; + t1 = this.$this; + oldState = t1._state; + t1._state = 0; + if (oldState === 3) + return; + $event = t1.firstPendingEvent; + t2 = $event.get$next(); + t1.firstPendingEvent = t2; + if (t2 == null) + t1.lastPendingEvent = null; + $event.perform$1(this.dispatch); + } + }, + _StreamImplEvents: { + "^": "_PendingEvents;firstPendingEvent,lastPendingEvent,_state,$ti", + get$isEmpty: function(_) { + return this.lastPendingEvent == null; + }, + add$1: function(_, $event) { + var t1 = this.lastPendingEvent; + if (t1 == null) { + this.lastPendingEvent = $event; + this.firstPendingEvent = $event; + } else { + t1.set$next($event); + this.lastPendingEvent = $event; + } + } + }, + _cancelAndError_closure: { + "^": "Closure:0;future,error,stackTrace", + call$0: function() { + return this.future._completeError$2(this.error, this.stackTrace); + } + }, + _cancelAndErrorClosure_closure: { + "^": "Closure:11;subscription,future", + call$2: function(error, stackTrace) { + P._cancelAndError(this.subscription, this.future, error, stackTrace); + } + }, + _ForwardingStream: { + "^": "Stream;$ti", + listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { + return this._createSubscription$4(onData, onError, onDone, true === cancelOnError); + }, + listen$3$onDone$onError: function(onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError); + }, + _createSubscription$4: function(onData, onError, onDone, cancelOnError) { + return P._ForwardingStreamSubscription$(this, onData, onError, onDone, cancelOnError, H.getRuntimeTypeArgument(this, "_ForwardingStream", 0), H.getRuntimeTypeArgument(this, "_ForwardingStream", 1)); + }, + _handleData$2: function(data, sink) { + sink._async$_add$1(data); + }, + _handleError$3: function(error, stackTrace, sink) { + sink._addError$2(error, stackTrace); + }, + $asStream: function($S, $T) { + return [$T]; + } + }, + _ForwardingStreamSubscription: { + "^": "_BufferingStreamSubscription;_stream,_subscription,_async$_onData,_onError,_onDone,_zone,_state,_cancelFuture,_pending,$ti", + _async$_add$1: function(data) { + if ((this._state & 2) !== 0) + return; + this.super$_BufferingStreamSubscription$_add(data); + }, + _addError$2: function(error, stackTrace) { + if ((this._state & 2) !== 0) + return; + this.super$_BufferingStreamSubscription$_addError(error, stackTrace); + }, + _onPause$0: [function() { + var t1 = this._subscription; + if (t1 == null) + return; + t1.pause$0(0); + }, "call$0", "get$_onPause", 0, 0, 2], + _onResume$0: [function() { + var t1 = this._subscription; + if (t1 == null) + return; + t1.resume$0(); + }, "call$0", "get$_onResume", 0, 0, 2], + _onCancel$0: function() { + var t1 = this._subscription; + if (t1 != null) { + this._subscription = null; + return t1.cancel$0(); + } + return; + }, + _handleData$1: [function(data) { + this._stream._handleData$2(data, this); + }, "call$1", "get$_handleData", 2, 0, function() { + return H.computeSignature(function(S, T) { + return {func: 1, v: true, args: [S]}; + }, this.$receiver, "_ForwardingStreamSubscription"); + }], + _handleError$2: [function(error, stackTrace) { + this._stream._handleError$3(error, stackTrace, this); + }, "call$2", "get$_handleError", 4, 0, 12], + _handleDone$0: [function() { + this._async$_close$0(); + }, "call$0", "get$_handleDone", 0, 0, 2], + _ForwardingStreamSubscription$5: function(_stream, onData, onError, onDone, cancelOnError, $S, $T) { + this._subscription = this._stream._async$_source.listen$3$onDone$onError(this.get$_handleData(), this.get$_handleDone(), this.get$_handleError()); + }, + $as_BufferingStreamSubscription: function($S, $T) { + return [$T]; + }, + static: { + _ForwardingStreamSubscription$: function(_stream, onData, onError, onDone, cancelOnError, $S, $T) { + var t1, t2; + t1 = $.Zone__current; + t2 = cancelOnError ? 1 : 0; + t2 = new P._ForwardingStreamSubscription(_stream, null, null, null, null, t1, t2, null, null, [$S, $T]); + t2._BufferingStreamSubscription$4(onData, onError, onDone, cancelOnError, $T); + t2._ForwardingStreamSubscription$5(_stream, onData, onError, onDone, cancelOnError, $S, $T); + return t2; + } + } + }, + _MapStream: { + "^": "_ForwardingStream;_transform,_async$_source,$ti", + _handleData$2: function(inputEvent, sink) { + var outputEvent, e, s, exception; + outputEvent = null; + try { + outputEvent = this._transform.call$1(inputEvent); + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + P._addErrorWithReplacement(sink, e, s); + return; + } + sink._async$_add$1(outputEvent); + } + }, + AsyncError: { + "^": "Object;error>,stackTrace<", + toString$0: function(_) { + return H.S(this.error); + }, + $isError: 1 + }, + _Zone: { + "^": "Object;" + }, + _rootHandleUncaughtError_closure: { + "^": "Closure:0;_box_0,stackTrace", + call$0: function() { + var t1, t2, error; + t1 = this._box_0; + t2 = t1.error; + if (t2 == null) { + error = new P.NullThrownError(); + t1.error = error; + t1 = error; + } else + t1 = t2; + t2 = this.stackTrace; + if (t2 == null) + throw H.wrapException(t1); + error = H.wrapException(t1); + error.stack = J.toString$0$(t2); + throw error; + } + }, + _RootZone: { + "^": "_Zone;", + get$parent: function(_) { + return; + }, + runGuarded$1: function(f) { + var e, s, t1, exception; + try { + if (C.C__RootZone === $.Zone__current) { + t1 = f.call$0(); + return t1; + } + t1 = P._rootRun(null, null, this, f); + return t1; + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + t1 = P._rootHandleUncaughtError(null, null, this, e, s); + return t1; + } + }, + runUnaryGuarded$2: function(f, arg) { + var e, s, t1, exception; + try { + if (C.C__RootZone === $.Zone__current) { + t1 = f.call$1(arg); + return t1; + } + t1 = P._rootRunUnary(null, null, this, f, arg); + return t1; + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + t1 = P._rootHandleUncaughtError(null, null, this, e, s); + return t1; + } + }, + runBinaryGuarded$3: function(f, arg1, arg2) { + var e, s, t1, exception; + try { + if (C.C__RootZone === $.Zone__current) { + t1 = f.call$2(arg1, arg2); + return t1; + } + t1 = P._rootRunBinary(null, null, this, f, arg1, arg2); + return t1; + } catch (exception) { + e = H.unwrapException(exception); + s = H.getTraceFromException(exception); + t1 = P._rootHandleUncaughtError(null, null, this, e, s); + return t1; + } + }, + bindCallback$2$runGuarded: function(f, runGuarded) { + if (runGuarded) + return new P._RootZone_bindCallback_closure(this, f); + else + return new P._RootZone_bindCallback_closure0(this, f); + }, + bindUnaryCallback$2$runGuarded: function(f, runGuarded) { + return new P._RootZone_bindUnaryCallback_closure(this, f); + }, + $index: function(_, key) { + return; + }, + run$1: function(f) { + if ($.Zone__current === C.C__RootZone) + return f.call$0(); + return P._rootRun(null, null, this, f); + }, + runUnary$2: function(f, arg) { + if ($.Zone__current === C.C__RootZone) + return f.call$1(arg); + return P._rootRunUnary(null, null, this, f, arg); + }, + runBinary$3: function(f, arg1, arg2) { + if ($.Zone__current === C.C__RootZone) + return f.call$2(arg1, arg2); + return P._rootRunBinary(null, null, this, f, arg1, arg2); + } + }, + _RootZone_bindCallback_closure: { + "^": "Closure:0;$this,f", + call$0: function() { + return this.$this.runGuarded$1(this.f); + } + }, + _RootZone_bindCallback_closure0: { + "^": "Closure:0;$this,f", + call$0: function() { + return this.$this.run$1(this.f); + } + }, + _RootZone_bindUnaryCallback_closure: { + "^": "Closure:1;$this,f", + call$1: function(arg) { + return this.$this.runUnaryGuarded$2(this.f, arg); + } + } + }], ["dart.collection", "dart:collection",, P, { + "^": "", + LinkedHashMap__makeEmpty: function() { + return new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [null, null]); + }, + LinkedHashMap__makeLiteral: function(keyValuePairs) { + return H.fillLiteralMap(keyValuePairs, new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [null, null])); + }, + IterableBase_iterableToShortString: function(iterable, leftDelimiter, rightDelimiter) { + var parts, t1; + if (P._isToStringVisiting(iterable)) { + if (leftDelimiter === "(" && rightDelimiter === ")") + return "(...)"; + return leftDelimiter + "..." + rightDelimiter; + } + parts = []; + t1 = $.$get$_toStringVisiting(); + t1.push(iterable); + try { + P._iterablePartsToStrings(iterable, parts); + } finally { + if (0 >= t1.length) + return H.ioore(t1, -1); + t1.pop(); + } + t1 = P.StringBuffer__writeAll(leftDelimiter, parts, ", ") + rightDelimiter; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + IterableBase_iterableToFullString: function(iterable, leftDelimiter, rightDelimiter) { + var buffer, t1, t2; + if (P._isToStringVisiting(iterable)) + return leftDelimiter + "..." + rightDelimiter; + buffer = new P.StringBuffer(leftDelimiter); + t1 = $.$get$_toStringVisiting(); + t1.push(iterable); + try { + t2 = buffer; + t2._contents = P.StringBuffer__writeAll(t2.get$_contents(), iterable, ", "); + } finally { + if (0 >= t1.length) + return H.ioore(t1, -1); + t1.pop(); + } + t1 = buffer; + t1._contents = t1.get$_contents() + rightDelimiter; + t1 = buffer.get$_contents(); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _isToStringVisiting: function(o) { + var i, t1; + for (i = 0; t1 = $.$get$_toStringVisiting(), i < t1.length; ++i) + if (o === t1[i]) + return true; + return false; + }, + _iterablePartsToStrings: function(iterable, parts) { + var it, $length, count, next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision; + it = iterable.get$iterator(iterable); + $length = 0; + count = 0; + while (true) { + if (!($length < 80 || count < 3)) + break; + if (!it.moveNext$0()) + return; + next = H.S(it.get$current()); + parts.push(next); + $length += next.length + 2; + ++count; + } + if (!it.moveNext$0()) { + if (count <= 5) + return; + if (0 >= parts.length) + return H.ioore(parts, -1); + ultimateString = parts.pop(); + if (0 >= parts.length) + return H.ioore(parts, -1); + penultimateString = parts.pop(); + } else { + penultimate = it.get$current(); + ++count; + if (!it.moveNext$0()) { + if (count <= 4) { + parts.push(H.S(penultimate)); + return; + } + ultimateString = H.S(penultimate); + if (0 >= parts.length) + return H.ioore(parts, -1); + penultimateString = parts.pop(); + $length += ultimateString.length + 2; + } else { + ultimate = it.get$current(); + ++count; + for (; it.moveNext$0(); penultimate = ultimate, ultimate = ultimate0) { + ultimate0 = it.get$current(); + ++count; + if (count > 100) { + while (true) { + if (!($length > 75 && count > 3)) + break; + if (0 >= parts.length) + return H.ioore(parts, -1); + $length -= parts.pop().length + 2; + --count; + } + parts.push("..."); + return; + } + } + penultimateString = H.S(penultimate); + ultimateString = H.S(ultimate); + $length += ultimateString.length + penultimateString.length + 4; + } + } + if (count > parts.length + 2) { + $length += 5; + elision = "..."; + } else + elision = null; + while (true) { + if (!($length > 80 && parts.length > 3)) + break; + if (0 >= parts.length) + return H.ioore(parts, -1); + $length -= parts.pop().length + 2; + if (elision == null) { + $length += 5; + elision = "..."; + } + } + if (elision != null) + parts.push(elision); + parts.push(penultimateString); + parts.push(ultimateString); + }, + LinkedHashSet_LinkedHashSet: function(equals, hashCode, isValidKey, $E) { + return new P._LinkedHashSet(0, null, null, null, null, null, 0, [$E]); + }, + LinkedHashSet_LinkedHashSet$from: function(elements, $E) { + var result, t1, _i; + result = P.LinkedHashSet_LinkedHashSet(null, null, null, $E); + for (t1 = elements.length, _i = 0; _i < elements.length; elements.length === t1 || (0, H.throwConcurrentModificationError)(elements), ++_i) + result.add$1(0, elements[_i]); + return result; + }, + Maps_mapToString: function(m) { + var t1, result, t2; + t1 = {}; + if (P._isToStringVisiting(m)) + return "{...}"; + result = new P.StringBuffer(""); + try { + $.$get$_toStringVisiting().push(m); + t2 = result; + t2._contents = t2.get$_contents() + "{"; + t1.first = true; + m.forEach$1(0, new P.Maps_mapToString_closure(t1, result)); + t1 = result; + t1._contents = t1.get$_contents() + "}"; + } finally { + t1 = $.$get$_toStringVisiting(); + if (0 >= t1.length) + return H.ioore(t1, -1); + t1.pop(); + } + t1 = result.get$_contents(); + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + _LinkedIdentityHashMap: { + "^": "JsLinkedHashMap;_length,_strings,_nums,_rest,_first,_last,_modifications,$ti", + internalComputeHashCode$1: function(key) { + return H.objectHashCode(key) & 0x3ffffff; + }, + internalFindBucketIndex$2: function(bucket, key) { + var $length, i, t1; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) { + t1 = bucket[i].get$hashMapCellKey(); + if (t1 == null ? key == null : t1 === key) + return i; + } + return -1; + }, + static: { + _LinkedIdentityHashMap__LinkedIdentityHashMap$es6: function($K, $V) { + return new P._LinkedIdentityHashMap(0, null, null, null, null, null, 0, [$K, $V]); + } + } + }, + _LinkedHashSet: { + "^": "_HashSetBase;_collection$_length,_collection$_strings,_collection$_nums,_collection$_rest,_collection$_first,_collection$_last,_collection$_modifications,$ti", + get$iterator: function(_) { + var t1 = new P._LinkedHashSetIterator(this, this._collection$_modifications, null, null); + t1._collection$_cell = this._collection$_first; + return t1; + }, + get$length: function(_) { + return this._collection$_length; + }, + contains$1: function(_, object) { + var strings, nums; + if (typeof object === "string" && object !== "__proto__") { + strings = this._collection$_strings; + if (strings == null) + return false; + return strings[object] != null; + } else if (typeof object === "number" && (object & 0x3ffffff) === object) { + nums = this._collection$_nums; + if (nums == null) + return false; + return nums[object] != null; + } else + return this._contains$1(object); + }, + _contains$1: function(object) { + var rest = this._collection$_rest; + if (rest == null) + return false; + return this._findBucketIndex$2(rest[this._computeHashCode$1(object)], object) >= 0; + }, + lookup$1: function(object) { + var t1; + if (!(typeof object === "string" && object !== "__proto__")) + t1 = typeof object === "number" && (object & 0x3ffffff) === object; + else + t1 = true; + if (t1) + return this.contains$1(0, object) ? object : null; + else + return this._lookup$1(object); + }, + _lookup$1: function(object) { + var rest, bucket, index; + rest = this._collection$_rest; + if (rest == null) + return; + bucket = rest[this._computeHashCode$1(object)]; + index = this._findBucketIndex$2(bucket, object); + if (index < 0) + return; + return J.$index$asx(bucket, index).get$_element(); + }, + forEach$1: function(_, action) { + var cell, modifications; + cell = this._collection$_first; + modifications = this._collection$_modifications; + for (; cell != null;) { + action.call$1(cell._element); + if (modifications !== this._collection$_modifications) + throw H.wrapException(new P.ConcurrentModificationError(this)); + cell = cell._collection$_next; + } + }, + add$1: function(_, element) { + var strings, table, nums; + if (typeof element === "string" && element !== "__proto__") { + strings = this._collection$_strings; + if (strings == null) { + table = Object.create(null); + table[""] = table; + delete table[""]; + this._collection$_strings = table; + strings = table; + } + return this._collection$_addHashTableEntry$2(strings, element); + } else if (typeof element === "number" && (element & 0x3ffffff) === element) { + nums = this._collection$_nums; + if (nums == null) { + table = Object.create(null); + table[""] = table; + delete table[""]; + this._collection$_nums = table; + nums = table; + } + return this._collection$_addHashTableEntry$2(nums, element); + } else + return this._add$1(element); + }, + _add$1: function(element) { + var rest, hash, bucket; + rest = this._collection$_rest; + if (rest == null) { + rest = P._LinkedHashSet__newHashTable(); + this._collection$_rest = rest; + } + hash = this._computeHashCode$1(element); + bucket = rest[hash]; + if (bucket == null) + rest[hash] = [this._collection$_newLinkedCell$1(element)]; + else { + if (this._findBucketIndex$2(bucket, element) >= 0) + return false; + bucket.push(this._collection$_newLinkedCell$1(element)); + } + return true; + }, + remove$1: function(_, object) { + if (typeof object === "string" && object !== "__proto__") + return this._collection$_removeHashTableEntry$2(this._collection$_strings, object); + else if (typeof object === "number" && (object & 0x3ffffff) === object) + return this._collection$_removeHashTableEntry$2(this._collection$_nums, object); + else + return this._remove$1(object); + }, + _remove$1: function(object) { + var rest, bucket, index; + rest = this._collection$_rest; + if (rest == null) + return false; + bucket = rest[this._computeHashCode$1(object)]; + index = this._findBucketIndex$2(bucket, object); + if (index < 0) + return false; + this._collection$_unlinkCell$1(bucket.splice(index, 1)[0]); + return true; + }, + clear$0: function(_) { + if (this._collection$_length > 0) { + this._collection$_last = null; + this._collection$_first = null; + this._collection$_rest = null; + this._collection$_nums = null; + this._collection$_strings = null; + this._collection$_length = 0; + this._collection$_modifications = this._collection$_modifications + 1 & 67108863; + } + }, + _collection$_addHashTableEntry$2: function(table, element) { + if (table[element] != null) + return false; + table[element] = this._collection$_newLinkedCell$1(element); + return true; + }, + _collection$_removeHashTableEntry$2: function(table, element) { + var cell; + if (table == null) + return false; + cell = table[element]; + if (cell == null) + return false; + this._collection$_unlinkCell$1(cell); + delete table[element]; + return true; + }, + _collection$_newLinkedCell$1: function(element) { + var cell, last; + cell = new P._LinkedHashSetCell(element, null, null); + if (this._collection$_first == null) { + this._collection$_last = cell; + this._collection$_first = cell; + } else { + last = this._collection$_last; + cell._collection$_previous = last; + last._collection$_next = cell; + this._collection$_last = cell; + } + ++this._collection$_length; + this._collection$_modifications = this._collection$_modifications + 1 & 67108863; + return cell; + }, + _collection$_unlinkCell$1: function(cell) { + var previous, next; + previous = cell.get$_collection$_previous(); + next = cell._collection$_next; + if (previous == null) + this._collection$_first = next; + else + previous._collection$_next = next; + if (next == null) + this._collection$_last = previous; + else + next._collection$_previous = previous; + --this._collection$_length; + this._collection$_modifications = this._collection$_modifications + 1 & 67108863; + }, + _computeHashCode$1: function(element) { + return J.get$hashCode$(element) & 0x3ffffff; + }, + _findBucketIndex$2: function(bucket, element) { + var $length, i; + if (bucket == null) + return -1; + $length = bucket.length; + for (i = 0; i < $length; ++i) + if (J.$eq$(bucket[i].get$_element(), element)) + return i; + return -1; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: null, + static: { + _LinkedHashSet__newHashTable: function() { + var table = Object.create(null); + table[""] = table; + delete table[""]; + return table; + } + } + }, + _LinkedHashSetCell: { + "^": "Object;_element<,_collection$_next,_collection$_previous<" + }, + _LinkedHashSetIterator: { + "^": "Object;_set,_collection$_modifications,_collection$_cell,_collection$_current", + get$current: function() { + return this._collection$_current; + }, + moveNext$0: function() { + var t1 = this._set; + if (this._collection$_modifications !== t1._collection$_modifications) + throw H.wrapException(new P.ConcurrentModificationError(t1)); + else { + t1 = this._collection$_cell; + if (t1 == null) { + this._collection$_current = null; + return false; + } else { + this._collection$_current = t1._element; + this._collection$_cell = t1._collection$_next; + return true; + } + } + } + }, + _HashSetBase: { + "^": "SetBase;$ti" + }, + ListBase: { + "^": "Object_ListMixin;$ti" + }, + Object_ListMixin: { + "^": "Object+ListMixin;", + $asList: null, + $asEfficientLengthIterable: null, + $isList: 1, + $isEfficientLengthIterable: 1 + }, + ListMixin: { + "^": "Object;$ti", + get$iterator: function(receiver) { + return new H.ListIterator(receiver, this.get$length(receiver), 0, null); + }, + elementAt$1: function(receiver, index) { + return this.$index(receiver, index); + }, + forEach$1: function(receiver, action) { + var $length, i; + $length = this.get$length(receiver); + for (i = 0; i < $length; ++i) { + action.call$1(this.$index(receiver, i)); + if ($length !== this.get$length(receiver)) + throw H.wrapException(new P.ConcurrentModificationError(receiver)); + } + }, + map$1: function(receiver, f) { + return new H.MappedListIterable(receiver, f, [H.getRuntimeTypeArgument(receiver, "ListMixin", 0), null]); + }, + add$1: function(receiver, element) { + var t1 = this.get$length(receiver); + this.set$length(receiver, t1 + 1); + this.$indexSet(receiver, t1, element); + }, + toString$0: function(receiver) { + return P.IterableBase_iterableToFullString(receiver, "[", "]"); + }, + $isList: 1, + $asList: null, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: null + }, + Maps_mapToString_closure: { + "^": "Closure:13;_box_0,result", + call$2: function(k, v) { + var t1, t2; + t1 = this._box_0; + if (!t1.first) + this.result._contents += ", "; + t1.first = false; + t1 = this.result; + t2 = t1._contents += H.S(k); + t1._contents = t2 + ": "; + t1._contents += H.S(v); + } + }, + ListQueue: { + "^": "ListIterable;_table,_head,_tail,_modificationCount,$ti", + get$iterator: function(_) { + return new P._ListQueueIterator(this, this._tail, this._modificationCount, this._head, null); + }, + forEach$1: function(_, action) { + var modificationCount, i, t1; + modificationCount = this._modificationCount; + for (i = this._head; i !== this._tail; i = (i + 1 & this._table.length - 1) >>> 0) { + t1 = this._table; + if (i < 0 || i >= t1.length) + return H.ioore(t1, i); + action.call$1(t1[i]); + if (modificationCount !== this._modificationCount) + H.throwExpression(new P.ConcurrentModificationError(this)); + } + }, + get$isEmpty: function(_) { + return this._head === this._tail; + }, + get$length: function(_) { + return (this._tail - this._head & this._table.length - 1) >>> 0; + }, + elementAt$1: function(_, index) { + var $length, t1, t2, t3; + $length = (this._tail - this._head & this._table.length - 1) >>> 0; + if (0 > index || index >= $length) + H.throwExpression(P.IndexError$(index, this, "index", null, $length)); + t1 = this._table; + t2 = t1.length; + t3 = (this._head + index & t2 - 1) >>> 0; + if (t3 < 0 || t3 >= t2) + return H.ioore(t1, t3); + return t1[t3]; + }, + add$1: function(_, value) { + this._add$1(value); + }, + clear$0: function(_) { + var i, t1, t2, t3, t4; + i = this._head; + t1 = this._tail; + if (i !== t1) { + for (t2 = this._table, t3 = t2.length, t4 = t3 - 1; i !== t1; i = (i + 1 & t4) >>> 0) { + if (i < 0 || i >= t3) + return H.ioore(t2, i); + t2[i] = null; + } + this._tail = 0; + this._head = 0; + ++this._modificationCount; + } + }, + toString$0: function(_) { + return P.IterableBase_iterableToFullString(this, "{", "}"); + }, + removeFirst$0: function() { + var t1, t2, t3, result; + t1 = this._head; + if (t1 === this._tail) + throw H.wrapException(H.IterableElementError_noElement()); + ++this._modificationCount; + t2 = this._table; + t3 = t2.length; + if (t1 >= t3) + return H.ioore(t2, t1); + result = t2[t1]; + t2[t1] = null; + this._head = (t1 + 1 & t3 - 1) >>> 0; + return result; + }, + _add$1: function(element) { + var t1, t2, t3; + t1 = this._table; + t2 = this._tail; + t3 = t1.length; + if (t2 < 0 || t2 >= t3) + return H.ioore(t1, t2); + t1[t2] = element; + t3 = (t2 + 1 & t3 - 1) >>> 0; + this._tail = t3; + if (this._head === t3) + this._grow$0(); + ++this._modificationCount; + }, + _grow$0: function() { + var t1, newTable, t2, split; + t1 = new Array(this._table.length * 2); + t1.fixed$length = Array; + newTable = H.setRuntimeTypeInfo(t1, this.$ti); + t1 = this._table; + t2 = this._head; + split = t1.length - t2; + C.JSArray_methods.setRange$4(newTable, 0, split, t1, t2); + C.JSArray_methods.setRange$4(newTable, split, split + this._head, this._table, 0); + this._head = 0; + this._tail = this._table.length; + this._table = newTable; + }, + ListQueue$1: function(initialCapacity, $E) { + var t1 = new Array(8); + t1.fixed$length = Array; + this._table = H.setRuntimeTypeInfo(t1, [$E]); + }, + $asEfficientLengthIterable: null, + static: { + ListQueue$: function(initialCapacity, $E) { + var t1 = new P.ListQueue(null, 0, 0, 0, [$E]); + t1.ListQueue$1(initialCapacity, $E); + return t1; + } + } + }, + _ListQueueIterator: { + "^": "Object;_queue,_end,_modificationCount,_collection$_position,_collection$_current", + get$current: function() { + return this._collection$_current; + }, + moveNext$0: function() { + var t1, t2, t3; + t1 = this._queue; + if (this._modificationCount !== t1._modificationCount) + H.throwExpression(new P.ConcurrentModificationError(t1)); + t2 = this._collection$_position; + if (t2 === this._end) { + this._collection$_current = null; + return false; + } + t1 = t1._table; + t3 = t1.length; + if (t2 >= t3) + return H.ioore(t1, t2); + this._collection$_current = t1[t2]; + this._collection$_position = (t2 + 1 & t3 - 1) >>> 0; + return true; + } + }, + SetMixin: { + "^": "Object;$ti", + addAll$1: function(_, elements) { + var t1; + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + this.add$1(0, t1.get$current()); + }, + map$1: function(_, f) { + return new H.EfficientLengthMappedIterable(this, f, [H.getTypeArgumentByIndex(this, 0), null]); + }, + toString$0: function(_) { + return P.IterableBase_iterableToFullString(this, "{", "}"); + }, + forEach$1: function(_, f) { + var t1; + for (t1 = new P._LinkedHashSetIterator(this, this._collection$_modifications, null, null), t1._collection$_cell = this._collection$_first; t1.moveNext$0();) + f.call$1(t1._collection$_current); + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: null + }, + SetBase: { + "^": "SetMixin;$ti" + } + }], ["dart.core", "dart:core",, P, { + "^": "", + Error_safeToString: function(object) { + if (typeof object === "number" || typeof object === "boolean" || null == object) + return J.toString$0$(object); + if (typeof object === "string") + return JSON.stringify(object); + return P.Error__objectToString(object); + }, + Error__objectToString: function(object) { + var t1 = J.getInterceptor(object); + if (!!t1.$isClosure) + return t1.toString$0(object); + return H.Primitives_objectToHumanReadableString(object); + }, + Exception_Exception: function(message) { + return new P._Exception(message); + }, + List_List$from: function(elements, growable, $E) { + var list, t1; + list = H.setRuntimeTypeInfo([], [$E]); + for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();) + list.push(t1.get$current()); + return list; + }, + print: function(object) { + H.printString(H.S(object)); + }, + String_String$fromCharCodes: function(charCodes, start, end) { + var len = charCodes.length; + end = P.RangeError_checkValidRange(start, end, len, null, null, null); + return H.Primitives_stringFromCharCodes(start > 0 || end < len ? C.JSArray_methods.sublist$2(charCodes, start, end) : charCodes); + }, + bool: { + "^": "Object;" + }, + "+bool": 0, + double: { + "^": "num;" + }, + "+double": 0, + Duration: { + "^": "Object;_duration", + $add: function(_, other) { + return new P.Duration(C.JSInt_methods.$add(this._duration, other.get$_duration())); + }, + $lt: function(_, other) { + return C.JSInt_methods.$lt(this._duration, other.get$_duration()); + }, + $eq: function(_, other) { + if (other == null) + return false; + if (!(other instanceof P.Duration)) + return false; + return this._duration === other._duration; + }, + get$hashCode: function(_) { + return this._duration & 0x1FFFFFFF; + }, + toString$0: function(_) { + var t1, t2, twoDigitMinutes, twoDigitSeconds, sixDigitUs; + t1 = new P.Duration_toString_twoDigits(); + t2 = this._duration; + if (t2 < 0) + return "-" + new P.Duration(0 - t2).toString$0(0); + twoDigitMinutes = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 60000000) % 60); + twoDigitSeconds = t1.call$1(C.JSInt_methods._tdivFast$1(t2, 1000000) % 60); + sixDigitUs = new P.Duration_toString_sixDigits().call$1(t2 % 1000000); + return "" + C.JSInt_methods._tdivFast$1(t2, 3600000000) + ":" + H.S(twoDigitMinutes) + ":" + H.S(twoDigitSeconds) + "." + H.S(sixDigitUs); + } + }, + Duration_toString_sixDigits: { + "^": "Closure:4;", + call$1: function(n) { + if (n >= 100000) + return "" + n; + if (n >= 10000) + return "0" + n; + if (n >= 1000) + return "00" + n; + if (n >= 100) + return "000" + n; + if (n >= 10) + return "0000" + n; + return "00000" + n; + } + }, + Duration_toString_twoDigits: { + "^": "Closure:4;", + call$1: function(n) { + if (n >= 10) + return "" + n; + return "0" + n; + } + }, + Error: { + "^": "Object;", + get$stackTrace: function() { + return H.getTraceFromException(this.$thrownJsError); + } + }, + NullThrownError: { + "^": "Error;", + toString$0: function(_) { + return "Throw of null."; + } + }, + ArgumentError: { + "^": "Error;_hasValue,invalidValue,name,message", + get$_errorName: function() { + return "Invalid argument" + (!this._hasValue ? "(s)" : ""); + }, + get$_errorExplanation: function() { + return ""; + }, + toString$0: function(_) { + var t1, nameString, message, prefix, explanation, errorValue; + t1 = this.name; + nameString = t1 != null ? " (" + t1 + ")" : ""; + t1 = this.message; + message = t1 == null ? "" : ": " + H.S(t1); + prefix = this.get$_errorName() + nameString + message; + if (!this._hasValue) + return prefix; + explanation = this.get$_errorExplanation(); + errorValue = P.Error_safeToString(this.invalidValue); + return prefix + explanation + ": " + H.S(errorValue); + }, + static: { + ArgumentError$: function(message) { + return new P.ArgumentError(false, null, null, message); + }, + ArgumentError$value: function(value, $name, message) { + return new P.ArgumentError(true, value, $name, message); + } + } + }, + RangeError: { + "^": "ArgumentError;start,end,_hasValue,invalidValue,name,message", + get$_errorName: function() { + return "RangeError"; + }, + get$_errorExplanation: function() { + var t1, explanation, t2; + t1 = this.start; + if (t1 == null) { + t1 = this.end; + explanation = t1 != null ? ": Not less than or equal to " + H.S(t1) : ""; + } else { + t2 = this.end; + if (t2 == null) + explanation = ": Not greater than or equal to " + H.S(t1); + else if (t2 > t1) + explanation = ": Not in range " + H.S(t1) + ".." + H.S(t2) + ", inclusive"; + else + explanation = t2 < t1 ? ": Valid value range is empty" : ": Only valid value is " + H.S(t1); + } + return explanation; + }, + static: { + RangeError$value: function(value, $name, message) { + return new P.RangeError(null, null, true, value, $name, "Value not in range"); + }, + RangeError$range: function(invalidValue, minValue, maxValue, $name, message) { + return new P.RangeError(minValue, maxValue, true, invalidValue, $name, "Invalid value"); + }, + RangeError_checkValidRange: function(start, end, $length, startName, endName, message) { + if (0 > start || start > $length) + throw H.wrapException(P.RangeError$range(start, 0, $length, "start", message)); + if (end != null) { + if (start > end || end > $length) + throw H.wrapException(P.RangeError$range(end, start, $length, "end", message)); + return end; + } + return $length; + } + } + }, + IndexError: { + "^": "ArgumentError;indexable,length>,_hasValue,invalidValue,name,message", + get$_errorName: function() { + return "RangeError"; + }, + get$_errorExplanation: function() { + if (J.$lt$n(this.invalidValue, 0)) + return ": index must not be negative"; + var t1 = this.length; + if (t1 === 0) + return ": no indices are valid"; + return ": index should be less than " + H.S(t1); + }, + static: { + IndexError$: function(invalidValue, indexable, $name, message, $length) { + var t1 = $length != null ? $length : J.get$length$asx(indexable); + return new P.IndexError(indexable, t1, true, invalidValue, $name, "Index out of range"); + } + } + }, + UnsupportedError: { + "^": "Error;message", + toString$0: function(_) { + return "Unsupported operation: " + this.message; + } + }, + UnimplementedError: { + "^": "Error;message", + toString$0: function(_) { + var t1 = this.message; + return t1 != null ? "UnimplementedError: " + H.S(t1) : "UnimplementedError"; + } + }, + StateError: { + "^": "Error;message", + toString$0: function(_) { + return "Bad state: " + this.message; + } + }, + ConcurrentModificationError: { + "^": "Error;modifiedObject", + toString$0: function(_) { + var t1 = this.modifiedObject; + if (t1 == null) + return "Concurrent modification during iteration."; + return "Concurrent modification during iteration: " + H.S(P.Error_safeToString(t1)) + "."; + } + }, + StackOverflowError: { + "^": "Object;", + toString$0: function(_) { + return "Stack Overflow"; + }, + get$stackTrace: function() { + return; + }, + $isError: 1 + }, + CyclicInitializationError: { + "^": "Error;variableName", + toString$0: function(_) { + var t1 = this.variableName; + return t1 == null ? "Reading static variable during its initialization" : "Reading static variable '" + H.S(t1) + "' during its initialization"; + } + }, + _Exception: { + "^": "Object;message", + toString$0: function(_) { + var t1 = this.message; + if (t1 == null) + return "Exception"; + return "Exception: " + H.S(t1); + } + }, + FormatException: { + "^": "Object;message,source,offset", + toString$0: function(_) { + var t1, report, source; + t1 = this.message; + report = "" !== t1 ? "FormatException: " + t1 : "FormatException"; + source = this.source; + if (typeof source !== "string") + return report; + if (source.length > 78) + source = C.JSString_methods.substring$2(source, 0, 75) + "..."; + return report + "\n" + source; + } + }, + Expando: { + "^": "Object;name,_jsWeakMapOrKey", + toString$0: function(_) { + return "Expando:" + H.S(this.name); + }, + $index: function(_, object) { + var t1, values; + t1 = this._jsWeakMapOrKey; + if (typeof t1 !== "string") { + if (object == null || typeof object === "boolean" || typeof object === "number" || typeof object === "string") + H.throwExpression(P.ArgumentError$value(object, "Expandos are not allowed on strings, numbers, booleans or null", null)); + return t1.get(object); + } + values = H.Primitives_getProperty(object, "expando$values"); + return values == null ? null : H.Primitives_getProperty(values, t1); + }, + $indexSet: function(_, object, value) { + var t1, values; + t1 = this._jsWeakMapOrKey; + if (typeof t1 !== "string") + t1.set(object, value); + else { + values = H.Primitives_getProperty(object, "expando$values"); + if (values == null) { + values = new P.Object(); + H.Primitives_setProperty(object, "expando$values", values); + } + H.Primitives_setProperty(values, t1, value); + } + } + }, + int: { + "^": "num;" + }, + "+int": 0, + Iterable: { + "^": "Object;$ti", + map$1: function(_, f) { + return H.MappedIterable_MappedIterable(this, f, H.getRuntimeTypeArgument(this, "Iterable", 0), null); + }, + where$1: ["super$Iterable$where", function(_, test) { + return new H.WhereIterable(this, test, [H.getRuntimeTypeArgument(this, "Iterable", 0)]); + }], + forEach$1: function(_, f) { + var t1; + for (t1 = this.get$iterator(this); t1.moveNext$0();) + f.call$1(t1.get$current()); + }, + toList$1$growable: function(_, growable) { + return P.List_List$from(this, true, H.getRuntimeTypeArgument(this, "Iterable", 0)); + }, + toList$0: function($receiver) { + return this.toList$1$growable($receiver, true); + }, + get$length: function(_) { + var it, count; + it = this.get$iterator(this); + for (count = 0; it.moveNext$0();) + ++count; + return count; + }, + get$single: function(_) { + var it, result; + it = this.get$iterator(this); + if (!it.moveNext$0()) + throw H.wrapException(H.IterableElementError_noElement()); + result = it.get$current(); + if (it.moveNext$0()) + throw H.wrapException(H.IterableElementError_tooMany()); + return result; + }, + elementAt$1: function(_, index) { + var t1, elementIndex, element; + if (index < 0) + H.throwExpression(P.RangeError$range(index, 0, null, "index", null)); + for (t1 = this.get$iterator(this), elementIndex = 0; t1.moveNext$0();) { + element = t1.get$current(); + if (index === elementIndex) + return element; + ++elementIndex; + } + throw H.wrapException(P.IndexError$(index, this, "index", null, elementIndex)); + }, + toString$0: function(_) { + return P.IterableBase_iterableToShortString(this, "(", ")"); + } + }, + Iterator: { + "^": "Object;" + }, + List: { + "^": "Object;$ti", + $asList: null, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: null + }, + "+List": 0, + Null: { + "^": "Object;", + get$hashCode: function(_) { + return P.Object.prototype.get$hashCode.call(this, this); + }, + toString$0: function(_) { + return "null"; + } + }, + "+Null": 0, + num: { + "^": "Object;" + }, + "+num": 0, + Object: { + "^": ";", + $eq: function(_, other) { + return this === other; + }, + get$hashCode: function(_) { + return H.Primitives_objectHashCode(this); + }, + toString$0: function(_) { + return H.Primitives_objectToHumanReadableString(this); + }, + toString: function() { + return this.toString$0(this); + } + }, + StackTrace: { + "^": "Object;" + }, + String: { + "^": "Object;" + }, + "+String": 0, + StringBuffer: { + "^": "Object;_contents<", + get$length: function(_) { + return this._contents.length; + }, + toString$0: function(_) { + var t1 = this._contents; + return t1.charCodeAt(0) == 0 ? t1 : t1; + }, + static: { + StringBuffer__writeAll: function(string, objects, separator) { + var iterator = J.get$iterator$ax(objects); + if (!iterator.moveNext$0()) + return string; + if (separator.length === 0) { + do + string += H.S(iterator.get$current()); + while (iterator.moveNext$0()); + } else { + string += H.S(iterator.get$current()); + for (; iterator.moveNext$0();) + string = string + separator + H.S(iterator.get$current()); + } + return string; + } + } + } + }], ["dart.dom.html", "dart:html",, W, { + "^": "", + Element_Element$html: function(html, treeSanitizer, validator) { + var t1, fragment; + t1 = document.body; + fragment = (t1 && C.BodyElement_methods).createFragment$3$treeSanitizer$validator(t1, html, treeSanitizer, validator); + fragment.toString; + t1 = new H.WhereIterable(new W._ChildNodeListLazy(fragment), new W.closure(), [W.Node]); + return t1.get$single(t1); + }, + Element__safeTagName: function(element) { + var result, t1, exception; + result = "element tag unavailable"; + try { + t1 = J.get$tagName$x(element); + if (typeof t1 === "string") + result = element.tagName; + } catch (exception) { + H.unwrapException(exception); + } + return result; + }, + _JenkinsSmiHash_combine: function(hash, value) { + hash = 536870911 & hash + value; + hash = 536870911 & hash + ((524287 & hash) << 10); + return hash ^ hash >>> 6; + }, + _JenkinsSmiHash_finish: function(hash) { + hash = 536870911 & hash + ((67108863 & hash) << 3); + hash ^= hash >>> 11; + return 536870911 & hash + ((16383 & hash) << 15); + }, + _convertNativeToDart_Window: function(win) { + if (win == null) + return; + return W._DOMWindowCrossFrame__createSafe(win); + }, + _convertNativeToDart_EventTarget: function(e) { + var $window; + if (e == null) + return; + if ("postMessage" in e) { + $window = W._DOMWindowCrossFrame__createSafe(e); + if (!!J.getInterceptor($window).$isEventTarget) + return $window; + return; + } else + return e; + }, + _wrapZone: function(callback) { + var t1 = $.Zone__current; + if (t1 === C.C__RootZone) + return callback; + return t1.bindUnaryCallback$2$runGuarded(callback, true); + }, + HtmlElement: { + "^": "Element;", + "%": "HTMLBRElement|HTMLCanvasElement|HTMLContentElement|HTMLDListElement|HTMLDataListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLFontElement|HTMLFrameElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLImageElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLMarqueeElement|HTMLMenuElement|HTMLMenuItemElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLOptGroupElement|HTMLOptionElement|HTMLParagraphElement|HTMLPictureElement|HTMLPreElement|HTMLProgressElement|HTMLQuoteElement|HTMLScriptElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableHeaderCellElement|HTMLTitleElement|HTMLTrackElement|HTMLUListElement|HTMLUnknownElement;HTMLElement" + }, + AnchorElement: { + "^": "HtmlElement;target=,href}", + toString$0: function(receiver) { + return String(receiver); + }, + $isInterceptor: 1, + "%": "HTMLAnchorElement" + }, + AreaElement: { + "^": "HtmlElement;target=,href}", + toString$0: function(receiver) { + return String(receiver); + }, + $isInterceptor: 1, + "%": "HTMLAreaElement" + }, + BaseElement: { + "^": "HtmlElement;href},target=", + "%": "HTMLBaseElement" + }, + BodyElement: { + "^": "HtmlElement;", + $isBodyElement: 1, + $isEventTarget: 1, + $isInterceptor: 1, + "%": "HTMLBodyElement" + }, + ButtonElement: { + "^": "HtmlElement;name=", + "%": "HTMLButtonElement" + }, + CharacterData: { + "^": "Node;length=", + $isInterceptor: 1, + "%": "CDATASection|Comment|Text;CharacterData" + }, + Client: { + "^": "Interceptor;id=", + "%": "Client|WindowClient" + }, + Document: { + "^": "Node;", + get$onClick: function(receiver) { + return new W._EventStream(receiver, "click", false, [W.MouseEvent]); + }, + "%": "Document|HTMLDocument|XMLDocument" + }, + DocumentFragment: { + "^": "Node;", + $isInterceptor: 1, + "%": "DocumentFragment|ShadowRoot" + }, + DomException: { + "^": "Interceptor;", + toString$0: function(receiver) { + return String(receiver); + }, + "%": "DOMException" + }, + DomRectReadOnly: { + "^": "Interceptor;", + toString$0: function(receiver) { + return "Rectangle (" + H.S(receiver.left) + ", " + H.S(receiver.top) + ") " + H.S(this.get$width(receiver)) + " x " + H.S(this.get$height(receiver)); + }, + $eq: function(receiver, other) { + var t1; + if (other == null) + return false; + t1 = J.getInterceptor(other); + if (!t1.$isRectangle) + return false; + return receiver.left === t1.get$left(other) && receiver.top === t1.get$top(other) && this.get$width(receiver) === t1.get$width(other) && this.get$height(receiver) === t1.get$height(other); + }, + get$hashCode: function(receiver) { + var t1, t2, t3, t4; + t1 = receiver.left; + t2 = receiver.top; + t3 = this.get$width(receiver); + t4 = this.get$height(receiver); + return W._JenkinsSmiHash_finish(W._JenkinsSmiHash_combine(W._JenkinsSmiHash_combine(W._JenkinsSmiHash_combine(W._JenkinsSmiHash_combine(0, t1 & 0x1FFFFFFF), t2 & 0x1FFFFFFF), t3 & 0x1FFFFFFF), t4 & 0x1FFFFFFF)); + }, + get$height: function(receiver) { + return receiver.height; + }, + get$left: function(receiver) { + return receiver.left; + }, + get$top: function(receiver) { + return receiver.top; + }, + get$width: function(receiver) { + return receiver.width; + }, + $isRectangle: 1, + $asRectangle: Isolate.functionThatReturnsNull, + "%": ";DOMRectReadOnly" + }, + _FrozenElementList: { + "^": "ListBase;_nodeList,$ti", + get$length: function(_) { + return this._nodeList.length; + }, + $index: function(_, index) { + var t1 = this._nodeList; + if (index >>> 0 !== index || index >= t1.length) + return H.ioore(t1, index); + return t1[index]; + }, + $indexSet: function(_, index, value) { + throw H.wrapException(new P.UnsupportedError("Cannot modify list")); + }, + set$length: function(_, newLength) { + throw H.wrapException(new P.UnsupportedError("Cannot modify list")); + }, + $isList: 1, + $asList: null, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: null + }, + Element: { + "^": "Node;id=,_namespaceUri:namespaceURI=,tagName=", + get$attributes: function(receiver) { + return new W._ElementAttributeMap(receiver); + }, + toString$0: function(receiver) { + return receiver.localName; + }, + createFragment$3$treeSanitizer$validator: ["super$Element$createFragment", function(receiver, html, treeSanitizer, validator) { + var t1, t2, base, contextElement, fragment; + if (treeSanitizer == null) { + t1 = $.Element__defaultValidator; + if (t1 == null) { + t1 = H.setRuntimeTypeInfo([], [W.NodeValidator]); + t2 = new W.NodeValidatorBuilder(t1); + t1.push(W._Html5NodeValidator$(null)); + t1.push(W._TemplatingNodeValidator$()); + $.Element__defaultValidator = t2; + validator = t2; + } else + validator = t1; + t1 = $.Element__defaultSanitizer; + if (t1 == null) { + t1 = new W._ValidatingTreeSanitizer(validator); + $.Element__defaultSanitizer = t1; + treeSanitizer = t1; + } else { + t1.validator = validator; + treeSanitizer = t1; + } + } + if ($.Element__parseDocument == null) { + t1 = document; + t2 = t1.implementation.createHTMLDocument(""); + $.Element__parseDocument = t2; + $.Element__parseRange = t2.createRange(); + t2 = $.Element__parseDocument; + t2.toString; + base = t2.createElement("base"); + J.set$href$x(base, t1.baseURI); + $.Element__parseDocument.head.appendChild(base); + } + t1 = $.Element__parseDocument; + if (t1.body == null) { + t1.toString; + t2 = t1.createElement("body"); + t1.body = t2; + } + t1 = $.Element__parseDocument; + if (!!this.$isBodyElement) + contextElement = t1.body; + else { + t2 = receiver.tagName; + t1.toString; + contextElement = t1.createElement(t2); + $.Element__parseDocument.body.appendChild(contextElement); + } + if ("createContextualFragment" in window.Range.prototype && !C.JSArray_methods.contains$1(C.List_ego, receiver.tagName)) { + $.Element__parseRange.selectNodeContents(contextElement); + fragment = $.Element__parseRange.createContextualFragment(html); + } else { + contextElement.innerHTML = html; + fragment = $.Element__parseDocument.createDocumentFragment(); + for (; t1 = contextElement.firstChild, t1 != null;) + fragment.appendChild(t1); + } + t1 = $.Element__parseDocument.body; + if (contextElement == null ? t1 != null : contextElement !== t1) + J.remove$0$ax(contextElement); + treeSanitizer.sanitizeTree$1(fragment); + document.adoptNode(fragment); + return fragment; + }, function($receiver, html, treeSanitizer) { + return this.createFragment$3$treeSanitizer$validator($receiver, html, treeSanitizer, null); + }, "createFragment$2$treeSanitizer", null, null, "get$createFragment", 2, 5, null, 0, 0], + set$innerHtml: function(receiver, html) { + this.setInnerHtml$1(receiver, html); + }, + setInnerHtml$3$treeSanitizer$validator: function(receiver, html, treeSanitizer, validator) { + receiver.textContent = null; + receiver.appendChild(this.createFragment$3$treeSanitizer$validator(receiver, html, treeSanitizer, validator)); + }, + setInnerHtml$1: function($receiver, html) { + return this.setInnerHtml$3$treeSanitizer$validator($receiver, html, null, null); + }, + get$onClick: function(receiver) { + return new W._ElementEventStreamImpl(receiver, "click", false, [W.MouseEvent]); + }, + $isElement: 1, + $isNode: 1, + $isObject: 1, + $isInterceptor: 1, + $isEventTarget: 1, + "%": ";Element" + }, + closure: { + "^": "Closure:1;", + call$1: function(e) { + return !!J.getInterceptor(e).$isElement; + } + }, + EmbedElement: { + "^": "HtmlElement;name=", + "%": "HTMLEmbedElement" + }, + ErrorEvent: { + "^": "Event;error=", + "%": "ErrorEvent" + }, + Event: { + "^": "Interceptor;", + get$target: function(receiver) { + return W._convertNativeToDart_EventTarget(receiver.target); + }, + preventDefault$0: function(receiver) { + return receiver.preventDefault(); + }, + "%": "AnimationEvent|AnimationPlayerEvent|ApplicationCacheErrorEvent|AudioProcessingEvent|AutocompleteErrorEvent|BeforeInstallPromptEvent|BeforeUnloadEvent|BlobEvent|ClipboardEvent|CloseEvent|CompositionEvent|CustomEvent|DeviceLightEvent|DeviceMotionEvent|DeviceOrientationEvent|DragEvent|ExtendableEvent|ExtendableMessageEvent|FetchEvent|FocusEvent|FontFaceSetLoadEvent|GamepadEvent|HashChangeEvent|IDBVersionChangeEvent|InstallEvent|KeyboardEvent|MIDIConnectionEvent|MIDIMessageEvent|MediaEncryptedEvent|MediaKeyMessageEvent|MediaQueryListEvent|MediaStreamEvent|MediaStreamTrackEvent|MessageEvent|MouseEvent|NotificationEvent|OfflineAudioCompletionEvent|PageTransitionEvent|PointerEvent|PopStateEvent|PresentationConnectionAvailableEvent|PresentationConnectionCloseEvent|ProgressEvent|PromiseRejectionEvent|PushEvent|RTCDTMFToneChangeEvent|RTCDataChannelEvent|RTCIceCandidateEvent|RTCPeerConnectionIceEvent|RelatedEvent|ResourceProgressEvent|SVGZoomEvent|SecurityPolicyViolationEvent|ServicePortConnectEvent|ServiceWorkerMessageEvent|SpeechRecognitionEvent|SpeechSynthesisEvent|StorageEvent|SyncEvent|TextEvent|TouchEvent|TrackEvent|TransitionEvent|UIEvent|USBConnectionEvent|WebGLContextEvent|WebKitTransitionEvent|WheelEvent;Event|InputEvent" + }, + EventTarget: { + "^": "Interceptor;", + addEventListener$3: function(receiver, type, listener, useCapture) { + if (listener != null) + this._addEventListener$3(receiver, type, listener, false); + }, + removeEventListener$3: function(receiver, type, listener, useCapture) { + if (listener != null) + this._removeEventListener$3(receiver, type, listener, false); + }, + _addEventListener$3: function(receiver, type, listener, options) { + return receiver.addEventListener(type, H.convertDartClosureToJS(listener, 1), false); + }, + _removeEventListener$3: function(receiver, type, listener, options) { + return receiver.removeEventListener(type, H.convertDartClosureToJS(listener, 1), false); + }, + $isEventTarget: 1, + "%": "MessagePort;EventTarget" + }, + FieldSetElement: { + "^": "HtmlElement;name=", + "%": "HTMLFieldSetElement" + }, + FormElement: { + "^": "HtmlElement;length=,name=,target=", + "%": "HTMLFormElement" + }, + GeofencingEvent: { + "^": "Event;id=", + "%": "GeofencingEvent" + }, + HttpRequest: { + "^": "HttpRequestEventTarget;", + open$5$async$password$user: function(receiver, method, url, async, password, user) { + return receiver.open(method, url, async, user, password); + }, + open$2: function($receiver, method, url) { + return $receiver.open(method, url); + }, + send$1: function(receiver, body_OR_data) { + return receiver.send(body_OR_data); + }, + "%": "XMLHttpRequest" + }, + HttpRequestEventTarget: { + "^": "EventTarget;", + "%": ";XMLHttpRequestEventTarget" + }, + IFrameElement: { + "^": "HtmlElement;name=", + "%": "HTMLIFrameElement" + }, + InputElement: { + "^": "HtmlElement;name=", + $isElement: 1, + $isInterceptor: 1, + $isEventTarget: 1, + "%": "HTMLInputElement" + }, + KeygenElement: { + "^": "HtmlElement;name=", + "%": "HTMLKeygenElement" + }, + LinkElement: { + "^": "HtmlElement;href}", + "%": "HTMLLinkElement" + }, + Location: { + "^": "Interceptor;", + toString$0: function(receiver) { + return String(receiver); + }, + "%": "Location" + }, + MapElement: { + "^": "HtmlElement;name=", + "%": "HTMLMapElement" + }, + MediaElement: { + "^": "HtmlElement;error=", + "%": "HTMLAudioElement|HTMLMediaElement|HTMLVideoElement" + }, + MediaStream: { + "^": "EventTarget;id=", + "%": "MediaStream" + }, + MetaElement: { + "^": "HtmlElement;name=", + "%": "HTMLMetaElement" + }, + MidiOutput: { + "^": "MidiPort;", + send$2: function(receiver, data, timestamp) { + return receiver.send(data, timestamp); + }, + send$1: function($receiver, data) { + return $receiver.send(data); + }, + "%": "MIDIOutput" + }, + MidiPort: { + "^": "EventTarget;id=", + "%": "MIDIInput;MIDIPort" + }, + Navigator: { + "^": "Interceptor;", + $isInterceptor: 1, + "%": "Navigator" + }, + _ChildNodeListLazy: { + "^": "ListBase;_this", + get$single: function(_) { + var t1, l; + t1 = this._this; + l = t1.childNodes.length; + if (l === 0) + throw H.wrapException(new P.StateError("No elements")); + if (l > 1) + throw H.wrapException(new P.StateError("More than one element")); + return t1.firstChild; + }, + add$1: function(_, value) { + this._this.appendChild(value); + }, + addAll$1: function(_, iterable) { + var t1, t2, len, i; + t1 = iterable._this; + t2 = this._this; + if (t1 !== t2) + for (len = t1.childNodes.length, i = 0; i < len; ++i) + t2.appendChild(t1.firstChild); + return; + }, + $indexSet: function(_, index, value) { + var t1, t2; + t1 = this._this; + t2 = t1.childNodes; + if (index >>> 0 !== index || index >= t2.length) + return H.ioore(t2, index); + t1.replaceChild(value, t2[index]); + }, + get$iterator: function(_) { + var t1 = this._this.childNodes; + return new W.FixedSizeListIterator(t1, t1.length, -1, null); + }, + get$length: function(_) { + return this._this.childNodes.length; + }, + set$length: function(_, value) { + throw H.wrapException(new P.UnsupportedError("Cannot set length on immutable List.")); + }, + $index: function(_, index) { + var t1 = this._this.childNodes; + if (index >>> 0 !== index || index >= t1.length) + return H.ioore(t1, index); + return t1[index]; + }, + $asListBase: function() { + return [W.Node]; + }, + $asList: function() { + return [W.Node]; + }, + $asEfficientLengthIterable: function() { + return [W.Node]; + } + }, + Node: { + "^": "EventTarget;parent:parentElement=,parentNode=,previousNode:previousSibling=", + get$nodes: function(receiver) { + return new W._ChildNodeListLazy(receiver); + }, + remove$0: function(receiver) { + var t1 = receiver.parentNode; + if (t1 != null) + t1.removeChild(receiver); + }, + toString$0: function(receiver) { + var value = receiver.nodeValue; + return value == null ? this.super$Interceptor$toString(receiver) : value; + }, + $isNode: 1, + $isObject: 1, + "%": ";Node" + }, + NodeList: { + "^": "Interceptor_ListMixin_ImmutableListMixin;", + get$length: function(receiver) { + return receiver.length; + }, + $index: function(receiver, index) { + if (index >>> 0 !== index || index >= receiver.length) + throw H.wrapException(P.IndexError$(index, receiver, null, null, null)); + return receiver[index]; + }, + $indexSet: function(receiver, index, value) { + throw H.wrapException(new P.UnsupportedError("Cannot assign element of immutable List.")); + }, + set$length: function(receiver, value) { + throw H.wrapException(new P.UnsupportedError("Cannot resize immutable List.")); + }, + elementAt$1: function(receiver, index) { + if (index < 0 || index >= receiver.length) + return H.ioore(receiver, index); + return receiver[index]; + }, + $isList: 1, + $asList: function() { + return [W.Node]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [W.Node]; + }, + $isJavaScriptIndexingBehavior: 1, + $asJavaScriptIndexingBehavior: function() { + return [W.Node]; + }, + $isJSIndexable: 1, + $asJSIndexable: function() { + return [W.Node]; + }, + "%": "NodeList|RadioNodeList" + }, + Interceptor_ListMixin: { + "^": "Interceptor+ListMixin;", + $asList: function() { + return [W.Node]; + }, + $asEfficientLengthIterable: function() { + return [W.Node]; + }, + $isList: 1, + $isEfficientLengthIterable: 1 + }, + Interceptor_ListMixin_ImmutableListMixin: { + "^": "Interceptor_ListMixin+ImmutableListMixin;", + $asList: function() { + return [W.Node]; + }, + $asEfficientLengthIterable: function() { + return [W.Node]; + }, + $isList: 1, + $isEfficientLengthIterable: 1 + }, + ObjectElement: { + "^": "HtmlElement;name=", + "%": "HTMLObjectElement" + }, + OutputElement: { + "^": "HtmlElement;name=", + "%": "HTMLOutputElement" + }, + ParamElement: { + "^": "HtmlElement;name=", + "%": "HTMLParamElement" + }, + ProcessingInstruction: { + "^": "CharacterData;target=", + "%": "ProcessingInstruction" + }, + SelectElement: { + "^": "HtmlElement;length=,name=", + "%": "HTMLSelectElement" + }, + SlotElement: { + "^": "HtmlElement;name=", + "%": "HTMLSlotElement" + }, + SpeechRecognitionError: { + "^": "Event;error=", + "%": "SpeechRecognitionError" + }, + TableElement: { + "^": "HtmlElement;", + createFragment$3$treeSanitizer$validator: function(receiver, html, treeSanitizer, validator) { + var table, fragment; + if ("createContextualFragment" in window.Range.prototype) + return this.super$Element$createFragment(receiver, html, treeSanitizer, validator); + table = W.Element_Element$html("" + html + "
", treeSanitizer, validator); + fragment = document.createDocumentFragment(); + fragment.toString; + new W._ChildNodeListLazy(fragment).addAll$1(0, J.get$nodes$x(table)); + return fragment; + }, + "%": "HTMLTableElement" + }, + TableRowElement: { + "^": "HtmlElement;", + createFragment$3$treeSanitizer$validator: function(receiver, html, treeSanitizer, validator) { + var t1, fragment, section, row; + if ("createContextualFragment" in window.Range.prototype) + return this.super$Element$createFragment(receiver, html, treeSanitizer, validator); + t1 = document; + fragment = t1.createDocumentFragment(); + t1 = C.TableElement_methods.createFragment$3$treeSanitizer$validator(t1.createElement("table"), html, treeSanitizer, validator); + t1.toString; + t1 = new W._ChildNodeListLazy(t1); + section = t1.get$single(t1); + section.toString; + t1 = new W._ChildNodeListLazy(section); + row = t1.get$single(t1); + fragment.toString; + row.toString; + new W._ChildNodeListLazy(fragment).addAll$1(0, new W._ChildNodeListLazy(row)); + return fragment; + }, + "%": "HTMLTableRowElement" + }, + TableSectionElement: { + "^": "HtmlElement;", + createFragment$3$treeSanitizer$validator: function(receiver, html, treeSanitizer, validator) { + var t1, fragment, section; + if ("createContextualFragment" in window.Range.prototype) + return this.super$Element$createFragment(receiver, html, treeSanitizer, validator); + t1 = document; + fragment = t1.createDocumentFragment(); + t1 = C.TableElement_methods.createFragment$3$treeSanitizer$validator(t1.createElement("table"), html, treeSanitizer, validator); + t1.toString; + t1 = new W._ChildNodeListLazy(t1); + section = t1.get$single(t1); + fragment.toString; + section.toString; + new W._ChildNodeListLazy(fragment).addAll$1(0, new W._ChildNodeListLazy(section)); + return fragment; + }, + "%": "HTMLTableSectionElement" + }, + TemplateElement: { + "^": "HtmlElement;", + setInnerHtml$3$treeSanitizer$validator: function(receiver, html, treeSanitizer, validator) { + var fragment; + receiver.textContent = null; + fragment = this.createFragment$3$treeSanitizer$validator(receiver, html, treeSanitizer, validator); + receiver.content.appendChild(fragment); + }, + setInnerHtml$1: function($receiver, html) { + return this.setInnerHtml$3$treeSanitizer$validator($receiver, html, null, null); + }, + $isTemplateElement: 1, + "%": "HTMLTemplateElement" + }, + TextAreaElement: { + "^": "HtmlElement;name=", + "%": "HTMLTextAreaElement" + }, + Window: { + "^": "EventTarget;", + get$parent: function(receiver) { + return W._convertNativeToDart_Window(receiver.parent); + }, + $isInterceptor: 1, + $isEventTarget: 1, + "%": "DOMWindow|Window" + }, + _Attr: { + "^": "Node;name=,_namespaceUri:namespaceURI=", + "%": "Attr" + }, + _ClientRect: { + "^": "Interceptor;height=,left=,top=,width=", + toString$0: function(receiver) { + return "Rectangle (" + H.S(receiver.left) + ", " + H.S(receiver.top) + ") " + H.S(receiver.width) + " x " + H.S(receiver.height); + }, + $eq: function(receiver, other) { + var t1, t2, t3; + if (other == null) + return false; + t1 = J.getInterceptor(other); + if (!t1.$isRectangle) + return false; + t2 = receiver.left; + t3 = t1.get$left(other); + if (t2 == null ? t3 == null : t2 === t3) { + t2 = receiver.top; + t3 = t1.get$top(other); + if (t2 == null ? t3 == null : t2 === t3) { + t2 = receiver.width; + t3 = t1.get$width(other); + if (t2 == null ? t3 == null : t2 === t3) { + t2 = receiver.height; + t1 = t1.get$height(other); + t1 = t2 == null ? t1 == null : t2 === t1; + } else + t1 = false; + } else + t1 = false; + } else + t1 = false; + return t1; + }, + get$hashCode: function(receiver) { + var t1, t2, t3, t4; + t1 = J.get$hashCode$(receiver.left); + t2 = J.get$hashCode$(receiver.top); + t3 = J.get$hashCode$(receiver.width); + t4 = J.get$hashCode$(receiver.height); + return W._JenkinsSmiHash_finish(W._JenkinsSmiHash_combine(W._JenkinsSmiHash_combine(W._JenkinsSmiHash_combine(W._JenkinsSmiHash_combine(0, t1), t2), t3), t4)); + }, + $isRectangle: 1, + $asRectangle: Isolate.functionThatReturnsNull, + "%": "ClientRect" + }, + _DocumentType: { + "^": "Node;", + $isInterceptor: 1, + "%": "DocumentType" + }, + _DomRect: { + "^": "DomRectReadOnly;", + get$height: function(receiver) { + return receiver.height; + }, + get$width: function(receiver) { + return receiver.width; + }, + "%": "DOMRect" + }, + _HTMLFrameSetElement: { + "^": "HtmlElement;", + $isEventTarget: 1, + $isInterceptor: 1, + "%": "HTMLFrameSetElement" + }, + _NamedNodeMap: { + "^": "Interceptor_ListMixin_ImmutableListMixin0;", + get$length: function(receiver) { + return receiver.length; + }, + $index: function(receiver, index) { + if (index >>> 0 !== index || index >= receiver.length) + throw H.wrapException(P.IndexError$(index, receiver, null, null, null)); + return receiver[index]; + }, + $indexSet: function(receiver, index, value) { + throw H.wrapException(new P.UnsupportedError("Cannot assign element of immutable List.")); + }, + set$length: function(receiver, value) { + throw H.wrapException(new P.UnsupportedError("Cannot resize immutable List.")); + }, + elementAt$1: function(receiver, index) { + if (index < 0 || index >= receiver.length) + return H.ioore(receiver, index); + return receiver[index]; + }, + $isList: 1, + $asList: function() { + return [W.Node]; + }, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: function() { + return [W.Node]; + }, + $isJavaScriptIndexingBehavior: 1, + $asJavaScriptIndexingBehavior: function() { + return [W.Node]; + }, + $isJSIndexable: 1, + $asJSIndexable: function() { + return [W.Node]; + }, + "%": "MozNamedAttrMap|NamedNodeMap" + }, + Interceptor_ListMixin0: { + "^": "Interceptor+ListMixin;", + $asList: function() { + return [W.Node]; + }, + $asEfficientLengthIterable: function() { + return [W.Node]; + }, + $isList: 1, + $isEfficientLengthIterable: 1 + }, + Interceptor_ListMixin_ImmutableListMixin0: { + "^": "Interceptor_ListMixin0+ImmutableListMixin;", + $asList: function() { + return [W.Node]; + }, + $asEfficientLengthIterable: function() { + return [W.Node]; + }, + $isList: 1, + $isEfficientLengthIterable: 1 + }, + _ServiceWorker: { + "^": "EventTarget;", + $isEventTarget: 1, + $isInterceptor: 1, + "%": "ServiceWorker" + }, + _AttributeMap: { + "^": "Object;_html$_element<", + forEach$1: function(_, f) { + var t1, t2, t3, _i, key; + for (t1 = this.get$keys(), t2 = t1.length, t3 = this._html$_element, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) { + key = t1[_i]; + f.call$2(key, t3.getAttribute(key)); + } + }, + get$keys: function() { + var attributes, keys, len, i, attr, t1; + attributes = this._html$_element.attributes; + keys = H.setRuntimeTypeInfo([], [P.String]); + for (len = attributes.length, i = 0; i < len; ++i) { + if (i >= attributes.length) + return H.ioore(attributes, i); + attr = attributes[i]; + t1 = J.getInterceptor$x(attr); + if (t1.get$_namespaceUri(attr) == null) + keys.push(t1.get$name(attr)); + } + return keys; + }, + $isMap: 1, + $asMap: function() { + return [P.String, P.String]; + } + }, + _ElementAttributeMap: { + "^": "_AttributeMap;_html$_element", + $index: function(_, key) { + return this._html$_element.getAttribute(key); + }, + $indexSet: function(_, key, value) { + this._html$_element.setAttribute(key, value); + }, + get$length: function(_) { + return this.get$keys().length; + } + }, + _EventStream: { + "^": "Stream;_html$_target,_eventType,_useCapture,$ti", + listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) { + return W._EventStreamSubscription$(this._html$_target, this._eventType, onData, false, H.getTypeArgumentByIndex(this, 0)); + }, + listen$3$onDone$onError: function(onData, onDone, onError) { + return this.listen$4$cancelOnError$onDone$onError(onData, null, onDone, onError); + } + }, + _ElementEventStreamImpl: { + "^": "_EventStream;_html$_target,_eventType,_useCapture,$ti" + }, + _EventStreamSubscription: { + "^": "StreamSubscription;_pauseCount,_html$_target,_eventType,_onData,_useCapture,$ti", + cancel$0: function() { + if (this._html$_target == null) + return; + this._unlisten$0(); + this._html$_target = null; + this._onData = null; + return; + }, + pause$1: function(_, resumeSignal) { + if (this._html$_target == null) + return; + ++this._pauseCount; + this._unlisten$0(); + }, + pause$0: function($receiver) { + return this.pause$1($receiver, null); + }, + resume$0: function() { + if (this._html$_target == null || this._pauseCount <= 0) + return; + --this._pauseCount; + this._tryResume$0(); + }, + _tryResume$0: function() { + var t1 = this._onData; + if (t1 != null && this._pauseCount <= 0) + J.addEventListener$3$x(this._html$_target, this._eventType, t1, false); + }, + _unlisten$0: function() { + var t1 = this._onData; + if (t1 != null) + J.removeEventListener$3$x(this._html$_target, this._eventType, t1, false); + }, + _EventStreamSubscription$4: function(_target, _eventType, onData, _useCapture, $T) { + this._tryResume$0(); + }, + static: { + _EventStreamSubscription$: function(_target, _eventType, onData, _useCapture, $T) { + var t1 = W._wrapZone(new W._EventStreamSubscription_closure(onData)); + t1 = new W._EventStreamSubscription(0, _target, _eventType, t1, false, [$T]); + t1._EventStreamSubscription$4(_target, _eventType, onData, false, $T); + return t1; + } + } + }, + _EventStreamSubscription_closure: { + "^": "Closure:1;onData", + call$1: function(e) { + return this.onData.call$1(e); + } + }, + _Html5NodeValidator: { + "^": "Object;uriPolicy<", + allowsElement$1: function(element) { + return $.$get$_Html5NodeValidator__allowedElements().contains$1(0, W.Element__safeTagName(element)); + }, + allowsAttribute$3: function(element, attributeName, value) { + var tagName, t1, validator; + tagName = W.Element__safeTagName(element); + t1 = $.$get$_Html5NodeValidator__attributeValidators(); + validator = t1.$index(0, H.S(tagName) + "::" + attributeName); + if (validator == null) + validator = t1.$index(0, "*::" + attributeName); + if (validator == null) + return false; + return validator.call$4(element, attributeName, value, this); + }, + _Html5NodeValidator$1$uriPolicy: function(uriPolicy) { + var t1, _i; + t1 = $.$get$_Html5NodeValidator__attributeValidators(); + if (t1.get$isEmpty(t1)) { + for (_i = 0; _i < 262; ++_i) + t1.$indexSet(0, C.List_2Zi[_i], W.html__Html5NodeValidator__standardAttributeValidator$closure()); + for (_i = 0; _i < 12; ++_i) + t1.$indexSet(0, C.List_yrN[_i], W.html__Html5NodeValidator__uriAttributeValidator$closure()); + } + }, + static: { + _Html5NodeValidator$: function(uriPolicy) { + var e, t1; + e = document.createElement("a"); + t1 = new W._SameOriginUriPolicy(e, window.location); + t1 = new W._Html5NodeValidator(t1); + t1._Html5NodeValidator$1$uriPolicy(uriPolicy); + return t1; + }, + _Html5NodeValidator__standardAttributeValidator: [function(element, attributeName, value, context) { + return true; + }, "call$4", "html__Html5NodeValidator__standardAttributeValidator$closure", 8, 0, 5], + _Html5NodeValidator__uriAttributeValidator: [function(element, attributeName, value, context) { + var t1, t2, t3, t4, t5; + t1 = context.get$uriPolicy(); + t2 = t1._hiddenAnchor; + t2.href = value; + t3 = t2.hostname; + t1 = t1._loc; + t4 = t1.hostname; + if (t3 == null ? t4 == null : t3 === t4) { + t4 = t2.port; + t5 = t1.port; + if (t4 == null ? t5 == null : t4 === t5) { + t4 = t2.protocol; + t1 = t1.protocol; + t1 = t4 == null ? t1 == null : t4 === t1; + } else + t1 = false; + } else + t1 = false; + if (!t1) + if (t3 === "") + if (t2.port === "") { + t1 = t2.protocol; + t1 = t1 === ":" || t1 === ""; + } else + t1 = false; + else + t1 = false; + else + t1 = true; + return t1; + }, "call$4", "html__Html5NodeValidator__uriAttributeValidator$closure", 8, 0, 5] + } + }, + ImmutableListMixin: { + "^": "Object;$ti", + get$iterator: function(receiver) { + return new W.FixedSizeListIterator(receiver, this.get$length(receiver), -1, null); + }, + add$1: function(receiver, value) { + throw H.wrapException(new P.UnsupportedError("Cannot add to immutable List.")); + }, + $isList: 1, + $asList: null, + $isEfficientLengthIterable: 1, + $asEfficientLengthIterable: null + }, + NodeValidatorBuilder: { + "^": "Object;_validators", + add$1: function(_, validator) { + this._validators.push(validator); + }, + allowsElement$1: function(element) { + return C.JSArray_methods.any$1(this._validators, new W.NodeValidatorBuilder_allowsElement_closure(element)); + }, + allowsAttribute$3: function(element, attributeName, value) { + return C.JSArray_methods.any$1(this._validators, new W.NodeValidatorBuilder_allowsAttribute_closure(element, attributeName, value)); + } + }, + NodeValidatorBuilder_allowsElement_closure: { + "^": "Closure:1;element", + call$1: function(v) { + return v.allowsElement$1(this.element); + } + }, + NodeValidatorBuilder_allowsAttribute_closure: { + "^": "Closure:1;element,attributeName,value", + call$1: function(v) { + return v.allowsAttribute$3(this.element, this.attributeName, this.value); + } + }, + _SimpleNodeValidator: { + "^": "Object;uriPolicy<", + allowsElement$1: function(element) { + return this.allowedElements.contains$1(0, W.Element__safeTagName(element)); + }, + allowsAttribute$3: ["super$_SimpleNodeValidator$allowsAttribute", function(element, attributeName, value) { + var tagName, t1; + tagName = W.Element__safeTagName(element); + t1 = this.allowedUriAttributes; + if (t1.contains$1(0, H.S(tagName) + "::" + attributeName)) + return this.uriPolicy.allowsUri$1(value); + else if (t1.contains$1(0, "*::" + attributeName)) + return this.uriPolicy.allowsUri$1(value); + else { + t1 = this.allowedAttributes; + if (t1.contains$1(0, H.S(tagName) + "::" + attributeName)) + return true; + else if (t1.contains$1(0, "*::" + attributeName)) + return true; + else if (t1.contains$1(0, H.S(tagName) + "::*")) + return true; + else if (t1.contains$1(0, "*::*")) + return true; + } + return false; + }], + _SimpleNodeValidator$4$allowedAttributes$allowedElements$allowedUriAttributes: function(uriPolicy, allowedAttributes, allowedElements, allowedUriAttributes) { + var legalAttributes, extraUriAttributes, t1; + this.allowedElements.addAll$1(0, allowedElements); + legalAttributes = allowedAttributes.where$1(0, new W._SimpleNodeValidator_closure()); + extraUriAttributes = allowedAttributes.where$1(0, new W._SimpleNodeValidator_closure0()); + this.allowedAttributes.addAll$1(0, legalAttributes); + t1 = this.allowedUriAttributes; + t1.addAll$1(0, C.List_empty); + t1.addAll$1(0, extraUriAttributes); + } + }, + _SimpleNodeValidator_closure: { + "^": "Closure:1;", + call$1: function(x) { + return !C.JSArray_methods.contains$1(C.List_yrN, x); + } + }, + _SimpleNodeValidator_closure0: { + "^": "Closure:1;", + call$1: function(x) { + return C.JSArray_methods.contains$1(C.List_yrN, x); + } + }, + _TemplatingNodeValidator: { + "^": "_SimpleNodeValidator;_templateAttrs,allowedElements,allowedAttributes,allowedUriAttributes,uriPolicy", + allowsAttribute$3: function(element, attributeName, value) { + if (this.super$_SimpleNodeValidator$allowsAttribute(element, attributeName, value)) + return true; + if (attributeName === "template" && value === "") + return true; + if (J.get$attributes$x(element)._html$_element.getAttribute("template") === "") + return this._templateAttrs.contains$1(0, attributeName); + return false; + }, + static: { + _TemplatingNodeValidator$: function() { + var t1 = P.String; + t1 = new W._TemplatingNodeValidator(P.LinkedHashSet_LinkedHashSet$from(C.List_wSV, t1), P.LinkedHashSet_LinkedHashSet(null, null, null, t1), P.LinkedHashSet_LinkedHashSet(null, null, null, t1), P.LinkedHashSet_LinkedHashSet(null, null, null, t1), null); + t1._SimpleNodeValidator$4$allowedAttributes$allowedElements$allowedUriAttributes(null, new H.MappedListIterable(C.List_wSV, new W._TemplatingNodeValidator_closure(), [H.getTypeArgumentByIndex(C.List_wSV, 0), null]), ["TEMPLATE"], null); + return t1; + } + } + }, + _TemplatingNodeValidator_closure: { + "^": "Closure:1;", + call$1: function(attr) { + return "TEMPLATE::" + H.S(attr); + } + }, + _SvgNodeValidator: { + "^": "Object;", + allowsElement$1: function(element) { + var t1 = J.getInterceptor(element); + if (!!t1.$isScriptElement) + return false; + t1 = !!t1.$isSvgElement; + if (t1 && W.Element__safeTagName(element) === "foreignObject") + return false; + if (t1) + return true; + return false; + }, + allowsAttribute$3: function(element, attributeName, value) { + if (attributeName === "is" || C.JSString_methods.startsWith$1(attributeName, "on")) + return false; + return this.allowsElement$1(element); + } + }, + FixedSizeListIterator: { + "^": "Object;_array,_html$_length,_position,_html$_current", + moveNext$0: function() { + var nextPosition, t1; + nextPosition = this._position + 1; + t1 = this._html$_length; + if (nextPosition < t1) { + this._html$_current = J.$index$asx(this._array, nextPosition); + this._position = nextPosition; + return true; + } + this._html$_current = null; + this._position = t1; + return false; + }, + get$current: function() { + return this._html$_current; + } + }, + _DOMWindowCrossFrame: { + "^": "Object;_window", + get$parent: function(_) { + return W._DOMWindowCrossFrame__createSafe(this._window.parent); + }, + addEventListener$3: function(_, type, listener, useCapture) { + return H.throwExpression(new P.UnsupportedError("You can only attach EventListeners to your own window.")); + }, + removeEventListener$3: function(_, type, listener, useCapture) { + return H.throwExpression(new P.UnsupportedError("You can only attach EventListeners to your own window.")); + }, + $isEventTarget: 1, + $isInterceptor: 1, + static: { + _DOMWindowCrossFrame__createSafe: function(w) { + if (w === window) + return w; + else + return new W._DOMWindowCrossFrame(w); + } + } + }, + NodeValidator: { + "^": "Object;" + }, + _SameOriginUriPolicy: { + "^": "Object;_hiddenAnchor,_loc" + }, + _ValidatingTreeSanitizer: { + "^": "Object;validator", + sanitizeTree$1: function(node) { + new W._ValidatingTreeSanitizer_sanitizeTree_walk(this).call$2(node, null); + }, + _removeNode$2: function(node, $parent) { + var t1; + if ($parent == null) { + t1 = node.parentNode; + if (t1 != null) + t1.removeChild(node); + } else + $parent.removeChild(node); + }, + _sanitizeUntrustedElement$2: function(element, $parent) { + var corrupted, attrs, isAttr, corruptedTest1, elementText, elementTagName, exception, t1; + corrupted = true; + attrs = null; + isAttr = null; + try { + attrs = J.get$attributes$x(element); + isAttr = attrs.get$_html$_element().getAttribute("is"); + corruptedTest1 = function(element) { + if (!(element.attributes instanceof NamedNodeMap)) + return true; + var childNodes = element.childNodes; + if (element.lastChild && element.lastChild !== childNodes[childNodes.length - 1]) + return true; + if (element.children) + if (!(element.children instanceof HTMLCollection || element.children instanceof NodeList)) + return true; + var length = 0; + if (element.children) + length = element.children.length; + for (var i = 0; i < length; i++) { + var child = element.children[i]; + if (child.id == 'attributes' || child.name == 'attributes' || child.id == 'lastChild' || child.name == 'lastChild' || child.id == 'children' || child.name == 'children') + return true; + } + return false; + }(element); + corrupted = corruptedTest1 === true ? true : !(element.attributes instanceof NamedNodeMap); + } catch (exception) { + H.unwrapException(exception); + } + elementText = "element unprintable"; + try { + elementText = J.toString$0$(element); + } catch (exception) { + H.unwrapException(exception); + } + try { + elementTagName = W.Element__safeTagName(element); + this._sanitizeElement$7(element, $parent, corrupted, elementText, elementTagName, attrs, isAttr); + } catch (exception) { + if (H.unwrapException(exception) instanceof P.ArgumentError) + throw exception; + else { + this._removeNode$2(element, $parent); + window; + t1 = "Removing corrupted element " + H.S(elementText); + if (typeof console != "undefined") + console.warn(t1); + } + } + }, + _sanitizeElement$7: function(element, $parent, corrupted, text, tag, attrs, isAttr) { + var t1, keys, i, $name, t2; + if (corrupted) { + this._removeNode$2(element, $parent); + window; + t1 = "Removing element due to corrupted attributes on <" + text + ">"; + if (typeof console != "undefined") + console.warn(t1); + return; + } + if (!this.validator.allowsElement$1(element)) { + this._removeNode$2(element, $parent); + window; + t1 = "Removing disallowed element <" + H.S(tag) + "> from " + J.toString$0$($parent); + if (typeof console != "undefined") + console.warn(t1); + return; + } + if (isAttr != null) + if (!this.validator.allowsAttribute$3(element, "is", isAttr)) { + this._removeNode$2(element, $parent); + window; + t1 = "Removing disallowed type extension <" + H.S(tag) + ' is="' + isAttr + '">'; + if (typeof console != "undefined") + console.warn(t1); + return; + } + t1 = attrs.get$keys(); + keys = H.setRuntimeTypeInfo(t1.slice(0), [H.getTypeArgumentByIndex(t1, 0)]); + for (i = attrs.get$keys().length - 1, t1 = attrs._html$_element; i >= 0; --i) { + if (i >= keys.length) + return H.ioore(keys, i); + $name = keys[i]; + if (!this.validator.allowsAttribute$3(element, J.toLowerCase$0$s($name), t1.getAttribute($name))) { + window; + t2 = "Removing disallowed attribute <" + H.S(tag) + " " + $name + '="' + H.S(t1.getAttribute($name)) + '">'; + if (typeof console != "undefined") + console.warn(t2); + t1.getAttribute($name); + t1.removeAttribute($name); + } + } + if (!!J.getInterceptor(element).$isTemplateElement) + this.sanitizeTree$1(element.content); + } + }, + _ValidatingTreeSanitizer_sanitizeTree_walk: { + "^": "Closure:14;$this", + call$2: function(node, $parent) { + var child, nextChild, t1, exception, t2; + t1 = this.$this; + switch (node.nodeType) { + case 1: + t1._sanitizeUntrustedElement$2(node, $parent); + break; + case 8: + case 11: + case 3: + case 4: + break; + default: + t1._removeNode$2(node, $parent); + } + child = node.lastChild; + for (t1 = node == null; null != child;) { + nextChild = null; + try { + nextChild = J.get$previousNode$x(child); + } catch (exception) { + H.unwrapException(exception); + t2 = child; + if (t1) { + if (J.get$parentNode$x(t2) != null) + t2.parentNode.removeChild(t2); + } else + node.removeChild(t2); + child = null; + nextChild = node.lastChild; + } + if (child != null) + this.call$2(child, node); + child = nextChild; + } + } + } + }], ["dart.dom.indexed_db", "dart:indexed_db",, P, { + "^": "" + }], ["dart.dom.svg", "dart:svg",, P, { + "^": "", + AElement: { + "^": "GraphicsElement;target=", + $isInterceptor: 1, + "%": "SVGAElement" + }, + AnimationElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGAnimateElement|SVGAnimateMotionElement|SVGAnimateTransformElement|SVGAnimationElement|SVGSetElement" + }, + FEBlendElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEBlendElement" + }, + FEColorMatrixElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEColorMatrixElement" + }, + FEComponentTransferElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEComponentTransferElement" + }, + FECompositeElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFECompositeElement" + }, + FEConvolveMatrixElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEConvolveMatrixElement" + }, + FEDiffuseLightingElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEDiffuseLightingElement" + }, + FEDisplacementMapElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEDisplacementMapElement" + }, + FEFloodElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEFloodElement" + }, + FEGaussianBlurElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEGaussianBlurElement" + }, + FEImageElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEImageElement" + }, + FEMergeElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEMergeElement" + }, + FEMorphologyElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEMorphologyElement" + }, + FEOffsetElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEOffsetElement" + }, + FESpecularLightingElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFESpecularLightingElement" + }, + FETileElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFETileElement" + }, + FETurbulenceElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFETurbulenceElement" + }, + FilterElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFilterElement" + }, + GraphicsElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGCircleElement|SVGClipPathElement|SVGDefsElement|SVGEllipseElement|SVGForeignObjectElement|SVGGElement|SVGGeometryElement|SVGLineElement|SVGPathElement|SVGPolygonElement|SVGPolylineElement|SVGRectElement|SVGSwitchElement;SVGGraphicsElement" + }, + ImageElement0: { + "^": "GraphicsElement;", + $isInterceptor: 1, + "%": "SVGImageElement" + }, + MarkerElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGMarkerElement" + }, + MaskElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGMaskElement" + }, + PatternElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGPatternElement" + }, + ScriptElement: { + "^": "SvgElement;", + $isScriptElement: 1, + $isInterceptor: 1, + "%": "SVGScriptElement" + }, + SvgElement: { + "^": "Element;", + set$innerHtml: function(receiver, value) { + this.setInnerHtml$1(receiver, value); + }, + createFragment$3$treeSanitizer$validator: function(receiver, svg, treeSanitizer, validator) { + var t1, html, t2, fragment, svgFragment, root; + t1 = H.setRuntimeTypeInfo([], [W.NodeValidator]); + t1.push(W._Html5NodeValidator$(null)); + t1.push(W._TemplatingNodeValidator$()); + t1.push(new W._SvgNodeValidator()); + treeSanitizer = new W._ValidatingTreeSanitizer(new W.NodeValidatorBuilder(t1)); + html = '' + svg + ""; + t1 = document; + t2 = t1.body; + fragment = (t2 && C.BodyElement_methods).createFragment$2$treeSanitizer(t2, html, treeSanitizer); + svgFragment = t1.createDocumentFragment(); + fragment.toString; + t1 = new W._ChildNodeListLazy(fragment); + root = t1.get$single(t1); + for (; t1 = root.firstChild, t1 != null;) + svgFragment.appendChild(t1); + return svgFragment; + }, + get$onClick: function(receiver) { + return new W._ElementEventStreamImpl(receiver, "click", false, [W.MouseEvent]); + }, + $isSvgElement: 1, + $isEventTarget: 1, + $isInterceptor: 1, + "%": "SVGComponentTransferFunctionElement|SVGDescElement|SVGDiscardElement|SVGFEDistantLightElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEMergeNodeElement|SVGFEPointLightElement|SVGFESpotLightElement|SVGMetadataElement|SVGStopElement|SVGStyleElement|SVGTitleElement;SVGElement" + }, + SvgSvgElement: { + "^": "GraphicsElement;", + $isInterceptor: 1, + "%": "SVGSVGElement" + }, + SymbolElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGSymbolElement" + }, + TextContentElement: { + "^": "GraphicsElement;", + "%": "SVGTSpanElement|SVGTextElement|SVGTextPositioningElement;SVGTextContentElement" + }, + TextPathElement: { + "^": "TextContentElement;", + $isInterceptor: 1, + "%": "SVGTextPathElement" + }, + UseElement: { + "^": "GraphicsElement;", + $isInterceptor: 1, + "%": "SVGUseElement" + }, + ViewElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGViewElement" + }, + _GradientElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGGradientElement|SVGLinearGradientElement|SVGRadialGradientElement" + }, + _SVGCursorElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGCursorElement" + }, + _SVGFEDropShadowElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGFEDropShadowElement" + }, + _SVGMPathElement: { + "^": "SvgElement;", + $isInterceptor: 1, + "%": "SVGMPathElement" + } + }], ["dart.dom.web_audio", "dart:web_audio",, P, { + "^": "" + }], ["dart.dom.web_gl", "dart:web_gl",, P, { + "^": "" + }], ["dart.dom.web_sql", "dart:web_sql",, P, { + "^": "" + }], ["json", "package:json/json.dart",, U, { + "^": "", + JsonListener: { + "^": "Object;" + }, + BuildJsonListener: { + "^": "JsonListener;stack,currentContainer,key,value", + propertyValue$0: function() { + J.$indexSet$ax(this.currentContainer, this.key, this.value); + this.value = null; + this.key = null; + }, + arrayElement$0: function() { + J.add$1$ax(this.currentContainer, this.value); + this.value = null; + }, + get$result: function(_) { + return this.value; + } + }, + JsonParser: { + "^": "Object;source,listener", + parse$0: function() { + var states, t1, $length, t2, t3, t4, state, position, char, position0, t5; + states = H.setRuntimeTypeInfo([], [P.int]); + t1 = this.source; + $length = t1.length; + t2 = J.getInterceptor$s(t1); + t3 = this.listener; + t4 = t3.stack; + state = 0; + position = 0; + while (true) { + if (typeof position !== "number") + return position.$lt(); + if (!(position < $length)) + break; + char = t2._codeUnitAt$1(t1, position); + switch (char) { + case 32: + case 13: + case 10: + case 9: + ++position; + break; + case 34: + if ((state & 8) !== 0) + this.fail$1(position); + position = this.parseString$1(position + 1); + state |= 28; + break; + case 91: + if ((state & 4) !== 0) + this.fail$1(position); + if (!!J.getInterceptor(t3.currentContainer).$isMap) + t4.push(t3.key); + t4.push(t3.currentContainer); + t3.currentContainer = []; + states.push(state); + ++position; + state = 1; + break; + case 123: + if ((state & 4) !== 0) + this.fail$1(position); + if (!!J.getInterceptor(t3.currentContainer).$isMap) + t4.push(t3.key); + t4.push(t3.currentContainer); + t3.currentContainer = P.LinkedHashMap__makeEmpty(); + states.push(state); + ++position; + state = 6; + break; + case 110: + if ((state & 4) !== 0) + this.fail$1(position); + position0 = position + 4; + if ($length < position0) + this.fail$2(position, "Unexpected identifier"); + if (C.JSString_methods._codeUnitAt$1(t1, position + 1) !== 117 || C.JSString_methods._codeUnitAt$1(t1, position + 2) !== 108 || C.JSString_methods._codeUnitAt$1(t1, position + 3) !== 108) + this.fail$1(position); + t3.value = null; + state |= 28; + position = position0; + break; + case 102: + if ((state & 4) !== 0) + this.fail$1(position); + position0 = position + 5; + if ($length < position0) + this.fail$2(position, "Unexpected identifier"); + if (C.JSString_methods._codeUnitAt$1(t1, position + 1) !== 97 || C.JSString_methods._codeUnitAt$1(t1, position + 2) !== 108 || C.JSString_methods._codeUnitAt$1(t1, position + 3) !== 115 || C.JSString_methods._codeUnitAt$1(t1, position + 4) !== 101) + this.fail$1(position); + t3.value = false; + state |= 28; + position = position0; + break; + case 116: + if ((state & 4) !== 0) + this.fail$1(position); + position0 = position + 4; + if ($length < position0) + this.fail$2(position, "Unexpected identifier"); + if (C.JSString_methods._codeUnitAt$1(t1, position + 1) !== 114 || C.JSString_methods._codeUnitAt$1(t1, position + 2) !== 117 || C.JSString_methods._codeUnitAt$1(t1, position + 3) !== 101) + this.fail$1(position); + t3.value = true; + state |= 28; + position = position0; + break; + case 58: + if (state !== 30) + this.fail$1(position); + t3.key = t3.value; + t3.value = null; + ++position; + state = 19; + break; + case 44: + if (state === 31) { + t3.propertyValue$0(); + ++position; + state = 22; + } else if (state === 29) { + t3.arrayElement$0(); + ++position; + state = 17; + } else + this.fail$1(position); + break; + case 93: + if (state === 1) { + t3.value = t3.currentContainer; + if (0 >= t4.length) + return H.ioore(t4, -1); + t5 = t4.pop(); + t3.currentContainer = t5; + if (!!J.getInterceptor(t5).$isMap) { + if (0 >= t4.length) + return H.ioore(t4, -1); + t3.key = t4.pop(); + } + } else if (state === 29) { + t3.arrayElement$0(); + t3.value = t3.currentContainer; + if (0 >= t4.length) + return H.ioore(t4, -1); + t5 = t4.pop(); + t3.currentContainer = t5; + if (!!J.getInterceptor(t5).$isMap) { + if (0 >= t4.length) + return H.ioore(t4, -1); + t3.key = t4.pop(); + } + } else + this.fail$1(position); + if (0 >= states.length) + return H.ioore(states, -1); + state = states.pop() | 28; + ++position; + break; + case 125: + if (state === 6) { + t3.value = t3.currentContainer; + if (0 >= t4.length) + return H.ioore(t4, -1); + t5 = t4.pop(); + t3.currentContainer = t5; + if (!!J.getInterceptor(t5).$isMap) { + if (0 >= t4.length) + return H.ioore(t4, -1); + t3.key = t4.pop(); + } + } else if (state === 31) { + t3.propertyValue$0(); + t3.value = t3.currentContainer; + if (0 >= t4.length) + return H.ioore(t4, -1); + t5 = t4.pop(); + t3.currentContainer = t5; + if (!!J.getInterceptor(t5).$isMap) { + if (0 >= t4.length) + return H.ioore(t4, -1); + t3.key = t4.pop(); + } + } else + this.fail$1(position); + if (0 >= states.length) + return H.ioore(states, -1); + state = states.pop() | 28; + ++position; + break; + default: + if ((state & 4) !== 0) + this.fail$1(position); + position = this.parseNumber$2(char, position); + state |= 28; + break; + } + } + if (state !== 28) + this.fail$1(position); + }, + parseString$1: function(position) { + var t1, t2, t3, t4, position0, char, firstEscape, chars, hexStart, value, i, result; + t1 = this.source; + t2 = J.getInterceptor$s(t1); + t3 = t1.length; + t4 = position - 1; + position0 = position; + do { + if (position0 === t3) + this.fail$2(t4, "Unterminated string"); + char = t2._codeUnitAt$1(t1, position0); + if (char === 34) { + this.listener.value = C.JSString_methods.substring$2(t1, position, position0); + return position0 + 1; + } + if (char < 32) + this.fail$2(position0, "Control character in string"); + ++position0; + } while (char !== 92); + firstEscape = position0 - 1; + chars = H.setRuntimeTypeInfo([], [P.int]); + for (; true;) { + if (position0 === t3) + this.fail$2(t4, "Unterminated string"); + char = C.JSString_methods._codeUnitAt$1(t1, position0); + switch (char) { + case 98: + char = 8; + break; + case 102: + char = 12; + break; + case 110: + char = 10; + break; + case 114: + char = 13; + break; + case 116: + char = 9; + break; + case 47: + case 92: + case 34: + break; + case 117: + hexStart = position0 - 1; + for (value = 0, i = 0; i < 4; ++i) { + ++position0; + if (position0 === t3) + this.fail$2(t4, "Unterminated string"); + char = C.JSString_methods._codeUnitAt$1(t1, position0) - 48; + if (char < 0) + this.fail$2(hexStart, "Invalid unicode escape"); + if (char < 10) + value = value * 16 + char; + else { + char = ((char | 32) >>> 0) - 49; + if (char < 0 || char > 5) + this.fail$2(hexStart, "Invalid unicode escape"); + value = value * 16 + char + 10; + } + } + char = value; + break; + default: + if (char < 32) + this.fail$2(position0, "Control character in string"); + this.fail$2(position0, "Unrecognized string escape"); + } + do { + chars.push(char); + ++position0; + if (position0 === t3) + this.fail$2(t4, "Unterminated string"); + char = C.JSString_methods._codeUnitAt$1(t1, position0); + if (char === 34) { + result = P.String_String$fromCharCodes(chars, 0, null); + if (position < firstEscape) + result = C.JSString_methods.substring$2(t1, position, firstEscape) + result; + this.listener.value = result; + return position0 + 1; + } + if (char < 32) + this.fail$2(position0, "Control character in string"); + } while (char !== 92); + ++position0; + } + }, + parseNumber$2: function(char, position) { + var t1, $length, position0, value, t2, isDouble, literal; + t1 = this.source; + $length = t1.length; + if (char === 45) { + position0 = position + 1; + if (position0 === $length) + this.fail$2(position0, "Missing expected digit"); + char = J._codeUnitAt$1$s(t1, position0); + } else + position0 = position; + if (char < 48 || char > 57) + this.fail$2(position0, "Missing expected digit"); + if (char === 48) { + ++position0; + if (position0 === $length) { + value = H.Primitives_parseInt(J.substring$2$s(t1, position, position0), null, null); + this.listener.value = value; + return position0; + } + char = J._codeUnitAt$1$s(t1, position0); + if (48 <= char && char <= 57) + this.fail$1(position0); + } else { + t2 = J.getInterceptor$s(t1); + do { + ++position0; + if (position0 === $length) { + value = H.Primitives_parseInt(t2.substring$2(t1, position, position0), null, null); + this.listener.value = value; + return position0; + } + char = t2._codeUnitAt$1(t1, position0); + } while (48 <= char && char <= 57); + } + if (char === 46) { + ++position0; + if (position0 === $length) + this.fail$2(position0, "Missing expected digit"); + char = J.getInterceptor$s(t1)._codeUnitAt$1(t1, position0); + if (char < 48 || char > 57) + this.fail$1(position0); + do { + ++position0; + if (position0 === $length) { + value = H.Primitives_parseDouble(C.JSString_methods.substring$2(t1, position, position0), null); + this.listener.value = value; + return position0; + } + char = C.JSString_methods._codeUnitAt$1(t1, position0); + } while (48 <= char && char <= 57); + isDouble = true; + } else + isDouble = false; + if (char === 101 || char === 69) { + ++position0; + if (position0 === $length) + this.fail$2(position0, "Missing expected digit"); + char = J.getInterceptor$s(t1)._codeUnitAt$1(t1, position0); + if (char === 43 || char === 45) { + ++position0; + if (position0 === $length) + this.fail$2(position0, "Missing expected digit"); + char = C.JSString_methods._codeUnitAt$1(t1, position0); + } + if (char < 48 || char > 57) + this.fail$2(position0, "Missing expected digit"); + do { + ++position0; + if (position0 === $length) { + value = H.Primitives_parseDouble(C.JSString_methods.substring$2(t1, position, position0), null); + this.listener.value = value; + return position0; + } + char = C.JSString_methods._codeUnitAt$1(t1, position0); + } while (48 <= char && char <= 57); + isDouble = true; + } + literal = J.substring$2$s(t1, position, position0); + value = isDouble ? H.Primitives_parseDouble(literal, null) : H.Primitives_parseInt(literal, null, null); + this.listener.value = value; + return position0; + }, + fail$2: function(position, message) { + var sliceEnd, t1, t2, slice; + if (typeof position !== "number") + return position.$add(); + sliceEnd = position + 20; + t1 = this.source; + t2 = J.getInterceptor$s(t1); + slice = sliceEnd > t1.length ? "'" + t2.substring$1(t1, position) + "'" : "'" + t2.substring$2(t1, position, sliceEnd) + "...'"; + throw H.wrapException(new P.FormatException("Unexpected character at " + position + ": " + slice, null, null)); + }, + fail$1: function(position) { + return this.fail$2(position, null); + } + } + }], ["", "comics.dart",, N, { + "^": "", + main: [function() { + N.load_comics(); + }, "call$0", "comics__main$closure", 0, 0, 0], + load_comics: function() { + var list_el, req; + list_el = document.querySelector("#comics-list"); + req = new XMLHttpRequest(); + C.HttpRequest_methods.open$2(req, "get", "/comics"); + W._EventStreamSubscription$(req, "load", new N.load_comics_closure(list_el, req), false, W.ProgressEvent); + req.send(); + }, + attach_delete_handlers: function($parent) { + var t1 = new W._FrozenElementList($parent.querySelectorAll(".delete"), [null]); + t1.forEach$1(t1, new N.attach_delete_handlers_closure()); + }, + $delete: function(id, callback) { + var req = new XMLHttpRequest(); + W._EventStreamSubscription$(req, "load", new N.delete_closure(callback, new N.delete_closure0()), false, W.ProgressEvent); + C.HttpRequest_methods.open$2(req, "delete", "/comics/" + H.S(id)); + req.send(); + }, + graphic_novels_template: function(list) { + var t1 = {}; + t1.html = ""; + J.forEach$1$ax(list, new N.graphic_novels_template_closure(t1)); + return t1.html; + }, + load_comics_closure: { + "^": "Closure:1;list_el,req", + call$1: function(res) { + var t1, listener; + t1 = this.req.responseText; + listener = new U.BuildJsonListener([], null, null, null); + new U.JsonParser(t1, listener).parse$0(); + t1 = this.list_el; + J.set$innerHtml$x(t1, N.graphic_novels_template(listener.get$result(listener))); + N.attach_delete_handlers(t1); + } + }, + attach_delete_handlers_closure: { + "^": "Closure:1;", + call$1: function(el) { + var t1 = J.get$onClick$x(el); + W._EventStreamSubscription$(t1._html$_target, t1._eventType, new N.attach_delete_handlers__closure(), false, H.getTypeArgumentByIndex(t1, 0)); + } + }, + attach_delete_handlers__closure: { + "^": "Closure:1;", + call$1: function($event) { + var t1 = J.getInterceptor$x($event); + N.$delete(J.get$id$x(J.get$parent$x(t1.get$target($event))), new N.attach_delete_handlers___closure($event)); + t1.preventDefault$0($event); + } + }, + attach_delete_handlers___closure: { + "^": "Closure:0;event", + call$0: function() { + var t1, t2; + t1 = this.event; + t2 = J.getInterceptor$x(t1); + P.print("[delete] " + H.S(J.get$id$x(J.get$parent$x(t2.get$target(t1))))); + J.remove$0$ax(J.get$parent$x(t2.get$target(t1))); + } + }, + delete_closure0: { + "^": "Closure:0;", + call$0: function() { + } + }, + delete_closure: { + "^": "Closure:1;callback,default_callback", + call$1: function(res) { + var t1 = this.callback; + (t1 != null ? t1 : this.default_callback).call$0(); + } + }, + graphic_novels_template_closure: { + "^": "Closure:1;_box_0", + call$1: function(graphic_novel) { + var t1, t2; + t1 = this._box_0; + t2 = J.getInterceptor$asx(graphic_novel); + t1.html = t1.html + ('
  • \n ' + H.S(t2.$index(graphic_novel, "title")) + '\n [delete]\n
  • '); + } + } + }, 1]]; + setupProgram(dart, 0); + // getInterceptor methods + J.getInterceptor = function(receiver) { + if (typeof receiver == "number") { + if (Math.floor(receiver) == receiver) + return J.JSInt.prototype; + return J.JSDouble.prototype; + } + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return J.JSNull.prototype; + if (typeof receiver == "boolean") + return J.JSBool.prototype; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof P.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }; + J.getInterceptor$asx = function(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof P.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }; + J.getInterceptor$ax = function(receiver) { + if (receiver == null) + return receiver; + if (receiver.constructor == Array) + return J.JSArray.prototype; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof P.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }; + J.getInterceptor$n = function(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof P.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }; + J.getInterceptor$ns = function(receiver) { + if (typeof receiver == "number") + return J.JSNumber.prototype; + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof P.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }; + J.getInterceptor$s = function(receiver) { + if (typeof receiver == "string") + return J.JSString.prototype; + if (receiver == null) + return receiver; + if (!(receiver instanceof P.Object)) + return J.UnknownJavaScriptObject.prototype; + return receiver; + }; + J.getInterceptor$x = function(receiver) { + if (receiver == null) + return receiver; + if (typeof receiver != "object") { + if (typeof receiver == "function") + return J.JavaScriptFunction.prototype; + return receiver; + } + if (receiver instanceof P.Object) + return receiver; + return J.getNativeInterceptor(receiver); + }; + J.set$href$x = function(receiver, value) { + return J.getInterceptor$x(receiver).set$href(receiver, value); + }; + J.set$innerHtml$x = function(receiver, value) { + return J.getInterceptor$x(receiver).set$innerHtml(receiver, value); + }; + J.get$attributes$x = function(receiver) { + return J.getInterceptor$x(receiver).get$attributes(receiver); + }; + J.get$error$x = function(receiver) { + return J.getInterceptor$x(receiver).get$error(receiver); + }; + J.get$id$x = function(receiver) { + return J.getInterceptor$x(receiver).get$id(receiver); + }; + J.get$iterator$ax = function(receiver) { + return J.getInterceptor$ax(receiver).get$iterator(receiver); + }; + J.get$length$asx = function(receiver) { + return J.getInterceptor$asx(receiver).get$length(receiver); + }; + J.get$nodes$x = function(receiver) { + return J.getInterceptor$x(receiver).get$nodes(receiver); + }; + J.get$onClick$x = function(receiver) { + return J.getInterceptor$x(receiver).get$onClick(receiver); + }; + J.get$parent$x = function(receiver) { + return J.getInterceptor$x(receiver).get$parent(receiver); + }; + J.get$parentNode$x = function(receiver) { + return J.getInterceptor$x(receiver).get$parentNode(receiver); + }; + J.get$previousNode$x = function(receiver) { + return J.getInterceptor$x(receiver).get$previousNode(receiver); + }; + J.get$tagName$x = function(receiver) { + return J.getInterceptor$x(receiver).get$tagName(receiver); + }; + J.$add$ns = function(receiver, a0) { + if (typeof receiver == "number" && typeof a0 == "number") + return receiver + a0; + return J.getInterceptor$ns(receiver).$add(receiver, a0); + }; + J.$index$asx = function(receiver, a0) { + if (typeof a0 === "number") + if (receiver.constructor == Array || typeof receiver == "string" || H.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) + if (a0 >>> 0 === a0 && a0 < receiver.length) + return receiver[a0]; + return J.getInterceptor$asx(receiver).$index(receiver, a0); + }; + J.$indexSet$ax = function(receiver, a0, a1) { + if (typeof a0 === "number") + if ((receiver.constructor == Array || H.isJsIndexable(receiver, receiver[init.dispatchPropertyName])) && !receiver.immutable$list && a0 >>> 0 === a0 && a0 < receiver.length) + return receiver[a0] = a1; + return J.getInterceptor$ax(receiver).$indexSet(receiver, a0, a1); + }; + J.$lt$n = function(receiver, a0) { + if (typeof receiver == "number" && typeof a0 == "number") + return receiver < a0; + return J.getInterceptor$n(receiver).$lt(receiver, a0); + }; + J._codeUnitAt$1$s = function(receiver, a0) { + return J.getInterceptor$s(receiver)._codeUnitAt$1(receiver, a0); + }; + J.add$1$ax = function(receiver, a0) { + return J.getInterceptor$ax(receiver).add$1(receiver, a0); + }; + J.addEventListener$3$x = function(receiver, a0, a1, a2) { + return J.getInterceptor$x(receiver).addEventListener$3(receiver, a0, a1, a2); + }; + J.elementAt$1$ax = function(receiver, a0) { + return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0); + }; + J.forEach$1$ax = function(receiver, a0) { + return J.getInterceptor$ax(receiver).forEach$1(receiver, a0); + }; + J.map$1$ax = function(receiver, a0) { + return J.getInterceptor$ax(receiver).map$1(receiver, a0); + }; + J.remove$0$ax = function(receiver) { + return J.getInterceptor$ax(receiver).remove$0(receiver); + }; + J.removeEventListener$3$x = function(receiver, a0, a1, a2) { + return J.getInterceptor$x(receiver).removeEventListener$3(receiver, a0, a1, a2); + }; + J.send$1$x = function(receiver, a0) { + return J.getInterceptor$x(receiver).send$1(receiver, a0); + }; + J.substring$2$s = function(receiver, a0, a1) { + return J.getInterceptor$s(receiver).substring$2(receiver, a0, a1); + }; + J.toLowerCase$0$s = function(receiver) { + return J.getInterceptor$s(receiver).toLowerCase$0(receiver); + }; + J.get$hashCode$ = function(receiver) { + return J.getInterceptor(receiver).get$hashCode(receiver); + }; + J.$eq$ = function(receiver, a0) { + if (receiver == null) + return a0 == null; + if (typeof receiver != "object") + return a0 != null && receiver === a0; + return J.getInterceptor(receiver).$eq(receiver, a0); + }; + J.toString$0$ = function(receiver) { + return J.getInterceptor(receiver).toString$0(receiver); + }; + Isolate.makeConstantList = function(list) { + list.immutable$list = Array; + list.fixed$length = Array; + return list; + }; + var $ = Isolate.$isolateProperties; + C.BodyElement_methods = W.BodyElement.prototype; + C.HttpRequest_methods = W.HttpRequest.prototype; + C.Interceptor_methods = J.Interceptor.prototype; + C.JSArray_methods = J.JSArray.prototype; + C.JSInt_methods = J.JSInt.prototype; + C.JSNumber_methods = J.JSNumber.prototype; + C.JSString_methods = J.JSString.prototype; + C.JavaScriptFunction_methods = J.JavaScriptFunction.prototype; + C.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype; + C.TableElement_methods = W.TableElement.prototype; + C.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype; + C.C__DelayedDone = new P._DelayedDone(); + C.C__RootZone = new P._RootZone(); + C.Duration_0 = new P.Duration(0); + C.JS_CONST_0 = function(hooks) { + if (typeof dartExperimentalFixupGetTag != "function") return hooks; + hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag); +}; + C.JS_CONST_4hp = function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Firefox") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "GeoGeolocation": "Geolocation", + "Location": "!Location", + "WorkerMessageEvent": "MessageEvent", + "XMLDocument": "!Document"}; + function getTagFirefox(o) { + var tag = getTag(o); + return quickMap[tag] || tag; + } + hooks.getTag = getTagFirefox; +}; + C.JS_CONST_Fs4 = function(hooks) { return hooks; } +; + C.JS_CONST_QJm = function(getTagFallback) { + return function(hooks) { + if (typeof navigator != "object") return hooks; + var ua = navigator.userAgent; + if (ua.indexOf("DumpRenderTree") >= 0) return hooks; + if (ua.indexOf("Chrome") >= 0) { + function confirm(p) { + return typeof window == "object" && window[p] && window[p].name == p; + } + if (confirm("Window") && confirm("HTMLElement")) return hooks; + } + hooks.getTag = getTagFallback; + }; +}; + C.JS_CONST_bDt = function() { + var toStringFunction = Object.prototype.toString; + function getTag(o) { + var s = toStringFunction.call(o); + return s.substring(8, s.length - 1); + } + function getUnknownTag(object, tag) { + if (/^HTML[A-Z].*Element$/.test(tag)) { + var name = toStringFunction.call(object); + if (name == "[object Object]") return null; + return "HTMLElement"; + } + } + function getUnknownTagGenericBrowser(object, tag) { + if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement"; + return getUnknownTag(object, tag); + } + function prototypeForTag(tag) { + if (typeof window == "undefined") return null; + if (typeof window[tag] == "undefined") return null; + var constructor = window[tag]; + if (typeof constructor != "function") return null; + return constructor.prototype; + } + function discriminator(tag) { return null; } + var isBrowser = typeof navigator == "object"; + return { + getTag: getTag, + getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag, + prototypeForTag: prototypeForTag, + discriminator: discriminator }; +}; + C.JS_CONST_gkc = function(hooks) { + var userAgent = typeof navigator == "object" ? navigator.userAgent : ""; + if (userAgent.indexOf("Trident/") == -1) return hooks; + var getTag = hooks.getTag; + var quickMap = { + "BeforeUnloadEvent": "Event", + "DataTransfer": "Clipboard", + "HTMLDDElement": "HTMLElement", + "HTMLDTElement": "HTMLElement", + "HTMLPhraseElement": "HTMLElement", + "Position": "Geoposition" + }; + function getTagIE(o) { + var tag = getTag(o); + var newTag = quickMap[tag]; + if (newTag) return newTag; + if (tag == "Object") { + if (window.DataView && (o instanceof window.DataView)) return "DataView"; + } + return tag; + } + function prototypeForTagIE(tag) { + var constructor = window[tag]; + if (constructor == null) return null; + return constructor.prototype; + } + hooks.getTag = getTagIE; + hooks.prototypeForTag = prototypeForTagIE; +}; + C.JS_CONST_rr7 = function(hooks) { + var getTag = hooks.getTag; + var prototypeForTag = hooks.prototypeForTag; + function getTagFixed(o) { + var tag = getTag(o); + if (tag == "Document") { + if (!!o.xmlVersion) return "!Document"; + return "!HTMLDocument"; + } + return tag; + } + function prototypeForTagFixed(tag) { + if (tag == "Document") return null; + return prototypeForTag(tag); + } + hooks.getTag = getTagFixed; + hooks.prototypeForTag = prototypeForTagFixed; +}; + C.JS_CONST_u2C = function getTagFallback(o) { + var s = Object.prototype.toString.call(o); + return s.substring(8, s.length - 1); +}; + C.List_2Zi = H.setRuntimeTypeInfo(Isolate.makeConstantList(["*::class", "*::dir", "*::draggable", "*::hidden", "*::id", "*::inert", "*::itemprop", "*::itemref", "*::itemscope", "*::lang", "*::spellcheck", "*::title", "*::translate", "A::accesskey", "A::coords", "A::hreflang", "A::name", "A::shape", "A::tabindex", "A::target", "A::type", "AREA::accesskey", "AREA::alt", "AREA::coords", "AREA::nohref", "AREA::shape", "AREA::tabindex", "AREA::target", "AUDIO::controls", "AUDIO::loop", "AUDIO::mediagroup", "AUDIO::muted", "AUDIO::preload", "BDO::dir", "BODY::alink", "BODY::bgcolor", "BODY::link", "BODY::text", "BODY::vlink", "BR::clear", "BUTTON::accesskey", "BUTTON::disabled", "BUTTON::name", "BUTTON::tabindex", "BUTTON::type", "BUTTON::value", "CANVAS::height", "CANVAS::width", "CAPTION::align", "COL::align", "COL::char", "COL::charoff", "COL::span", "COL::valign", "COL::width", "COLGROUP::align", "COLGROUP::char", "COLGROUP::charoff", "COLGROUP::span", "COLGROUP::valign", "COLGROUP::width", "COMMAND::checked", "COMMAND::command", "COMMAND::disabled", "COMMAND::label", "COMMAND::radiogroup", "COMMAND::type", "DATA::value", "DEL::datetime", "DETAILS::open", "DIR::compact", "DIV::align", "DL::compact", "FIELDSET::disabled", "FONT::color", "FONT::face", "FONT::size", "FORM::accept", "FORM::autocomplete", "FORM::enctype", "FORM::method", "FORM::name", "FORM::novalidate", "FORM::target", "FRAME::name", "H1::align", "H2::align", "H3::align", "H4::align", "H5::align", "H6::align", "HR::align", "HR::noshade", "HR::size", "HR::width", "HTML::version", "IFRAME::align", "IFRAME::frameborder", "IFRAME::height", "IFRAME::marginheight", "IFRAME::marginwidth", "IFRAME::width", "IMG::align", "IMG::alt", "IMG::border", "IMG::height", "IMG::hspace", "IMG::ismap", "IMG::name", "IMG::usemap", "IMG::vspace", "IMG::width", "INPUT::accept", "INPUT::accesskey", "INPUT::align", "INPUT::alt", "INPUT::autocomplete", "INPUT::autofocus", "INPUT::checked", "INPUT::disabled", "INPUT::inputmode", "INPUT::ismap", "INPUT::list", "INPUT::max", "INPUT::maxlength", "INPUT::min", "INPUT::multiple", "INPUT::name", "INPUT::placeholder", "INPUT::readonly", "INPUT::required", "INPUT::size", "INPUT::step", "INPUT::tabindex", "INPUT::type", "INPUT::usemap", "INPUT::value", "INS::datetime", "KEYGEN::disabled", "KEYGEN::keytype", "KEYGEN::name", "LABEL::accesskey", "LABEL::for", "LEGEND::accesskey", "LEGEND::align", "LI::type", "LI::value", "LINK::sizes", "MAP::name", "MENU::compact", "MENU::label", "MENU::type", "METER::high", "METER::low", "METER::max", "METER::min", "METER::value", "OBJECT::typemustmatch", "OL::compact", "OL::reversed", "OL::start", "OL::type", "OPTGROUP::disabled", "OPTGROUP::label", "OPTION::disabled", "OPTION::label", "OPTION::selected", "OPTION::value", "OUTPUT::for", "OUTPUT::name", "P::align", "PRE::width", "PROGRESS::max", "PROGRESS::min", "PROGRESS::value", "SELECT::autocomplete", "SELECT::disabled", "SELECT::multiple", "SELECT::name", "SELECT::required", "SELECT::size", "SELECT::tabindex", "SOURCE::type", "TABLE::align", "TABLE::bgcolor", "TABLE::border", "TABLE::cellpadding", "TABLE::cellspacing", "TABLE::frame", "TABLE::rules", "TABLE::summary", "TABLE::width", "TBODY::align", "TBODY::char", "TBODY::charoff", "TBODY::valign", "TD::abbr", "TD::align", "TD::axis", "TD::bgcolor", "TD::char", "TD::charoff", "TD::colspan", "TD::headers", "TD::height", "TD::nowrap", "TD::rowspan", "TD::scope", "TD::valign", "TD::width", "TEXTAREA::accesskey", "TEXTAREA::autocomplete", "TEXTAREA::cols", "TEXTAREA::disabled", "TEXTAREA::inputmode", "TEXTAREA::name", "TEXTAREA::placeholder", "TEXTAREA::readonly", "TEXTAREA::required", "TEXTAREA::rows", "TEXTAREA::tabindex", "TEXTAREA::wrap", "TFOOT::align", "TFOOT::char", "TFOOT::charoff", "TFOOT::valign", "TH::abbr", "TH::align", "TH::axis", "TH::bgcolor", "TH::char", "TH::charoff", "TH::colspan", "TH::headers", "TH::height", "TH::nowrap", "TH::rowspan", "TH::scope", "TH::valign", "TH::width", "THEAD::align", "THEAD::char", "THEAD::charoff", "THEAD::valign", "TR::align", "TR::bgcolor", "TR::char", "TR::charoff", "TR::valign", "TRACK::default", "TRACK::kind", "TRACK::label", "TRACK::srclang", "UL::compact", "UL::type", "VIDEO::controls", "VIDEO::height", "VIDEO::loop", "VIDEO::mediagroup", "VIDEO::muted", "VIDEO::preload", "VIDEO::width"]), [P.String]); + C.List_ego = Isolate.makeConstantList(["HEAD", "AREA", "BASE", "BASEFONT", "BR", "COL", "COLGROUP", "EMBED", "FRAME", "FRAMESET", "HR", "IMAGE", "IMG", "INPUT", "ISINDEX", "LINK", "META", "PARAM", "SOURCE", "STYLE", "TITLE", "WBR"]); + C.List_empty = Isolate.makeConstantList([]); + C.List_wSV = H.setRuntimeTypeInfo(Isolate.makeConstantList(["bind", "if", "ref", "repeat", "syntax"]), [P.String]); + C.List_yrN = H.setRuntimeTypeInfo(Isolate.makeConstantList(["A::href", "AREA::href", "BLOCKQUOTE::cite", "BODY::background", "COMMAND::icon", "DEL::cite", "FORM::action", "IMG::src", "INPUT::src", "INS::cite", "Q::cite", "VIDEO::poster"]), [P.String]); + $.Primitives_mirrorFunctionCacheName = "$cachedFunction"; + $.Primitives_mirrorInvokeCacheName = "$cachedInvocation"; + $.Closure_functionCounter = 0; + $.BoundClosure_selfFieldNameCache = null; + $.BoundClosure_receiverFieldNameCache = null; + $.getTagFunction = null; + $.alternateTagFunction = null; + $.prototypeForTagFunction = null; + $.dispatchRecordsForInstanceTags = null; + $.interceptorsForUncacheableTags = null; + $.initNativeDispatchFlag = null; + $._nextCallback = null; + $._lastCallback = null; + $._lastPriorityCallback = null; + $._isInCallbackLoop = false; + $.Zone__current = C.C__RootZone; + $.Expando__keyCount = 0; + $.Element__parseDocument = null; + $.Element__parseRange = null; + $.Element__defaultValidator = null; + $.Element__defaultSanitizer = null; + $ = null; + init.isHunkLoaded = function(hunkHash) { + return !!$dart_deferred_initializers$[hunkHash]; + }; + init.deferredInitialized = new Object(null); + init.isHunkInitialized = function(hunkHash) { + return init.deferredInitialized[hunkHash]; + }; + init.initializeLoadedHunk = function(hunkHash) { + $dart_deferred_initializers$[hunkHash]($globals$, $); + init.deferredInitialized[hunkHash] = true; + }; + init.deferredLibraryUris = {}; + init.deferredLibraryHashes = {}; + // Empty type-to-interceptor map. + (function(lazies) { + for (var i = 0; i < lazies.length;) { + var fieldName = lazies[i++]; + var getterName = lazies[i++]; + var lazyValue = lazies[i++]; + var staticName = lazies[i++]; + Isolate.$lazy(fieldName, getterName, lazyValue, staticName); + } + })(["DART_CLOSURE_PROPERTY_NAME", "$get$DART_CLOSURE_PROPERTY_NAME", function() { + return H.getIsolateAffinityTag("_$dart_dartClosure"); + }, "DART_CLOSURE_PROPERTY_NAME", "JS_INTEROP_INTERCEPTOR_TAG", "$get$JS_INTEROP_INTERCEPTOR_TAG", function() { + return H.getIsolateAffinityTag("_$dart_js"); + }, "JS_INTEROP_INTERCEPTOR_TAG", "IsolateNatives_thisScript", "$get$IsolateNatives_thisScript", function() { + return H.IsolateNatives_computeThisScript(); + }, "IsolateNatives_thisScript", "IsolateNatives_workerIds", "$get$IsolateNatives_workerIds", function() { + if (typeof WeakMap == "function") + var t1 = new WeakMap(); + else { + t1 = $.Expando__keyCount; + $.Expando__keyCount = t1 + 1; + t1 = "expando$key$" + t1; + } + return new P.Expando(null, t1); + }, "IsolateNatives_workerIds", "TypeErrorDecoder_noSuchMethodPattern", "$get$TypeErrorDecoder_noSuchMethodPattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({ + toString: function() { + return "$receiver$"; + } + })); + }, "TypeErrorDecoder_noSuchMethodPattern", "TypeErrorDecoder_notClosurePattern", "$get$TypeErrorDecoder_notClosurePattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn({$method$: null, + toString: function() { + return "$receiver$"; + } + })); + }, "TypeErrorDecoder_notClosurePattern", "TypeErrorDecoder_nullCallPattern", "$get$TypeErrorDecoder_nullCallPattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(null)); + }, "TypeErrorDecoder_nullCallPattern", "TypeErrorDecoder_nullLiteralCallPattern", "$get$TypeErrorDecoder_nullLiteralCallPattern", function() { + return H.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = '$arguments$'; + try { + null.$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }()); + }, "TypeErrorDecoder_nullLiteralCallPattern", "TypeErrorDecoder_undefinedCallPattern", "$get$TypeErrorDecoder_undefinedCallPattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokeCallErrorOn(void 0)); + }, "TypeErrorDecoder_undefinedCallPattern", "TypeErrorDecoder_undefinedLiteralCallPattern", "$get$TypeErrorDecoder_undefinedLiteralCallPattern", function() { + return H.TypeErrorDecoder_extractPattern(function() { + var $argumentsExpr$ = '$arguments$'; + try { + (void 0).$method$($argumentsExpr$); + } catch (e) { + return e.message; + } + }()); + }, "TypeErrorDecoder_undefinedLiteralCallPattern", "TypeErrorDecoder_nullPropertyPattern", "$get$TypeErrorDecoder_nullPropertyPattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(null)); + }, "TypeErrorDecoder_nullPropertyPattern", "TypeErrorDecoder_nullLiteralPropertyPattern", "$get$TypeErrorDecoder_nullLiteralPropertyPattern", function() { + return H.TypeErrorDecoder_extractPattern(function() { + try { + null.$method$; + } catch (e) { + return e.message; + } + }()); + }, "TypeErrorDecoder_nullLiteralPropertyPattern", "TypeErrorDecoder_undefinedPropertyPattern", "$get$TypeErrorDecoder_undefinedPropertyPattern", function() { + return H.TypeErrorDecoder_extractPattern(H.TypeErrorDecoder_provokePropertyErrorOn(void 0)); + }, "TypeErrorDecoder_undefinedPropertyPattern", "TypeErrorDecoder_undefinedLiteralPropertyPattern", "$get$TypeErrorDecoder_undefinedLiteralPropertyPattern", function() { + return H.TypeErrorDecoder_extractPattern(function() { + try { + (void 0).$method$; + } catch (e) { + return e.message; + } + }()); + }, "TypeErrorDecoder_undefinedLiteralPropertyPattern", "_AsyncRun__scheduleImmediateClosure", "$get$_AsyncRun__scheduleImmediateClosure", function() { + return P._AsyncRun__initializeScheduleImmediate(); + }, "_AsyncRun__scheduleImmediateClosure", "Future__nullFuture", "$get$Future__nullFuture", function() { + var t1, t2; + t1 = P.Null; + t2 = new P._Future(0, P.Zone_current(), null, [t1]); + t2._Future$value$1(null, t1); + return t2; + }, "Future__nullFuture", "_toStringVisiting", "$get$_toStringVisiting", function() { + return []; + }, "_toStringVisiting", "_Html5NodeValidator__allowedElements", "$get$_Html5NodeValidator__allowedElements", function() { + return P.LinkedHashSet_LinkedHashSet$from(["A", "ABBR", "ACRONYM", "ADDRESS", "AREA", "ARTICLE", "ASIDE", "AUDIO", "B", "BDI", "BDO", "BIG", "BLOCKQUOTE", "BR", "BUTTON", "CANVAS", "CAPTION", "CENTER", "CITE", "CODE", "COL", "COLGROUP", "COMMAND", "DATA", "DATALIST", "DD", "DEL", "DETAILS", "DFN", "DIR", "DIV", "DL", "DT", "EM", "FIELDSET", "FIGCAPTION", "FIGURE", "FONT", "FOOTER", "FORM", "H1", "H2", "H3", "H4", "H5", "H6", "HEADER", "HGROUP", "HR", "I", "IFRAME", "IMG", "INPUT", "INS", "KBD", "LABEL", "LEGEND", "LI", "MAP", "MARK", "MENU", "METER", "NAV", "NOBR", "OL", "OPTGROUP", "OPTION", "OUTPUT", "P", "PRE", "PROGRESS", "Q", "S", "SAMP", "SECTION", "SELECT", "SMALL", "SOURCE", "SPAN", "STRIKE", "STRONG", "SUB", "SUMMARY", "SUP", "TABLE", "TBODY", "TD", "TEXTAREA", "TFOOT", "TH", "THEAD", "TIME", "TR", "TRACK", "TT", "U", "UL", "VAR", "VIDEO", "WBR"], null); + }, "_Html5NodeValidator__allowedElements", "_Html5NodeValidator__attributeValidators", "$get$_Html5NodeValidator__attributeValidators", function() { + return P.LinkedHashMap__makeEmpty(); + }, "_Html5NodeValidator__attributeValidators"]); + Isolate = Isolate.$finishIsolateConstructor(Isolate); + $ = new Isolate(); + init.metadata = [null]; + init.types = [{func: 1}, {func: 1, args: [,]}, {func: 1, v: true}, {func: 1, v: true, args: [{func: 1, v: true}]}, {func: 1, ret: P.String, args: [P.int]}, {func: 1, ret: P.bool, args: [W.Element, P.String, P.String, W._Html5NodeValidator]}, {func: 1, args: [, P.String]}, {func: 1, args: [P.String]}, {func: 1, args: [{func: 1, v: true}]}, {func: 1, v: true, args: [P.Object], opt: [P.StackTrace]}, {func: 1, args: [,], opt: [,]}, {func: 1, args: [, P.StackTrace]}, {func: 1, v: true, args: [, P.StackTrace]}, {func: 1, args: [,,]}, {func: 1, v: true, args: [W.Node, W.Node]}]; + function convertToFastObject(properties) { + function MyClass() { + } + MyClass.prototype = properties; + new MyClass(); + return properties; + } + function convertToSlowObject(properties) { + properties.__MAGIC_SLOW_PROPERTY = 1; + delete properties.__MAGIC_SLOW_PROPERTY; + return properties; + } + A = convertToFastObject(A); + B = convertToFastObject(B); + C = convertToFastObject(C); + D = convertToFastObject(D); + E = convertToFastObject(E); + F = convertToFastObject(F); + G = convertToFastObject(G); + H = convertToFastObject(H); + J = convertToFastObject(J); + K = convertToFastObject(K); + L = convertToFastObject(L); + M = convertToFastObject(M); + N = convertToFastObject(N); + O = convertToFastObject(O); + P = convertToFastObject(P); + Q = convertToFastObject(Q); + R = convertToFastObject(R); + S = convertToFastObject(S); + T = convertToFastObject(T); + U = convertToFastObject(U); + V = convertToFastObject(V); + W = convertToFastObject(W); + X = convertToFastObject(X); + Y = convertToFastObject(Y); + Z = convertToFastObject(Z); + function init() { + Isolate.$isolateProperties = Object.create(null); + init.allClasses = map(); + init.getTypeFromName = function(name) { + return init.allClasses[name]; + }; + init.interceptorsByTag = map(); + init.leafTags = map(); + init.finishedClasses = map(); + Isolate.$lazy = function(fieldName, getterName, lazyValue, staticName, prototype) { + if (!init.lazies) + init.lazies = Object.create(null); + init.lazies[fieldName] = getterName; + prototype = prototype || Isolate.$isolateProperties; + var sentinelUndefined = {}; + var sentinelInProgress = {}; + prototype[fieldName] = sentinelUndefined; + prototype[getterName] = function() { + var result = this[fieldName]; + if (result == sentinelInProgress) + H.throwCyclicInit(staticName || fieldName); + try { + if (result === sentinelUndefined) { + this[fieldName] = sentinelInProgress; + try { + result = this[fieldName] = lazyValue(); + } finally { + if (result === sentinelUndefined) + this[fieldName] = null; + } + } + return result; + } finally { + this[getterName] = function() { + return this[fieldName]; + }; + } + }; + }; + Isolate.$finishIsolateConstructor = function(oldIsolate) { + var isolateProperties = oldIsolate.$isolateProperties; + function Isolate() { + var staticNames = Object.keys(isolateProperties); + for (var i = 0; i < staticNames.length; i++) { + var staticName = staticNames[i]; + this[staticName] = isolateProperties[staticName]; + } + var lazies = init.lazies; + var lazyInitializers = lazies ? Object.keys(lazies) : []; + for (var i = 0; i < lazyInitializers.length; i++) + this[lazies[lazyInitializers[i]]] = null; + function ForceEfficientMap() { + } + ForceEfficientMap.prototype = this; + new ForceEfficientMap(); + for (var i = 0; i < lazyInitializers.length; i++) { + var lazyInitName = lazies[lazyInitializers[i]]; + this[lazyInitName] = isolateProperties[lazyInitName]; + } + } + Isolate.prototype = oldIsolate.prototype; + Isolate.prototype.constructor = Isolate; + Isolate.$isolateProperties = isolateProperties; + Isolate.makeConstantList = oldIsolate.makeConstantList; + Isolate.functionThatReturnsNull = oldIsolate.functionThatReturnsNull; + return Isolate; + }; + } + !function() { + var intern = function(s) { + var o = {}; + o[s] = 1; + return Object.keys(convertToFastObject(o))[0]; + }; + init.getIsolateTag = function(name) { + return intern("___dart_" + name + init.isolateTag); + }; + var tableProperty = "___dart_isolate_tags_"; + var usedProperties = Object[tableProperty] || (Object[tableProperty] = Object.create(null)); + var rootProperty = "_ZxYxX"; + for (var i = 0;; i++) { + var property = intern(rootProperty + "_" + i + "_"); + if (!(property in usedProperties)) { + usedProperties[property] = 1; + init.isolateTag = property; + break; + } + } + init.dispatchPropertyName = init.getIsolateTag("dispatch_record"); + }(); + // BEGIN invoke [main]. + (function(callback) { + if (typeof document === "undefined") { + callback(null); + return; + } + if (typeof document.currentScript != 'undefined') { + callback(document.currentScript); + return; + } + var scripts = document.scripts; + function onLoad(event) { + for (var i = 0; i < scripts.length; ++i) + scripts[i].removeEventListener("load", onLoad, false); + callback(event.target); + } + for (var i = 0; i < scripts.length; ++i) + scripts[i].addEventListener("load", onLoad, false); + })(function(currentScript) { + init.currentScript = currentScript; + if (typeof dartMainRunner === "function") + dartMainRunner(function(a) { + H.startRootIsolate(N.comics__main$closure(), a); + }, []); + else + (function(a) { + H.startRootIsolate(N.comics__main$closure(), a); + })([]); + }); + // END invoke [main]. +})(); + +//# sourceMappingURL=comics.dart.js.map