// Generated by dart2js, the Dart to JavaScript compiler.
// 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;
      }
      var isReflectable = array.length > unmangledNameIndex;
      if (isReflectable) {
        funcs[0].$reflectable = 1;
        funcs[0].$reflectionInfo = array;
        for (var i = 1; i < funcs.length; i++) {
          funcs[i].$reflectable = 2;
          funcs[i].$reflectionInfo = array;
        }
        var mangledNames = isStatic ? init.mangledGlobalNames : init.mangledNames;
        var unmangledName = array[unmangledNameIndex];
        var reflectionName = unmangledName;
        if (getterStubName)
          mangledNames[getterStubName] = reflectionName;
        if (isSetter)
          reflectionName += "=";
        else if (!isGetter)
          reflectionName += ":" + (requiredParameterCount + optionalParameterCount);
        mangledNames[name] = reflectionName;
        funcs[0].$reflectionName = reflectionName;
        funcs[0].$metadataIndex = unmangledNameIndex + 1;
        if (optionalParameterCount)
          prototype[unmangledName + "*"] = funcs[0];
      }
    }
    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);
      }],
      noSuchMethod$1: ["super$Interceptor$noSuchMethod", function(receiver, invocation) {
        throw H.wrapException(P.NoSuchMethodError$(receiver, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments(), null));
      }, null, "get$noSuchMethod", 2, 0, null, 35],
      "%": "AudioParam|CanvasGradient|CanvasPattern|DOMError|DOMImplementation|FileError|MediaError|MediaKeyError|NavigatorUserMediaError|PositionError|Range|SQLError|SVGAnimatedEnumeration|SVGAnimatedLength|SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedString|SVGAnimatedTransformList|WebGLActiveInfo|WebGLBuffer|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLShader|WebGLTexture"
    },
    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;
      },
      noSuchMethod$1: [function(receiver, invocation) {
        return this.super$Interceptor$noSuchMethod(receiver, invocation);
      }, null, "get$noSuchMethod", 2, 0, null, 35]
    },
    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);
      },
      $isFunction: 1,
      $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);
      },
      removeAt$1: function(receiver, index) {
        this.checkGrowable$1(receiver, "removeAt");
        if (index < 0 || index >= receiver.length)
          throw H.wrapException(P.RangeError$value(index, null, null));
        return receiver.splice(index, 1)[0];
      },
      insert$2: function(receiver, index, value) {
        this.checkGrowable$1(receiver, "insert");
        if (index < 0 || index > receiver.length)
          throw H.wrapException(P.RangeError$value(index, null, null));
        receiver.splice(index, 0, value);
      },
      insertAll$2: function(receiver, index, iterable) {
        var insertionLength, end;
        this.checkGrowable$1(receiver, "insertAll");
        P.RangeError_checkValueInInterval(index, 0, receiver.length, "index", null);
        if (!J.getInterceptor(iterable).$isEfficientLengthIterable) {
          iterable.toString;
          iterable = H.setRuntimeTypeInfo(iterable.slice(), [H.getTypeArgumentByIndex(iterable, 0)]);
        }
        insertionLength = iterable.length;
        this.set$length(receiver, receiver.length + insertionLength);
        end = index + insertionLength;
        this.setRange$4(receiver, end, receiver.length, receiver, index);
        this.setRange$3(receiver, index, end, iterable);
      },
      remove$1: function(receiver, element) {
        var i;
        this.checkGrowable$1(receiver, "remove");
        for (i = 0; i < receiver.length; ++i)
          if (J.$eq$(receiver[i], element)) {
            receiver.splice(i, 1);
            return true;
          }
        return false;
      },
      _removeWhere$2: function(receiver, test, removeMatching) {
        var retained, end, i, element, t1;
        retained = [];
        end = receiver.length;
        for (i = 0; i < end; ++i) {
          element = receiver[i];
          if (!test.call$1(element))
            retained.push(element);
          if (receiver.length !== end)
            throw H.wrapException(new P.ConcurrentModificationError(receiver));
        }
        t1 = retained.length;
        if (t1 === end)
          return;
        this.set$length(receiver, t1);
        for (i = 0; i < retained.length; ++i)
          this.$indexSet(receiver, i, retained[i]);
      },
      where$1: function(receiver, f) {
        return new H.WhereIterable(receiver, f, [H.getTypeArgumentByIndex(receiver, 0)]);
      },
      addAll$1: function(receiver, collection) {
        var t1;
        this.checkGrowable$1(receiver, "addAll");
        for (t1 = J.get$iterator$ax(collection); t1.moveNext$0();)
          receiver.push(t1.get$current());
      },
      clear$0: function(receiver) {
        this.set$length(receiver, 0);
      },
      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, [null, null]);
      },
      join$1: function(receiver, separator) {
        var list, i;
        list = new Array(receiver.length);
        list.fixed$length = Array;
        for (i = 0; i < receiver.length; ++i)
          list[i] = H.S(receiver[i]);
        return list.join(separator);
      },
      skip$1: function(receiver, n) {
        return H.SubListIterable$(receiver, n, null, H.getTypeArgumentByIndex(receiver, 0));
      },
      firstWhere$2$orElse: function(receiver, test, orElse) {
        var end, i, element;
        end = receiver.length;
        for (i = 0; i < end; ++i) {
          element = receiver[i];
          if (test.call$1(element))
            return element;
          if (receiver.length !== end)
            throw H.wrapException(new P.ConcurrentModificationError(receiver));
        }
        if (orElse != null)
          return orElse.call$0();
        throw H.wrapException(H.IterableElementError_noElement());
      },
      lastWhere$2$orElse: function(receiver, test, orElse) {
        var $length, i, element;
        $length = receiver.length;
        for (i = $length - 1; i >= 0; --i) {
          element = receiver[i];
          if (test.call$1(element))
            return element;
          if ($length !== receiver.length)
            throw H.wrapException(new P.ConcurrentModificationError(receiver));
        }
        throw H.wrapException(H.IterableElementError_noElement());
      },
      lastWhere$1: function($receiver, test) {
        return this.lastWhere$2$orElse($receiver, test, null);
      },
      elementAt$1: function(receiver, index) {
        return receiver[index];
      },
      sublist$2: function(receiver, start, end) {
        if (start < 0 || start > receiver.length)
          throw H.wrapException(P.RangeError$range(start, 0, receiver.length, "start", null));
        if (end == null)
          end = receiver.length;
        else 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)]);
      },
      sublist$1: function($receiver, start) {
        return this.sublist$2($receiver, start, null);
      },
      get$first: function(receiver) {
        if (receiver.length > 0)
          return receiver[0];
        throw H.wrapException(H.IterableElementError_noElement());
      },
      get$last: function(receiver) {
        var t1 = receiver.length;
        if (t1 > 0)
          return receiver[t1 - 1];
        throw H.wrapException(H.IterableElementError_noElement());
      },
      removeRange$2: function(receiver, start, end) {
        this.checkGrowable$1(receiver, "removeRange");
        P.RangeError_checkValidRange(start, end, receiver.length, null, null, null);
        receiver.splice(start, end - start);
      },
      setRange$4: function(receiver, start, end, iterable, skipCount) {
        var $length, i;
        this.checkMutable$1(receiver, "set range");
        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)
            receiver[start + i] = iterable[skipCount + i];
        else
          for (i = 0; i < $length; ++i)
            receiver[start + i] = iterable[skipCount + i];
      },
      setRange$3: function($receiver, start, end, iterable) {
        return this.setRange$4($receiver, start, end, iterable, 0);
      },
      any$1: function(receiver, test) {
        var end, i;
        end = receiver.length;
        for (i = 0; i < end; ++i) {
          if (test.call$1(receiver[i]))
            return true;
          if (receiver.length !== end)
            throw H.wrapException(new P.ConcurrentModificationError(receiver));
        }
        return false;
      },
      sort$1: function(receiver, compare) {
        var t1;
        this.checkMutable$1(receiver, "sort");
        t1 = compare == null ? P.core_Comparable_compare$closure() : compare;
        H.Sort__doSort(receiver, 0, receiver.length - 1, t1);
      },
      sort$0: function($receiver) {
        return this.sort$1($receiver, null);
      },
      indexOf$2: function(receiver, element, start) {
        var i;
        if (start >= receiver.length)
          return -1;
        for (i = start; i < receiver.length; ++i)
          if (J.$eq$(receiver[i], element))
            return i;
        return -1;
      },
      indexOf$1: function($receiver, element) {
        return this.indexOf$2($receiver, element, 0);
      },
      lastIndexOf$2: function(receiver, element, startIndex) {
        var i;
        startIndex = receiver.length - 1;
        for (i = startIndex; i >= 0; --i)
          if (J.$eq$(receiver[i], element))
            return i;
        return -1;
      },
      lastIndexOf$1: function($receiver, element) {
        return this.lastIndexOf$2($receiver, element, null);
      },
      contains$1: function(receiver, other) {
        var i;
        for (i = 0; i < receiver.length; ++i)
          if (J.$eq$(receiver[i], other))
            return true;
        return false;
      },
      get$isEmpty: function(receiver) {
        return receiver.length === 0;
      },
      toString$0: function(receiver) {
        return P.IterableBase_iterableToFullString(receiver, "[", "]");
      },
      toList$1$growable: function(receiver, growable) {
        var t1 = [H.getTypeArgumentByIndex(receiver, 0)];
        if (growable)
          t1 = H.setRuntimeTypeInfo(receiver.slice(), t1);
        else {
          t1 = H.setRuntimeTypeInfo(receiver.slice(), t1);
          t1.fixed$length = Array;
          t1 = t1;
        }
        return t1;
      },
      toList$0: function($receiver) {
        return this.toList$1$growable($receiver, true);
      },
      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) {
        if (!!receiver.immutable$list)
          H.throwExpression(new P.UnsupportedError("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,
      $isIterable: 1,
      $asIterable: null
    },
    JSUnmodifiableArray: {
      "^": "JSArray;$ti"
    },
    ArrayIterator: {
      "^": "Object;_iterable,__interceptors$_length,_index,__interceptors$_current",
      get$current: function() {
        return this.__interceptors$_current;
      },
      moveNext$0: function() {
        var t1, $length, t2;
        t1 = this._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;",
      compareTo$1: function(receiver, b) {
        var bIsNegative;
        if (typeof b !== "number")
          throw H.wrapException(H.argumentErrorValue(b));
        if (receiver < b)
          return -1;
        else if (receiver > b)
          return 1;
        else if (receiver === b) {
          if (receiver === 0) {
            bIsNegative = this.get$isNegative(b);
            if (this.get$isNegative(receiver) === bIsNegative)
              return 0;
            if (this.get$isNegative(receiver))
              return -1;
            return 1;
          }
          return 0;
        } else if (isNaN(receiver)) {
          if (isNaN(b))
            return 0;
          return 1;
        } else
          return -1;
      },
      get$isNegative: function(receiver) {
        return receiver === 0 ? 1 / receiver < 0 : receiver < 0;
      },
      remainder$1: function(receiver, b) {
        if (typeof b !== "number")
          throw H.wrapException(H.argumentErrorValue(b));
        return receiver % b;
      },
      abs$0: function(receiver) {
        return Math.abs(receiver);
      },
      toInt$0: function(receiver) {
        var t1;
        if (receiver >= -2147483648 && receiver <= 2147483647)
          return receiver | 0;
        if (isFinite(receiver)) {
          t1 = receiver < 0 ? Math.ceil(receiver) : Math.floor(receiver);
          return t1 + 0;
        }
        throw H.wrapException(new P.UnsupportedError("" + receiver + ".toInt()"));
      },
      ceil$0: function(receiver) {
        var truncated, d;
        if (receiver >= 0) {
          if (receiver <= 2147483647) {
            truncated = receiver | 0;
            return receiver === truncated ? truncated : truncated + 1;
          }
        } else if (receiver >= -2147483648)
          return receiver | 0;
        d = Math.ceil(receiver);
        if (isFinite(d))
          return d;
        throw H.wrapException(new P.UnsupportedError("" + receiver + ".ceil()"));
      },
      floor$0: function(receiver) {
        var truncated, d;
        if (receiver >= 0) {
          if (receiver <= 2147483647)
            return receiver | 0;
        } else if (receiver >= -2147483648) {
          truncated = receiver | 0;
          return receiver === truncated ? truncated : truncated - 1;
        }
        d = Math.floor(receiver);
        if (isFinite(d))
          return d;
        throw H.wrapException(new P.UnsupportedError("" + receiver + ".floor()"));
      },
      round$0: function(receiver) {
        if (receiver > 0) {
          if (receiver !== 1 / 0)
            return Math.round(receiver);
        } else if (receiver > -1 / 0)
          return 0 - Math.round(0 - receiver);
        throw H.wrapException(new P.UnsupportedError("" + receiver + ".round()"));
      },
      clamp$2: function(receiver, lowerLimit, upperLimit) {
        if (this.compareTo$1(lowerLimit, upperLimit) > 0)
          throw H.wrapException(H.argumentErrorValue(lowerLimit));
        if (this.compareTo$1(receiver, lowerLimit) < 0)
          return lowerLimit;
        if (this.compareTo$1(receiver, upperLimit) > 0)
          return upperLimit;
        return receiver;
      },
      toDouble$0: function(receiver) {
        return receiver;
      },
      toStringAsFixed$1: function(receiver, fractionDigits) {
        var result;
        if (fractionDigits > 20)
          throw H.wrapException(P.RangeError$range(fractionDigits, 0, 20, "fractionDigits", null));
        result = receiver.toFixed(fractionDigits);
        if (receiver === 0 && this.get$isNegative(receiver))
          return "-" + result;
        return result;
      },
      toStringAsPrecision$1: function(receiver, precision) {
        var result;
        if (precision < 1 || precision > 21)
          throw H.wrapException(P.RangeError$range(precision, 1, 21, "precision", null));
        result = receiver.toPrecision(precision);
        if (receiver === 0 && this.get$isNegative(receiver))
          return "-" + result;
        return result;
      },
      toRadixString$1: function(receiver, radix) {
        var result, match, t1, exponent;
        if (radix < 2 || radix > 36)
          throw H.wrapException(P.RangeError$range(radix, 2, 36, "radix", null));
        result = receiver.toString(radix);
        if (C.JSString_methods.codeUnitAt$1(result, result.length - 1) !== 41)
          return result;
        match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result);
        if (match == null)
          H.throwExpression(new P.UnsupportedError("Unexpected toString result: " + result));
        t1 = J.getInterceptor$asx(match);
        result = t1.$index(match, 1);
        exponent = +t1.$index(match, 3);
        if (t1.$index(match, 2) != null) {
          result += t1.$index(match, 2);
          exponent -= t1.$index(match, 2).length;
        }
        return result + C.JSString_methods.$mul("0", exponent);
      },
      toString$0: function(receiver) {
        if (receiver === 0 && 1 / receiver < 0)
          return "-0.0";
        else
          return "" + receiver;
      },
      get$hashCode: function(receiver) {
        return receiver & 0x1FFFFFFF;
      },
      $negate: function(receiver) {
        return -receiver;
      },
      $add: function(receiver, other) {
        if (typeof other !== "number")
          throw H.wrapException(H.argumentErrorValue(other));
        return receiver + other;
      },
      $sub: function(receiver, other) {
        if (typeof other !== "number")
          throw H.wrapException(H.argumentErrorValue(other));
        return receiver - other;
      },
      $div: function(receiver, other) {
        if (typeof other !== "number")
          throw H.wrapException(H.argumentErrorValue(other));
        return receiver / other;
      },
      $mul: function(receiver, other) {
        if (typeof other !== "number")
          throw H.wrapException(H.argumentErrorValue(other));
        return receiver * other;
      },
      $mod: function(receiver, other) {
        var result;
        if (typeof other !== "number")
          throw H.wrapException(H.argumentErrorValue(other));
        result = receiver % other;
        if (result === 0)
          return 0;
        if (result > 0)
          return result;
        if (other < 0)
          return result - other;
        else
          return result + other;
      },
      $tdiv: function(receiver, other) {
        if (typeof other !== "number")
          throw H.wrapException(H.argumentErrorValue(other));
        if ((receiver | 0) === receiver)
          if (other >= 1 || other < -1)
            return receiver / other | 0;
        return this._tdivSlow$1(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));
      },
      $shl: function(receiver, other) {
        if (other < 0)
          throw H.wrapException(H.argumentErrorValue(other));
        return other > 31 ? 0 : receiver << other >>> 0;
      },
      _shlPositive$1: function(receiver, other) {
        return other > 31 ? 0 : receiver << other >>> 0;
      },
      $shr: function(receiver, other) {
        var t1;
        if (other < 0)
          throw H.wrapException(H.argumentErrorValue(other));
        if (receiver > 0)
          t1 = other > 31 ? 0 : receiver >>> other;
        else {
          t1 = other > 31 ? 31 : other;
          t1 = receiver >> t1 >>> 0;
        }
        return t1;
      },
      _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;
      },
      $and: function(receiver, other) {
        return (receiver & other) >>> 0;
      },
      $or: function(receiver, other) {
        if (typeof other !== "number")
          throw H.wrapException(H.argumentErrorValue(other));
        return (receiver | other) >>> 0;
      },
      $lt: function(receiver, other) {
        if (typeof other !== "number")
          throw H.wrapException(H.argumentErrorValue(other));
        return receiver < other;
      },
      $gt: function(receiver, other) {
        if (typeof other !== "number")
          throw H.wrapException(H.argumentErrorValue(other));
        return receiver > other;
      },
      $le: function(receiver, other) {
        if (typeof other !== "number")
          throw H.wrapException(H.argumentErrorValue(other));
        return receiver <= other;
      },
      $ge: function(receiver, other) {
        if (typeof other !== "number")
          throw H.wrapException(H.argumentErrorValue(other));
        return receiver >= other;
      },
      $isnum: 1
    },
    JSInt: {
      "^": "JSNumber;",
      $is$double: 1,
      $isnum: 1,
      $is$int: 1
    },
    JSDouble: {
      "^": "JSNumber;",
      $is$double: 1,
      $isnum: 1
    },
    JSString: {
      "^": "Interceptor;",
      codeUnitAt$1: function(receiver, index) {
        if (typeof index !== "number" || Math.floor(index) !== index)
          throw H.wrapException(H.diagnoseIndexError(receiver, index));
        if (index < 0)
          throw H.wrapException(H.diagnoseIndexError(receiver, index));
        if (index >= receiver.length)
          throw H.wrapException(H.diagnoseIndexError(receiver, index));
        return receiver.charCodeAt(index);
      },
      allMatches$2: function(receiver, string, start) {
        if (start > string.length)
          throw H.wrapException(P.RangeError$range(start, 0, string.length, null, null));
        return new H._StringAllMatchesIterable(string, receiver, start);
      },
      allMatches$1: function($receiver, string) {
        return this.allMatches$2($receiver, string, 0);
      },
      matchAsPrefix$2: function(receiver, string, start) {
        var t1, t2, i;
        if (start < 0 || start > string.length)
          throw H.wrapException(P.RangeError$range(start, 0, string.length, null, null));
        t1 = receiver.length;
        if (start + t1 > string.length)
          return;
        for (t2 = J.getInterceptor$s(string), i = 0; i < t1; ++i)
          if (t2.codeUnitAt$1(string, start + i) !== this.codeUnitAt$1(receiver, i))
            return;
        return new H.StringMatch(start, string, receiver);
      },
      matchAsPrefix$1: function($receiver, string) {
        return this.matchAsPrefix$2($receiver, string, 0);
      },
      $add: function(receiver, other) {
        if (typeof other !== "string")
          throw H.wrapException(P.ArgumentError$value(other, null, null));
        return receiver + other;
      },
      endsWith$1: function(receiver, other) {
        var otherLength, t1;
        otherLength = other.length;
        t1 = receiver.length;
        if (otherLength > t1)
          return false;
        return other === this.substring$1(receiver, t1 - otherLength);
      },
      replaceAll$2: function(receiver, from, to) {
        H.checkString(to);
        return H.stringReplaceAllUnchecked(receiver, from, to);
      },
      split$1: function(receiver, pattern) {
        if (pattern == null)
          H.throwExpression(H.argumentErrorValue(pattern));
        if (typeof pattern === "string")
          return receiver.split(pattern);
        else if (pattern instanceof H.JSSyntaxRegExp && pattern.get$_nativeAnchoredVersion().exec("").length - 2 === 0)
          return receiver.split(pattern._nativeRegExp);
        else
          return this._defaultSplit$1(receiver, pattern);
      },
      replaceRange$3: function(receiver, start, end, replacement) {
        return H.stringReplaceRangeUnchecked(receiver, start, P.RangeError_checkValidRange(start, end, receiver.length, null, null, null), replacement);
      },
      _defaultSplit$1: function(receiver, pattern) {
        var result, t1, start, $length, match, matchStart, matchEnd;
        result = H.setRuntimeTypeInfo([], [P.String]);
        for (t1 = J.allMatches$1$s(pattern, receiver), t1 = t1.get$iterator(t1), start = 0, $length = 1; t1.moveNext$0();) {
          match = t1.get$current();
          matchStart = match.get$start(match);
          matchEnd = match.get$end();
          $length = matchEnd - matchStart;
          if ($length === 0 && start === matchStart)
            continue;
          result.push(this.substring$2(receiver, start, matchStart));
          start = matchEnd;
        }
        if (start < receiver.length || $length > 0)
          result.push(this.substring$1(receiver, start));
        return result;
      },
      startsWith$2: function(receiver, pattern, index) {
        var endIndex;
        if (index > receiver.length)
          throw H.wrapException(P.RangeError$range(index, 0, receiver.length, null, null));
        if (typeof pattern === "string") {
          endIndex = index + pattern.length;
          if (endIndex > receiver.length)
            return false;
          return pattern === receiver.substring(index, endIndex);
        }
        return J.matchAsPrefix$2$s(pattern, receiver, index) != null;
      },
      startsWith$1: function($receiver, pattern) {
        return this.startsWith$2($receiver, pattern, 0);
      },
      substring$2: function(receiver, startIndex, endIndex) {
        if (endIndex == null)
          endIndex = receiver.length;
        if (typeof endIndex !== "number" || Math.floor(endIndex) !== endIndex)
          H.throwExpression(H.argumentErrorValue(endIndex));
        if (startIndex < 0)
          throw H.wrapException(P.RangeError$value(startIndex, null, null));
        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();
      },
      toUpperCase$0: function(receiver) {
        return receiver.toUpperCase();
      },
      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);
      },
      trimLeft$0: function(receiver) {
        var result, startIndex;
        if (typeof receiver.trimLeft != "undefined") {
          result = receiver.trimLeft();
          if (result.length === 0)
            return result;
          startIndex = this.codeUnitAt$1(result, 0) === 133 ? J.JSString__skipLeadingWhitespace(result, 1) : 0;
        } else {
          startIndex = J.JSString__skipLeadingWhitespace(receiver, 0);
          result = receiver;
        }
        if (startIndex === 0)
          return result;
        if (startIndex === result.length)
          return "";
        return result.substring(startIndex);
      },
      trimRight$0: function(receiver) {
        var result, endIndex, t1;
        if (typeof receiver.trimRight != "undefined") {
          result = receiver.trimRight();
          endIndex = result.length;
          if (endIndex === 0)
            return result;
          t1 = endIndex - 1;
          if (this.codeUnitAt$1(result, t1) === 133)
            endIndex = J.JSString__skipTrailingWhitespace(result, t1);
        } else {
          endIndex = J.JSString__skipTrailingWhitespace(receiver, receiver.length);
          result = receiver;
        }
        if (endIndex === result.length)
          return result;
        if (endIndex === 0)
          return "";
        return result.substring(0, endIndex);
      },
      $mul: function(receiver, times) {
        var s, result;
        if (0 >= times)
          return "";
        if (times === 1 || receiver.length === 0)
          return receiver;
        if (times !== times >>> 0)
          throw H.wrapException(C.C_OutOfMemoryError);
        for (s = receiver, result = ""; true;) {
          if ((times & 1) === 1)
            result = s + result;
          times = times >>> 1;
          if (times === 0)
            break;
          s += s;
        }
        return result;
      },
      indexOf$2: function(receiver, pattern, start) {
        if (start < 0 || start > receiver.length)
          throw H.wrapException(P.RangeError$range(start, 0, receiver.length, null, null));
        return receiver.indexOf(pattern, start);
      },
      indexOf$1: function($receiver, pattern) {
        return this.indexOf$2($receiver, pattern, 0);
      },
      lastIndexOf$2: function(receiver, pattern, start) {
        var t1, t2;
        start = receiver.length;
        t1 = pattern.length;
        t2 = receiver.length;
        if (start + t1 > t2)
          start = t2 - t1;
        return receiver.lastIndexOf(pattern, start);
      },
      lastIndexOf$1: function($receiver, pattern) {
        return this.lastIndexOf$2($receiver, pattern, null);
      },
      contains$2: function(receiver, other, startIndex) {
        if (startIndex > receiver.length)
          throw H.wrapException(P.RangeError$range(startIndex, 0, receiver.length, null, null));
        return H.stringContainsUnchecked(receiver, other, startIndex);
      },
      contains$1: function($receiver, other) {
        return this.contains$2($receiver, other, 0);
      },
      get$isEmpty: function(receiver) {
        return receiver.length === 0;
      },
      compareTo$1: function(receiver, other) {
        var t1;
        if (typeof other !== "string")
          throw H.wrapException(H.argumentErrorValue(other));
        if (receiver === other)
          t1 = 0;
        else
          t1 = receiver < other ? -1 : 1;
        return t1;
      },
      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,
      $isPattern: 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 6158:
            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");
    },
    Sort__doSort: function(a, left, right, compare) {
      if (right - left <= 32)
        H.Sort__insertionSort(a, left, right, compare);
      else
        H.Sort__dualPivotQuicksort(a, left, right, compare);
    },
    Sort__insertionSort: function(a, left, right, compare) {
      var i, t1, el, j, j0;
      for (i = left + 1, t1 = J.getInterceptor$asx(a); i <= right; ++i) {
        el = t1.$index(a, i);
        j = i;
        while (true) {
          if (!(j > left && J.$gt$n(compare.call$2(t1.$index(a, j - 1), el), 0)))
            break;
          j0 = j - 1;
          t1.$indexSet(a, j, t1.$index(a, j0));
          j = j0;
        }
        t1.$indexSet(a, j, el);
      }
    },
    Sort__dualPivotQuicksort: function(a, left, right, compare) {
      var sixth, index1, index5, index3, index2, index4, t1, el1, el2, el3, el4, el5, t0, less, great, k, ak, comp, great0, less0, pivots_are_equal, t2;
      sixth = C.JSInt_methods._tdivFast$1(right - left + 1, 6);
      index1 = left + sixth;
      index5 = right - sixth;
      index3 = C.JSInt_methods._tdivFast$1(left + right, 2);
      index2 = index3 - sixth;
      index4 = index3 + sixth;
      t1 = J.getInterceptor$asx(a);
      el1 = t1.$index(a, index1);
      el2 = t1.$index(a, index2);
      el3 = t1.$index(a, index3);
      el4 = t1.$index(a, index4);
      el5 = t1.$index(a, index5);
      if (J.$gt$n(compare.call$2(el1, el2), 0)) {
        t0 = el2;
        el2 = el1;
        el1 = t0;
      }
      if (J.$gt$n(compare.call$2(el4, el5), 0)) {
        t0 = el5;
        el5 = el4;
        el4 = t0;
      }
      if (J.$gt$n(compare.call$2(el1, el3), 0)) {
        t0 = el3;
        el3 = el1;
        el1 = t0;
      }
      if (J.$gt$n(compare.call$2(el2, el3), 0)) {
        t0 = el3;
        el3 = el2;
        el2 = t0;
      }
      if (J.$gt$n(compare.call$2(el1, el4), 0)) {
        t0 = el4;
        el4 = el1;
        el1 = t0;
      }
      if (J.$gt$n(compare.call$2(el3, el4), 0)) {
        t0 = el4;
        el4 = el3;
        el3 = t0;
      }
      if (J.$gt$n(compare.call$2(el2, el5), 0)) {
        t0 = el5;
        el5 = el2;
        el2 = t0;
      }
      if (J.$gt$n(compare.call$2(el2, el3), 0)) {
        t0 = el3;
        el3 = el2;
        el2 = t0;
      }
      if (J.$gt$n(compare.call$2(el4, el5), 0)) {
        t0 = el5;
        el5 = el4;
        el4 = t0;
      }
      t1.$indexSet(a, index1, el1);
      t1.$indexSet(a, index3, el3);
      t1.$indexSet(a, index5, el5);
      t1.$indexSet(a, index2, t1.$index(a, left));
      t1.$indexSet(a, index4, t1.$index(a, right));
      less = left + 1;
      great = right - 1;
      if (J.$eq$(compare.call$2(el2, el4), 0)) {
        for (k = less; k <= great; ++k) {
          ak = t1.$index(a, k);
          comp = compare.call$2(ak, el2);
          if (comp === 0)
            continue;
          if (comp < 0) {
            if (k !== less) {
              t1.$indexSet(a, k, t1.$index(a, less));
              t1.$indexSet(a, less, ak);
            }
            ++less;
          } else
            for (; true;) {
              comp = compare.call$2(t1.$index(a, great), el2);
              if (comp > 0) {
                --great;
                continue;
              } else {
                great0 = great - 1;
                if (comp < 0) {
                  t1.$indexSet(a, k, t1.$index(a, less));
                  less0 = less + 1;
                  t1.$indexSet(a, less, t1.$index(a, great));
                  t1.$indexSet(a, great, ak);
                  great = great0;
                  less = less0;
                  break;
                } else {
                  t1.$indexSet(a, k, t1.$index(a, great));
                  t1.$indexSet(a, great, ak);
                  great = great0;
                  break;
                }
              }
            }
        }
        pivots_are_equal = true;
      } else {
        for (k = less; k <= great; ++k) {
          ak = t1.$index(a, k);
          if (compare.call$2(ak, el2) < 0) {
            if (k !== less) {
              t1.$indexSet(a, k, t1.$index(a, less));
              t1.$indexSet(a, less, ak);
            }
            ++less;
          } else if (compare.call$2(ak, el4) > 0)
            for (; true;)
              if (compare.call$2(t1.$index(a, great), el4) > 0) {
                --great;
                if (great < k)
                  break;
                continue;
              } else {
                great0 = great - 1;
                if (compare.call$2(t1.$index(a, great), el2) < 0) {
                  t1.$indexSet(a, k, t1.$index(a, less));
                  less0 = less + 1;
                  t1.$indexSet(a, less, t1.$index(a, great));
                  t1.$indexSet(a, great, ak);
                  less = less0;
                } else {
                  t1.$indexSet(a, k, t1.$index(a, great));
                  t1.$indexSet(a, great, ak);
                }
                great = great0;
                break;
              }
        }
        pivots_are_equal = false;
      }
      t2 = less - 1;
      t1.$indexSet(a, left, t1.$index(a, t2));
      t1.$indexSet(a, t2, el2);
      t2 = great + 1;
      t1.$indexSet(a, right, t1.$index(a, t2));
      t1.$indexSet(a, t2, el4);
      H.Sort__doSort(a, left, less - 2, compare);
      H.Sort__doSort(a, great + 2, right, compare);
      if (pivots_are_equal)
        return;
      if (less < index1 && great > index5) {
        for (; J.$eq$(compare.call$2(t1.$index(a, less), el2), 0);)
          ++less;
        for (; J.$eq$(compare.call$2(t1.$index(a, great), el4), 0);)
          --great;
        for (k = less; k <= great; ++k) {
          ak = t1.$index(a, k);
          if (compare.call$2(ak, el2) === 0) {
            if (k !== less) {
              t1.$indexSet(a, k, t1.$index(a, less));
              t1.$indexSet(a, less, ak);
            }
            ++less;
          } else if (compare.call$2(ak, el4) === 0)
            for (; true;)
              if (compare.call$2(t1.$index(a, great), el4) === 0) {
                --great;
                if (great < k)
                  break;
                continue;
              } else {
                great0 = great - 1;
                if (compare.call$2(t1.$index(a, great), el2) < 0) {
                  t1.$indexSet(a, k, t1.$index(a, less));
                  less0 = less + 1;
                  t1.$indexSet(a, less, t1.$index(a, great));
                  t1.$indexSet(a, great, ak);
                  less = less0;
                } else {
                  t1.$indexSet(a, k, t1.$index(a, great));
                  t1.$indexSet(a, great, ak);
                }
                great = great0;
                break;
              }
        }
        H.Sort__doSort(a, less, great, compare);
      } else
        H.Sort__doSort(a, less, great, compare);
    },
    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));
        }
      },
      get$isEmpty: function(_) {
        return this.get$length(this) === 0;
      },
      get$first: function(_) {
        if (this.get$length(this) === 0)
          throw H.wrapException(H.IterableElementError_noElement());
        return this.elementAt$1(0, 0);
      },
      every$1: function(_, test) {
        var $length, i;
        $length = this.get$length(this);
        for (i = 0; i < $length; ++i) {
          if (!test.call$1(this.elementAt$1(0, i)))
            return false;
          if ($length !== this.get$length(this))
            throw H.wrapException(new P.ConcurrentModificationError(this));
        }
        return true;
      },
      join$1: function(_, separator) {
        var $length, first, t1, i;
        $length = this.get$length(this);
        if (separator.length !== 0) {
          if ($length === 0)
            return "";
          first = H.S(this.elementAt$1(0, 0));
          if ($length !== this.get$length(this))
            throw H.wrapException(new P.ConcurrentModificationError(this));
          for (t1 = first, i = 1; i < $length; ++i) {
            t1 = t1 + separator + H.S(this.elementAt$1(0, i));
            if ($length !== this.get$length(this))
              throw H.wrapException(new P.ConcurrentModificationError(this));
          }
          return t1.charCodeAt(0) == 0 ? t1 : t1;
        } else {
          for (i = 0, t1 = ""; i < $length; ++i) {
            t1 += H.S(this.elementAt$1(0, i));
            if ($length !== this.get$length(this))
              throw H.wrapException(new P.ConcurrentModificationError(this));
          }
          return t1.charCodeAt(0) == 0 ? t1 : t1;
        }
      },
      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;
        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)
          result[i] = this.elementAt$1(0, i);
        return result;
      },
      toList$0: function($receiver) {
        return this.toList$1$growable($receiver, true);
      }
    },
    SubListIterable: {
      "^": "ListIterable;__internal$_iterable,__internal$_start,_endOrLength,$ti",
      get$_endIndex: function() {
        var $length, t1;
        $length = J.get$length$asx(this.__internal$_iterable);
        t1 = this._endOrLength;
        if (t1 == null || t1 > $length)
          return $length;
        return t1;
      },
      get$_startIndex: function() {
        var $length, t1;
        $length = J.get$length$asx(this.__internal$_iterable);
        t1 = this.__internal$_start;
        if (t1 > $length)
          return $length;
        return t1;
      },
      get$length: function(_) {
        var $length, t1, t2;
        $length = J.get$length$asx(this.__internal$_iterable);
        t1 = this.__internal$_start;
        if (t1 >= $length)
          return 0;
        t2 = this._endOrLength;
        if (t2 == null || t2 >= $length)
          return $length - t1;
        return t2 - t1;
      },
      elementAt$1: function(_, index) {
        var realIndex = this.get$_startIndex() + index;
        if (index < 0 || realIndex >= this.get$_endIndex())
          throw H.wrapException(P.IndexError$(index, this, "index", null, null));
        return J.elementAt$1$ax(this.__internal$_iterable, realIndex);
      },
      take$1: function(_, count) {
        var t1, t2, newEnd;
        if (count < 0)
          H.throwExpression(P.RangeError$range(count, 0, null, "count", null));
        t1 = this._endOrLength;
        t2 = this.__internal$_start;
        newEnd = t2 + count;
        if (t1 == null)
          return H.SubListIterable$(this.__internal$_iterable, t2, newEnd, H.getTypeArgumentByIndex(this, 0));
        else {
          if (t1 < newEnd)
            return this;
          return H.SubListIterable$(this.__internal$_iterable, t2, newEnd, H.getTypeArgumentByIndex(this, 0));
        }
      },
      toList$1$growable: function(_, growable) {
        var start, t1, t2, end, end0, $length, result, i;
        start = this.__internal$_start;
        t1 = this.__internal$_iterable;
        t2 = J.getInterceptor$asx(t1);
        end = t2.get$length(t1);
        end0 = this._endOrLength;
        if (end0 != null && end0 < end)
          end = end0;
        $length = end - start;
        if ($length < 0)
          $length = 0;
        result = H.setRuntimeTypeInfo(new Array($length), this.$ti);
        for (i = 0; i < $length; ++i) {
          result[i] = t2.elementAt$1(t1, start + i);
          if (t2.get$length(t1) < end)
            throw H.wrapException(new P.ConcurrentModificationError(this));
        }
        return result;
      },
      toList$0: function($receiver) {
        return this.toList$1$growable($receiver, true);
      },
      SubListIterable$3: function(_iterable, _start, _endOrLength, $E) {
        var t1, t2;
        t1 = this.__internal$_start;
        if (t1 < 0)
          H.throwExpression(P.RangeError$range(t1, 0, null, "start", null));
        t2 = this._endOrLength;
        if (t2 != null) {
          if (t2 < 0)
            H.throwExpression(P.RangeError$range(t2, 0, null, "end", null));
          if (t1 > t2)
            throw H.wrapException(P.RangeError$range(t1, 0, t2, "start", null));
        }
      },
      static: {
        SubListIterable$: function(_iterable, _start, _endOrLength, $E) {
          var t1 = new H.SubListIterable(_iterable, _start, _endOrLength, [$E]);
          t1.SubListIterable$3(_iterable, _start, _endOrLength, $E);
          return t1;
        }
      }
    },
    ListIterator: {
      "^": "Object;__internal$_iterable,__internal$_length,__internal$_index,__internal$_current",
      get$current: function() {
        return this.__internal$_current;
      },
      moveNext$0: function() {
        var t1, t2, $length, t3;
        t1 = this.__internal$_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;__internal$_iterable,_f,$ti",
      get$iterator: function(_) {
        return new H.MappedIterator(null, J.get$iterator$ax(this.__internal$_iterable), this._f, this.$ti);
      },
      get$length: function(_) {
        return J.get$length$asx(this.__internal$_iterable);
      },
      get$isEmpty: function(_) {
        return J.get$isEmpty$asx(this.__internal$_iterable);
      },
      elementAt$1: function(_, index) {
        return this._f.call$1(J.elementAt$1$ax(this.__internal$_iterable, index));
      },
      $asIterable: function($S, $T) {
        return [$T];
      },
      static: {
        MappedIterable_MappedIterable: function(iterable, $function, $S, $T) {
          if (!!J.getInterceptor(iterable).$isEfficientLengthIterable)
            return new H.EfficientLengthMappedIterable(iterable, $function, [$S, $T]);
          return new H.MappedIterable(iterable, $function, [$S, $T]);
        }
      }
    },
    EfficientLengthMappedIterable: {
      "^": "MappedIterable;__internal$_iterable,_f,$ti",
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function($S, $T) {
        return [$T];
      },
      $asIterable: 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;__internal$_iterable,_f,$ti",
      get$iterator: function(_) {
        return new H.WhereIterator(J.get$iterator$ax(this.__internal$_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()))
            return true;
        return false;
      },
      get$current: function() {
        return this._iterator.get$current();
      }
    },
    TakeIterable: {
      "^": "Iterable;__internal$_iterable,_takeCount,$ti",
      get$iterator: function(_) {
        return new H.TakeIterator(J.get$iterator$ax(this.__internal$_iterable), this._takeCount, this.$ti);
      },
      static: {
        TakeIterable_TakeIterable: function(iterable, takeCount, $E) {
          if (takeCount < 0)
            throw H.wrapException(P.ArgumentError$(takeCount));
          if (!!J.getInterceptor(iterable).$isEfficientLengthIterable)
            return new H.EfficientLengthTakeIterable(iterable, takeCount, [$E]);
          return new H.TakeIterable(iterable, takeCount, [$E]);
        }
      }
    },
    EfficientLengthTakeIterable: {
      "^": "TakeIterable;__internal$_iterable,_takeCount,$ti",
      get$length: function(_) {
        var iterableLength, t1;
        iterableLength = J.get$length$asx(this.__internal$_iterable);
        t1 = this._takeCount;
        if (iterableLength > t1)
          return t1;
        return iterableLength;
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: null,
      $asIterable: null
    },
    TakeIterator: {
      "^": "Iterator;_iterator,_remaining,$ti",
      moveNext$0: function() {
        if (--this._remaining >= 0)
          return this._iterator.moveNext$0();
        this._remaining = -1;
        return false;
      },
      get$current: function() {
        if (this._remaining < 0)
          return;
        return this._iterator.get$current();
      }
    },
    SkipIterable: {
      "^": "Iterable;__internal$_iterable,_skipCount,$ti",
      get$iterator: function(_) {
        return new H.SkipIterator(J.get$iterator$ax(this.__internal$_iterable), this._skipCount, this.$ti);
      },
      SkipIterable$_$2: function(_iterable, _skipCount, $E) {
        var t1 = this._skipCount;
        if (t1 < 0)
          H.throwExpression(P.RangeError$range(t1, 0, null, "count", null));
      },
      static: {
        SkipIterable_SkipIterable: function(iterable, count, $E) {
          var t1;
          if (!!J.getInterceptor(iterable).$isEfficientLengthIterable) {
            t1 = new H.EfficientLengthSkipIterable(iterable, count, [$E]);
            t1.SkipIterable$_$2(iterable, count, $E);
            return t1;
          }
          return H.SkipIterable$_(iterable, count, $E);
        },
        SkipIterable$_: function(_iterable, _skipCount, $E) {
          var t1 = new H.SkipIterable(_iterable, _skipCount, [$E]);
          t1.SkipIterable$_$2(_iterable, _skipCount, $E);
          return t1;
        }
      }
    },
    EfficientLengthSkipIterable: {
      "^": "SkipIterable;__internal$_iterable,_skipCount,$ti",
      get$length: function(_) {
        var $length = J.get$length$asx(this.__internal$_iterable) - this._skipCount;
        if ($length >= 0)
          return $length;
        return 0;
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: null,
      $asIterable: null
    },
    SkipIterator: {
      "^": "Iterator;_iterator,_skipCount,$ti",
      moveNext$0: function() {
        var t1, i;
        for (t1 = this._iterator, i = 0; i < this._skipCount; ++i)
          t1.moveNext$0();
        this._skipCount = 0;
        return t1.moveNext$0();
      },
      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"));
      },
      remove$1: function(receiver, element) {
        throw H.wrapException(new P.UnsupportedError("Cannot remove from a fixed-length list"));
      }
    },
    ReversedListIterable: {
      "^": "ListIterable;_source,$ti",
      get$length: function(_) {
        return J.get$length$asx(this._source);
      },
      elementAt$1: function(_, index) {
        var t1, t2;
        t1 = this._source;
        t2 = J.getInterceptor$asx(t1);
        return t2.elementAt$1(t1, t2.get$length(t1) - 1 - index);
      }
    },
    Symbol: {
      "^": "Object;__internal$_name",
      $eq: function(_, other) {
        var t1, t2;
        if (other == null)
          return false;
        if (other instanceof H.Symbol) {
          t1 = this.__internal$_name;
          t2 = other.__internal$_name;
          t2 = t1 == null ? t2 == null : t1 === t2;
          t1 = t2;
        } else
          t1 = false;
        return t1;
      },
      get$hashCode: function(_) {
        var hash = this._hashCode;
        if (hash != null)
          return hash;
        hash = 536870911 & 664597 * J.get$hashCode$(this.__internal$_name);
        this._hashCode = hash;
        return hash;
      },
      toString$0: function(_) {
        return 'Symbol("' + H.S(this.__internal$_name) + '")';
      }
    }
  }], ["_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) {
        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)
        return;
      t2 = init.globalState.nextIsolateId++;
      t4 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t3, H.RawReceivePortImpl]);
      t3 = P.LinkedHashSet_LinkedHashSet(null, null, null, t3);
      t5 = new H.RawReceivePortImpl(0, null, false);
      rootContext = new H._IsolateContext(t2, t4, t3, 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));
      t3.add$1(0, 0);
      rootContext._addRegistration$2(0, t5);
      init.globalState.rootContext = rootContext;
      init.globalState.currentContext = rootContext;
      t2 = H.getDynamicRuntimeType();
      if (H.buildFunctionType(t2, [t2])._isTest$1(entry))
        rootContext.eval$1(new H.startRootIsolate_closure(t1, entry));
      else if (H.buildFunctionType(t2, [t2, t2])._isTest$1(entry))
        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)
        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 "' + H.S(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 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t2, H.RawReceivePortImpl]);
          t2 = P.LinkedHashSet_LinkedHashSet(null, null, null, t2);
          t4 = new H.RawReceivePortImpl(0, null, false);
          context = new H._IsolateContext(t1, t3, t2, 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));
          t2.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) {
            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"));
      }
    }, null, null, 4, 0, null, 80, 3],
    IsolateNatives__log: function(msg) {
      var trace, t1, t2, exception;
      if (init.globalState.isWorker) {
        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);
          throw H.wrapException(P.Exception_Exception(trace));
        }
    },
    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;
      replyTo.send$1(0, ["spawned", new H._NativeJsSendPort(t1, t2), t3, context.terminateCapability]);
      t2 = new H.IsolateNatives__startIsolate_runStartFunction(topLevel, args, message, isSpawnUri, context);
      if (startPaused) {
        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:1;_box_0,entry",
      call$0: function() {
        this.entry.call$1(this._box_0.args);
      }
    },
    startRootIsolate_closure0: {
      "^": "Closure:1;_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);
        }, null, null, 2, 0, null, 28]
      }
    },
    _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, $event, t2, t3, t4;
        if (!this.isPaused)
          return;
        t1 = this.pauseTokens;
        t1.remove$1(0, resume);
        if (t1._collection$_length === 0) {
          for (t1 = this.delayedEvents; t1.length !== 0;) {
            $event = t1.pop();
            t2 = init.globalState.topEventLoop.events;
            t3 = t2._head;
            t4 = t2._table;
            t3 = (t3 - 1 & t4.length - 1) >>> 0;
            t2._head = 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])) {
            this.doneHandlers[i + 1] = 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;
        if (pingType !== 0)
          t1 = pingType === 1 && !this._isExecutingEvent;
        else
          t1 = true;
        if (t1) {
          responsePort.send$1(0, 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;
        if (priority !== 0)
          t1 = 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 && 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 : stackTrace.toString$0(0);
        for (t2 = new P._LinkedHashSetIterator(t1, t1._collection$_modifications, null, null), t2._collection$_cell = t1._collection$_first; t2.moveNext$0();)
          t2._collection$_current.send$1(0, 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) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          this.handleUncaughtError$2(e, s);
          if (this.errorsAreFatal) {
            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;
      },
      handleControlMessage$1: function(message) {
        var t1 = J.getInterceptor$asx(message);
        switch (t1.$index(message, 0)) {
          case "pause":
            this.addPause$2(t1.$index(message, 1), t1.$index(message, 2));
            break;
          case "resume":
            this.removePause$1(t1.$index(message, 1));
            break;
          case "add-ondone":
            this.addDoneListener$2(t1.$index(message, 1), t1.$index(message, 2));
            break;
          case "remove-ondone":
            this.removeDoneListener$1(t1.$index(message, 1));
            break;
          case "set-errors-fatal":
            this.setErrorsFatal$2(t1.$index(message, 1), t1.$index(message, 2));
            break;
          case "ping":
            this.handlePing$3(t1.$index(message, 1), t1.$index(message, 2), t1.$index(message, 3));
            break;
          case "kill":
            this.handleKill$2(t1.$index(message, 1), t1.$index(message, 2));
            break;
          case "getErrors":
            this.errorPorts.add$1(0, t1.$index(message, 1));
            break;
          case "stopErrors":
            this.errorPorts.remove$1(0, t1.$index(message, 1));
            break;
        }
      },
      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;
        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, i < t1.length; i += 2)
            t1[i].send$1(0, t1[i + 1]);
          this.doneHandlers = null;
        }
      }, "call$0", "get$kill", 0, 0, 3]
    },
    _IsolateContext_handlePing_respond: {
      "^": "Closure:3;responsePort,response",
      call$0: [function() {
        this.responsePort.send$1(0, this.response);
      }, null, null, 0, 0, null, "call"]
    },
    _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) {
                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) {
            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)
          this._runHelper$0();
        else
          try {
            this._runHelper$0();
          } catch (exception) {
            t1 = H.unwrapException(exception);
            e = t1;
            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:3;$this",
      call$0: [function() {
        if (!this.$this.runIteration$0())
          return;
        P.Timer_Timer(C.Duration_0, this);
      }, null, null, 0, 0, null, "call"]
    },
    _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:1;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:3;topLevel,args,message,isSpawnUri,context",
      call$0: function() {
        var t1, t2, t3;
        t1 = this.context;
        t1.initialized = true;
        if (!this.isSpawnUri)
          this.topLevel.call$1(this.message);
        else {
          t2 = this.topLevel;
          t3 = H.getDynamicRuntimeType();
          if (H.buildFunctionType(t3, [t3, t3])._isTest$1(t2))
            t2.call$2(this.args, this.message);
          else if (H.buildFunctionType(t3, [t3])._isTest$1(t2))
            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._isClosed)
          return;
        msg = H._clone(message);
        if (isolate.get$controlPort() === t1) {
          isolate.handleControlMessage$1(msg);
          return;
        }
        init.globalState.topEventLoop.events._add$1(new H._IsolateEvent(isolate, new H._NativeJsSendPort_send_closure(this, msg), "receive"));
      },
      $eq: function(_, other) {
        var t1, t2;
        if (other == null)
          return false;
        if (other instanceof H._NativeJsSendPort) {
          t1 = this._receivePort;
          t2 = other._receivePort;
          t2 = t1 == null ? t2 == null : t1 === t2;
          t1 = t2;
        } else
          t1 = false;
        return t1;
      },
      get$hashCode: function(_) {
        return this._receivePort._id;
      }
    },
    _NativeJsSendPort_send_closure: {
      "^": "Closure:1;$this,msg",
      call$0: function() {
        var t1 = this.$this._receivePort;
        if (!t1._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) {
          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) {
        var t1, t2;
        if (other == null)
          return false;
        if (other instanceof H._WorkerSendPort) {
          t1 = this._workerId;
          t2 = other._workerId;
          if (t1 == null ? t2 == null : t1 === t2) {
            t1 = this._isolateId;
            t2 = other._isolateId;
            if (t1 == null ? t2 == null : t1 === t2) {
              t1 = this._receivePortId;
              t2 = other._receivePortId;
              t2 = t1 == null ? t2 == null : t1 === t2;
              t1 = t2;
            } else
              t1 = false;
          } else
            t1 = false;
        } else
          t1 = false;
        return t1;
      },
      get$hashCode: function(_) {
        return (this._workerId << 16 ^ this._isolateId << 8 ^ this._receivePortId) >>> 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",
      cancel$0: function() {
        if (self.setTimeout != null) {
          if (this._inEventLoop)
            throw H.wrapException(new P.UnsupportedError("Timer in event loop cannot be canceled."));
          var t1 = this._handle;
          if (t1 == null)
            return;
          --init.globalState.topEventLoop._activeJsAsyncCount;
          if (this._once)
            self.clearTimeout(t1);
          else
            self.clearInterval(t1);
          this._handle = null;
        } else
          throw H.wrapException(new P.UnsupportedError("Canceling a timer."));
      },
      TimerImpl$periodic$2: function(milliseconds, callback) {
        if (self.setTimeout != null) {
          ++init.globalState.topEventLoop._activeJsAsyncCount;
          this._handle = self.setInterval(H.convertDartClosureToJS(new H.TimerImpl$periodic_closure(this, callback), 0), milliseconds);
        } else
          throw H.wrapException(new P.UnsupportedError("Periodic timer."));
      },
      TimerImpl$2: function(milliseconds, callback) {
        var t1, t2;
        if (milliseconds === 0)
          t1 = self.setTimeout == null || init.globalState.isWorker;
        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$periodic: function(milliseconds, callback) {
          var t1 = new H.TimerImpl(false, false, null);
          t1.TimerImpl$periodic$2(milliseconds, callback);
          return t1;
        }
      }
    },
    TimerImpl_internalCallback: {
      "^": "Closure:3;$this,callback",
      call$0: function() {
        this.$this._handle = null;
        this.callback.call$0();
      }
    },
    TimerImpl_internalCallback0: {
      "^": "Closure:3;$this,callback",
      call$0: [function() {
        this.$this._handle = null;
        --init.globalState.topEventLoop._activeJsAsyncCount;
        this.callback.call$0();
      }, null, null, 0, 0, null, "call"]
    },
    TimerImpl$periodic_closure: {
      "^": "Closure:1;$this,callback",
      call$0: [function() {
        this.callback.call$1(this.$this);
      }, null, null, 0, 0, null, "call"]
    },
    CapabilityImpl: {
      "^": "Object;_id",
      get$hashCode: function(_) {
        var hash = this._id;
        hash = C.JSInt_methods._shrOtherPositive$1(hash, 0) ^ C.JSInt_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, 0, 30],
      unsupported$2: function(x, message) {
        throw H.wrapException(new P.UnsupportedError(H.S(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;
        serialized = [];
        C.JSArray_methods.set$length(serialized, x.length);
        for (i = 0; i < x.length; ++i)
          serialized[i] = this.serialize$1(x[i]);
        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;
        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)
          values[i] = this.serialize$1(x[keys[i]]);
        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._id];
        return ["raw sendport", x];
      }
    },
    _Deserializer: {
      "^": "Object;_adjustSendPorts,deserializedObjects",
      deserialize$1: [function(x) {
        var result, t1, 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":
            return this.deserializedObjects[x[1]];
          case "buffer":
            result = x[1];
            this.deserializedObjects.push(result);
            return result;
          case "typed":
            result = x[1];
            this.deserializedObjects.push(result);
            return result;
          case "fixed":
            result = x[1];
            this.deserializedObjects.push(result);
            t1 = H.setRuntimeTypeInfo(this.deserializeArrayInPlace$1(result), [null]);
            t1.fixed$length = Array;
            return t1;
          case "extendable":
            result = x[1];
            this.deserializedObjects.push(result);
            return H.setRuntimeTypeInfo(this.deserializeArrayInPlace$1(result), [null]);
          case "mutable":
            result = x[1];
            this.deserializedObjects.push(result);
            return this.deserializeArrayInPlace$1(result);
          case "const":
            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":
            result = x[1];
            this.deserializedObjects.push(result);
            return result;
          case "js-object":
            return this.deserializeJSObject$1(x);
          case "function":
            result = init.globalFunctions[x[1]]();
            this.deserializedObjects.push(result);
            return result;
          case "capability":
            return new H.CapabilityImpl(x[1]);
          case "dart":
            classId = x[1];
            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, 0, 30],
      deserializeArrayInPlace$1: function(x) {
        var i;
        for (i = 0; i < x.length; ++i)
          C.JSArray_methods.$indexSet(x, i, this.deserialize$1(x[i]));
        return x;
      },
      deserializeMap$1: function(x) {
        var keys, values, result, t1, i;
        keys = x[1];
        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(values), i = 0; i < keys.length; ++i)
          result.$indexSet(0, keys[i], this.deserialize$1(t1.$index(values, i)));
        return result;
      },
      deserializeSendPort$1: function(x) {
        var managerId, isolateId, receivePortId, t1, isolate, receivePort, result;
        managerId = x[1];
        isolateId = x[2];
        receivePortId = x[3];
        t1 = init.globalState.currentManagerId;
        if (managerId == null ? t1 == null : managerId === t1) {
          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 keys, values, o, t1, t2, i;
        keys = x[1];
        values = x[2];
        o = {};
        this.deserializedObjects.push(o);
        for (t1 = J.getInterceptor$asx(keys), t2 = J.getInterceptor$asx(values), i = 0; i < t1.get$length(keys); ++i)
          o[t1.$index(keys, i)] = this.deserialize$1(t2.$index(values, i));
        return o;
      }
    }
  }], ["_js_helper", "dart:_js_helper",, H, {
    "^": "",
    ConstantMap__throwUnmodifiable: function() {
      throw H.wrapException(new P.UnsupportedError("Cannot modify unmodifiable Map"));
    },
    jsConstructorNameToRti: function(constructorName) {
      return init.getTypeFromName(constructorName);
    },
    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) {
      if (handleError == null)
        throw H.wrapException(new P.FormatException(source, null, null));
      return handleError.call$1(source);
    },
    Primitives_parseInt: function(source, radix, handleError) {
      var match, decimalMatch, maxCharCode, digitsPart, t1, i;
      H.checkString(source);
      match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source);
      if (match == null)
        return H.Primitives__parseIntError(source, handleError);
      decimalMatch = match[3];
      if (radix == null) {
        if (decimalMatch != null)
          return parseInt(source, 10);
        if (match[2] != null)
          return parseInt(source, 16);
        return H.Primitives__parseIntError(source, handleError);
      }
      if (radix < 2 || radix > 36)
        throw H.wrapException(P.RangeError$range(radix, 2, 36, "radix", null));
      if (radix === 10 && decimalMatch != null)
        return parseInt(source, 10);
      if (radix < 10 || decimalMatch == null) {
        maxCharCode = radix <= 10 ? 47 + radix : 86 + radix;
        digitsPart = match[1];
        for (t1 = digitsPart.length, i = 0; i < t1; ++i)
          if ((C.JSString_methods.codeUnitAt$1(digitsPart, i) | 32) > maxCharCode)
            return H.Primitives__parseIntError(source, handleError);
      }
      return parseInt(source, radix);
    },
    Primitives__parseDoubleError: function(source, handleError) {
      if (handleError == null)
        throw H.wrapException(new P.FormatException("Invalid double", source, null));
      return handleError.call$1(source);
    },
    Primitives_parseDouble: function(source, handleError) {
      var result, trimmed;
      H.checkString(source);
      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 = J.trim$0$s(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_TSE(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_dateNow: [function() {
      return Date.now();
    }, "call$0", "_js_helper_Primitives_dateNow$closure", 0, 0, 81],
    Primitives_initTicker: function() {
      var $window, performance;
      if ($.Primitives_timerFrequency != null)
        return;
      $.Primitives_timerFrequency = 1000;
      $.Primitives_timerTicks = H._js_helper_Primitives_dateNow$closure();
      if (typeof window == "undefined")
        return;
      $window = window;
      if ($window == null)
        return;
      performance = $window.performance;
      if (performance == null)
        return;
      if (typeof performance.now != "function")
        return;
      $.Primitives_timerFrequency = 1000000;
      $.Primitives_timerTicks = new H.Primitives_initTicker_closure(performance);
    },
    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_stringFromNativeUint8List: function(charCodes, start, end) {
      var i, result, i0, chunkEnd;
      if (end <= 500 && start === 0 && end === charCodes.length)
        return String.fromCharCode.apply(null, charCodes);
      for (i = start, result = ""; i < end; i = i0) {
        i0 = i + 500;
        chunkEnd = i0 < end ? i0 : end;
        result += String.fromCharCode.apply(null, charCodes.subarray(i, chunkEnd));
      }
      return result;
    },
    Primitives_stringFromCharCode: function(charCode) {
      var bits;
      if (charCode <= 65535)
        return String.fromCharCode(charCode);
      if (charCode <= 1114111) {
        bits = charCode - 65536;
        return String.fromCharCode((55296 | C.JSInt_methods._shrOtherPositive$1(bits, 10)) >>> 0, 56320 | bits & 1023);
      }
      throw H.wrapException(P.RangeError$range(charCode, 0, 1114111, null, null));
    },
    Primitives_lazyAsJsDate: function(receiver) {
      if (receiver.date === void 0)
        receiver.date = new Date(receiver._value);
      return receiver.date;
    },
    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;
    },
    Primitives_functionNoSuchMethod: function($function, positionalArguments, namedArguments) {
      var t1, $arguments, namedArgumentList;
      t1 = {};
      t1.argumentCount = 0;
      $arguments = [];
      namedArgumentList = [];
      t1.argumentCount = positionalArguments.length;
      C.JSArray_methods.addAll$1($arguments, positionalArguments);
      t1.names = "";
      if (namedArguments != null && !namedArguments.get$isEmpty(namedArguments))
        namedArguments.forEach$1(0, new H.Primitives_functionNoSuchMethod_closure(t1, $arguments, namedArgumentList));
      return J.noSuchMethod$1$($function, new H.JSInvocationMirror(C.Symbol_call, "call" + "$" + t1.argumentCount + t1.names, 0, $arguments, namedArgumentList, null));
    },
    Primitives_applyFunctionWithPositionalArguments: function($function, positionalArguments) {
      var $arguments, t1;
      $arguments = positionalArguments instanceof Array ? positionalArguments : P.List_List$from(positionalArguments, true, null);
      t1 = $arguments.length;
      if (t1 === 0) {
        if (!!$function.call$0)
          return $function.call$0();
      } else if (t1 === 1) {
        if (!!$function.call$1)
          return $function.call$1($arguments[0]);
      } else if (t1 === 2) {
        if (!!$function.call$2)
          return $function.call$2($arguments[0], $arguments[1]);
      } else if (t1 === 3) {
        if (!!$function.call$3)
          return $function.call$3($arguments[0], $arguments[1], $arguments[2]);
      } else if (t1 === 4) {
        if (!!$function.call$4)
          return $function.call$4($arguments[0], $arguments[1], $arguments[2], $arguments[3]);
      } else if (t1 === 5)
        if (!!$function.call$5)
          return $function.call$5($arguments[0], $arguments[1], $arguments[2], $arguments[3], $arguments[4]);
      return H.Primitives__genericApplyFunctionWithPositionalArguments($function, $arguments);
    },
    Primitives__genericApplyFunctionWithPositionalArguments: function($function, $arguments) {
      var argumentCount, jsFunction, info, requiredArgumentCount, maxArgumentCount, pos;
      argumentCount = $arguments.length;
      jsFunction = $function["call" + "$" + argumentCount];
      if (jsFunction == null) {
        jsFunction = J.getInterceptor($function)["call*"];
        if (jsFunction == null)
          return H.Primitives_functionNoSuchMethod($function, $arguments, null);
        info = H.ReflectionInfo_ReflectionInfo(jsFunction);
        requiredArgumentCount = info.requiredParameterCount;
        maxArgumentCount = requiredArgumentCount + info.optionalParameterCount;
        if (info.areOptionalParametersNamed || requiredArgumentCount > argumentCount || maxArgumentCount < argumentCount)
          return H.Primitives_functionNoSuchMethod($function, $arguments, null);
        $arguments = P.List_List$from($arguments, true, null);
        for (pos = argumentCount; pos < maxArgumentCount; ++pos)
          C.JSArray_methods.add$1($arguments, init.metadata[info.defaultValue$1(0, pos)]);
      }
      return jsFunction.apply($function, $arguments);
    },
    diagnoseIndexError: function(indexable, index) {
      var $length;
      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 || index >= $length)
        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);
    },
    checkString: function(value) {
      if (typeof value !== "string")
        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);
    }, null, null, 0, 0, null],
    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 (ex instanceof H.ExceptionAndStackTrace)
        return t1.call$1(ex.dartException);
      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 instanceof H.ExceptionAndStackTrace)
        return exception.stackTrace;
      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"));
    }, null, null, 14, 0, null, 79, 78, 49, 40, 36, 56, 71],
    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 = t1 + 1;
        t1 = new Function("a,b,c,d" + t1, "this.$initialize(a,b,c,d" + t1 + ")");
        $constructor = 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 = 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 = 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 = 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 = 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);
    },
    propertyTypeCastError: function(value, property) {
      var t1 = J.getInterceptor$asx(property);
      throw H.wrapException(H.CastErrorImplementation$(H.Primitives_objectTypeName(value), t1.substring$2(property, 3, t1.get$length(property))));
    },
    interceptedTypeCast: function(value, property) {
      var t1;
      if (value != null)
        t1 = (typeof value === "object" || typeof value === "function") && J.getInterceptor(value)[property];
      else
        t1 = true;
      if (t1)
        return value;
      H.propertyTypeCastError(value, property);
    },
    throwCyclicInit: function(staticName) {
      throw H.wrapException(new P.CyclicInitializationError(staticName));
    },
    buildFunctionType: function(returnType, parameterTypes, optionalParameterTypes) {
      return new H.RuntimeFunctionType(returnType, parameterTypes, optionalParameterTypes, null);
    },
    buildInterfaceType: function(rti, typeArguments) {
      var jsConstructorName = rti.builtin$cls;
      if (typeArguments == null || typeArguments.length === 0)
        return new H.RuntimeTypePlain(jsConstructorName);
      return new H.RuntimeTypeGeneric(jsConstructorName, typeArguments, null);
    },
    getDynamicRuntimeType: function() {
      return C.C_DynamicRuntimeType;
    },
    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) {
      if (rti == null)
        return "dynamic";
      else if (typeof rti === "object" && rti !== null && rti.constructor === Array)
        return rti[0].builtin$cls + H.joinArguments(rti, 1, onTypeVariable);
      else if (typeof rti == "function")
        return rti.builtin$cls;
      else if (typeof rti === "number" && Math.floor(rti) === rti)
        if (onTypeVariable == null)
          return C.JSInt_methods.toString$0(rti);
        else
          return onTypeVariable.call$1(rti);
      else
        return;
    },
    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.S(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" + H.S(typeOfTString)];
      } else
        substitution = null;
      if (!t1 && substitution == null || !t2)
        return true;
      t1 = t1 ? s.slice(1) : null;
      t2 = t2 ? t.slice(1) : null;
      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 ? "<Unknown>" : 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_4IJ();
      hooks = H.applyHooksTransformer(C.JS_CONST_EKH, H.applyHooksTransformer(C.JS_CONST_EyN, H.applyHooksTransformer(C.JS_CONST_AgZ, H.applyHooksTransformer(C.JS_CONST_AgZ, H.applyHooksTransformer(C.JS_CONST_c0o, H.applyHooksTransformer(C.JS_CONST_LlX, H.applyHooksTransformer(C.JS_CONST_nuk(C.JS_CONST_TSE), 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;
    },
    stringContainsUnchecked: function(receiver, other, startIndex) {
      return receiver.indexOf(other, startIndex) >= 0;
    },
    stringReplaceAllUnchecked: function(receiver, pattern, replacement) {
      var $length, t1, i, nativeRegexp;
      H.checkString(replacement);
      if (typeof pattern === "string")
        if (pattern === "")
          if (receiver === "")
            return replacement;
          else {
            $length = receiver.length;
            t1 = H.S(replacement);
            for (i = 0; i < $length; ++i)
              t1 = t1 + receiver[i] + H.S(replacement);
            return t1.charCodeAt(0) == 0 ? t1 : t1;
          }
        else
          return receiver.replace(new RegExp(pattern.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&"), 'g'), replacement.replace(/\$/g, "$$$$"));
      else if (pattern instanceof H.JSSyntaxRegExp) {
        nativeRegexp = pattern.get$_nativeGlobalVersion();
        nativeRegexp.lastIndex = 0;
        return receiver.replace(nativeRegexp, replacement.replace(/\$/g, "$$$$"));
      } else {
        if (pattern == null)
          H.throwExpression(H.argumentErrorValue(pattern));
        throw H.wrapException("String.replaceAll(Pattern) UNIMPLEMENTED");
      }
    },
    _stringIdentity: [function(string) {
      return string;
    }, "call$1", "_js_helper___stringIdentity$closure", 2, 0, 14],
    stringReplaceAllFuncUnchecked: function(receiver, pattern, onMatch, onNonMatch) {
      var t1, startIndex, t2, match, t3, t4;
      onNonMatch = H._js_helper___stringIdentity$closure();
      t1 = J.getInterceptor(pattern);
      if (!t1.$isPattern)
        throw H.wrapException(P.ArgumentError$value(pattern, "pattern", "is not a Pattern"));
      for (t1 = t1.allMatches$1(pattern, receiver), t1 = new H._AllMatchesIterator(t1._re, t1._string, t1._start, null), startIndex = 0, t2 = ""; t1.moveNext$0();) {
        match = t1.__js_helper$_current;
        t3 = match._match;
        t4 = t3.index;
        t2 = t2 + H.S(onNonMatch.call$1(C.JSString_methods.substring$2(receiver, startIndex, t4))) + H.S(onMatch.call$1(match));
        startIndex = t4 + t3[0].length;
      }
      t1 = t2 + H.S(onNonMatch.call$1(C.JSString_methods.substring$1(receiver, startIndex)));
      return t1.charCodeAt(0) == 0 ? t1 : t1;
    },
    stringReplaceFirstUnchecked: function(receiver, pattern, replacement, startIndex) {
      var index = receiver.indexOf(pattern, startIndex);
      if (index < 0)
        return receiver;
      return H.stringReplaceRangeUnchecked(receiver, index, index + pattern.length, replacement);
    },
    stringReplaceRangeUnchecked: function(receiver, start, end, replacement) {
      var prefix, suffix;
      prefix = receiver.substring(0, start);
      suffix = receiver.substring(end);
      return prefix + replacement + suffix;
    },
    ConstantMapView: {
      "^": "UnmodifiableMapView;_collection$_map,$ti",
      $asUnmodifiableMapView: Isolate.functionThatReturnsNull,
      $asMap: Isolate.functionThatReturnsNull,
      $isMap: 1
    },
    ConstantMap: {
      "^": "Object;",
      get$isEmpty: function(_) {
        return this.get$length(this) === 0;
      },
      toString$0: function(_) {
        return P.Maps_mapToString(this);
      },
      $indexSet: function(_, key, val) {
        return H.ConstantMap__throwUnmodifiable();
      },
      $isMap: 1
    },
    ConstantStringMap: {
      "^": "ConstantMap;__js_helper$_length,__js_helper$_jsObject,_keys,$ti",
      get$length: function(_) {
        return this.__js_helper$_length;
      },
      containsKey$1: function(key) {
        if (typeof key !== "string")
          return false;
        if ("__proto__" === key)
          return false;
        return this.__js_helper$_jsObject.hasOwnProperty(key);
      },
      $index: function(_, key) {
        if (!this.containsKey$1(key))
          return;
        return this._fetch$1(key);
      },
      _fetch$1: function(key) {
        return this.__js_helper$_jsObject[key];
      },
      forEach$1: function(_, f) {
        var keys, t1, i, key;
        keys = this._keys;
        for (t1 = keys.length, i = 0; i < t1; ++i) {
          key = keys[i];
          f.call$2(key, this._fetch$1(key));
        }
      },
      get$keys: function() {
        return new H._ConstantMapKeyIterable(this, [H.getTypeArgumentByIndex(this, 0)]);
      }
    },
    _ConstantMapKeyIterable: {
      "^": "Iterable;_map,$ti",
      get$iterator: function(_) {
        var t1 = this._map._keys;
        return new J.ArrayIterator(t1, t1.length, 0, null);
      },
      get$length: function(_) {
        return this._map._keys.length;
      }
    },
    GeneralConstantMap: {
      "^": "ConstantMap;_jsData,$ti",
      _getMap$0: function() {
        var backingMap = this.$map;
        if (backingMap == null) {
          backingMap = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, this.$ti);
          H.fillLiteralMap(this._jsData, backingMap);
          this.$map = backingMap;
        }
        return backingMap;
      },
      $index: function(_, key) {
        return this._getMap$0().$index(0, key);
      },
      forEach$1: function(_, f) {
        this._getMap$0().forEach$1(0, f);
      },
      get$keys: function() {
        return this._getMap$0().get$keys();
      },
      get$length: function(_) {
        var t1 = this._getMap$0();
        return t1.get$length(t1);
      }
    },
    JSInvocationMirror: {
      "^": "Object;__js_helper$_memberName,_internalName,_kind,_arguments,_namedArgumentNames,_namedIndices",
      get$memberName: function() {
        return this.__js_helper$_memberName;
      },
      get$positionalArguments: function() {
        var t1, argumentCount, list, index;
        if (this._kind === 1)
          return C.List_empty;
        t1 = this._arguments;
        argumentCount = t1.length - this._namedArgumentNames.length;
        if (argumentCount === 0)
          return C.List_empty;
        list = [];
        for (index = 0; index < argumentCount; ++index)
          list.push(t1[index]);
        list.fixed$length = Array;
        list.immutable$list = Array;
        return list;
      },
      get$namedArguments: function() {
        var t1, namedArgumentCount, t2, namedArgumentsStartIndex, t3, map, i;
        if (this._kind !== 0)
          return C.Map_empty;
        t1 = this._namedArgumentNames;
        namedArgumentCount = t1.length;
        t2 = this._arguments;
        namedArgumentsStartIndex = t2.length - namedArgumentCount;
        if (namedArgumentCount === 0)
          return C.Map_empty;
        t3 = P.Symbol0;
        map = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t3, null]);
        for (i = 0; i < namedArgumentCount; ++i)
          map.$indexSet(0, new H.Symbol(t1[i]), t2[namedArgumentsStartIndex + i]);
        return new H.ConstantMapView(map, [t3, null]);
      }
    },
    ReflectionInfo: {
      "^": "Object;jsFunction,data>,isAccessor,requiredParameterCount,optionalParameterCount,areOptionalParametersNamed,functionType,cachedSortedIndices",
      defaultValue$1: function(_, parameter) {
        var t1 = this.requiredParameterCount;
        if (parameter < t1)
          return;
        return this.data[3 + parameter - t1];
      },
      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);
        }
      }
    },
    Primitives_initTicker_closure: {
      "^": "Closure:1;performance",
      call$0: function() {
        return C.JSNumber_methods.floor$0(1000 * this.performance.now());
      }
    },
    Primitives_functionNoSuchMethod_closure: {
      "^": "Closure:27;_box_0,$arguments,namedArgumentList",
      call$2: function($name, argument) {
        var t1 = this._box_0;
        t1.names = t1.names + "$" + H.S($name);
        this.namedArgumentList.push($name);
        this.$arguments.push(argument);
        ++t1.argumentCount;
      }
    },
    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: '" + H.S(t1) + "' (" + H.S(this._message) + ")";
        return "NoSuchMethodError: method not found: '" + H.S(t1) + "' on '" + H.S(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;
      }
    },
    ExceptionAndStackTrace: {
      "^": "Object;dartException,stackTrace"
    },
    unwrapException_saveStackTrace: {
      "^": "Closure:0;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:1;closure",
      call$0: function() {
        return this.closure.call$0();
      }
    },
    invokeClosure_closure0: {
      "^": "Closure:1;closure,arg1",
      call$0: function() {
        return this.closure.call$1(this.arg1);
      }
    },
    invokeClosure_closure1: {
      "^": "Closure:1;closure,arg1,arg2",
      call$0: function() {
        return this.closure.call$2(this.arg1, this.arg2);
      }
    },
    invokeClosure_closure2: {
      "^": "Closure:1;closure,arg1,arg2,arg3",
      call$0: function() {
        return this.closure.call$3(this.arg1, this.arg2, this.arg3);
      }
    },
    invokeClosure_closure3: {
      "^": "Closure:1;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) + "'";
      },
      get$$call: function() {
        return this;
      },
      $isFunction: 1,
      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);
        return (receiverHashCode ^ H.Primitives_objectHashCode(this._target)) >>> 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;
          }
        }
      }
    },
    CastErrorImplementation: {
      "^": "Error;message",
      toString$0: function(_) {
        return this.message;
      },
      static: {
        CastErrorImplementation$: function(actualType, expectedType) {
          return new H.CastErrorImplementation("CastError: Casting value of type " + H.S(actualType) + " to incompatible type " + H.S(expectedType));
        }
      }
    },
    RuntimeError: {
      "^": "Error;message",
      toString$0: function(_) {
        return "RuntimeError: " + H.S(this.message);
      }
    },
    RuntimeType: {
      "^": "Object;"
    },
    RuntimeFunctionType: {
      "^": "RuntimeType;returnType,parameterTypes,optionalParameterTypes,namedParameters",
      _isTest$1: function(expression) {
        var functionTypeObject = this._extractFunctionTypeObjectFrom$1(expression);
        return functionTypeObject == null ? false : H.isFunctionSubtype(functionTypeObject, this.toRti$0());
      },
      _extractFunctionTypeObjectFrom$1: function(o) {
        var interceptor = J.getInterceptor(o);
        return "$signature" in interceptor ? interceptor.$signature() : null;
      },
      toRti$0: function() {
        var result, t1, t2, namedRti, keys, i, $name;
        result = {func: "dynafunc"};
        t1 = this.returnType;
        t2 = J.getInterceptor(t1);
        if (!!t2.$isVoidRuntimeType)
          result.v = true;
        else if (!t2.$isDynamicRuntimeType)
          result.ret = t1.toRti$0();
        t1 = this.parameterTypes;
        if (t1 != null && t1.length !== 0)
          result.args = H.RuntimeFunctionType_listToRti(t1);
        t1 = this.optionalParameterTypes;
        if (t1 != null && t1.length !== 0)
          result.opt = H.RuntimeFunctionType_listToRti(t1);
        t1 = this.namedParameters;
        if (t1 != null) {
          namedRti = Object.create(null);
          keys = H.extractKeys(t1);
          for (t2 = keys.length, i = 0; i < t2; ++i) {
            $name = keys[i];
            namedRti[$name] = t1[$name].toRti$0();
          }
          result.named = namedRti;
        }
        return result;
      },
      toString$0: function(_) {
        var t1, t2, result, needsComma, i, type, keys, $name;
        t1 = this.parameterTypes;
        if (t1 != null)
          for (t2 = t1.length, result = "(", needsComma = false, i = 0; i < t2; ++i, needsComma = true) {
            type = t1[i];
            if (needsComma)
              result += ", ";
            result += J.toString$0$(type);
          }
        else {
          result = "(";
          needsComma = false;
        }
        t1 = this.optionalParameterTypes;
        if (t1 != null && t1.length !== 0) {
          result = (needsComma ? result + ", " : result) + "[";
          for (t2 = t1.length, needsComma = false, i = 0; i < t2; ++i, needsComma = true) {
            type = t1[i];
            if (needsComma)
              result += ", ";
            result += J.toString$0$(type);
          }
          result += "]";
        } else {
          t1 = this.namedParameters;
          if (t1 != null) {
            result = (needsComma ? result + ", " : result) + "{";
            keys = H.extractKeys(t1);
            for (t2 = keys.length, needsComma = false, i = 0; i < t2; ++i, needsComma = true) {
              $name = keys[i];
              if (needsComma)
                result += ", ";
              result += H.S(t1[$name].toRti$0()) + " " + $name;
            }
            result += "}";
          }
        }
        return result + (") -> " + J.toString$0$(this.returnType));
      },
      static: {
        RuntimeFunctionType_listToRti: function(list) {
          var result, t1, i;
          list = list;
          result = [];
          for (t1 = list.length, i = 0; i < t1; ++i)
            result.push(list[i].toRti$0());
          return result;
        }
      }
    },
    DynamicRuntimeType: {
      "^": "RuntimeType;",
      toString$0: function(_) {
        return "dynamic";
      },
      toRti$0: function() {
        return;
      }
    },
    RuntimeTypePlain: {
      "^": "RuntimeType;_jsConstructorName",
      toRti$0: function() {
        var t1, rti;
        t1 = this._jsConstructorName;
        rti = H.jsConstructorNameToRti(t1);
        if (rti == null)
          throw H.wrapException("no type for '" + t1 + "'");
        return rti;
      },
      toString$0: function(_) {
        return this._jsConstructorName;
      }
    },
    RuntimeTypeGeneric: {
      "^": "RuntimeType;_jsConstructorName,$arguments,rti",
      toRti$0: function() {
        var t1, result, t2, _i;
        t1 = this.rti;
        if (t1 != null)
          return t1;
        t1 = this._jsConstructorName;
        result = [H.jsConstructorNameToRti(t1)];
        if (result[0] == null)
          throw H.wrapException("no type for '" + t1 + "<...>'");
        for (t1 = this.$arguments, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
          result.push(t1[_i].toRti$0());
        this.rti = result;
        return result;
      },
      toString$0: function(_) {
        var t1 = this.$arguments;
        return this._jsConstructorName + "<" + (t1 && C.JSArray_methods).join$1(t1, ", ") + ">";
      }
    },
    TypeImpl: {
      "^": "Object;_typeName,_unmangledName",
      toString$0: function(_) {
        var t1, unmangledName;
        t1 = this._unmangledName;
        if (t1 != null)
          return t1;
        unmangledName = function(str, names) {
          return str.replace(/[^<,> ]+/g, function(m) {
            return names[m] || m;
          });
        }(this._typeName, init.mangledGlobalNames);
        this._unmangledName = unmangledName;
        return unmangledName;
      },
      get$hashCode: function(_) {
        return J.get$hashCode$(this._typeName);
      },
      $eq: function(_, other) {
        var t1, t2;
        if (other == null)
          return false;
        if (other instanceof H.TypeImpl) {
          t1 = this._typeName;
          t2 = other._typeName;
          t2 = t1 == null ? t2 == null : t1 === t2;
          t1 = t2;
        } else
          t1 = false;
        return t1;
      }
    },
    JsLinkedHashMap: {
      "^": "Object;__js_helper$_length,_strings,_nums,_rest,_first,_last,_modifications,$ti",
      get$length: function(_) {
        return this.__js_helper$_length;
      },
      get$isEmpty: function(_) {
        return this.__js_helper$_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.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.hashMapCellValue;
        } else
          return this.internalGet$1(key);
      },
      internalGet$1: function(key) {
        var rest, t1, index;
        rest = this._rest;
        if (rest == null)
          return;
        t1 = this._getTableBucket$2(rest, this.internalComputeHashCode$1(key));
        index = this.internalFindBucketIndex$2(t1, key);
        if (index < 0)
          return;
        return t1[index].hashMapCellValue;
      },
      $indexSet: function(_, key, value) {
        var strings, nums;
        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
          this.internalSet$2(key, value);
      },
      internalSet$2: function(key, value) {
        var rest, hash, bucket, index;
        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].hashMapCellValue = value;
          else
            bucket.push(this._newLinkedCell$2(key, value));
        }
      },
      putIfAbsent$2: function(key, ifAbsent) {
        var value;
        if (this.containsKey$1(key))
          return this.$index(0, key);
        value = ifAbsent.call$0();
        this.$indexSet(0, key, value);
        return 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, t1, index, cell;
        rest = this._rest;
        if (rest == null)
          return;
        t1 = this._getTableBucket$2(rest, this.internalComputeHashCode$1(key));
        index = this.internalFindBucketIndex$2(t1, key);
        if (index < 0)
          return;
        cell = t1.splice(index, 1)[0];
        this._unlinkCell$1(cell);
        return cell.hashMapCellValue;
      },
      clear$0: function(_) {
        if (this.__js_helper$_length > 0) {
          this._last = null;
          this._first = null;
          this._rest = null;
          this._nums = null;
          this._strings = null;
          this.__js_helper$_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.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.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.__js_helper$_length;
        this._modifications = this._modifications + 1 & 67108863;
        return cell;
      },
      _unlinkCell$1: function(cell) {
        var previous, next;
        previous = cell._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.__js_helper$_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].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, "<non-identifier-key>", table);
        this._deleteTableEntry$2(table, "<non-identifier-key>");
        return table;
      },
      $isInternalMap: 1,
      $isMap: 1,
      static: {
        JsLinkedHashMap_JsLinkedHashMap$es6: function($K, $V) {
          return new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [$K, $V]);
        }
      }
    },
    JsLinkedHashMap_values_closure: {
      "^": "Closure:0;$this",
      call$1: [function(each) {
        return this.$this.$index(0, each);
      }, null, null, 2, 0, null, 22, "call"]
    },
    LinkedHashMapCell: {
      "^": "Object;hashMapCellKey,hashMapCellValue,_next,_previous"
    },
    LinkedHashMapKeyIterable: {
      "^": "EfficientLengthIterable;_map,$ti",
      get$length: function(_) {
        return this._map.__js_helper$_length;
      },
      get$isEmpty: function(_) {
        return this._map.__js_helper$_length === 0;
      },
      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,__js_helper$_current",
      get$current: function() {
        return this.__js_helper$_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.__js_helper$_current = null;
            return false;
          } else {
            this.__js_helper$_current = t1.hashMapCellKey;
            this._cell = t1._next;
            return true;
          }
        }
      }
    },
    initHooks_closure: {
      "^": "Closure:0;getTag",
      call$1: function(o) {
        return this.getTag(o);
      }
    },
    initHooks_closure0: {
      "^": "Closure:64;getUnknownTag",
      call$2: function(o, tag) {
        return this.getUnknownTag(o, tag);
      }
    },
    initHooks_closure1: {
      "^": "Closure:4;prototypeForTag",
      call$1: function(tag) {
        return this.prototypeForTag(tag);
      }
    },
    JSSyntaxRegExp: {
      "^": "Object;pattern,_nativeRegExp,_nativeGlobalRegExp,_nativeAnchoredRegExp",
      toString$0: function(_) {
        return "RegExp/" + this.pattern + "/";
      },
      get$_nativeGlobalVersion: function() {
        var t1 = this._nativeGlobalRegExp;
        if (t1 != null)
          return t1;
        t1 = this._nativeRegExp;
        t1 = H.JSSyntaxRegExp_makeNative(this.pattern, t1.multiline, !t1.ignoreCase, true);
        this._nativeGlobalRegExp = t1;
        return t1;
      },
      get$_nativeAnchoredVersion: function() {
        var t1 = this._nativeAnchoredRegExp;
        if (t1 != null)
          return t1;
        t1 = this._nativeRegExp;
        t1 = H.JSSyntaxRegExp_makeNative(this.pattern + "|()", t1.multiline, !t1.ignoreCase, true);
        this._nativeAnchoredRegExp = t1;
        return t1;
      },
      firstMatch$1: function(string) {
        var m = this._nativeRegExp.exec(H.checkString(string));
        if (m == null)
          return;
        return new H._MatchImplementation(this, m);
      },
      stringMatch$1: function(string) {
        var match = this.firstMatch$1(string);
        if (match != null)
          return match._match[0];
        return;
      },
      allMatches$2: function(_, string, start) {
        if (start > string.length)
          throw H.wrapException(P.RangeError$range(start, 0, string.length, null, null));
        return new H._AllMatchesIterable(this, string, start);
      },
      allMatches$1: function($receiver, string) {
        return this.allMatches$2($receiver, string, 0);
      },
      _execGlobal$2: function(string, start) {
        var regexp, match;
        regexp = this.get$_nativeGlobalVersion();
        regexp.lastIndex = start;
        match = regexp.exec(string);
        if (match == null)
          return;
        return new H._MatchImplementation(this, match);
      },
      _execAnchored$2: function(string, start) {
        var regexp, match;
        regexp = this.get$_nativeAnchoredVersion();
        regexp.lastIndex = start;
        match = regexp.exec(string);
        if (match == null)
          return;
        if (match.pop() != null)
          return;
        return new H._MatchImplementation(this, match);
      },
      matchAsPrefix$2: function(_, string, start) {
        if (start < 0 || start > string.length)
          throw H.wrapException(P.RangeError$range(start, 0, string.length, null, null));
        return this._execAnchored$2(string, start);
      },
      matchAsPrefix$1: function($receiver, string) {
        return this.matchAsPrefix$2($receiver, string, 0);
      },
      $isRegExp: 1,
      $isPattern: 1,
      static: {
        JSSyntaxRegExp_makeNative: function(source, multiLine, caseSensitive, global) {
          var m, i, g, regexp;
          m = multiLine ? "m" : "";
          i = caseSensitive ? "" : "i";
          g = global ? "g" : "";
          regexp = function(source, modifiers) {
            try {
              return new RegExp(source, modifiers);
            } catch (e) {
              return e;
            }
          }(source, m + i + g);
          if (regexp instanceof RegExp)
            return regexp;
          throw H.wrapException(new P.FormatException("Illegal RegExp pattern (" + String(regexp) + ")", source, null));
        }
      }
    },
    _MatchImplementation: {
      "^": "Object;pattern,_match<",
      get$start: function(_) {
        return this._match.index;
      },
      get$end: function() {
        var t1 = this._match;
        return t1.index + t1[0].length;
      },
      group$1: [function(index) {
        return this._match[index];
      }, null, "get$group", 2, 0, null, 82],
      $index: function(_, index) {
        return this._match[index];
      }
    },
    _AllMatchesIterable: {
      "^": "IterableBase;_re,_string,_start",
      get$iterator: function(_) {
        return new H._AllMatchesIterator(this._re, this._string, this._start, null);
      },
      $asIterableBase: function() {
        return [P.Match];
      },
      $asIterable: function() {
        return [P.Match];
      }
    },
    _AllMatchesIterator: {
      "^": "Object;_regExp,_string,_nextIndex,__js_helper$_current",
      get$current: function() {
        return this.__js_helper$_current;
      },
      moveNext$0: function() {
        var t1, t2, match, nextIndex;
        t1 = this._string;
        if (t1 == null)
          return false;
        t2 = this._nextIndex;
        if (t2 <= t1.length) {
          match = this._regExp._execGlobal$2(t1, t2);
          if (match != null) {
            this.__js_helper$_current = match;
            t1 = match._match;
            t2 = t1.index;
            nextIndex = t2 + t1[0].length;
            this._nextIndex = t2 === nextIndex ? nextIndex + 1 : nextIndex;
            return true;
          }
        }
        this.__js_helper$_current = null;
        this._string = null;
        return false;
      }
    },
    StringMatch: {
      "^": "Object;start>,input,pattern",
      get$end: function() {
        return this.start + this.pattern.length;
      },
      $index: function(_, g) {
        return this.group$1(g);
      },
      group$1: [function(group_) {
        if (group_ !== 0)
          throw H.wrapException(P.RangeError$value(group_, null, null));
        return this.pattern;
      }, null, "get$group", 2, 0, null, 43]
    },
    _StringAllMatchesIterable: {
      "^": "Iterable;_input,_pattern,__js_helper$_index",
      get$iterator: function(_) {
        return new H._StringAllMatchesIterator(this._input, this._pattern, this.__js_helper$_index, null);
      },
      $asIterable: function() {
        return [P.Match];
      }
    },
    _StringAllMatchesIterator: {
      "^": "Object;_input,_pattern,__js_helper$_index,__js_helper$_current",
      moveNext$0: function() {
        var t1, t2, t3, t4, t5, index, end;
        t1 = this.__js_helper$_index;
        t2 = this._pattern;
        t3 = t2.length;
        t4 = this._input;
        t5 = t4.length;
        if (t1 + t3 > t5) {
          this.__js_helper$_current = null;
          return false;
        }
        index = t4.indexOf(t2, t1);
        if (index < 0) {
          this.__js_helper$_index = t5 + 1;
          this.__js_helper$_current = null;
          return false;
        }
        end = index + t3;
        this.__js_helper$_current = new H.StringMatch(index, t4, t2);
        this.__js_helper$_index = end === this.__js_helper$_index ? end + 1 : end;
        return true;
      },
      get$current: function() {
        return this.__js_helper$_current;
      }
    }
  }], ["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, {
    "^": "",
    _checkLength: function($length) {
      return $length;
    },
    _checkViewArguments: function(buffer, offsetInBytes, $length) {
      if (typeof offsetInBytes !== "number" || Math.floor(offsetInBytes) !== offsetInBytes)
        throw H.wrapException(P.ArgumentError$("Invalid view offsetInBytes " + H.S(offsetInBytes)));
      $length != null;
    },
    _ensureNativeList: function(list) {
      var t1, result, i;
      if (!!J.getInterceptor(list).$isJSIndexable)
        return list;
      t1 = list.length;
      result = new Array(t1);
      result.fixed$length = Array;
      for (i = 0; i < t1; ++i)
        result[i] = list[i];
      return result;
    },
    NativeByteData_NativeByteData$view: function(buffer, offsetInBytes, $length) {
      H._checkViewArguments(buffer, offsetInBytes, $length);
      return $length == null ? new DataView(buffer, offsetInBytes) : new DataView(buffer, offsetInBytes, $length);
    },
    NativeFloat32List_NativeFloat32List$view: function(buffer, offsetInBytes, $length) {
      H._checkViewArguments(buffer, offsetInBytes, $length);
      return new Float32Array(buffer, offsetInBytes, $length);
    },
    NativeInt16List_NativeInt16List$view: function(buffer, offsetInBytes, $length) {
      H._checkViewArguments(buffer, offsetInBytes, $length);
      return new Int16Array(buffer, offsetInBytes, $length);
    },
    NativeInt32List_NativeInt32List: function($length) {
      return new Int32Array(H._checkLength($length));
    },
    NativeByteBuffer: {
      "^": "Interceptor;",
      asUint8List$2: function(receiver, offsetInBytes, $length) {
        H._checkViewArguments(receiver, offsetInBytes, $length);
        return $length == null ? new Uint8Array(receiver, offsetInBytes) : new Uint8Array(receiver, offsetInBytes, $length);
      },
      asUint8List$0: function($receiver) {
        return this.asUint8List$2($receiver, 0, null);
      },
      $isNativeByteBuffer: 1,
      "%": "ArrayBuffer"
    },
    NativeTypedData: {
      "^": "Interceptor;",
      _invalidPosition$3: function(receiver, position, $length, $name) {
        throw H.wrapException(P.RangeError$range(position, 0, $length, $name, null));
      },
      _checkPosition$3: function(receiver, position, $length, $name) {
        if (position >>> 0 !== position || position > $length)
          this._invalidPosition$3(receiver, position, $length, $name);
      },
      $isNativeTypedData: 1,
      $isTypedData: 1,
      "%": ";ArrayBufferView;NativeTypedArray|NativeTypedArray_ListMixin|NativeTypedArray_ListMixin_FixedLengthListMixin|NativeTypedArrayOfDouble|NativeTypedArray_ListMixin0|NativeTypedArray_ListMixin_FixedLengthListMixin0|NativeTypedArrayOfInt"
    },
    NativeByteData: {
      "^": "NativeTypedData;",
      $isTypedData: 1,
      "%": "DataView"
    },
    NativeTypedArray: {
      "^": "NativeTypedData;",
      get$length: function(receiver) {
        return receiver.length;
      },
      _setRangeFast$4: function(receiver, start, end, source, skipCount) {
        var targetLength, count, sourceLength;
        targetLength = receiver.length;
        this._checkPosition$3(receiver, start, targetLength, "start");
        this._checkPosition$3(receiver, end, targetLength, "end");
        if (start > end)
          throw H.wrapException(P.RangeError$range(start, 0, end, null, null));
        count = end - start;
        sourceLength = source.length;
        if (sourceLength - skipCount < count)
          throw H.wrapException(new P.StateError("Not enough elements"));
        if (skipCount !== 0 || sourceLength !== count)
          source = source.subarray(skipCount, skipCount + count);
        receiver.set(source, start);
      },
      $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;
      },
      setRange$4: function(receiver, start, end, iterable, skipCount) {
        if (!!J.getInterceptor(iterable).$isNativeTypedArrayOfDouble) {
          this._setRangeFast$4(receiver, start, end, iterable, skipCount);
          return;
        }
        this.super$ListMixin$setRange(receiver, start, end, iterable, skipCount);
      },
      setRange$3: function($receiver, start, end, iterable) {
        return this.setRange$4($receiver, start, end, iterable, 0);
      }
    },
    NativeTypedArray_ListMixin: {
      "^": "NativeTypedArray+ListMixin;",
      $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull,
      $asJSIndexable: Isolate.functionThatReturnsNull,
      $asList: function() {
        return [P.$double];
      },
      $asEfficientLengthIterable: function() {
        return [P.$double];
      },
      $asIterable: function() {
        return [P.$double];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    NativeTypedArray_ListMixin_FixedLengthListMixin: {
      "^": "NativeTypedArray_ListMixin+FixedLengthListMixin;",
      $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull,
      $asJSIndexable: Isolate.functionThatReturnsNull,
      $asList: function() {
        return [P.$double];
      },
      $asEfficientLengthIterable: function() {
        return [P.$double];
      },
      $asIterable: 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;
      },
      setRange$4: function(receiver, start, end, iterable, skipCount) {
        if (!!J.getInterceptor(iterable).$isNativeTypedArrayOfInt) {
          this._setRangeFast$4(receiver, start, end, iterable, skipCount);
          return;
        }
        this.super$ListMixin$setRange(receiver, start, end, iterable, skipCount);
      },
      setRange$3: function($receiver, start, end, iterable) {
        return this.setRange$4($receiver, start, end, iterable, 0);
      },
      $isList: 1,
      $asList: function() {
        return [P.$int];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.$int];
      },
      $isIterable: 1,
      $asIterable: function() {
        return [P.$int];
      }
    },
    NativeTypedArray_ListMixin0: {
      "^": "NativeTypedArray+ListMixin;",
      $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull,
      $asJSIndexable: Isolate.functionThatReturnsNull,
      $asList: function() {
        return [P.$int];
      },
      $asEfficientLengthIterable: function() {
        return [P.$int];
      },
      $asIterable: function() {
        return [P.$int];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    NativeTypedArray_ListMixin_FixedLengthListMixin0: {
      "^": "NativeTypedArray_ListMixin0+FixedLengthListMixin;",
      $asJavaScriptIndexingBehavior: Isolate.functionThatReturnsNull,
      $asJSIndexable: Isolate.functionThatReturnsNull,
      $asList: function() {
        return [P.$int];
      },
      $asEfficientLengthIterable: function() {
        return [P.$int];
      },
      $asIterable: function() {
        return [P.$int];
      }
    },
    NativeFloat32List: {
      "^": "NativeTypedArrayOfDouble;",
      $isTypedData: 1,
      $isList: 1,
      $asList: function() {
        return [P.$double];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.$double];
      },
      $isIterable: 1,
      $asIterable: function() {
        return [P.$double];
      },
      "%": "Float32Array"
    },
    NativeFloat64List: {
      "^": "NativeTypedArrayOfDouble;",
      $isTypedData: 1,
      $isList: 1,
      $asList: function() {
        return [P.$double];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.$double];
      },
      $isIterable: 1,
      $asIterable: 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];
      },
      $isTypedData: 1,
      $isList: 1,
      $asList: function() {
        return [P.$int];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.$int];
      },
      $isIterable: 1,
      $asIterable: 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];
      },
      $isTypedData: 1,
      $isList: 1,
      $asList: function() {
        return [P.$int];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.$int];
      },
      $isIterable: 1,
      $asIterable: 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];
      },
      $isTypedData: 1,
      $isList: 1,
      $asList: function() {
        return [P.$int];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.$int];
      },
      $isIterable: 1,
      $asIterable: 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];
      },
      $isTypedData: 1,
      $isList: 1,
      $asList: function() {
        return [P.$int];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.$int];
      },
      $isIterable: 1,
      $asIterable: 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];
      },
      $isTypedData: 1,
      $isList: 1,
      $asList: function() {
        return [P.$int];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.$int];
      },
      $isIterable: 1,
      $asIterable: 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];
      },
      $isTypedData: 1,
      $isList: 1,
      $asList: function() {
        return [P.$int];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.$int];
      },
      $isIterable: 1,
      $asIterable: 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];
      },
      $isNativeUint8List: 1,
      $isTypedData: 1,
      $isList: 1,
      $asList: function() {
        return [P.$int];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.$int];
      },
      $isIterable: 1,
      $asIterable: 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, 18],
    _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, 18],
    _AsyncRun__scheduleImmediateWithTimer: [function(callback) {
      P.Timer__createTimer(C.Duration_0, callback);
    }, "call$1", "async__AsyncRun__scheduleImmediateWithTimer$closure", 2, 0, 18],
    _asyncHelper: function(object, bodyFunctionOrErrorCode, completer) {
      if (bodyFunctionOrErrorCode === 0) {
        completer.complete$1(0, object);
        return;
      } else if (bodyFunctionOrErrorCode === 1) {
        completer.completeError$2(H.unwrapException(object), H.getTraceFromException(object));
        return;
      }
      P._awaitOnObject(object, bodyFunctionOrErrorCode);
      return completer.future;
    },
    _awaitOnObject: function(object, bodyFunction) {
      var thenCallback, errorCallback, t1, future;
      thenCallback = new P._awaitOnObject_closure(bodyFunction);
      errorCallback = new P._awaitOnObject_closure0(bodyFunction);
      t1 = J.getInterceptor(object);
      if (!!t1.$is_Future)
        object._thenNoZoneRegistration$2(thenCallback, errorCallback);
      else if (!!t1.$isFuture)
        object.then$2$onError(thenCallback, errorCallback);
      else {
        future = new P._Future(0, $.Zone__current, null, [null]);
        future._state = 4;
        future._resultOrListeners = object;
        future._thenNoZoneRegistration$2(thenCallback, null);
      }
    },
    _wrapJsFunctionForAsync: function($function) {
      var $protected = function(fn, ERROR) {
        return function(errorCode, result) {
          while (true)
            try {
              fn(errorCode, result);
              break;
            } catch (error) {
              result = error;
              errorCode = ERROR;
            }
        };
      }($function, 1);
      return $.Zone__current.registerBinaryCallback$1(new P._wrapJsFunctionForAsync_closure($protected));
    },
    _registerErrorHandler: function(errorHandler, zone) {
      var t1 = H.getDynamicRuntimeType();
      if (H.buildFunctionType(t1, [t1, t1])._isTest$1(errorHandler))
        return zone.registerBinaryCallback$1(errorHandler);
      else
        return zone.registerUnaryCallback$1(errorHandler);
    },
    Future_Future: function(computation, $T) {
      var result = new P._Future(0, $.Zone__current, null, [$T]);
      P.Timer_Timer(C.Duration_0, new P.closure1(computation, result));
      return result;
    },
    Future_Future$value: function(value, $T) {
      var t1 = new P._Future(0, $.Zone__current, null, [$T]);
      t1._asyncComplete$1(value);
      return t1;
    },
    Future_Future$error: function(error, stackTrace, $T) {
      var t1, replacement;
      error = error != null ? error : new P.NullThrownError();
      t1 = $.Zone__current;
      if (t1 !== C.C__RootZone) {
        replacement = t1.errorCallback$2(error, stackTrace);
        if (replacement != null) {
          error = replacement.error;
          error = error != null ? error : new P.NullThrownError();
          stackTrace = replacement.stackTrace;
        }
      }
      t1 = new P._Future(0, $.Zone__current, null, [$T]);
      t1._asyncCompleteError$2(error, stackTrace);
      return t1;
    },
    Future_Future$delayed: function(duration, computation, $T) {
      var result = new P._Future(0, $.Zone__current, null, [$T]);
      P.Timer_Timer(duration, new P.closure(computation, result));
      return result;
    },
    Future_wait: function(futures, cleanUp, eagerError) {
      var t1, result, handleError, future, pos, e, st, t2, _i, values, exception;
      t1 = {};
      result = new P._Future(0, $.Zone__current, null, [P.List]);
      t1.values = null;
      t1.remaining = 0;
      t1.error = null;
      t1.stackTrace = null;
      handleError = new P.Future_wait_handleError(t1, false, cleanUp, result);
      try {
        for (t2 = futures.length, _i = 0; _i < futures.length; futures.length === t2 || (0, H.throwConcurrentModificationError)(futures), ++_i) {
          future = futures[_i];
          pos = t1.remaining;
          future.then$2$onError(new P.Future_wait_closure(t1, false, cleanUp, result, pos), handleError);
          ++t1.remaining;
        }
        t2 = t1.remaining;
        if (t2 === 0) {
          t2 = new P._Future(0, $.Zone__current, null, [null]);
          t2._asyncComplete$1(C.List_empty);
          return t2;
        }
        values = new Array(t2);
        values.fixed$length = Array;
        t1.values = values;
      } catch (exception) {
        t2 = H.unwrapException(exception);
        e = t2;
        st = H.getTraceFromException(exception);
        if (t1.remaining === 0 || false)
          return P.Future_Future$error(e, st, null);
        else {
          t1.error = e;
          t1.stackTrace = st;
        }
      }
      return result;
    },
    Completer_Completer$sync: function($T) {
      return new P._SyncCompleter(new P._Future(0, $.Zone__current, null, [$T]), [$T]);
    },
    _completeWithErrorCallback: function(result, error, stackTrace) {
      var replacement = $.Zone__current.errorCallback$2(error, stackTrace);
      if (replacement != null) {
        error = replacement.error;
        error = error != null ? error : new P.NullThrownError();
        stackTrace = replacement.stackTrace;
      }
      result._completeError$2(error, stackTrace);
    },
    _microtaskLoop: function() {
      var t1, t2;
      for (; t1 = $._nextCallback, t1 != null;) {
        $._lastPriorityCallback = null;
        t2 = t1.next;
        $._nextCallback = t2;
        if (t2 == null)
          $._lastCallback = null;
        t1.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, 3],
    _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, t1;
      currentZone = $.Zone__current;
      if (C.C__RootZone === currentZone) {
        P._rootScheduleMicrotask(null, null, C.C__RootZone, callback);
        return;
      }
      if (C.C__RootZone === currentZone.get$_scheduleMicrotask().zone)
        t1 = C.C__RootZone.get$errorZone() === currentZone.get$errorZone();
      else
        t1 = false;
      if (t1) {
        P._rootScheduleMicrotask(null, null, currentZone, currentZone.registerCallback$1(callback));
        return;
      }
      t1 = $.Zone__current;
      t1.scheduleMicrotask$1(t1.bindCallback$2$runGuarded(callback, true));
    },
    StreamIterator_StreamIterator: function(stream, $T) {
      return new P._StreamIterator(null, stream, false, [$T]);
    },
    StreamController_StreamController$broadcast: function(onCancel, onListen, sync, $T) {
      return sync ? new P._SyncBroadcastStreamController(onListen, onCancel, 0, null, null, null, null, [$T]) : new P._AsyncBroadcastStreamController(onListen, onCancel, 0, null, null, null, null, [$T]);
    },
    _runGuarded: function(notificationHandler) {
      var result, e, s, exception, t1;
      if (notificationHandler == null)
        return;
      try {
        result = notificationHandler.call$0();
        if (!!J.getInterceptor(result).$isFuture)
          return result;
        return;
      } catch (exception) {
        t1 = H.unwrapException(exception);
        e = t1;
        s = H.getTraceFromException(exception);
        $.Zone__current.handleUncaughtError$2(e, s);
      }
    },
    _nullDataHandler: [function(value) {
    }, "call$1", "async___nullDataHandler$closure", 2, 0, 84, 12],
    _nullErrorHandler: [function(error, stackTrace) {
      $.Zone__current.handleUncaughtError$2(error, stackTrace);
    }, function(error) {
      return P._nullErrorHandler(error, null);
    }, "call$2", "call$1", "async___nullErrorHandler$closure", 2, 2, 29, 2, 13, 15],
    _nullDoneHandler: [function() {
    }, "call$0", "async___nullDoneHandler$closure", 0, 0, 3],
    _cancelAndValue: function(subscription, future, value) {
      var cancelFuture = subscription.cancel$0();
      if (!!J.getInterceptor(cancelFuture).$isFuture && cancelFuture !== $.$get$Future__nullFuture())
        cancelFuture.whenComplete$1(new P._cancelAndValue_closure(future, value));
      else
        future._complete$1(value);
    },
    Timer_Timer: function(duration, callback) {
      var t1 = $.Zone__current;
      if (t1 === C.C__RootZone)
        return t1.createTimer$2(duration, callback);
      return t1.createTimer$2(duration, t1.bindCallback$2$runGuarded(callback, true));
    },
    Timer_Timer$periodic: function(duration, callback) {
      var t1, boundCallback;
      t1 = $.Zone__current;
      if (t1 === C.C__RootZone)
        return t1.createPeriodicTimer$2(duration, callback);
      boundCallback = t1.bindUnaryCallback$2$runGuarded(callback, true);
      return $.Zone__current.createPeriodicTimer$2(duration, boundCallback);
    },
    Timer__createTimer: function(duration, callback) {
      var milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000);
      return H.TimerImpl$(milliseconds < 0 ? 0 : milliseconds, callback);
    },
    Timer__createPeriodicTimer: function(duration, callback) {
      var milliseconds = C.JSInt_methods._tdivFast$1(duration._duration, 1000);
      return H.TimerImpl$periodic(milliseconds < 0 ? 0 : milliseconds, callback);
    },
    _parentDelegate: function(zone) {
      if (zone.get$parent(zone) == null)
        return;
      return zone.get$parent(zone).get$_delegate();
    },
    _rootHandleUncaughtError: [function($self, $parent, zone, error, stackTrace) {
      var t1 = {};
      t1.error = error;
      P._schedulePriorityAsyncCallback(new P._rootHandleUncaughtError_closure(t1, stackTrace));
    }, "call$5", "async___rootHandleUncaughtError$closure", 10, 0, function() {
      return {func: 1, args: [P.Zone, P.ZoneDelegate, P.Zone,, P.StackTrace]};
    }, 6, 7, 8, 13, 15],
    _rootRun: [function($self, $parent, zone, f) {
      var old, t1;
      t1 = $.Zone__current;
      if (t1 == null ? zone == null : t1 === zone)
        return f.call$0();
      $.Zone__current = zone;
      old = t1;
      try {
        t1 = f.call$0();
        return t1;
      } finally {
        $.Zone__current = old;
      }
    }, "call$4", "async___rootRun$closure", 8, 0, function() {
      return {func: 1, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1}]};
    }, 6, 7, 8, 14],
    _rootRunUnary: [function($self, $parent, zone, f, arg) {
      var old, t1;
      t1 = $.Zone__current;
      if (t1 == null ? zone == null : t1 === zone)
        return f.call$1(arg);
      $.Zone__current = zone;
      old = t1;
      try {
        t1 = f.call$1(arg);
        return t1;
      } finally {
        $.Zone__current = old;
      }
    }, "call$5", "async___rootRunUnary$closure", 10, 0, function() {
      return {func: 1, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, args: [,]},,]};
    }, 6, 7, 8, 14, 25],
    _rootRunBinary: [function($self, $parent, zone, f, arg1, arg2) {
      var old, t1;
      t1 = $.Zone__current;
      if (t1 == null ? zone == null : 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;
      }
    }, "call$6", "async___rootRunBinary$closure", 12, 0, function() {
      return {func: 1, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, args: [,,]},,,]};
    }, 6, 7, 8, 14, 40, 36],
    _rootRegisterCallback: [function($self, $parent, zone, f) {
      return f;
    }, "call$4", "async___rootRegisterCallback$closure", 8, 0, function() {
      return {func: 1, ret: {func: 1}, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1}]};
    }, 6, 7, 8, 14],
    _rootRegisterUnaryCallback: [function($self, $parent, zone, f) {
      return f;
    }, "call$4", "async___rootRegisterUnaryCallback$closure", 8, 0, function() {
      return {func: 1, ret: {func: 1, args: [,]}, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, args: [,]}]};
    }, 6, 7, 8, 14],
    _rootRegisterBinaryCallback: [function($self, $parent, zone, f) {
      return f;
    }, "call$4", "async___rootRegisterBinaryCallback$closure", 8, 0, function() {
      return {func: 1, ret: {func: 1, args: [,,]}, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1, args: [,,]}]};
    }, 6, 7, 8, 14],
    _rootErrorCallback: [function($self, $parent, zone, error, stackTrace) {
      return;
    }, "call$5", "async___rootErrorCallback$closure", 10, 0, 85, 6, 7, 8, 13, 15],
    _rootScheduleMicrotask: [function($self, $parent, zone, f) {
      var t1 = C.C__RootZone !== zone;
      if (t1)
        f = zone.bindCallback$2$runGuarded(f, !(!t1 || C.C__RootZone.get$errorZone() === zone.get$errorZone()));
      P._scheduleAsyncCallback(f);
    }, "call$4", "async___rootScheduleMicrotask$closure", 8, 0, 86, 6, 7, 8, 14],
    _rootCreateTimer: [function($self, $parent, zone, duration, callback) {
      return P.Timer__createTimer(duration, C.C__RootZone !== zone ? zone.bindCallback$1(callback) : callback);
    }, "call$5", "async___rootCreateTimer$closure", 10, 0, 87, 6, 7, 8, 32, 26],
    _rootCreatePeriodicTimer: [function($self, $parent, zone, duration, callback) {
      return P.Timer__createPeriodicTimer(duration, C.C__RootZone !== zone ? zone.bindUnaryCallback$1(callback) : callback);
    }, "call$5", "async___rootCreatePeriodicTimer$closure", 10, 0, 88, 6, 7, 8, 32, 26],
    _rootPrint: [function($self, $parent, zone, line) {
      H.printString(H.S(line));
    }, "call$4", "async___rootPrint$closure", 8, 0, 89, 6, 7, 8, 67],
    _printToZone: [function(line) {
      $.Zone__current.print$1(0, line);
    }, "call$1", "async___printToZone$closure", 2, 0, 16],
    _rootFork: [function($self, $parent, zone, specification, zoneValues) {
      var valueMap, t1, t2;
      $.printToZone = P.async___printToZone$closure();
      if (specification == null)
        specification = C._ZoneSpecification_ALf;
      if (zoneValues == null)
        valueMap = zone instanceof P._Zone ? zone.get$_async$_map() : P.HashMap_HashMap(null, null, null, null, null);
      else
        valueMap = P.HashMap_HashMap$from(zoneValues, null, null);
      t1 = new P._CustomZone(null, null, null, null, null, null, null, null, null, null, null, null, null, null, zone, valueMap);
      specification.run;
      t1._run = zone.get$_run();
      t1._runUnary = zone.get$_runUnary();
      t1._runBinary = zone.get$_runBinary();
      t1._registerCallback = zone.get$_registerCallback();
      t1._registerUnaryCallback = zone.get$_registerUnaryCallback();
      t1._registerBinaryCallback = zone.get$_registerBinaryCallback();
      t1._errorCallback = zone.get$_errorCallback();
      t1._scheduleMicrotask = zone.get$_scheduleMicrotask();
      t1._createTimer = zone.get$_createTimer();
      t1._createPeriodicTimer = zone.get$_createPeriodicTimer();
      t1._print = zone.get$_print();
      t1._fork = zone.get$_fork();
      t2 = specification.handleUncaughtError;
      t1._handleUncaughtError = t2 != null ? new P._ZoneFunction(t1, t2) : zone.get$_handleUncaughtError();
      return t1;
    }, "call$5", "async___rootFork$closure", 10, 0, 90, 6, 7, 8, 65, 55],
    runZoned: function(body, onError, zoneSpecification, zoneValues) {
      var errorHandler, zone;
      errorHandler = new P.runZoned_closure(onError);
      zoneSpecification = new P._ZoneSpecification(errorHandler, null, null, null, null, null, null, null, null, null, null, null, null);
      zone = $.Zone__current.fork$2$specification$zoneValues(zoneSpecification, zoneValues);
      return zone.runGuarded$1(body);
    },
    _AsyncRun__initializeScheduleImmediate_internalCallback: {
      "^": "Closure:0;_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();
      }, null, null, 2, 0, null, 5, "call"]
    },
    _AsyncRun__initializeScheduleImmediate_closure: {
      "^": "Closure:83;_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:1;callback",
      call$0: [function() {
        --init.globalState.topEventLoop._activeJsAsyncCount;
        this.callback.call$0();
      }, null, null, 0, 0, null, "call"]
    },
    _AsyncRun__scheduleImmediateWithSetImmediate_internalCallback: {
      "^": "Closure:1;callback",
      call$0: [function() {
        --init.globalState.topEventLoop._activeJsAsyncCount;
        this.callback.call$0();
      }, null, null, 0, 0, null, "call"]
    },
    _awaitOnObject_closure: {
      "^": "Closure:0;bodyFunction",
      call$1: [function(result) {
        return this.bodyFunction.call$2(0, result);
      }, null, null, 2, 0, null, 19, "call"]
    },
    _awaitOnObject_closure0: {
      "^": "Closure:82;bodyFunction",
      call$2: [function(error, stackTrace) {
        this.bodyFunction.call$2(1, new H.ExceptionAndStackTrace(error, stackTrace));
      }, null, null, 4, 0, null, 13, 15, "call"]
    },
    _wrapJsFunctionForAsync_closure: {
      "^": "Closure:51;$protected",
      call$2: [function(errorCode, result) {
        this.$protected(errorCode, result);
      }, null, null, 4, 0, null, 54, 19, "call"]
    },
    _BroadcastStream: {
      "^": "_ControllerStream;_controller,$ti"
    },
    _BroadcastSubscription: {
      "^": "_ControllerSubscription;_eventState,_async$_next,_async$_previous,_controller,_onData,_onError,_onDone,_zone,_state,_cancelFuture,_pending,$ti",
      _onPause$0: function() {
      },
      _onResume$0: function() {
      }
    },
    _BroadcastStreamController: {
      "^": "Object;_state<,$ti",
      get$stream: function(_) {
        return new P._BroadcastStream(this, this.$ti);
      },
      get$_mayAddEvent: function() {
        return this._state < 4;
      },
      _removeListener$1: function(subscription) {
        var previous, next;
        previous = subscription._async$_previous;
        next = subscription._async$_next;
        if (previous == null)
          this._firstSubscription = next;
        else
          previous._async$_next = next;
        if (next == null)
          this._lastSubscription = previous;
        else
          next._async$_previous = previous;
        subscription._async$_previous = subscription;
        subscription._async$_next = subscription;
      },
      _async$_subscribe$4: function(onData, onError, onDone, cancelOnError) {
        var t1, t2, subscription, oldLast;
        if ((this._state & 4) !== 0) {
          if (onDone == null)
            onDone = P.async___nullDoneHandler$closure();
          t1 = new P._DoneStreamSubscription($.Zone__current, 0, onDone, this.$ti);
          t1._schedule$0();
          return t1;
        }
        t1 = $.Zone__current;
        t2 = cancelOnError ? 1 : 0;
        subscription = new P._BroadcastSubscription(0, null, null, this, null, null, null, t1, t2, null, null, this.$ti);
        subscription._BufferingStreamSubscription$4(onData, onError, onDone, cancelOnError, H.getTypeArgumentByIndex(this, 0));
        subscription._async$_previous = subscription;
        subscription._async$_next = subscription;
        subscription._eventState = this._state & 1;
        oldLast = this._lastSubscription;
        this._lastSubscription = subscription;
        subscription._async$_next = null;
        subscription._async$_previous = oldLast;
        if (oldLast == null)
          this._firstSubscription = subscription;
        else
          oldLast._async$_next = subscription;
        if (this._firstSubscription === subscription)
          P._runGuarded(this.onListen);
        return subscription;
      },
      _recordCancel$1: function(sub) {
        var t1;
        if (sub._async$_next === sub)
          return;
        t1 = sub._eventState;
        if ((t1 & 2) !== 0)
          sub._eventState = t1 | 4;
        else {
          this._removeListener$1(sub);
          if ((this._state & 2) === 0 && this._firstSubscription == null)
            this._callOnCancel$0();
        }
        return;
      },
      _recordPause$1: function(subscription) {
      },
      _recordResume$1: function(subscription) {
      },
      _addEventError$0: ["super$_BroadcastStreamController$_addEventError", function() {
        if ((this._state & 4) !== 0)
          return new P.StateError("Cannot add new events after calling close");
        return new P.StateError("Cannot add new events while doing an addStream");
      }],
      add$1: function(_, data) {
        if (!this.get$_mayAddEvent())
          throw H.wrapException(this._addEventError$0());
        this._sendData$1(data);
      },
      _forEachListener$1: function(action) {
        var t1, subscription, id, next;
        t1 = this._state;
        if ((t1 & 2) !== 0)
          throw H.wrapException(new P.StateError("Cannot fire new event. Controller is already firing an event"));
        subscription = this._firstSubscription;
        if (subscription == null)
          return;
        id = t1 & 1;
        this._state = t1 ^ 3;
        for (; subscription != null;) {
          t1 = subscription._eventState;
          if ((t1 & 1) === id) {
            subscription._eventState = t1 | 2;
            action.call$1(subscription);
            t1 = subscription._eventState ^= 1;
            next = subscription._async$_next;
            if ((t1 & 4) !== 0)
              this._removeListener$1(subscription);
            subscription._eventState &= 4294967293;
            subscription = next;
          } else
            subscription = subscription._async$_next;
        }
        this._state &= 4294967293;
        if (this._firstSubscription == null)
          this._callOnCancel$0();
      },
      _callOnCancel$0: function() {
        if ((this._state & 4) !== 0 && this._doneFuture._state === 0)
          this._doneFuture._asyncComplete$1(null);
        P._runGuarded(this.onCancel);
      }
    },
    _SyncBroadcastStreamController: {
      "^": "_BroadcastStreamController;onListen,onCancel,_state,_firstSubscription,_lastSubscription,_addStreamState,_doneFuture,$ti",
      get$_mayAddEvent: function() {
        return P._BroadcastStreamController.prototype.get$_mayAddEvent.call(this) && (this._state & 2) === 0;
      },
      _addEventError$0: function() {
        if ((this._state & 2) !== 0)
          return new P.StateError("Cannot fire new event. Controller is already firing an event");
        return this.super$_BroadcastStreamController$_addEventError();
      },
      _sendData$1: function(data) {
        var t1, t2;
        t1 = this._firstSubscription;
        if (t1 == null)
          return;
        t2 = this._lastSubscription;
        if (t1 == null ? t2 == null : t1 === t2) {
          this._state |= 2;
          t1._async$_add$1(data);
          this._state &= 4294967293;
          if (this._firstSubscription == null)
            this._callOnCancel$0();
          return;
        }
        this._forEachListener$1(new P._SyncBroadcastStreamController__sendData_closure(this, data));
      }
    },
    _SyncBroadcastStreamController__sendData_closure: {
      "^": "Closure;$this,data",
      call$1: function(subscription) {
        subscription._async$_add$1(this.data);
      },
      $signature: function() {
        return H.computeSignature(function(T) {
          return {func: 1, args: [[P._BufferingStreamSubscription, T]]};
        }, this.$this, "_SyncBroadcastStreamController");
      }
    },
    _AsyncBroadcastStreamController: {
      "^": "_BroadcastStreamController;onListen,onCancel,_state,_firstSubscription,_lastSubscription,_addStreamState,_doneFuture,$ti",
      _sendData$1: function(data) {
        var subscription, t1;
        for (subscription = this._firstSubscription, t1 = this.$ti; subscription != null; subscription = subscription._async$_next)
          subscription._addPending$1(new P._DelayedData(data, null, t1));
      }
    },
    Future: {
      "^": "Object;$ti"
    },
    closure1: {
      "^": "Closure:1;computation,result",
      call$0: [function() {
        var e, s, exception, t1;
        try {
          this.result._complete$1(this.computation.call$0());
        } catch (exception) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          P._completeWithErrorCallback(this.result, e, s);
        }
      }, null, null, 0, 0, null, "call"]
    },
    closure: {
      "^": "Closure:1;computation,result",
      call$0: [function() {
        var e, s, t1, exception;
        try {
          t1 = this.computation;
          t1 = t1 == null ? t1 : t1.call$0();
          this.result._complete$1(t1);
        } catch (exception) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          P._completeWithErrorCallback(this.result, e, s);
        }
      }, null, null, 0, 0, null, "call"]
    },
    Future_wait_handleError: {
      "^": "Closure:39;_box_0,eagerError,cleanUp,result",
      call$2: [function(theError, theStackTrace) {
        var t1, t2;
        t1 = this._box_0;
        t2 = --t1.remaining;
        if (t1.values != null) {
          t1.values = null;
          if (t1.remaining === 0 || this.eagerError)
            this.result._completeError$2(theError, theStackTrace);
          else {
            t1.error = theError;
            t1.stackTrace = theStackTrace;
          }
        } else if (t2 === 0 && !this.eagerError)
          this.result._completeError$2(t1.error, t1.stackTrace);
      }, null, null, 4, 0, null, 53, 52, "call"]
    },
    Future_wait_closure: {
      "^": "Closure;_box_0,eagerError,cleanUp,result,pos",
      call$1: [function(value) {
        var t1, t2, t3;
        t1 = this._box_0;
        t2 = --t1.remaining;
        t3 = t1.values;
        if (t3 != null) {
          t3[this.pos] = value;
          if (t2 === 0)
            this.result._completeWithValue$1(t3);
        } else if (t1.remaining === 0 && !this.eagerError)
          this.result._completeError$2(t1.error, t1.stackTrace);
      }, null, null, 2, 0, null, 12, "call"],
      $signature: function() {
        return {func: 1, args: [,]};
      }
    },
    Completer: {
      "^": "Object;$ti"
    },
    _Completer: {
      "^": "Object;$ti",
      completeError$2: [function(error, stackTrace) {
        var replacement;
        error = error != null ? error : new P.NullThrownError();
        if (this.future._state !== 0)
          throw H.wrapException(new P.StateError("Future already completed"));
        replacement = $.Zone__current.errorCallback$2(error, stackTrace);
        if (replacement != null) {
          error = replacement.error;
          error = error != null ? error : new P.NullThrownError();
          stackTrace = replacement.stackTrace;
        }
        this._completeError$2(error, stackTrace);
      }, function(error) {
        return this.completeError$2(error, null);
      }, "completeError$1", "call$2", "call$1", "get$completeError", 2, 2, 60, 2]
    },
    _AsyncCompleter: {
      "^": "_Completer;future,$ti",
      complete$1: function(_, value) {
        var t1 = this.future;
        if (t1._state !== 0)
          throw H.wrapException(new P.StateError("Future already completed"));
        t1._asyncComplete$1(value);
      },
      complete$0: function($receiver) {
        return this.complete$1($receiver, null);
      },
      _completeError$2: function(error, stackTrace) {
        this.future._asyncCompleteError$2(error, stackTrace);
      }
    },
    _SyncCompleter: {
      "^": "_Completer;future,$ti",
      complete$1: function(_, value) {
        var t1 = this.future;
        if (t1._state !== 0)
          throw H.wrapException(new P.StateError("Future already completed"));
        t1._complete$1(value);
      },
      _completeError$2: function(error, stackTrace) {
        this.future._completeError$2(error, stackTrace);
      }
    },
    _FutureListener: {
      "^": "Object;_nextListener,result,state,callback,errorCallback",
      matchesErrorTest$1: function(asyncError) {
        if (this.state !== 6)
          return true;
        return this.result._zone.runUnary$2(this.callback, asyncError.error);
      },
      handleError$1: function(asyncError) {
        var t1, t2, t3;
        t1 = this.errorCallback;
        t2 = H.getDynamicRuntimeType();
        t3 = this.result._zone;
        if (H.buildFunctionType(t2, [t2, t2])._isTest$1(t1))
          return t3.runBinary$3(t1, asyncError.error, asyncError.stackTrace);
        else
          return t3.runUnary$2(t1, asyncError.error);
      }
    },
    _Future: {
      "^": "Object;_state<,_zone,_resultOrListeners<,$ti",
      then$2$onError: function(f, onError) {
        var currentZone = $.Zone__current;
        if (currentZone !== C.C__RootZone) {
          f = currentZone.registerUnaryCallback$1(f);
          if (onError != null)
            onError = P._registerErrorHandler(onError, currentZone);
        }
        return this._thenNoZoneRegistration$2(f, onError);
      },
      then$1: function(f) {
        return this.then$2$onError(f, null);
      },
      _thenNoZoneRegistration$2: function(f, onError) {
        var result = new P._Future(0, $.Zone__current, null, [null]);
        this._addListener$1(new P._FutureListener(null, result, onError == null ? 1 : 3, f, onError));
        return result;
      },
      catchError$2$test: function(onError, test) {
        var t1, result;
        t1 = $.Zone__current;
        result = new P._Future(0, t1, null, this.$ti);
        if (t1 !== C.C__RootZone)
          onError = P._registerErrorHandler(onError, t1);
        this._addListener$1(new P._FutureListener(null, result, 2, test, onError));
        return result;
      },
      catchError$1: function(onError) {
        return this.catchError$2$test(onError, null);
      },
      whenComplete$1: function(action) {
        var t1, result;
        t1 = $.Zone__current;
        result = new P._Future(0, t1, null, this.$ti);
        this._addListener$1(new P._FutureListener(null, result, 8, t1 !== C.C__RootZone ? t1.registerCallback$1(action) : action, null));
        return result;
      },
      _addListener$1: function(listener) {
        var t1, t2;
        t1 = this._state;
        if (t1 <= 1) {
          listener._nextListener = this._resultOrListeners;
          this._resultOrListeners = listener;
        } else {
          if (t1 === 2) {
            t1 = this._resultOrListeners;
            t2 = t1._state;
            if (t2 < 4) {
              t1._addListener$1(listener);
              return;
            }
            this._state = t2;
            this._resultOrListeners = t1._resultOrListeners;
          }
          this._zone.scheduleMicrotask$1(new P._Future__addListener_closure(this, listener));
        }
      },
      _prependListeners$1: function(listeners) {
        var t1, t2, existingListeners, cursor, cursor0, t3;
        t1 = {};
        t1.listeners = listeners;
        if (listeners == null)
          return;
        t2 = this._state;
        if (t2 <= 1) {
          existingListeners = this._resultOrListeners;
          this._resultOrListeners = listeners;
          if (existingListeners != null) {
            for (cursor = listeners; cursor0 = cursor._nextListener, cursor0 != null; cursor = cursor0)
              ;
            cursor._nextListener = existingListeners;
          }
        } else {
          if (t2 === 2) {
            t2 = this._resultOrListeners;
            t3 = t2._state;
            if (t3 < 4) {
              t2._prependListeners$1(listeners);
              return;
            }
            this._state = t3;
            this._resultOrListeners = t2._resultOrListeners;
          }
          t1.listeners = this._reverseListeners$1(listeners);
          this._zone.scheduleMicrotask$1(new P._Future__prependListeners_closure(t1, 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._nextListener;
          current._nextListener = prev;
        }
        return prev;
      },
      _complete$1: function(value) {
        var listeners;
        if (!!J.getInterceptor(value).$isFuture)
          P._Future__chainCoreFuture(value, this);
        else {
          listeners = this._removeListeners$0();
          this._state = 4;
          this._resultOrListeners = value;
          P._Future__propagateToListeners(this, listeners);
        }
      },
      _completeWithValue$1: function(value) {
        var 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, 29, 2, 13, 15],
      _asyncComplete$1: function(value) {
        if (!!J.getInterceptor(value).$isFuture) {
          if (value._state === 8) {
            this._state = 1;
            this._zone.scheduleMicrotask$1(new P._Future__asyncComplete_closure(this, value));
          } else
            P._Future__chainCoreFuture(value, this);
          return;
        }
        this._state = 1;
        this._zone.scheduleMicrotask$1(new P._Future__asyncComplete_closure0(this, value));
      },
      _asyncCompleteError$2: function(error, stackTrace) {
        this._state = 1;
        this._zone.scheduleMicrotask$1(new P._Future__asyncCompleteError_closure(this, error, stackTrace));
      },
      $isFuture: 1,
      static: {
        _Future__chainForeignFuture: function(source, target) {
          var e, s, exception, t1;
          target._state = 1;
          try {
            source.then$2$onError(new P._Future__chainForeignFuture_closure(target), new P._Future__chainForeignFuture_closure0(target));
          } catch (exception) {
            t1 = H.unwrapException(exception);
            e = t1;
            s = H.getTraceFromException(exception);
            P.scheduleMicrotask(new P._Future__chainForeignFuture_closure1(target, e, s));
          }
        },
        _Future__chainCoreFuture: function(source, target) {
          var t1, current, listeners;
          for (; t1 = source._state, t1 === 2;)
            source = source._resultOrListeners;
          current = target._resultOrListeners;
          if (t1 >= 4) {
            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 t1, t2, t3, hasError, listeners0, sourceResult, t4, t5, zone, oldZone, current, result;
          t1 = {};
          t1.source = source;
          for (t2 = source; true;) {
            t3 = {};
            hasError = t2._state === 8;
            if (listeners == null) {
              if (hasError) {
                t1 = t2._resultOrListeners;
                t2._zone.handleUncaughtError$2(t1.error, t1.stackTrace);
              }
              return;
            }
            for (; listeners0 = listeners._nextListener, listeners0 != null; listeners = listeners0) {
              listeners._nextListener = null;
              P._Future__propagateToListeners(t1.source, listeners);
            }
            t2 = t1.source;
            sourceResult = t2._resultOrListeners;
            t3.listenerHasError = hasError;
            t3.listenerValueOrError = sourceResult;
            t4 = !hasError;
            if (t4) {
              t5 = listeners.state;
              t5 = (t5 & 1) !== 0 || t5 === 8;
            } else
              t5 = true;
            if (t5) {
              t5 = listeners.result;
              zone = t5._zone;
              if (hasError) {
                t2 = t2._zone;
                t2.toString;
                t2 = !((t2 == null ? zone == null : t2 === zone) || t2.get$errorZone() === zone.get$errorZone());
              } else
                t2 = false;
              if (t2) {
                t2 = t1.source;
                t3 = t2._resultOrListeners;
                t2._zone.handleUncaughtError$2(t3.error, t3.stackTrace);
                return;
              }
              oldZone = $.Zone__current;
              if (oldZone == null ? zone != null : oldZone !== zone)
                $.Zone__current = zone;
              else
                oldZone = null;
              t2 = listeners.state;
              if (t2 === 8)
                new P._Future__propagateToListeners_handleWhenCompleteCallback(t1, t3, hasError, listeners).call$0();
              else if (t4) {
                if ((t2 & 1) !== 0)
                  new P._Future__propagateToListeners_handleValueCallback(t3, listeners, sourceResult).call$0();
              } else if ((t2 & 2) !== 0)
                new P._Future__propagateToListeners_handleError(t1, t3, listeners).call$0();
              if (oldZone != null)
                $.Zone__current = oldZone;
              t2 = t3.listenerValueOrError;
              t4 = J.getInterceptor(t2);
              if (!!t4.$isFuture) {
                if (!!t4.$is_Future)
                  if (t2._state >= 4) {
                    current = t5._resultOrListeners;
                    t5._resultOrListeners = null;
                    listeners = t5._reverseListeners$1(current);
                    t5._state = t2._state;
                    t5._resultOrListeners = t2._resultOrListeners;
                    t1.source = t2;
                    continue;
                  } else
                    P._Future__chainCoreFuture(t2, t5);
                else
                  P._Future__chainForeignFuture(t2, t5);
                return;
              }
            }
            result = listeners.result;
            current = result._resultOrListeners;
            result._resultOrListeners = null;
            listeners = result._reverseListeners$1(current);
            t2 = t3.listenerHasError;
            t3 = t3.listenerValueOrError;
            if (!t2) {
              result._state = 4;
              result._resultOrListeners = t3;
            } else {
              result._state = 8;
              result._resultOrListeners = t3;
            }
            t1.source = result;
            t2 = result;
          }
        }
      }
    },
    _Future__addListener_closure: {
      "^": "Closure:1;$this,listener",
      call$0: [function() {
        P._Future__propagateToListeners(this.$this, this.listener);
      }, null, null, 0, 0, null, "call"]
    },
    _Future__prependListeners_closure: {
      "^": "Closure:1;_box_0,$this",
      call$0: [function() {
        P._Future__propagateToListeners(this.$this, this._box_0.listeners);
      }, null, null, 0, 0, null, "call"]
    },
    _Future__chainForeignFuture_closure: {
      "^": "Closure:0;target",
      call$1: [function(value) {
        var t1 = this.target;
        t1._state = 0;
        t1._complete$1(value);
      }, null, null, 2, 0, null, 12, "call"]
    },
    _Future__chainForeignFuture_closure0: {
      "^": "Closure:6;target",
      call$2: [function(error, stackTrace) {
        this.target._completeError$2(error, stackTrace);
      }, function(error) {
        return this.call$2(error, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 13, 15, "call"]
    },
    _Future__chainForeignFuture_closure1: {
      "^": "Closure:1;target,e,s",
      call$0: [function() {
        this.target._completeError$2(this.e, this.s);
      }, null, null, 0, 0, null, "call"]
    },
    _Future__asyncComplete_closure: {
      "^": "Closure:1;$this,coreFuture",
      call$0: [function() {
        P._Future__chainCoreFuture(this.coreFuture, this.$this);
      }, null, null, 0, 0, null, "call"]
    },
    _Future__asyncComplete_closure0: {
      "^": "Closure:1;$this,typedValue",
      call$0: [function() {
        this.$this._completeWithValue$1(this.typedValue);
      }, null, null, 0, 0, null, "call"]
    },
    _Future__asyncCompleteError_closure: {
      "^": "Closure:1;$this,error,stackTrace",
      call$0: [function() {
        this.$this._completeError$2(this.error, this.stackTrace);
      }, null, null, 0, 0, null, "call"]
    },
    _Future__propagateToListeners_handleWhenCompleteCallback: {
      "^": "Closure:3;_box_1,_box_0,hasError,listener",
      call$0: function() {
        var completeResult, e, s, t1, exception, t2, originalSource;
        completeResult = null;
        try {
          t1 = this.listener;
          completeResult = t1.result._zone.run$1(t1.callback);
        } catch (exception) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          if (this.hasError) {
            t1 = this._box_1.source._resultOrListeners.error;
            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:0;originalSource",
      call$1: [function(_) {
        return this.originalSource;
      }, null, null, 2, 0, null, 5, "call"]
    },
    _Future__propagateToListeners_handleValueCallback: {
      "^": "Closure:3;_box_0,listener,sourceResult",
      call$0: function() {
        var e, s, t1, exception;
        try {
          t1 = this.listener;
          this._box_0.listenerValueOrError = t1.result._zone.runUnary$2(t1.callback, this.sourceResult);
        } catch (exception) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          t1 = this._box_0;
          t1.listenerValueOrError = new P.AsyncError(e, s);
          t1.listenerHasError = true;
        }
      }
    },
    _Future__propagateToListeners_handleError: {
      "^": "Closure:3;_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) && t1.errorCallback != null) {
            t2 = this._box_0;
            t2.listenerValueOrError = t1.handleError$1(asyncError);
            t2.listenerHasError = false;
          }
        } catch (exception) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          t1 = this._box_1.source._resultOrListeners;
          t2 = t1.error;
          t3 = e;
          t4 = this._box_0;
          if (t2 == null ? t3 == null : t2 === t3)
            t4.listenerValueOrError = t1;
          else
            t4.listenerValueOrError = new P.AsyncError(e, s);
          t4.listenerHasError = true;
        }
      }
    },
    _AsyncCallbackEntry: {
      "^": "Object;callback,next"
    },
    Stream: {
      "^": "Object;$ti",
      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;
      },
      get$isEmpty: function(_) {
        var t1, future;
        t1 = {};
        future = new P._Future(0, $.Zone__current, null, [P.bool]);
        t1.subscription = null;
        t1.subscription = this.listen$4$cancelOnError$onDone$onError(new P.Stream_isEmpty_closure(t1, future), true, new P.Stream_isEmpty_closure0(future), future.get$_completeError());
        return future;
      },
      get$first: function(_) {
        var t1, future;
        t1 = {};
        future = new P._Future(0, $.Zone__current, null, [H.getRuntimeTypeArgument(this, "Stream", 0)]);
        t1.subscription = null;
        t1.subscription = this.listen$4$cancelOnError$onDone$onError(new P.Stream_first_closure(t1, this, future), true, new P.Stream_first_closure0(future), future.get$_completeError());
        return future;
      }
    },
    Stream_length_closure: {
      "^": "Closure:0;_box_0",
      call$1: [function(_) {
        ++this._box_0.count;
      }, null, null, 2, 0, null, 5, "call"]
    },
    Stream_length_closure0: {
      "^": "Closure:1;_box_0,future",
      call$0: [function() {
        this.future._complete$1(this._box_0.count);
      }, null, null, 0, 0, null, "call"]
    },
    Stream_isEmpty_closure: {
      "^": "Closure:0;_box_0,future",
      call$1: [function(_) {
        P._cancelAndValue(this._box_0.subscription, this.future, false);
      }, null, null, 2, 0, null, 5, "call"]
    },
    Stream_isEmpty_closure0: {
      "^": "Closure:1;future",
      call$0: [function() {
        this.future._complete$1(true);
      }, null, null, 0, 0, null, "call"]
    },
    Stream_first_closure: {
      "^": "Closure;_box_0,$this,future",
      call$1: [function(value) {
        P._cancelAndValue(this._box_0.subscription, this.future, value);
      }, null, null, 2, 0, null, 12, "call"],
      $signature: function() {
        return H.computeSignature(function(T) {
          return {func: 1, args: [T]};
        }, this.$this, "Stream");
      }
    },
    Stream_first_closure0: {
      "^": "Closure:1;future",
      call$0: [function() {
        var e, s, t1, exception;
        try {
          t1 = H.IterableElementError_noElement();
          throw H.wrapException(t1);
        } catch (exception) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          P._completeWithErrorCallback(this.future, e, s);
        }
      }, null, null, 0, 0, null, "call"]
    },
    StreamSubscription: {
      "^": "Object;$ti"
    },
    StreamTransformer: {
      "^": "Object;"
    },
    _ControllerStream: {
      "^": "_StreamImpl;_controller,$ti",
      get$hashCode: function(_) {
        return (H.Primitives_objectHashCode(this._controller) ^ 892482866) >>> 0;
      },
      $eq: function(_, other) {
        if (other == null)
          return false;
        if (this === other)
          return true;
        if (!(other instanceof P._ControllerStream))
          return false;
        return other._controller === this._controller;
      }
    },
    _ControllerSubscription: {
      "^": "_BufferingStreamSubscription;$ti",
      _onCancel$0: function() {
        return this._controller._recordCancel$1(this);
      },
      _onPause$0: function() {
        this._controller._recordPause$1(this);
      },
      _onResume$0: function() {
        this._controller._recordResume$1(this);
      }
    },
    _EventSink: {
      "^": "Object;"
    },
    _BufferingStreamSubscription: {
      "^": "Object;_state<,$ti",
      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, t2;
        t1 = (this._state | 8) >>> 0;
        this._state = t1;
        if ((t1 & 64) !== 0) {
          t2 = this._pending;
          if (t2._state === 1)
            t2._state = 3;
        }
        if ((t1 & 32) === 0)
          this._pending = null;
        this._cancelFuture = this._onCancel$0();
      },
      _async$_add$1: 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)]));
      },
      _onPause$0: function() {
      },
      _onResume$0: function() {
      },
      _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._onData, data);
        this._state = (this._state & 4294967263) >>> 0;
        this._checkState$1((t1 & 4) !== 0);
      },
      _checkState$1: function(wasInputPaused) {
        var t1, t2, isInputPaused;
        t1 = this._state;
        if ((t1 & 64) !== 0 && this._pending.lastPendingEvent == null) {
          t1 = (t1 & 4294967231) >>> 0;
          this._state = t1;
          if ((t1 & 4) !== 0)
            if (t1 < 128) {
              t2 = this._pending;
              t2 = t2 == null || t2.lastPendingEvent == null;
            } else
              t2 = false;
          else
            t2 = false;
          if (t2) {
            t1 = (t1 & 4294967291) >>> 0;
            this._state = t1;
          }
        }
        for (; true; wasInputPaused = isInputPaused) {
          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();
          t1 = (this._state & 4294967263) >>> 0;
          this._state = t1;
        }
        if ((t1 & 64) !== 0 && t1 < 128)
          this._pending.schedule$1(this);
      },
      _BufferingStreamSubscription$4: function(onData, onError, onDone, cancelOnError, $T) {
        var handleData, t1;
        handleData = onData == null ? P.async___nullDataHandler$closure() : onData;
        t1 = this._zone;
        this._onData = t1.registerUnaryCallback$1(handleData);
        this._onError = P._registerErrorHandler(onError == null ? P.async___nullErrorHandler$closure() : onError, t1);
        this._onDone = t1.registerCallback$1(onDone == null ? P.async___nullDoneHandler$closure() : onDone);
      },
      $is_EventSink: 1
    },
    _StreamImpl: {
      "^": "Stream;$ti",
      listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
        return this._controller._async$_subscribe$4(onData, onError, onDone, true === cancelOnError);
      },
      listen$1: function(onData) {
        return this.listen$4$cancelOnError$onDone$onError(onData, null, null, null);
      }
    },
    _DelayedEvent: {
      "^": "Object;next@"
    },
    _DelayedData: {
      "^": "_DelayedEvent;value,next,$ti",
      perform$1: function(dispatch) {
        dispatch._sendData$1(this.value);
      }
    },
    _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;
      }
    },
    _PendingEvents_schedule_closure: {
      "^": "Closure:1;$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);
      }, null, null, 0, 0, null, "call"]
    },
    _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;
        }
      }
    },
    _DoneStreamSubscription: {
      "^": "Object;_zone,_state<,_onDone,$ti",
      _schedule$0: function() {
        if ((this._state & 2) !== 0)
          return;
        this._zone.scheduleMicrotask$1(this.get$_sendDone());
        this._state = (this._state | 2) >>> 0;
      },
      cancel$0: function() {
        return $.$get$Future__nullFuture();
      },
      _sendDone$0: [function() {
        var t1 = (this._state & 4294967293) >>> 0;
        this._state = t1;
        if (t1 >= 4)
          return;
        this._state = (t1 | 1) >>> 0;
        t1 = this._onDone;
        if (t1 != null)
          this._zone.runGuarded$1(t1);
      }, "call$0", "get$_sendDone", 0, 0, 3]
    },
    _StreamIterator: {
      "^": "Object;_subscription,_stateData,_isPaused,$ti"
    },
    _cancelAndValue_closure: {
      "^": "Closure:1;future,value",
      call$0: [function() {
        return this.future._complete$1(this.value);
      }, null, null, 0, 0, null, "call"]
    },
    Timer: {
      "^": "Object;"
    },
    AsyncError: {
      "^": "Object;error,stackTrace",
      toString$0: function(_) {
        return H.S(this.error);
      },
      $isError: 1
    },
    _ZoneFunction: {
      "^": "Object;zone,$function"
    },
    ZoneSpecification: {
      "^": "Object;"
    },
    _ZoneSpecification: {
      "^": "Object;handleUncaughtError,run,runUnary,runBinary,registerCallback,registerUnaryCallback,registerBinaryCallback,errorCallback,scheduleMicrotask,createTimer,createPeriodicTimer,print,fork"
    },
    ZoneDelegate: {
      "^": "Object;"
    },
    Zone: {
      "^": "Object;"
    },
    _ZoneDelegate: {
      "^": "Object;_delegationTarget",
      handleUncaughtError$3: function(zone, error, stackTrace) {
        var implementation, implZone;
        implementation = this._delegationTarget.get$_handleUncaughtError();
        implZone = implementation.zone;
        return implementation.$function.call$5(implZone, P._parentDelegate(implZone), zone, error, stackTrace);
      }
    },
    _Zone: {
      "^": "Object;"
    },
    _CustomZone: {
      "^": "_Zone;_run<,_runUnary<,_runBinary<,_registerCallback<,_registerUnaryCallback<,_registerBinaryCallback<,_errorCallback<,_scheduleMicrotask<,_createTimer<,_createPeriodicTimer<,_print<,_fork<,_handleUncaughtError<,_delegateCache,parent>,_async$_map<",
      get$_delegate: function() {
        var t1 = this._delegateCache;
        if (t1 != null)
          return t1;
        t1 = new P._ZoneDelegate(this);
        this._delegateCache = t1;
        return t1;
      },
      get$errorZone: function() {
        return this._handleUncaughtError.zone;
      },
      runGuarded$1: function(f) {
        var e, s, t1, exception;
        try {
          t1 = this.run$1(f);
          return t1;
        } catch (exception) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          return this.handleUncaughtError$2(e, s);
        }
      },
      runUnaryGuarded$2: function(f, arg) {
        var e, s, t1, exception;
        try {
          t1 = this.runUnary$2(f, arg);
          return t1;
        } catch (exception) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          return this.handleUncaughtError$2(e, s);
        }
      },
      bindCallback$2$runGuarded: function(f, runGuarded) {
        var registered = this.registerCallback$1(f);
        if (runGuarded)
          return new P._CustomZone_bindCallback_closure(this, registered);
        else
          return new P._CustomZone_bindCallback_closure0(this, registered);
      },
      bindCallback$1: function(f) {
        return this.bindCallback$2$runGuarded(f, true);
      },
      bindUnaryCallback$2$runGuarded: function(f, runGuarded) {
        var registered = this.registerUnaryCallback$1(f);
        return new P._CustomZone_bindUnaryCallback_closure(this, registered);
      },
      bindUnaryCallback$1: function(f) {
        return this.bindUnaryCallback$2$runGuarded(f, true);
      },
      $index: function(_, key) {
        var t1, result, t2, value;
        t1 = this._async$_map;
        result = t1.$index(0, key);
        if (result != null || t1.containsKey$1(key))
          return result;
        t2 = this.parent;
        if (t2 != null) {
          value = t2.$index(0, key);
          if (value != null)
            t1.$indexSet(0, key, value);
          return value;
        }
        return;
      },
      handleUncaughtError$2: function(error, stackTrace) {
        var implementation, t1, parentDelegate;
        implementation = this._handleUncaughtError;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$5(t1, parentDelegate, this, error, stackTrace);
      },
      fork$2$specification$zoneValues: function(specification, zoneValues) {
        var implementation, t1, parentDelegate;
        implementation = this._fork;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$5(t1, parentDelegate, this, specification, zoneValues);
      },
      run$1: function(f) {
        var implementation, t1, parentDelegate;
        implementation = this._run;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$4(t1, parentDelegate, this, f);
      },
      runUnary$2: function(f, arg) {
        var implementation, t1, parentDelegate;
        implementation = this._runUnary;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$5(t1, parentDelegate, this, f, arg);
      },
      runBinary$3: function(f, arg1, arg2) {
        var implementation, t1, parentDelegate;
        implementation = this._runBinary;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$6(t1, parentDelegate, this, f, arg1, arg2);
      },
      registerCallback$1: function(callback) {
        var implementation, t1, parentDelegate;
        implementation = this._registerCallback;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$4(t1, parentDelegate, this, callback);
      },
      registerUnaryCallback$1: function(callback) {
        var implementation, t1, parentDelegate;
        implementation = this._registerUnaryCallback;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$4(t1, parentDelegate, this, callback);
      },
      registerBinaryCallback$1: function(callback) {
        var implementation, t1, parentDelegate;
        implementation = this._registerBinaryCallback;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$4(t1, parentDelegate, this, callback);
      },
      errorCallback$2: function(error, stackTrace) {
        var implementation, implementationZone, parentDelegate;
        implementation = this._errorCallback;
        implementationZone = implementation.zone;
        if (implementationZone === C.C__RootZone)
          return;
        parentDelegate = P._parentDelegate(implementationZone);
        return implementation.$function.call$5(implementationZone, parentDelegate, this, error, stackTrace);
      },
      scheduleMicrotask$1: function(f) {
        var implementation, t1, parentDelegate;
        implementation = this._scheduleMicrotask;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$4(t1, parentDelegate, this, f);
      },
      createTimer$2: function(duration, f) {
        var implementation, t1, parentDelegate;
        implementation = this._createTimer;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$5(t1, parentDelegate, this, duration, f);
      },
      createPeriodicTimer$2: function(duration, f) {
        var implementation, t1, parentDelegate;
        implementation = this._createPeriodicTimer;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$5(t1, parentDelegate, this, duration, f);
      },
      print$1: function(_, line) {
        var implementation, t1, parentDelegate;
        implementation = this._print;
        t1 = implementation.zone;
        parentDelegate = P._parentDelegate(t1);
        return implementation.$function.call$4(t1, parentDelegate, this, line);
      }
    },
    _CustomZone_bindCallback_closure: {
      "^": "Closure:1;$this,registered",
      call$0: [function() {
        return this.$this.runGuarded$1(this.registered);
      }, null, null, 0, 0, null, "call"]
    },
    _CustomZone_bindCallback_closure0: {
      "^": "Closure:1;$this,registered",
      call$0: [function() {
        return this.$this.run$1(this.registered);
      }, null, null, 0, 0, null, "call"]
    },
    _CustomZone_bindUnaryCallback_closure: {
      "^": "Closure:0;$this,registered",
      call$1: [function(arg) {
        return this.$this.runUnaryGuarded$2(this.registered, arg);
      }, null, null, 2, 0, null, 25, "call"]
    },
    _rootHandleUncaughtError_closure: {
      "^": "Closure:1;_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$_run: function() {
        return C._ZoneFunction__RootZone__rootRun;
      },
      get$_runUnary: function() {
        return C._ZoneFunction__RootZone__rootRunUnary;
      },
      get$_runBinary: function() {
        return C._ZoneFunction__RootZone__rootRunBinary;
      },
      get$_registerCallback: function() {
        return C._ZoneFunction__RootZone__rootRegisterCallback;
      },
      get$_registerUnaryCallback: function() {
        return C._ZoneFunction_Eeh;
      },
      get$_registerBinaryCallback: function() {
        return C._ZoneFunction_7G2;
      },
      get$_errorCallback: function() {
        return C._ZoneFunction__RootZone__rootErrorCallback;
      },
      get$_scheduleMicrotask: function() {
        return C._ZoneFunction__RootZone__rootScheduleMicrotask;
      },
      get$_createTimer: function() {
        return C._ZoneFunction__RootZone__rootCreateTimer;
      },
      get$_createPeriodicTimer: function() {
        return C._ZoneFunction_3bB;
      },
      get$_print: function() {
        return C._ZoneFunction__RootZone__rootPrint;
      },
      get$_fork: function() {
        return C._ZoneFunction__RootZone__rootFork;
      },
      get$_handleUncaughtError: function() {
        return C._ZoneFunction_NMc;
      },
      get$parent: function(_) {
        return;
      },
      get$_async$_map: function() {
        return $.$get$_RootZone__rootMap();
      },
      get$_delegate: function() {
        var t1 = $._RootZone__rootDelegate;
        if (t1 != null)
          return t1;
        t1 = new P._ZoneDelegate(this);
        $._RootZone__rootDelegate = t1;
        return t1;
      },
      get$errorZone: function() {
        return this;
      },
      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) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          return P._rootHandleUncaughtError(null, null, this, e, s);
        }
      },
      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) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          return P._rootHandleUncaughtError(null, null, this, e, s);
        }
      },
      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);
      },
      bindCallback$1: function(f) {
        return this.bindCallback$2$runGuarded(f, true);
      },
      bindUnaryCallback$2$runGuarded: function(f, runGuarded) {
        return new P._RootZone_bindUnaryCallback_closure(this, f);
      },
      bindUnaryCallback$1: function(f) {
        return this.bindUnaryCallback$2$runGuarded(f, true);
      },
      $index: function(_, key) {
        return;
      },
      handleUncaughtError$2: function(error, stackTrace) {
        return P._rootHandleUncaughtError(null, null, this, error, stackTrace);
      },
      fork$2$specification$zoneValues: function(specification, zoneValues) {
        return P._rootFork(null, null, this, specification, zoneValues);
      },
      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);
      },
      registerCallback$1: function(f) {
        return f;
      },
      registerUnaryCallback$1: function(f) {
        return f;
      },
      registerBinaryCallback$1: function(f) {
        return f;
      },
      errorCallback$2: function(error, stackTrace) {
        return;
      },
      scheduleMicrotask$1: function(f) {
        P._rootScheduleMicrotask(null, null, this, f);
      },
      createTimer$2: function(duration, f) {
        return P.Timer__createTimer(duration, f);
      },
      createPeriodicTimer$2: function(duration, f) {
        return P.Timer__createPeriodicTimer(duration, f);
      },
      print$1: function(_, line) {
        H.printString(line);
      }
    },
    _RootZone_bindCallback_closure: {
      "^": "Closure:1;$this,f",
      call$0: [function() {
        return this.$this.runGuarded$1(this.f);
      }, null, null, 0, 0, null, "call"]
    },
    _RootZone_bindCallback_closure0: {
      "^": "Closure:1;$this,f",
      call$0: [function() {
        return this.$this.run$1(this.f);
      }, null, null, 0, 0, null, "call"]
    },
    _RootZone_bindUnaryCallback_closure: {
      "^": "Closure:0;$this,f",
      call$1: [function(arg) {
        return this.$this.runUnaryGuarded$2(this.f, arg);
      }, null, null, 2, 0, null, 25, "call"]
    },
    runZoned_closure: {
      "^": "Closure:69;onError",
      call$5: [function($self, $parent, zone, error, stackTrace) {
        var e, s, t1, t2, exception;
        try {
          t1 = this.onError;
          t2 = H.getDynamicRuntimeType();
          if (H.buildFunctionType(t2, [t2, H.buildInterfaceType(P.StackTrace)])._isTest$1(t1)) {
            t1 = $self.get$parent($self).runBinary$3(t1, error, stackTrace);
            return t1;
          }
          t1 = $self.get$parent($self).runUnary$2(t1, error);
          return t1;
        } catch (exception) {
          t1 = H.unwrapException(exception);
          e = t1;
          s = H.getTraceFromException(exception);
          t1 = e;
          if (t1 == null ? error == null : t1 === error)
            return $parent.handleUncaughtError$3(zone, error, stackTrace);
          else
            return $parent.handleUncaughtError$3(zone, e, s);
        }
      }, null, null, 10, 0, null, 6, 7, 8, 13, 15, "call"]
    }
  }], ["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]));
    },
    HashMap_HashMap: function(equals, hashCode, isValidKey, $K, $V) {
      return new P._HashMap(0, null, null, null, null, [$K, $V]);
    },
    HashMap_HashMap$from: function(other, $K, $V) {
      var result = P.HashMap_HashMap(null, null, null, $K, $V);
      other.forEach$1(0, new P.closure2(result));
      return result;
    },
    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 {
        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.set$_contents(P.StringBuffer__writeAll(t2.get$_contents(), iterable, ", "));
      } finally {
        t1.pop();
      }
      t1 = buffer;
      t1.set$_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) {
        t1 = t1[i];
        if (o == null ? t1 == null : o === t1)
          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;
        ultimateString = parts.pop();
        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);
          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;
                $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;
        $length -= parts.pop().length + 2;
        if (elision == null) {
          $length += 5;
          elision = "...";
        }
      }
      if (elision != null)
        parts.push(elision);
      parts.push(penultimateString);
      parts.push(ultimateString);
    },
    LinkedHashMap_LinkedHashMap: function(equals, hashCode, isValidKey, $K, $V) {
      return new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [$K, $V]);
    },
    LinkedHashMap_LinkedHashMap$fromIterable: function(iterable, key, value, $K, $V) {
      var map = P.LinkedHashMap_LinkedHashMap(null, null, null, $K, $V);
      P.Maps__fillMapWithMappedIterable(map, iterable, key, value);
      return map;
    },
    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;
      result = P.LinkedHashSet_LinkedHashSet(null, null, null, $E);
      for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();)
        result.add$1(0, t1.get$current());
      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.set$_contents(t2.get$_contents() + "{");
        t1.first = true;
        m.forEach$1(0, new P.Maps_mapToString_closure(t1, result));
        t1 = result;
        t1.set$_contents(t1.get$_contents() + "}");
      } finally {
        $.$get$_toStringVisiting().pop();
      }
      t1 = result.get$_contents();
      return t1.charCodeAt(0) == 0 ? t1 : t1;
    },
    Maps__id: [function(x) {
      return x;
    }, "call$1", "collection_Maps__id$closure", 2, 0, 0],
    Maps__fillMapWithMappedIterable: function(map, iterable, key, value) {
      var t1, _i, element;
      if (key == null)
        key = P.collection_Maps__id$closure();
      for (t1 = iterable.length, _i = 0; _i < iterable.length; iterable.length === t1 || (0, H.throwConcurrentModificationError)(iterable), ++_i) {
        element = iterable[_i];
        map.$indexSet(0, key.call$1(element), value.call$1(element));
      }
    },
    _HashMap: {
      "^": "Object;_collection$_length,_collection$_strings,_collection$_nums,_collection$_rest,_collection$_keys,$ti",
      get$length: function(_) {
        return this._collection$_length;
      },
      get$isEmpty: function(_) {
        return this._collection$_length === 0;
      },
      get$keys: function() {
        return new P._HashMapKeyIterable(this, [H.getTypeArgumentByIndex(this, 0)]);
      },
      get$values: function(_) {
        var t1 = H.getTypeArgumentByIndex(this, 0);
        return H.MappedIterable_MappedIterable(new P._HashMapKeyIterable(this, [t1]), new P._HashMap_values_closure(this), t1, H.getTypeArgumentByIndex(this, 1));
      },
      containsKey$1: function(key) {
        var strings, nums;
        if (typeof key === "string" && key !== "__proto__") {
          strings = this._collection$_strings;
          return strings == null ? false : strings[key] != null;
        } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
          nums = this._collection$_nums;
          return nums == null ? false : nums[key] != null;
        } else
          return this._containsKey$1(key);
      },
      _containsKey$1: function(key) {
        var rest = this._collection$_rest;
        if (rest == null)
          return false;
        return this._findBucketIndex$2(rest[this._computeHashCode$1(key)], key) >= 0;
      },
      $index: function(_, key) {
        var strings, t1, entry, nums;
        if (typeof key === "string" && key !== "__proto__") {
          strings = this._collection$_strings;
          if (strings == null)
            t1 = null;
          else {
            entry = strings[key];
            t1 = entry === strings ? null : entry;
          }
          return t1;
        } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
          nums = this._collection$_nums;
          if (nums == null)
            t1 = null;
          else {
            entry = nums[key];
            t1 = entry === nums ? null : entry;
          }
          return t1;
        } else
          return this._get$1(key);
      },
      _get$1: function(key) {
        var rest, t1, index;
        rest = this._collection$_rest;
        if (rest == null)
          return;
        t1 = rest[this._computeHashCode$1(key)];
        index = this._findBucketIndex$2(t1, key);
        return index < 0 ? null : t1[index + 1];
      },
      $indexSet: function(_, key, value) {
        var strings, nums;
        if (typeof key === "string" && key !== "__proto__") {
          strings = this._collection$_strings;
          if (strings == null) {
            strings = P._HashMap__newHashTable();
            this._collection$_strings = strings;
          }
          this._collection$_addHashTableEntry$3(strings, key, value);
        } else if (typeof key === "number" && (key & 0x3ffffff) === key) {
          nums = this._collection$_nums;
          if (nums == null) {
            nums = P._HashMap__newHashTable();
            this._collection$_nums = nums;
          }
          this._collection$_addHashTableEntry$3(nums, key, value);
        } else
          this._set$2(key, value);
      },
      _set$2: function(key, value) {
        var rest, hash, bucket, index;
        rest = this._collection$_rest;
        if (rest == null) {
          rest = P._HashMap__newHashTable();
          this._collection$_rest = rest;
        }
        hash = this._computeHashCode$1(key);
        bucket = rest[hash];
        if (bucket == null) {
          P._HashMap__setTableEntry(rest, hash, [key, value]);
          ++this._collection$_length;
          this._collection$_keys = null;
        } else {
          index = this._findBucketIndex$2(bucket, key);
          if (index >= 0)
            bucket[index + 1] = value;
          else {
            bucket.push(key, value);
            ++this._collection$_length;
            this._collection$_keys = null;
          }
        }
      },
      remove$1: function(_, key) {
        if (typeof key === "string" && key !== "__proto__")
          return this._collection$_removeHashTableEntry$2(this._collection$_strings, key);
        else if (typeof key === "number" && (key & 0x3ffffff) === key)
          return this._collection$_removeHashTableEntry$2(this._collection$_nums, key);
        else
          return this._remove$1(key);
      },
      _remove$1: function(key) {
        var rest, t1, index;
        rest = this._collection$_rest;
        if (rest == null)
          return;
        t1 = rest[this._computeHashCode$1(key)];
        index = this._findBucketIndex$2(t1, key);
        if (index < 0)
          return;
        --this._collection$_length;
        this._collection$_keys = null;
        return t1.splice(index, 2)[1];
      },
      clear$0: function(_) {
        if (this._collection$_length > 0) {
          this._collection$_keys = null;
          this._collection$_rest = null;
          this._collection$_nums = null;
          this._collection$_strings = null;
          this._collection$_length = 0;
        }
      },
      forEach$1: function(_, action) {
        var keys, $length, i, key;
        keys = this._computeKeys$0();
        for ($length = keys.length, i = 0; i < $length; ++i) {
          key = keys[i];
          action.call$2(key, this.$index(0, key));
          if (keys !== this._collection$_keys)
            throw H.wrapException(new P.ConcurrentModificationError(this));
        }
      },
      _computeKeys$0: function() {
        var t1, result, strings, names, entries, index, i, nums, rest, bucket, $length, i0;
        t1 = this._collection$_keys;
        if (t1 != null)
          return t1;
        result = new Array(this._collection$_length);
        result.fixed$length = Array;
        strings = this._collection$_strings;
        if (strings != null) {
          names = Object.getOwnPropertyNames(strings);
          entries = names.length;
          for (index = 0, i = 0; i < entries; ++i) {
            result[index] = names[i];
            ++index;
          }
        } else
          index = 0;
        nums = this._collection$_nums;
        if (nums != null) {
          names = Object.getOwnPropertyNames(nums);
          entries = names.length;
          for (i = 0; i < entries; ++i) {
            result[index] = +names[i];
            ++index;
          }
        }
        rest = this._collection$_rest;
        if (rest != null) {
          names = Object.getOwnPropertyNames(rest);
          entries = names.length;
          for (i = 0; i < entries; ++i) {
            bucket = rest[names[i]];
            $length = bucket.length;
            for (i0 = 0; i0 < $length; i0 += 2) {
              result[index] = bucket[i0];
              ++index;
            }
          }
        }
        this._collection$_keys = result;
        return result;
      },
      _collection$_addHashTableEntry$3: function(table, key, value) {
        if (table[key] == null) {
          ++this._collection$_length;
          this._collection$_keys = null;
        }
        P._HashMap__setTableEntry(table, key, value);
      },
      _collection$_removeHashTableEntry$2: function(table, key) {
        var value;
        if (table != null && table[key] != null) {
          value = P._HashMap__getTableEntry(table, key);
          delete table[key];
          --this._collection$_length;
          this._collection$_keys = null;
          return value;
        } else
          return;
      },
      _computeHashCode$1: function(key) {
        return J.get$hashCode$(key) & 0x3ffffff;
      },
      _findBucketIndex$2: function(bucket, key) {
        var $length, i;
        if (bucket == null)
          return -1;
        $length = bucket.length;
        for (i = 0; i < $length; i += 2)
          if (J.$eq$(bucket[i], key))
            return i;
        return -1;
      },
      $isMap: 1,
      static: {
        _HashMap__getTableEntry: function(table, key) {
          var entry = table[key];
          return entry === table ? null : entry;
        },
        _HashMap__setTableEntry: function(table, key, value) {
          if (value == null)
            table[key] = table;
          else
            table[key] = value;
        },
        _HashMap__newHashTable: function() {
          var table = Object.create(null);
          P._HashMap__setTableEntry(table, "<non-identifier-key>", table);
          delete table["<non-identifier-key>"];
          return table;
        }
      }
    },
    _HashMap_values_closure: {
      "^": "Closure:0;$this",
      call$1: [function(each) {
        return this.$this.$index(0, each);
      }, null, null, 2, 0, null, 22, "call"]
    },
    _IdentityHashMap: {
      "^": "_HashMap;_collection$_length,_collection$_strings,_collection$_nums,_collection$_rest,_collection$_keys,$ti",
      _computeHashCode$1: function(key) {
        return H.objectHashCode(key) & 0x3ffffff;
      },
      _findBucketIndex$2: function(bucket, key) {
        var $length, i, t1;
        if (bucket == null)
          return -1;
        $length = bucket.length;
        for (i = 0; i < $length; i += 2) {
          t1 = bucket[i];
          if (t1 == null ? key == null : t1 === key)
            return i;
        }
        return -1;
      }
    },
    _HashMapKeyIterable: {
      "^": "EfficientLengthIterable;_collection$_map,$ti",
      get$length: function(_) {
        return this._collection$_map._collection$_length;
      },
      get$isEmpty: function(_) {
        return this._collection$_map._collection$_length === 0;
      },
      get$iterator: function(_) {
        var t1 = this._collection$_map;
        return new P._HashMapKeyIterator(t1, t1._computeKeys$0(), 0, null);
      }
    },
    _HashMapKeyIterator: {
      "^": "Object;_collection$_map,_collection$_keys,_offset,_collection$_current",
      get$current: function() {
        return this._collection$_current;
      },
      moveNext$0: function() {
        var keys, offset, t1;
        keys = this._collection$_keys;
        offset = this._offset;
        t1 = this._collection$_map;
        if (keys !== t1._collection$_keys)
          throw H.wrapException(new P.ConcurrentModificationError(t1));
        else if (offset >= keys.length) {
          this._collection$_current = null;
          return false;
        } else {
          this._collection$_current = keys[offset];
          this._offset = offset + 1;
          return true;
        }
      }
    },
    _LinkedIdentityHashMap: {
      "^": "JsLinkedHashMap;__js_helper$_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].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;
      },
      get$isEmpty: function(_) {
        return this._collection$_length === 0;
      },
      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 = typeof object === "number" && (object & 0x3ffffff) === object;
        if (t1)
          return this.contains$1(0, object) ? object : null;
        else
          return this._lookup$1(object);
      },
      _lookup$1: function(object) {
        var rest, t1, index;
        rest = this._collection$_rest;
        if (rest == null)
          return;
        t1 = rest[this._computeHashCode$1(object)];
        index = this._findBucketIndex$2(t1, object);
        if (index < 0)
          return;
        return J.$index$asx(t1, index).get$_element();
      },
      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["<non-identifier-key>"] = table;
            delete table["<non-identifier-key>"];
            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["<non-identifier-key>"] = table;
            delete table["<non-identifier-key>"];
            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, t1, index;
        rest = this._collection$_rest;
        if (rest == null)
          return false;
        t1 = rest[this._computeHashCode$1(object)];
        index = this._findBucketIndex$2(t1, object);
        if (index < 0)
          return false;
        this._collection$_unlinkCell$1(t1.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._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]._element, element))
            return i;
        return -1;
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: null,
      $isIterable: 1,
      $asIterable: null,
      static: {
        _LinkedHashSet__newHashTable: function() {
          var table = Object.create(null);
          table["<non-identifier-key>"] = table;
          delete table["<non-identifier-key>"];
          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;
          }
        }
      }
    },
    closure2: {
      "^": "Closure:2;result",
      call$2: function(k, v) {
        this.result.$indexSet(0, k, v);
      }
    },
    _HashSetBase: {
      "^": "SetBase;$ti"
    },
    IterableBase: {
      "^": "Iterable;$ti"
    },
    ListBase: {
      "^": "Object_ListMixin;$ti"
    },
    Object_ListMixin: {
      "^": "Object+ListMixin;",
      $asList: null,
      $asEfficientLengthIterable: null,
      $asIterable: null,
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 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);
      },
      get$isEmpty: function(receiver) {
        return this.get$length(receiver) === 0;
      },
      map$1: function(receiver, f) {
        return new H.MappedListIterable(receiver, f, [H.getRuntimeTypeArgument(receiver, "ListMixin", 0), null]);
      },
      skip$1: function(receiver, count) {
        return H.SubListIterable$(receiver, count, null, H.getRuntimeTypeArgument(receiver, "ListMixin", 0));
      },
      toList$1$growable: function(receiver, growable) {
        var result, i;
        result = H.setRuntimeTypeInfo([], [H.getRuntimeTypeArgument(receiver, "ListMixin", 0)]);
        C.JSArray_methods.set$length(result, this.get$length(receiver));
        for (i = 0; i < this.get$length(receiver); ++i)
          result[i] = this.$index(receiver, i);
        return result;
      },
      toList$0: function($receiver) {
        return this.toList$1$growable($receiver, true);
      },
      add$1: function(receiver, element) {
        var t1 = this.get$length(receiver);
        this.set$length(receiver, t1 + 1);
        this.$indexSet(receiver, t1, element);
      },
      remove$1: function(receiver, element) {
        var i;
        for (i = 0; i < this.get$length(receiver); ++i)
          if (J.$eq$(this.$index(receiver, i), element)) {
            this.setRange$4(receiver, i, this.get$length(receiver) - 1, receiver, i + 1);
            this.set$length(receiver, this.get$length(receiver) - 1);
            return true;
          }
        return false;
      },
      setRange$4: ["super$ListMixin$setRange", function(receiver, start, end, iterable, skipCount) {
        var $length, otherStart, otherList, t1, i;
        P.RangeError_checkValidRange(start, end, this.get$length(receiver), null, null, null);
        $length = end - start;
        if ($length === 0)
          return;
        if (H.checkSubtype(iterable, "$isList", [H.getRuntimeTypeArgument(receiver, "ListMixin", 0)], "$asList")) {
          otherStart = skipCount;
          otherList = iterable;
        } else {
          otherList = J.skip$1$ax(iterable, skipCount).toList$1$growable(0, false);
          otherStart = 0;
        }
        t1 = J.getInterceptor$asx(otherList);
        if (otherStart + $length > t1.get$length(otherList))
          throw H.wrapException(H.IterableElementError_tooFew());
        if (otherStart < start)
          for (i = $length - 1; i >= 0; --i)
            this.$indexSet(receiver, start + i, t1.$index(otherList, otherStart + i));
        else
          for (i = 0; i < $length; ++i)
            this.$indexSet(receiver, start + i, t1.$index(otherList, otherStart + i));
      }, function($receiver, start, end, iterable) {
        return this.setRange$4($receiver, start, end, iterable, 0);
      }, "setRange$3", null, null, "get$setRange", 6, 2, null, 51],
      indexOf$2: function(receiver, element, startIndex) {
        var i;
        if (startIndex >= this.get$length(receiver))
          return -1;
        for (i = startIndex; i < this.get$length(receiver); ++i)
          if (J.$eq$(this.$index(receiver, i), element))
            return i;
        return -1;
      },
      indexOf$1: function($receiver, element) {
        return this.indexOf$2($receiver, element, 0);
      },
      lastIndexOf$2: function(receiver, element, startIndex) {
        var i;
        startIndex = this.get$length(receiver) - 1;
        for (i = startIndex; i >= 0; --i)
          if (J.$eq$(this.$index(receiver, i), element))
            return i;
        return -1;
      },
      lastIndexOf$1: function($receiver, element) {
        return this.lastIndexOf$2($receiver, element, null);
      },
      setAll$2: function(receiver, index, iterable) {
        var t1, _i, index0;
        if (!!J.getInterceptor(iterable).$isList)
          this.setRange$3(receiver, index, index + iterable.length, iterable);
        else
          for (t1 = iterable.length, _i = 0; _i < iterable.length; iterable.length === t1 || (0, H.throwConcurrentModificationError)(iterable), ++_i, index = index0) {
            index0 = index + 1;
            this.$indexSet(receiver, index, iterable[_i]);
          }
      },
      toString$0: function(receiver) {
        return P.IterableBase_iterableToFullString(receiver, "[", "]");
      },
      $isList: 1,
      $asList: null,
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: null,
      $isIterable: 1,
      $asIterable: null
    },
    _UnmodifiableMapMixin: {
      "^": "Object;",
      $indexSet: function(_, key, value) {
        throw H.wrapException(new P.UnsupportedError("Cannot modify unmodifiable map"));
      },
      $isMap: 1
    },
    MapView0: {
      "^": "Object;",
      $index: function(_, key) {
        return this._collection$_map.$index(0, key);
      },
      $indexSet: function(_, key, value) {
        this._collection$_map.$indexSet(0, key, value);
      },
      forEach$1: function(_, action) {
        this._collection$_map.forEach$1(0, action);
      },
      get$isEmpty: function(_) {
        var t1 = this._collection$_map;
        return t1.get$isEmpty(t1);
      },
      get$length: function(_) {
        var t1 = this._collection$_map;
        return t1.get$length(t1);
      },
      get$keys: function() {
        return this._collection$_map.get$keys();
      },
      toString$0: function(_) {
        return this._collection$_map.toString$0(0);
      },
      $isMap: 1
    },
    UnmodifiableMapView: {
      "^": "MapView0+_UnmodifiableMapMixin;$ti",
      $asMap: null,
      $isMap: 1
    },
    Maps_mapToString_closure: {
      "^": "Closure:2;_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);
      },
      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;
        $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;
        return t1[(this._head + index & t1.length - 1) >>> 0];
      },
      toList$1$growable: function(_, growable) {
        var t1, list, t2;
        t1 = this.$ti;
        if (growable) {
          list = H.setRuntimeTypeInfo([], t1);
          C.JSArray_methods.set$length(list, this.get$length(this));
        } else {
          t2 = new Array(this.get$length(this));
          t2.fixed$length = Array;
          list = H.setRuntimeTypeInfo(t2, t1);
        }
        this._writeToList$1(list);
        return list;
      },
      toList$0: function($receiver) {
        return this.toList$1$growable($receiver, true);
      },
      add$1: function(_, value) {
        this._add$1(value);
      },
      clear$0: function(_) {
        var i, t1, t2, t3;
        i = this._head;
        t1 = this._tail;
        if (i !== t1) {
          for (t2 = this._table, t3 = t2.length - 1; i !== t1; i = (i + 1 & t3) >>> 0)
            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, result;
        t1 = this._head;
        if (t1 === this._tail)
          throw H.wrapException(H.IterableElementError_noElement());
        ++this._modificationCount;
        t2 = this._table;
        result = t2[t1];
        t2[t1] = null;
        this._head = (t1 + 1 & t2.length - 1) >>> 0;
        return result;
      },
      _add$1: function(element) {
        var t1, t2;
        t1 = this._table;
        t2 = this._tail;
        t1[t2] = element;
        t1 = (t2 + 1 & t1.length - 1) >>> 0;
        this._tail = t1;
        if (this._head === t1)
          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;
      },
      _writeToList$1: function(target) {
        var t1, t2, t3, $length, firstPartSize;
        t1 = this._head;
        t2 = this._tail;
        t3 = this._table;
        if (t1 <= t2) {
          $length = t2 - t1;
          C.JSArray_methods.setRange$4(target, 0, $length, t3, t1);
          return $length;
        } else {
          firstPartSize = t3.length - t1;
          C.JSArray_methods.setRange$4(target, 0, firstPartSize, t3, t1);
          C.JSArray_methods.setRange$4(target, firstPartSize, firstPartSize + this._tail, this._table, 0);
          return this._tail + firstPartSize;
        }
      },
      ListQueue$1: function(initialCapacity, $E) {
        var t1 = new Array(8);
        t1.fixed$length = Array;
        this._table = H.setRuntimeTypeInfo(t1, [$E]);
      },
      $asEfficientLengthIterable: null,
      $asIterable: 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;
        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;
        this._collection$_current = t1[t2];
        this._collection$_position = (t2 + 1 & t1.length - 1) >>> 0;
        return true;
      }
    },
    SetMixin: {
      "^": "Object;$ti",
      get$isEmpty: function(_) {
        return this._collection$_length === 0;
      },
      addAll$1: function(_, elements) {
        var t1;
        for (t1 = J.get$iterator$ax(elements); t1.moveNext$0();)
          this.add$1(0, t1.get$current());
      },
      toList$1$growable: function(_, growable) {
        var result, t1, i, i0;
        result = H.setRuntimeTypeInfo([], this.$ti);
        C.JSArray_methods.set$length(result, this._collection$_length);
        for (t1 = new P._LinkedHashSetIterator(this, this._collection$_modifications, null, null), t1._collection$_cell = this._collection$_first, i = 0; t1.moveNext$0(); i = i0) {
          i0 = i + 1;
          result[i] = t1._collection$_current;
        }
        return result;
      },
      toList$0: function($receiver) {
        return this.toList$1$growable($receiver, true);
      },
      map$1: function(_, f) {
        return new H.EfficientLengthMappedIterable(this, f, [H.getTypeArgumentByIndex(this, 0), null]);
      },
      toString$0: function(_) {
        return P.IterableBase_iterableToFullString(this, "{", "}");
      },
      join$1: function(_, separator) {
        var iterator, t1;
        iterator = new P._LinkedHashSetIterator(this, this._collection$_modifications, null, null);
        iterator._collection$_cell = this._collection$_first;
        if (!iterator.moveNext$0())
          return "";
        if (separator === "") {
          t1 = "";
          do
            t1 += H.S(iterator._collection$_current);
          while (iterator.moveNext$0());
        } else {
          t1 = H.S(iterator._collection$_current);
          for (; iterator.moveNext$0();)
            t1 = t1 + separator + H.S(iterator._collection$_current);
        }
        return t1.charCodeAt(0) == 0 ? t1 : t1;
      },
      elementAt$1: function(_, index) {
        var t1, elementIndex, element;
        if (typeof index !== "number" || Math.floor(index) !== index)
          throw H.wrapException(P.ArgumentError$notNull("index"));
        if (index < 0)
          H.throwExpression(P.RangeError$range(index, 0, null, "index", null));
        for (t1 = new P._LinkedHashSetIterator(this, this._collection$_modifications, null, null), t1._collection$_cell = this._collection$_first, elementIndex = 0; t1.moveNext$0();) {
          element = t1._collection$_current;
          if (index === elementIndex)
            return element;
          ++elementIndex;
        }
        throw H.wrapException(P.IndexError$(index, this, "index", null, elementIndex));
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: null,
      $isIterable: 1,
      $asIterable: null
    },
    SetBase: {
      "^": "SetMixin;$ti"
    }
  }], ["dart.convert", "dart:convert",, P, {
    "^": "",
    _convertJsonToDartLazy: function(object) {
      var i;
      if (object == null)
        return;
      if (typeof object != "object")
        return object;
      if (Object.getPrototypeOf(object) !== Array.prototype)
        return new P._JsonMap(object, Object.create(null), null);
      for (i = 0; i < object.length; ++i)
        object[i] = P._convertJsonToDartLazy(object[i]);
      return object;
    },
    _parseJson: function(source, reviver) {
      var parsed, e, exception, t1;
      parsed = null;
      try {
        parsed = JSON.parse(source);
      } catch (exception) {
        t1 = H.unwrapException(exception);
        e = t1;
        throw H.wrapException(new P.FormatException(String(e), null, null));
      }
      return P._convertJsonToDartLazy(parsed);
    },
    _defaultToEncodable: [function(object) {
      return object.toJson$0();
    }, "call$1", "convert___defaultToEncodable$closure", 2, 0, 0, 28],
    _JsonMap: {
      "^": "Object;_original,_processed,_convert$_data",
      $index: function(_, key) {
        var t1, result;
        t1 = this._processed;
        if (t1 == null)
          return this._convert$_data.$index(0, key);
        else if (typeof key !== "string")
          return;
        else {
          result = t1[key];
          return typeof result == "undefined" ? this._process$1(key) : result;
        }
      },
      get$length: function(_) {
        var t1;
        if (this._processed == null) {
          t1 = this._convert$_data;
          t1 = t1.get$length(t1);
        } else
          t1 = this._convert$_computeKeys$0().length;
        return t1;
      },
      get$isEmpty: function(_) {
        var t1;
        if (this._processed == null) {
          t1 = this._convert$_data;
          t1 = t1.get$length(t1);
        } else
          t1 = this._convert$_computeKeys$0().length;
        return t1 === 0;
      },
      get$keys: function() {
        if (this._processed == null)
          return this._convert$_data.get$keys();
        return new P._JsonMapKeyIterable(this);
      },
      get$values: function(_) {
        var t1;
        if (this._processed == null) {
          t1 = this._convert$_data;
          return t1.get$values(t1);
        }
        return H.MappedIterable_MappedIterable(this._convert$_computeKeys$0(), new P._JsonMap_values_closure(this), null, null);
      },
      $indexSet: function(_, key, value) {
        var processed, original;
        if (this._processed == null)
          this._convert$_data.$indexSet(0, key, value);
        else if (this.containsKey$1(key)) {
          processed = this._processed;
          processed[key] = value;
          original = this._original;
          if (original == null ? processed != null : original !== processed)
            original[key] = null;
        } else
          this._upgrade$0().$indexSet(0, key, value);
      },
      containsKey$1: function(key) {
        if (this._processed == null)
          return this._convert$_data.containsKey$1(key);
        if (typeof key !== "string")
          return false;
        return Object.prototype.hasOwnProperty.call(this._original, key);
      },
      remove$1: function(_, key) {
        if (this._processed != null && !this.containsKey$1(key))
          return;
        return this._upgrade$0().remove$1(0, key);
      },
      clear$0: function(_) {
        var t1;
        if (this._processed == null)
          this._convert$_data.clear$0(0);
        else {
          t1 = this._convert$_data;
          if (t1 != null)
            J.clear$0$ax(t1);
          this._processed = null;
          this._original = null;
          this._convert$_data = P.LinkedHashMap__makeEmpty();
        }
      },
      forEach$1: function(_, f) {
        var keys, i, key, value;
        if (this._processed == null)
          return this._convert$_data.forEach$1(0, f);
        keys = this._convert$_computeKeys$0();
        for (i = 0; i < keys.length; ++i) {
          key = keys[i];
          value = this._processed[key];
          if (typeof value == "undefined") {
            value = P._convertJsonToDartLazy(this._original[key]);
            this._processed[key] = value;
          }
          f.call$2(key, value);
          if (keys !== this._convert$_data)
            throw H.wrapException(new P.ConcurrentModificationError(this));
        }
      },
      toString$0: function(_) {
        return P.Maps_mapToString(this);
      },
      _convert$_computeKeys$0: function() {
        var keys = this._convert$_data;
        if (keys == null) {
          keys = Object.keys(this._original);
          this._convert$_data = keys;
        }
        return keys;
      },
      _upgrade$0: function() {
        var result, keys, i, t1, key;
        if (this._processed == null)
          return this._convert$_data;
        result = P.LinkedHashMap__makeEmpty();
        keys = this._convert$_computeKeys$0();
        for (i = 0; t1 = keys.length, i < t1; ++i) {
          key = keys[i];
          result.$indexSet(0, key, this.$index(0, key));
        }
        if (t1 === 0)
          keys.push(null);
        else
          C.JSArray_methods.set$length(keys, 0);
        this._processed = null;
        this._original = null;
        this._convert$_data = result;
        return result;
      },
      _process$1: function(key) {
        var result;
        if (!Object.prototype.hasOwnProperty.call(this._original, key))
          return;
        result = P._convertJsonToDartLazy(this._original[key]);
        return this._processed[key] = result;
      },
      $isMap: 1,
      $asMap: Isolate.functionThatReturnsNull
    },
    _JsonMap_values_closure: {
      "^": "Closure:0;$this",
      call$1: [function(each) {
        return this.$this.$index(0, each);
      }, null, null, 2, 0, null, 22, "call"]
    },
    _JsonMapKeyIterable: {
      "^": "ListIterable;_convert$_parent",
      get$length: function(_) {
        var t1 = this._convert$_parent;
        if (t1._processed == null) {
          t1 = t1._convert$_data;
          t1 = t1.get$length(t1);
        } else
          t1 = t1._convert$_computeKeys$0().length;
        return t1;
      },
      elementAt$1: function(_, index) {
        var t1 = this._convert$_parent;
        return t1._processed == null ? t1.get$keys().elementAt$1(0, index) : t1._convert$_computeKeys$0()[index];
      },
      get$iterator: function(_) {
        var t1 = this._convert$_parent;
        if (t1._processed == null) {
          t1 = t1.get$keys();
          t1 = t1.get$iterator(t1);
        } else {
          t1 = t1._convert$_computeKeys$0();
          t1 = new J.ArrayIterator(t1, t1.length, 0, null);
        }
        return t1;
      },
      $asListIterable: Isolate.functionThatReturnsNull,
      $asEfficientLengthIterable: Isolate.functionThatReturnsNull,
      $asIterable: Isolate.functionThatReturnsNull
    },
    _UnicodeSubsetEncoder: {
      "^": "Converter;",
      convert$3: function(string, start, end) {
        var stringLength, $length, result, t1, t2, i, codeUnit;
        stringLength = string.length;
        P.RangeError_checkValidRange(start, end, stringLength, null, null, null);
        $length = stringLength - start;
        result = new Uint8Array(H._checkLength($length));
        for (t1 = ~this._subsetMask, t2 = J.getInterceptor$s(string), i = 0; i < $length; ++i) {
          codeUnit = t2.codeUnitAt$1(string, start + i);
          if ((codeUnit & t1) !== 0)
            throw H.wrapException(P.ArgumentError$("String contains invalid characters."));
          result[i] = codeUnit;
        }
        return result;
      },
      convert$1: function(string) {
        return this.convert$3(string, 0, null);
      },
      $asConverter: function() {
        return [P.String, [P.List, P.$int]];
      }
    },
    _UnicodeSubsetDecoder: {
      "^": "Converter;",
      convert$3: function(bytes, start, end) {
        var byteCount, t1, i, $byte;
        byteCount = bytes.length;
        P.RangeError_checkValidRange(start, end, byteCount, null, null, null);
        for (t1 = ~this._subsetMask, i = start; i < byteCount; ++i) {
          $byte = bytes[i];
          if (($byte & t1) !== 0) {
            if (!this._allowInvalid)
              throw H.wrapException(new P.FormatException("Invalid value in input: " + $byte, null, null));
            return this._convertInvalid$3(bytes, start, byteCount);
          }
        }
        return P.String_String$fromCharCodes(bytes, start, byteCount);
      },
      convert$1: function(bytes) {
        return this.convert$3(bytes, 0, null);
      },
      _convertInvalid$3: function(bytes, start, end) {
        var t1, i, t2, value;
        for (t1 = ~this._subsetMask, i = start, t2 = ""; i < end; ++i) {
          value = bytes[i];
          t2 += H.Primitives_stringFromCharCode((value & t1) !== 0 ? 65533 : value);
        }
        return t2.charCodeAt(0) == 0 ? t2 : t2;
      },
      $asConverter: function() {
        return [[P.List, P.$int], P.String];
      }
    },
    Codec: {
      "^": "Object;"
    },
    Converter: {
      "^": "Object;$ti"
    },
    Encoding: {
      "^": "Codec;"
    },
    JsonUnsupportedObjectError: {
      "^": "Error;unsupportedObject,cause",
      toString$0: function(_) {
        if (this.cause != null)
          return "Converting object to an encodable object failed.";
        else
          return "Converting object did not return an encodable object.";
      }
    },
    JsonCyclicError: {
      "^": "JsonUnsupportedObjectError;unsupportedObject,cause",
      toString$0: function(_) {
        return "Cyclic error in JSON stringify";
      }
    },
    JsonCodec: {
      "^": "Codec;_reviver,_toEncodable",
      decode$2$reviver: function(source, reviver) {
        return P._parseJson(source, this.get$decoder()._reviver);
      },
      decode$1: function(source) {
        return this.decode$2$reviver(source, null);
      },
      encode$2$toEncodable: function(value, toEncodable) {
        var t1 = this.get$encoder();
        return P._JsonStringStringifier_stringify(value, t1._toEncodable, t1.indent);
      },
      encode$1: function(value) {
        return this.encode$2$toEncodable(value, null);
      },
      get$encoder: function() {
        return C.JsonEncoder_null_null;
      },
      get$decoder: function() {
        return C.JsonDecoder_null;
      }
    },
    JsonEncoder: {
      "^": "Converter;indent,_toEncodable",
      $asConverter: function() {
        return [P.Object, P.String];
      }
    },
    JsonDecoder: {
      "^": "Converter;_reviver",
      $asConverter: function() {
        return [P.String, P.Object];
      }
    },
    _JsonStringifier: {
      "^": "Object;",
      writeStringContent$1: function(s) {
        var $length, t1, offset, i, charCode, t2;
        $length = s.length;
        for (t1 = J.getInterceptor$s(s), offset = 0, i = 0; i < $length; ++i) {
          charCode = t1.codeUnitAt$1(s, i);
          if (charCode > 92)
            continue;
          if (charCode < 32) {
            if (i > offset)
              this.writeStringSlice$3(s, offset, i);
            offset = i + 1;
            this.writeCharCode$1(92);
            switch (charCode) {
              case 8:
                this.writeCharCode$1(98);
                break;
              case 9:
                this.writeCharCode$1(116);
                break;
              case 10:
                this.writeCharCode$1(110);
                break;
              case 12:
                this.writeCharCode$1(102);
                break;
              case 13:
                this.writeCharCode$1(114);
                break;
              default:
                this.writeCharCode$1(117);
                this.writeCharCode$1(48);
                this.writeCharCode$1(48);
                t2 = charCode >>> 4 & 15;
                this.writeCharCode$1(t2 < 10 ? 48 + t2 : 87 + t2);
                t2 = charCode & 15;
                this.writeCharCode$1(t2 < 10 ? 48 + t2 : 87 + t2);
                break;
            }
          } else if (charCode === 34 || charCode === 92) {
            if (i > offset)
              this.writeStringSlice$3(s, offset, i);
            offset = i + 1;
            this.writeCharCode$1(92);
            this.writeCharCode$1(charCode);
          }
        }
        if (offset === 0)
          this.writeString$1(s);
        else if (offset < $length)
          this.writeStringSlice$3(s, offset, $length);
      },
      _checkCycle$1: function(object) {
        var t1, t2, i, t3;
        for (t1 = this._seen, t2 = t1.length, i = 0; i < t2; ++i) {
          t3 = t1[i];
          if (object == null ? t3 == null : object === t3)
            throw H.wrapException(new P.JsonCyclicError(object, null));
        }
        t1.push(object);
      },
      writeObject$1: function(object) {
        var customJson, e, exception, t1;
        if (this.writeJsonValue$1(object))
          return;
        this._checkCycle$1(object);
        try {
          customJson = this._toEncodable.call$1(object);
          if (!this.writeJsonValue$1(customJson))
            throw H.wrapException(new P.JsonUnsupportedObjectError(object, null));
          this._seen.pop();
        } catch (exception) {
          t1 = H.unwrapException(exception);
          e = t1;
          throw H.wrapException(new P.JsonUnsupportedObjectError(object, e));
        }
      },
      writeJsonValue$1: function(object) {
        var t1, success;
        if (typeof object === "number") {
          if (!isFinite(object))
            return false;
          this.writeNumber$1(object);
          return true;
        } else if (object === true) {
          this.writeString$1("true");
          return true;
        } else if (object === false) {
          this.writeString$1("false");
          return true;
        } else if (object == null) {
          this.writeString$1("null");
          return true;
        } else if (typeof object === "string") {
          this.writeString$1('"');
          this.writeStringContent$1(object);
          this.writeString$1('"');
          return true;
        } else {
          t1 = J.getInterceptor(object);
          if (!!t1.$isList) {
            this._checkCycle$1(object);
            this.writeList$1(object);
            this._seen.pop();
            return true;
          } else if (!!t1.$isMap) {
            this._checkCycle$1(object);
            success = this.writeMap$1(object);
            this._seen.pop();
            return success;
          } else
            return false;
        }
      },
      writeList$1: function(list) {
        var t1, i;
        this.writeString$1("[");
        t1 = J.getInterceptor$asx(list);
        if (t1.get$length(list) > 0) {
          this.writeObject$1(t1.$index(list, 0));
          for (i = 1; i < t1.get$length(list); ++i) {
            this.writeString$1(",");
            this.writeObject$1(t1.$index(list, i));
          }
        }
        this.writeString$1("]");
      },
      writeMap$1: function(map) {
        var t1, t2, keyValueList, separator, i;
        t1 = {};
        if (map.get$isEmpty(map)) {
          this.writeString$1("{}");
          return true;
        }
        t2 = map.get$length(map) * 2;
        keyValueList = new Array(t2);
        t1.i = 0;
        t1.allStringKeys = true;
        map.forEach$1(0, new P._JsonStringifier_writeMap_closure(t1, keyValueList));
        if (!t1.allStringKeys)
          return false;
        this.writeString$1("{");
        for (separator = '"', i = 0; i < t2; i += 2, separator = ',"') {
          this.writeString$1(separator);
          this.writeStringContent$1(keyValueList[i]);
          this.writeString$1('":');
          this.writeObject$1(keyValueList[i + 1]);
        }
        this.writeString$1("}");
        return true;
      }
    },
    _JsonStringifier_writeMap_closure: {
      "^": "Closure:2;_box_0,keyValueList",
      call$2: function(key, value) {
        var t1, t2, t3, i;
        if (typeof key !== "string")
          this._box_0.allStringKeys = false;
        t1 = this.keyValueList;
        t2 = this._box_0;
        t3 = t2.i;
        i = t3 + 1;
        t2.i = i;
        t1[t3] = key;
        t2.i = i + 1;
        t1[i] = value;
      }
    },
    _JsonStringStringifier: {
      "^": "_JsonStringifier;_sink,_seen,_toEncodable",
      writeNumber$1: function(number) {
        this._sink.write$1(C.JSNumber_methods.toString$0(number));
      },
      writeString$1: function(string) {
        this._sink.write$1(string);
      },
      writeStringSlice$3: function(string, start, end) {
        this._sink.write$1(J.substring$2$s(string, start, end));
      },
      writeCharCode$1: function(charCode) {
        this._sink.writeCharCode$1(charCode);
      },
      static: {
        _JsonStringStringifier_stringify: function(object, toEncodable, indent) {
          var output, t1;
          output = new P.StringBuffer("");
          P._JsonStringStringifier_printOn(object, output, toEncodable, indent);
          t1 = output._contents;
          return t1.charCodeAt(0) == 0 ? t1 : t1;
        },
        _JsonStringStringifier_printOn: function(object, output, toEncodable, indent) {
          var t1, stringifier;
          t1 = P.convert___defaultToEncodable$closure();
          stringifier = new P._JsonStringStringifier(output, [], t1);
          stringifier.writeObject$1(object);
        }
      }
    },
    Latin1Codec: {
      "^": "Encoding;_allowInvalid",
      decode$2$allowInvalid: function(bytes, allowInvalid) {
        return C.Latin1Decoder_false_255.convert$1(bytes);
      },
      decode$1: function(bytes) {
        return this.decode$2$allowInvalid(bytes, null);
      },
      get$encoder: function() {
        return C.Latin1Encoder_255;
      }
    },
    Latin1Encoder: {
      "^": "_UnicodeSubsetEncoder;_subsetMask"
    },
    Latin1Decoder: {
      "^": "_UnicodeSubsetDecoder;_allowInvalid,_subsetMask"
    }
  }], ["dart.core", "dart:core",, P, {
    "^": "",
    String__stringFromIterable: function(charCodes, start, end) {
      var t1, it, i, list;
      if (start < 0)
        throw H.wrapException(P.RangeError$range(start, 0, charCodes.length, null, null));
      t1 = end == null;
      if (!t1 && end < start)
        throw H.wrapException(P.RangeError$range(end, start, charCodes.length, null, null));
      it = J.get$iterator$ax(charCodes);
      for (i = 0; i < start; ++i)
        if (!it.moveNext$0())
          throw H.wrapException(P.RangeError$range(start, 0, i, null, null));
      list = [];
      if (t1)
        for (; it.moveNext$0();)
          list.push(it.get$current());
      else
        for (i = start; i < end; ++i) {
          if (!it.moveNext$0())
            throw H.wrapException(P.RangeError$range(end, start, i, null, null));
          list.push(it.get$current());
        }
      return H.Primitives_stringFromCharCodes(list);
    },
    Comparable_compare: [function(a, b) {
      return J.compareTo$1$ns(a, b);
    }, "call$2", "core_Comparable_compare$closure", 4, 0, 91],
    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());
      if (growable)
        return list;
      list.fixed$length = Array;
      return list;
    },
    num_parse: function(input, onError) {
      var source, result;
      source = C.JSString_methods.trim$0(input);
      result = H.Primitives_parseInt(source, null, P.core_num__returnIntNull$closure());
      if (result != null)
        return result;
      result = H.Primitives_parseDouble(source, P.core_num__returnDoubleNull$closure());
      if (result != null)
        return result;
      throw H.wrapException(new P.FormatException(input, null, null));
    },
    num__returnIntNull: [function(_) {
      return;
    }, "call$1", "core_num__returnIntNull$closure", 2, 0, 92],
    num__returnDoubleNull: [function(_) {
      return;
    }, "call$1", "core_num__returnDoubleNull$closure", 2, 0, 93],
    print: function(object) {
      var line, t1;
      line = H.S(object);
      t1 = $.printToZone;
      if (t1 == null)
        H.printString(line);
      else
        t1.call$1(line);
    },
    RegExp_RegExp: function(source, caseSensitive, multiLine) {
      return new H.JSSyntaxRegExp(source, H.JSSyntaxRegExp_makeNative(source, false, caseSensitive, false), null, null);
    },
    String_String$fromCharCodes: function(charCodes, start, end) {
      var len;
      if (charCodes.constructor === Array) {
        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);
      }
      if (!!J.getInterceptor(charCodes).$isNativeUint8List)
        return H.Primitives_stringFromNativeUint8List(charCodes, start, P.RangeError_checkValidRange(start, end, charCodes.length, null, null, null));
      return P.String__stringFromIterable(charCodes, start, end);
    },
    NoSuchMethodError_toString_closure: {
      "^": "Closure:73;_box_0,sb",
      call$2: function(key, value) {
        var t1, t2, t3;
        t1 = this.sb;
        t2 = this._box_0;
        t1._contents += t2.comma;
        t3 = t1._contents += H.S(key.__internal$_name);
        t1._contents = t3 + ": ";
        t1._contents += H.S(P.Error_safeToString(value));
        t2.comma = ", ";
      }
    },
    bool: {
      "^": "Object;"
    },
    "+bool": 0,
    Comparable: {
      "^": "Object;"
    },
    DateTime: {
      "^": "Object;_value,isUtc",
      $eq: function(_, other) {
        if (other == null)
          return false;
        if (!(other instanceof P.DateTime))
          return false;
        return this._value === other._value && this.isUtc === other.isUtc;
      },
      compareTo$1: function(_, other) {
        return C.JSInt_methods.compareTo$1(this._value, other._value);
      },
      get$hashCode: function(_) {
        var t1 = this._value;
        return (t1 ^ C.JSInt_methods._shrOtherPositive$1(t1, 30)) & 1073741823;
      },
      toString$0: function(_) {
        var t1, y, m, d, h, min, sec, ms;
        t1 = this.isUtc;
        y = P.DateTime__fourDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCFullYear() + 0 : H.Primitives_lazyAsJsDate(this).getFullYear() + 0);
        m = P.DateTime__twoDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCMonth() + 1 : H.Primitives_lazyAsJsDate(this).getMonth() + 1);
        d = P.DateTime__twoDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCDate() + 0 : H.Primitives_lazyAsJsDate(this).getDate() + 0);
        h = P.DateTime__twoDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCHours() + 0 : H.Primitives_lazyAsJsDate(this).getHours() + 0);
        min = P.DateTime__twoDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCMinutes() + 0 : H.Primitives_lazyAsJsDate(this).getMinutes() + 0);
        sec = P.DateTime__twoDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCSeconds() + 0 : H.Primitives_lazyAsJsDate(this).getSeconds() + 0);
        ms = P.DateTime__threeDigits(t1 ? H.Primitives_lazyAsJsDate(this).getUTCMilliseconds() + 0 : H.Primitives_lazyAsJsDate(this).getMilliseconds() + 0);
        if (t1)
          return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms + "Z";
        else
          return y + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms;
      },
      add$1: function(_, duration) {
        return P.DateTime$_withValue(C.JSInt_methods.$add(this._value, duration.get$inMilliseconds()), this.isUtc);
      },
      get$millisecondsSinceEpoch: function() {
        return this._value;
      },
      DateTime$_withValue$2$isUtc: function(_value, isUtc) {
        var t1 = Math.abs(this._value);
        if (!(t1 > 864e13)) {
          t1 === 864e13;
          t1 = false;
        } else
          t1 = true;
        if (t1)
          throw H.wrapException(P.ArgumentError$(this.get$millisecondsSinceEpoch()));
      },
      $isComparable: 1,
      $asComparable: function() {
        return [P.DateTime];
      },
      static: {
        DateTime$_withValue: function(_value, isUtc) {
          var t1 = new P.DateTime(_value, isUtc);
          t1.DateTime$_withValue$2$isUtc(_value, isUtc);
          return t1;
        },
        DateTime__fourDigits: function(n) {
          var absN, sign;
          absN = Math.abs(n);
          sign = n < 0 ? "-" : "";
          if (absN >= 1000)
            return "" + n;
          if (absN >= 100)
            return sign + "0" + H.S(absN);
          if (absN >= 10)
            return sign + "00" + H.S(absN);
          return sign + "000" + H.S(absN);
        },
        DateTime__threeDigits: function(n) {
          if (n >= 100)
            return "" + n;
          if (n >= 10)
            return "0" + n;
          return "00" + n;
        },
        DateTime__twoDigits: function(n) {
          if (n >= 10)
            return "" + n;
          return "0" + n;
        }
      }
    },
    $double: {
      "^": "num;",
      $isComparable: 1,
      $asComparable: function() {
        return [P.num];
      }
    },
    "+double": 0,
    Duration: {
      "^": "Object;_duration",
      $add: function(_, other) {
        return new P.Duration(this._duration + other._duration);
      },
      $sub: function(_, other) {
        return new P.Duration(this._duration - other._duration);
      },
      $mul: function(_, factor) {
        return new P.Duration(C.JSNumber_methods.round$0(this._duration * factor));
      },
      $tdiv: function(_, quotient) {
        return new P.Duration(C.JSInt_methods.$tdiv(this._duration, quotient));
      },
      $lt: function(_, other) {
        return C.JSInt_methods.$lt(this._duration, other.get$_duration());
      },
      $gt: function(_, other) {
        return C.JSInt_methods.$gt(this._duration, other.get$_duration());
      },
      $le: function(_, other) {
        return C.JSInt_methods.$le(this._duration, other.get$_duration());
      },
      $ge: function(_, other) {
        return C.JSInt_methods.$ge(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;
      },
      compareTo$1: function(_, other) {
        return C.JSInt_methods.compareTo$1(this._duration, other._duration);
      },
      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(-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);
      },
      abs$0: function(_) {
        return new P.Duration(Math.abs(this._duration));
      },
      $negate: function(_) {
        return new P.Duration(-this._duration);
      },
      $isComparable: 1,
      $asComparable: function() {
        return [P.Duration];
      },
      static: {
        Duration$: function(days, hours, microseconds, milliseconds, minutes, seconds) {
          return new P.Duration(864e8 * days + 3600000000 * hours + 60000000 * minutes + 1000000 * seconds + 1000 * milliseconds + microseconds);
        }
      }
    },
    Duration_toString_sixDigits: {
      "^": "Closure:37;",
      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:37;",
      call$1: function(n) {
        if (n >= 10)
          return "" + n;
        return "0" + n;
      }
    },
    Error: {
      "^": "Object;",
      static: {
        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);
        }
      }
    },
    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 ? " (" + H.S(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);
        },
        ArgumentError$notNull: function($name) {
          return new P.ArgumentError(false, null, $name, "Must not be null");
        }
      }
    },
    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$: function(message) {
          return new P.RangeError(null, null, false, null, null, message);
        },
        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_checkValueInInterval: function(value, minValue, maxValue, $name, message) {
          if (value < minValue || value > maxValue)
            throw H.wrapException(P.RangeError$range(value, minValue, maxValue, $name, message));
        },
        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");
        }
      }
    },
    NoSuchMethodError: {
      "^": "Error;_core$_receiver,_memberName,_core$_arguments,_namedArguments,_existingArgumentNames",
      toString$0: function(_) {
        var t1, sb, t2, t3, _i, argument, receiverText, actualParameters;
        t1 = {};
        sb = new P.StringBuffer("");
        t1.comma = "";
        for (t2 = this._core$_arguments, t3 = t2.length, _i = 0; _i < t3; ++_i) {
          argument = t2[_i];
          sb._contents += t1.comma;
          sb._contents += H.S(P.Error_safeToString(argument));
          t1.comma = ", ";
        }
        this._namedArguments.forEach$1(0, new P.NoSuchMethodError_toString_closure(t1, sb));
        receiverText = P.Error_safeToString(this._core$_receiver);
        actualParameters = sb.toString$0(0);
        return "NoSuchMethodError: method not found: '" + H.S(this._memberName.__internal$_name) + "'\nReceiver: " + H.S(receiverText) + "\nArguments: [" + actualParameters + "]";
      },
      static: {
        NoSuchMethodError$: function(receiver, memberName, positionalArguments, namedArguments, existingArgumentNames) {
          return new P.NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments, existingArgumentNames);
        }
      }
    },
    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: " + H.S(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)) + ".";
      }
    },
    OutOfMemoryError: {
      "^": "Object;",
      toString$0: function(_) {
        return "Out of Memory";
      },
      $isError: 1
    },
    StackOverflowError: {
      "^": "Object;",
      toString$0: function(_) {
        return "Stack Overflow";
      },
      $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, offset, source, lineNum, lineStart, lastWasCR, i, $char, lineEnd, end, start, prefix, postfix, slice;
        t1 = this.message;
        report = t1 != null && "" !== t1 ? "FormatException: " + H.S(t1) : "FormatException";
        offset = this.offset;
        source = this.source;
        if (typeof source !== "string")
          return offset != null ? report + (" (at offset " + H.S(offset) + ")") : report;
        if (offset != null)
          t1 = offset > source.length;
        else
          t1 = false;
        if (t1)
          offset = null;
        if (offset == null) {
          if (source.length > 78)
            source = J.substring$2$s(source, 0, 75) + "...";
          return report + "\n" + H.S(source);
        }
        for (t1 = J.getInterceptor$s(source), lineNum = 1, lineStart = 0, lastWasCR = null, i = 0; i < offset; ++i) {
          $char = t1.codeUnitAt$1(source, i);
          if ($char === 10) {
            if (lineStart !== i || !lastWasCR)
              ++lineNum;
            lineStart = i + 1;
            lastWasCR = false;
          } else if ($char === 13) {
            ++lineNum;
            lineStart = i + 1;
            lastWasCR = true;
          }
        }
        report = lineNum > 1 ? report + (" (at line " + lineNum + ", character " + (offset - lineStart + 1) + ")\n") : report + (" (at character " + (offset + 1) + ")\n");
        lineEnd = source.length;
        for (i = offset; i < source.length; ++i) {
          $char = t1.codeUnitAt$1(source, i);
          if ($char === 10 || $char === 13) {
            lineEnd = i;
            break;
          }
        }
        if (lineEnd - lineStart > 78)
          if (offset - lineStart < 75) {
            end = lineStart + 75;
            start = lineStart;
            prefix = "";
            postfix = "...";
          } else {
            if (lineEnd - offset < 75) {
              start = lineEnd - 75;
              end = lineEnd;
              postfix = "";
            } else {
              start = offset - 36;
              end = offset + 36;
              postfix = "...";
            }
            prefix = "...";
          }
        else {
          end = lineEnd;
          start = lineStart;
          prefix = "";
          postfix = "";
        }
        slice = t1.substring$2(source, start, end);
        return report + prefix + slice + postfix + "\n" + C.JSString_methods.$mul(" ", offset - start + prefix.length) + "^\n";
      }
    },
    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);
        }
      }
    },
    Function: {
      "^": "Object;"
    },
    $int: {
      "^": "num;",
      $isComparable: 1,
      $asComparable: function() {
        return [P.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)]);
      }],
      contains$1: function(_, element) {
        var t1;
        for (t1 = this.get$iterator(this); t1.moveNext$0();)
          if (J.$eq$(t1.get$current(), element))
            return true;
        return false;
      },
      join$1: function(_, separator) {
        var iterator, t1;
        iterator = this.get$iterator(this);
        if (!iterator.moveNext$0())
          return "";
        if (separator === "") {
          t1 = "";
          do
            t1 += H.S(iterator.get$current());
          while (iterator.moveNext$0());
        } else {
          t1 = H.S(iterator.get$current());
          for (; iterator.moveNext$0();)
            t1 = t1 + separator + H.S(iterator.get$current());
        }
        return t1.charCodeAt(0) == 0 ? t1 : t1;
      },
      toList$1$growable: function(_, growable) {
        return P.List_List$from(this, growable, 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$isEmpty: function(_) {
        return !this.get$iterator(this).moveNext$0();
      },
      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;
      },
      firstWhere$2$orElse: function(_, test, orElse) {
        var t1, element;
        for (t1 = this.get$iterator(this); t1.moveNext$0();) {
          element = t1.get$current();
          if (test.call$1(element))
            return element;
        }
        return orElse.call$0();
      },
      elementAt$1: function(_, index) {
        var t1, elementIndex, element;
        if (typeof index !== "number" || Math.floor(index) !== index)
          throw H.wrapException(P.ArgumentError$notNull("index"));
        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, "(", ")");
      },
      $asIterable: null
    },
    Iterator: {
      "^": "Object;"
    },
    List: {
      "^": "Object;$ti",
      $asList: null,
      $isIterable: 1,
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: null
    },
    "+List": 0,
    Map: {
      "^": "Object;$ti"
    },
    Null: {
      "^": "Object;",
      get$hashCode: function(_) {
        return P.Object.prototype.get$hashCode.call(this, this);
      },
      toString$0: function(_) {
        return "null";
      }
    },
    "+Null": 0,
    num: {
      "^": "Object;",
      $isComparable: 1,
      $asComparable: function() {
        return [P.num];
      }
    },
    "+num": 0,
    Object: {
      "^": ";",
      $eq: function(_, other) {
        return this === other;
      },
      get$hashCode: function(_) {
        return H.Primitives_objectHashCode(this);
      },
      toString$0: ["super$Object$toString", function(_) {
        return H.Primitives_objectToHumanReadableString(this);
      }],
      noSuchMethod$1: function(_, invocation) {
        throw H.wrapException(P.NoSuchMethodError$(this, invocation.get$memberName(), invocation.get$positionalArguments(), invocation.get$namedArguments(), null));
      },
      toString: function() {
        return this.toString$0(this);
      }
    },
    Match: {
      "^": "Object;"
    },
    StackTrace: {
      "^": "Object;"
    },
    Stopwatch: {
      "^": "Object;_core$_start,_stop"
    },
    String: {
      "^": "Object;",
      $isComparable: 1,
      $asComparable: function() {
        return [P.String];
      },
      $isPattern: 1
    },
    "+String": 0,
    StringBuffer: {
      "^": "Object;_contents@",
      get$length: function(_) {
        return this._contents.length;
      },
      get$isEmpty: function(_) {
        return this._contents.length === 0;
      },
      write$1: function(obj) {
        this._contents += H.S(obj);
      },
      writeCharCode$1: function(charCode) {
        this._contents += H.Primitives_stringFromCharCode(charCode);
      },
      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;
        }
      }
    },
    Symbol0: {
      "^": "Object;"
    }
  }], ["dart.dom.html", "dart:html",, W, {
    "^": "",
    window: function() {
      return window;
    },
    AnchorElement_AnchorElement: function(href) {
      var t1, e;
      t1 = document;
      e = t1.createElement("a");
      return e;
    },
    AudioElement_AudioElement$_: function(src) {
      return new Audio();
    },
    AudioElement_AudioElement: function(src) {
      return W.AudioElement_AudioElement$_(src);
    },
    CanvasElement_CanvasElement: function(height, width) {
      var t1, e;
      t1 = document;
      e = t1.createElement("canvas");
      if (width != null)
        e.width = width;
      if (height != null)
        e.height = height;
      return e;
    },
    CssStyleDeclaration__camelCase: function(hyphenated) {
      return hyphenated.replace(/^-ms-/, "ms-").replace(/-([\da-z])/ig, C.JS_CONST_s8I);
    },
    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.closure0(), [W.Node]);
      return t1.get$single(t1);
    },
    Element__determineMouseWheelEventType: [function(e) {
      return "wheel";
    }, "call$1", "html_Element__determineMouseWheelEventType$closure", 2, 0, 94, 3],
    Element__offsetToHelper: function(current, $parent) {
      var sameAsParent, foundAsParent, p;
      sameAsParent = current == null ? $parent == null : current === $parent;
      foundAsParent = sameAsParent || $parent.tagName === "HTML";
      if (current == null || sameAsParent) {
        if (foundAsParent)
          return new P.Point(0, 0, [null]);
        throw H.wrapException(P.ArgumentError$("Specified element is not a transitive offset parent of this element."));
      }
      p = W.Element__offsetToHelper(current.offsetParent, $parent);
      return new P.Point(J.$add$ns(p.x, C.JSNumber_methods.round$0(current.offsetLeft)), J.$add$ns(p.y, C.JSNumber_methods.round$0(current.offsetTop)), [null]);
    },
    Element__safeTagName: function(element) {
      var result, t1, t2, exception;
      result = "element tag unavailable";
      try {
        t1 = J.getInterceptor$x(element);
        t2 = t1.get$tagName(element);
        if (typeof t2 === "string")
          result = t1.get$tagName(element);
      } catch (exception) {
        H.unwrapException(exception);
      }
      return result;
    },
    _ElementFactoryProvider_createElement_tag: function(tag, typeExtension) {
      return document.createElement(tag);
    },
    HttpRequest_request: function(url, method, mimeType, onProgress, requestHeaders, responseType, sendData, withCredentials) {
      var t1, t2, completer, xhr;
      t1 = W.HttpRequest;
      t2 = new P._Future(0, $.Zone__current, null, [t1]);
      completer = new P._AsyncCompleter(t2, [t1]);
      xhr = new XMLHttpRequest();
      C.HttpRequest_methods.open$3$async(xhr, "GET", url, true);
      if (responseType != null)
        xhr.responseType = responseType;
      if (onProgress != null)
        W._EventStreamSubscription$(xhr, "progress", onProgress, false, W.ProgressEvent);
      t1 = W.ProgressEvent;
      W._EventStreamSubscription$(xhr, "load", new W.HttpRequest_request_closure(completer, xhr), false, t1);
      W._EventStreamSubscription$(xhr, "error", completer.get$completeError(), false, t1);
      xhr.send();
      return t2;
    },
    ImageElement_ImageElement: function(height, src, width) {
      var t1, e;
      t1 = document;
      e = t1.createElement("img");
      return e;
    },
    WebSocket_WebSocket: function(url, protocols) {
      return new WebSocket(url);
    },
    _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;
    },
    _convertNativeToDart_XHR_Response: function(o) {
      var t1;
      if (!!J.getInterceptor(o).$isDocument)
        return o;
      t1 = new P._AcceptStructuredCloneDart2Js([], [], false);
      t1.mustCopy = true;
      return t1.walk$1(o);
    },
    _wrapZone: function(callback) {
      var t1 = $.Zone__current;
      if (t1 === C.C__RootZone)
        return callback;
      return t1.bindUnaryCallback$2$runGuarded(callback, true);
    },
    HtmlElement: {
      "^": "Element;",
      "%": "HTMLAppletElement|HTMLBRElement|HTMLButtonElement|HTMLContentElement|HTMLDListElement|HTMLDataListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLFieldSetElement|HTMLFontElement|HTMLFrameElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLKeygenElement|HTMLLIElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMarqueeElement|HTMLMenuElement|HTMLMenuItemElement|HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLOptGroupElement|HTMLOptionElement|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPictureElement|HTMLPreElement|HTMLProgressElement|HTMLQuoteElement|HTMLScriptElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableHeaderCellElement|HTMLTextAreaElement|HTMLTitleElement|HTMLTrackElement|HTMLUListElement|HTMLUnknownElement|PluginPlaceholderElement;HTMLElement"
    },
    AnchorElement: {
      "^": "HtmlElement;target=",
      toString$0: function(receiver) {
        return String(receiver);
      },
      $isInterceptor: 1,
      "%": "HTMLAnchorElement"
    },
    ApplicationCacheErrorEvent: {
      "^": "Event;url=",
      "%": "ApplicationCacheErrorEvent"
    },
    AreaElement: {
      "^": "HtmlElement;target=",
      toString$0: function(receiver) {
        return String(receiver);
      },
      $isInterceptor: 1,
      "%": "HTMLAreaElement"
    },
    AudioElement: {
      "^": "MediaElement;",
      $isAudioElement: 1,
      $isElement: 1,
      $isNode: 1,
      $isEventTarget: 1,
      $isObject: 1,
      "%": "HTMLAudioElement"
    },
    BaseElement: {
      "^": "HtmlElement;target=",
      "%": "HTMLBaseElement"
    },
    Blob: {
      "^": "Interceptor;",
      $isBlob: 1,
      "%": ";Blob"
    },
    BodyElement: {
      "^": "HtmlElement;",
      $isBodyElement: 1,
      $isEventTarget: 1,
      $isInterceptor: 1,
      "%": "HTMLBodyElement"
    },
    CanvasElement: {
      "^": "HtmlElement;height=,width=",
      getContext$2: function(receiver, contextId, attributes) {
        if (attributes != null)
          return receiver.getContext(contextId, P.convertDartToNative_Dictionary(attributes, null));
        return receiver.getContext(contextId);
      },
      getContext$1: function($receiver, contextId) {
        return this.getContext$2($receiver, contextId, null);
      },
      get$context2D: function(receiver) {
        return receiver.getContext("2d");
      },
      getContext3d$6$alpha$antialias$depth$premultipliedAlpha$preserveDrawingBuffer$stencil: function(receiver, alpha, antialias, depth, premultipliedAlpha, preserveDrawingBuffer, stencil) {
        var options, context;
        options = P.LinkedHashMap__makeLiteral(["alpha", false, "depth", false, "stencil", true, "antialias", false, "premultipliedAlpha", true, "preserveDrawingBuffer", false]);
        context = this.getContext$2(receiver, "webgl", options);
        return context == null ? this.getContext$2(receiver, "experimental-webgl", options) : context;
      },
      $isCanvasElement: 1,
      "%": "HTMLCanvasElement"
    },
    CanvasRenderingContext2D: {
      "^": "Interceptor;",
      putImageData$7: function(receiver, imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) {
        receiver.putImageData(P.convertDartToNative_ImageData(imagedata), dx, dy);
        return;
      },
      putImageData$3: function($receiver, imagedata, dx, dy) {
        return this.putImageData$7($receiver, imagedata, dx, dy, null, null, null, null);
      },
      translate$2: function(receiver, x, y) {
        return receiver.translate(x, y);
      },
      "%": "CanvasRenderingContext2D"
    },
    CharacterData: {
      "^": "Node;data=,length=",
      $isInterceptor: 1,
      "%": "CDATASection|Comment|Text;CharacterData"
    },
    CompositionEvent: {
      "^": "UIEvent;data=",
      "%": "CompositionEvent"
    },
    CrossOriginServiceWorkerClient: {
      "^": "EventTarget;",
      postMessage$2: function(receiver, message, transfer) {
        receiver.postMessage(new P._StructuredCloneDart2Js([], []).walk$1(message), transfer);
        return;
      },
      "%": "CrossOriginServiceWorkerClient"
    },
    CssFontFaceRule: {
      "^": "CssRule;style=",
      "%": "CSSFontFaceRule"
    },
    CssGroupingRule: {
      "^": "CssRule;cssRules=",
      deleteRule$1: function(receiver, index) {
        return receiver.deleteRule(index);
      },
      insertRule$2: function(receiver, rule, index) {
        return receiver.insertRule(rule, index);
      },
      "%": "CSSGroupingRule|CSSMediaRule"
    },
    CssKeyframeRule: {
      "^": "CssRule;style=",
      "%": "CSSKeyframeRule|MozCSSKeyframeRule|WebKitCSSKeyframeRule"
    },
    CssKeyframesRule: {
      "^": "CssRule;cssRules=",
      deleteRule$1: function(receiver, select) {
        return receiver.deleteRule(select);
      },
      "%": "CSSKeyframesRule|MozCSSKeyframesRule|WebKitCSSKeyframesRule"
    },
    CssPageRule: {
      "^": "CssRule;style=",
      "%": "CSSPageRule"
    },
    CssRule: {
      "^": "Interceptor;",
      $isObject: 1,
      "%": "CSSCharsetRule|CSSImportRule;CSSRule"
    },
    CssStyleDeclaration: {
      "^": "Interceptor_CssStyleDeclarationBase;length=",
      getPropertyValue$1: function(receiver, propertyName) {
        var propValue = this._getPropertyValueHelper$1(receiver, propertyName);
        return propValue != null ? propValue : "";
      },
      _getPropertyValueHelper$1: function(receiver, propertyName) {
        if (W.CssStyleDeclaration__camelCase(propertyName) in receiver)
          return receiver.getPropertyValue(propertyName);
        else
          return receiver.getPropertyValue(C.JSString_methods.$add(P.Device_cssPrefix(), propertyName));
      },
      setProperty$3: function(receiver, propertyName, value, priority) {
        var t1 = this._browserPropertyName$1(receiver, propertyName);
        if (value == null)
          value = "";
        if (priority == null)
          priority = "";
        receiver.setProperty(t1, value, priority);
        return;
      },
      _browserPropertyName$1: function(receiver, propertyName) {
        var t1, $name;
        t1 = $.$get$CssStyleDeclaration__propertyCache();
        $name = t1[propertyName];
        if (typeof $name === "string")
          return $name;
        $name = W.CssStyleDeclaration__camelCase(propertyName) in receiver ? propertyName : P.Device_cssPrefix() + propertyName;
        t1[propertyName] = $name;
        return $name;
      },
      get$height: function(receiver) {
        return receiver.height;
      },
      get$width: function(receiver) {
        return receiver.width;
      },
      "%": "CSS2Properties|CSSStyleDeclaration|MSStyleCSSProperties"
    },
    Interceptor_CssStyleDeclarationBase: {
      "^": "Interceptor+CssStyleDeclarationBase;"
    },
    _CssStyleDeclarationSet: {
      "^": "Object_CssStyleDeclarationBase;_elementIterable,_elementCssStyleDeclarationSetIterable",
      getPropertyValue$1: function(_, propertyName) {
        var t1 = this._elementCssStyleDeclarationSetIterable;
        return J.getPropertyValue$1$x(t1.get$first(t1), propertyName);
      },
      setProperty$3: function(_, propertyName, value, priority) {
        this._elementCssStyleDeclarationSetIterable.forEach$1(0, new W._CssStyleDeclarationSet_setProperty_closure(propertyName, value, priority));
      },
      _CssStyleDeclarationSet$1: function(_elementIterable) {
        this._elementCssStyleDeclarationSetIterable = new H.MappedListIterable(P.List_List$from(this._elementIterable, true, null), new W._CssStyleDeclarationSet_closure(), [null, null]);
      },
      static: {
        _CssStyleDeclarationSet$: function(_elementIterable) {
          var t1 = new W._CssStyleDeclarationSet(_elementIterable, null);
          t1._CssStyleDeclarationSet$1(_elementIterable);
          return t1;
        }
      }
    },
    Object_CssStyleDeclarationBase: {
      "^": "Object+CssStyleDeclarationBase;"
    },
    _CssStyleDeclarationSet_closure: {
      "^": "Closure:0;",
      call$1: [function(e) {
        return J.get$style$x(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    _CssStyleDeclarationSet_setProperty_closure: {
      "^": "Closure:0;propertyName,value,priority",
      call$1: function(e) {
        return J.setProperty$3$x(e, this.propertyName, this.value, this.priority);
      }
    },
    CssStyleDeclarationBase: {
      "^": "Object;",
      set$appearance: function(receiver, value) {
        this.setProperty$3(receiver, "appearance", value, "");
      },
      get$height: function(receiver) {
        return this.getPropertyValue$1(receiver, "height");
      },
      get$mask: function(receiver) {
        return this.getPropertyValue$1(receiver, "mask");
      },
      get$width: function(receiver) {
        return this.getPropertyValue$1(receiver, "width");
      }
    },
    CssStyleRule: {
      "^": "CssRule;style=",
      $isCssStyleRule: 1,
      "%": "CSSStyleRule"
    },
    CssStyleSheet: {
      "^": "StyleSheet;cssRules=",
      deleteRule$1: function(receiver, index) {
        return receiver.deleteRule(index);
      },
      insertRule$2: function(receiver, rule, index) {
        return receiver.insertRule(rule, index);
      },
      removeRule$1: function(receiver, index) {
        return receiver.removeRule(index);
      },
      $isCssStyleSheet: 1,
      "%": "CSSStyleSheet"
    },
    CssSupportsRule: {
      "^": "CssRule;cssRules=",
      deleteRule$1: function(receiver, index) {
        return receiver.deleteRule(index);
      },
      insertRule$2: function(receiver, rule, index) {
        return receiver.insertRule(rule, index);
      },
      "%": "CSSSupportsRule"
    },
    CssViewportRule: {
      "^": "CssRule;style=",
      "%": "CSSViewportRule"
    },
    Document: {
      "^": "Node;",
      querySelectorAll$1: function(receiver, selectors) {
        return new W._FrozenElementList(receiver.querySelectorAll(selectors), [null]);
      },
      $isDocument: 1,
      "%": "XMLDocument;Document"
    },
    DocumentFragment: {
      "^": "Node;",
      get$innerHtml: function(receiver) {
        var t1 = W._ElementFactoryProvider_createElement_tag("div", null);
        t1.appendChild(this.clone$1(receiver, true));
        return J.get$innerHtml$x(t1);
      },
      set$innerHtml: function(receiver, value) {
        var t1;
        this._clearChildren$0(receiver);
        t1 = document.body;
        receiver.appendChild((t1 && C.BodyElement_methods).createFragment$3$treeSanitizer$validator(t1, value, null, null));
      },
      $isInterceptor: 1,
      "%": ";DocumentFragment"
    },
    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;
      },
      get$x: function(receiver) {
        return receiver.x;
      },
      get$y: function(receiver) {
        return receiver.y;
      },
      $isRectangle: 1,
      $asRectangle: Isolate.functionThatReturnsNull,
      "%": ";DOMRectReadOnly"
    },
    DomTokenList: {
      "^": "Interceptor;length=",
      add$1: function(receiver, tokens) {
        return receiver.add(tokens);
      },
      "%": "DOMSettableTokenList|DOMTokenList"
    },
    _ChildrenElementList: {
      "^": "ListBase;_html$_element<,_childElements",
      get$isEmpty: function(_) {
        return this._html$_element.firstElementChild == null;
      },
      get$length: function(_) {
        return this._childElements.length;
      },
      $index: function(_, index) {
        return this._childElements[index];
      },
      $indexSet: function(_, index, value) {
        this._html$_element.replaceChild(value, this._childElements[index]);
      },
      set$length: function(_, newLength) {
        throw H.wrapException(new P.UnsupportedError("Cannot resize element lists"));
      },
      add$1: function(_, value) {
        this._html$_element.appendChild(value);
        return value;
      },
      get$iterator: function(_) {
        var t1 = this.toList$0(this);
        return new J.ArrayIterator(t1, t1.length, 0, null);
      },
      addAll$1: function(_, iterable) {
        var t1, t2;
        for (t1 = iterable.get$iterator(iterable), t2 = this._html$_element; t1.moveNext$0();)
          t2.appendChild(t1.__interceptors$_current);
      },
      setRange$4: function(_, start, end, iterable, skipCount) {
        throw H.wrapException(new P.UnimplementedError(null));
      },
      setRange$3: function($receiver, start, end, iterable) {
        return this.setRange$4($receiver, start, end, iterable, 0);
      },
      remove$1: function(_, object) {
        return false;
      },
      $asListBase: function() {
        return [W.Element];
      },
      $asList: function() {
        return [W.Element];
      },
      $asEfficientLengthIterable: function() {
        return [W.Element];
      },
      $asIterable: function() {
        return [W.Element];
      }
    },
    _FrozenElementList: {
      "^": "ListBase;_nodeList,$ti",
      get$length: function(_) {
        return this._nodeList.length;
      },
      $index: function(_, index) {
        return this._nodeList[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"));
      },
      get$style: function(_) {
        return W._CssStyleDeclarationSet$(this);
      },
      $isList: 1,
      $asList: null,
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: null,
      $isIterable: 1,
      $asIterable: null
    },
    Element: {
      "^": "Node;offsetParent=,style=,tabIndex},id},tagName=",
      get$attributes: function(receiver) {
        return new W._ElementAttributeMap(receiver);
      },
      get$children: function(receiver) {
        return new W._ChildrenElementList(receiver, receiver.children);
      },
      querySelectorAll$1: function(receiver, selectors) {
        return new W._FrozenElementList(receiver.querySelectorAll(selectors), [null]);
      },
      get$classes: function(receiver) {
        return new W._ElementCssClassSet(receiver);
      },
      getComputedStyle$1: function(receiver, pseudoElement) {
        return window.getComputedStyle(receiver, "");
      },
      getComputedStyle$0: function($receiver) {
        return this.getComputedStyle$1($receiver, null);
      },
      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) {
          if (validator == 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;
          }
        } else if (validator != null)
          throw H.wrapException(P.ArgumentError$("validator can only be passed if treeSanitizer is null"));
        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");
          base.href = t1.baseURI;
          $.Element__parseDocument.head.appendChild(base);
        }
        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, 2, 2],
      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$2$validator: function($receiver, html, validator) {
        return this.setInnerHtml$3$treeSanitizer$validator($receiver, html, null, validator);
      },
      setInnerHtml$1: function($receiver, html) {
        return this.setInnerHtml$3$treeSanitizer$validator($receiver, html, null, null);
      },
      setInnerHtml$2$treeSanitizer: function($receiver, html, treeSanitizer) {
        return this.setInnerHtml$3$treeSanitizer$validator($receiver, html, treeSanitizer, null);
      },
      get$innerHtml: function(receiver) {
        return receiver.innerHTML;
      },
      focus$0: function(receiver) {
        return receiver.focus();
      },
      getAttribute$1: function(receiver, $name) {
        return receiver.getAttribute($name);
      },
      setAttribute$2: function(receiver, $name, value) {
        return receiver.setAttribute($name, value);
      },
      translate$2: function($receiver, arg0, arg1) {
        return $receiver.translate.call$2(arg0, arg1);
      },
      $isElement: 1,
      $isNode: 1,
      $isEventTarget: 1,
      $isObject: 1,
      $isInterceptor: 1,
      "%": ";Element"
    },
    closure0: {
      "^": "Closure:0;",
      call$1: function(e) {
        return !!J.getInterceptor(e).$isElement;
      }
    },
    EmbedElement: {
      "^": "HtmlElement;height=,width=",
      "%": "HTMLEmbedElement"
    },
    Event: {
      "^": "Interceptor;",
      get$currentTarget: function(receiver) {
        return W._convertNativeToDart_EventTarget(receiver.currentTarget);
      },
      get$target: function(receiver) {
        return W._convertNativeToDart_EventTarget(receiver.target);
      },
      preventDefault$0: function(receiver) {
        return receiver.preventDefault();
      },
      stopPropagation$0: function(receiver) {
        return receiver.stopPropagation();
      },
      $isEvent: 1,
      $isObject: 1,
      "%": "AnimationEvent|AnimationPlayerEvent|AudioProcessingEvent|AutocompleteErrorEvent|BeforeInstallPromptEvent|BeforeUnloadEvent|ClipboardEvent|CloseEvent|CrossOriginConnectEvent|CustomEvent|DefaultSessionStartEvent|DeviceLightEvent|DeviceMotionEvent|DeviceOrientationEvent|ErrorEvent|FontFaceSetLoadEvent|GamepadEvent|GeofencingEvent|HashChangeEvent|IDBVersionChangeEvent|MIDIConnectionEvent|MediaEncryptedEvent|MediaKeyEvent|MediaKeyMessageEvent|MediaQueryListEvent|MediaStreamEvent|MediaStreamTrackEvent|OfflineAudioCompletionEvent|PageTransitionEvent|PopStateEvent|PromiseRejectionEvent|RTCDTMFToneChangeEvent|RTCDataChannelEvent|RTCIceCandidateEvent|RTCPeerConnectionIceEvent|RelatedEvent|SecurityPolicyViolationEvent|SpeechRecognitionError|SpeechRecognitionEvent|SpeechSynthesisEvent|TrackEvent|TransitionEvent|WebKitTransitionEvent;Event|InputEvent"
    },
    EventTarget: {
      "^": "Interceptor;",
      addEventListener$3: function(receiver, type, listener, useCapture) {
        if (listener != null)
          this._addEventListener$3(receiver, type, listener, useCapture);
      },
      removeEventListener$3: function(receiver, type, listener, useCapture) {
        if (listener != null)
          this._removeEventListener$3(receiver, type, listener, useCapture);
      },
      _addEventListener$3: function(receiver, type, listener, capture) {
        return receiver.addEventListener(type, H.convertDartClosureToJS(listener, 1), capture);
      },
      _removeEventListener$3: function(receiver, type, listener, capture) {
        return receiver.removeEventListener(type, H.convertDartClosureToJS(listener, 1), capture);
      },
      $isEventTarget: 1,
      $isObject: 1,
      "%": "FileReader|MediaStream;EventTarget"
    },
    ExtendableEvent: {
      "^": "Event;",
      "%": "FetchEvent|NotificationEvent|PeriodicSyncEvent|ServicePortConnectEvent|SyncEvent;ExtendableEvent"
    },
    File: {
      "^": "Blob;",
      $isFile: 1,
      "%": "File"
    },
    FormElement: {
      "^": "HtmlElement;length=,target=",
      "%": "HTMLFormElement"
    },
    HtmlCollection: {
      "^": "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) {
        return receiver[index];
      },
      $isList: 1,
      $asList: function() {
        return [W.Node];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [W.Node];
      },
      $isIterable: 1,
      $asIterable: function() {
        return [W.Node];
      },
      $isJavaScriptIndexingBehavior: 1,
      $asJavaScriptIndexingBehavior: function() {
        return [W.Node];
      },
      $isJSIndexable: 1,
      $asJSIndexable: function() {
        return [W.Node];
      },
      "%": "HTMLCollection|HTMLFormControlsCollection|HTMLOptionsCollection"
    },
    Interceptor_ListMixin: {
      "^": "Interceptor+ListMixin;",
      $asList: function() {
        return [W.Node];
      },
      $asEfficientLengthIterable: function() {
        return [W.Node];
      },
      $asIterable: function() {
        return [W.Node];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    Interceptor_ListMixin_ImmutableListMixin: {
      "^": "Interceptor_ListMixin+ImmutableListMixin;",
      $asList: function() {
        return [W.Node];
      },
      $asEfficientLengthIterable: function() {
        return [W.Node];
      },
      $asIterable: function() {
        return [W.Node];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    HtmlDocument: {
      "^": "Document;",
      "%": "HTMLDocument"
    },
    HttpRequest: {
      "^": "HttpRequestEventTarget;",
      open$5$async$password$user: function(receiver, method, url, async, password, user) {
        return receiver.open(method, url, true, user, password);
      },
      open$3$async: function($receiver, method, url, async) {
        return $receiver.open(method, url, async);
      },
      get$response: function(receiver) {
        return W._convertNativeToDart_XHR_Response(receiver.response);
      },
      send$1: function(receiver, body_OR_data) {
        return receiver.send(body_OR_data);
      },
      $isHttpRequest: 1,
      $isEventTarget: 1,
      $isObject: 1,
      "%": "XMLHttpRequest"
    },
    HttpRequest_request_closure: {
      "^": "Closure:0;completer,xhr",
      call$1: function(e) {
        var t1, t2, accepted, unknownRedirect, t3;
        t1 = this.xhr;
        t2 = t1.status;
        accepted = t2 >= 200 && t2 < 300;
        unknownRedirect = t2 > 307 && t2 < 400;
        t2 = accepted || t2 === 0 || t2 === 304 || unknownRedirect;
        t3 = this.completer;
        if (t2)
          t3.complete$1(0, t1);
        else
          t3.completeError$1(e);
      }
    },
    HttpRequestEventTarget: {
      "^": "EventTarget;",
      "%": ";XMLHttpRequestEventTarget"
    },
    IFrameElement: {
      "^": "HtmlElement;_get_contentWindow:contentWindow=,height=,width=",
      $isIFrameElement: 1,
      "%": "HTMLIFrameElement"
    },
    ImageData: {
      "^": "Interceptor;data=,height=,width=",
      $isImageData: 1,
      "%": "ImageData"
    },
    ImageElement: {
      "^": "HtmlElement;height=,width=",
      $isImageElement: 1,
      $isElement: 1,
      $isNode: 1,
      $isEventTarget: 1,
      $isObject: 1,
      "%": "HTMLImageElement"
    },
    InputElement: {
      "^": "HtmlElement;height=,width=",
      $isElement: 1,
      $isInterceptor: 1,
      $isEventTarget: 1,
      $isNode: 1,
      "%": "HTMLInputElement"
    },
    KeyboardEvent: {
      "^": "UIEvent;",
      $isKeyboardEvent: 1,
      $isEvent: 1,
      $isObject: 1,
      "%": "KeyboardEvent"
    },
    LabelElement: {
      "^": "HtmlElement;control=",
      "%": "HTMLLabelElement"
    },
    Location: {
      "^": "Interceptor;",
      toString$0: function(receiver) {
        return String(receiver);
      },
      "%": "Location"
    },
    MediaElement: {
      "^": "HtmlElement;",
      "%": ";HTMLMediaElement"
    },
    MessageEvent: {
      "^": "Event;",
      get$data: function(receiver) {
        var t1, t2;
        t1 = receiver.data;
        t2 = new P._AcceptStructuredCloneDart2Js([], [], false);
        t2.mustCopy = true;
        return t2.walk$1(t1);
      },
      $isMessageEvent: 1,
      $isEvent: 1,
      $isObject: 1,
      "%": "MessageEvent"
    },
    MidiMessageEvent: {
      "^": "Event;data=",
      "%": "MIDIMessageEvent"
    },
    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;",
      "%": "MIDIInput;MIDIPort"
    },
    MouseEvent: {
      "^": "UIEvent;",
      get$layer: function(receiver) {
        return new P.Point(receiver.layerX, receiver.layerY, [null]);
      },
      $isMouseEvent: 1,
      $isEvent: 1,
      $isObject: 1,
      "%": ";DragEvent|MouseEvent"
    },
    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;
      },
      remove$1: function(_, object) {
        return false;
      },
      $indexSet: function(_, index, value) {
        var t1 = this._this;
        t1.replaceChild(value, t1.childNodes[index]);
      },
      get$iterator: function(_) {
        var t1 = this._this.childNodes;
        return new W.FixedSizeListIterator(t1, t1.length, -1, null);
      },
      setRange$4: function(_, start, end, iterable, skipCount) {
        throw H.wrapException(new P.UnsupportedError("Cannot setRange on Node list"));
      },
      setRange$3: function($receiver, start, end, iterable) {
        return this.setRange$4($receiver, start, end, iterable, 0);
      },
      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) {
        return this._this.childNodes[index];
      },
      $asListBase: function() {
        return [W.Node];
      },
      $asList: function() {
        return [W.Node];
      },
      $asEfficientLengthIterable: function() {
        return [W.Node];
      },
      $asIterable: function() {
        return [W.Node];
      }
    },
    Node: {
      "^": "EventTarget;childNodes=,nodeName=,nodeType=,parentNode=,previousNode:previousSibling=,text:textContent%",
      remove$0: function(receiver) {
        var t1 = receiver.parentNode;
        if (t1 != null)
          t1.removeChild(receiver);
      },
      replaceWith$1: function(receiver, otherNode) {
        var $parent, exception;
        try {
          $parent = receiver.parentNode;
          J._replaceChild$2$x($parent, otherNode, receiver);
        } catch (exception) {
          H.unwrapException(exception);
        }
        return receiver;
      },
      insertAllBefore$2: function(receiver, newNodes, refChild) {
        var t1, _i;
        for (t1 = newNodes.length, _i = 0; _i < newNodes.length; newNodes.length === t1 || (0, H.throwConcurrentModificationError)(newNodes), ++_i)
          receiver.insertBefore(newNodes[_i], refChild);
      },
      _clearChildren$0: function(receiver) {
        var t1;
        for (; t1 = receiver.firstChild, t1 != null;)
          receiver.removeChild(t1);
      },
      toString$0: function(receiver) {
        var value = receiver.nodeValue;
        return value == null ? this.super$Interceptor$toString(receiver) : value;
      },
      append$1: function(receiver, node) {
        return receiver.appendChild(node);
      },
      clone$1: function(receiver, deep) {
        return receiver.cloneNode(deep);
      },
      _replaceChild$2: function(receiver, node, child) {
        return receiver.replaceChild(node, child);
      },
      $isNode: 1,
      $isEventTarget: 1,
      $isObject: 1,
      "%": "Attr;Node"
    },
    NodeList: {
      "^": "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) {
        return receiver[index];
      },
      $isList: 1,
      $asList: function() {
        return [W.Node];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [W.Node];
      },
      $isIterable: 1,
      $asIterable: function() {
        return [W.Node];
      },
      $isJavaScriptIndexingBehavior: 1,
      $asJavaScriptIndexingBehavior: function() {
        return [W.Node];
      },
      $isJSIndexable: 1,
      $asJSIndexable: function() {
        return [W.Node];
      },
      "%": "NodeList|RadioNodeList"
    },
    Interceptor_ListMixin0: {
      "^": "Interceptor+ListMixin;",
      $asList: function() {
        return [W.Node];
      },
      $asEfficientLengthIterable: function() {
        return [W.Node];
      },
      $asIterable: function() {
        return [W.Node];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    Interceptor_ListMixin_ImmutableListMixin0: {
      "^": "Interceptor_ListMixin0+ImmutableListMixin;",
      $asList: function() {
        return [W.Node];
      },
      $asEfficientLengthIterable: function() {
        return [W.Node];
      },
      $asIterable: function() {
        return [W.Node];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    ObjectElement: {
      "^": "HtmlElement;data=,height=,width=",
      "%": "HTMLObjectElement"
    },
    Path2D: {
      "^": "Interceptor;",
      $isPath2D: 1,
      $isObject: 1,
      $isInterceptor: 1,
      "%": ""
    },
    PointerEvent: {
      "^": "MouseEvent;height=,width=",
      "%": "PointerEvent"
    },
    ProcessingInstruction: {
      "^": "CharacterData;target=",
      "%": "ProcessingInstruction"
    },
    ProgressEvent: {
      "^": "Event;",
      $isProgressEvent: 1,
      $isEvent: 1,
      $isObject: 1,
      "%": "ProgressEvent|ResourceProgressEvent|XMLHttpRequestProgressEvent"
    },
    PushEvent: {
      "^": "ExtendableEvent;data=",
      "%": "PushEvent"
    },
    PushMessageData: {
      "^": "Interceptor;",
      text$0: [function(receiver) {
        return receiver.text();
      }, "call$0", "get$text", 0, 0, 12],
      "%": "PushMessageData"
    },
    RtcDataChannel: {
      "^": "EventTarget;",
      send$1: function(receiver, data) {
        return receiver.send(data);
      },
      "%": "DataChannel|RTCDataChannel"
    },
    Screen: {
      "^": "Interceptor;height=,width=",
      "%": "Screen"
    },
    SelectElement: {
      "^": "HtmlElement;length=",
      "%": "HTMLSelectElement"
    },
    ServiceWorkerMessageEvent: {
      "^": "Event;",
      get$data: function(receiver) {
        var t1, t2;
        t1 = receiver.data;
        t2 = new P._AcceptStructuredCloneDart2Js([], [], false);
        t2.mustCopy = true;
        return t2.walk$1(t1);
      },
      "%": "ServiceWorkerMessageEvent"
    },
    ShadowRoot: {
      "^": "DocumentFragment;innerHtml:innerHTML%",
      clone$1: function(receiver, deep) {
        return receiver.cloneNode(true);
      },
      "%": "ShadowRoot"
    },
    StorageEvent: {
      "^": "Event;url=",
      "%": "StorageEvent"
    },
    StyleElement: {
      "^": "HtmlElement;",
      $isStyleElement: 1,
      "%": "HTMLStyleElement"
    },
    StyleSheet: {
      "^": "Interceptor;",
      "%": ";StyleSheet"
    },
    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("<table>" + H.S(html) + "</table>", treeSanitizer, validator);
        fragment = document.createDocumentFragment();
        fragment.toString;
        table.toString;
        new W._ChildNodeListLazy(fragment).addAll$1(0, new W._ChildNodeListLazy(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$2$validator: function($receiver, html, validator) {
        return this.setInnerHtml$3$treeSanitizer$validator($receiver, html, null, validator);
      },
      setInnerHtml$1: function($receiver, html) {
        return this.setInnerHtml$3$treeSanitizer$validator($receiver, html, null, null);
      },
      setInnerHtml$2$treeSanitizer: function($receiver, html, treeSanitizer) {
        return this.setInnerHtml$3$treeSanitizer$validator($receiver, html, treeSanitizer, null);
      },
      $isTemplateElement: 1,
      "%": "HTMLTemplateElement"
    },
    TextEvent: {
      "^": "UIEvent;data=",
      "%": "TextEvent"
    },
    TextMetrics: {
      "^": "Interceptor;width=",
      "%": "TextMetrics"
    },
    Touch: {
      "^": "Interceptor;",
      get$target: function(receiver) {
        return W._convertNativeToDart_EventTarget(receiver.target);
      },
      get$client: function(receiver) {
        return new P.Point(C.JSNumber_methods.round$0(receiver.clientX), C.JSNumber_methods.round$0(receiver.clientY), [null]);
      },
      $isTouch: 1,
      $isObject: 1,
      "%": "Touch"
    },
    TouchEvent: {
      "^": "UIEvent;",
      $isTouchEvent: 1,
      $isEvent: 1,
      $isObject: 1,
      "%": "TouchEvent"
    },
    TouchList: {
      "^": "Interceptor_ListMixin_ImmutableListMixin1;",
      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) {
        return receiver[index];
      },
      $isList: 1,
      $asList: function() {
        return [W.Touch];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [W.Touch];
      },
      $isIterable: 1,
      $asIterable: function() {
        return [W.Touch];
      },
      $isJavaScriptIndexingBehavior: 1,
      $asJavaScriptIndexingBehavior: function() {
        return [W.Touch];
      },
      $isJSIndexable: 1,
      $asJSIndexable: function() {
        return [W.Touch];
      },
      "%": "TouchList"
    },
    Interceptor_ListMixin1: {
      "^": "Interceptor+ListMixin;",
      $asList: function() {
        return [W.Touch];
      },
      $asEfficientLengthIterable: function() {
        return [W.Touch];
      },
      $asIterable: function() {
        return [W.Touch];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    Interceptor_ListMixin_ImmutableListMixin1: {
      "^": "Interceptor_ListMixin1+ImmutableListMixin;",
      $asList: function() {
        return [W.Touch];
      },
      $asEfficientLengthIterable: function() {
        return [W.Touch];
      },
      $asIterable: function() {
        return [W.Touch];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    UIEvent: {
      "^": "Event;",
      "%": "FocusEvent|SVGZoomEvent;UIEvent"
    },
    VideoElement: {
      "^": "MediaElement;height=,width=",
      "%": "HTMLVideoElement"
    },
    WebSocket: {
      "^": "EventTarget;url=",
      send$1: function(receiver, data) {
        return receiver.send(data);
      },
      "%": "WebSocket"
    },
    WheelEvent: {
      "^": "MouseEvent;",
      get$deltaY: function(receiver) {
        if (receiver.deltaY !== undefined)
          return receiver.deltaY;
        throw H.wrapException(new P.UnsupportedError("deltaY is not supported"));
      },
      get$deltaX: function(receiver) {
        if (receiver.deltaX !== undefined)
          return receiver.deltaX;
        throw H.wrapException(new P.UnsupportedError("deltaX is not supported"));
      },
      $isWheelEvent: 1,
      $isMouseEvent: 1,
      $isEvent: 1,
      $isObject: 1,
      "%": "WheelEvent"
    },
    Window: {
      "^": "EventTarget;",
      _requestAnimationFrame$1: function(receiver, callback) {
        return receiver.requestAnimationFrame(H.convertDartClosureToJS(callback, 1));
      },
      _ensureRequestAnimationFrame$0: function(receiver) {
        if (!!(receiver.requestAnimationFrame && receiver.cancelAnimationFrame))
          return;
        (function($this) {
          var vendors = ['ms', 'moz', 'webkit', 'o'];
          for (var i = 0; i < vendors.length && !$this.requestAnimationFrame; ++i) {
            $this.requestAnimationFrame = $this[vendors[i] + 'RequestAnimationFrame'];
            $this.cancelAnimationFrame = $this[vendors[i] + 'CancelAnimationFrame'] || $this[vendors[i] + 'CancelRequestAnimationFrame'];
          }
          if ($this.requestAnimationFrame && $this.cancelAnimationFrame)
            return;
          $this.requestAnimationFrame = function(callback) {
            return window.setTimeout(function() {
              callback(Date.now());
            }, 16);
          };
          $this.cancelAnimationFrame = function(id) {
            clearTimeout(id);
          };
        })(receiver);
      },
      postMessage$3: function(receiver, message, targetOrigin, transfer) {
        receiver.postMessage(new P._StructuredCloneDart2Js([], []).walk$1(message), targetOrigin);
        return;
      },
      postMessage$2: function($receiver, message, targetOrigin) {
        return this.postMessage$3($receiver, message, targetOrigin, null);
      },
      $isWindow: 1,
      $isInterceptor: 1,
      $isEventTarget: 1,
      "%": "DOMWindow|Window"
    },
    _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"
    },
    _CssRuleList: {
      "^": "Interceptor_ListMixin_ImmutableListMixin2;",
      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."));
      },
      get$last: function(receiver) {
        var len = receiver.length;
        if (len > 0)
          return receiver[len - 1];
        throw H.wrapException(new P.StateError("No elements"));
      },
      elementAt$1: function(receiver, index) {
        return receiver[index];
      },
      $isList: 1,
      $asList: function() {
        return [W.CssRule];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [W.CssRule];
      },
      $isIterable: 1,
      $asIterable: function() {
        return [W.CssRule];
      },
      $isJavaScriptIndexingBehavior: 1,
      $asJavaScriptIndexingBehavior: function() {
        return [W.CssRule];
      },
      $isJSIndexable: 1,
      $asJSIndexable: function() {
        return [W.CssRule];
      },
      "%": "CSSRuleList"
    },
    Interceptor_ListMixin2: {
      "^": "Interceptor+ListMixin;",
      $asList: function() {
        return [W.CssRule];
      },
      $asEfficientLengthIterable: function() {
        return [W.CssRule];
      },
      $asIterable: function() {
        return [W.CssRule];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    Interceptor_ListMixin_ImmutableListMixin2: {
      "^": "Interceptor_ListMixin2+ImmutableListMixin;",
      $asList: function() {
        return [W.CssRule];
      },
      $asEfficientLengthIterable: function() {
        return [W.CssRule];
      },
      $asIterable: function() {
        return [W.CssRule];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    _DocumentType: {
      "^": "Node;",
      $isInterceptor: 1,
      "%": "DocumentType"
    },
    _DomRect: {
      "^": "DomRectReadOnly;",
      get$height: function(receiver) {
        return receiver.height;
      },
      get$width: function(receiver) {
        return receiver.width;
      },
      get$x: function(receiver) {
        return receiver.x;
      },
      get$y: function(receiver) {
        return receiver.y;
      },
      "%": "DOMRect"
    },
    _HTMLFrameSetElement: {
      "^": "HtmlElement;",
      $isEventTarget: 1,
      $isInterceptor: 1,
      "%": "HTMLFrameSetElement"
    },
    _NamedNodeMap: {
      "^": "Interceptor_ListMixin_ImmutableListMixin3;",
      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) {
        return receiver[index];
      },
      $isList: 1,
      $asList: function() {
        return [W.Node];
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [W.Node];
      },
      $isIterable: 1,
      $asIterable: function() {
        return [W.Node];
      },
      $isJavaScriptIndexingBehavior: 1,
      $asJavaScriptIndexingBehavior: function() {
        return [W.Node];
      },
      $isJSIndexable: 1,
      $asJSIndexable: function() {
        return [W.Node];
      },
      "%": "MozNamedAttrMap|NamedNodeMap"
    },
    Interceptor_ListMixin3: {
      "^": "Interceptor+ListMixin;",
      $asList: function() {
        return [W.Node];
      },
      $asEfficientLengthIterable: function() {
        return [W.Node];
      },
      $asIterable: function() {
        return [W.Node];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    Interceptor_ListMixin_ImmutableListMixin3: {
      "^": "Interceptor_ListMixin3+ImmutableListMixin;",
      $asList: function() {
        return [W.Node];
      },
      $asEfficientLengthIterable: function() {
        return [W.Node];
      },
      $asIterable: function() {
        return [W.Node];
      },
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    _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;
        attributes = this._html$_element.attributes;
        keys = H.setRuntimeTypeInfo([], [P.String]);
        for (len = attributes.length, i = 0; i < len; ++i) {
          attr = attributes[i];
          if (attr.namespaceURI == null)
            keys.push(attr.name);
        }
        return keys;
      },
      get$isEmpty: function(_) {
        return this.get$keys().length === 0;
      },
      $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;
      }
    },
    _ElementCssClassSet: {
      "^": "CssClassSetImpl;_html$_element<",
      readClasses$0: function() {
        var s, t1, t2, _i, trimmed;
        s = P.LinkedHashSet_LinkedHashSet(null, null, null, P.String);
        for (t1 = this._html$_element.className.split(" "), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          trimmed = J.trim$0$s(t1[_i]);
          if (trimmed.length !== 0)
            s.add$1(0, trimmed);
        }
        return s;
      },
      writeClasses$1: function(s) {
        this._html$_element.className = s.join$1(0, " ");
      },
      get$length: function(_) {
        return this._html$_element.classList.length;
      },
      get$isEmpty: function(_) {
        return this._html$_element.classList.length === 0;
      },
      contains$1: function(_, value) {
        return false;
      },
      add$1: function(_, value) {
        var list, t1;
        list = this._html$_element.classList;
        t1 = list.contains(value);
        list.add(value);
        return !t1;
      }
    },
    _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, this._useCapture, H.getTypeArgumentByIndex(this, 0));
      }
    },
    _ElementEventStreamImpl: {
      "^": "_EventStream;_html$_target,_eventType,_useCapture,$ti"
    },
    _EventStreamSubscription: {
      "^": "StreamSubscription;_html$_pauseCount,_html$_target,_eventType,_html$_onData,_useCapture,$ti",
      cancel$0: function() {
        if (this._html$_target == null)
          return;
        this._unlisten$0();
        this._html$_target = null;
        this._html$_onData = null;
        return;
      },
      _tryResume$0: function() {
        var t1 = this._html$_onData;
        if (t1 != null && this._html$_pauseCount <= 0)
          J.addEventListener$3$x(this._html$_target, this._eventType, t1, this._useCapture);
      },
      _unlisten$0: function() {
        var t1 = this._html$_onData;
        if (t1 != null)
          J.removeEventListener$3$x(this._html$_target, this._eventType, t1, this._useCapture);
      },
      _EventStreamSubscription$4: function(_target, _eventType, onData, _useCapture, $T) {
        this._tryResume$0();
      },
      static: {
        _EventStreamSubscription$: function(_target, _eventType, onData, _useCapture, $T) {
          var t1 = onData == null ? null : W._wrapZone(new W._EventStreamSubscription_closure(onData));
          t1 = new W._EventStreamSubscription(0, _target, _eventType, t1, _useCapture, [$T]);
          t1._EventStreamSubscription$4(_target, _eventType, onData, _useCapture, $T);
          return t1;
        }
      }
    },
    _EventStreamSubscription_closure: {
      "^": "Closure:0;onData",
      call$1: [function(e) {
        return this.onData.call$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    _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());
        }
      },
      $isNodeValidator: 1,
      static: {
        _Html5NodeValidator$: function(uriPolicy) {
          var t1 = new W._Html5NodeValidator(new W._SameOriginUriPolicy(W.AnchorElement_AnchorElement(null), window.location));
          t1._Html5NodeValidator$1$uriPolicy(uriPolicy);
          return t1;
        },
        _Html5NodeValidator__standardAttributeValidator: [function(element, attributeName, value, context) {
          return true;
        }, "call$4", "html__Html5NodeValidator__standardAttributeValidator$closure", 8, 0, 35, 37, 38, 12, 39],
        _Html5NodeValidator__uriAttributeValidator: [function(element, attributeName, value, context) {
          return context.uriPolicy.allowsUri$1(value);
        }, "call$4", "html__Html5NodeValidator__uriAttributeValidator$closure", 8, 0, 35, 37, 38, 12, 39]
      }
    },
    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."));
      },
      remove$1: function(receiver, object) {
        throw H.wrapException(new P.UnsupportedError("Cannot remove from immutable List."));
      },
      setRange$4: function(receiver, start, end, iterable, skipCount) {
        throw H.wrapException(new P.UnsupportedError("Cannot setRange on immutable List."));
      },
      setRange$3: function($receiver, start, end, iterable) {
        return this.setRange$4($receiver, start, end, iterable, 0);
      },
      $isList: 1,
      $asList: null,
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: null,
      $isIterable: 1,
      $asIterable: null
    },
    NodeValidatorBuilder: {
      "^": "Object;_validators",
      allowCustomElement$4$attributes$uriAttributes$uriPolicy: function(tagName, attributes, uriAttributes, uriPolicy) {
        var tagNameUpper, attrs, t1;
        tagNameUpper = tagName.toUpperCase();
        attrs = new H.MappedListIterable(attributes, new W.NodeValidatorBuilder_allowCustomElement_closure(tagNameUpper), [null, null]);
        uriPolicy = new W._SameOriginUriPolicy(W.AnchorElement_AnchorElement(null), window.location);
        t1 = P.String;
        t1 = new W._CustomElementNodeValidator(false, true, P.LinkedHashSet_LinkedHashSet(null, null, null, t1), P.LinkedHashSet_LinkedHashSet(null, null, null, t1), P.LinkedHashSet_LinkedHashSet(null, null, null, t1), uriPolicy);
        t1._SimpleNodeValidator$4$allowedAttributes$allowedElements$allowedUriAttributes(uriPolicy, attrs, [tagNameUpper], uriAttributes);
        this._validators.push(t1);
      },
      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_allowCustomElement_closure: {
      "^": "Closure:0;tagNameUpper",
      call$1: [function($name) {
        return this.tagNameUpper + "::" + J.toLowerCase$0$s($name);
      }, null, null, 2, 0, null, 17, "call"]
    },
    NodeValidatorBuilder_allowsElement_closure: {
      "^": "Closure:0;element",
      call$1: function(v) {
        return v.allowsElement$1(this.element);
      }
    },
    NodeValidatorBuilder_allowsAttribute_closure: {
      "^": "Closure:0;element,attributeName,value",
      call$1: function(v) {
        return v.allowsAttribute$3(this.element, this.attributeName, this.value);
      }
    },
    _SimpleNodeValidator: {
      "^": "Object;allowedElements,allowedAttributes,allowedUriAttributes,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 t1, legalAttributes, extraUriAttributes;
        t1 = allowedElements == null ? C.List_empty : allowedElements;
        this.allowedElements.addAll$1(0, t1);
        t1 = J.getInterceptor$ax(allowedAttributes);
        legalAttributes = t1.where$1(allowedAttributes, new W._SimpleNodeValidator_closure());
        extraUriAttributes = t1.where$1(allowedAttributes, 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);
      },
      static: {
        _SimpleNodeValidator$: function(uriPolicy, allowedAttributes, allowedElements, allowedUriAttributes) {
          var t1 = P.String;
          t1 = new W._SimpleNodeValidator(P.LinkedHashSet_LinkedHashSet(null, null, null, t1), P.LinkedHashSet_LinkedHashSet(null, null, null, t1), P.LinkedHashSet_LinkedHashSet(null, null, null, t1), uriPolicy);
          t1._SimpleNodeValidator$4$allowedAttributes$allowedElements$allowedUriAttributes(uriPolicy, allowedAttributes, allowedElements, allowedUriAttributes);
          return t1;
        }
      }
    },
    _SimpleNodeValidator_closure: {
      "^": "Closure:0;",
      call$1: function(x) {
        return !C.JSArray_methods.contains$1(C.List_yrN, x);
      }
    },
    _SimpleNodeValidator_closure0: {
      "^": "Closure:0;",
      call$1: function(x) {
        return C.JSArray_methods.contains$1(C.List_yrN, x);
      }
    },
    _CustomElementNodeValidator: {
      "^": "_SimpleNodeValidator;allowTypeExtension,allowCustomTag,allowedElements,allowedAttributes,allowedUriAttributes,uriPolicy",
      allowsElement$1: function(element) {
        var isAttr, t1;
        if (this.allowTypeExtension) {
          isAttr = element.getAttribute("is");
          if (isAttr != null) {
            t1 = this.allowedElements;
            return t1.contains$1(0, isAttr.toUpperCase()) && t1.contains$1(0, W.Element__safeTagName(element));
          }
        }
        return this.allowCustomTag && this.allowedElements.contains$1(0, W.Element__safeTagName(element));
      },
      allowsAttribute$3: function(element, attributeName, value) {
        if (this.allowsElement$1(element)) {
          if (this.allowTypeExtension && attributeName === "is" && this.allowedElements.contains$1(0, value.toUpperCase()))
            return true;
          return this.super$_SimpleNodeValidator$allowsAttribute(element, attributeName, value);
        }
        return false;
      }
    },
    _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 (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(), [null, null]), ["TEMPLATE"], null);
          return t1;
        }
      }
    },
    _TemplatingNodeValidator_closure: {
      "^": "Closure:0;",
      call$1: [function(attr) {
        return "TEMPLATE::" + H.S(attr);
      }, null, null, 2, 0, null, 50, "call"]
    },
    _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,_length,_position,_current",
      moveNext$0: function() {
        var nextPosition, t1;
        nextPosition = this._position + 1;
        t1 = this._length;
        if (nextPosition < t1) {
          this._current = J.$index$asx(this._array, nextPosition);
          this._position = nextPosition;
          return true;
        }
        this._current = null;
        this._position = t1;
        return false;
      },
      get$current: function() {
        return this._current;
      }
    },
    _DOMWindowCrossFrame: {
      "^": "Object;_window",
      postMessage$3: function(_, message, targetOrigin, messagePorts) {
        this._window.postMessage(new P._StructuredCloneDart2Js([], []).walk$1(message), targetOrigin);
      },
      postMessage$2: function($receiver, message, targetOrigin) {
        return this.postMessage$3($receiver, message, targetOrigin, null);
      },
      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",
      allowsUri$1: function(uri) {
        var t1, t2, t3, t4, t5;
        t1 = this._hiddenAnchor;
        t1.href = uri;
        t2 = t1.hostname;
        t3 = this._loc;
        t4 = t3.hostname;
        if (t2 == null ? t4 == null : t2 === t4) {
          t4 = t1.port;
          t5 = t3.port;
          if (t4 == null ? t5 == null : t4 === t5) {
            t4 = t1.protocol;
            t3 = t3.protocol;
            t3 = t4 == null ? t3 == null : t4 === t3;
          } else
            t3 = false;
        } else
          t3 = false;
        if (!t3)
          if (t2 === "")
            if (t1.port === "") {
              t1 = t1.protocol;
              t1 = t1 === ":" || t1 === "";
            } else
              t1 = false;
          else
            t1 = false;
        else
          t1 = true;
        return t1;
      }
    },
    _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 : !(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(), [H.getTypeArgumentByIndex(t1, 0)]);
        for (i = attrs.get$keys().length - 1, t1 = attrs._html$_element; i >= 0; --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) + " " + H.S($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:97;$this",
      call$2: function(node, $parent) {
        var child, nextChild, t1, exception;
        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 (; null != child;) {
          nextChild = null;
          try {
            nextChild = J.get$previousNode$x(child);
          } catch (exception) {
            H.unwrapException(exception);
            t1 = child;
            node.removeChild(t1);
            child = null;
            nextChild = node.lastChild;
          }
          if (child != null)
            this.call$2(child, node);
          child = nextChild;
        }
      }
    }
  }], ["html_common", "dart:html_common",, P, {
    "^": "",
    convertNativeToDart_ImageData: function(nativeImageData) {
      var t1, data;
      t1 = J.getInterceptor(nativeImageData);
      if (!!t1.$isImageData) {
        data = t1.get$data(nativeImageData);
        if (data.constructor === Array)
          if (typeof CanvasPixelArray !== "undefined") {
            data.constructor = CanvasPixelArray;
            data.BYTES_PER_ELEMENT = 1;
          }
        return nativeImageData;
      }
      return new P._TypedImageData(nativeImageData.data, nativeImageData.height, nativeImageData.width);
    },
    convertDartToNative_ImageData: function(imageData) {
      if (imageData instanceof P._TypedImageData)
        return {data: imageData.data, height: imageData.height, width: imageData.width};
      return imageData;
    },
    convertDartToNative_Dictionary: function(dict, postCreate) {
      var object = {};
      dict.forEach$1(0, new P.convertDartToNative_Dictionary_closure(object));
      return object;
    },
    convertNativePromiseToDartFuture: function(promise) {
      var t1, completer;
      t1 = new P._Future(0, $.Zone__current, null, [null]);
      completer = new P._AsyncCompleter(t1, [null]);
      promise.then(H.convertDartClosureToJS(new P.convertNativePromiseToDartFuture_closure(completer), 1))["catch"](H.convertDartClosureToJS(new P.convertNativePromiseToDartFuture_closure0(completer), 1));
      return t1;
    },
    Device_isOpera: function() {
      var t1 = $.Device__isOpera;
      if (t1 == null) {
        t1 = J.contains$2$asx(window.navigator.userAgent, "Opera", 0);
        $.Device__isOpera = t1;
      }
      return t1;
    },
    Device_cssPrefix: function() {
      var prefix, t1;
      prefix = $.Device__cachedCssPrefix;
      if (prefix != null)
        return prefix;
      t1 = $.Device__isFirefox;
      if (t1 == null) {
        t1 = J.contains$2$asx(window.navigator.userAgent, "Firefox", 0);
        $.Device__isFirefox = t1;
      }
      if (t1)
        prefix = "-moz-";
      else {
        t1 = $.Device__isIE;
        if (t1 == null) {
          t1 = !P.Device_isOpera() && J.contains$2$asx(window.navigator.userAgent, "Trident/", 0);
          $.Device__isIE = t1;
        }
        if (t1)
          prefix = "-ms-";
        else
          prefix = P.Device_isOpera() ? "-o-" : "-webkit-";
      }
      $.Device__cachedCssPrefix = prefix;
      return prefix;
    },
    Device_isEventTypeSupported: function(eventType) {
      var e, e0, exception;
      try {
        e0 = document.createEvent(eventType);
        e0.initEvent("", true, true);
        e = e0;
        return !!J.getInterceptor(e).$isEvent;
      } catch (exception) {
        H.unwrapException(exception);
      }
      return false;
    },
    _StructuredClone: {
      "^": "Object;",
      findSlot$1: function(value) {
        var t1, $length, i;
        t1 = this.values;
        $length = t1.length;
        for (i = 0; i < $length; ++i)
          if (t1[i] === value)
            return i;
        t1.push(value);
        this.copies.push(null);
        return $length;
      },
      walk$1: function(e) {
        var t1, t2, slot, t3, copy;
        t1 = {};
        if (e == null)
          return e;
        if (typeof e === "boolean")
          return e;
        if (typeof e === "number")
          return e;
        if (typeof e === "string")
          return e;
        t2 = J.getInterceptor(e);
        if (!!t2.$isDateTime)
          return new Date(e._value);
        if (!!t2.$isRegExp)
          throw H.wrapException(new P.UnimplementedError("structured clone of RegExp"));
        if (!!t2.$isFile)
          return e;
        if (!!t2.$isBlob)
          return e;
        if (!!t2.$isImageData)
          return e;
        if (!!t2.$isNativeByteBuffer || !!t2.$isNativeTypedData)
          return e;
        if (!!t2.$isMap) {
          slot = this.findSlot$1(e);
          t3 = this.copies;
          copy = t3[slot];
          t1.copy = copy;
          if (copy != null)
            return copy;
          copy = {};
          t1.copy = copy;
          t3[slot] = copy;
          t2.forEach$1(e, new P._StructuredClone_walk_closure(t1, this));
          return t1.copy;
        }
        if (!!t2.$isList) {
          slot = this.findSlot$1(e);
          copy = this.copies[slot];
          if (copy != null)
            return copy;
          return this.copyList$2(e, slot);
        }
        throw H.wrapException(new P.UnimplementedError("structured clone of other type"));
      },
      copyList$2: function(e, slot) {
        var t1, $length, copy, i;
        t1 = J.getInterceptor$asx(e);
        $length = t1.get$length(e);
        copy = new Array($length);
        this.copies[slot] = copy;
        for (i = 0; i < $length; ++i)
          copy[i] = this.walk$1(t1.$index(e, i));
        return copy;
      }
    },
    _StructuredClone_walk_closure: {
      "^": "Closure:2;_box_0,$this",
      call$2: function(key, value) {
        this._box_0.copy[key] = this.$this.walk$1(value);
      }
    },
    _AcceptStructuredClone: {
      "^": "Object;",
      findSlot$1: function(value) {
        var t1, $length, i, t2;
        t1 = this.values;
        $length = t1.length;
        for (i = 0; i < $length; ++i) {
          t2 = t1[i];
          if (t2 == null ? value == null : t2 === value)
            return i;
        }
        t1.push(value);
        this.copies.push(null);
        return $length;
      },
      walk$1: function(e) {
        var t1, millisSinceEpoch, proto, slot, t2, copy, $length, i;
        t1 = {};
        if (e == null)
          return e;
        if (typeof e === "boolean")
          return e;
        if (typeof e === "number")
          return e;
        if (typeof e === "string")
          return e;
        if (e instanceof Date) {
          millisSinceEpoch = e.getTime();
          t1 = new P.DateTime(millisSinceEpoch, true);
          t1.DateTime$_withValue$2$isUtc(millisSinceEpoch, true);
          return t1;
        }
        if (e instanceof RegExp)
          throw H.wrapException(new P.UnimplementedError("structured clone of RegExp"));
        if (typeof Promise != "undefined" && e instanceof Promise)
          return P.convertNativePromiseToDartFuture(e);
        proto = Object.getPrototypeOf(e);
        if (proto === Object.prototype || proto === null) {
          slot = this.findSlot$1(e);
          t2 = this.copies;
          copy = t2[slot];
          t1.copy = copy;
          if (copy != null)
            return copy;
          copy = P.LinkedHashMap__makeEmpty();
          t1.copy = copy;
          t2[slot] = copy;
          this.forEachJsField$2(e, new P._AcceptStructuredClone_walk_closure(t1, this));
          return t1.copy;
        }
        if (e instanceof Array) {
          slot = this.findSlot$1(e);
          t1 = this.copies;
          copy = t1[slot];
          if (copy != null)
            return copy;
          t2 = J.getInterceptor$asx(e);
          $length = t2.get$length(e);
          copy = this.mustCopy ? new Array($length) : e;
          t1[slot] = copy;
          for (t1 = J.getInterceptor$ax(copy), i = 0; i < $length; ++i)
            t1.$indexSet(copy, i, this.walk$1(t2.$index(e, i)));
          return copy;
        }
        return e;
      }
    },
    _AcceptStructuredClone_walk_closure: {
      "^": "Closure:2;_box_0,$this",
      call$2: function(key, value) {
        var t1, t2;
        t1 = this._box_0.copy;
        t2 = this.$this.walk$1(value);
        J.$indexSet$ax(t1, key, t2);
        return t2;
      }
    },
    _TypedImageData: {
      "^": "Object;data>,height>,width>",
      $isImageData: 1,
      $isInterceptor: 1
    },
    convertDartToNative_Dictionary_closure: {
      "^": "Closure:27;object",
      call$2: function(key, value) {
        this.object[key] = value;
      }
    },
    _StructuredCloneDart2Js: {
      "^": "_StructuredClone;values,copies"
    },
    _AcceptStructuredCloneDart2Js: {
      "^": "_AcceptStructuredClone;values,copies,mustCopy",
      forEachJsField$2: function(object, action) {
        var t1, t2, _i, key;
        for (t1 = Object.keys(object), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          key = t1[_i];
          action.call$2(key, object[key]);
        }
      }
    },
    convertNativePromiseToDartFuture_closure: {
      "^": "Closure:0;completer",
      call$1: [function(result) {
        return this.completer.complete$1(0, result);
      }, null, null, 2, 0, null, 19, "call"]
    },
    convertNativePromiseToDartFuture_closure0: {
      "^": "Closure:0;completer",
      call$1: [function(result) {
        return this.completer.completeError$1(result);
      }, null, null, 2, 0, null, 19, "call"]
    },
    CssClassSetImpl: {
      "^": "Object;",
      _validateToken$1: function(value) {
        if ($.$get$CssClassSetImpl__validTokenRE()._nativeRegExp.test(H.checkString(value)))
          return value;
        throw H.wrapException(P.ArgumentError$value(value, "value", "Not a valid class token"));
      },
      toString$0: function(_) {
        return this.readClasses$0().join$1(0, " ");
      },
      get$iterator: function(_) {
        var t1, t2;
        t1 = this.readClasses$0();
        t2 = new P._LinkedHashSetIterator(t1, t1._collection$_modifications, null, null);
        t2._collection$_cell = t1._collection$_first;
        return t2;
      },
      map$1: function(_, f) {
        var t1 = this.readClasses$0();
        return new H.EfficientLengthMappedIterable(t1, f, [H.getTypeArgumentByIndex(t1, 0), null]);
      },
      get$isEmpty: function(_) {
        return this.readClasses$0()._collection$_length === 0;
      },
      get$length: function(_) {
        return this.readClasses$0()._collection$_length;
      },
      contains$1: function(_, value) {
        return false;
      },
      lookup$1: function(value) {
        return this.contains$1(0, value) ? value : null;
      },
      add$1: function(_, value) {
        this._validateToken$1(value);
        return this.modify$1(new P.CssClassSetImpl_add_closure(value));
      },
      toList$1$growable: function(_, growable) {
        return this.readClasses$0().toList$1$growable(0, growable);
      },
      toList$0: function($receiver) {
        return this.toList$1$growable($receiver, true);
      },
      elementAt$1: function(_, index) {
        return this.readClasses$0().elementAt$1(0, index);
      },
      modify$1: function(f) {
        var s, ret;
        s = this.readClasses$0();
        ret = f.call$1(s);
        this.writeClasses$1(s);
        return ret;
      },
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.String];
      },
      $isIterable: 1,
      $asIterable: function() {
        return [P.String];
      }
    },
    CssClassSetImpl_add_closure: {
      "^": "Closure:0;value",
      call$1: function(s) {
        return s.add$1(0, this.value);
      }
    },
    FilteredElementList: {
      "^": "ListBase;_node,_childNodes",
      get$_html_common$_iterable: function() {
        var t1, t2;
        t1 = this._childNodes;
        t2 = H.getRuntimeTypeArgument(t1, "ListMixin", 0);
        return new H.MappedIterable(new H.WhereIterable(t1, new P.FilteredElementList__iterable_closure(), [t2]), new P.FilteredElementList__iterable_closure0(), [t2, null]);
      },
      $indexSet: function(_, index, value) {
        var t1 = this.get$_html_common$_iterable();
        J.replaceWith$1$x(t1._f.call$1(J.elementAt$1$ax(t1.__internal$_iterable, index)), value);
      },
      set$length: function(_, newLength) {
        var len = J.get$length$asx(this.get$_html_common$_iterable().__internal$_iterable);
        if (newLength >= len)
          return;
        else if (newLength < 0)
          throw H.wrapException(P.ArgumentError$("Invalid list length"));
        this.removeRange$2(0, newLength, len);
      },
      add$1: function(_, value) {
        this._childNodes._this.appendChild(value);
      },
      addAll$1: function(_, iterable) {
        var t1, t2;
        for (t1 = P.List_List$from(iterable.get$_html_common$_iterable(), false, W.Element), t1 = new J.ArrayIterator(t1, t1.length, 0, null), t2 = this._childNodes._this; t1.moveNext$0();)
          t2.appendChild(t1.__interceptors$_current);
      },
      setRange$4: function(_, start, end, iterable, skipCount) {
        throw H.wrapException(new P.UnsupportedError("Cannot setRange on filtered list"));
      },
      setRange$3: function($receiver, start, end, iterable) {
        return this.setRange$4($receiver, start, end, iterable, 0);
      },
      removeRange$2: function(_, start, end) {
        var t1 = this.get$_html_common$_iterable();
        t1 = H.SkipIterable_SkipIterable(t1, start, H.getRuntimeTypeArgument(t1, "Iterable", 0));
        C.JSArray_methods.forEach$1(P.List_List$from(H.TakeIterable_TakeIterable(t1, end - start, H.getRuntimeTypeArgument(t1, "Iterable", 0)), true, null), new P.FilteredElementList_removeRange_closure());
      },
      remove$1: function(_, element) {
        return false;
      },
      get$length: function(_) {
        return J.get$length$asx(this.get$_html_common$_iterable().__internal$_iterable);
      },
      $index: function(_, index) {
        var t1 = this.get$_html_common$_iterable();
        return t1._f.call$1(J.elementAt$1$ax(t1.__internal$_iterable, index));
      },
      get$iterator: function(_) {
        var t1 = P.List_List$from(this.get$_html_common$_iterable(), false, W.Element);
        return new J.ArrayIterator(t1, t1.length, 0, null);
      },
      $asListBase: function() {
        return [W.Element];
      },
      $asList: function() {
        return [W.Element];
      },
      $asEfficientLengthIterable: function() {
        return [W.Element];
      },
      $asIterable: function() {
        return [W.Element];
      }
    },
    FilteredElementList__iterable_closure: {
      "^": "Closure:0;",
      call$1: function(n) {
        return !!J.getInterceptor(n).$isElement;
      }
    },
    FilteredElementList__iterable_closure0: {
      "^": "Closure:0;",
      call$1: [function(n) {
        return H.interceptedTypeCast(n, "$isElement");
      }, null, null, 2, 0, null, 27, "call"]
    },
    FilteredElementList_removeRange_closure: {
      "^": "Closure:0;",
      call$1: function(el) {
        return J.remove$0$ax(el);
      }
    }
  }], ["dart.dom.indexed_db", "dart:indexed_db",, P, {
    "^": "",
    KeyRange: {
      "^": "Interceptor;",
      $isKeyRange: 1,
      "%": "IDBKeyRange"
    }
  }], ["dart.js", "dart:js",, P, {
    "^": "",
    _callDartFunction: [function(callback, captureThis, $self, $arguments) {
      var arguments0, dartArgs;
      if (captureThis) {
        arguments0 = [$self];
        C.JSArray_methods.addAll$1(arguments0, $arguments);
        $arguments = arguments0;
      }
      dartArgs = P.List_List$from(J.map$1$ax($arguments, P.js___convertToDart$closure()), true, null);
      return P._convertToJS(H.Primitives_applyFunctionWithPositionalArguments(callback, dartArgs));
    }, null, null, 8, 0, null, 26, 41, 6, 42],
    _defineProperty: function(o, $name, value) {
      var exception;
      try {
        if (Object.isExtensible(o) && !Object.prototype.hasOwnProperty.call(o, $name)) {
          Object.defineProperty(o, $name, {value: value});
          return true;
        }
      } catch (exception) {
        H.unwrapException(exception);
      }
      return false;
    },
    _getOwnProperty: function(o, $name) {
      if (Object.prototype.hasOwnProperty.call(o, $name))
        return o[$name];
      return;
    },
    _convertToJS: [function(o) {
      var t1;
      if (o == null || typeof o === "string" || typeof o === "number" || typeof o === "boolean")
        return o;
      t1 = J.getInterceptor(o);
      if (!!t1.$isJsObject)
        return o._jsObject;
      if (!!t1.$isBlob || !!t1.$isEvent || !!t1.$isKeyRange || !!t1.$isImageData || !!t1.$isNode || !!t1.$isTypedData || !!t1.$isWindow)
        return o;
      if (!!t1.$isDateTime)
        return H.Primitives_lazyAsJsDate(o);
      if (!!t1.$isFunction)
        return P._getJsProxy(o, "$dart_jsFunction", new P._convertToJS_closure());
      return P._getJsProxy(o, "_$dart_jsObject", new P._convertToJS_closure0($.$get$_dartProxyCtor()));
    }, "call$1", "js___convertToJS$closure", 2, 0, 0, 11],
    _getJsProxy: function(o, propertyName, createProxy) {
      var jsProxy = P._getOwnProperty(o, propertyName);
      if (jsProxy == null) {
        jsProxy = createProxy.call$1(o);
        P._defineProperty(o, propertyName, jsProxy);
      }
      return jsProxy;
    },
    _convertToDart: [function(o) {
      var t1, ms;
      if (o == null || typeof o == "string" || typeof o == "number" || typeof o == "boolean")
        return o;
      else {
        if (o instanceof Object) {
          t1 = J.getInterceptor(o);
          t1 = !!t1.$isBlob || !!t1.$isEvent || !!t1.$isKeyRange || !!t1.$isImageData || !!t1.$isNode || !!t1.$isTypedData || !!t1.$isWindow;
        } else
          t1 = false;
        if (t1)
          return o;
        else if (o instanceof Date) {
          ms = o.getTime();
          t1 = new P.DateTime(ms, false);
          t1.DateTime$_withValue$2$isUtc(ms, false);
          return t1;
        } else if (o.constructor === $.$get$_dartProxyCtor())
          return o.o;
        else
          return P._wrapToDart(o);
      }
    }, "call$1", "js___convertToDart$closure", 2, 0, 96, 11],
    _wrapToDart: function(o) {
      if (typeof o == "function")
        return P._getDartProxy(o, $.$get$DART_CLOSURE_PROPERTY_NAME(), new P._wrapToDart_closure());
      if (o instanceof Array)
        return P._getDartProxy(o, $.$get$_DART_OBJECT_PROPERTY_NAME(), new P._wrapToDart_closure0());
      return P._getDartProxy(o, $.$get$_DART_OBJECT_PROPERTY_NAME(), new P._wrapToDart_closure1());
    },
    _getDartProxy: function(o, propertyName, createProxy) {
      var dartProxy = P._getOwnProperty(o, propertyName);
      if (dartProxy == null || !(o instanceof Object)) {
        dartProxy = createProxy.call$1(o);
        P._defineProperty(o, propertyName, dartProxy);
      }
      return dartProxy;
    },
    JsObject: {
      "^": "Object;_jsObject<",
      $index: ["super$JsObject$$index", function(_, property) {
        if (typeof property !== "string" && typeof property !== "number")
          throw H.wrapException(P.ArgumentError$("property is not a String or num"));
        return P._convertToDart(this._jsObject[property]);
      }],
      $indexSet: ["super$JsObject$$indexSet", function(_, property, value) {
        if (typeof property !== "string" && typeof property !== "number")
          throw H.wrapException(P.ArgumentError$("property is not a String or num"));
        this._jsObject[property] = P._convertToJS(value);
      }],
      get$hashCode: function(_) {
        return 0;
      },
      $eq: function(_, other) {
        if (other == null)
          return false;
        return other instanceof P.JsObject && this._jsObject === other._jsObject;
      },
      hasProperty$1: function(property) {
        return property in this._jsObject;
      },
      deleteProperty$1: function(property) {
        if (typeof property !== "string" && typeof property !== "number")
          throw H.wrapException(P.ArgumentError$("property is not a String or num"));
        delete this._jsObject[property];
      },
      toString$0: function(_) {
        var t1, exception;
        try {
          t1 = String(this._jsObject);
          return t1;
        } catch (exception) {
          H.unwrapException(exception);
          return this.super$Object$toString(this);
        }
      },
      callMethod$2: function(method, args) {
        var t1, t2;
        t1 = this._jsObject;
        t2 = args == null ? null : P.List_List$from(J.map$1$ax(args, P.js___convertToJS$closure()), true, null);
        return P._convertToDart(t1[method].apply(t1, t2));
      },
      callMethod$1: function(method) {
        return this.callMethod$2(method, null);
      },
      static: {
        JsObject_JsObject: function($constructor, $arguments) {
          var constr, args, factoryFunction;
          constr = P._convertToJS($constructor);
          if ($arguments == null)
            return P._wrapToDart(new constr());
          if ($arguments instanceof Array)
            switch ($arguments.length) {
              case 0:
                return P._wrapToDart(new constr());
              case 1:
                return P._wrapToDart(new constr(P._convertToJS($arguments[0])));
              case 2:
                return P._wrapToDart(new constr(P._convertToJS($arguments[0]), P._convertToJS($arguments[1])));
              case 3:
                return P._wrapToDart(new constr(P._convertToJS($arguments[0]), P._convertToJS($arguments[1]), P._convertToJS($arguments[2])));
              case 4:
                return P._wrapToDart(new constr(P._convertToJS($arguments[0]), P._convertToJS($arguments[1]), P._convertToJS($arguments[2]), P._convertToJS($arguments[3])));
            }
          args = [null];
          C.JSArray_methods.addAll$1(args, new H.MappedListIterable($arguments, P.js___convertToJS$closure(), [null, null]));
          factoryFunction = constr.bind.apply(constr, args);
          String(factoryFunction);
          return P._wrapToDart(new factoryFunction());
        },
        JsObject_JsObject$fromBrowserObject: function(object) {
          if (typeof object === "number" || typeof object === "string" || typeof object === "boolean" || object == null)
            throw H.wrapException(P.ArgumentError$("object cannot be a num, string, bool, or null"));
          return P._wrapToDart(P._convertToJS(object));
        },
        JsObject_JsObject$jsify: function(object) {
          return P._wrapToDart(P.JsObject__convertDataTree(object));
        },
        JsObject__convertDataTree: function(data) {
          return new P.JsObject__convertDataTree__convert(new P._IdentityHashMap(0, null, null, null, null, [null, null])).call$1(data);
        }
      }
    },
    JsObject__convertDataTree__convert: {
      "^": "Closure:0;_convertedObjects",
      call$1: [function(o) {
        var t1, t2, convertedMap, key, convertedList;
        t1 = this._convertedObjects;
        if (t1.containsKey$1(o))
          return t1.$index(0, o);
        t2 = J.getInterceptor(o);
        if (!!t2.$isMap) {
          convertedMap = {};
          t1.$indexSet(0, o, convertedMap);
          for (t1 = J.get$iterator$ax(o.get$keys()); t1.moveNext$0();) {
            key = t1.get$current();
            convertedMap[key] = this.call$1(t2.$index(o, key));
          }
          return convertedMap;
        } else if (!!t2.$isIterable) {
          convertedList = [];
          t1.$indexSet(0, o, convertedList);
          C.JSArray_methods.addAll$1(convertedList, t2.map$1(o, this));
          return convertedList;
        } else
          return P._convertToJS(o);
      }, null, null, 2, 0, null, 11, "call"]
    },
    JsFunction: {
      "^": "JsObject;_jsObject",
      apply$2$thisArg: function(args, thisArg) {
        var t1, t2;
        t1 = P._convertToJS(thisArg);
        t2 = P.List_List$from(new H.MappedListIterable(args, P.js___convertToJS$closure(), [null, null]), true, null);
        return P._convertToDart(this._jsObject.apply(t1, t2));
      },
      apply$1: function(args) {
        return this.apply$2$thisArg(args, null);
      }
    },
    JsArray: {
      "^": "JsObject_ListMixin;_jsObject,$ti",
      $index: function(_, index) {
        var t1;
        if (typeof index === "number" && index === C.JSNumber_methods.toInt$0(index)) {
          if (typeof index === "number" && Math.floor(index) === index)
            t1 = index < 0 || index >= this.get$length(this);
          else
            t1 = false;
          if (t1)
            H.throwExpression(P.RangeError$range(index, 0, this.get$length(this), null, null));
        }
        return this.super$JsObject$$index(0, index);
      },
      $indexSet: function(_, index, value) {
        var t1;
        if (typeof index === "number" && index === C.JSNumber_methods.toInt$0(index)) {
          if (typeof index === "number" && Math.floor(index) === index)
            t1 = index < 0 || index >= this.get$length(this);
          else
            t1 = false;
          if (t1)
            H.throwExpression(P.RangeError$range(index, 0, this.get$length(this), null, null));
        }
        this.super$JsObject$$indexSet(0, index, value);
      },
      get$length: function(_) {
        var len = this._jsObject.length;
        if (typeof len === "number" && len >>> 0 === len)
          return len;
        throw H.wrapException(new P.StateError("Bad JsArray length"));
      },
      set$length: function(_, $length) {
        this.super$JsObject$$indexSet(0, "length", $length);
      },
      add$1: function(_, value) {
        this.callMethod$2("push", [value]);
      },
      setRange$4: function(_, start, end, iterable, skipCount) {
        var $length, args;
        P.JsArray__checkRange(start, end, this.get$length(this));
        $length = end - start;
        if ($length === 0)
          return;
        args = [start, $length];
        C.JSArray_methods.addAll$1(args, J.skip$1$ax(iterable, skipCount).take$1(0, $length));
        this.callMethod$2("splice", args);
      },
      setRange$3: function($receiver, start, end, iterable) {
        return this.setRange$4($receiver, start, end, iterable, 0);
      },
      $isList: 1,
      $isIterable: 1,
      static: {
        JsArray__checkRange: function(start, end, $length) {
          if (start > $length)
            throw H.wrapException(P.RangeError$range(start, 0, $length, null, null));
          if (end < start || end > $length)
            throw H.wrapException(P.RangeError$range(end, start, $length, null, null));
        }
      }
    },
    JsObject_ListMixin: {
      "^": "JsObject+ListMixin;",
      $asList: null,
      $asEfficientLengthIterable: null,
      $asIterable: null,
      $isList: 1,
      $isEfficientLengthIterable: 1,
      $isIterable: 1
    },
    _convertToJS_closure: {
      "^": "Closure:0;",
      call$1: function(o) {
        var jsFunction = function(_call, f, captureThis) {
          return function() {
            return _call(f, captureThis, this, Array.prototype.slice.apply(arguments));
          };
        }(P._callDartFunction, o, false);
        P._defineProperty(jsFunction, $.$get$DART_CLOSURE_PROPERTY_NAME(), o);
        return jsFunction;
      }
    },
    _convertToJS_closure0: {
      "^": "Closure:0;ctor",
      call$1: function(o) {
        return new this.ctor(o);
      }
    },
    _wrapToDart_closure: {
      "^": "Closure:0;",
      call$1: function(o) {
        return new P.JsFunction(o);
      }
    },
    _wrapToDart_closure0: {
      "^": "Closure:0;",
      call$1: function(o) {
        return new P.JsArray(o, [null]);
      }
    },
    _wrapToDart_closure1: {
      "^": "Closure:0;",
      call$1: function(o) {
        return new P.JsObject(o);
      }
    }
  }], ["dart.math", "dart:math",, P, {
    "^": "",
    _JenkinsSmiHash_combine0: function(hash, value) {
      hash = 536870911 & hash + value;
      hash = 536870911 & hash + ((524287 & hash) << 10);
      return hash ^ hash >>> 6;
    },
    _JenkinsSmiHash_finish0: function(hash) {
      hash = 536870911 & hash + ((67108863 & hash) << 3);
      hash ^= hash >>> 11;
      return 536870911 & hash + ((16383 & hash) << 15);
    },
    min: function(a, b) {
      var t1;
      if (typeof a !== "number")
        throw H.wrapException(P.ArgumentError$(a));
      if (typeof b !== "number")
        throw H.wrapException(P.ArgumentError$(b));
      if (a > b)
        return b;
      if (a < b)
        return a;
      if (typeof b === "number") {
        if (typeof a === "number")
          if (a === 0)
            return (a + b) * a * b;
        if (a === 0)
          t1 = b === 0 ? 1 / b < 0 : b < 0;
        else
          t1 = false;
        if (t1 || isNaN(b))
          return b;
        return a;
      }
      return a;
    },
    max: function(a, b) {
      var t1;
      if (typeof a !== "number")
        throw H.wrapException(P.ArgumentError$(a));
      if (typeof b !== "number")
        throw H.wrapException(P.ArgumentError$(b));
      if (a > b)
        return a;
      if (a < b)
        return b;
      if (typeof b === "number") {
        if (typeof a === "number")
          if (a === 0)
            return a + b;
        if (isNaN(b))
          return b;
        return a;
      }
      if (b === 0)
        t1 = a === 0 ? 1 / a < 0 : a < 0;
      else
        t1 = false;
      if (t1)
        return b;
      return a;
    },
    sqrt: function(x) {
      return Math.sqrt(x);
    },
    _JSRandom: {
      "^": "Object;",
      nextInt$1: function(max) {
        if (max <= 0 || max > 4294967296)
          throw H.wrapException(P.RangeError$("max must be in range 0 < max \u2264 2^32, was " + max));
        return Math.random() * max >>> 0;
      }
    },
    Point: {
      "^": "Object;x>,y>,$ti",
      toString$0: function(_) {
        return "Point(" + H.S(this.x) + ", " + H.S(this.y) + ")";
      },
      $eq: function(_, other) {
        var t1;
        if (other == null)
          return false;
        t1 = J.getInterceptor(other);
        if (!t1.$isPoint)
          return false;
        return J.$eq$(this.x, t1.get$x(other)) && J.$eq$(this.y, t1.get$y(other));
      },
      get$hashCode: function(_) {
        var t1, t2;
        t1 = J.get$hashCode$(this.x);
        t2 = J.get$hashCode$(this.y);
        return P._JenkinsSmiHash_finish0(P._JenkinsSmiHash_combine0(P._JenkinsSmiHash_combine0(0, t1), t2));
      },
      $add: function(_, other) {
        return new P.Point(J.$add$ns(this.x, other.get$x(other)), J.$add$ns(this.y, other.get$y(other)), this.$ti);
      },
      $sub: function(_, other) {
        return new P.Point(J.$sub$n(this.x, other.get$x(other)), J.$sub$n(this.y, other.get$y(other)), this.$ti);
      },
      $mul: function(_, factor) {
        return new P.Point(J.$mul$ns(this.x, factor), J.$mul$ns(this.y, factor), this.$ti);
      }
    }
  }], ["dart.dom.svg", "dart:svg",, P, {
    "^": "",
    AElement: {
      "^": "GraphicsElement;target=",
      $isInterceptor: 1,
      "%": "SVGAElement"
    },
    AnimationElement: {
      "^": "SvgElement;",
      $isInterceptor: 1,
      "%": "SVGAnimateElement|SVGAnimateMotionElement|SVGAnimateTransformElement|SVGAnimationElement|SVGSetElement"
    },
    FEBlendElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEBlendElement"
    },
    FEColorMatrixElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEColorMatrixElement"
    },
    FEComponentTransferElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEComponentTransferElement"
    },
    FECompositeElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFECompositeElement"
    },
    FEConvolveMatrixElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEConvolveMatrixElement"
    },
    FEDiffuseLightingElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEDiffuseLightingElement"
    },
    FEDisplacementMapElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEDisplacementMapElement"
    },
    FEFloodElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEFloodElement"
    },
    FEGaussianBlurElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEGaussianBlurElement"
    },
    FEImageElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEImageElement"
    },
    FEMergeElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEMergeElement"
    },
    FEMorphologyElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEMorphologyElement"
    },
    FEOffsetElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFEOffsetElement"
    },
    FEPointLightElement: {
      "^": "SvgElement;x=,y=",
      "%": "SVGFEPointLightElement"
    },
    FESpecularLightingElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFESpecularLightingElement"
    },
    FESpotLightElement: {
      "^": "SvgElement;x=,y=",
      "%": "SVGFESpotLightElement"
    },
    FETileElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFETileElement"
    },
    FETurbulenceElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFETurbulenceElement"
    },
    FilterElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGFilterElement"
    },
    ForeignObjectElement: {
      "^": "GraphicsElement;height=,width=,x=,y=",
      "%": "SVGForeignObjectElement"
    },
    GeometryElement: {
      "^": "GraphicsElement;",
      "%": "SVGCircleElement|SVGEllipseElement|SVGLineElement|SVGPathElement|SVGPolygonElement|SVGPolylineElement;SVGGeometryElement"
    },
    GraphicsElement: {
      "^": "SvgElement;",
      $isInterceptor: 1,
      "%": "SVGClipPathElement|SVGDefsElement|SVGGElement|SVGSwitchElement;SVGGraphicsElement"
    },
    ImageElement0: {
      "^": "GraphicsElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGImageElement"
    },
    MarkerElement: {
      "^": "SvgElement;",
      $isInterceptor: 1,
      "%": "SVGMarkerElement"
    },
    MaskElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGMaskElement"
    },
    PatternElement: {
      "^": "SvgElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGPatternElement"
    },
    Rect: {
      "^": "Interceptor;height=,width=,x=,y=",
      "%": "SVGRect"
    },
    RectElement: {
      "^": "GeometryElement;height=,width=,x=,y=",
      "%": "SVGRectElement"
    },
    ScriptElement: {
      "^": "SvgElement;",
      $isScriptElement: 1,
      $isInterceptor: 1,
      "%": "SVGScriptElement"
    },
    _AttributeClassSet: {
      "^": "CssClassSetImpl;_svg$_element",
      readClasses$0: function() {
        var classname, s, t1, t2, _i, trimmed;
        classname = this._svg$_element.getAttribute("class");
        s = P.LinkedHashSet_LinkedHashSet(null, null, null, P.String);
        if (classname == null)
          return s;
        for (t1 = classname.split(" "), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          trimmed = J.trim$0$s(t1[_i]);
          if (trimmed.length !== 0)
            s.add$1(0, trimmed);
        }
        return s;
      },
      writeClasses$1: function(s) {
        this._svg$_element.setAttribute("class", s.join$1(0, " "));
      }
    },
    SvgElement: {
      "^": "Element;",
      get$classes: function(receiver) {
        return new P._AttributeClassSet(receiver);
      },
      get$children: function(receiver) {
        return new P.FilteredElementList(receiver, new W._ChildNodeListLazy(receiver));
      },
      get$innerHtml: function(receiver) {
        var t1, cloned, t2, t3;
        t1 = W._ElementFactoryProvider_createElement_tag("div", null);
        cloned = receiver.cloneNode(true);
        t2 = J.getInterceptor$x(t1);
        t3 = t2.get$children(t1);
        cloned.toString;
        t3.addAll$1(0, new P.FilteredElementList(cloned, new W._ChildNodeListLazy(cloned)));
        return t2.get$innerHtml(t1);
      },
      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;
        if (treeSanitizer == null) {
          if (validator == null) {
            t1 = H.setRuntimeTypeInfo([], [W.NodeValidator]);
            validator = new W.NodeValidatorBuilder(t1);
            t1.push(W._Html5NodeValidator$(null));
            t1.push(W._TemplatingNodeValidator$());
            t1.push(new W._SvgNodeValidator());
          }
          treeSanitizer = new W._ValidatingTreeSanitizer(validator);
        }
        html = '<svg version="1.1">' + H.S(svg) + "</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;
      },
      focus$0: function(receiver) {
        return receiver.focus();
      },
      $isSvgElement: 1,
      $isEventTarget: 1,
      $isInterceptor: 1,
      "%": "SVGComponentTransferFunctionElement|SVGDescElement|SVGDiscardElement|SVGFEDistantLightElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEMergeNodeElement|SVGMetadataElement|SVGStopElement|SVGStyleElement|SVGTitleElement;SVGElement"
    },
    SvgSvgElement: {
      "^": "GraphicsElement;height=,width=,x=,y=",
      $isInterceptor: 1,
      "%": "SVGSVGElement"
    },
    SymbolElement: {
      "^": "SvgElement;",
      $isInterceptor: 1,
      "%": "SVGSymbolElement"
    },
    TextContentElement: {
      "^": "GraphicsElement;",
      "%": ";SVGTextContentElement"
    },
    TextPathElement: {
      "^": "TextContentElement;",
      $isInterceptor: 1,
      "%": "SVGTextPathElement"
    },
    TextPositioningElement: {
      "^": "TextContentElement;x=,y=",
      "%": "SVGTSpanElement|SVGTextElement|SVGTextPositioningElement"
    },
    UseElement: {
      "^": "GraphicsElement;height=,width=,x=,y=",
      $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.typed_data", "dart:typed_data",, P, {
    "^": "",
    ByteData: {
      "^": "Object;",
      $isTypedData: 1
    },
    Uint8List: {
      "^": "Object;",
      $isList: 1,
      $asList: function() {
        return [P.$int];
      },
      $isIterable: 1,
      $asIterable: function() {
        return [P.$int];
      },
      $isTypedData: 1,
      $isEfficientLengthIterable: 1,
      $asEfficientLengthIterable: function() {
        return [P.$int];
      }
    }
  }], ["dart.dom.web_audio", "dart:web_audio",, P, {
    "^": "",
    AudioBuffer: {
      "^": "Interceptor;length=",
      $isObject: 1,
      "%": "AudioBuffer"
    },
    AudioBufferSourceNode: {
      "^": "AudioSourceNode;",
      start$3: function(receiver, when, grainOffset, grainDuration) {
        if (!!receiver.start)
          if (grainDuration != null)
            receiver.start(when, grainOffset, grainDuration);
          else
            receiver.start(when, grainOffset);
        else if (grainDuration != null)
          receiver.noteOn(when, grainOffset, grainDuration);
        else
          receiver.noteOn(when, grainOffset);
      },
      start$2: function($receiver, when, grainOffset) {
        return this.start$3($receiver, when, grainOffset, null);
      },
      stop$1: function(receiver, when) {
        if (!!receiver.stop)
          receiver.stop(when);
        else
          receiver.noteOff(when);
      },
      "%": "AudioBufferSourceNode"
    },
    AudioContext: {
      "^": "EventTarget;",
      _decodeAudioData$3: function(receiver, audioData, successCallback, errorCallback) {
        return receiver.decodeAudioData(audioData, H.convertDartClosureToJS(successCallback, 1), H.convertDartClosureToJS(errorCallback, 1));
      },
      createGain$0: function(receiver) {
        if (receiver.createGain !== undefined)
          return receiver.createGain();
        else
          return receiver.createGainNode();
      },
      decodeAudioData$1: function(receiver, audioData) {
        var t1, t2, completer;
        t1 = P.AudioBuffer;
        t2 = new P._Future(0, $.Zone__current, null, [t1]);
        completer = new P._AsyncCompleter(t2, [t1]);
        this._decodeAudioData$3(receiver, audioData, new P.AudioContext_decodeAudioData_closure(completer), new P.AudioContext_decodeAudioData_closure0(completer));
        return t2;
      },
      "%": "AudioContext|OfflineAudioContext|webkitAudioContext"
    },
    AudioContext_decodeAudioData_closure: {
      "^": "Closure:0;completer",
      call$1: [function(value) {
        this.completer.complete$1(0, value);
      }, null, null, 2, 0, null, 12, "call"]
    },
    AudioContext_decodeAudioData_closure0: {
      "^": "Closure:0;completer",
      call$1: [function(error) {
        var t1 = this.completer;
        if (error == null)
          t1.completeError$1("");
        else
          t1.completeError$1(error);
      }, null, null, 2, 0, null, 13, "call"]
    },
    AudioNode: {
      "^": "EventTarget;",
      _connect$3: function(receiver, destination, output, input) {
        return receiver.connect(destination, output, input);
      },
      disconnect$3: function(receiver, destination_OR_output, output, input) {
        return receiver.disconnect(destination_OR_output, output, input);
      },
      disconnect$1: function($receiver, destination_OR_output) {
        return $receiver.disconnect(destination_OR_output);
      },
      "%": "AudioDestinationNode|AudioGainNode|AudioPannerNode|GainNode|PannerNode|webkitAudioPannerNode;AudioNode"
    },
    AudioSourceNode: {
      "^": "AudioNode;",
      "%": ";AudioSourceNode"
    }
  }], ["dart.dom.web_gl", "dart:web_gl",, P, {
    "^": "",
    ContextEvent: {
      "^": "Event;",
      $isContextEvent: 1,
      $isEvent: 1,
      $isObject: 1,
      "%": "WebGLContextEvent"
    },
    RenderingContext: {
      "^": "Interceptor;",
      texImage2D$9: function(receiver, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels) {
        var t1, t2;
        t1 = type == null;
        if (!t1 && format != null && typeof border_OR_canvas_OR_image_OR_pixels_OR_video === "number" && Math.floor(border_OR_canvas_OR_image_OR_pixels_OR_video) === border_OR_canvas_OR_image_OR_pixels_OR_video) {
          receiver.texImage2D(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
          return;
        }
        if (border_OR_canvas_OR_image_OR_pixels_OR_video == null && format == null && t1 && true) {
          receiver.texImage2D(target, level, internalformat, format_OR_width, height_OR_type, P.convertDartToNative_ImageData(border_OR_canvas_OR_image_OR_pixels_OR_video));
          return;
        }
        t2 = J.getInterceptor(border_OR_canvas_OR_image_OR_pixels_OR_video);
        if (!!t2.$isImageElement && format == null && t1 && true) {
          receiver.texImage2D(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
          return;
        }
        if (!!t2.$isCanvasElement && format == null && t1 && true) {
          receiver.texImage2D(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
          return;
        }
        throw H.wrapException(P.ArgumentError$("Incorrect number or type of arguments"));
      },
      texImage2D$6: function($receiver, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video) {
        return this.texImage2D$9($receiver, target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, null, null, null);
      },
      $isRenderingContext: 1,
      "%": "WebGLRenderingContext"
    },
    UniformLocation: {
      "^": "Interceptor;",
      $isObject: 1,
      "%": "WebGLUniformLocation"
    }
  }], ["dart.dom.web_sql", "dart:web_sql",, P, {
    "^": ""
  }], ["", "package:collection/src/equality.dart",, U, {
    "^": "",
    DefaultEquality: {
      "^": "Object;"
    },
    ListEquality: {
      "^": "Object;_elementEquality",
      equals$2: function(e1, e2) {
        var $length, i;
        if (e1 === e2)
          return true;
        $length = e1.length;
        if ($length !== e2.length)
          return false;
        for (i = 0; i < $length; ++i)
          if (!J.$eq$(e1[i], e2[i]))
            return false;
        return true;
      }
    }
  }], ["stagexl.animation", "package:stagexl/src/animation.dart",, K, {
    "^": "",
    Animatable: {
      "^": "Object;"
    },
    _AnimatableLink: {
      "^": "Object;animatable,nextAnimatableLink"
    },
    Juggler: {
      "^": "Object;_firstAnimatableLink,_lastAnimatableLink,_elapsedTime,_elapsedTimeChangedEvent",
      add$1: function(_, animatable) {
        var animatableLink, t1;
        if (!this.contains$1(0, animatable)) {
          animatableLink = new K._AnimatableLink(null, null);
          t1 = this._lastAnimatableLink;
          t1.animatable = animatable;
          t1.nextAnimatableLink = animatableLink;
          this._lastAnimatableLink = animatableLink;
        }
      },
      contains$1: function(_, animatable) {
        var link, t1;
        link = this._firstAnimatableLink;
        for (t1 = this._lastAnimatableLink; link == null ? t1 != null : link !== t1;) {
          link.animatable;
          link = link.nextAnimatableLink;
        }
        return false;
      },
      advanceTime$1: function(time) {
        var t1, t2, link, lastLink, nextLink;
        t1 = this._elapsedTime += time;
        t2 = this._elapsedTimeChangedEvent;
        if (!t2.get$_mayAddEvent())
          H.throwExpression(t2._addEventError$0());
        t2._sendData$1(t1);
        link = this._firstAnimatableLink;
        lastLink = this._lastAnimatableLink;
        for (; link !== lastLink;) {
          nextLink = link.nextAnimatableLink;
          link.animatable = nextLink.animatable;
          link.nextAnimatableLink = nextLink.nextAnimatableLink;
          if (nextLink == null ? lastLink == null : nextLink === lastLink)
            lastLink = link;
          t1 = this._lastAnimatableLink;
          if (nextLink == null ? t1 == null : nextLink === t1)
            this._lastAnimatableLink = link;
        }
        return true;
      }
    }
  }], ["stagexl.display", "package:stagexl/src/display.dart",, A, {
    "^": "",
    Bitmap: {
      "^": "DisplayObject;bitmapData,displayObjectID,_display$_x,_display$_y,_pivotX,_pivotY,_scaleX,_scaleY,_skewX,_skewY,_rotation,_alpha,_visible,_off,_mask,_blendMode,_filters,_cache,_display$_name,_parent,_transformationMatrix,_transformationMatrixRefresh,userData,_pixelRatio,_eventStreams",
      get$bounds: function() {
        var t1, t2;
        t1 = this.bitmapData;
        t2 = [P.num];
        return t1 == null ? new U.Rectangle0(0, 0, 0, 0, t2) : new U.Rectangle0(0, 0, t1.width, t1.height, t2);
      },
      hitTestInput$2: function(localX, localY) {
        var t1 = this.bitmapData;
        if (t1 == null)
          return;
        if (localX < 0 || localX >= t1.width)
          return;
        if (localY < 0 || localY >= t1.height)
          return;
        return this;
      },
      render$1: function(renderState) {
        var t1 = this.bitmapData;
        if (t1 != null)
          renderState._engine$_renderContext.renderTextureQuad$2(renderState, t1.renderTextureQuad);
      },
      renderFiltered$1: function(renderState) {
        var t1 = this.bitmapData;
        if (t1 != null)
          renderState._engine$_renderContext.renderTextureQuadFiltered$3(renderState, t1.renderTextureQuad, this._filters);
      }
    },
    BitmapData: {
      "^": "Object;width>,height>,renderTextureQuad",
      clone$1: function(_, pixelRatio) {
        var t1, t2, bitmapData, updateBatch, sourceQuad, renderState;
        pixelRatio = this.renderTextureQuad.pixelRatio;
        t1 = this.width;
        t2 = this.height;
        bitmapData = A.BitmapData_BitmapData(t1, t2, 16777215, pixelRatio);
        updateBatch = A.BitmapDataUpdateBatch$(bitmapData);
        sourceQuad = this.renderTextureQuad.cut$1(new U.Rectangle0(0, 0, t1, t2, [P.num]));
        renderState = L.RenderState$(updateBatch._renderContext, updateBatch._drawMatrix, 1, null);
        renderState._currentContextState.matrix.prependTranslation$2(0, 0);
        renderState._engine$_renderContext.renderTextureQuad$2(renderState, sourceQuad);
        updateBatch.bitmapData.renderTextureQuad.renderTexture.update$0();
        return bitmapData;
      },
      clone$0: function($receiver) {
        return this.clone$1($receiver, null);
      },
      static: {
        BitmapData$fromRenderTextureQuad: function(renderTextureQuad) {
          var t1, t2;
          t1 = renderTextureQuad.offsetRectangle;
          t2 = renderTextureQuad.pixelRatio;
          return new A.BitmapData(t1.width / t2, t1.height / t2, renderTextureQuad);
        },
        BitmapData_BitmapData: function(width, height, fillColor, pixelRatio) {
          var t1 = L.RenderTexture$(C.JSNumber_methods.round$0(width * pixelRatio), C.JSNumber_methods.round$0(height * pixelRatio), fillColor).get$quad();
          return A.BitmapData$fromRenderTextureQuad(L.RenderTextureQuad$(t1.renderTexture, t1.sourceRectangle, t1.offsetRectangle, t1.rotation, pixelRatio));
        },
        BitmapData_load: function(url, bitmapDataLoadOptions) {
          var $async$goto = 0, $async$completer = new P.Completer_Completer$sync(), $async$returnValue, $async$handler = 2, $async$currentError, pixelRatioMatch, maxPixelRatio, corsEnabled, t1, originPixelRatio, loaderPixelRatio, pixelRatio, t2, t3, imageLoader, image, renderTexture;
          var $async$BitmapData_load = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
            if ($async$errorCode === 1) {
              $async$currentError = $async$result;
              $async$goto = $async$handler;
            }
            while (true)
              switch ($async$goto) {
                case 0:
                  // Function start
                  pixelRatioMatch = P.RegExp_RegExp("@(\\d)x", true, false).firstMatch$1(url);
                  maxPixelRatio = bitmapDataLoadOptions.maxPixelRatio;
                  corsEnabled = bitmapDataLoadOptions.corsEnabled;
                  if (pixelRatioMatch != null) {
                    t1 = pixelRatioMatch._match;
                    originPixelRatio = H.Primitives_parseInt(t1[1], null, null);
                    loaderPixelRatio = V.minInt(J.round$0$n($.$get$devicePixelRatio()), maxPixelRatio);
                    pixelRatio = loaderPixelRatio / originPixelRatio;
                    t2 = t1.index;
                    url = C.JSString_methods.replaceRange$3(url, t2, t2 + t1[0].length, "@" + loaderPixelRatio + "x");
                  } else
                    pixelRatio = 1;
                  t1 = W.ImageElement_ImageElement(null, null, null);
                  t2 = W.ImageElement;
                  t3 = new P._Future(0, $.Zone__current, null, [t2]);
                  imageLoader = new N.ImageLoader(t1, new P._AsyncCompleter(t3, [t2]), url, null, null);
                  t1.toString;
                  t2 = W.Event;
                  imageLoader._onLoadSubscription = W._EventStreamSubscription$(t1, "load", imageLoader.get$_onImageLoad(), false, t2);
                  imageLoader._image_loader$_onErrorSubscription = W._EventStreamSubscription$(t1, "error", imageLoader.get$_onImageError(), false, t2);
                  if (corsEnabled)
                    t1.crossOrigin = "anonymous";
                  t1.src = url;
                  $async$goto = 3;
                  return P._asyncHelper(t3, $async$BitmapData_load, $async$completer);
                case 3:
                  // returning from await.
                  image = $async$result;
                  renderTexture = new L.RenderTexture(0, 0, null, null, C.RenderTextureFiltering_9729, null, -1, false, null, null, -1);
                  renderTexture._engine$_width = V.ensureInt(image.width);
                  renderTexture._engine$_height = V.ensureInt(image.height);
                  renderTexture._engine$_source = image;
                  t1 = renderTexture.get$quad();
                  $async$returnValue = A.BitmapData$fromRenderTextureQuad(L.RenderTextureQuad$(t1.renderTexture, t1.sourceRectangle, t1.offsetRectangle, t1.rotation, pixelRatio));
                  // goto return
                  $async$goto = 1;
                  break;
                case 1:
                  // return
                  return P._asyncHelper($async$returnValue, 0, $async$completer);
                case 2:
                  // rethrow
                  return P._asyncHelper($async$currentError, 1, $async$completer);
              }
          });
          return P._asyncHelper(null, $async$BitmapData_load, $async$completer);
        }
      }
    },
    BitmapDataLoadOptions: {
      "^": "Object;png,jpg,webp,maxPixelRatio,corsEnabled<"
    },
    BitmapDataUpdateBatch: {
      "^": "Object;bitmapData,_renderContext<,_drawMatrix",
      getPixel32$2: function(x, y) {
        var t1, t2, t3, rL, rT, t4, renderTextureQuad, isLittleEndianSystem, imageData, pixels, data, r, g, b, a, i;
        t1 = [P.$int];
        t2 = this.bitmapData.renderTextureQuad;
        t3 = t2.pixelRatio;
        rL = C.JSNumber_methods.round$0(x * t3);
        rT = C.JSNumber_methods.round$0(y * t3);
        t4 = t2.offsetRectangle;
        renderTextureQuad = L.RenderTextureQuad_RenderTextureQuad$slice(t2, new U.Rectangle0(rL, rT, C.JSNumber_methods.round$0((x + 1) * t3) - rL, C.JSNumber_methods.round$0((y + 1) * t3) - rT, t1), new U.Rectangle0(0 - rL, 0 - rT, t4.width, t4.height, t1), 0);
        t1 = renderTextureQuad.sourceRectangle;
        if (t1.width <= 0 || t1.height <= 0)
          return 16777215;
        isLittleEndianSystem = $.$get$isLittleEndianSystem();
        imageData = renderTextureQuad.getImageData$0(0);
        t1 = J.getInterceptor$x(imageData);
        pixels = t1.get$width(imageData) * t1.get$height(imageData);
        data = t1.get$data(imageData);
        for (t1 = data.length - 4, r = 0, g = 0, b = 0, a = 0, i = 0; i <= t1; i += 4) {
          r += isLittleEndianSystem ? data[i] : data[i + 3];
          g += isLittleEndianSystem ? data[i + 1] : data[i + 2];
          b += isLittleEndianSystem ? data[i + 2] : data[i + 1];
          a += isLittleEndianSystem ? data[i + 3] : data[i];
        }
        r = C.JSInt_methods.$tdiv(r, pixels);
        g = C.JSInt_methods.$tdiv(g, pixels);
        b = C.JSInt_methods.$tdiv(b, pixels);
        return (C.JSInt_methods.$tdiv(a, pixels) << 24 >>> 0) + (r << 16 >>> 0) + (g << 8 >>> 0) + b;
      },
      static: {
        BitmapDataUpdateBatch$: function(bitmapData) {
          var t1, t2, t3, t4;
          t1 = bitmapData.renderTextureQuad;
          t2 = t1.renderTexture;
          t2 = t2.get$canvas(t2);
          t3 = T.Matrix$fromIdentity();
          t2.toString;
          t4 = L.RenderContextEvent;
          t4 = new L.RenderContextCanvas(t2, t2.getContext("2d"), t3, C.BlendMode_bZz, 1, P.StreamController_StreamController$broadcast(null, null, false, t4), P.StreamController_StreamController$broadcast(null, null, false, t4));
          t4.reset$0(0);
          return new A.BitmapDataUpdateBatch(bitmapData, t4, t1.get$drawMatrix());
        }
      }
    },
    BitmapFilter: {
      "^": "RenderFilter;",
      get$overlap: function() {
        return new U.Rectangle0(0, 0, 0, 0, [P.$int]);
      },
      apply$2: function(bitmapData, rectangle) {
      },
      apply$1: function(bitmapData) {
        return this.apply$2(bitmapData, null);
      },
      renderFilter$3: function(renderState, renderTextureQuad, pass) {
        renderState._engine$_renderContext.renderTextureQuad$2(renderState, renderTextureQuad);
      }
    },
    DisplayObject: {
      "^": "EventDispatcher;_parent?,_pixelRatio<",
      get$x: function(_) {
        return this._display$_x;
      },
      set$x: ["super$DisplayObject$x", function(_, value) {
        this._display$_x = value;
        this._transformationMatrixRefresh = true;
      }],
      get$y: function(_) {
        return this._display$_y;
      },
      set$y: function(_, value) {
        this._display$_y = value;
        this._transformationMatrixRefresh = true;
      },
      set$pivotX: function(value) {
        this._pivotX = value;
        this._transformationMatrixRefresh = true;
      },
      set$pivotY: function(value) {
        this._pivotY = value;
        this._transformationMatrixRefresh = true;
      },
      set$scaleX: function(value) {
        this._scaleX = value;
        this._transformationMatrixRefresh = true;
      },
      set$scaleY: function(value) {
        this._scaleY = value;
        this._transformationMatrixRefresh = true;
      },
      set$skewX: function(value) {
        this._skewX = value;
        this._transformationMatrixRefresh = true;
      },
      set$skewY: function(value) {
        this._skewY = value;
        this._transformationMatrixRefresh = true;
      },
      set$rotation: function(value) {
        this._rotation = value;
        this._transformationMatrixRefresh = true;
      },
      get$visible: function() {
        return true;
      },
      get$off: function() {
        return false;
      },
      get$pixelRatio: function() {
        return this.get$_pixelRatio();
      },
      get$mask: function(_) {
        return this._mask;
      },
      get$filters: function() {
        return this._filters;
      },
      get$root: function() {
        var obj, obj0;
        for (obj = this; obj0 = obj._parent, obj0 != null; obj = obj0)
          ;
        return obj;
      },
      get$stage: function() {
        var root = this.get$root();
        return root instanceof A.Stage ? root : null;
      },
      get$width: function(_) {
        return this.get$boundsTransformed().width;
      },
      get$height: function(_) {
        return this.get$boundsTransformed().height;
      },
      get$transformationMatrix: function() {
        var matrix, rotation, scaleX, scaleY, skewX, skewY, t1, ma, mb, mc, md, t2, t3;
        if (this._transformationMatrixRefresh) {
          this._transformationMatrixRefresh = false;
          matrix = this._transformationMatrix;
          rotation = this._rotation;
          scaleX = this._scaleX;
          scaleY = this._scaleY;
          skewX = this._skewX;
          skewY = this._skewY;
          if (scaleX > -0.0001 && scaleX < 0.0001)
            scaleX = scaleX >= 0 ? 0.0001 : -0.0001;
          if (scaleY > -0.0001 && scaleY < 0.0001)
            scaleY = scaleY >= 0 ? 0.0001 : -0.0001;
          if (skewX !== 0 || skewY !== 0) {
            t1 = skewY + rotation;
            ma = scaleX * Math.cos(t1);
            mb = scaleX * Math.sin(t1);
            t1 = skewX + rotation;
            mc = -scaleY * Math.sin(t1);
            md = scaleY * Math.cos(t1);
            t1 = this._display$_x;
            t2 = this._pivotX;
            t3 = this._pivotY;
            matrix.setTo$6(ma, mb, mc, md, t1 - t2 * ma - t3 * mc, this._display$_y - t2 * mb - t3 * md);
          } else if (rotation !== 0) {
            t1 = Math.cos(rotation);
            t2 = Math.sin(rotation);
            ma = scaleX * t1;
            mb = scaleX * t2;
            mc = -scaleY * t2;
            md = scaleY * t1;
            t1 = this._display$_x;
            t2 = this._pivotX;
            t3 = this._pivotY;
            matrix.setTo$6(ma, mb, mc, md, t1 - t2 * ma - t3 * mc, this._display$_y - t2 * mb - t3 * md);
          } else
            matrix.setTo$6(scaleX, 0, 0, scaleY, this._display$_x - this._pivotX * scaleX, this._display$_y - this._pivotY * scaleY);
        }
        return this._transformationMatrix;
      },
      get$globalTransformationMatrix3D: function() {
        var result, obj;
        result = new T.Matrix3D(new Float32Array(H._checkLength(16)));
        result.setIdentity$0();
        for (obj = this; obj != null; obj = obj._parent)
          result.concat2D$1(obj.get$transformationMatrix());
        return result;
      },
      getTransformationMatrix3D$1: function(targetSpace) {
        return this.get$globalTransformationMatrix3D();
      },
      removeFromParent$0: function() {
        var t1 = this._parent;
        if (t1 != null)
          t1.removeChild$1(this);
      },
      get$bounds: function() {
        return new U.Rectangle0(0, 0, 0, 0, [P.num]);
      },
      get$boundsTransformed: function() {
        var rectangle = this.get$bounds();
        return this.get$transformationMatrix().transformRectangle$2(rectangle, rectangle);
      },
      getBounds$1: function(targetSpace) {
        var rectangle, matrix;
        rectangle = this.get$bounds();
        matrix = this.getTransformationMatrix3D$1(targetSpace);
        if (matrix == null)
          return;
        return matrix.transformRectangle$2(rectangle, rectangle);
      },
      hitTestInput$2: function(localX, localY) {
        return this.get$bounds().contains$2(0, localX, localY) ? this : null;
      },
      globalToLocal$2: function(globalPoint, returnPoint) {
        returnPoint.x = J.toDouble$0$n(globalPoint.x);
        returnPoint.y = J.toDouble$0$n(globalPoint.y);
        this._globalToLocalRecursion$1(returnPoint);
        return returnPoint;
      },
      _globalToLocalRecursion$1: function(point) {
        var t1, x, y, t2, t3, t4, t5, t6, t7;
        t1 = this._parent;
        if (t1 != null)
          t1._globalToLocalRecursion$1(point);
        x = J.toDouble$0$n(point.x);
        y = J.toDouble$0$n(point.y);
        t1 = this.get$transformationMatrix()._data;
        t2 = t1[3];
        t3 = x - t1[4];
        t4 = t1[2];
        t5 = y - t1[5];
        t6 = t1[0];
        t1 = t1[1];
        t7 = t6 * t2 - t1 * t4;
        point.x = (t2 * t3 - t4 * t5) / t7;
        point.y = (t6 * t5 - t1 * t3) / t7;
      },
      dispatchEvent$1: function(_, $event) {
        var ancestors, p, i, t1;
        ancestors = H.setRuntimeTypeInfo([], [R.EventDispatcher]);
        for (p = this._parent; p != null; p = p._parent)
          ancestors.push(p);
        i = ancestors.length - 1;
        while (true) {
          if (!(i >= 0 && $event.get$captures()))
            break;
          ancestors[i].dispatchEventRaw$3($event, this, C.EventPhase_0);
          if ($event._isPropagationStopped)
            return;
          --i;
        }
        this.dispatchEventRaw$3($event, this, C.EventPhase_1);
        if ($event._isPropagationStopped)
          return;
        t1 = $event._bubbles;
        i = 0;
        while (true) {
          if (!(i < ancestors.length && t1))
            break;
          ancestors[i].dispatchEventRaw$3($event, this, C.EventPhase_2);
          if ($event._isPropagationStopped)
            return;
          ++i;
        }
      },
      render$1: function(renderState) {
      },
      renderFiltered$1: ["super$DisplayObject$renderFiltered", function(renderState) {
        renderState._engine$_renderContext.renderObjectFiltered$2(renderState, this);
      }]
    },
    DisplayObjectChildren: {
      "^": "Object;parent,_children",
      add$1: function(_, displayObject) {
        var t1 = this.parent;
        t1.addChildAt$2(displayObject, t1._children.length);
      },
      addAll$1: function(_, displayObjects) {
        var t1, t2, t3, _i;
        for (t1 = displayObjects.length, t2 = this.parent, t3 = t2._children, _i = 0; _i < displayObjects.length; displayObjects.length === t1 || (0, H.throwConcurrentModificationError)(displayObjects), ++_i)
          t2.addChildAt$2(displayObjects[_i], t3.length);
      },
      indexOf$1: function(_, displayObject) {
        return C.JSArray_methods.indexOf$1(this._children, displayObject);
      },
      $index: function(_, index) {
        return this._children[index];
      },
      $indexSet: function(_, index, displayObject) {
        this.parent.replaceChildAt$2(displayObject, index);
      },
      elementAt$1: function(_, index) {
        return this._children[index];
      },
      get$isEmpty: function(_) {
        return this._children.length === 0;
      },
      get$iterator: function(_) {
        var t1 = this._children;
        return new J.ArrayIterator(t1, t1.length, 0, null);
      },
      get$length: function(_) {
        return this._children.length;
      },
      map$1: function(_, f) {
        return new H.MappedListIterable(this._children, f, [null, null]);
      },
      toList$1$growable: function(_, growable) {
        var t1, t2;
        t1 = this._children;
        t2 = [H.getTypeArgumentByIndex(t1, 0)];
        if (growable)
          t1 = H.setRuntimeTypeInfo(t1.slice(), t2);
        else {
          t1 = H.setRuntimeTypeInfo(t1.slice(), t2);
          t1.fixed$length = Array;
          t1 = t1;
        }
        return t1;
      },
      toList$0: function($receiver) {
        return this.toList$1$growable($receiver, true);
      },
      $isIterable: 1,
      $asIterable: function() {
        return [A.DisplayObject];
      }
    },
    DisplayObjectContainer: {
      "^": "InteractiveObject;",
      addChildAt$2: function(child, index) {
        var t1, childIndex, ancestor, root;
        if (index < 0 || index > this._children.length)
          throw H.wrapException(P.ArgumentError$("The supplied index is out of bounds."));
        if (child === this)
          throw H.wrapException(P.ArgumentError$("An object cannot be added as a child of itself."));
        t1 = child._parent;
        if (t1 === this) {
          t1 = this._children;
          C.JSArray_methods.remove$1(t1, child);
          C.JSArray_methods.insert$2(t1, index > t1.length ? index - 1 : index, child);
        } else {
          if (t1 != null) {
            childIndex = C.JSArray_methods.indexOf$1(t1._children, child);
            if (childIndex === -1)
              H.throwExpression(P.ArgumentError$("The supplied DisplayObject must be a child of the caller."));
            t1.removeChildAt$1(childIndex);
          }
          for (ancestor = this; ancestor != null; ancestor = ancestor._parent)
            if (ancestor == null ? child == null : ancestor === child)
              throw H.wrapException(P.ArgumentError$("An object cannot be added as a child to one of it's children (or children's children, etc.)."));
          C.JSArray_methods.insert$2(this._children, index, child);
          child._parent = this;
          child.dispatchEvent$1(0, new R.Event0("added", true, C.EventPhase_1, null, null, false, false));
          root = this.get$root();
          if ((root instanceof A.Stage ? root : null) != null)
            this._dispatchStageEvents$2(child, "addedToStage");
        }
      },
      removeChild$1: function(child) {
        var childIndex = C.JSArray_methods.indexOf$1(this._children, child);
        if (childIndex === -1)
          throw H.wrapException(P.ArgumentError$("The supplied DisplayObject must be a child of the caller."));
        this.removeChildAt$1(childIndex);
      },
      removeChildAt$1: function(index) {
        var t1, child, root;
        if (index < 0 || index >= this._children.length)
          throw H.wrapException(P.ArgumentError$("The supplied index is out of bounds."));
        t1 = this._children;
        child = t1[index];
        child.dispatchEvent$1(0, new R.Event0("removed", true, C.EventPhase_1, null, null, false, false));
        root = this.get$root();
        if ((root instanceof A.Stage ? root : null) != null)
          this._dispatchStageEvents$2(child, "removedFromStage");
        child._parent = null;
        C.JSArray_methods.removeAt$1(t1, index);
      },
      removeChildren$2: function(beginIndex, endIndex) {
        var t1, $length, t2, i;
        t1 = this._children;
        $length = t1.length;
        if ($length === 0)
          return;
        if (beginIndex == null)
          beginIndex = 0;
        endIndex = $length - 1;
        t2 = endIndex < 0 || beginIndex >= $length || endIndex >= $length;
        if (t2)
          throw H.wrapException(P.ArgumentError$("The supplied index is out of bounds."));
        for (i = beginIndex; i <= endIndex; ++i) {
          if (beginIndex >= t1.length)
            break;
          this.removeChildAt$1(beginIndex);
        }
      },
      removeChildren$0: function() {
        return this.removeChildren$2(null, null);
      },
      removeChildren$1: function(beginIndex) {
        return this.removeChildren$2(beginIndex, null);
      },
      replaceChildAt$2: function(child, index) {
        var t1, oldChild, $parent;
        if (index < 0 || index >= this._children.length)
          throw H.wrapException(P.ArgumentError$("The supplied index is out of bounds."));
        t1 = this._children;
        oldChild = t1[index];
        if (child === this)
          throw H.wrapException(P.ArgumentError$("An object cannot be added as a child of itself."));
        if (child._parent === this) {
          if (C.JSArray_methods.indexOf$1(t1, child) === index)
            return;
          throw H.wrapException(P.ArgumentError$("The display object is already a child of this container."));
        }
        child.removeFromParent$0();
        for ($parent = this._parent; $parent != null; $parent = $parent._parent)
          if ($parent === child)
            throw H.wrapException(P.ArgumentError$("An object cannot be added as a child to one of it's children (or children's children, etc.)."));
        this._dispatchRemovedEvents$1(oldChild);
        oldChild.set$_parent(null);
        child._parent = this;
        t1[index] = child;
        this._dispatchAddedEvents$1(child);
      },
      get$bounds: function() {
        var t1, left, $top, right, bottom, i, rectangle, left0, top0, right0, bottom0;
        t1 = this._children;
        if (t1.length === 0)
          return A.DisplayObject.prototype.get$bounds.call(this);
        for (left = 1 / 0, $top = 1 / 0, right = -1 / 0, bottom = -1 / 0, i = 0; i < t1.length; ++i) {
          rectangle = t1[i].get$boundsTransformed();
          left0 = rectangle.left;
          if (left0 < left)
            left = left0;
          top0 = rectangle.top;
          if (top0 < $top)
            $top = top0;
          right0 = left0 + rectangle.width;
          if (right0 > right)
            right = right0;
          bottom0 = top0 + rectangle.height;
          if (bottom0 > bottom)
            bottom = bottom0;
        }
        return new U.Rectangle0(left, $top, right - left, bottom - $top, [P.num]);
      },
      hitTestInput$2: ["super$DisplayObjectContainer$hitTestInput", function(localX, localY) {
        var t1, i, hit, child, mask, matrix, t2, deltaX, deltaY, t3, t4, t5, t6, childX, childY, displayObject;
        localX.toString;
        localY.toString;
        for (t1 = this._children, i = t1.length - 1, hit = null; i >= 0; --i) {
          child = t1[i];
          mask = J.get$mask$x(child);
          matrix = child.get$transformationMatrix();
          if (child.get$visible()) {
            child.get$off();
            t2 = true;
          } else
            t2 = false;
          if (t2) {
            t2 = matrix._data;
            deltaX = localX - t2[4];
            deltaY = localY - t2[5];
            t3 = t2[3];
            t4 = t2[2];
            t5 = t2[0];
            t2 = t2[1];
            t6 = t5 * t3 - t2 * t4;
            childX = (t3 * deltaX - t4 * deltaY) / t6;
            childY = (t5 * deltaY - t2 * deltaX) / t6;
            if (mask != null) {
              mask.get$relativeToParent();
              mask.get$relativeToParent();
              if (!mask.hitTest$2(childX, childY))
                continue;
            }
            displayObject = child.hitTestInput$2(childX, childY);
            if (displayObject == null)
              continue;
            if (!!displayObject.$isInteractiveObject && displayObject.mouseEnabled)
              return displayObject;
            hit = this;
          }
        }
        return hit;
      }],
      render$1: ["super$DisplayObjectContainer$render", function(renderState) {
        var t1, i, child;
        for (t1 = this._children, i = 0; i < t1.length; ++i) {
          child = t1[i];
          child._off;
          renderState.renderObject$1(child);
        }
      }],
      _dispatchAddedEvents$1: function(child) {
        child.dispatchEvent$1(0, new R.Event0("added", true, C.EventPhase_1, null, null, false, false));
        if (this.get$stage() != null)
          this._dispatchStageEvents$2(child, "addedToStage");
      },
      _dispatchRemovedEvents$1: function(child) {
        child.dispatchEvent$1(0, new R.Event0("removed", true, C.EventPhase_1, null, null, false, false));
        if (this.get$stage() != null)
          this._dispatchStageEvents$2(child, "removedFromStage");
      },
      _dispatchStageEvents$2: function(child, eventType) {
        var captured, obj;
        captured = false;
        obj = this;
        while (true) {
          if (!(obj != null && !captured))
            break;
          if (obj.hasEventListener$2$useCapture(eventType, true))
            captured = true;
          obj = obj._parent;
        }
        this._dispatchStageEventsRecursion$3(child, new R.Event0(eventType, false, C.EventPhase_1, null, null, false, false), captured);
      },
      _dispatchStageEventsRecursion$3: function(displayObject, $event, captured) {
        var t1, children, i;
        t1 = !captured;
        if (!t1 || displayObject.hasEventListener$1($event._type))
          displayObject.dispatchEvent$1(0, $event);
        if (displayObject instanceof A.DisplayObjectContainer) {
          captured = !t1 || displayObject.hasEventListener$2$useCapture($event._type, true);
          children = displayObject._children;
          for (i = 0; i < children.length; ++i)
            this._dispatchStageEventsRecursion$3(children[i], $event, captured);
        }
      }
    },
    InteractiveObject: {
      "^": "DisplayObject;mouseCursor<,tabIndex'"
    },
    Mask: {
      "^": "Object;transformationMatrix<,relativeToParent<"
    },
    _TransformedMask: {
      "^": "Mask;",
      hitTest$2: function(x, y) {
        var t1, deltaX, deltaY, t2, t3, t4, t5;
        t1 = this.transformationMatrix._data;
        deltaX = x - t1[4];
        deltaY = y - t1[5];
        t2 = t1[3];
        t3 = t1[2];
        t4 = t1[0];
        t1 = t1[1];
        t5 = t4 * t2 - t1 * t3;
        return this.rectangle.contains$2(0, (t2 * deltaX - t3 * deltaY) / t5, (t4 * deltaY - t1 * deltaX) / t5);
      },
      renderMask$1: function(renderState) {
        var globalMatrix, t1, renderContext, t2, t3, l, t, r, b;
        globalMatrix = renderState._currentContextState.matrix;
        t1 = this.globalMatrixOriginal;
        t1.copyFrom$1(globalMatrix);
        globalMatrix.copyFromAndConcat$2(this.transformationMatrix, globalMatrix);
        renderContext = renderState._engine$_renderContext;
        t2 = J.getInterceptor(renderContext);
        t3 = this.rectangle;
        if (!!t2.$isRenderContextCanvas) {
          t2.setTransform$1(renderContext, renderState._currentContextState.matrix);
          renderContext._renderingContext.rect(t3.left, t3.top, t3.width, t3.height);
        } else {
          l = t3.left;
          t = t3.top;
          r = l + t3.width;
          b = t + t3.height;
          renderContext.renderTriangle$8(renderState, l, t, r, t, r, b, 4294902015);
          renderContext.renderTriangle$8(renderState, l, t, r, b, l, b, 4294902015);
        }
        globalMatrix.copyFrom$1(t1);
      }
    },
    _RectangleMask: {
      "^": "_TransformedMask;rectangle,globalMatrixOriginal,transformationMatrix,relativeToParent,border,borderColor,borderWidth"
    },
    RenderLoop: {
      "^": "RenderLoopBase;juggler,_stages,_invalidate,_currentTime,_enterFrameEvent,_exitFrameEvent,_renderEvent,_running",
      addStage$1: function(stage) {
        var t1 = stage._renderLoop;
        if (t1 != null)
          t1.removeStage$1(stage);
        this._stages.push(stage);
        stage._renderLoop = this;
      },
      removeStage$1: function(stage) {
        if (stage._renderLoop === this) {
          C.JSArray_methods.remove$1(this._stages, stage);
          stage._renderLoop = null;
        }
      },
      advanceTime$1: function(deltaTime) {
        var t1, i, t2, t3, t4, t5, t6, t7;
        this._currentTime += deltaTime;
        t1 = this._enterFrameEvent;
        t1.passedTime = deltaTime;
        R._dispatchBroadcastEvent(t1, $.$get$_enterFrameSubscriptions());
        this.juggler.advanceTime$1(deltaTime);
        for (t1 = this._stages, i = 0; i < t1.length; ++i)
          t1[i].juggler.advanceTime$1(deltaTime);
        for (i = 0; i < t1.length; ++i) {
          t2 = t1[i];
          t3 = this._currentTime;
          t4 = t2._stageRenderMode;
          if (t4 === C.StageRenderMode_0 || t4 === C.StageRenderMode_2) {
            t2._updateCanvasSize$0();
            t2._renderContext.reset$0(0);
            t2._renderContext.clear$1(0, t2.backgroundColor);
            t4 = t2._renderState;
            t5 = t2._stageTransformation;
            t6 = t4._firstContextState;
            t4._currentContextState = t6;
            t4 = t6.matrix;
            t7 = t4._data;
            t7[0] = 1;
            t7[1] = 0;
            t7[2] = 0;
            t7[3] = 1;
            t7[4] = 0;
            t7[5] = 0;
            t6.alpha = 1;
            t6.blendMode = C.BlendMode_bZz;
            t4.copyFrom$1(t5);
            t2._renderState.currentTime = V.ensureNum(t3);
            t2._renderState.deltaTime = V.ensureNum(deltaTime);
            t2._renderState.renderObject$1(t2);
            t2._renderState._engine$_renderContext.flush$0(0);
            if (t2._stageRenderMode === C.StageRenderMode_2)
              t2._stageRenderMode = C.StageRenderMode_1;
          }
        }
        R._dispatchBroadcastEvent(this._exitFrameEvent, $.$get$_exitFrameSubscriptions());
      }
    },
    Shape: {
      "^": "DisplayObject;graphics,displayObjectID,_display$_x,_display$_y,_pivotX,_pivotY,_scaleX,_scaleY,_skewX,_skewY,_rotation,_alpha,_visible,_off,_mask,_blendMode,_filters,_cache,_display$_name,_parent,_transformationMatrix,_transformationMatrixRefresh,userData,_pixelRatio,_eventStreams",
      get$bounds: function() {
        return this.graphics.get$bounds();
      },
      hitTestInput$2: function(localX, localY) {
        if (this.graphics.hitTest$2(localX, localY))
          return this;
        return;
      },
      render$1: function(renderState) {
        this.graphics.render$1(renderState);
      }
    },
    Sprite: {
      "^": "DisplayObjectContainer;_graphics,dropTarget,hitArea,_children,_mouseChildren,_tabChildren,doubleClickEnabled,mouseEnabled,mouseCursor,tabEnabled,tabIndex,displayObjectID,_display$_x,_display$_y,_pivotX,_pivotY,_scaleX,_scaleY,_skewX,_skewY,_rotation,_alpha,_visible,_off,_mask,_blendMode,_filters,_cache,_display$_name,_parent,_transformationMatrix,_transformationMatrixRefresh,userData,_pixelRatio,_eventStreams",
      get$bounds: function() {
        var t1 = this._graphics;
        if (t1 == null)
          return A.DisplayObjectContainer.prototype.get$bounds.call(this);
        else if (this._children.length === 0)
          return t1.get$bounds();
        else
          return t1.get$bounds().boundingBox$1(0, A.DisplayObjectContainer.prototype.get$bounds.call(this));
      },
      hitTestInput$2: function(localX, localY) {
        var graphics, target;
        graphics = this._graphics;
        target = this.super$DisplayObjectContainer$hitTestInput(localX, localY);
        if (target == null && graphics != null)
          target = graphics.hitTest$2(localX, localY) ? this : null;
        return target;
      },
      render$1: function(renderState) {
        var t1 = this._graphics;
        if (t1 != null)
          t1.render$1(renderState);
        this.super$DisplayObjectContainer$render(renderState);
      }
    },
    StageRenderMode: {
      "^": "Object;index",
      toString$0: function(_) {
        return C.Map_sggkc.$index(0, this.index);
      }
    },
    StageScaleMode: {
      "^": "Object;index",
      toString$0: function(_) {
        return C.Map_iT96V.$index(0, this.index);
      }
    },
    StageAlign: {
      "^": "Object;index",
      toString$0: function(_) {
        return C.Map_yXUKy.$index(0, this.index);
      }
    },
    Stage: {
      "^": "DisplayObjectContainer;_display$_canvas,_renderContext<,_renderLoop,_sourceWidth,_sourceHeight,_stageWidth,_stageHeight,_pixelRatio:Stage__pixelRatio<,_contentRectangle,_clientTransformation,_stageTransformation,_renderState,_inputEventMode,_stageRenderMode,_stageScaleMode,_stageAlign,_mouseCursor,_mousePosition,_mouseTarget,_drags,_touchPoints,_mouseButtons,juggler,focus,backgroundColor,preventDefaultOnTouch,preventDefaultOnMouse,preventDefaultOnWheel,preventDefaultOnKeyboard,_children,_mouseChildren,_tabChildren,doubleClickEnabled,mouseEnabled,mouseCursor,tabEnabled,tabIndex,displayObjectID,_display$_x,_display$_y,_pivotX,_pivotY,_scaleX,_scaleY,_skewX,_skewY,_rotation,_alpha,_visible,_off,_mask,_blendMode,_filters,_cache,_display$_name,_parent,_transformationMatrix,_transformationMatrixRefresh,userData,_pixelRatio,_eventStreams",
      get$pixelRatio: function() {
        return this.Stage__pixelRatio;
      },
      get$align: function() {
        return this._stageAlign;
      },
      hitTestInput$2: function(localX, localY) {
        var target = this.super$DisplayObjectContainer$hitTestInput(localX, localY);
        return target != null ? target : this;
      },
      _createRenderContext$2: function(canvas, options) {
        var t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, renderingContext, exception;
        t1 = options.renderEngine;
        if (t1 === C.RenderEngine_0)
          try {
            options.antialias;
            t1 = new T.Matrix3D(new Float32Array(H._checkLength(16)));
            t1.setIdentity$0();
            t2 = P.String;
            t3 = P.$int;
            t4 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t2, t3]);
            t5 = P.UniformLocation;
            t6 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t2, t5]);
            t6 = new L.RenderProgramSimple(-1, null, null, t4, t6, new L.RenderBufferIndex(new Int16Array(H._checkLength(0)), 35048, 0, 0, -1, null, null), new L.RenderBufferVertex(new Float32Array(H._checkLength(0)), 35048, 0, 0, -1, null, null));
            t4 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t2, t3]);
            t7 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t2, t5]);
            t8 = new Int16Array(H._checkLength(0));
            t9 = new Float32Array(H._checkLength(0));
            t10 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t2, t3]);
            t5 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t2, t5]);
            t11 = new Int16Array(H._checkLength(0));
            t12 = new Float32Array(H._checkLength(0));
            t13 = new Int16Array(H._checkLength(16384));
            t14 = new Float32Array(H._checkLength(32768));
            t15 = H.setRuntimeTypeInfo([], [L.RenderFrameBuffer]);
            t3 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t3, L.RenderTexture]);
            t2 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t2, L.RenderProgram]);
            t16 = L.RenderContextEvent;
            t16 = new L.RenderContextWebGL(canvas, null, t1, null, null, null, null, null, true, 0, 0, 0, 0, t6, new L.RenderProgramTinted(-1, null, null, t4, t7, new L.RenderBufferIndex(t8, 35048, 0, 0, -1, null, null), new L.RenderBufferVertex(t9, 35048, 0, 0, -1, null, null)), new L.RenderProgramTriangle(-1, null, null, t10, t5, new L.RenderBufferIndex(t11, 35048, 0, 0, -1, null, null), new L.RenderBufferVertex(t12, 35048, 0, 0, -1, null, null)), new L.RenderBufferIndex(t13, 35048, 0, 0, -1, null, null), new L.RenderBufferVertex(t14, 35048, 0, 0, -1, null, null), t15, t3, t2, P.StreamController_StreamController$broadcast(null, null, false, t16), P.StreamController_StreamController$broadcast(null, null, false, t16));
            t2 = P.ContextEvent;
            W._EventStreamSubscription$(canvas, "webglcontextlost", t16.get$_onContextLost(), false, t2);
            W._EventStreamSubscription$(canvas, "webglcontextrestored", t16.get$_onContextRestored(), false, t2);
            renderingContext = C.CanvasElement_methods.getContext3d$6$alpha$antialias$depth$premultipliedAlpha$preserveDrawingBuffer$stencil(canvas, false, false, false, true, false, true);
            if (!J.getInterceptor(renderingContext).$isRenderingContext)
              H.throwExpression(new P.StateError("Failed to get WebGL context."));
            t16._renderingContext = renderingContext;
            renderingContext.enable(3042);
            t16._renderingContext.disable(2960);
            t16._renderingContext.disable(2929);
            t16._renderingContext.disable(2884);
            t16._renderingContext.pixelStorei(37441, 1);
            t16._renderingContext.blendFunc(1, 771);
            t16._activeRenderProgram = t6;
            t6.activate$1(t16);
            t16._contextValid = true;
            t1 = $.RenderContextWebGL__globalContextIdentifier + 1;
            $.RenderContextWebGL__globalContextIdentifier = t1;
            t16._contextIdentifier = t1;
            t16.reset$0(0);
            return t16;
          } catch (exception) {
            H.unwrapException(exception);
            t1 = T.Matrix$fromIdentity();
            t2 = L.RenderContextEvent;
            t2 = new L.RenderContextCanvas(canvas, canvas.getContext("2d"), t1, C.BlendMode_bZz, 1, P.StreamController_StreamController$broadcast(null, null, false, t2), P.StreamController_StreamController$broadcast(null, null, false, t2));
            t2.reset$0(0);
            return t2;
          }
        else if (t1 === C.RenderEngine_1) {
          t1 = T.Matrix$fromIdentity();
          t2 = L.RenderContextEvent;
          t2 = new L.RenderContextCanvas(canvas, canvas.getContext("2d"), t1, C.BlendMode_bZz, 1, P.StreamController_StreamController$broadcast(null, null, false, t2), P.StreamController_StreamController$broadcast(null, null, false, t2));
          t2.reset$0(0);
          return t2;
        } else
          throw H.wrapException(new P.StateError("Unknown RenderEngine"));
      },
      _updateCanvasSize$0: function() {
        var sourceWidth, sourceHeight, clientWidth, clientHeight, clientLeft, clientTop, clientRectangle, t1, ratioWidth, ratioHeight, scaleY, scaleX, pivotX, pivotY, t2;
        sourceWidth = this._sourceWidth;
        sourceHeight = this._sourceHeight;
        if ($.$get$isCocoonJS()) {
          clientWidth = window.innerWidth;
          clientHeight = window.innerHeight;
          clientLeft = 0;
          clientTop = 0;
        } else {
          clientRectangle = this._display$_canvas.getBoundingClientRect();
          t1 = J.getInterceptor$x(clientRectangle);
          clientLeft = this._display$_canvas.clientLeft + J.round$0$n(t1.get$left(clientRectangle));
          clientTop = this._display$_canvas.clientTop + J.round$0$n(t1.get$top(clientRectangle));
          t1 = this._display$_canvas;
          clientWidth = t1.clientWidth;
          clientHeight = t1.clientHeight;
        }
        if (typeof clientWidth !== "number")
          throw H.wrapException("dart2js_hint");
        if (typeof clientHeight !== "number")
          throw H.wrapException("dart2js_hint");
        if (clientWidth === 0 || clientHeight === 0)
          return;
        ratioWidth = clientWidth / sourceWidth;
        ratioHeight = clientHeight / sourceHeight;
        switch (this._stageScaleMode) {
          case C.StageScaleMode_0:
            scaleY = ratioHeight;
            scaleX = ratioWidth;
            break;
          case C.StageScaleMode_1:
            scaleY = ratioWidth > ratioHeight ? ratioWidth : ratioHeight;
            scaleX = scaleY;
            break;
          case C.StageScaleMode_2:
            scaleX = 1;
            scaleY = 1;
            break;
          case C.StageScaleMode_3:
            scaleY = ratioWidth < ratioHeight ? ratioWidth : ratioHeight;
            scaleX = scaleY;
            break;
          default:
            scaleX = 1;
            scaleY = 1;
        }
        t1 = this._stageAlign;
        switch (t1) {
          case C.StageAlign_3:
          case C.StageAlign_6:
          case C.StageAlign_0:
            pivotX = 0;
            break;
          case C.StageAlign_1:
          case C.StageAlign_4:
          case C.StageAlign_7:
            pivotX = (clientWidth - sourceWidth * scaleX) / 2;
            break;
          case C.StageAlign_2:
          case C.StageAlign_5:
          case C.StageAlign_8:
            pivotX = clientWidth - sourceWidth * scaleX;
            break;
          default:
            pivotX = 0;
        }
        switch (t1) {
          case C.StageAlign_0:
          case C.StageAlign_1:
          case C.StageAlign_2:
            pivotY = 0;
            break;
          case C.StageAlign_3:
          case C.StageAlign_4:
          case C.StageAlign_5:
            pivotY = (clientHeight - sourceHeight * scaleY) / 2;
            break;
          case C.StageAlign_6:
          case C.StageAlign_7:
          case C.StageAlign_8:
            pivotY = clientHeight - sourceHeight * scaleY;
            break;
          default:
            pivotY = 0;
        }
        t1 = this._contentRectangle;
        t1.left = -pivotX / scaleX;
        t1.top = -pivotY / scaleY;
        t1.width = clientWidth / scaleX;
        t1.height = clientHeight / scaleY;
        t1 = this._stageTransformation;
        t1.setTo$6(scaleX, 0, 0, scaleY, pivotX, pivotY);
        t2 = this.Stage__pixelRatio;
        t1.scale$2(0, t2, t2);
        t2 = this._clientTransformation;
        t2.setTo$6(1, 0, 0, 1, -clientLeft - pivotX, -clientTop - pivotY);
        t2.scale$2(0, 1 / scaleX, 1 / scaleY);
        if (this._stageWidth !== clientWidth || this._stageHeight !== clientHeight) {
          this._stageWidth = clientWidth;
          this._stageHeight = clientHeight;
          t1 = this._display$_canvas;
          t2 = this.Stage__pixelRatio;
          t1.width = C.JSNumber_methods.round$0(clientWidth * t2);
          t1.height = C.JSNumber_methods.round$0(clientHeight * t2);
          if (t1.clientWidth !== clientWidth || t1.clientHeight !== clientHeight) {
            t1 = t1.style;
            t2 = H.S(clientWidth) + "px";
            t1.width = t2;
            t1 = this._display$_canvas.style;
            t2 = H.S(clientHeight) + "px";
            t1.height = t2;
          }
          this.dispatchEvent$1(0, new R.Event0("resize", false, C.EventPhase_1, null, null, false, false));
        }
      },
      _updateMouseCursor$0: function() {
        var mouseTarget, mouseCursor, mc, t1, cursorData, cursorDataUrl, cursorDataX, cursorDataY, style, t2;
        mouseTarget = this._mouseTarget;
        mouseCursor = $.Mouse__cursorName;
        if (mouseTarget != null && mouseCursor === "auto") {
          mc = mouseTarget.get$mouseCursor();
          if (mc !== "auto")
            mouseCursor = mc;
        }
        if (mouseCursor === "auto")
          mouseCursor = "default";
        t1 = this._mouseCursor;
        if (t1 == null ? mouseCursor != null : t1 !== mouseCursor) {
          this._mouseCursor = mouseCursor;
          t1 = this._display$_canvas.style;
          if ($.$get$Mouse__cursorDatas().containsKey$1(mouseCursor)) {
            cursorData = $.$get$Mouse__cursorDatas().$index(0, mouseCursor);
            cursorDataUrl = J.get$url$x(cursorData);
            cursorDataX = cursorData.get$hotSpot().x;
            cursorDataY = cursorData.get$hotSpot().y;
            style = "url('" + H.S(cursorDataUrl) + "') " + H.S(cursorDataX) + " " + H.S(cursorDataY) + ", auto";
          } else
            style = mouseCursor;
          t2 = $.Mouse__cursorHidden ? "none" : style;
          t1.toString;
          t1.cursor = t2 == null ? "" : t2;
        }
      },
      _onMouseEvent$1: [function($event) {
        var t1, button, stagePoint, localPoint, mouseButton, target, p, oldTargetList, newTargetList, p0, t2, t3, commonCount, t4, t5, t6, t7, t8, i, target0, mouseEventType, isClick, isDoubleClick;
        $event.preventDefault();
        t1 = Date.now();
        button = $event.button;
        stagePoint = this._clientTransformation.transformPoint$1(new P.Point($event.clientX, $event.clientY, [null]));
        localPoint = new U.Point0(0, 0, [P.num]);
        if (button < 0 || button > 2)
          return;
        if ($event.type === "mousemove" && this._mousePosition.$eq(0, stagePoint))
          return;
        mouseButton = this._mouseButtons[button];
        this._mousePosition = stagePoint;
        C.JSArray_methods.forEach$1(this._drags, new A.Stage__onMouseEvent_closure(stagePoint));
        if ($event.type !== "mouseout")
          target = this.hitTestInput$2(stagePoint.x, stagePoint.y);
        else {
          this.dispatchEvent$1(0, new R.Event0("mouseLeave", false, C.EventPhase_1, null, null, false, false));
          target = null;
        }
        p = this._mouseTarget;
        if (p == null ? target != null : p !== target) {
          oldTargetList = [];
          newTargetList = [];
          for (p0 = p; p0 != null; p0 = p0._parent)
            oldTargetList.push(p0);
          for (p0 = target; p0 != null; p0 = p0._parent)
            newTargetList.push(p0);
          for (t2 = oldTargetList.length, t3 = newTargetList.length, commonCount = 0; true; ++commonCount) {
            if (commonCount === t2)
              break;
            if (commonCount === t3)
              break;
            if (oldTargetList[t2 - commonCount - 1] !== newTargetList[t3 - commonCount - 1])
              break;
          }
          if (p != null) {
            p.globalToLocal$2(stagePoint, localPoint);
            t2 = localPoint.x;
            t3 = localPoint.y;
            t4 = stagePoint.x;
            t5 = stagePoint.y;
            t6 = $event.altKey;
            t7 = $event.ctrlKey;
            t8 = $event.shiftKey;
            p.dispatchEvent$1(0, new R.MouseEvent0(0, 0, mouseButton.buttonDown, 0, t2, t3, t4, t5, t6, t7, t8, false, "mouseOut", true, C.EventPhase_1, null, null, false, false));
          }
          for (i = 0; i < oldTargetList.length - commonCount; ++i) {
            target0 = oldTargetList[i];
            target0.globalToLocal$2(stagePoint, localPoint);
            t2 = localPoint.x;
            t3 = localPoint.y;
            t4 = stagePoint.x;
            t5 = stagePoint.y;
            t6 = $event.altKey;
            t7 = $event.ctrlKey;
            t8 = $event.shiftKey;
            target0.dispatchEvent$1(0, new R.MouseEvent0(0, 0, mouseButton.buttonDown, 0, t2, t3, t4, t5, t6, t7, t8, false, "rollOut", false, C.EventPhase_1, null, null, false, false));
          }
          for (i = newTargetList.length - commonCount - 1; i >= 0; --i) {
            target0 = newTargetList[i];
            target0.globalToLocal$2(stagePoint, localPoint);
            t2 = localPoint.x;
            t3 = localPoint.y;
            t4 = stagePoint.x;
            t5 = stagePoint.y;
            t6 = $event.altKey;
            t7 = $event.ctrlKey;
            t8 = $event.shiftKey;
            target0.dispatchEvent$1(0, new R.MouseEvent0(0, 0, mouseButton.buttonDown, 0, t2, t3, t4, t5, t6, t7, t8, false, "rollOver", false, C.EventPhase_1, null, null, false, false));
          }
          if (target != null) {
            target.globalToLocal$2(stagePoint, localPoint);
            t2 = localPoint.x;
            t3 = localPoint.y;
            t4 = stagePoint.x;
            t5 = stagePoint.y;
            t6 = $event.altKey;
            t7 = $event.ctrlKey;
            t8 = $event.shiftKey;
            target.dispatchEvent$1(0, new R.MouseEvent0(0, 0, mouseButton.buttonDown, 0, t2, t3, t4, t5, t6, t7, t8, false, "mouseOver", true, C.EventPhase_1, null, null, false, false));
          }
          this._mouseTarget = target;
        }
        this._updateMouseCursor$0();
        if ($event.type === "mousedown") {
          this._display$_canvas.focus();
          mouseEventType = mouseButton.mouseDownEventType;
          t2 = mouseButton.target;
          if ((target == null ? t2 != null : target !== t2) || t1 > mouseButton.clickTime + 500)
            mouseButton.clickCount = 0;
          mouseButton.buttonDown = true;
          mouseButton.target = target;
          mouseButton.clickTime = t1;
          ++mouseButton.clickCount;
        } else
          mouseEventType = null;
        if ($event.type === "mouseup") {
          mouseEventType = mouseButton.mouseUpEventType;
          mouseButton.buttonDown = false;
          t2 = mouseButton.target;
          isClick = t2 == null ? target == null : t2 === target;
          isDoubleClick = isClick && (mouseButton.clickCount & 1) === 0 && t1 < mouseButton.clickTime + 500;
        } else {
          isClick = false;
          isDoubleClick = false;
        }
        t1 = $event.type;
        if (t1 === "mousemove")
          mouseEventType = "mouseMove";
        if (t1 === "contextmenu")
          mouseEventType = "contextMenu";
        if (mouseEventType != null && target != null) {
          target.globalToLocal$2(stagePoint, localPoint);
          t1 = localPoint.x;
          t2 = localPoint.y;
          t3 = stagePoint.x;
          t4 = stagePoint.y;
          t5 = $event.altKey;
          t6 = $event.ctrlKey;
          t7 = $event.shiftKey;
          target.dispatchEvent$1(0, new R.MouseEvent0(0, 0, mouseButton.buttonDown, mouseButton.clickCount, t1, t2, t3, t4, t5, t6, t7, false, mouseEventType, true, C.EventPhase_1, null, null, false, false));
          if (isClick) {
            mouseEventType = isDoubleClick && target.doubleClickEnabled ? mouseButton.mouseDoubleClickEventType : mouseButton.mouseClickEventType;
            t1 = localPoint.x;
            t2 = localPoint.y;
            t3 = stagePoint.x;
            t4 = stagePoint.y;
            t5 = $event.altKey;
            t6 = $event.ctrlKey;
            t7 = $event.shiftKey;
            target.dispatchEvent$1(0, new R.MouseEvent0(0, 0, mouseButton.buttonDown, 0, t1, t2, t3, t4, t5, t6, t7, false, mouseEventType, true, C.EventPhase_1, null, null, false, false));
          }
        }
      }, "call$1", "get$_onMouseEvent", 2, 0, 99],
      _onMouseWheelEvent$1: [function($event) {
        var stagePoint, localPoint, target, t1, t2, t3, t4, t5, t6, t7, mouseEvent;
        stagePoint = this._clientTransformation.transformPoint$1(new P.Point($event.clientX, $event.clientY, [null]));
        localPoint = new U.Point0(0, 0, [P.num]);
        target = this.hitTestInput$2(stagePoint.x, stagePoint.y);
        target.globalToLocal$2(stagePoint, localPoint);
        t1 = localPoint.x;
        t2 = localPoint.y;
        t3 = stagePoint.x;
        t4 = stagePoint.y;
        t5 = $event.altKey;
        t6 = $event.ctrlKey;
        t7 = $event.shiftKey;
        mouseEvent = new R.MouseEvent0(($event && C.WheelEvent_methods).get$deltaX($event), C.WheelEvent_methods.get$deltaY($event), false, 0, t1, t2, t3, t4, t5, t6, t7, false, "mouseWheel", true, C.EventPhase_1, null, null, false, false);
        target.dispatchEvent$1(0, mouseEvent);
        if (mouseEvent._isImmediatePropagationStopped)
          $event.stopImmediatePropagation();
        if (mouseEvent._isPropagationStopped)
          $event.stopPropagation();
        if (mouseEvent._isDefaultPrevented)
          $event.preventDefault();
      }, "call$1", "get$_onMouseWheelEvent", 2, 0, 104],
      _onTouchEvent$1: [function($event) {
        var jsEvent, t1, jsChangedTouches, eventType, t2, jsChangedTouch, altKey, ctrlKey, shiftKey, _i, changedTouch;
        if ($.$get$isCocoonJS()) {
          jsEvent = P.JsObject_JsObject$fromBrowserObject($event);
          t1 = [];
          C.JSArray_methods.addAll$1(t1, J.map$1$ax(jsEvent.$index(0, "changedTouches"), P.js___convertToJS$closure()));
          jsChangedTouches = new P.JsArray(t1, [null]);
          eventType = V.ensureString(jsEvent.$index(0, "type"));
          jsEvent.callMethod$1("preventDefault");
          for (t1 = new H.ListIterator(jsChangedTouches, jsChangedTouches.get$length(jsChangedTouches), 0, null), t2 = [null]; t1.moveNext$0();) {
            jsChangedTouch = P.JsObject_JsObject$fromBrowserObject(t1.__internal$_current);
            this._onTouchEventProcessor$6(eventType, V.ensureInt(jsChangedTouch.$index(0, "identifier")), new P.Point(V.ensureNum(jsChangedTouch.$index(0, "clientX")), V.ensureNum(jsChangedTouch.$index(0, "clientY")), t2), false, false, false);
          }
        } else {
          $event.preventDefault();
          eventType = $event.type;
          altKey = $event.altKey;
          ctrlKey = $event.ctrlKey;
          shiftKey = $event.shiftKey;
          for (t1 = $event.changedTouches, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            changedTouch = t1[_i];
            this._onTouchEventProcessor$6(eventType, changedTouch.identifier, C.Touch_methods.get$client(changedTouch), altKey, ctrlKey, shiftKey);
          }
        }
      }, "call$1", "get$_onTouchEvent", 2, 0, 49],
      _onTouchEventProcessor$6: function(eventType, identifier, client, altKey, ctrlKey, shiftKey) {
        var stagePoint, localPoint, target, t1, touchPoint, touchPointID, primaryTouchPoint, t2, t3, oldTarget, oldTargetList, newTargetList, p, t4, commonCount, i, target0, touchEventType, isTap;
        stagePoint = this._clientTransformation.transformPoint$1(client);
        localPoint = new U.Point0(0, 0, [P.num]);
        target = this.super$DisplayObjectContainer$hitTestInput(stagePoint.x, stagePoint.y);
        target = target != null ? target : this;
        t1 = this._touchPoints;
        touchPoint = t1.putIfAbsent$2(identifier, new A.Stage__onTouchEventProcessor_closure(this, target));
        touchPointID = touchPoint.get$touchPointID();
        primaryTouchPoint = touchPoint.get$primaryTouchPoint();
        C.JSArray_methods.forEach$1(this._drags, new A.Stage__onTouchEventProcessor_closure0(stagePoint, touchPointID));
        t2 = J.getInterceptor$x(touchPoint);
        t3 = t2.get$currentTarget(touchPoint);
        if (t3 == null ? target != null : t3 !== target) {
          oldTarget = t2.get$currentTarget(touchPoint);
          oldTargetList = [];
          newTargetList = [];
          for (p = oldTarget; p != null; p = p._parent)
            oldTargetList.push(p);
          for (p = target; p != null; p = p._parent)
            newTargetList.push(p);
          for (t3 = oldTargetList.length, t4 = newTargetList.length, commonCount = 0; true; ++commonCount) {
            if (commonCount === t3)
              break;
            if (commonCount === t4)
              break;
            if (oldTargetList[t3 - commonCount - 1] !== newTargetList[t4 - commonCount - 1])
              break;
          }
          if (oldTarget != null) {
            oldTarget.globalToLocal$2(stagePoint, localPoint);
            oldTarget.dispatchEvent$1(0, new R.TouchEvent0(touchPointID, primaryTouchPoint, localPoint.x, localPoint.y, stagePoint.x, stagePoint.y, altKey, ctrlKey, shiftKey, false, "touchOut", true, C.EventPhase_1, null, null, false, false));
          }
          for (i = 0; i < oldTargetList.length - commonCount; ++i) {
            target0 = oldTargetList[i];
            target0.globalToLocal$2(stagePoint, localPoint);
            target0.dispatchEvent$1(0, new R.TouchEvent0(touchPointID, primaryTouchPoint, localPoint.x, localPoint.y, stagePoint.x, stagePoint.y, altKey, ctrlKey, shiftKey, false, "touchRollOut", false, C.EventPhase_1, null, null, false, false));
          }
          for (i = newTargetList.length - commonCount - 1; i >= 0; --i) {
            target0 = newTargetList[i];
            target0.globalToLocal$2(stagePoint, localPoint);
            target0.dispatchEvent$1(0, new R.TouchEvent0(touchPointID, primaryTouchPoint, localPoint.x, localPoint.y, stagePoint.x, stagePoint.y, altKey, ctrlKey, shiftKey, false, "touchRollOver", false, C.EventPhase_1, null, null, false, false));
          }
          if (target != null) {
            target.globalToLocal$2(stagePoint, localPoint);
            target.dispatchEvent$1(0, new R.TouchEvent0(touchPointID, primaryTouchPoint, localPoint.x, localPoint.y, stagePoint.x, stagePoint.y, altKey, ctrlKey, shiftKey, false, "touchOver", true, C.EventPhase_1, null, null, false, false));
          }
          t2.set$currentTarget(touchPoint, target);
        }
        if (eventType === "touchstart") {
          this._display$_canvas.focus();
          t1.$indexSet(0, identifier, touchPoint);
          touchEventType = "touchBegin";
        } else
          touchEventType = null;
        if (eventType === "touchend") {
          t1.remove$1(0, identifier);
          t2 = t2.get$target(touchPoint);
          isTap = t2 == null ? target == null : t2 === target;
          touchEventType = "touchEnd";
        } else
          isTap = false;
        if (eventType === "touchcancel") {
          t1.remove$1(0, identifier);
          touchEventType = "touchCancel";
        }
        if (eventType === "touchmove")
          touchEventType = "touchMove";
        if (touchEventType != null && target != null) {
          target.globalToLocal$2(stagePoint, localPoint);
          target.dispatchEvent$1(0, new R.TouchEvent0(touchPointID, primaryTouchPoint, localPoint.x, localPoint.y, stagePoint.x, stagePoint.y, altKey, ctrlKey, shiftKey, false, touchEventType, true, C.EventPhase_1, null, null, false, false));
          if (isTap)
            target.dispatchEvent$1(0, new R.TouchEvent0(touchPointID, primaryTouchPoint, localPoint.x, localPoint.y, stagePoint.x, stagePoint.y, altKey, ctrlKey, shiftKey, false, "touchTap", true, C.EventPhase_1, null, null, false, false));
        }
      },
      _onKeyEvent$1: [function($event) {
        return;
      }, "call$1", "get$_onKeyEvent", 2, 0, 100],
      Stage$4$height$options$width: function(canvas, height, options, width) {
        var t1, t2;
        if (!J.getInterceptor(canvas).$isCanvasElement)
          throw H.wrapException(P.ArgumentError$("canvas"));
        if (canvas.tabIndex <= 0)
          canvas.tabIndex = 1;
        t1 = canvas.style;
        if (t1.outline === "")
          t1.outline = "none";
        if (options == null)
          options = $.$get$Stage_defaultOptions();
        width = canvas.width;
        height = canvas.height;
        this.backgroundColor = options.backgroundColor;
        this.preventDefaultOnTouch = true;
        this.preventDefaultOnMouse = true;
        this.preventDefaultOnWheel = false;
        this.preventDefaultOnKeyboard = false;
        this._display$_canvas = canvas;
        this._stageAlign = options.stageAlign;
        this._stageScaleMode = options.stageScaleMode;
        this._stageRenderMode = options.stageRenderMode;
        this._inputEventMode = options.inputEventMode;
        this._sourceWidth = V.ensureInt(width);
        this._sourceHeight = V.ensureInt(height);
        this.Stage__pixelRatio = V.minNum(options.maxPixelRatio, $.$get$devicePixelRatio());
        t1 = this._createRenderContext$2(canvas, options);
        this._renderContext = t1;
        this._renderState = L.RenderState$(t1, null, null, null);
        P.print("StageXL render engine : " + C.Map_O9zrD.$index(0, this._renderContext.get$renderEngine().index));
        t1 = W.KeyboardEvent;
        t2 = this.get$_onKeyEvent();
        W._EventStreamSubscription$(canvas, "keydown", t2, false, t1);
        W._EventStreamSubscription$(canvas, "keyup", t2, false, t1);
        W._EventStreamSubscription$(canvas, "keypress", t2, false, t1);
        t1 = this._inputEventMode;
        if (t1 === C.InputEventMode_0 || t1 === C.InputEventMode_2) {
          t1 = W.MouseEvent;
          t2 = this.get$_onMouseEvent();
          W._EventStreamSubscription$(canvas, "mousedown", t2, false, t1);
          W._EventStreamSubscription$(canvas, "mouseup", t2, false, t1);
          W._EventStreamSubscription$(canvas, "mousemove", t2, false, t1);
          W._EventStreamSubscription$(canvas, "mouseout", t2, false, t1);
          W._EventStreamSubscription$(canvas, "contextmenu", t2, false, t1);
          W._EventStreamSubscription$(canvas, W.html_Element__determineMouseWheelEventType$closure().call$1(canvas), this.get$_onMouseWheelEvent(), false, W.WheelEvent);
        }
        t1 = this._inputEventMode;
        if ((t1 === C.InputEventMode_1 || t1 === C.InputEventMode_2) && $.$get$isTouchEventSupported()) {
          t1 = W.TouchEvent;
          t2 = this.get$_onTouchEvent();
          W._EventStreamSubscription$(canvas, "touchstart", t2, false, t1);
          W._EventStreamSubscription$(canvas, "touchend", t2, false, t1);
          W._EventStreamSubscription$(canvas, "touchmove", t2, false, t1);
          W._EventStreamSubscription$(canvas, "touchenter", t2, false, t1);
          W._EventStreamSubscription$(canvas, "touchleave", t2, false, t1);
          W._EventStreamSubscription$(canvas, "touchcancel", t2, false, t1);
        }
        $.$get$Mouse_onCursorChanged().listen$1(new A.Stage_closure(this));
        this._updateMouseCursor$0();
        this._updateCanvasSize$0();
        this._renderContext.clear$1(0, this.backgroundColor);
      },
      focus$0: function($receiver) {
        return this.focus.call$0();
      },
      static: {
        Stage$: function(canvas, height, options, width) {
          var t1, t2, t3, t4, t5, t6, t7, t8;
          t1 = P.num;
          t2 = T.Matrix$fromIdentity();
          t3 = T.Matrix$fromIdentity();
          t4 = H.setRuntimeTypeInfo([], [A._Drag]);
          t5 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [P.$int, A._TouchPoint]);
          t6 = new K.Juggler(null, null, 0, P.StreamController_StreamController$broadcast(null, null, false, t1));
          t7 = new K._AnimatableLink(null, null);
          t6._firstAnimatableLink = t7;
          t6._lastAnimatableLink = t7;
          t7 = H.setRuntimeTypeInfo([], [A.DisplayObject]);
          t8 = $.DisplayObject__nextID;
          $.DisplayObject__nextID = t8 + 1;
          t8 = new A.Stage(null, null, null, 0, 0, 0, 0, 1, new U.Rectangle0(0, 0, 0, 0, [t1]), t2, t3, null, C.InputEventMode_0, C.StageRenderMode_0, C.StageScaleMode_3, C.StageAlign_4, "default", new U.Point0(0, 0, [t1]), null, t4, t5, [new A._MouseButton("mouseDown", "mouseUp", "click", "doubleClick", null, false, 0, 0), new A._MouseButton("middleMouseDown", "middleMouseUp", "middleClick", "middleClick", null, false, 0, 0), new A._MouseButton("rightMouseDown", "rightMouseUp", "rightClick", "rightClick", null, false, 0, 0)], t6, null, 4294967295, true, true, false, false, t7, true, true, false, true, "auto", true, 0, t8, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
          t8.Stage$4$height$options$width(canvas, height, options, width);
          return t8;
        }
      }
    },
    Stage_closure: {
      "^": "Closure:0;$this",
      call$1: [function(cursorName) {
        return this.$this._updateMouseCursor$0();
      }, null, null, 2, 0, null, 44, "call"]
    },
    Stage__onMouseEvent_closure: {
      "^": "Closure:0;stagePoint",
      call$1: function(d) {
        return d.update$2(0, this.stagePoint);
      }
    },
    Stage__onTouchEventProcessor_closure: {
      "^": "Closure:1;$this,target",
      call$0: function() {
        var t1, t2, t3;
        t1 = this.target;
        t2 = this.$this._touchPoints;
        t2 = t2.get$isEmpty(t2);
        t3 = $._TouchPoint__globalTouchPointID;
        $._TouchPoint__globalTouchPointID = t3 + 1;
        return new A._TouchPoint(t3, t2, t1, t1);
      }
    },
    Stage__onTouchEventProcessor_closure0: {
      "^": "Closure:0;stagePoint,touchPointID",
      call$1: function(d) {
        return d.update$2(this.touchPointID, this.stagePoint);
      }
    },
    StageOptions: {
      "^": "Object;renderEngine,inputEventMode,stageRenderMode,stageScaleMode,stageAlign,backgroundColor,transparent,antialias,maxPixelRatio,preventDefaultOnTouch,preventDefaultOnMouse,preventDefaultOnWheel,preventDefaultOnKeyboard"
    },
    _MouseButton: {
      "^": "Object;mouseDownEventType,mouseUpEventType,mouseClickEventType,mouseDoubleClickEventType,target>,buttonDown,clickTime,clickCount"
    },
    _TouchPoint: {
      "^": "Object;touchPointID<,primaryTouchPoint<,target>,currentTarget*"
    },
    _Drag: {
      "^": "Object;"
    }
  }], ["stagexl.drawing", "package:stagexl/src/drawing.dart",, U, {
    "^": "",
    GraphicsCommandBezierCurveTo: {
      "^": "GraphicsCommand;"
    },
    GraphicsCommandClosePath: {
      "^": "GraphicsCommand;"
    },
    GraphicsCommandFill: {
      "^": "GraphicsCommand;"
    },
    GraphicsCommandFillColor: {
      "^": "GraphicsCommandFill;_color,_drawing$_graphics",
      updateContext$1: function(context) {
        context.fillColor$1(this._color);
      }
    },
    GraphicsCommandLineTo: {
      "^": "GraphicsCommand;"
    },
    GraphicsCommandMoveTo: {
      "^": "GraphicsCommand;"
    },
    GraphicsCommandQuadraticCurveTo: {
      "^": "GraphicsCommand;"
    },
    GraphicsCommandRect: {
      "^": "GraphicsCommand;_drawing$_x,_drawing$_y,_drawing$_width,_drawing$_height,_drawing$_graphics",
      get$x: function(_) {
        return this._drawing$_x;
      },
      get$y: function(_) {
        return this._drawing$_y;
      },
      get$width: function(_) {
        return this._drawing$_width;
      },
      get$height: function(_) {
        return this._drawing$_height;
      },
      updateContext$1: function(context) {
        context.rect$4(0, this._drawing$_x, this._drawing$_y, this._drawing$_width, this._drawing$_height);
      },
      static: {
        GraphicsCommandRect$: function(x, y, width, height) {
          x.toString;
          y.toString;
          width.toString;
          height.toString;
          return new U.GraphicsCommandRect(x, y, width, height, null);
        }
      }
    },
    GraphicsCommandStroke: {
      "^": "GraphicsCommand;",
      get$width: function(_) {
        return this._drawing$_width;
      }
    },
    GraphicsCommandStrokeColor: {
      "^": "GraphicsCommandStroke;_color,_drawing$_width,_jointStyle,_capsStyle,_drawing$_graphics",
      updateContext$1: function(context) {
        context.strokeColor$4(this._color, this._drawing$_width, this._jointStyle, this._capsStyle);
      }
    },
    Graphics: {
      "^": "Object;_originalCommands,_compiledCommands,_drawing$_bounds",
      get$bounds: function() {
        var t1, commands, context;
        t1 = this._drawing$_bounds;
        if (t1 == null) {
          commands = this._getCommands$1(true);
          context = new U._GraphicsContextBounds(17976931348623157e292, 17976931348623157e292, -17976931348623157e292, -17976931348623157e292, new U._GraphicsPath(null, H.setRuntimeTypeInfo([], [U._GraphicsMeshSegment])));
          this._updateContext$2(context, commands);
          t1 = context.get$bounds();
          this._drawing$_bounds = t1;
        }
        return new U.Rectangle0(t1.left, t1.top, t1.width, t1.height, [H.getTypeArgumentByIndex(t1, 0)]);
      },
      hitTest$2: function(localX, localY) {
        var commands, context;
        if (this.get$bounds().contains$2(0, localX, localY)) {
          commands = this._getCommands$1(true);
          localX.toString;
          localY.toString;
          context = new U._GraphicsContextHitTest(false, localX, localY, new U._GraphicsPath(null, H.setRuntimeTypeInfo([], [U._GraphicsMeshSegment])));
          this._updateContext$2(context, commands);
          return context._hit;
        } else
          return false;
      },
      render$1: function(renderState) {
        var commands;
        if (renderState._engine$_renderContext instanceof L.RenderContextCanvas) {
          commands = this._getCommands$1(false);
          this._updateContext$2(U._GraphicsContextCanvas$(renderState), commands);
        } else {
          commands = this._getCommands$1(true);
          this._updateContext$2(new U._GraphicsContextRender(renderState, new U._GraphicsPath(null, H.setRuntimeTypeInfo([], [U._GraphicsMeshSegment]))), commands);
        }
      },
      _getCommands$1: function(useCompiled) {
        if (useCompiled && this._compiledCommands.length === 0)
          C.JSArray_methods.forEach$1(this._originalCommands, new U.Graphics__getCommands_closure(new U._GraphicsContextCompiler(this._compiledCommands, new U._GraphicsPath(null, H.setRuntimeTypeInfo([], [U._GraphicsMeshSegment])))));
        return useCompiled ? this._compiledCommands : this._originalCommands;
      },
      _updateContext$2: function(context, commands) {
        var i;
        for (i = 0; i < commands.length; ++i)
          commands[i].updateContext$1(context);
      }
    },
    Graphics__getCommands_closure: {
      "^": "Closure:0;context",
      call$1: function(c) {
        return c.updateContext$1(this.context);
      }
    },
    GraphicsCommand: {
      "^": "Object;",
      _setGraphics$1: function(graphics) {
        if (this._drawing$_graphics != null && graphics != null)
          throw H.wrapException(P.ArgumentError$("Command is already assigned to graphics."));
        else
          this._drawing$_graphics = graphics;
      }
    },
    GraphicsContext: {
      "^": "Object;"
    },
    JointStyle: {
      "^": "Object;index",
      toString$0: function(_) {
        return C.Map_sgzjx.$index(0, this.index);
      }
    },
    CapsStyle: {
      "^": "Object;index",
      toString$0: function(_) {
        return C.Map_sgiL9.$index(0, this.index);
      }
    },
    GraphicsGradient: {
      "^": "Object;"
    },
    _GraphicsCommandMeshColor: {
      "^": "GraphicsCommand;mesh,color,_drawing$_graphics",
      updateContext$1: function(context) {
        context.meshColor$1(this);
      }
    },
    _GraphicsContextBase: {
      "^": "GraphicsContext;",
      rect$4: function(_, x, y, width, height) {
        var t1, t2, t3;
        t1 = this._path;
        t1.moveTo$2(0, x, y);
        t2 = x + width;
        t1.lineTo$2(0, t2, y);
        t3 = y + height;
        t1.lineTo$2(0, t2, t3);
        t1.lineTo$2(0, x, t3);
        t1.close$0(0);
      }
    },
    _GraphicsContextBounds: {
      "^": "_GraphicsContextBase;_minX,_minY,_maxX,_maxY,_path",
      get$bounds: function() {
        var t1, t2, t3, t4;
        t1 = this._minX;
        t2 = this._maxX;
        t3 = t1 < t2 && this._minY < this._maxY;
        t4 = [P.$double];
        if (t3) {
          t3 = this._minY;
          return new U.Rectangle0(t1, t3, t2 - t1, this._maxY - t3, t4);
        } else
          return new U.Rectangle0(0, 0, 0, 0, t4);
      },
      fillColor$1: function(color) {
        this._updateBoundsForMesh$1(this._path);
      },
      strokeColor$4: function(color, width, jointStyle, capsStyle) {
        this._updateBoundsForMesh$1(U._GraphicsStroke$(this._path, width, jointStyle, capsStyle));
      },
      meshColor$1: function(command) {
        this._updateBoundsForMesh$1(command.mesh);
      },
      _updateBoundsForMesh$1: function(mesh) {
        var t1, t2, _i, meshSegment;
        for (t1 = mesh.segments, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          meshSegment = t1[_i];
          this._minX = this._minX > meshSegment.get$minX() ? meshSegment.get$minX() : this._minX;
          this._minY = this._minY > meshSegment.get$minY() ? meshSegment.get$minY() : this._minY;
          this._maxX = this._maxX < meshSegment.get$maxX() ? meshSegment.get$maxX() : this._maxX;
          this._maxY = this._maxY < meshSegment.get$maxY() ? meshSegment.get$maxY() : this._maxY;
        }
      }
    },
    _GraphicsContextCanvas: {
      "^": "GraphicsContext;renderState,_drawing$_renderContext,_canvasContext",
      rect$4: function(_, x, y, width, height) {
        this._canvasContext.rect(x, y, width, height);
      },
      fillColor$1: function(color) {
        var t1 = this._canvasContext;
        t1.fillStyle = V.color2rgba(color);
        t1.toString;
        t1.fill("nonzero");
      },
      strokeColor$4: function(color, width, jointStyle, capsStyle) {
        var t1, lineJoin, lineCap;
        t1 = this._canvasContext;
        t1.strokeStyle = V.color2rgba(color);
        t1.lineWidth = width;
        lineJoin = jointStyle === C.JointStyle_0 ? "miter" : "round";
        t1.lineJoin = jointStyle === C.JointStyle_2 ? "bevel" : lineJoin;
        lineCap = capsStyle === C.CapsStyle_0 ? "butt" : "round";
        t1.lineCap = capsStyle === C.CapsStyle_2 ? "square" : lineCap;
        t1.stroke();
      },
      _GraphicsContextCanvas$1: function(renderState) {
        var t1, t2;
        t1 = this._drawing$_renderContext;
        t1.setTransform$1(0, renderState._currentContextState.matrix);
        t2 = renderState._currentContextState.alpha;
        t1._activeAlpha = t2;
        t1._renderingContext.globalAlpha = t2;
        this._canvasContext.beginPath();
      },
      static: {
        _GraphicsContextCanvas$: function(renderState) {
          var t1 = H.interceptedTypeCast(renderState._engine$_renderContext, "$isRenderContextCanvas");
          t1 = new U._GraphicsContextCanvas(renderState, t1, t1._renderingContext);
          t1._GraphicsContextCanvas$1(renderState);
          return t1;
        }
      }
    },
    _GraphicsContextCompiler: {
      "^": "_GraphicsContextBase;commands,_path",
      fillColor$1: function(color) {
        this.commands.push(new U._GraphicsCommandMeshColor(U._GraphicsPath$clone(this._path), color, null));
      },
      strokeColor$4: function(color, width, jointStyle, capsStyle) {
        this.commands.push(new U._GraphicsCommandMeshColor(U._GraphicsStroke$(this._path, width, jointStyle, capsStyle), color, null));
      },
      meshColor$1: function(command) {
        this.commands.push(command);
      }
    },
    _GraphicsContextHitTest: {
      "^": "_GraphicsContextBase;_hit,_localX,_localY,_path",
      fillColor$1: function(color) {
        var mesh = this._path;
        this._hit = this._hit || mesh.hitTest$2(this._localX, this._localY);
      },
      strokeColor$4: function(color, width, jointStyle, capsStyle) {
        var mesh = U._GraphicsStroke$(this._path, width, jointStyle, capsStyle);
        this._hit = this._hit || mesh.hitTest$2(this._localX, this._localY);
      },
      meshColor$1: function(command) {
        this._hit = this._hit || command.mesh.hitTest$2(this._localX, this._localY);
      }
    },
    _GraphicsContextRender: {
      "^": "_GraphicsContextBase;renderState,_path",
      fillColor$1: function(color) {
        this._path.fillColor$2(this.renderState, color);
      },
      strokeColor$4: function(color, width, jointStyle, capsStyle) {
        U._GraphicsStroke$(this._path, width, jointStyle, capsStyle).fillColor$2(this.renderState, color);
      },
      meshColor$1: function(command) {
        command.mesh.fillColor$2(this.renderState, command.color);
      }
    },
    _GraphicsMesh: {
      "^": "Object;"
    },
    _GraphicsMeshSegment: {
      "^": "Object;",
      get$indexCount: function() {
        return this._indexCount;
      },
      get$minX: function() {
        return this._minX;
      },
      get$minY: function() {
        return this._minY;
      },
      get$maxX: function() {
        return this._maxX;
      },
      get$maxY: function() {
        return this._maxY;
      },
      get$bounds: function() {
        var t1, t2;
        t1 = this._minX;
        t2 = this._minY;
        return new U.Rectangle0(t1, t2, this._maxX - t1, this._maxY - t2, [P.$double]);
      },
      addVertex$2: ["super$_GraphicsMeshSegment$addVertex", function(x, y) {
        var offset, t1, $length, t2;
        offset = this._vertexCount * 2;
        t1 = this._vertexBuffer;
        $length = t1.length;
        if (offset + 2 > $length) {
          t2 = V.minInt($length, 256);
          t2 = new Float32Array($length + t2);
          this._vertexBuffer = t2;
          C.NativeFloat32List_methods.setAll$2(t2, 0, t1);
        }
        t1 = this._minX;
        this._minX = t1 > x ? x : t1;
        t1 = this._minY;
        this._minY = t1 > y ? y : t1;
        t1 = this._maxX;
        this._maxX = t1 < x ? x : t1;
        t1 = this._maxY;
        this._maxY = t1 < y ? y : t1;
        t1 = this._vertexBuffer;
        t1[offset] = x;
        t1[offset + 1] = y;
        ++this._vertexCount;
      }],
      addIndices$3: function(index1, index2, index3) {
        var offset, t1, $length, t2;
        offset = this._indexCount;
        t1 = this._indexBuffer;
        $length = t1.length;
        if (offset + 3 > $length) {
          t2 = V.minInt($length, 256);
          t2 = new Int16Array($length + t2);
          this._indexBuffer = t2;
          C.NativeInt16List_methods.setAll$2(t2, 0, t1);
        }
        t1 = this._indexBuffer;
        t1[offset] = index1;
        t1[offset + 1] = index2;
        t1[offset + 2] = index3;
        this._indexCount += 3;
      },
      fillColor$2: function(renderState, color) {
        var t1, t2, ixList;
        t1 = this._indexBuffer.buffer;
        t2 = this._indexCount;
        t1.toString;
        ixList = H.NativeInt16List_NativeInt16List$view(t1, 0, t2);
        t2 = this._vertexBuffer.buffer;
        t1 = this._vertexCount;
        t2.toString;
        renderState._engine$_renderContext.renderTriangleMesh$4(renderState, ixList, H.NativeFloat32List_NativeFloat32List$view(t2, 0, t1 * 2), color);
      },
      _GraphicsMeshSegment$clone$1: function(mesh) {
        var t1, t2;
        t1 = mesh._vertexCount;
        this._vertexCount = t1;
        this._indexCount = mesh._indexCount;
        this._minX = mesh._minX;
        this._minY = mesh._minY;
        this._maxX = mesh._maxX;
        this._maxY = mesh._maxY;
        t2 = this._vertexBuffer;
        (t2 && C.NativeFloat32List_methods).setRange$3(t2, 0, t1 * 2, mesh._vertexBuffer);
        t1 = this._indexBuffer;
        (t1 && C.NativeInt16List_methods).setRange$3(t1, 0, this._indexCount, mesh._indexBuffer);
      }
    },
    _GraphicsPath: {
      "^": "_GraphicsMesh;_currentSegment,segments",
      close$0: function(_) {
        var t1 = this._currentSegment;
        if (t1 != null) {
          t1._closed = true;
          this._currentSegment = null;
        }
      },
      moveTo$2: function(_, x, y) {
        var t1 = new U._GraphicsPathSegment(null, false, new Float32Array(H._checkLength(16)), new Int16Array(H._checkLength(32)), 0, 0, 17976931348623157e292, 17976931348623157e292, -17976931348623157e292, -17976931348623157e292);
        this._currentSegment = t1;
        t1.addVertex$2(x, y);
        this.segments.push(this._currentSegment);
      },
      lineTo$2: function(_, x, y) {
        var t1 = this._currentSegment;
        if (t1 == null)
          this.moveTo$2(0, x, y);
        else
          t1.addVertex$2(x, y);
      },
      fillColor$2: function(renderState, color) {
        var t1, t2, _i, segment;
        for (t1 = this.segments, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          segment = t1[_i];
          if (segment._indexCount === 0)
            segment._calculateIndices$0();
          segment.fillColor$2(renderState, color);
        }
      },
      hitTest$2: function(x, y) {
        var t1, t2, windingCount, _i, segment;
        for (t1 = this.segments, t2 = t1.length, windingCount = 0, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          segment = t1[_i];
          if (!(x >= segment._minX && x <= segment._maxX && y >= segment._minY && y <= segment._maxY))
            continue;
          if (segment._indexCount === 0)
            segment._calculateIndices$0();
          windingCount += segment.windingCountHitTest$2(x, y);
        }
        return windingCount !== 0;
      },
      _GraphicsPath$clone$1: function(path) {
        var t1, t2, t3, _i, segment, t4, t5;
        for (t1 = path.segments, t2 = t1.length, t3 = this.segments, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          segment = t1[_i];
          if (segment.get$indexCount() === 0)
            segment.calculateIndices$0();
          t4 = segment._vertexCount;
          t4 = new Float32Array(t4 * 2);
          t5 = segment._indexCount;
          t4 = new U._GraphicsPathSegment(null, false, t4, new Int16Array(t5), 0, 0, 17976931348623157e292, 17976931348623157e292, -17976931348623157e292, -17976931348623157e292);
          t4._GraphicsMeshSegment$clone$1(segment);
          t5 = segment._clockwise;
          if (typeof t5 !== "boolean") {
            t5 = segment._calculateArea$0() >= 0;
            segment._clockwise = t5;
          }
          t4._clockwise = t5;
          t4._closed = segment._closed;
          t3.push(t4);
        }
      },
      static: {
        _GraphicsPath$clone: function(path) {
          var t1 = new U._GraphicsPath(null, H.setRuntimeTypeInfo([], [U._GraphicsMeshSegment]));
          t1._GraphicsPath$clone$1(path);
          return t1;
        }
      }
    },
    _GraphicsPathSegment: {
      "^": "_GraphicsMeshSegment;_clockwise,_closed,_vertexBuffer,_indexBuffer,_vertexCount,_indexCount,_minX,_minY,_maxX,_maxY",
      get$clockwise: function() {
        var t1 = this._clockwise;
        if (typeof t1 !== "boolean") {
          t1 = this._calculateArea$0() >= 0;
          this._clockwise = t1;
        }
        return t1;
      },
      addVertex$2: function(x, y) {
        var vertexCount, t1, t2, lastX, lastY;
        vertexCount = this._vertexCount;
        if (vertexCount > 0) {
          t1 = this._vertexBuffer;
          t2 = vertexCount * 2;
          lastX = t1[t2 - 2];
          lastY = t1[t2 - 1];
          if (lastX === x && lastY === y)
            return;
        }
        this._indexCount = 0;
        this._clockwise = null;
        this.super$_GraphicsMeshSegment$addVertex(x, y);
      },
      calculateIndices$0: function() {
        this._calculateIndices$0();
      },
      windingCountHitTest$2: function(x, y) {
        var t1, t2, t3, ax, ay, wn, i, bx, by;
        if (this._minX > x || this._maxX < x)
          return 0;
        if (this._minY > y || this._maxY < y)
          return 0;
        t1 = this._vertexCount;
        if (t1 < 3)
          return 0;
        t2 = this._vertexBuffer;
        t3 = (t1 - 1) * 2;
        ax = t2[t3];
        ay = t2[t3 + 1];
        for (wn = 0, i = 0; i < t1; ++i, ay = by, ax = bx) {
          t3 = i * 2;
          bx = t2[t3];
          by = t2[t3 + 1];
          if (ay <= y) {
            if (by > y && (bx - ax) * (y - ay) - (x - ax) * (by - ay) > 0)
              ++wn;
          } else if (by <= y && (bx - ax) * (y - ay) - (x - ax) * (by - ay) < 0)
            --wn;
        }
        return wn;
      },
      _calculateIndices$0: function() {
        var buffer, count, available, clockwise, p, index, t1, i0, index0, i1, i2, t2, x1, y1, x2, y2, x31, y31, x21, y21, tmp, earFound, t3, t4, t5, t6, u, v, j, vi, t7, x01, y01;
        this._indexCount = 0;
        buffer = this._vertexBuffer;
        count = this._vertexCount;
        if (count < 3)
          return;
        available = H.setRuntimeTypeInfo([], [P.$int]);
        clockwise = this.get$clockwise();
        for (p = 0; p < count; ++p)
          available.push(p);
        for (index = 0; t1 = available.length, t1 > 3;) {
          i0 = available[C.JSInt_methods.$mod(index, t1)];
          index0 = index + 1;
          i1 = available[index0 % t1];
          i2 = available[(index + 2) % t1];
          t2 = i0 * 2;
          x1 = buffer[t2];
          y1 = buffer[t2 + 1];
          t2 = i1 * 2;
          x2 = buffer[t2];
          y2 = buffer[t2 + 1];
          t2 = i2 * 2;
          x31 = buffer[t2] - x1;
          y31 = buffer[t2 + 1] - y1;
          x21 = x2 - x1;
          y21 = y2 - y1;
          tmp = y31 * x21 - x31 * y21;
          earFound = clockwise ? tmp >= 0 : tmp <= 0;
          t2 = tmp * x21;
          t3 = tmp * y21;
          t4 = tmp * y31;
          t5 = tmp * x31;
          t6 = tmp * tmp;
          u = 0;
          v = 0;
          j = 0;
          while (true) {
            if (!(j < t1 && earFound))
              break;
            vi = available[j];
            if (vi !== i0 && vi !== i1 && vi !== i2) {
              t7 = vi * 2;
              x01 = buffer[t7] - x1;
              y01 = buffer[t7 + 1] - y1;
              u = t2 * y01 - t3 * x01;
              if (u >= 0) {
                v = t4 * x01 - t5 * y01;
                if (v >= 0)
                  earFound = u + v < t6 ? false : earFound;
              }
            }
            ++j;
          }
          if (earFound) {
            this.addIndices$3(i0, i1, i2);
            C.JSArray_methods.removeAt$1(available, index0 % available.length);
            index = 0;
          } else {
            if (index > 3 * t1)
              break;
            index = index0;
          }
        }
        this.addIndices$3(available[0], available[1], available[2]);
      },
      _calculateArea$0: function() {
        var buffer, count, t1, x1, y1, value, i, x2, y2;
        buffer = this._vertexBuffer;
        count = this._vertexCount;
        if (count < 3)
          return 0;
        t1 = (count - 1) * 2;
        x1 = buffer[t1];
        y1 = buffer[t1 + 1];
        for (value = 0, i = 0; i < count; ++i, y1 = y2, x1 = x2) {
          t1 = i * 2;
          x2 = buffer[t1];
          y2 = buffer[t1 + 1];
          value += (x1 - x2) * (y1 + y2);
        }
        return value / 2;
      }
    },
    _GraphicsStroke: {
      "^": "_GraphicsMesh;width>,jointStyle,capsStyle,segments",
      fillColor$2: function(renderState, color) {
        var t1, t2, _i;
        for (t1 = this.segments, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
          t1[_i].fillColor$2(renderState, color);
      },
      hitTest$2: function(x, y) {
        var t1, t2, _i, segment;
        for (t1 = this.segments, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          segment = t1[_i];
          if (!(x >= segment._minX && x <= segment._maxX && y >= segment._minY && y <= segment._maxY))
            continue;
          if (segment.hitTest$2(x, y))
            return true;
        }
        return false;
      },
      _GraphicsStroke$4: function(path, width, jointStyle, capsStyle) {
        var t1, t2, t3, _i, pathSegment, t4, t5;
        for (t1 = path.segments, t2 = t1.length, t3 = this.segments, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          pathSegment = t1[_i];
          t4 = pathSegment._vertexCount;
          t5 = new Float32Array(t4 * 4);
          t4 = new U._GraphicsStrokeSegment(this, t5, new Int16Array(t4 * 6), 0, 0, 17976931348623157e292, 17976931348623157e292, -17976931348623157e292, -17976931348623157e292);
          t4._calculateStroke$1(pathSegment);
          t3.push(t4);
        }
      },
      static: {
        _GraphicsStroke$: function(path, width, jointStyle, capsStyle) {
          var t1 = new U._GraphicsStroke(width, jointStyle, capsStyle, H.setRuntimeTypeInfo([], [U._GraphicsMeshSegment]));
          t1._GraphicsStroke$4(path, width, jointStyle, capsStyle);
          return t1;
        }
      }
    },
    _GraphicsStrokeSegment: {
      "^": "_GraphicsMeshSegment;stroke,_vertexBuffer,_indexBuffer,_vertexCount,_indexCount,_minX,_minY,_maxX,_maxY",
      hitTest$2: function(px, py) {
        var t1, t2, t3, i, o1, o2, o3, x1, x2, x3, y1, y2, y3, ab, bc, ca;
        for (t1 = this._indexCount - 2, t2 = this._vertexBuffer, t3 = this._indexBuffer, i = 0; i < t1; i += 3) {
          o1 = t3[i] * 2;
          o2 = t3[i + 1] * 2;
          o3 = t3[i + 2] * 2;
          x1 = t2[o1] - px;
          x2 = t2[o2] - px;
          x3 = t2[o3] - px;
          if (x1 > 0 && x2 > 0 && x3 > 0)
            continue;
          if (x1 < 0 && x2 < 0 && x3 < 0)
            continue;
          y1 = t2[o1 + 1] - py;
          y2 = t2[o2 + 1] - py;
          y3 = t2[o3 + 1] - py;
          if (y1 > 0 && y2 > 0 && y3 > 0)
            continue;
          if (y1 < 0 && y2 < 0 && y3 < 0)
            continue;
          ab = x1 * y2 - x2 * y1;
          bc = x2 * y3 - x3 * y2;
          ca = x3 * y1 - x1 * y3;
          if (ab >= 0 && bc >= 0 && ca >= 0)
            return true;
          if (ab <= 0 && bc <= 0 && ca <= 0)
            return true;
        }
        return false;
      },
      _calculateStroke$1: function(pathSegment) {
        var t1, jointStyle, capsStyle, vertices, $length, $closed, t2, t3, t4, t5, v1x, v1y, n1x, n1y, i, i0, offset, v2x, v2y, vx, vy, n2x, n2y, vertexCount, count, it, ix, iy, jointStyle0, t6, t7, t8;
        t1 = this.stroke;
        jointStyle = t1.jointStyle;
        capsStyle = t1.capsStyle;
        vertices = pathSegment._vertexBuffer;
        $length = pathSegment._vertexCount;
        $closed = pathSegment._closed;
        if ($closed && $length >= 2) {
          t2 = vertices[0];
          t3 = vertices[1];
          t4 = $length * 2;
          t5 = vertices[t4 - 2];
          t4 = vertices[t4 - 1];
          if (t2 === t5 && t3 === t4)
            --$length;
        }
        if ($length <= 1)
          return;
        for (t2 = $length - 1, t1 = 0.5 * t1.width, t3 = !$closed, t4 = jointStyle !== C.JointStyle_0, v1x = 0, v1y = 0, n1x = 0, n1y = 0, i = -2; i <= $length; i = i0, n1y = n2y, n1x = n2x, v1y = v2y, v1x = v2x) {
          i0 = i + 1;
          offset = C.JSInt_methods.$mod(i0, $length) * 2;
          v2x = vertices[offset];
          v2y = vertices[offset + 1];
          vx = v2x - v1x;
          vy = v1y - v2y;
          t5 = Math.sqrt(vx * vx + vy * vy);
          n2x = t1 * vy / t5;
          n2y = t1 * vx / t5;
          if (i > 0)
            t5 = i < $length || $closed;
          else
            t5 = false;
          if (t5) {
            vertexCount = this._vertexCount;
            t5 = vertexCount - 1;
            this.addIndices$3(vertexCount - 2, t5, vertexCount);
            this.addIndices$3(t5, vertexCount, vertexCount + 1);
          }
          if (i === 0 && t3)
            this._addCap$7(v1x, v1y, 0 - n2x, 0 - n2y, n2x, n2y, capsStyle);
          else if (i === t2 && t3)
            this._addCap$7(v1x, v1y, 0 + n1x, 0 + n1y, n1x, n1y, capsStyle);
          else {
            if (i >= 0)
              t5 = i < $length || $closed;
            else
              t5 = false;
            if (t5) {
              count = this._vertexCount;
              it = (n2x * (n1x - n2x) + n2y * (n1y - n2y)) / (n2x * n1y - n2y * n1x);
              ix = n1x - it * n1y;
              iy = n1y + it * n1x;
              jointStyle0 = t4 && it > -0.1 && it < 0.1 ? C.JointStyle_0 : jointStyle;
              t5 = jointStyle0 === C.JointStyle_2;
              if (t5 && it > 0) {
                this.addIndices$3(count + 1, count + 2, count + 3);
                t5 = v1x + ix;
                t6 = v1y + iy;
                this.addVertex$2(t5, t6);
                this.addVertex$2(v1x - n1x, v1y - n1y);
                this.addVertex$2(t5, t6);
                this.addVertex$2(v1x - n2x, v1y - n2y);
              } else if (t5) {
                this.addIndices$3(count, count + 1, count + 2);
                this.addVertex$2(v1x + n1x, v1y + n1y);
                t5 = v1x - ix;
                t6 = v1y - iy;
                this.addVertex$2(t5, t6);
                this.addVertex$2(v1x + n2x, v1y + n2y);
                this.addVertex$2(t5, t6);
              } else {
                t5 = jointStyle0 === C.JointStyle_1;
                if (t5 && it > 0) {
                  t5 = v1x + ix;
                  t6 = v1y + iy;
                  this.addVertex$2(t5, t6);
                  this.addVertex$2(v1x - n1x, v1y - n1y);
                  t7 = Math.atan2(n2y, n2x);
                  this._addArc$5(v1x, v1y, n1x, n1y, C.JSNumber_methods.$mod(t7 - Math.atan2(n1y, n1x), 6.283185307179586));
                  this.addVertex$2(t5, t6);
                  this.addVertex$2(v1x - n2x, v1y - n2y);
                } else if (t5) {
                  t5 = v1x + n1x;
                  t6 = v1y + n1y;
                  this.addVertex$2(t5, t6);
                  t7 = v1x - ix;
                  t8 = v1y - iy;
                  this.addVertex$2(t7, t8);
                  this.addVertex$2(t5, t6);
                  t5 = Math.atan2(n1y, n1x);
                  this._addArc$5(v1x, v1y, 0 - n1x, 0 - n1y, 0 - C.JSNumber_methods.$mod(t5 - Math.atan2(n2y, n2x), 6.283185307179586));
                  this.addVertex$2(v1x + n2x, v1y + n2y);
                  this.addVertex$2(t7, t8);
                } else if (jointStyle0 === C.JointStyle_0) {
                  this.addVertex$2(v1x + ix, v1y + iy);
                  this.addVertex$2(v1x - ix, v1y - iy);
                }
              }
              if (count === 0)
                this._indexCount = 0;
            }
          }
        }
      },
      _addCap$7: function(vx, vy, ax, ay, bx, by, capsStyle) {
        var t1, t2, t3, t4;
        if (capsStyle === C.CapsStyle_2) {
          this.addVertex$2(vx + bx + ay, vy + by - ax);
          this.addVertex$2(vx - bx + ay, vy - by - ax);
        } else {
          t1 = vx + bx;
          t2 = vy + by;
          t3 = vx - bx;
          t4 = vy - by;
          if (capsStyle === C.CapsStyle_1) {
            this.addVertex$2(vx + ax, vy + ay);
            this.addVertex$2(vx - ax, vy - ay);
            this._addArc$5(vx, vy, ax, ay, 3.141592653589793);
            this.addVertex$2(t1, t2);
            this.addVertex$2(t3, t4);
          } else {
            this.addVertex$2(t1, t2);
            this.addVertex$2(t3, t4);
          }
        }
      },
      _addArc$5: function(cx, cy, nx, ny, angle) {
        var steps, count, t1, t2, tx, ty, ax, ay, t3, s, bx, by, t4;
        steps = C.JSNumber_methods.ceil$0(Math.abs(10 * angle / 3.141592653589793));
        count = this._vertexCount;
        t1 = angle / steps;
        t2 = Math.cos(t1);
        t1 = Math.sin(t1);
        tx = cx - cx * t2 + cy * t1;
        ty = cy - cx * t1 - cy * t2;
        ax = cx - nx;
        ay = cy - ny;
        for (t3 = count - 2, s = 0; s < steps; ++s, ay = by, ax = bx) {
          bx = ax * t2 - ay * t1 + tx;
          by = ax * t1 + ay * t2 + ty;
          this.addVertex$2(bx, by);
          t4 = count + s;
          this.addIndices$3(t4 - 1, t4, t3);
        }
      }
    }
  }], ["stagexl.engine", "package:stagexl/src/engine.dart",, L, {
    "^": "",
    _globalFrameRequest: function() {
      if ($._globalFrameCallbackId === -1) {
        var t1 = window;
        C.Window_methods._ensureRequestAnimationFrame$0(t1);
        $._globalFrameCallbackId = C.Window_methods._requestAnimationFrame$1(t1, W._wrapZone(new L._globalFrameRequest_closure()));
      }
    },
    BlendMode: {
      "^": "Object;srcFactor,dstFactor,compositeOperation"
    },
    RenderBufferIndex: {
      "^": "Object;data>,usage,position,count,_contextIdentifier,_buffer,_renderingContext"
    },
    RenderBufferVertex: {
      "^": "Object;data>,usage,position,count,_contextIdentifier,_buffer,_renderingContext",
      bindAttribute$4: function(index, size, stride, offset) {
        if (index == null)
          return;
        this._renderingContext.vertexAttribPointer(index, size, 5126, false, stride, offset);
      }
    },
    RenderEngine: {
      "^": "Object;index",
      toString$0: function(_) {
        return C.Map_O9zrD.$index(0, this.index);
      }
    },
    RenderContextEvent: {
      "^": "Object;"
    },
    RenderContext: {
      "^": "Object;"
    },
    RenderContextCanvas: {
      "^": "RenderContext;_canvasElement,_renderingContext,_identityMatrix,_activeBlendMode,_activeAlpha,_contextLostEvent,_contextRestoredEvent",
      get$renderEngine: function() {
        return C.RenderEngine_1;
      },
      reset$0: function(_) {
        var t1;
        this.setTransform$1(0, this._identityMatrix);
        this._activeBlendMode = C.BlendMode_bZz;
        t1 = this._renderingContext;
        t1.globalCompositeOperation = "source-over";
        this._activeAlpha = 1;
        t1.globalAlpha = 1;
      },
      clear$1: function(_, color) {
        var t1, alpha, t2;
        this.setTransform$1(0, this._identityMatrix);
        this._activeBlendMode = C.BlendMode_bZz;
        t1 = this._renderingContext;
        t1.globalCompositeOperation = "source-over";
        this._activeAlpha = 1;
        t1.globalAlpha = 1;
        alpha = color >>> 24 & 255;
        if (alpha < 255) {
          t2 = this._canvasElement;
          t1.clearRect(0, 0, t2.width, t2.height);
        }
        if (alpha > 0) {
          t1.fillStyle = V.color2rgba(color);
          t2 = this._canvasElement;
          t1.fillRect(0, 0, t2.width, t2.height);
        }
      },
      flush$0: function(_) {
      },
      beginRenderMask$2: function(renderState, mask) {
        var t1, t2;
        t1 = this._renderingContext;
        t2 = renderState._currentContextState.matrix._data;
        t1.setTransform(t2[0], t2[1], t2[2], t2[3], t2[4], t2[5]);
        t1.beginPath();
        mask.renderMask$1(renderState);
        t1.save();
        t1.clip();
      },
      endRenderMask$2: function(renderState, mask) {
        var t1 = this._renderingContext;
        t1.restore();
        t1.globalAlpha = this._activeAlpha;
        t1.globalCompositeOperation = this._activeBlendMode.compositeOperation;
        mask.border;
      },
      renderTextureQuad$2: function(renderState, renderTextureQuad) {
        var context, source, rotation, sourceRect, vxList, t1, matrix, alpha, blendMode, t2, t3, t4, t5, t6;
        context = this._renderingContext;
        source = renderTextureQuad.renderTexture._engine$_source;
        rotation = renderTextureQuad.rotation;
        sourceRect = renderTextureQuad.sourceRectangle;
        vxList = renderTextureQuad.vxListQuad;
        t1 = renderState._currentContextState;
        matrix = t1.matrix;
        alpha = t1.alpha;
        blendMode = t1.blendMode;
        if (this._activeAlpha !== alpha) {
          this._activeAlpha = alpha;
          context.globalAlpha = alpha;
        }
        if (this._activeBlendMode !== blendMode) {
          this._activeBlendMode = blendMode;
          context.globalCompositeOperation = blendMode.compositeOperation;
        }
        if (rotation === 0) {
          t1 = matrix._data;
          context.setTransform(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
          t1 = sourceRect.left;
          t2 = sourceRect.top;
          t3 = sourceRect.width;
          t4 = sourceRect.height;
          t5 = vxList[0];
          t6 = vxList[1];
          context.drawImage(source, t1, t2, t3, t4, t5, t6, vxList[8] - t5, vxList[9] - t6);
        } else if (rotation === 1) {
          t1 = matrix._data;
          context.setTransform(-t1[2], -t1[3], t1[0], t1[1], t1[4], t1[5]);
          context.drawImage(source, sourceRect.left, sourceRect.top, sourceRect.width, sourceRect.height, 0 - vxList[13], vxList[12], vxList[9] - vxList[1], vxList[8] - vxList[0]);
        } else if (rotation === 2) {
          t1 = matrix._data;
          context.setTransform(-t1[0], -t1[1], -t1[2], -t1[3], t1[4], t1[5]);
          t1 = sourceRect.left;
          t2 = sourceRect.top;
          t3 = sourceRect.width;
          t4 = sourceRect.height;
          t5 = vxList[8];
          t6 = vxList[9];
          context.drawImage(source, t1, t2, t3, t4, 0 - t5, 0 - t6, t5 - vxList[0], t6 - vxList[1]);
        } else if (rotation === 3) {
          t1 = matrix._data;
          context.setTransform(t1[2], t1[3], -t1[0], -t1[1], t1[4], t1[5]);
          context.drawImage(source, sourceRect.left, sourceRect.top, sourceRect.width, sourceRect.height, vxList[5], 0 - vxList[4], vxList[9] - vxList[1], vxList[8] - vxList[0]);
        }
      },
      renderTriangle$8: function(renderState, x1, y1, x2, y2, x3, y3, color) {
        var context, t1, matrix, alpha, blendMode;
        context = this._renderingContext;
        t1 = renderState._currentContextState;
        matrix = t1.matrix;
        alpha = t1.alpha;
        blendMode = t1.blendMode;
        if (this._activeAlpha !== alpha) {
          this._activeAlpha = alpha;
          context.globalAlpha = alpha;
        }
        if (this._activeBlendMode !== blendMode) {
          this._activeBlendMode = blendMode;
          context.globalCompositeOperation = blendMode.compositeOperation;
        }
        t1 = matrix._data;
        context.setTransform(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
        context.beginPath();
        context.moveTo(x1, y1);
        context.lineTo(x2, y2);
        context.lineTo(x3, y3);
        context.closePath();
        context.fillStyle = V.color2rgba(color);
        context.fill("nonzero");
      },
      renderTriangleMesh$4: function(renderState, ixList, vxList, color) {
        var context, t1, matrix, alpha, blendMode, i, i0, i1, i2, x1, y1, x2, y2, x3, y3;
        context = this._renderingContext;
        t1 = renderState._currentContextState;
        matrix = t1.matrix;
        alpha = t1.alpha;
        blendMode = t1.blendMode;
        if (this._activeAlpha !== alpha) {
          this._activeAlpha = alpha;
          context.globalAlpha = alpha;
        }
        if (this._activeBlendMode !== blendMode) {
          this._activeBlendMode = blendMode;
          context.globalCompositeOperation = blendMode.compositeOperation;
        }
        t1 = matrix._data;
        context.setTransform(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
        context.beginPath();
        for (t1 = ixList.length - 2, i = 0; i < t1; i += 3) {
          i0 = ixList[i] << 1 >>> 0;
          i1 = ixList[i + 1] << 1 >>> 0;
          i2 = ixList[i + 2] << 1 >>> 0;
          x1 = vxList[i0];
          y1 = vxList[i0 + 1];
          x2 = vxList[i1];
          y2 = vxList[i1 + 1];
          x3 = vxList[i2];
          y3 = vxList[i2 + 1];
          context.moveTo(x1, y1);
          context.lineTo(x2, y2);
          context.lineTo(x3, y3);
        }
        context.fillStyle = V.color2rgba(color);
        context.fill("nonzero");
      },
      renderTextureQuadFiltered$3: function(renderState, renderTextureQuad, renderFilters) {
        this.renderTextureQuad$2(renderState, renderTextureQuad);
      },
      renderObjectFiltered$2: function(renderState, renderObject) {
        renderObject.render$1(renderState);
      },
      setTransform$1: function(_, matrix) {
        var t1 = matrix._data;
        this._renderingContext.setTransform(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
      }
    },
    RenderContextWebGL: {
      "^": "RenderContext;_canvasElement,_renderingContext,_projectionMatrix,_activeRenderTexture,_activeRenderProgram,_activeRenderFrameBuffer,_activeRenderStencilBuffer,_activeBlendMode,_contextValid,_contextIdentifier,_stencilDepth,_viewportWidth,_viewportHeight,renderProgramSimple,renderProgramTinted,renderProgramTriangle,renderBufferIndex,renderBufferVertex,_renderFrameBufferPool,_activeRenderTextures,_renderPrograms,_contextLostEvent,_contextRestoredEvent",
      get$renderEngine: function() {
        return C.RenderEngine_0;
      },
      reset$0: function(_) {
        var t1 = this._canvasElement;
        this._viewportWidth = t1.width;
        this._viewportHeight = t1.height;
        this._activeRenderFrameBuffer = null;
        this._renderingContext.bindFramebuffer(36160, null);
        this._renderingContext.viewport(0, 0, this._viewportWidth, this._viewportHeight);
        t1 = this._projectionMatrix;
        t1.setIdentity$0();
        t1.scale$3(0, 2 / this._viewportWidth, -2 / this._viewportHeight, 1);
        t1.translate$3(0, -1, 1, 0);
        this._activeRenderProgram.set$projectionMatrix(t1);
      },
      clear$1: function(_, color) {
        var a, t1;
        a = (color >>> 24 & 255) / 255;
        this._renderingContext.colorMask(true, true, true, true);
        this._renderingContext.clearColor((color >>> 16 & 255) / 255 * a, (color >>> 8 & 255) / 255 * a, (color & 255) / 255 * a, a);
        this._renderingContext.clear(17408);
        t1 = this._activeRenderFrameBuffer;
        if (t1 instanceof L.RenderFrameBuffer) {
          t1 = t1._renderStencilBuffer;
          t1.toString;
          t1._depth = V.ensureInt(0);
          this._renderingContext.disable(2960);
        } else {
          this._stencilDepth = 0;
          this._renderingContext.disable(2960);
        }
      },
      flush$0: function(_) {
        this._activeRenderProgram.flush$0(0);
      },
      beginRenderMask$2: function(renderState, mask) {
        this._renderMask$3(renderState, mask, 1);
      },
      endRenderMask$2: function(renderState, mask) {
        this._renderMask$3(renderState, mask, -1);
      },
      renderTextureQuad$2: function(renderState, renderTextureQuad) {
        var t1 = this.renderProgramSimple;
        this.activateRenderProgram$1(t1);
        this.activateBlendMode$1(renderState._currentContextState.blendMode);
        this.activateRenderTexture$1(renderTextureQuad.renderTexture);
        t1.renderTextureQuad$2(renderState, renderTextureQuad);
      },
      renderTriangle$8: function(renderState, x1, y1, x2, y2, x3, y3, color) {
        var t1 = this.renderProgramTriangle;
        this.activateRenderProgram$1(t1);
        this.activateBlendMode$1(renderState._currentContextState.blendMode);
        t1.renderTriangle$8(renderState, x1, y1, x2, y2, x3, y3, color);
      },
      renderTriangleMesh$4: function(renderState, ixList, vxList, color) {
        var t1 = this.renderProgramTriangle;
        this.activateRenderProgram$1(t1);
        this.activateBlendMode$1(renderState._currentContextState.blendMode);
        t1.renderTriangleMesh$4(renderState, ixList, vxList, color);
      },
      renderTextureQuadFiltered$3: function(renderState, renderTextureQuad, renderFilters) {
        var t1, firstFilter;
        t1 = renderFilters.length;
        firstFilter = t1 === 1 ? renderFilters[0] : null;
        if (!(t1 === 0))
          if (firstFilter instanceof L.RenderFilter && firstFilter.get$isSimple())
            firstFilter.renderFilter$3(renderState, renderTextureQuad, 0);
          else
            this.renderObjectFiltered$2(renderState, new L._RenderTextureQuadObject(renderTextureQuad, renderFilters, T.Matrix$fromIdentity(), C.BlendMode_bZz, null, null, 1, null));
      },
      renderObjectFiltered$2: function(renderState, renderObject) {
        var bounds, filters, t1, pixelRatio, boundsLeft, boundsTop, boundsRight, boundsBottom, i, overlap, t2, boundsWidth, boundsHeight, initialRenderFrameBuffer, initialProjectionMatrix, filterRenderState, filterProjectionMatrix, filterRenderFrameBuffer, renderFrameBufferMap, t3, t4, t5, t6, t7, filter, pass, renderPassSource, renderPassTarget, sourceRenderFrameBuffer, sourceRenderTextureQuad, t8, $location;
        bounds = renderObject.get$bounds();
        filters = renderObject.get$filters();
        t1 = renderObject.get$pixelRatio();
        if (typeof t1 === "number")
          pixelRatio = renderObject.get$pixelRatio();
        else {
          t1 = renderState._currentContextState.matrix._data;
          pixelRatio = Math.sqrt(Math.abs(t1[0] * t1[3] - t1[1] * t1[2]));
        }
        pixelRatio.toString;
        if (isNaN(pixelRatio))
          pixelRatio = 1;
        boundsLeft = J.floor$0$n(bounds.left);
        boundsTop = J.floor$0$n(bounds.top);
        boundsRight = C.JSNumber_methods.ceil$0(bounds.left + bounds.width);
        boundsBottom = C.JSNumber_methods.ceil$0(bounds.top + bounds.height);
        for (i = 0; i < filters.length; ++i) {
          overlap = filters[i].get$overlap();
          t1 = overlap.left;
          boundsLeft += t1;
          t2 = overlap.top;
          boundsTop += t2;
          boundsRight += t1 + overlap.width;
          boundsBottom += t2 + overlap.height;
        }
        boundsLeft = C.JSNumber_methods.floor$0(boundsLeft * pixelRatio);
        boundsTop = C.JSNumber_methods.floor$0(boundsTop * pixelRatio);
        boundsWidth = C.JSNumber_methods.ceil$0(boundsRight * pixelRatio) - boundsLeft;
        boundsHeight = C.JSNumber_methods.ceil$0(boundsBottom * pixelRatio) - boundsTop;
        initialRenderFrameBuffer = this._activeRenderFrameBuffer;
        t1 = this._projectionMatrix;
        initialProjectionMatrix = new T.Matrix3D(new Float32Array(H._checkLength(16)));
        initialProjectionMatrix.copyFrom$1(t1);
        filterRenderState = L.RenderState$(this, null, null, null);
        filterProjectionMatrix = new T.Matrix3D(new Float32Array(H._checkLength(16)));
        filterProjectionMatrix.setIdentity$0();
        filterRenderFrameBuffer = this.getRenderFrameBuffer$0();
        t2 = P.$int;
        renderFrameBufferMap = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t2, L.RenderFrameBuffer]);
        t3 = -boundsLeft;
        t4 = -boundsTop;
        filterProjectionMatrix.translate$3(0, t3, t4, 0);
        filterProjectionMatrix.scale$3(0, 2 / boundsWidth, 2 / boundsHeight, 1);
        filterProjectionMatrix.translate$3(0, -1, -1, 0);
        filterRenderFrameBuffer.resize$2(0, boundsWidth, boundsHeight);
        filterRenderState._currentContextState.matrix.scale$2(0, pixelRatio, pixelRatio);
        renderFrameBufferMap.$indexSet(0, 0, filterRenderFrameBuffer);
        this.activateRenderFrameBuffer$1(filterRenderFrameBuffer);
        this.activateProjectionMatrix$1(filterProjectionMatrix);
        this.activateBlendMode$1(C.BlendMode_bZz);
        this.clear$1(0, 0);
        if (!(filters.length === 0))
          if (filters[0].get$isSimple() && !!renderObject.$is_RenderTextureQuadObject) {
            this.renderTextureQuadFiltered$3(filterRenderState, renderObject.get$renderTextureQuad(), [filters[0]]);
            filters = C.JSArray_methods.sublist$1(filters, 1);
          } else
            renderObject.render$1(filterRenderState);
        for (t5 = [H.getTypeArgumentByIndex(C.List_0, 0)], t2 = [t2], t6 = t1._matrix_3d$_data, t7 = this._renderFrameBufferPool, i = 0; i < filters.length; ++i) {
          filter = filters[i];
          filter.toString;
          for (pass = 0; pass < 1;) {
            renderPassSource = C.List_0[pass];
            renderPassTarget = C.List_1[pass];
            if (renderFrameBufferMap.containsKey$1(renderPassSource)) {
              sourceRenderFrameBuffer = renderFrameBufferMap.$index(0, renderPassSource);
              sourceRenderTextureQuad = L.RenderTextureQuad$(sourceRenderFrameBuffer._engine$_renderTexture, new U.Rectangle0(0, 0, boundsWidth, boundsHeight, t2), new U.Rectangle0(t3, t4, boundsWidth, boundsHeight, t2), 0, pixelRatio);
            } else
              throw H.wrapException(new P.StateError("Invalid renderPassSource!"));
            if (i === filters.length - 1 && renderPassTarget === C.JSArray_methods.get$last(C.List_1)) {
              this.activateRenderFrameBuffer$1(initialRenderFrameBuffer);
              t1.copyFrom$1(initialProjectionMatrix);
              this._activeRenderProgram.flush$0(0);
              t8 = this._activeRenderProgram;
              $location = t8._uniforms.$index(0, "uProjectionMatrix");
              t8._renderingContext.uniformMatrix4fv($location, false, t6);
              t8 = renderState._currentContextState.blendMode;
              if (t8 !== this._activeBlendMode) {
                this._activeRenderProgram.flush$0(0);
                this._activeBlendMode = t8;
                this._renderingContext.blendFunc(t8.srcFactor, t8.dstFactor);
              }
              filterRenderState = renderState;
              filterRenderFrameBuffer = null;
            } else if (renderFrameBufferMap.containsKey$1(renderPassTarget)) {
              filterRenderFrameBuffer = renderFrameBufferMap.$index(0, renderPassTarget);
              this.activateRenderFrameBuffer$1(filterRenderFrameBuffer);
              if (C.BlendMode_bZz !== this._activeBlendMode) {
                this._activeRenderProgram.flush$0(0);
                this._activeBlendMode = C.BlendMode_bZz;
                this._renderingContext.blendFunc(1, 771);
              }
            } else {
              filterRenderFrameBuffer = this.getRenderFrameBuffer$0();
              filterRenderFrameBuffer.resize$2(0, boundsWidth, boundsHeight);
              renderFrameBufferMap.$indexSet(0, renderPassTarget, filterRenderFrameBuffer);
              this.activateRenderFrameBuffer$1(filterRenderFrameBuffer);
              if (C.BlendMode_bZz !== this._activeBlendMode) {
                this._activeRenderProgram.flush$0(0);
                this._activeBlendMode = C.BlendMode_bZz;
                this._renderingContext.blendFunc(1, 771);
              }
              this.clear$1(0, 0);
            }
            filter.renderFilter$3(filterRenderState, sourceRenderTextureQuad, pass);
            ++pass;
            if (new H.SubListIterable(C.List_0, pass, null, t5).every$1(0, new L.RenderContextWebGL_renderObjectFiltered_closure(renderPassSource))) {
              renderFrameBufferMap.remove$1(0, renderPassSource);
              this._activeRenderProgram.flush$0(0);
              if (sourceRenderFrameBuffer instanceof L.RenderFrameBuffer)
                t7.push(sourceRenderFrameBuffer);
            }
          }
          renderFrameBufferMap.clear$0(0);
          renderFrameBufferMap.$indexSet(0, 0, filterRenderFrameBuffer);
        }
      },
      getRenderFrameBuffer$0: function() {
        var t1, t2;
        t1 = this._renderFrameBufferPool;
        if (t1.length > 0)
          return t1.pop();
        else {
          t1 = new L.RenderFrameBuffer(null, null, null, -1, null, null, 0, 0);
          t1._engine$_width = V.ensureInt(1);
          t1._engine$_height = V.ensureInt(1);
          t2 = new L.RenderTexture(0, 0, null, null, C.RenderTextureFiltering_9729, null, -1, false, null, null, -1);
          t2._engine$_width = V.ensureInt(1);
          t2._engine$_height = V.ensureInt(1);
          t1._engine$_renderTexture = t2;
          t2 = new L.RenderStencilBuffer(0, 0, 0, null, -1, null, null);
          t2._engine$_width = V.ensureInt(1);
          t2._engine$_height = V.ensureInt(1);
          t2._depth = 0;
          t1._renderStencilBuffer = t2;
          return t1;
        }
      },
      activateRenderFrameBuffer$1: function(renderFrameBuffer) {
        var t1, t2, t3, t4, colorData, stencilData;
        t1 = this._activeRenderFrameBuffer;
        if (renderFrameBuffer == null ? t1 != null : renderFrameBuffer !== t1) {
          t1 = this._activeRenderProgram;
          if (renderFrameBuffer instanceof L.RenderFrameBuffer) {
            t1.flush$0(0);
            this._activeRenderFrameBuffer = renderFrameBuffer;
            t1 = renderFrameBuffer._contextIdentifier;
            t2 = this._contextIdentifier;
            if (t1 !== t2) {
              renderFrameBuffer._engine$_renderContext = this;
              renderFrameBuffer._contextIdentifier = t2;
              t1 = this._renderingContext;
              renderFrameBuffer._renderingContext = t1;
              renderFrameBuffer._framebuffer = t1.createFramebuffer();
              t1 = renderFrameBuffer._engine$_renderContext;
              t2 = renderFrameBuffer._engine$_renderTexture;
              t3 = t1._activeRenderTexture;
              if (t2 == null ? t3 != null : t2 !== t3) {
                t1._activeRenderProgram.flush$0(0);
                t1._activeRenderTexture = t2;
                t3 = t2._contextIdentifier;
                t4 = t1._contextIdentifier;
                if (t3 !== t4) {
                  t2._engine$_renderContext = t1;
                  t2._contextIdentifier = t4;
                  t1 = t1._renderingContext;
                  t2._renderingContext = t1;
                  t2._texture = t1.createTexture();
                  t2._renderingContext.activeTexture(33984);
                  t2._renderingContext.bindTexture(3553, t2._texture);
                  t1 = t2._engine$_source;
                  if (t1 != null) {
                    t3 = t2._renderingContext;
                    (t3 && C.RenderingContext_methods).texImage2D$6(t3, 3553, 0, 6408, 6408, 5121, t1);
                    t2._textureSourceWorkaround = t2._renderingContext.getError() === 1281;
                  } else {
                    t1 = t2._renderingContext;
                    (t1 && C.RenderingContext_methods).texImage2D$9(t1, 3553, 0, 6408, t2._engine$_width, t2._engine$_height, 0, 6408, 5121, null);
                  }
                  if (t2._textureSourceWorkaround) {
                    t1 = t2._engine$_width;
                    t1 = W.CanvasElement_CanvasElement(t2._engine$_height, t1);
                    t2._canvas = t1;
                    t1.toString;
                    t1.getContext("2d").drawImage(t2._engine$_source, 0, 0);
                    t2._renderingContext.texImage2DCanvas$6(3553, 0, 6408, 6408, 5121, t2._canvas);
                  }
                  t2._renderingContext.texParameteri(3553, 10242, 33071);
                  t2._renderingContext.texParameteri(3553, 10243, 33071);
                  t2._renderingContext.texParameteri(3553, 10241, t2._filtering.value);
                  t2._renderingContext.texParameteri(3553, 10240, t2._filtering.value);
                } else {
                  t2._renderingContext.activeTexture(33984);
                  t2._renderingContext.bindTexture(3553, t2._texture);
                }
              }
              t1 = renderFrameBuffer._engine$_renderContext;
              t2 = renderFrameBuffer._renderStencilBuffer;
              t3 = t1._activeRenderStencilBuffer;
              if (t2 == null ? t3 != null : t2 !== t3) {
                t1._activeRenderProgram.flush$0(0);
                t1._activeRenderStencilBuffer = t2;
                t2.activate$1(t1);
              }
              colorData = renderFrameBuffer._engine$_renderTexture._texture;
              stencilData = renderFrameBuffer._renderStencilBuffer._renderbuffer;
              renderFrameBuffer._renderingContext.bindFramebuffer(36160, renderFrameBuffer._framebuffer);
              renderFrameBuffer._renderingContext.framebufferTexture2D(36160, 36064, 3553, colorData, 0);
              renderFrameBuffer._renderingContext.framebufferRenderbuffer(36160, 33306, 36161, stencilData);
            } else
              renderFrameBuffer._renderingContext.bindFramebuffer(36160, renderFrameBuffer._framebuffer);
            this._renderingContext.viewport(0, 0, renderFrameBuffer._engine$_width, renderFrameBuffer._engine$_height);
            t1 = renderFrameBuffer._renderStencilBuffer._depth;
            t2 = this._renderingContext;
            if (t1 === 0)
              t2.disable(2960);
            else {
              t2.enable(2960);
              this._renderingContext.stencilFunc(514, t1, 255);
            }
          } else {
            t1.flush$0(0);
            this._activeRenderFrameBuffer = null;
            this._renderingContext.bindFramebuffer(36160, null);
            this._renderingContext.viewport(0, 0, this._viewportWidth, this._viewportHeight);
            t1 = this._stencilDepth;
            t2 = this._renderingContext;
            if (t1 === 0)
              t2.disable(2960);
            else {
              t2.enable(2960);
              this._renderingContext.stencilFunc(514, t1, 255);
            }
          }
        }
      },
      activateRenderStencilBuffer$1: function(renderStencilBuffer) {
        var t1 = this._activeRenderStencilBuffer;
        if (renderStencilBuffer == null ? t1 != null : renderStencilBuffer !== t1) {
          this._activeRenderProgram.flush$0(0);
          this._activeRenderStencilBuffer = renderStencilBuffer;
          renderStencilBuffer.activate$1(this);
        }
      },
      activateRenderProgram$1: function(renderProgram) {
        var t1 = this._activeRenderProgram;
        if (renderProgram == null ? t1 != null : renderProgram !== t1) {
          t1.flush$0(0);
          this._activeRenderProgram = renderProgram;
          renderProgram.activate$1(this);
          this._activeRenderProgram.set$projectionMatrix(this._projectionMatrix);
        }
      },
      activateBlendMode$1: function(blendMode) {
        if (blendMode !== this._activeBlendMode) {
          this._activeRenderProgram.flush$0(0);
          this._activeBlendMode = blendMode;
          this._renderingContext.blendFunc(blendMode.srcFactor, blendMode.dstFactor);
        }
      },
      activateRenderTexture$1: function(renderTexture) {
        var t1, t2;
        t1 = this._activeRenderTexture;
        if (renderTexture == null ? t1 != null : renderTexture !== t1) {
          this._activeRenderProgram.flush$0(0);
          this._activeRenderTexture = renderTexture;
          t1 = renderTexture._contextIdentifier;
          t2 = this._contextIdentifier;
          if (t1 !== t2) {
            renderTexture._engine$_renderContext = this;
            renderTexture._contextIdentifier = t2;
            t1 = this._renderingContext;
            renderTexture._renderingContext = t1;
            renderTexture._texture = t1.createTexture();
            renderTexture._renderingContext.activeTexture(33984);
            renderTexture._renderingContext.bindTexture(3553, renderTexture._texture);
            t1 = renderTexture._engine$_source;
            if (t1 != null) {
              t2 = renderTexture._renderingContext;
              (t2 && C.RenderingContext_methods).texImage2D$6(t2, 3553, 0, 6408, 6408, 5121, t1);
              renderTexture._textureSourceWorkaround = renderTexture._renderingContext.getError() === 1281;
            } else {
              t1 = renderTexture._renderingContext;
              (t1 && C.RenderingContext_methods).texImage2D$9(t1, 3553, 0, 6408, renderTexture._engine$_width, renderTexture._engine$_height, 0, 6408, 5121, null);
            }
            if (renderTexture._textureSourceWorkaround) {
              t1 = renderTexture._engine$_width;
              t1 = W.CanvasElement_CanvasElement(renderTexture._engine$_height, t1);
              renderTexture._canvas = t1;
              t1.toString;
              t1.getContext("2d").drawImage(renderTexture._engine$_source, 0, 0);
              renderTexture._renderingContext.texImage2DCanvas$6(3553, 0, 6408, 6408, 5121, renderTexture._canvas);
            }
            renderTexture._renderingContext.texParameteri(3553, 10242, 33071);
            renderTexture._renderingContext.texParameteri(3553, 10243, 33071);
            renderTexture._renderingContext.texParameteri(3553, 10241, renderTexture._filtering.value);
            renderTexture._renderingContext.texParameteri(3553, 10240, renderTexture._filtering.value);
          } else {
            renderTexture._renderingContext.activeTexture(33984);
            renderTexture._renderingContext.bindTexture(3553, renderTexture._texture);
          }
        }
      },
      activateProjectionMatrix$1: function(matrix) {
        var t1, t2, $location;
        t1 = this._projectionMatrix;
        t1.copyFrom$1(matrix);
        this._activeRenderProgram.flush$0(0);
        t2 = this._activeRenderProgram;
        $location = t2._uniforms.$index(0, "uProjectionMatrix");
        t2._renderingContext.uniformMatrix4fv($location, false, t1._matrix_3d$_data);
      },
      _renderMask$3: function(renderState, mask, depthDelta) {
        var rfb, stencilDepth, t1;
        rfb = this._activeRenderFrameBuffer;
        stencilDepth = rfb != null ? rfb._renderStencilBuffer._depth : this._stencilDepth;
        this._activeRenderProgram.flush$0(0);
        this._renderingContext.enable(2960);
        this._renderingContext.stencilFunc(514, stencilDepth, 255);
        t1 = this._renderingContext;
        t1.stencilOp(7680, 7680, depthDelta === 1 ? 7682 : 7683);
        this._renderingContext.stencilMask(255);
        this._renderingContext.colorMask(false, false, false, false);
        mask.renderMask$1(renderState);
        this._activeRenderProgram.flush$0(0);
        t1 = stencilDepth + depthDelta;
        this._renderingContext.stencilFunc(514, t1, 255);
        this._renderingContext.stencilOp(7680, 7680, 7680);
        this._renderingContext.stencilMask(0);
        this._renderingContext.colorMask(true, true, true, true);
        this._updateStencilDepth$1(t1);
      },
      _onContextLost$1: [function(contextEvent) {
        var t1;
        contextEvent.preventDefault();
        this._contextValid = false;
        t1 = this._contextLostEvent;
        if (!t1.get$_mayAddEvent())
          H.throwExpression(t1._addEventError$0());
        t1._sendData$1(new L.RenderContextEvent());
      }, "call$1", "get$_onContextLost", 2, 0, 22],
      _onContextRestored$1: [function(contextEvent) {
        var t1;
        this._contextValid = true;
        t1 = $.RenderContextWebGL__globalContextIdentifier + 1;
        $.RenderContextWebGL__globalContextIdentifier = t1;
        this._contextIdentifier = t1;
        t1 = this._contextRestoredEvent;
        if (!t1.get$_mayAddEvent())
          H.throwExpression(t1._addEventError$0());
        t1._sendData$1(new L.RenderContextEvent());
      }, "call$1", "get$_onContextRestored", 2, 0, 22],
      _updateStencilDepth$1: function(stencilDepth) {
        var t1 = this._activeRenderFrameBuffer;
        if (t1 instanceof L.RenderFrameBuffer) {
          t1 = t1._renderStencilBuffer;
          t1.toString;
          t1._depth = V.ensureInt(stencilDepth);
          this._updateStencilTest$1(stencilDepth);
        } else {
          this._stencilDepth = stencilDepth;
          this._updateStencilTest$1(stencilDepth);
        }
      },
      _updateStencilTest$1: function(stencilDepth) {
        var t1 = this._renderingContext;
        if (stencilDepth === 0)
          t1.disable(2960);
        else {
          t1.enable(2960);
          this._renderingContext.stencilFunc(514, stencilDepth, 255);
        }
      }
    },
    RenderContextWebGL_renderObjectFiltered_closure: {
      "^": "Closure:0;renderPassSource",
      call$1: function(rps) {
        return !J.$eq$(rps, this.renderPassSource);
      }
    },
    RenderFilter: {
      "^": "Object;",
      get$isSimple: function() {
        return true;
      }
    },
    RenderFrameBuffer: {
      "^": "Object;_engine$_renderContext,_renderStencilBuffer,_engine$_renderTexture,_contextIdentifier,_framebuffer,_renderingContext,_engine$_width,_engine$_height",
      get$width: function(_) {
        return this._engine$_width;
      },
      get$height: function(_) {
        return this._engine$_height;
      },
      resize$2: function(_, width, height) {
        if (this._engine$_width !== width || this._engine$_height !== height) {
          this._engine$_width = width;
          this._engine$_height = height;
          this._engine$_renderTexture.resize$2(0, width, height);
          this._renderStencilBuffer.resize$2(0, width, height);
        }
      }
    },
    _globalFrameRequest_closure: {
      "^": "Closure:0;",
      call$1: [function(frameTime) {
        var currentFrameTime, t1, t2;
        currentFrameTime = V.ensureNum(frameTime) / 1000;
        t1 = $._globalFrameTime;
        $._globalFrameTime = currentFrameTime;
        $._globalFrameCallbackId = -1;
        L._globalFrameRequest();
        t2 = $.$get$_globalFrameListeners();
        t2.toString;
        t2 = H.setRuntimeTypeInfo(t2.slice(), [H.getTypeArgumentByIndex(t2, 0)]);
        C.JSArray_methods.forEach$1(t2, new L._globalFrameRequest__closure(currentFrameTime - t1));
      }, null, null, 2, 0, null, 45, "call"]
    },
    _globalFrameRequest__closure: {
      "^": "Closure:0;deltaTime",
      call$1: function(f) {
        return f.call$1(this.deltaTime);
      }
    },
    RenderLoopBase: {
      "^": "Object;",
      start$0: function(_) {
        this._running = true;
        L._globalFrameRequest();
        $.$get$_globalFrameListeners().push(this.get$_onGlobalFrame());
      },
      _onGlobalFrame$1: [function(deltaTime) {
        if (this._running && deltaTime >= 0)
          if (typeof deltaTime === "number")
            this.advanceTime$1(deltaTime);
      }, "call$1", "get$_onGlobalFrame", 2, 0, 23, 46]
    },
    _RenderTextureQuadObject: {
      "^": "Object;renderTextureQuad<,filters<,transformationMatrix<,blendMode,cache,mask>,alpha,pixelRatio<",
      get$bounds: function() {
        var t1, t2, t3;
        t1 = this.renderTextureQuad;
        t2 = t1.offsetRectangle;
        t3 = t2.width;
        t1 = t1.pixelRatio;
        return new U.Rectangle0(0, 0, t3 / t1, t2.height / t1, [P.num]);
      },
      render$1: function(renderState) {
        renderState._engine$_renderContext.renderTextureQuad$2(renderState, this.renderTextureQuad);
      }
    },
    RenderProgram: {
      "^": "Object;",
      set$projectionMatrix: function(matrix) {
        var $location = this._uniforms.$index(0, "uProjectionMatrix");
        this._renderingContext.uniformMatrix4fv($location, false, matrix._matrix_3d$_data);
      },
      activate$1: ["super$RenderProgram$activate", function(renderContext) {
        var t1, t2, t3;
        t1 = this._contextIdentifier;
        t2 = renderContext._contextIdentifier;
        if (t1 !== t2) {
          this._contextIdentifier = t2;
          t1 = renderContext._renderingContext;
          this._renderingContext = t1;
          t3 = renderContext.renderBufferIndex;
          this._renderBufferIndex = t3;
          this._renderBufferVertex = renderContext.renderBufferVertex;
          if (t3._contextIdentifier !== t2) {
            t3._contextIdentifier = t2;
            t3._renderingContext = t1;
            t1 = t1.createBuffer();
            t3._buffer = t1;
            t3._renderingContext.bindBuffer(34963, t1);
            t3._renderingContext.bufferData(34963, t3.data, t3.usage);
          }
          t3._renderingContext.bindBuffer(34963, t3._buffer);
          t1 = this._renderBufferVertex;
          t2 = t1._contextIdentifier;
          t3 = renderContext._contextIdentifier;
          if (t2 !== t3) {
            t1._contextIdentifier = t3;
            t2 = renderContext._renderingContext;
            t1._renderingContext = t2;
            t2 = t2.createBuffer();
            t1._buffer = t2;
            t1._renderingContext.bindBuffer(34962, t2);
            t1._renderingContext.bufferData(34962, t1.data, t1.usage);
          }
          t1._renderingContext.bindBuffer(34962, t1._buffer);
          t1 = this._createProgram$1(this._renderingContext);
          this._program = t1;
          this._updateAttributes$2(this._renderingContext, t1);
          this._updateUniforms$2(this._renderingContext, this._program);
        }
        this._renderingContext.useProgram(this._program);
      }],
      flush$0: function(_) {
        var t1, t2, t3, update, t4;
        t1 = this._renderBufferIndex;
        t2 = t1.position;
        if (t2 > 0 && this._renderBufferVertex.position > 0) {
          t3 = t1.data.buffer;
          t3.toString;
          update = H.NativeInt16List_NativeInt16List$view(t3, 0, t2);
          t1._renderingContext.bufferSubData(34963, 0, update);
          t1 = this._renderBufferIndex;
          t1.position = 0;
          t1.count = 0;
          t1 = this._renderBufferVertex;
          t3 = t1.data.buffer;
          t4 = t1.position;
          t3.toString;
          update = H.NativeFloat32List_NativeFloat32List$view(t3, 0, t4);
          t1._renderingContext.bufferSubData(34962, 0, update);
          t1 = this._renderBufferVertex;
          t1.position = 0;
          t1.count = 0;
          this._renderingContext.drawElements(4, t2, 5123, 0);
        }
      },
      _createProgram$1: function(rc) {
        var program, vShader, fShader;
        program = rc.createProgram();
        vShader = this._createShader$3(rc, this.get$vertexShaderSource(), 35633);
        fShader = this._createShader$3(rc, this.get$fragmentShaderSource(), 35632);
        rc.attachShader(program, vShader);
        rc.attachShader(program, fShader);
        rc.linkProgram(program);
        if (rc.getProgramParameter(program, 35714) === true)
          return program;
        throw H.wrapException(new P.StateError(rc.isContextLost() ? "ContextLost" : rc.getProgramInfoLog(program)));
      },
      _createShader$3: function(rc, source, type) {
        var shader = rc.createShader(type);
        rc.shaderSource(shader, source);
        rc.compileShader(shader);
        if (rc.getShaderParameter(shader, 35713) === true)
          return shader;
        throw H.wrapException(new P.StateError(rc.isContextLost() ? "ContextLost" : rc.getShaderInfoLog(shader)));
      },
      _updateAttributes$2: function(rc, program) {
        var t1, count, i, activeInfo, $location;
        t1 = this._attributes;
        t1.clear$0(0);
        count = rc.getProgramParameter(program, 35721);
        for (i = 0; i < count; ++i) {
          activeInfo = rc.getActiveAttrib(program, i);
          $location = rc.getAttribLocation(program, activeInfo.name);
          rc.enableVertexAttribArray($location);
          t1.$indexSet(0, activeInfo.name, $location);
        }
      },
      _updateUniforms$2: function(rc, program) {
        var t1, count, i, activeInfo, $location;
        t1 = this._uniforms;
        t1.clear$0(0);
        count = rc.getProgramParameter(program, 35718);
        for (i = 0; i < count; ++i) {
          activeInfo = rc.getActiveUniform(program, i);
          $location = rc.getUniformLocation(program, activeInfo.name);
          t1.$indexSet(0, activeInfo.name, $location);
        }
      }
    },
    RenderProgramSimple: {
      "^": "RenderProgram;_contextIdentifier,_renderingContext,_program,_attributes,_uniforms,_renderBufferIndex,_renderBufferVertex",
      get$vertexShaderSource: function() {
        return "\r\n    uniform mat4 uProjectionMatrix;\r\n\r\n    attribute vec2 aVertexPosition;\r\n    attribute vec2 aVertexTextCoord;\r\n    attribute float aVertexAlpha;\r\n\r\n    varying vec2 vTextCoord;\r\n    varying float vAlpha;\r\n\r\n    void main() {\r\n      vTextCoord = aVertexTextCoord;\r\n      vAlpha = aVertexAlpha;\r\n      gl_Position = vec4(aVertexPosition, 0.0, 1.0) * uProjectionMatrix;\r\n    }\r\n    ";
      },
      get$fragmentShaderSource: function() {
        return "\r\n    precision mediump float;\r\n\r\n    uniform sampler2D uSampler;\r\n\r\n    varying vec2 vTextCoord;\r\n    varying float vAlpha;\r\n\r\n    void main() {\r\n      gl_FragColor = texture2D(uSampler, vTextCoord) * vAlpha;\r\n    }\r\n    ";
      },
      activate$1: function(renderContext) {
        var t1;
        this.super$RenderProgram$activate(renderContext);
        this._renderingContext.uniform1i(this._uniforms.$index(0, "uSampler"), 0);
        t1 = this._attributes;
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aVertexPosition"), 2, 20, 0);
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aVertexTextCoord"), 2, 20, 8);
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aVertexAlpha"), 1, 20, 16);
      },
      renderTextureQuad$2: function(renderState, renderTextureQuad) {
        var t1, alpha, matrix, vxList, ixData, t2, vxData, t3, ixIndex, t4, vxOffset, t5, t6, ma1, t7, ma2, mb1, mb2, mc1, mc2, md1, md2, vxIndex;
        renderTextureQuad._hasCustomVertices;
        t1 = renderState._currentContextState;
        alpha = t1.alpha;
        matrix = t1.matrix;
        vxList = renderTextureQuad.vxListQuad;
        t1 = this._renderBufferIndex;
        ixData = t1.data;
        t2 = ixData.length;
        if (t2 < t1.position + 6)
          this.flush$0(0);
        t1 = this._renderBufferVertex;
        vxData = t1.data;
        t3 = vxData.length;
        if (t3 < t1.position + 20)
          this.flush$0(0);
        t1 = this._renderBufferIndex;
        ixIndex = t1.position;
        t4 = this._renderBufferVertex;
        vxOffset = t4.count;
        if (ixIndex > t2 - 6)
          return;
        ixData[ixIndex] = vxOffset;
        ixData[ixIndex + 1] = vxOffset + 1;
        t2 = vxOffset + 2;
        ixData[ixIndex + 2] = t2;
        ixData[ixIndex + 3] = vxOffset;
        ixData[ixIndex + 4] = t2;
        ixData[ixIndex + 5] = vxOffset + 3;
        t1.position = ixIndex + 6;
        t1.count += 6;
        t1 = vxList[0];
        t2 = matrix._data;
        t5 = t2[0];
        t6 = t2[4];
        ma1 = t1 * t5 + t6;
        t7 = vxList[8];
        ma2 = t7 * t5 + t6;
        t6 = t2[1];
        t5 = t2[5];
        mb1 = t1 * t6 + t5;
        mb2 = t7 * t6 + t5;
        t5 = vxList[1];
        t6 = t2[2];
        mc1 = t5 * t6;
        t7 = vxList[9];
        mc2 = t7 * t6;
        t2 = t2[3];
        md1 = t5 * t2;
        md2 = t7 * t2;
        vxIndex = t4.position;
        if (vxIndex > t3 - 20)
          return;
        vxData[vxIndex] = ma1 + mc1;
        vxData[vxIndex + 1] = mb1 + md1;
        vxData[vxIndex + 2] = vxList[2];
        vxData[vxIndex + 3] = vxList[3];
        vxData[vxIndex + 4] = alpha;
        vxData[vxIndex + 5] = ma2 + mc1;
        vxData[vxIndex + 6] = mb2 + md1;
        vxData[vxIndex + 7] = vxList[6];
        vxData[vxIndex + 8] = vxList[7];
        vxData[vxIndex + 9] = alpha;
        vxData[vxIndex + 10] = ma2 + mc2;
        vxData[vxIndex + 11] = mb2 + md2;
        vxData[vxIndex + 12] = vxList[10];
        vxData[vxIndex + 13] = vxList[11];
        vxData[vxIndex + 14] = alpha;
        vxData[vxIndex + 15] = ma1 + mc2;
        vxData[vxIndex + 16] = mb1 + md2;
        vxData[vxIndex + 17] = vxList[14];
        vxData[vxIndex + 18] = vxList[15];
        vxData[vxIndex + 19] = alpha;
        t4.position = vxIndex + 20;
        t4.count = vxOffset + 4;
      }
    },
    RenderProgramTinted: {
      "^": "RenderProgram;_contextIdentifier,_renderingContext,_program,_attributes,_uniforms,_renderBufferIndex,_renderBufferVertex",
      get$vertexShaderSource: function() {
        return "\r\n    uniform mat4 uProjectionMatrix;\r\n\r\n    attribute vec2 aVertexPosition;\r\n    attribute vec2 aVertexTextCoord;\r\n    attribute vec4 aVertexColor;\r\n\r\n    varying vec2 vTextCoord;\r\n    varying vec4 vColor; \r\n\r\n    void main() {\r\n      vTextCoord = aVertexTextCoord;\r\n      vColor = aVertexColor;\r\n      gl_Position = vec4(aVertexPosition, 0.0, 1.0) * uProjectionMatrix;\r\n    }\r\n    ";
      },
      get$fragmentShaderSource: function() {
        return "\r\n    precision mediump float;\r\n    uniform sampler2D uSampler;\r\n    varying vec2 vTextCoord;\r\n    varying vec4 vColor; \r\n\r\n    void main() {\r\n      vec4 color = texture2D(uSampler, vTextCoord);\r\n      gl_FragColor = vec4(color.rgb * vColor.rgb * vColor.a, color.a * vColor.a);\r\n    }\r\n    ";
      }
    },
    RenderProgramTriangle: {
      "^": "RenderProgram;_contextIdentifier,_renderingContext,_program,_attributes,_uniforms,_renderBufferIndex,_renderBufferVertex",
      get$vertexShaderSource: function() {
        return "\r\n    uniform mat4 uProjectionMatrix;\r\n    attribute vec2 aVertexPosition;\r\n    attribute vec4 aVertexColor;\r\n    varying vec4 vColor;\r\n\r\n    void main() {\r\n      vColor = aVertexColor;\r\n      gl_Position = vec4(aVertexPosition, 0.0, 1.0) * uProjectionMatrix;\r\n    }\r\n    ";
      },
      get$fragmentShaderSource: function() {
        return "\r\n    precision mediump float;\r\n    varying vec4 vColor;\r\n\r\n    void main() {\r\n      gl_FragColor = vec4(vColor.rgb * vColor.a, vColor.a);\r\n    }\r\n    ";
      },
      activate$1: function(renderContext) {
        var t1;
        this.super$RenderProgram$activate(renderContext);
        t1 = this._attributes;
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aVertexPosition"), 2, 24, 0);
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aVertexColor"), 4, 24, 8);
      },
      renderTriangle$8: function(renderState, x1, y1, x2, y2, x3, y3, color) {
        var t1, matrix, colorA, colorR, colorG, colorB, ixData, ixPosition, t2, vxData, vxPosition, t3, ixIndex, t4, vxCount, a, b, c, d, tx, ty, vxIndex;
        t1 = renderState._currentContextState;
        matrix = t1.matrix;
        colorA = (color >>> 24 & 255) / 255 * t1.alpha;
        colorR = (color >>> 16 & 255) / 255;
        colorG = (color >>> 8 & 255) / 255;
        colorB = (color & 255) / 255;
        t1 = this._renderBufferIndex;
        ixData = t1.data;
        ixPosition = t1.position;
        t1 = ixData.length;
        if (t1 < ixPosition + 3)
          this.flush$0(0);
        t2 = this._renderBufferVertex;
        vxData = t2.data;
        vxPosition = t2.position;
        t2 = vxData.length;
        if (t2 < vxPosition + 18)
          this.flush$0(0);
        t3 = this._renderBufferIndex;
        ixIndex = t3.position;
        t4 = this._renderBufferVertex;
        vxCount = t4.count;
        if (ixIndex > t1 - 3)
          return;
        ixData[ixIndex] = vxCount;
        ixData[ixIndex + 1] = vxCount + 1;
        ixData[ixIndex + 2] = vxCount + 2;
        t3.position = ixIndex + 3;
        t3.count += 3;
        t1 = matrix._data;
        a = t1[0];
        b = t1[1];
        c = t1[2];
        d = t1[3];
        tx = t1[4];
        ty = t1[5];
        vxIndex = t4.position;
        if (vxIndex > t2 - 18)
          return;
        vxData[vxIndex] = x1 * a + y1 * c + tx;
        vxData[vxIndex + 1] = x1 * b + y1 * d + ty;
        vxData[vxIndex + 2] = colorR;
        vxData[vxIndex + 3] = colorG;
        vxData[vxIndex + 4] = colorB;
        vxData[vxIndex + 5] = colorA;
        vxData[vxIndex + 6] = x2 * a + y2 * c + tx;
        vxData[vxIndex + 7] = x2 * b + y2 * d + ty;
        vxData[vxIndex + 8] = colorR;
        vxData[vxIndex + 9] = colorG;
        vxData[vxIndex + 10] = colorB;
        vxData[vxIndex + 11] = colorA;
        vxData[vxIndex + 12] = x3 * a + y3 * c + tx;
        vxData[vxIndex + 13] = x3 * b + y3 * d + ty;
        vxData[vxIndex + 14] = colorR;
        vxData[vxIndex + 15] = colorG;
        vxData[vxIndex + 16] = colorB;
        vxData[vxIndex + 17] = colorA;
        t4.position = vxIndex + 18;
        t4.count = vxCount + 3;
      },
      renderTriangleMesh$4: function(renderState, ixList, vxList, color) {
        var t1, matrix, ixListCount, t2, vxListCount, colorA, colorR, colorG, colorB, ixData, t3, vxData, t4, t5, ixIndex, vxOffset, ixIndex0, i, ma, mb, mc, md, mx, my, vxIndex, vxIndex0, o, x, y;
        t1 = renderState._currentContextState;
        matrix = t1.matrix;
        ixListCount = ixList.length;
        t2 = vxList.length;
        vxListCount = t2 >>> 1;
        colorA = (color >>> 24 & 255) / 255 * t1.alpha;
        colorR = (color >>> 16 & 255) / 255;
        colorG = (color >>> 8 & 255) / 255;
        colorB = (color & 255) / 255;
        t1 = this._renderBufferIndex;
        ixData = t1.data;
        t3 = ixData.length;
        if (t3 < t1.position + ixListCount)
          this.flush$0(0);
        t1 = this._renderBufferVertex;
        vxData = t1.data;
        t4 = vxData.length;
        t5 = vxListCount * 6;
        if (t4 < t1.position + t5)
          this.flush$0(0);
        t1 = this._renderBufferIndex;
        ixIndex = t1.position;
        vxOffset = this._renderBufferVertex.count;
        for (--t3, ixIndex0 = ixIndex, i = 0; i < ixListCount; ++i) {
          if (ixIndex0 > t3)
            break;
          ixData[ixIndex0] = vxOffset + ixList[i];
          ++ixIndex0;
        }
        t1.position = ixIndex + ixListCount;
        this._renderBufferIndex.count += ixListCount;
        t1 = matrix._data;
        ma = t1[0];
        mb = t1[1];
        mc = t1[2];
        md = t1[3];
        mx = t1[4];
        my = t1[5];
        t1 = this._renderBufferVertex;
        vxIndex = t1.position;
        for (t2 -= 2, t4 -= 6, vxIndex0 = vxIndex, i = 0, o = 0; i < vxListCount; ++i, o += 2) {
          if (vxIndex0 > t4)
            break;
          if (o > t2)
            break;
          x = vxList[o];
          y = vxList[o + 1];
          vxData[vxIndex0] = mx + ma * x + mc * y;
          vxData[vxIndex0 + 1] = my + mb * x + md * y;
          vxData[vxIndex0 + 2] = colorR;
          vxData[vxIndex0 + 3] = colorG;
          vxData[vxIndex0 + 4] = colorB;
          vxData[vxIndex0 + 5] = colorA;
          vxIndex0 += 6;
        }
        t1.position = vxIndex + t5;
        this._renderBufferVertex.count += vxListCount;
      }
    },
    _ContextState: {
      "^": "Object;alpha,blendMode,matrix,matrix3D,previousContextState,_nextContextState"
    },
    RenderState: {
      "^": "Object;currentTime,deltaTime,_engine$_renderContext,_firstContextState,_currentContextState",
      copyFrom$1: function(renderState) {
        var t1, t2;
        t1 = this._firstContextState;
        this._currentContextState = t1;
        t1.matrix.copyFrom$1(renderState._currentContextState.matrix);
        t1 = this._currentContextState;
        t2 = renderState._currentContextState;
        t1.alpha = t2.alpha;
        t1.blendMode = t2.blendMode;
      },
      renderObject$1: function(renderObject) {
        var matrix, blendMode, alpha, filters, mask, cs1, cs2, t1, t2, maskAfter;
        matrix = renderObject.get$transformationMatrix();
        blendMode = renderObject._blendMode;
        alpha = renderObject._alpha;
        filters = renderObject._filters;
        mask = renderObject._mask;
        cs1 = this._currentContextState;
        cs2 = cs1._nextContextState;
        if (cs2 == null) {
          t1 = T.Matrix$fromIdentity();
          t2 = new T.Matrix3D(new Float32Array(H._checkLength(16)));
          t2.setIdentity$0();
          cs2 = new L._ContextState(1, C.BlendMode_bZz, t1, t2, cs1, null);
          cs1._nextContextState = cs2;
        }
        t1 = mask != null;
        t1;
        maskAfter = t1 && true;
        cs2.matrix.copyFromAndConcat$2(matrix, cs1.matrix);
        cs2.blendMode = blendMode instanceof L.BlendMode ? blendMode : cs1.blendMode;
        cs2.alpha = alpha * cs1.alpha;
        this._currentContextState = cs2;
        if (maskAfter)
          this._engine$_renderContext.beginRenderMask$2(this, mask);
        if (filters.length > 0)
          renderObject.renderFiltered$1(this);
        else
          renderObject.render$1(this);
        if (maskAfter)
          this._engine$_renderContext.endRenderMask$2(this, mask);
        this._currentContextState = cs1;
      },
      RenderState$4: function(renderContext, matrix, alpha, blendMode) {
        var t1 = this._firstContextState;
        this._currentContextState = t1;
        if (matrix instanceof T.Matrix)
          t1.matrix.copyFrom$1(matrix);
        if (typeof alpha === "number")
          t1.alpha = alpha;
      },
      static: {
        RenderState$: function(renderContext, matrix, alpha, blendMode) {
          var t1, t2;
          t1 = T.Matrix$fromIdentity();
          t2 = new T.Matrix3D(new Float32Array(H._checkLength(16)));
          t2.setIdentity$0();
          t2 = new L.RenderState(0, 0, renderContext, new L._ContextState(1, C.BlendMode_bZz, t1, t2, null, null), null);
          t2.RenderState$4(renderContext, matrix, alpha, blendMode);
          return t2;
        }
      }
    },
    RenderStencilBuffer: {
      "^": "Object;_engine$_width,_engine$_height,_depth,_engine$_renderContext,_contextIdentifier,_renderingContext,_renderbuffer",
      get$width: function(_) {
        return this._engine$_width;
      },
      get$height: function(_) {
        return this._engine$_height;
      },
      resize$2: function(_, width, height) {
        var t1;
        if (this._engine$_width !== width || this._engine$_height !== height) {
          this._engine$_width = width;
          this._engine$_height = height;
          t1 = this._engine$_renderContext;
          if (t1 == null || this._renderbuffer == null)
            return;
          if (t1._contextIdentifier !== this._contextIdentifier)
            return;
          t1.activateRenderStencilBuffer$1(this);
          this._renderingContext.renderbufferStorage(36161, 34041, this._engine$_width, this._engine$_height);
        }
      },
      activate$1: function(renderContext) {
        var t1, t2;
        t1 = this._contextIdentifier;
        t2 = renderContext._contextIdentifier;
        if (t1 !== t2) {
          this._engine$_renderContext = renderContext;
          this._contextIdentifier = t2;
          t1 = renderContext._renderingContext;
          this._renderingContext = t1;
          t1 = t1.createRenderbuffer();
          this._renderbuffer = t1;
          this._renderingContext.bindRenderbuffer(36161, t1);
          this._renderingContext.renderbufferStorage(36161, 34041, this._engine$_width, this._engine$_height);
        } else
          this._renderingContext.bindRenderbuffer(36161, this._renderbuffer);
      }
    },
    RenderTexture: {
      "^": "Object;_engine$_width,_engine$_height,_engine$_source,_canvas,_filtering,_engine$_renderContext,_contextIdentifier,_textureSourceWorkaround,_renderingContext,_texture,_videoUpdateTime",
      get$width: function(_) {
        return this._engine$_width;
      },
      get$height: function(_) {
        return this._engine$_height;
      },
      get$quad: function() {
        var t1, t2, t3;
        t1 = this._engine$_width;
        t2 = this._engine$_height;
        t3 = [P.$int];
        return L.RenderTextureQuad$(this, new U.Rectangle0(0, 0, t1, t2, t3), new U.Rectangle0(0, 0, t1, t2, t3), 0, 1);
      },
      get$canvas: function(_) {
        var t1, t2;
        t1 = this._engine$_source;
        t2 = J.getInterceptor(t1);
        if (!!t2.$isCanvasElement)
          return t1;
        else if (!!t2.$isImageElement) {
          t2 = this._engine$_width;
          t2 = W.CanvasElement_CanvasElement(this._engine$_height, t2);
          this._engine$_source = t2;
          this._canvas = t2;
          t2.toString;
          t2.getContext("2d").drawImage(t1, 0, 0, this._engine$_width, this._engine$_height);
          return this._canvas;
        } else
          throw H.wrapException(new P.StateError("RenderTexture is read only."));
      },
      set$filtering: function(filtering) {
        var t1;
        if (this._filtering === filtering)
          return;
        this._filtering = filtering;
        t1 = this._engine$_renderContext;
        if (t1 == null || this._texture == null)
          return;
        if (t1._contextIdentifier !== this._contextIdentifier)
          return;
        t1.activateRenderTexture$1(this);
        this._renderingContext.texParameteri(3553, 10241, this._filtering.value);
        this._renderingContext.texParameteri(3553, 10240, this._filtering.value);
      },
      resize$2: function(_, width, height) {
        var t1;
        if (!(this._engine$_width === width && this._engine$_height === height))
          if (this._engine$_source == null) {
            this._engine$_width = width;
            this._engine$_height = height;
            t1 = this._engine$_renderContext;
            if (t1 == null || this._texture == null)
              return;
            if (t1._contextIdentifier !== this._contextIdentifier)
              return;
            t1.activateRenderTexture$1(this);
            t1 = this._renderingContext;
            (t1 && C.RenderingContext_methods).texImage2D$9(t1, 3553, 0, 6408, this._engine$_width, this._engine$_height, 0, 6408, 5121, null);
          } else {
            this._engine$_width = width;
            this._engine$_height = height;
            t1 = W.CanvasElement_CanvasElement(height, width);
            this._engine$_source = t1;
            this._canvas = t1;
          }
      },
      update$0: function() {
        var t1 = this._engine$_renderContext;
        if (t1 == null || this._texture == null)
          return;
        if (t1._contextIdentifier !== this._contextIdentifier)
          return;
        if (this._textureSourceWorkaround) {
          t1 = this._canvas;
          t1.toString;
          t1.getContext("2d").drawImage(this._engine$_source, 0, 0);
          this._engine$_renderContext.activateRenderTexture$1(this);
          this._renderingContext.texImage2DCanvas$6(3553, 0, 6408, 6408, 5121, this._canvas);
        } else {
          t1.activateRenderTexture$1(this);
          t1 = this._renderingContext;
          (t1 && C.RenderingContext_methods).texImage2D$6(t1, 3553, 0, 6408, 6408, 5121, this._engine$_source);
        }
      },
      RenderTexture$3: function(width, height, fillColor) {
        var t1, context;
        if (width <= 0)
          throw H.wrapException(P.ArgumentError$("width"));
        if (height <= 0)
          throw H.wrapException(P.ArgumentError$("height"));
        this._engine$_width = V.ensureInt(width);
        t1 = V.ensureInt(height);
        this._engine$_height = t1;
        t1 = W.CanvasElement_CanvasElement(t1, this._engine$_width);
        this._canvas = t1;
        this._engine$_source = t1;
        if (fillColor !== 0) {
          t1.toString;
          context = t1.getContext("2d");
          context.fillStyle = V.color2rgba(fillColor);
          context.fillRect(0, 0, this._engine$_width, this._engine$_height);
        }
      },
      static: {
        RenderTexture$: function(width, height, fillColor) {
          var t1 = new L.RenderTexture(0, 0, null, null, C.RenderTextureFiltering_9729, null, -1, false, null, null, -1);
          t1.RenderTexture$3(width, height, fillColor);
          return t1;
        }
      }
    },
    RenderTextureFiltering: {
      "^": "Object;value"
    },
    RenderTextureQuad: {
      "^": "Object;renderTexture,sourceRectangle,offsetRectangle,rotation,pixelRatio,ixListQuad,vxListQuad,_ixList,_vxList,_hasCustomVertices",
      get$drawMatrix: function() {
        var pr, t1, t2, t3;
        pr = this.pixelRatio;
        t1 = this.rotation;
        if (t1 === 0) {
          t1 = this.sourceRectangle;
          t2 = this.offsetRectangle;
          return T.Matrix$(pr, 0, 0, pr, t1.left + t2.left, t1.top + t2.top);
        } else if (t1 === 1) {
          t1 = this.sourceRectangle;
          t2 = this.offsetRectangle;
          return T.Matrix$(0, pr, 0 - pr, 0, t1.left + t1.width - t2.top, t1.top + t2.left);
        } else if (t1 === 2) {
          t1 = this.sourceRectangle;
          t2 = this.offsetRectangle;
          t3 = 0 - pr;
          return T.Matrix$(t3, 0, 0, t3, t1.left + t1.width - t2.left, t1.top + t1.height - t2.top);
        } else if (t1 === 3) {
          t1 = this.sourceRectangle;
          t2 = this.offsetRectangle;
          return T.Matrix$(0, 0 - pr, pr, 0, t1.left + t2.top, t1.top + t1.height - t2.left);
        } else
          throw H.wrapException(new P.Error());
      },
      cut$1: function(rectangle) {
        var t1, t2, rL, t3, rT;
        t1 = rectangle.left;
        t2 = this.pixelRatio;
        rL = C.JSNumber_methods.round$0(t1 * t2);
        t3 = rectangle.top;
        rT = C.JSNumber_methods.round$0(t3 * t2);
        t1 = C.JSNumber_methods.round$0((t1 + rectangle.width) * t2) - rL;
        t2 = C.JSNumber_methods.round$0((t3 + rectangle.height) * t2) - rT;
        t3 = [P.$int];
        return L.RenderTextureQuad_RenderTextureQuad$slice(this, new U.Rectangle0(rL, rT, t1, t2, t3), new U.Rectangle0(0, 0, t1, t2, t3), 0);
      },
      getImageData$0: function(_) {
        var rect, t1;
        rect = this.sourceRectangle;
        t1 = this.renderTexture;
        t1 = t1.get$canvas(t1);
        t1.toString;
        return P.convertNativeToDart_ImageData(t1.getContext("2d").getImageData(rect.left, rect.top, rect.width, rect.height));
      },
      RenderTextureQuad$5: function(renderTexture, sourceRectangle, offsetRectangle, rotation, pixelRatio) {
        var sr, or, rt, pr, t1, t2, t3, t4, t5, t6, t7, t8;
        sr = this.sourceRectangle;
        or = this.offsetRectangle;
        rt = this.renderTexture;
        pr = this.pixelRatio;
        t1 = this.rotation;
        t2 = t1 === 0;
        if (t2 || t1 === 2) {
          t3 = this.vxListQuad;
          t4 = 0 - or.left;
          t5 = t4 / pr;
          t3[12] = t5;
          t3[0] = t5;
          t5 = 0 - or.top;
          t6 = t5 / pr;
          t3[5] = t6;
          t3[1] = t6;
          t6 = sr.width;
          t4 = (t4 + t6) / pr;
          t3[4] = t4;
          t3[8] = t4;
          t4 = sr.height;
          t5 = (t5 + t4) / pr;
          t3[13] = t5;
          t3[9] = t5;
          t5 = t4;
          t4 = t6;
        } else {
          if (t1 === 1 || t1 === 3) {
            t3 = this.vxListQuad;
            t4 = 0 - or.left;
            t5 = t4 / pr;
            t3[12] = t5;
            t3[0] = t5;
            t5 = 0 - or.top;
            t6 = t5 / pr;
            t3[5] = t6;
            t3[1] = t6;
            t6 = sr.height;
            t4 = (t4 + t6) / pr;
            t3[4] = t4;
            t3[8] = t4;
            t4 = sr.width;
            t5 = (t5 + t4) / pr;
            t3[13] = t5;
            t3[9] = t5;
          } else
            throw H.wrapException(new P.Error());
          t5 = t6;
        }
        if (t2) {
          t1 = sr.left;
          t2 = rt._engine$_width;
          t6 = t1 / t2;
          t3[14] = t6;
          t3[2] = t6;
          t6 = sr.top;
          t7 = rt._engine$_height;
          t8 = t6 / t7;
          t3[7] = t8;
          t3[3] = t8;
          t2 = (t1 + t4) / t2;
          t3[6] = t2;
          t3[10] = t2;
          t7 = (t6 + t5) / t7;
          t3[15] = t7;
          t3[11] = t7;
        } else if (t1 === 1) {
          t1 = sr.left;
          t2 = rt._engine$_width;
          t4 = (t1 + t4) / t2;
          t3[6] = t4;
          t3[2] = t4;
          t4 = sr.top;
          t6 = rt._engine$_height;
          t7 = t4 / t6;
          t3[15] = t7;
          t3[3] = t7;
          t2 = t1 / t2;
          t3[14] = t2;
          t3[10] = t2;
          t6 = (t4 + t5) / t6;
          t3[7] = t6;
          t3[11] = t6;
        } else if (t1 === 2) {
          t1 = sr.left;
          t2 = rt._engine$_width;
          t4 = (t1 + t4) / t2;
          t3[14] = t4;
          t3[2] = t4;
          t4 = sr.top;
          t6 = rt._engine$_height;
          t5 = (t4 + t5) / t6;
          t3[7] = t5;
          t3[3] = t5;
          t2 = t1 / t2;
          t3[6] = t2;
          t3[10] = t2;
          t6 = t4 / t6;
          t3[15] = t6;
          t3[11] = t6;
        } else if (t1 === 3) {
          t1 = sr.left;
          t2 = rt._engine$_width;
          t6 = t1 / t2;
          t3[6] = t6;
          t3[2] = t6;
          t6 = sr.top;
          t7 = rt._engine$_height;
          t5 = (t6 + t5) / t7;
          t3[15] = t5;
          t3[3] = t5;
          t2 = (t1 + t4) / t2;
          t3[14] = t2;
          t3[10] = t2;
          t7 = t6 / t7;
          t3[7] = t7;
          t3[11] = t7;
        } else
          throw H.wrapException(new P.Error());
        t1 = this.ixListQuad;
        t1[0] = 0;
        t1[1] = 1;
        t1[2] = 2;
        t1[3] = 0;
        t1[4] = 2;
        t1[5] = 3;
        this._vxList = t3;
        this._ixList = t1;
        this._hasCustomVertices = false;
      },
      static: {
        RenderTextureQuad$: function(renderTexture, sourceRectangle, offsetRectangle, rotation, pixelRatio) {
          var t1 = new L.RenderTextureQuad(renderTexture, sourceRectangle, offsetRectangle, rotation, pixelRatio, new Int16Array(H._checkLength(6)), new Float32Array(H._checkLength(16)), null, null, false);
          t1.RenderTextureQuad$5(renderTexture, sourceRectangle, offsetRectangle, rotation, pixelRatio);
          return t1;
        },
        RenderTextureQuad_RenderTextureQuad$slice: function(renderTextureQuad, sourceRectangle, offsetRectangle, rotation) {
          var oldRotation, t1, oldSourceL, oldSourceT, oldSourceR, oldSourceB, oldOffsetL, oldOffsetT, newRotation, newSourceL, newSourceT, newSourceR, newSourceB, newOffsetL, newOffsetT, newOffsetW, newOffsetH, tmpSourceL, t2, tmpSourceT, tmpSourceR, tmpSourceB;
          oldRotation = renderTextureQuad.rotation;
          t1 = renderTextureQuad.sourceRectangle;
          oldSourceL = t1.left;
          oldSourceT = t1.top;
          oldSourceR = oldSourceL + t1.width;
          oldSourceB = oldSourceT + t1.height;
          t1 = renderTextureQuad.offsetRectangle;
          oldOffsetL = t1.left;
          oldOffsetT = t1.top;
          newRotation = C.JSInt_methods.$mod(oldRotation + rotation, 4);
          newSourceL = sourceRectangle.left;
          newSourceT = sourceRectangle.top;
          newSourceR = newSourceL + sourceRectangle.width;
          newSourceB = newSourceT + sourceRectangle.height;
          newOffsetL = offsetRectangle.left;
          newOffsetT = offsetRectangle.top;
          newOffsetW = offsetRectangle.width;
          newOffsetH = offsetRectangle.height;
          if (oldRotation === 0) {
            t1 = oldSourceL + oldOffsetL;
            tmpSourceL = t1 + newSourceL;
            t2 = oldSourceT + oldOffsetT;
            tmpSourceT = t2 + newSourceT;
            tmpSourceR = t1 + newSourceR;
            tmpSourceB = t2 + newSourceB;
          } else if (oldRotation === 1) {
            t1 = oldSourceR - oldOffsetT;
            tmpSourceL = t1 - newSourceB;
            t2 = oldSourceT + oldOffsetL;
            tmpSourceT = t2 + newSourceL;
            tmpSourceR = t1 - newSourceT;
            tmpSourceB = t2 + newSourceR;
          } else if (oldRotation === 2) {
            t1 = oldSourceR - oldOffsetL;
            tmpSourceL = t1 - newSourceR;
            t2 = oldSourceB - oldOffsetT;
            tmpSourceT = t2 - newSourceB;
            tmpSourceR = t1 - newSourceL;
            tmpSourceB = t2 - newSourceT;
          } else if (oldRotation === 3) {
            t1 = oldSourceL + oldOffsetT;
            tmpSourceL = t1 + newSourceT;
            t2 = oldSourceB - oldOffsetL;
            tmpSourceT = t2 - newSourceR;
            tmpSourceR = t1 + newSourceB;
            tmpSourceB = t2 - newSourceL;
          } else {
            tmpSourceL = 0;
            tmpSourceT = 0;
            tmpSourceR = 0;
            tmpSourceB = 0;
          }
          newSourceL = V.clampInt(tmpSourceL, oldSourceL, oldSourceR);
          newSourceT = V.clampInt(tmpSourceT, oldSourceT, oldSourceB);
          newSourceR = V.clampInt(tmpSourceR, oldSourceL, oldSourceR);
          newSourceB = V.clampInt(tmpSourceB, oldSourceT, oldSourceB);
          if (newRotation === 0) {
            newOffsetL += tmpSourceL - newSourceL;
            newOffsetT += tmpSourceT - newSourceT;
          } else if (newRotation === 1) {
            newOffsetL += tmpSourceT - newSourceT;
            newOffsetT += newSourceR - tmpSourceR;
          } else if (newRotation === 2) {
            newOffsetL += newSourceR - tmpSourceR;
            newOffsetT += tmpSourceB - newSourceB;
          } else if (newRotation === 3) {
            newOffsetL += newSourceB - tmpSourceB;
            newOffsetT += newSourceL - tmpSourceL;
          }
          t1 = [P.$int];
          return L.RenderTextureQuad$(renderTextureQuad.renderTexture, new U.Rectangle0(newSourceL, newSourceT, newSourceR - newSourceL, newSourceB - newSourceT, t1), new U.Rectangle0(newOffsetL, newOffsetT, newOffsetW, newOffsetH, t1), newRotation, renderTextureQuad.pixelRatio);
        }
      }
    }
  }], ["stagexl.events", "package:stagexl/src/events.dart",, R, {
    "^": "",
    _dispatchBroadcastEvent: function(broadcastEvent, subscriptions) {
      var $length, i, subscription, t1;
      $length = subscriptions.length;
      for (i = 0; i < $length; ++i) {
        subscription = subscriptions[i];
        if (!subscription._canceled) {
          broadcastEvent._isPropagationStopped = false;
          broadcastEvent._isImmediatePropagationStopped = false;
          t1 = subscription._eventStream.target;
          broadcastEvent._events$_target = t1;
          broadcastEvent._currentTarget = t1;
          broadcastEvent._eventPhase = C.EventPhase_1;
          subscription.eventListener$1(broadcastEvent);
        } else {
          C.JSArray_methods.removeAt$1(subscriptions, i);
          --$length;
          --i;
        }
      }
    },
    BroadcastEvent: {
      "^": "Event0;",
      get$captures: function() {
        return false;
      }
    },
    EnterFrameEvent: {
      "^": "BroadcastEvent;passedTime,_type,_bubbles,_eventPhase,_events$_target,_currentTarget,_isPropagationStopped,_isImmediatePropagationStopped"
    },
    ExitFrameEvent: {
      "^": "BroadcastEvent;_type,_bubbles,_eventPhase,_events$_target,_currentTarget,_isPropagationStopped,_isImmediatePropagationStopped"
    },
    RenderEvent: {
      "^": "BroadcastEvent;_type,_bubbles,_eventPhase,_events$_target,_currentTarget,_isPropagationStopped,_isImmediatePropagationStopped"
    },
    Event0: {
      "^": "Object;_type,_bubbles,_eventPhase,_events$_target,_currentTarget,_isPropagationStopped,_isImmediatePropagationStopped",
      stopPropagation$0: function(_) {
        this._isPropagationStopped = true;
      },
      get$captures: function() {
        return true;
      },
      get$target: function(_) {
        return this._events$_target;
      },
      get$currentTarget: function(_) {
        return this._currentTarget;
      }
    },
    EventDispatcher: {
      "^": "Object;",
      on$1: function(_, eventType) {
        var eventStreams, eventStream;
        eventStreams = this._eventStreams;
        if (eventStreams == null) {
          eventStreams = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [P.String, [R.EventStream, R.Event0]]);
          this._eventStreams = eventStreams;
        }
        eventStream = eventStreams.$index(0, eventType);
        if (eventStream == null) {
          eventStream = new R.EventStream(this, eventType, new Array(0), 0, [null]);
          eventStreams.$indexSet(0, eventType, eventStream);
        }
        return eventStream;
      },
      hasEventListener$2$useCapture: function(eventType, useCapture) {
        var eventStreams, eventStream;
        eventStreams = this._eventStreams;
        if (eventStreams == null)
          return false;
        eventStream = eventStreams.$index(0, eventType);
        if (eventStream == null)
          return false;
        return useCapture ? eventStream.get$hasCapturingSubscriptions() : eventStream.get$hasBubblingSubscriptions();
      },
      hasEventListener$1: function(eventType) {
        return this.hasEventListener$2$useCapture(eventType, false);
      },
      dispatchEventRaw$3: function($event, target, eventPhase) {
        var eventStreams, eventStream;
        $event._isPropagationStopped = false;
        $event._isImmediatePropagationStopped = false;
        eventStreams = this._eventStreams;
        if (eventStreams == null)
          return;
        eventStream = eventStreams.$index(0, $event._type);
        if (eventStream == null)
          return;
        eventStream._dispatchEventInternal$3($event, target, eventPhase);
      }
    },
    EventPhase: {
      "^": "Object;index",
      toString$0: function(_) {
        return C.Map_sgo3E.$index(0, this.index);
      }
    },
    EventStream: {
      "^": "Stream;target>,eventType,_subscriptions,_capturingSubscriptionCount,$ti",
      get$hasCapturingSubscriptions: function() {
        return this._capturingSubscriptionCount > 0;
      },
      get$hasBubblingSubscriptions: function() {
        return this._subscriptions.length > this._capturingSubscriptionCount;
      },
      listen$5$cancelOnError$onDone$onError$priority: function(onData, cancelOnError, onDone, onError, priority) {
        return this._subscribe$3(onData, false, priority);
      },
      listen$4$cancelOnError$onDone$onError: function(onData, cancelOnError, onDone, onError) {
        return this.listen$5$cancelOnError$onDone$onError$priority(onData, cancelOnError, onDone, onError, 0);
      },
      _subscribe$3: function(eventListener, captures, priority) {
        var subscription, oldSubscriptions, t1, newSubscriptions, index, o, n, oldSubscription, n0;
        subscription = new R.EventStreamSubscription(priority, 0, false, captures, this, eventListener, this.$ti);
        oldSubscriptions = this._subscriptions;
        t1 = oldSubscriptions.length;
        newSubscriptions = H.setRuntimeTypeInfo(new Array(t1 + 1), [R.EventStreamSubscription]);
        index = newSubscriptions.length - 1;
        for (o = 0, n = 0; o < t1; ++o, n = n0) {
          oldSubscription = oldSubscriptions[o];
          if (o === n && oldSubscription._priority < priority) {
            n0 = n + 1;
            index = n;
            n = n0;
          }
          n0 = n + 1;
          newSubscriptions[n] = oldSubscription;
        }
        newSubscriptions[index] = subscription;
        this._subscriptions = newSubscriptions;
        if (captures)
          ++this._capturingSubscriptionCount;
        else
          switch (this.eventType) {
            case "enterFrame":
              $.$get$_enterFrameSubscriptions().push(subscription);
              break;
            case "exitFrame":
              $.$get$_exitFrameSubscriptions().push(subscription);
              break;
            case "render":
              $.$get$_renderSubscriptions().push(subscription);
              break;
          }
        return subscription;
      },
      _cancelSubscription$1: function(eventStreamSubscription) {
        var oldSubscriptions, t1, newSubscriptions, t2, o, n, oldSubscription, n0;
        eventStreamSubscription._canceled = true;
        oldSubscriptions = this._subscriptions;
        t1 = oldSubscriptions.length;
        if (t1 === 0)
          return;
        newSubscriptions = H.setRuntimeTypeInfo(new Array(t1 - 1), [R.EventStreamSubscription]);
        for (t2 = newSubscriptions.length, o = 0, n = 0; o < t1; ++o) {
          oldSubscription = oldSubscriptions[o];
          if (oldSubscription == null ? eventStreamSubscription == null : oldSubscription === eventStreamSubscription)
            continue;
          if (n >= t2)
            return;
          n0 = n + 1;
          newSubscriptions[n] = oldSubscription;
          n = n0;
        }
        if (eventStreamSubscription._captures)
          --this._capturingSubscriptionCount;
        this._subscriptions = newSubscriptions;
      },
      _dispatchEventInternal$3: function($event, target, eventPhase) {
        var subscriptions, isCapturing, inputEvent, t1, t2, i, subscription;
        subscriptions = this._subscriptions;
        isCapturing = eventPhase === C.EventPhase_0;
        inputEvent = !!$event.$isInputEvent ? $event : null;
        for (t1 = subscriptions.length, t2 = this.target, i = 0; i < t1; ++i) {
          subscription = subscriptions[i];
          if (subscription._canceled || subscription._pauseCount > 0 || subscription._captures !== isCapturing)
            continue;
          $event._events$_target = target;
          $event._currentTarget = t2;
          $event._eventPhase = eventPhase;
          $.InputEvent_current = inputEvent;
          subscription.eventListener$1($event);
          $.InputEvent_current = null;
          if ($event._isImmediatePropagationStopped)
            return;
        }
      }
    },
    EventStreamSubscription: {
      "^": "StreamSubscription;_priority,_pauseCount,_canceled,_captures,_eventStream,_eventListener,$ti",
      get$eventListener: function() {
        return this._eventListener;
      },
      cancel$0: function() {
        if (!this._canceled)
          this._eventStream._cancelSubscription$1(this);
        return;
      },
      eventListener$1: function(arg0) {
        return this.get$eventListener().call$1(arg0);
      }
    },
    InputEventMode: {
      "^": "Object;index",
      toString$0: function(_) {
        return C.Map_sgyRZ.$index(0, this.index);
      }
    },
    InputEvent: {
      "^": "Event0;",
      preventDefault$0: function(_) {
        this._isDefaultPrevented = true;
      }
    },
    KeyboardEvent0: {
      "^": "Event0;"
    },
    MouseEvent0: {
      "^": "InputEvent;deltaX,deltaY,buttonDown,clickCount,localX,localY,stageX,stageY,altKey,ctrlKey,shiftKey,_isDefaultPrevented,_type,_bubbles,_eventPhase,_events$_target,_currentTarget,_isPropagationStopped,_isImmediatePropagationStopped"
    },
    TextEvent0: {
      "^": "Event0;"
    },
    TouchEvent0: {
      "^": "InputEvent;touchPointID<,isPrimaryTouchPoint,localX,localY,stageX,stageY,altKey,ctrlKey,shiftKey,_isDefaultPrevented,_type,_bubbles,_eventPhase,_events$_target,_currentTarget,_isPropagationStopped,_isImmediatePropagationStopped"
    }
  }], ["stagexl.filters.color_matrix", "package:stagexl/src/filters/color_matrix_filter.dart",, D, {
    "^": "",
    ColorMatrixFilter: {
      "^": "BitmapFilter;_colorMatrixList,_colorOffsetList",
      apply$2: function(bitmapData, rectangle) {
        var isLittleEndianSystem, t1, d0c0, d0c1, d0c2, d0c3, d1c0, d1c1, d1c2, d1c3, d2c0, d2c1, d2c2, d2c3, d3c0, d3c1, d3c2, d3c3, d0cc, d1cc, d2cc, d3cc, renderTextureQuad, imageData, data, index, c0, t2, c1, t3, c2, t4, c3, rect, context;
        isLittleEndianSystem = $.$get$isLittleEndianSystem();
        t1 = this._colorMatrixList;
        d0c0 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 0 : 15] * 65536);
        d0c1 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 1 : 14] * 65536);
        d0c2 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 2 : 13] * 65536);
        d0c3 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 3 : 12] * 65536);
        d1c0 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 4 : 11] * 65536);
        d1c1 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 5 : 10] * 65536);
        d1c2 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 6 : 9] * 65536);
        d1c3 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 7 : 8] * 65536);
        d2c0 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 8 : 7] * 65536);
        d2c1 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 9 : 6] * 65536);
        d2c2 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 10 : 5] * 65536);
        d2c3 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 11 : 4] * 65536);
        d3c0 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 12 : 3] * 65536);
        d3c1 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 13 : 2] * 65536);
        d3c2 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 14 : 1] * 65536);
        d3c3 = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 15 : 0] * 65536);
        t1 = this._colorOffsetList;
        d0cc = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 0 : 3] * 65536);
        d1cc = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 1 : 2] * 65536);
        d2cc = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 2 : 1] * 65536);
        d3cc = C.JSNumber_methods.round$0(t1[isLittleEndianSystem ? 3 : 0] * 65536);
        renderTextureQuad = bitmapData.renderTextureQuad;
        imageData = renderTextureQuad.getImageData$0(0);
        data = J.get$data$x(imageData);
        for (t1 = data.length - 4, index = 0; index <= t1; index += 4) {
          c0 = data[index];
          t2 = index + 1;
          c1 = data[t2];
          t3 = index + 2;
          c2 = data[t3];
          t4 = index + 3;
          c3 = data[t4];
          data[index] = (d0c0 * c0 + d0c1 * c1 + d0c2 * c2 + d0c3 * c3 + d0cc | 0) >>> 16;
          data[t2] = (d1c0 * c0 + d1c1 * c1 + d1c2 * c2 + d1c3 * c3 + d1cc | 0) >>> 16;
          data[t3] = (d2c0 * c0 + d2c1 * c1 + d2c2 * c2 + d2c3 * c3 + d2cc | 0) >>> 16;
          data[t4] = (d3c0 * c0 + d3c1 * c1 + d3c2 * c2 + d3c3 * c3 + d3cc | 0) >>> 16;
        }
        rect = renderTextureQuad.sourceRectangle;
        t1 = renderTextureQuad.renderTexture;
        t1 = t1.get$canvas(t1);
        t1.toString;
        context = t1.getContext("2d");
        (context && C.CanvasRenderingContext2D_methods).putImageData$3(context, imageData, rect.left, rect.top);
      },
      apply$1: function(bitmapData) {
        return this.apply$2(bitmapData, null);
      },
      renderFilter$3: function(renderState, renderTextureQuad, pass) {
        var renderContext, renderTexture, t1;
        renderContext = renderState._engine$_renderContext;
        renderTexture = renderTextureQuad.renderTexture;
        t1 = renderContext._renderPrograms.putIfAbsent$2("$ColorMatrixFilterProgram", new D.ColorMatrixFilter_renderFilter_closure());
        renderContext.activateRenderProgram$1(t1);
        renderContext.activateRenderTexture$1(renderTexture);
        t1.renderColorMatrixFilterQuad$3(renderState, renderTextureQuad, this);
      },
      ColorMatrixFilter$2: function(colorMatrix, colorOffset) {
        var t1, i;
        if (colorMatrix.length !== 16)
          throw H.wrapException(P.ArgumentError$("colorMatrix"));
        for (t1 = this._colorMatrixList, i = 0; i < colorMatrix.length; ++i)
          t1[i] = J.toDouble$0$n(colorMatrix[i]);
        for (t1 = this._colorOffsetList, i = 0; i < 4; ++i)
          t1[i] = J.toDouble$0$n(colorOffset[i]);
      },
      static: {
        ColorMatrixFilter$: function(colorMatrix, colorOffset) {
          var t1 = new D.ColorMatrixFilter(new Float32Array(H._checkLength(16)), new Float32Array(H._checkLength(4)));
          t1.ColorMatrixFilter$2(colorMatrix, colorOffset);
          return t1;
        }
      }
    },
    ColorMatrixFilter_renderFilter_closure: {
      "^": "Closure:1;",
      call$0: function() {
        var t1, t2;
        t1 = P.String;
        t2 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t1, P.$int]);
        t1 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [t1, P.UniformLocation]);
        return new D.ColorMatrixFilterProgram(-1, null, null, t2, t1, new L.RenderBufferIndex(new Int16Array(H._checkLength(0)), 35048, 0, 0, -1, null, null), new L.RenderBufferVertex(new Float32Array(H._checkLength(0)), 35048, 0, 0, -1, null, null));
      }
    },
    ColorMatrixFilterProgram: {
      "^": "RenderProgram;_contextIdentifier,_renderingContext,_program,_attributes,_uniforms,_renderBufferIndex,_renderBufferVertex",
      get$vertexShaderSource: function() {
        return "\r\n    uniform mat4 uProjectionMatrix;\r\n\r\n    attribute vec2 aPosition;\r\n    attribute vec2 aTexCoord;\r\n    attribute vec4 aMatrixR, aMatrixG, aMatrixB, aMatrixA; \r\n    attribute vec4 aOffset;\r\n\r\n    varying vec2 vTexCoord;\r\n    varying vec4 vMatrixR, vMatrixG, vMatrixB, vMatrixA;\r\n    varying vec4 vOffset;\r\n\r\n    void main() {\r\n      vTexCoord = aTexCoord; \r\n      vMatrixR = aMatrixR; \r\n      vMatrixG = aMatrixG;\r\n      vMatrixB = aMatrixB; \r\n      vMatrixA = aMatrixA; \r\n      vOffset = aOffset;\r\n      gl_Position = vec4(aPosition, 0.0, 1.0) * uProjectionMatrix;\r\n    }\r\n    ";
      },
      get$fragmentShaderSource: function() {
        return "\r\n    precision mediump float;\r\n    uniform sampler2D uSampler;\r\n\r\n    varying vec2 vTexCoord;\r\n    varying vec4 vMatrixR, vMatrixG, vMatrixB, vMatrixA;\r\n    varying vec4 vOffset;\r\n\r\n    void main() {\r\n      vec4 color = texture2D(uSampler, vTexCoord);\r\n      mat4 colorMatrix = mat4(vMatrixR, vMatrixG, vMatrixB, vMatrixA);\r\n      color = vec4(color.rgb / color.a, color.a);\r\n      color = vOffset + color * colorMatrix;\r\n      gl_FragColor = vec4(color.rgb * color.a, color.a);\r\n    }\r\n    ";
      },
      activate$1: function(renderContext) {
        var t1;
        this.super$RenderProgram$activate(renderContext);
        this._renderingContext.uniform1i(this._uniforms.$index(0, "uSampler"), 0);
        t1 = this._attributes;
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aPosition"), 2, 96, 0);
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aTexCoord"), 2, 96, 8);
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aMatrixR"), 4, 96, 16);
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aMatrixG"), 4, 96, 32);
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aMatrixB"), 4, 96, 48);
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aMatrixA"), 4, 96, 64);
        this._renderBufferVertex.bindAttribute$4(t1.$index(0, "aOffset"), 4, 96, 80);
      },
      renderColorMatrixFilterQuad$3: function(renderState, renderTextureQuad, colorMatrixFilter) {
        var t1, alpha, matrix, ixList, vxList, colorMatrixList, colorOffsetList, ma, mb, mc, md, mx, my, ixData, ixPosition, t2, vxData, vxPosition, t3, ixIndex, vxCount, ixIndex0, i, vxIndex, vxIndex0, o, x, y, u, v;
        t1 = renderState._currentContextState;
        alpha = t1.alpha;
        matrix = t1.matrix;
        ixList = renderTextureQuad._ixList;
        vxList = renderTextureQuad._vxList;
        ixList.length;
        vxList.length;
        colorMatrixList = colorMatrixFilter._colorMatrixList;
        colorOffsetList = colorMatrixFilter._colorOffsetList;
        t1 = matrix._data;
        ma = t1[0];
        mb = t1[1];
        mc = t1[2];
        md = t1[3];
        mx = t1[4];
        my = t1[5];
        t1 = this._renderBufferIndex;
        ixData = t1.data;
        ixPosition = t1.position;
        t1 = ixData.length;
        if (t1 < ixPosition + 6)
          this.flush$0(0);
        t2 = this._renderBufferVertex;
        vxData = t2.data;
        vxPosition = t2.position;
        t2 = vxData.length;
        if (t2 < vxPosition + 96)
          this.flush$0(0);
        t3 = this._renderBufferIndex;
        ixIndex = t3.position;
        vxCount = this._renderBufferVertex.count;
        for (--t1, ixIndex0 = ixIndex, i = 0; i < 6; ++i) {
          if (ixIndex0 > t1)
            break;
          ixData[ixIndex0] = vxCount + ixList[i];
          ++ixIndex0;
        }
        t3.position = ixIndex + 6;
        this._renderBufferIndex.count += 6;
        t1 = this._renderBufferVertex;
        vxIndex = t1.position;
        for (t2 -= 24, vxIndex0 = vxIndex, i = 0, o = 0; i < 4; ++i, o += 4) {
          if (o > 12)
            break;
          x = vxList[o];
          y = vxList[o + 1];
          u = vxList[o + 2];
          v = vxList[o + 3];
          if (vxIndex0 > t2)
            break;
          vxData[vxIndex0] = mx + ma * x + mc * y;
          vxData[vxIndex0 + 1] = my + mb * x + md * y;
          vxData[vxIndex0 + 2] = u;
          vxData[vxIndex0 + 3] = v;
          vxData[vxIndex0 + 4] = colorMatrixList[0];
          vxData[vxIndex0 + 5] = colorMatrixList[1];
          vxData[vxIndex0 + 6] = colorMatrixList[2];
          vxData[vxIndex0 + 7] = colorMatrixList[3];
          vxData[vxIndex0 + 8] = colorMatrixList[4];
          vxData[vxIndex0 + 9] = colorMatrixList[5];
          vxData[vxIndex0 + 10] = colorMatrixList[6];
          vxData[vxIndex0 + 11] = colorMatrixList[7];
          vxData[vxIndex0 + 12] = colorMatrixList[8];
          vxData[vxIndex0 + 13] = colorMatrixList[9];
          vxData[vxIndex0 + 14] = colorMatrixList[10];
          vxData[vxIndex0 + 15] = colorMatrixList[11];
          vxData[vxIndex0 + 16] = colorMatrixList[12] * alpha;
          vxData[vxIndex0 + 17] = colorMatrixList[13] * alpha;
          vxData[vxIndex0 + 18] = colorMatrixList[14] * alpha;
          vxData[vxIndex0 + 19] = colorMatrixList[15] * alpha;
          vxData[vxIndex0 + 20] = colorOffsetList[0] / 255;
          vxData[vxIndex0 + 21] = colorOffsetList[1] / 255;
          vxData[vxIndex0 + 22] = colorOffsetList[2] / 255;
          vxData[vxIndex0 + 23] = colorOffsetList[3] / 255 * alpha;
          vxIndex0 += 24;
        }
        t1.position = vxIndex + 96;
        this._renderBufferVertex.count += 4;
      }
    }
  }], ["stagexl.filters.flatten", "package:stagexl/src/filters/flatten_filter.dart",, K, {
    "^": "",
    FlattenFilter: {
      "^": "BitmapFilter;"
    }
  }], ["stagexl.geom.matrix", "package:stagexl/src/geom/matrix.dart",, T, {
    "^": "",
    Matrix: {
      "^": "Object;_data",
      toString$0: function(_) {
        var t1 = this._data;
        return "Matrix [a=" + H.S(t1[0]) + ", b=" + H.S(t1[1]) + ", c=" + H.S(t1[2]) + ", d=" + H.S(t1[3]) + ", tx=" + H.S(t1[4]) + ", ty=" + H.S(t1[5]) + "]";
      },
      get$a: function(_) {
        return this._data[0];
      },
      get$b: function() {
        return this._data[1];
      },
      get$c: function() {
        return this._data[2];
      },
      get$d: function() {
        return this._data[3];
      },
      get$tx: function() {
        return this._data[4];
      },
      get$ty: function() {
        return this._data[5];
      },
      transformPoint$2: function(point, returnPoint) {
        var px, py, t1, tx, ty;
        px = J.toDouble$0$n(point.get$x(point));
        py = J.toDouble$0$n(point.get$y(point));
        t1 = this._data;
        tx = px * t1[0] + py * t1[2] + t1[4];
        ty = px * t1[1] + py * t1[3] + t1[5];
        if (returnPoint instanceof U.Point0) {
          returnPoint.x = tx;
          returnPoint.y = ty;
          return returnPoint;
        } else
          return new U.Point0(tx, ty, [P.num]);
      },
      transformPoint$1: function(point) {
        return this.transformPoint$2(point, null);
      },
      transformRectangle$2: function(rectangle, returnRectangle) {
        var rl, rr, rt, rb, t1, t2, t3, t4, t5, x1, t6, t7, t8, t9, y1, x2, y2, x3, y3, x4, y4, left, $top, right, bottom, width, heigth;
        rl = rectangle.left;
        rl.toString;
        rr = rl + rectangle.width;
        rt = rectangle.top;
        rt.toString;
        rb = rt + rectangle.height;
        t1 = this._data;
        t2 = t1[0];
        t3 = rl * t2;
        t4 = t1[2];
        t5 = rt * t4;
        x1 = t3 + t5;
        t6 = t1[1];
        t7 = rl * t6;
        t8 = t1[3];
        t9 = rt * t8;
        y1 = t7 + t9;
        t2 = rr * t2;
        x2 = t2 + t5;
        t6 = rr * t6;
        y2 = t6 + t9;
        t4 = rb * t4;
        x3 = t2 + t4;
        t8 = rb * t8;
        y3 = t6 + t8;
        x4 = t3 + t4;
        y4 = t7 + t8;
        left = x1 > x2 ? x2 : x1;
        if (left > x3)
          left = x3;
        if (left > x4)
          left = x4;
        $top = y1 > y2 ? y2 : y1;
        if ($top > y3)
          $top = y3;
        if ($top > y4)
          $top = y4;
        right = x1 < x2 ? x2 : x1;
        if (right < x3)
          right = x3;
        if (right < x4)
          right = x4;
        bottom = y1 < y2 ? y2 : y1;
        if (bottom < y3)
          bottom = y3;
        if (bottom < y4)
          bottom = y4;
        width = right - left;
        heigth = bottom - $top;
        if (returnRectangle instanceof U.Rectangle0) {
          t2 = t1[4];
          t1 = t1[5];
          returnRectangle.left = t2 + left;
          returnRectangle.top = t1 + $top;
          returnRectangle.width = width;
          returnRectangle.height = heigth;
          return returnRectangle;
        } else
          return new U.Rectangle0(t1[4] + left, t1[5] + $top, width, heigth, [P.num]);
      },
      rotate$1: function(_, rotation) {
        var t1, t2, t3, a, b, c, d, tx, ty;
        t1 = Math.cos(rotation);
        t2 = Math.sin(rotation);
        t3 = this._data;
        a = t3[0];
        b = t3[1];
        c = t3[2];
        d = t3[3];
        tx = t3[4];
        ty = t3[5];
        t3[0] = a * t1 - b * t2;
        t3[1] = a * t2 + b * t1;
        t3[2] = c * t1 - d * t2;
        t3[3] = c * t2 + d * t1;
        t3[4] = tx * t1 - ty * t2;
        t3[5] = tx * t2 + ty * t1;
      },
      scale$2: function(_, scaleX, scaleY) {
        var t1 = this._data;
        t1[0] = t1[0] * scaleX;
        t1[1] = t1[1] * scaleY;
        t1[2] = t1[2] * scaleX;
        t1[3] = t1[3] * scaleY;
        t1[4] = t1[4] * scaleX;
        t1[5] = t1[5] * scaleY;
      },
      translate$2: function(_, translationX, translationY) {
        var t1 = this._data;
        t1[4] = t1[4] + translationX;
        t1[5] = t1[5] + translationY;
      },
      prependTranslation$2: function(translationX, translationY) {
        var t1 = this._data;
        t1[4] = translationX * t1[0] + translationY * t1[2] + t1[4];
        t1[5] = translationX * t1[1] + translationY * t1[3] + t1[5];
      },
      setTo$6: function(a, b, c, d, tx, ty) {
        var t1 = this._data;
        t1[0] = a;
        t1[1] = b;
        t1[2] = c;
        t1[3] = d;
        t1[4] = tx;
        t1[5] = ty;
      },
      copyFrom$1: function(matrix) {
        var t1, t2;
        t1 = this._data;
        t2 = matrix._data;
        t1[0] = t2[0];
        t1[1] = t2[1];
        t1[2] = t2[2];
        t1[3] = t2[3];
        t1[4] = t2[4];
        t1[5] = t2[5];
      },
      copyFromAndConcat$2: function(copyMatrix, concatMatrix) {
        var t1, a1, b1, c1, d1, tx1, ty1, a2, b2, c2, d2, tx2, ty2;
        t1 = copyMatrix._data;
        a1 = t1[0];
        b1 = t1[1];
        c1 = t1[2];
        d1 = t1[3];
        tx1 = t1[4];
        ty1 = t1[5];
        t1 = concatMatrix._data;
        a2 = t1[0];
        b2 = t1[1];
        c2 = t1[2];
        d2 = t1[3];
        tx2 = t1[4];
        ty2 = t1[5];
        t1 = this._data;
        t1[0] = a1 * a2 + b1 * c2;
        t1[1] = a1 * b2 + b1 * d2;
        t1[2] = c1 * a2 + d1 * c2;
        t1[3] = c1 * b2 + d1 * d2;
        t1[4] = tx1 * a2 + ty1 * c2 + tx2;
        t1[5] = tx1 * b2 + ty1 * d2 + ty2;
      },
      Matrix$fromIdentity$0: function() {
        var t1 = this._data;
        t1[0] = 1;
        t1[1] = 0;
        t1[2] = 0;
        t1[3] = 1;
        t1[4] = 0;
        t1[5] = 0;
      },
      Matrix$6: function(a, b, c, d, tx, ty) {
        var t1 = this._data;
        a.toString;
        t1[0] = a;
        b.toString;
        t1[1] = b;
        c.toString;
        t1[2] = c;
        d.toString;
        t1[3] = d;
        tx.toString;
        t1[4] = tx;
        ty.toString;
        t1[5] = ty;
      },
      static: {
        Matrix$: function(a, b, c, d, tx, ty) {
          var t1 = new T.Matrix(new Float32Array(H._checkLength(6)));
          t1.Matrix$6(a, b, c, d, tx, ty);
          return t1;
        },
        Matrix$fromIdentity: function() {
          var t1 = new T.Matrix(new Float32Array(H._checkLength(6)));
          t1.Matrix$fromIdentity$0();
          return t1;
        }
      }
    }
  }], ["stagexl.geom.matrix_3d", "package:stagexl/src/geom/matrix_3d.dart",, T, {
    "^": "",
    Matrix3D: {
      "^": "Object;_matrix_3d$_data",
      get$data: function(_) {
        return this._matrix_3d$_data;
      },
      transformRectangle$2: function(rectangle, returnRectangle) {
        var rl, rr, rt, rb, t1, t2, t3, t4, t5, t6, d1, t7, t8, t9, t10, t11, x1, t12, t13, t14, t15, y1, d2, x2, y2, d3, x3, y3, d4, x4, y4, left, $top, right, bottom, width, heigth;
        rl = rectangle.left;
        rl.toString;
        rr = rl + rectangle.width;
        rt = rectangle.top;
        rt.toString;
        rb = rt + rectangle.height;
        t1 = this._matrix_3d$_data;
        t2 = t1[12];
        t3 = t2 * rl;
        t4 = t1[13];
        t5 = t4 * rt;
        t6 = t1[15];
        d1 = t3 + t5 + t6;
        t7 = t1[0];
        t8 = t7 * rl;
        t9 = t1[1];
        t10 = t9 * rt;
        t11 = t1[3];
        x1 = (t8 + t10 + t11) / d1;
        t12 = t1[4];
        t13 = t12 * rl;
        t14 = t1[5];
        t15 = t14 * rt;
        t1 = t1[7];
        y1 = (t13 + t15 + t1) / d1;
        t2 *= rr;
        d2 = t2 + t5 + t6;
        t7 *= rr;
        x2 = (t7 + t10 + t11) / d2;
        t12 *= rr;
        y2 = (t12 + t15 + t1) / d2;
        t4 *= rb;
        d3 = t2 + t4 + t6;
        t9 *= rb;
        x3 = (t7 + t9 + t11) / d3;
        t14 *= rb;
        y3 = (t12 + t14 + t1) / d3;
        d4 = t3 + t4 + t6;
        x4 = (t8 + t9 + t11) / d4;
        y4 = (t13 + t14 + t1) / d4;
        left = x1 > x2 ? x2 : x1;
        if (left > x3)
          left = x3;
        if (left > x4)
          left = x4;
        $top = y1 > y2 ? y2 : y1;
        if ($top > y3)
          $top = y3;
        if ($top > y4)
          $top = y4;
        right = x1 < x2 ? x2 : x1;
        if (right < x3)
          right = x3;
        if (right < x4)
          right = x4;
        bottom = y1 < y2 ? y2 : y1;
        if (bottom < y3)
          bottom = y3;
        if (bottom < y4)
          bottom = y4;
        width = right - left;
        heigth = bottom - $top;
        if (returnRectangle instanceof U.Rectangle0) {
          returnRectangle.left = left;
          returnRectangle.top = $top;
          returnRectangle.width = width;
          returnRectangle.height = heigth;
          return returnRectangle;
        } else
          return new U.Rectangle0(left, $top, width, heigth, [P.num]);
      },
      setIdentity$0: function() {
        var t1 = this._matrix_3d$_data;
        t1[0] = 1;
        t1[1] = 0;
        t1[2] = 0;
        t1[3] = 0;
        t1[4] = 0;
        t1[5] = 1;
        t1[6] = 0;
        t1[7] = 0;
        t1[8] = 0;
        t1[9] = 0;
        t1[10] = 1;
        t1[11] = 0;
        t1[12] = 0;
        t1[13] = 0;
        t1[14] = 0;
        t1[15] = 1;
      },
      scale$3: function(_, scaleX, scaleY, scaleZ) {
        var t1 = this._matrix_3d$_data;
        t1[0] = t1[0] * scaleX;
        t1[1] = t1[1] * scaleX;
        t1[2] = t1[2] * scaleX;
        t1[3] = t1[3] * scaleX;
        t1[4] = t1[4] * scaleY;
        t1[5] = t1[5] * scaleY;
        t1[6] = t1[6] * scaleY;
        t1[7] = t1[7] * scaleY;
        t1[8] = t1[8] * scaleZ;
        t1[9] = t1[9] * scaleZ;
        t1[10] = t1[10] * scaleZ;
        t1[11] = t1[11] * scaleZ;
      },
      translate$3: function(_, translationX, translationY, translationZ) {
        var t1 = this._matrix_3d$_data;
        t1[3] = t1[3] + translationX;
        t1[7] = t1[7] + translationY;
        t1[11] = t1[11] + translationZ;
      },
      copyFrom$1: function(matrix) {
        var t1, t2;
        t1 = this._matrix_3d$_data;
        t2 = matrix._matrix_3d$_data;
        t1[0] = t2[0];
        t1[1] = t2[1];
        t1[2] = t2[2];
        t1[3] = t2[3];
        t1[4] = t2[4];
        t1[5] = t2[5];
        t1[6] = t2[6];
        t1[7] = t2[7];
        t1[8] = t2[8];
        t1[9] = t2[9];
        t1[10] = t2[10];
        t1[11] = t2[11];
        t1[12] = t2[12];
        t1[13] = t2[13];
        t1[14] = t2[14];
        t1[15] = t2[15];
      },
      concat2D$1: function(matrix) {
        var t1, m00, m10, m20, m30, m01, m11, m21, m31, m03, m13, m23, m33, t2, n00, n10, n30, n01, n11, n31;
        t1 = this._matrix_3d$_data;
        m00 = t1[0];
        m10 = t1[1];
        m20 = t1[2];
        m30 = t1[3];
        m01 = t1[4];
        m11 = t1[5];
        m21 = t1[6];
        m31 = t1[7];
        m03 = t1[12];
        m13 = t1[13];
        m23 = t1[14];
        m33 = t1[15];
        t2 = matrix._data;
        n00 = t2[0];
        n10 = t2[2];
        n30 = t2[4];
        n01 = t2[1];
        n11 = t2[3];
        n31 = t2[5];
        t1[0] = m00 * n00 + m01 * n10 + m03 * n30;
        t1[1] = m10 * n00 + m11 * n10 + m13 * n30;
        t1[2] = m20 * n00 + m21 * n10 + m23 * n30;
        t1[3] = m30 * n00 + m31 * n10 + m33 * n30;
        t1[4] = m00 * n01 + m01 * n11 + m03 * n31;
        t1[5] = m10 * n01 + m11 * n11 + m13 * n31;
        t1[6] = m20 * n01 + m21 * n11 + m23 * n31;
        t1[7] = m30 * n01 + m31 * n11 + m33 * n31;
      }
    }
  }], ["stagexl.geom.point", "package:stagexl/src/geom/point.dart",, U, {
    "^": "",
    Point0: {
      "^": "Object;x>,y>,$ti",
      toString$0: function(_) {
        return "Point<" + new H.TypeImpl(H.runtimeTypeToString(H.getTypeArgumentByIndex(this, 0)), null).toString$0(0) + "> [x=" + H.S(this.x) + ", y=" + H.S(this.y) + "]";
      },
      $eq: function(_, other) {
        var t1;
        if (other == null)
          return false;
        t1 = J.getInterceptor(other);
        return !!t1.$isPoint && J.$eq$(this.x, t1.get$x(other)) && J.$eq$(this.y, t1.get$y(other));
      },
      get$hashCode: function(_) {
        var a, b;
        a = J.get$hashCode$(this.x);
        b = J.get$hashCode$(this.y);
        return O.JenkinsHash_finish(O.JenkinsHash_combine(O.JenkinsHash_combine(0, a), b));
      },
      $add: function(_, other) {
        return new U.Point0(J.$add$ns(this.x, other.get$x(other)), J.$add$ns(this.y, other.get$y(other)), this.$ti);
      },
      $sub: function(_, other) {
        return new U.Point0(J.$sub$n(this.x, other.get$x(other)), J.$sub$n(this.y, other.get$y(other)), this.$ti);
      },
      $mul: function(_, factor) {
        return new U.Point0(J.$mul$ns(this.x, factor), J.$mul$ns(this.y, factor), this.$ti);
      },
      copyFrom$1: function(point) {
        this.x = point.get$x(point);
        this.y = point.get$y(point);
      },
      get$length: function(_) {
        var t1, t2;
        t1 = this.x;
        t1 = J.$mul$ns(t1, t1);
        t2 = this.y;
        return Math.sqrt(J.$add$ns(t1, J.$mul$ns(t2, t2)));
      },
      add$1: function(_, other) {
        return this.$add(0, other);
      },
      $isPoint: 1
    }
  }], ["stagexl.geom.rectangle", "package:stagexl/src/geom/rectangle.dart",, U, {
    "^": "",
    Rectangle0: {
      "^": "Object;left>,top>,width>,height>,$ti",
      toString$0: function(_) {
        return "Rectangle<" + new H.TypeImpl(H.runtimeTypeToString(H.getTypeArgumentByIndex(this, 0)), null).toString$0(0) + "> [left=" + H.S(this.left) + ", top=" + H.S(this.top) + ", width=" + H.S(this.width) + ", height=" + H.S(this.height) + "]";
      },
      $eq: function(_, other) {
        var t1, t2, t3;
        if (other == null)
          return false;
        t1 = J.getInterceptor(other);
        if (!!t1.$isRectangle) {
          t2 = this.left;
          t3 = t1.get$left(other);
          if (t2 == null ? t3 == null : t2 === t3) {
            t2 = this.top;
            t3 = t1.get$top(other);
            if (t2 == null ? t3 == null : t2 === t3) {
              t2 = this.width;
              t3 = t1.get$width(other);
              if (t2 == null ? t3 == null : t2 === t3) {
                t2 = this.height;
                t1 = t1.get$height(other);
                t1 = t2 == null ? t1 == null : t2 === t1;
              } else
                t1 = false;
            } else
              t1 = false;
          } else
            t1 = false;
        } else
          t1 = false;
        return t1;
      },
      get$hashCode: function(_) {
        var a, b, c, d;
        a = J.get$hashCode$(this.left);
        b = J.get$hashCode$(this.top);
        c = J.get$hashCode$(this.width);
        d = J.get$hashCode$(this.height);
        return O.JenkinsHash_finish(O.JenkinsHash_combine(O.JenkinsHash_combine(O.JenkinsHash_combine(O.JenkinsHash_combine(0, a), b), c), d));
      },
      get$isEmpty: function(_) {
        return this.width <= 0 || this.height <= 0;
      },
      contains$2: function(_, px, py) {
        var t1, t2;
        t1 = this.left;
        if (t1 <= px) {
          t2 = this.top;
          t1 = t2 <= py && t1 + this.width > px && t2 + this.height > py;
        } else
          t1 = false;
        return t1;
      },
      boundingBox$1: function(_, other) {
        var rLeft, rTop;
        rLeft = P.min(this.left, other.left);
        rTop = P.min(this.top, other.top);
        return new U.Rectangle0(rLeft, rTop, P.max(this.left + this.width, other.left + other.width) - rLeft, P.max(this.top + this.height, other.top + other.height) - rTop, this.$ti);
      },
      copyFrom$1: function(r) {
        var t1, t2, t3, t4;
        t1 = J.getInterceptor$x(r);
        t2 = t1.get$left(r);
        t3 = t1.get$top(r);
        t4 = t1.get$width(r);
        t1 = t1.get$height(r);
        this.left = t2;
        this.top = t3;
        this.width = t4;
        this.height = t1;
      },
      align$0: [function() {
        var rLeft, rTop;
        rLeft = J.floor$0$n(this.left);
        rTop = J.floor$0$n(this.top);
        return new U.Rectangle0(rLeft, rTop, C.JSNumber_methods.ceil$0(this.left + this.width) - rLeft, C.JSNumber_methods.ceil$0(this.top + this.height) - rTop, [P.$int]);
      }, "call$0", "get$align", 0, 0, 95],
      get$x: function(_) {
        return this.left;
      },
      get$y: function(_) {
        return this.top;
      },
      $isRectangle: 1,
      $asRectangle: null
    }
  }], ["stagexl.internal.audio_loader", "package:stagexl/src/internal/audio_loader.dart",, R, {
    "^": "",
    AudioLoader: {
      "^": "Object;audio,_completer<,_urls,_loadData,_onCanPlaySubscription,_onErrorSubscription",
      _loadNextUrl$0: function() {
        var t1 = this._urls;
        if (t1.length === 0)
          this._loadFailed$0();
        else
          this._loadAudioSource$1(C.JSArray_methods.removeAt$1(t1, 0));
      },
      _loadFailed$0: function() {
        this._onCanPlaySubscription.cancel$0();
        this._onErrorSubscription.cancel$0();
        this._completer.completeError$1(new P.StateError("Failed to load audio."));
      },
      _loadAudioSource$1: function(url) {
        var t1 = this.audio;
        t1.preload = "auto";
        t1.src = url;
        t1.load();
      },
      AudioLoader$3: function(urls, loadData, corsEnabled) {
        var t1, t2;
        t1 = this.audio;
        document.body.appendChild(t1);
        C.JSArray_methods.addAll$1(this._urls, urls);
        this._loadData = false;
        t2 = W.Event;
        this._onCanPlaySubscription = W._EventStreamSubscription$(t1, "canplay", new R.AudioLoader_closure(this), false, t2);
        this._onErrorSubscription = W._EventStreamSubscription$(t1, "error", new R.AudioLoader_closure0(this), false, t2);
        this._loadNextUrl$0();
      },
      static: {
        AudioLoader$: function(urls, loadData, corsEnabled) {
          var t1 = W.AudioElement;
          t1 = new R.AudioLoader(W.AudioElement_AudioElement$_(null), new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [t1]), [t1]), H.setRuntimeTypeInfo([], [P.String]), false, null, null);
          t1.AudioLoader$3(urls, false, false);
          return t1;
        }
      }
    },
    AudioLoader_closure: {
      "^": "Closure:0;$this",
      call$1: function(e) {
        var t1 = this.$this;
        t1._onCanPlaySubscription.cancel$0();
        t1._onErrorSubscription.cancel$0();
        t1._completer.complete$1(0, t1.audio);
        return;
      }
    },
    AudioLoader_closure0: {
      "^": "Closure:0;$this",
      call$1: function(e) {
        return this.$this._loadNextUrl$0();
      }
    }
  }], ["stagexl.internal.environment", "package:stagexl/src/internal/environment.dart",, Q, {
    "^": "",
    _checkTouchEventSupport: function() {
      var t1, exception;
      try {
        t1 = P.Device_isEventTypeSupported("TouchEvent");
        return t1;
      } catch (exception) {
        H.unwrapException(exception);
        return false;
      }
    }
  }], ["stagexl.internal.image_loader", "package:stagexl/src/internal/image_loader.dart",, N, {
    "^": "",
    ImageLoader: {
      "^": "Object;image,_image_loader$_completer,_url,_onLoadSubscription,_image_loader$_onErrorSubscription",
      _onImageLoad$1: [function($event) {
        this._onLoadSubscription.cancel$0();
        this._image_loader$_onErrorSubscription.cancel$0();
        this._image_loader$_completer.complete$1(0, this.image);
      }, "call$1", "get$_onImageLoad", 2, 0, 13],
      _onImageError$1: [function($event) {
        this._onLoadSubscription.cancel$0();
        this._image_loader$_onErrorSubscription.cancel$0();
        this._image_loader$_completer.completeError$1(new P.StateError("Failed to load image."));
      }, "call$1", "get$_onImageError", 2, 0, 13]
    }
  }], ["stagexl.internal.jenkins_hash", "package:stagexl/src/internal/jenkins_hash.dart",, O, {
    "^": "",
    JenkinsHash_combine: function(hash, value) {
      hash = 536870911 & hash + value;
      hash = 536870911 & hash + ((524287 & hash) << 10);
      return hash ^ hash >>> 6;
    },
    JenkinsHash_finish: function(hash) {
      hash = 536870911 & hash + ((67108863 & hash) << 3);
      hash ^= hash >>> 11;
      return 536870911 & hash + ((16383 & hash) << 15);
    }
  }], ["stagexl.internal.tools", "package:stagexl/src/internal/tools.dart",, V, {
    "^": "",
    color2rgb: function(color) {
      return "rgb(" + (color >>> 16 & 255) + "," + (color >>> 8 & 255) + "," + (color & 255) + ")";
    },
    color2rgba: function(color) {
      return "rgba(" + (color >>> 16 & 255) + "," + (color >>> 8 & 255) + "," + (color & 255) + "," + H.S((color >>> 24 & 255) / 255) + ")";
    },
    minInt: function(a, b) {
      if (a <= b)
        return a;
      else
        return b;
    },
    minNum: function(a, b) {
      if (a <= b)
        return a;
      else
        return b;
    },
    clampInt: function(value, lower, upper) {
      if (value <= lower)
        return lower;
      else if (value >= upper)
        return upper;
      else
        return value;
    },
    ensureInt: function(value) {
      if (typeof value === "number" && Math.floor(value) === value)
        return value;
      else
        throw H.wrapException(P.ArgumentError$("The supplied value (" + H.S(value) + ") is not an int."));
    },
    ensureNum: function(value) {
      if (typeof value === "number")
        return value;
      else
        throw H.wrapException(P.ArgumentError$("The supplied value (" + H.S(value) + ") is not a number."));
    },
    ensureString: function(value) {
      if (typeof value === "string")
        return value;
      else
        throw H.wrapException(P.ArgumentError$("The supplied value (" + H.S(value) + ") is not a string."));
    }
  }], ["stagexl.media", "package:stagexl/src/media.dart",, E, {
    "^": "",
    Sound_load: function(url, soundLoadOptions) {
      var t1;
      E.SoundMixer__initEngine();
      switch ($.SoundMixer__engine) {
        case "WebAudioApi":
          return E.WebAudioApiSound_load(url, soundLoadOptions);
        case "AudioElement":
          return E.AudioElementSound_load(url, soundLoadOptions);
        default:
          E.SoundMixer__initEngine();
          t1 = new P._Future(0, $.Zone__current, null, [E.Sound]);
          t1._asyncComplete$1(new E.MockSound());
          return t1;
      }
    },
    SoundMixer__initEngine: function() {
      if ($.SoundMixer__engine != null)
        return;
      $.SoundMixer__engine = "AudioElement";
      $.SoundMixer__audioElementMixer = new E.AudioElementMixer(1, P.StreamController_StreamController$broadcast(null, null, false, P.num));
      if (!!(window.AudioContext || window.webkitAudioContext)) {
        $.SoundMixer__engine = "WebAudioApi";
        $.SoundMixer__webAudioApiMixer = E.WebAudioApiMixer$(null);
      }
      var ua = window.navigator.userAgent;
      if (J.getInterceptor$asx(ua).contains$1(ua, "IEMobile"))
        if (C.JSString_methods.contains$1(ua, "9.0"))
          $.SoundMixer__engine = "Mock";
      if (C.JSString_methods.contains$1(ua, "iPhone") || C.JSString_methods.contains$1(ua, "iPad") || C.JSString_methods.contains$1(ua, "iPod"))
        if (C.JSString_methods.contains$1(ua, "OS 3") || C.JSString_methods.contains$1(ua, "OS 4") || C.JSString_methods.contains$1(ua, "OS 5"))
          $.SoundMixer__engine = "Mock";
      if ($.$get$AudioLoader_supportedTypes().length === 0)
        $.SoundMixer__engine = "Mock";
      E.SoundMixer__initEngine();
      P.print("StageXL audio engine  : " + H.S($.SoundMixer__engine));
    },
    AudioElementMixer: {
      "^": "Object;_volume,_volumeChangedEvent"
    },
    AudioElementSound: {
      "^": "Sound;_audioElement,_soundChannels",
      get$length: function(_) {
        return this._audioElement.duration;
      },
      play$2: function(_, loop, soundTransform) {
        var duration, t1;
        duration = this._audioElement.duration;
        duration.toString;
        if (duration == 1 / 0 || duration == -1 / 0)
          duration = 3600;
        t1 = new E.AudioElementSoundChannel(null, null, null, null, null, false, false, false, 0, 0, 0, null, null, null);
        t1._audioElementSound = this;
        t1._startTime = 0;
        duration.toString;
        t1._media$_duration = duration;
        t1._soundTransform = soundTransform;
        t1._loop = loop;
        this._requestAudioElement$1(t1).then$1(t1.get$_onAudioElement());
        return t1;
      },
      _requestAudioElement$1: function(soundChannel) {
        var $async$goto = 0, $async$completer = new P.Completer_Completer$sync(), $async$returnValue, $async$handler = 2, $async$currentError, $async$self = this, t1, t2, audioElement, t3, audioCanPlay;
        var $async$_requestAudioElement$1 = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
          if ($async$errorCode === 1) {
            $async$currentError = $async$result;
            $async$goto = $async$handler;
          }
          while (true)
            $async$outer:
              switch ($async$goto) {
                case 0:
                  // Function start
                  for (t1 = $async$self._soundChannels, t2 = t1.get$keys(), t2 = t2.get$iterator(t2); t2.moveNext$0();) {
                    audioElement = t2.get$current();
                    if (t1.$index(0, audioElement) == null) {
                      t1.$indexSet(0, audioElement, soundChannel);
                      $async$returnValue = audioElement;
                      // goto return
                      $async$goto = 1;
                      break $async$outer;
                    }
                  }
                  audioElement = H.interceptedTypeCast($async$self._audioElement.cloneNode(true), "$isAudioElement");
                  audioElement.toString;
                  t2 = W.Event;
                  t3 = new W._ElementEventStreamImpl(audioElement, "canplay", false, [t2]);
                  audioCanPlay = t3.get$first(t3);
                  $async$goto = audioElement.readyState === 0 ? 3 : 4;
                  break;
                case 3:
                  // then
                  $async$goto = 5;
                  return P._asyncHelper(audioCanPlay, $async$_requestAudioElement$1, $async$completer);
                case 5:
                  // returning from await.
                case 4:
                  // join
                  W._EventStreamSubscription$(audioElement, "ended", $async$self.get$_onAudioEnded(), false, t2);
                  t1.$indexSet(0, audioElement, soundChannel);
                  $async$returnValue = audioElement;
                  // goto return
                  $async$goto = 1;
                  break;
                case 1:
                  // return
                  return P._asyncHelper($async$returnValue, 0, $async$completer);
                case 2:
                  // rethrow
                  return P._asyncHelper($async$currentError, 1, $async$completer);
              }
        });
        return P._asyncHelper(null, $async$_requestAudioElement$1, $async$completer);
      },
      _onAudioEnded$1: [function($event) {
        var soundChannel = this._soundChannels.$index(0, W._convertNativeToDart_EventTarget($event.target));
        if (soundChannel != null)
          soundChannel._onAudioEnded$0();
      }, "call$1", "get$_onAudioEnded", 2, 0, 13],
      static: {
        AudioElementSound_load: function(url, soundLoadOptions) {
          var $async$goto = 0, $async$completer = new P.Completer_Completer$sync(), $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], loadData, corsEnabled, audioUrls, audioLoader, audioElement, t1, t2, t3, exception, $async$exception;
          var $async$AudioElementSound_load = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
            if ($async$errorCode === 1) {
              $async$currentError = $async$result;
              $async$goto = $async$handler;
            }
            while (true)
              switch ($async$goto) {
                case 0:
                  // Function start
                  if (soundLoadOptions == null)
                    soundLoadOptions = $.$get$Sound_defaultLoadOptions();
                  loadData = false;
                  soundLoadOptions.get$corsEnabled();
                  corsEnabled = false;
                  audioUrls = soundLoadOptions.getOptimalAudioUrls$1(url);
                  $async$handler = 4;
                  audioLoader = R.AudioLoader$(audioUrls, loadData, corsEnabled);
                  $async$goto = 7;
                  return P._asyncHelper(audioLoader.get$_completer().future, $async$AudioElementSound_load, $async$completer);
                case 7:
                  // returning from await.
                  audioElement = $async$result;
                  t1 = audioElement;
                  t2 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [W.AudioElement, E.AudioElementSoundChannel]);
                  t3 = new E.AudioElementSound(t1, t2);
                  E.SoundMixer__initEngine();
                  t1.toString;
                  W._EventStreamSubscription$(t1, "ended", t3.get$_onAudioEnded(), false, W.Event);
                  t2.$indexSet(0, t1, null);
                  $async$returnValue = t3;
                  // goto return
                  $async$goto = 1;
                  break;
                  $async$handler = 2;
                  // goto after finally
                  $async$goto = 6;
                  break;
                case 4:
                  // catch
                  $async$handler = 3;
                  $async$exception = $async$currentError;
                  H.unwrapException($async$exception);
                  soundLoadOptions.get$ignoreErrors();
                  E.SoundMixer__initEngine();
                  t1 = new P._Future(0, $.Zone__current, null, [E.Sound]);
                  t1._asyncComplete$1(new E.MockSound());
                  $async$returnValue = t1;
                  // goto return
                  $async$goto = 1;
                  break;
                  // goto after finally
                  $async$goto = 6;
                  break;
                case 3:
                  // uncaught
                  // goto rethrow
                  $async$goto = 2;
                  break;
                case 6:
                  // after finally
                case 1:
                  // return
                  return P._asyncHelper($async$returnValue, 0, $async$completer);
                case 2:
                  // rethrow
                  return P._asyncHelper($async$currentError, 1, $async$completer);
              }
          });
          return P._asyncHelper(null, $async$AudioElementSound_load, $async$completer);
        }
      }
    },
    AudioElementSoundChannel: {
      "^": "SoundChannel;_audioElementSound,_soundTransform,_audioElement,_volumeChangedSubscription,_completeTimer,_stopped,_paused,_loop,_startTime,_media$_duration,_media$_position,paused,soundTransform,_eventStreams",
      get$position: function(_) {
        if (this._paused || this._stopped || this._audioElement == null)
          return this._media$_position;
        else
          return C.JSNumber_methods.clamp$2(this._audioElement.currentTime - this._startTime, 0, this._media$_duration);
      },
      get$paused: function(_) {
        return this._paused;
      },
      set$paused: function(_, value) {
        var t1;
        if (!(this._paused === value)) {
          t1 = this._audioElement;
          if (t1 == null || this._stopped)
            this._paused = this._stopped || value;
          else if (value) {
            this._media$_position = this.get$position(this);
            this._paused = true;
            this._audioElement.pause();
            this._stopCompleteTimer$0();
          } else {
            this._paused = false;
            t1.play();
            this._startCompleteTimer$1(this._media$_duration - this._media$_position);
          }
        }
      },
      set$soundTransform: function(value) {
        var t1;
        this._soundTransform = value;
        t1 = this._audioElement;
        if (!(t1 == null))
          t1.volume = value.volume * $.SoundMixer__audioElementMixer._volume;
      },
      set$playbackRate: function(_, r) {
        this.get$_audioelement();
        this._audioElement.playbackRate = r;
      },
      stop$0: function(_) {
        var t1;
        if (this._audioElement != null) {
          this._media$_position = this.get$position(this);
          this._audioElement.pause();
          t1 = this._audioElement;
          t1.currentTime = 0;
          this._audioElementSound._soundChannels.$indexSet(0, t1, null);
          this._audioElement = null;
        }
        t1 = this._volumeChangedSubscription;
        if (t1 != null) {
          t1.cancel$0();
          this._volumeChangedSubscription = null;
        }
        if (!this._stopped) {
          this._stopped = true;
          this._paused = true;
          this._stopCompleteTimer$0();
          this.dispatchEventRaw$3(new R.Event0("complete", false, C.EventPhase_1, null, null, false, false), this, C.EventPhase_1);
        }
      },
      _onAudioElement$1: [function(audioElement) {
        var mixer, t1;
        mixer = $.SoundMixer__audioElementMixer;
        if (this._stopped)
          this._audioElementSound._soundChannels.$indexSet(0, audioElement, null);
        else {
          this._audioElement = audioElement;
          audioElement.currentTime = this._startTime;
          audioElement.volume = this._soundTransform.volume * mixer._volume;
          t1 = mixer._volumeChangedEvent;
          this._volumeChangedSubscription = new P._BroadcastStream(t1, [H.getTypeArgumentByIndex(t1, 0)]).listen$1(this.get$_onVolumeChanged());
          if (!this._paused) {
            this._audioElement.play();
            this._startCompleteTimer$1(this._media$_duration);
          }
        }
      }, "call$1", "get$_onAudioElement", 2, 0, 72, 47],
      _startCompleteTimer$1: function(time) {
        this._completeTimer = P.Timer_Timer(P.Duration$(0, 0, 0, C.JSNumber_methods.toInt$0(C.JSNumber_methods.clamp$2(time, 0, this._media$_duration) * 1000), 0, 0), this.get$_onCompleteTimer());
      },
      _stopCompleteTimer$0: function() {
        var t1 = this._completeTimer;
        if (t1 != null) {
          t1.cancel$0();
          this._completeTimer = null;
        }
      },
      _onCompleteTimer$0: [function() {
        if (!this._paused)
          if (this._loop) {
            var t1 = this._audioElement;
            t1.currentTime = this._startTime;
            t1.play();
            this._startCompleteTimer$1(this._media$_duration);
          } else
            this.stop$0(0);
      }, "call$0", "get$_onCompleteTimer", 0, 0, 3],
      _onVolumeChanged$1: [function(volume) {
        this._audioElement.volume = this._soundTransform.volume * volume;
      }, "call$1", "get$_onVolumeChanged", 2, 0, 23, 48],
      _onAudioEnded$0: function() {
        if (!this._loop)
          this.stop$0(0);
      }
    },
    MockSound: {
      "^": "Sound;",
      get$length: function(_) {
        return 0 / 0;
      },
      play$2: function(_, loop, soundTransform) {
        var t1 = new E.MockSoundChannel(null, false, false, false, 0, 0, 0, null, null, null, null);
        t1._mockSound = this;
        t1._soundTransform = soundTransform;
        t1._loop = loop;
        return t1;
      }
    },
    MockSoundChannel: {
      "^": "SoundChannel;_mockSound,_stopped,_paused,_loop,_startTime,_media$_duration,_media$_position,_soundTransform,paused,soundTransform,_eventStreams",
      get$paused: function(_) {
        return this._paused;
      },
      set$paused: function(_, value) {
        this._paused = this._stopped || value;
      },
      set$soundTransform: function(value) {
        this._soundTransform = value;
      },
      stop$0: function(_) {
        if (!this._stopped) {
          this._stopped = true;
          this._paused = true;
          this.dispatchEventRaw$3(new R.Event0("complete", false, C.EventPhase_1, null, null, false, false), this, C.EventPhase_1);
        }
      }
    },
    WebAudioApiMixer: {
      "^": "Object;_inputNode,_volumeNode,_panNode,_stereoNode,_panSupport,_stereoPanSupport",
      applySoundTransform$1: function(soundTransform) {
        var receiver, _, t1, t2, exception;
        this._volumeNode.gain.value = Math.pow(soundTransform.volume, 2);
        t1 = this._panNode;
        t2 = t1 == null;
        if (!t2 || soundTransform.x !== 0 || soundTransform.y !== 0 || soundTransform.z !== 0) {
          if (t2)
            if (this._panSupport) {
              try {
                t1 = $.$get$WebAudioApiMixer_audioContext().createPanner();
                this._panNode = t1;
                t1.connect(this._inputNode, 0, 0);
                t1 = this._panNode;
                t1.refDistance = 1;
                t1.maxDistance = 10000;
                t1.distanceModel = "inverse";
                receiver = this._volumeNode;
                J.disconnect$1$x(receiver, this._inputNode);
                J._connect$3$x(receiver, this._panNode, 0, 0);
              } catch (exception) {
                t1 = H.unwrapException(exception);
                _ = t1;
                P.print(_);
              }
              t1 = this._panNode;
              if (t1 == null)
                this._panSupport = false;
            }
          if (t1 != null) {
            t1.refDistance = soundTransform.falloff;
            t1.setPosition(soundTransform.pan + soundTransform.x, soundTransform.y, soundTransform.z);
          }
        }
      },
      WebAudioApiMixer$1: function(inputNode) {
        var t1;
        this._inputNode = inputNode != null ? inputNode : $.$get$WebAudioApiMixer_audioContext().destination;
        t1 = J.createGain$0$x($.$get$WebAudioApiMixer_audioContext());
        this._volumeNode = t1;
        t1.connect(this._inputNode, 0, 0);
      },
      static: {
        WebAudioApiMixer$: function(inputNode) {
          var t1 = new E.WebAudioApiMixer(null, null, null, null, true, false);
          t1.WebAudioApiMixer$1(inputNode);
          return t1;
        }
      }
    },
    WebAudioApiSound: {
      "^": "Sound;_audioBuffer",
      get$length: function(_) {
        return this._audioBuffer.duration;
      },
      play$2: function(_, loop, soundTransform) {
        var t1, t2;
        t1 = this._audioBuffer.duration;
        t2 = new E.WebAudioApiSoundChannel(null, null, null, null, null, false, true, false, 0, 0, 0, 0, null, null, null);
        t2._webAudioApiSound = this;
        t2._startTime = 0;
        t1.toString;
        t2._media$_duration = t1;
        t2._soundTransform = soundTransform;
        t2._loop = loop;
        t1 = E.WebAudioApiMixer$($.SoundMixer__webAudioApiMixer._volumeNode);
        t2._webAudioApiMixer = t1;
        t1.applySoundTransform$1(soundTransform);
        t2.set$paused(0, false);
        return t2;
      },
      static: {
        WebAudioApiSound_load: function(url, soundLoadOptions) {
          var $async$goto = 0, $async$completer = new P.Completer_Completer$sync(), $async$returnValue, $async$handler = 2, $async$currentError, $async$next = [], audioContext, audioUrl, httpRequest, audioData, audioBuffer, audioUrls, t1, _i, t2, exception, $async$exception;
          var $async$WebAudioApiSound_load = P._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
            if ($async$errorCode === 1) {
              $async$currentError = $async$result;
              $async$goto = $async$handler;
            }
            while (true)
              switch ($async$goto) {
                case 0:
                  // Function start
                  audioUrls = $.$get$Sound_defaultLoadOptions().getOptimalAudioUrls$1(url);
                  audioContext = $.$get$WebAudioApiMixer_audioContext();
                  t1 = audioUrls.length, _i = 0;
                case 3:
                  // for condition
                  if (!(_i < audioUrls.length)) {
                    // goto after for
                    $async$goto = 5;
                    break;
                  }
                  audioUrl = audioUrls[_i];
                  $async$handler = 7;
                  $async$goto = 10;
                  return P._asyncHelper(W.HttpRequest_request(audioUrl, null, null, null, null, "arraybuffer", null, null), $async$WebAudioApiSound_load, $async$completer);
                case 10:
                  // returning from await.
                  httpRequest = $async$result;
                  audioData = J.get$response$x(httpRequest);
                  $async$goto = 11;
                  return P._asyncHelper(J.decodeAudioData$1$x(audioContext, audioData), $async$WebAudioApiSound_load, $async$completer);
                case 11:
                  // returning from await.
                  audioBuffer = $async$result;
                  t2 = new E.WebAudioApiSound(audioBuffer);
                  E.SoundMixer__initEngine();
                  $async$returnValue = t2;
                  // goto return
                  $async$goto = 1;
                  break;
                  $async$handler = 2;
                  // goto after finally
                  $async$goto = 9;
                  break;
                case 7:
                  // catch
                  $async$handler = 6;
                  $async$exception = $async$currentError;
                  H.unwrapException($async$exception);
                  // goto after finally
                  $async$goto = 9;
                  break;
                case 6:
                  // uncaught
                  // goto rethrow
                  $async$goto = 2;
                  break;
                case 9:
                  // after finally
                case 4:
                  // for update
                  audioUrls.length === t1 || (0, H.throwConcurrentModificationError)(audioUrls), ++_i;
                  // goto for condition
                  $async$goto = 3;
                  break;
                case 5:
                  // after for
                  E.SoundMixer__initEngine();
                  t1 = new P._Future(0, $.Zone__current, null, [E.Sound]);
                  t1._asyncComplete$1(new E.MockSound());
                  $async$returnValue = t1;
                  // goto return
                  $async$goto = 1;
                  break;
                case 1:
                  // return
                  return P._asyncHelper($async$returnValue, 0, $async$completer);
                case 2:
                  // rethrow
                  return P._asyncHelper($async$currentError, 1, $async$completer);
              }
          });
          return P._asyncHelper(null, $async$WebAudioApiSound_load, $async$completer);
        }
      }
    },
    WebAudioApiSoundChannel: {
      "^": "SoundChannel;_webAudioApiSound,_soundTransform,_webAudioApiMixer,_sourceNode,_completeTimer,_stopped,_paused,_loop,_startTime,_media$_duration,_media$_position,_timeOffset,paused,soundTransform,_eventStreams",
      get$position: function(_) {
        var position, duration;
        if (this._paused || this._stopped)
          return this._media$_position;
        else {
          position = $.$get$WebAudioApiMixer_audioContext().currentTime - this._timeOffset;
          duration = this._media$_duration;
          return this._loop ? C.JSDouble_methods.$mod(position, duration) : C.JSDouble_methods.clamp$2(position, 0, duration);
        }
      },
      set$playbackRate: function(_, r) {
        this._sourceNode.playbackRate.value = r;
      },
      get$paused: function(_) {
        return this._paused;
      },
      set$paused: function(_, value) {
        var t1, t2, t3, t4;
        if (!(this._paused === value))
          if (this._stopped)
            this._paused = true;
          else if (value) {
            this._media$_position = this.get$position(this);
            this._paused = true;
            t1 = this._sourceNode;
            (t1 && C.AudioBufferSourceNode_methods).stop$1(t1, 0);
            this._stopCompleteTimer$0();
          } else if (this._loop) {
            this._paused = false;
            t1 = $.$get$WebAudioApiMixer_audioContext();
            t2 = t1.createBufferSource();
            this._sourceNode = t2;
            t2.buffer = this._webAudioApiSound._audioBuffer;
            t2.loop = true;
            t3 = this._startTime;
            t2.loopStart = t3;
            t2.loopEnd = t3 + this._media$_duration;
            t2.connect(this._webAudioApiMixer._volumeNode, 0, 0);
            t2 = this._sourceNode;
            (t2 && C.AudioBufferSourceNode_methods).start$2(t2, 0, this._startTime + this._media$_position);
            this._timeOffset = t1.currentTime - this._media$_position;
          } else {
            this._paused = false;
            t1 = $.$get$WebAudioApiMixer_audioContext();
            t2 = t1.createBufferSource();
            this._sourceNode = t2;
            t2.buffer = this._webAudioApiSound._audioBuffer;
            t2.loop = false;
            t2.connect(this._webAudioApiMixer._volumeNode, 0, 0);
            t2 = this._sourceNode;
            t3 = this._startTime;
            t4 = this._media$_position;
            (t2 && C.AudioBufferSourceNode_methods).start$3(t2, 0, t3 + t4, this._media$_duration - t4);
            t1 = t1.currentTime;
            t4 = this._media$_position;
            this._timeOffset = t1 - t4;
            t1 = this._media$_duration;
            this._completeTimer = P.Timer_Timer(P.Duration$(0, 0, 0, C.JSNumber_methods.toInt$0(C.JSNumber_methods.clamp$2(t1 - t4, 0, t1) * 1000), 0, 0), this.get$_onCompleteTimer());
          }
      },
      set$soundTransform: function(value) {
        this._soundTransform = value;
        this._webAudioApiMixer.applySoundTransform$1(value);
      },
      stop$0: function(_) {
        var t1;
        if (!this._stopped) {
          t1 = this._sourceNode;
          (t1 && C.AudioBufferSourceNode_methods).stop$1(t1, 0);
          this._stopCompleteTimer$0();
          this._onCompleteTimer$0();
        }
      },
      _stopCompleteTimer$0: function() {
        var t1 = this._completeTimer;
        if (t1 != null) {
          t1.cancel$0();
          this._completeTimer = null;
        }
      },
      _onCompleteTimer$0: [function() {
        if (!(this._paused || this._stopped || this._loop)) {
          this._media$_position = this.get$position(this);
          this._stopped = true;
          this._paused = true;
          this.dispatchEventRaw$3(new R.Event0("complete", false, C.EventPhase_1, null, null, false, false), this, C.EventPhase_1);
        }
      }, "call$0", "get$_onCompleteTimer", 0, 0, 3]
    },
    Sound: {
      "^": "Object;"
    },
    SoundChannel: {
      "^": "EventDispatcher;",
      set$playbackRate: function(_, r) {
      }
    },
    SoundLoadOptions: {
      "^": "Object;mp3,mp4,ogg,ac3,wav,alternativeUrls,ignoreErrors<,corsEnabled<",
      getOptimalAudioUrls$1: function(primaryUrl) {
        var t1, availableTypes, urls, regex, primaryMatch, _i, availableType;
        t1 = $.$get$AudioLoader_supportedTypes();
        t1.toString;
        availableTypes = H.setRuntimeTypeInfo(t1.slice(), [H.getTypeArgumentByIndex(t1, 0)]);
        urls = H.setRuntimeTypeInfo([], [P.String]);
        regex = P.RegExp_RegExp("([A-Za-z0-9]+)$", true, false);
        primaryMatch = regex.firstMatch$1(primaryUrl);
        if (primaryMatch == null)
          return urls;
        if (C.JSArray_methods.remove$1(availableTypes, primaryMatch._match[1]))
          urls.push(primaryUrl);
        for (t1 = availableTypes.length, _i = 0; _i < availableTypes.length; availableTypes.length === t1 || (0, H.throwConcurrentModificationError)(availableTypes), ++_i) {
          availableType = availableTypes[_i];
          primaryUrl.toString;
          if (typeof availableType !== "string")
            H.throwExpression(H.argumentErrorValue(availableType));
          urls.push(H.stringReplaceAllUnchecked(primaryUrl, regex, availableType));
        }
        return urls;
      }
    },
    SoundTransform: {
      "^": "Object;volume,pan,x>,y>,z,falloff"
    }
  }], ["stagexl.text", "package:stagexl/src/text.dart",, Y, {
    "^": "",
    _getFontStyleMetrics: function(textFormat) {
      var fontStyle = textFormat.get$_text$_cssFontStyle();
      return $.$get$_fontStyleMetrics0().putIfAbsent$2(fontStyle, new Y._getFontStyleMetrics_closure(textFormat));
    },
    _getFontStyleMetrics_closure: {
      "^": "Closure:1;textFormat",
      call$0: function() {
        var t1, t2;
        t1 = this.textFormat;
        t2 = new Y._FontStyleMetrics(0, 0, 0);
        if ($.$get$isCocoonJS())
          t2._fromEstimation$1(t1);
        else
          t2._fromHtml$1(t1);
        return t2;
      }
    },
    _FontStyleMetrics: {
      "^": "Object;ascent,descent,height>",
      _fromEstimation$1: function(textFormat) {
        var t1 = textFormat.size;
        this.height = t1;
        this.ascent = C.JSInt_methods._tdivFast$1(t1 * 7, 8);
        this.descent = C.JSInt_methods._tdivFast$1(t1 * 2, 8);
      },
      _fromHtml$1: function(textFormat) {
        var text, block, div, fontStyle, t1, exception;
        fontStyle = textFormat.get$_text$_cssFontStyle();
        text = W._ElementFactoryProvider_createElement_tag("span", null);
        block = W._ElementFactoryProvider_createElement_tag("div", null);
        div = W._ElementFactoryProvider_createElement_tag("div", null);
        t1 = J.get$style$x(text);
        t1.font = fontStyle;
        J.set$text$x(text, "Hg");
        t1 = J.get$style$x(block);
        t1.display = "inline-block";
        t1 = J.get$style$x(block);
        t1.width = "1px";
        t1 = J.get$style$x(block);
        t1.height = "0px";
        J.append$1$x(div, block);
        J.append$1$x(div, text);
        document.body.appendChild(div);
        try {
          t1 = J.get$style$x(block);
          t1.verticalAlign = "baseline";
          this.ascent = C.JSNumber_methods.round$0(block.offsetTop) - C.JSNumber_methods.round$0(text.offsetTop);
          t1 = J.get$style$x(block);
          t1.verticalAlign = "bottom";
          t1 = C.JSNumber_methods.round$0(block.offsetTop) - C.JSNumber_methods.round$0(text.offsetTop);
          this.height = t1;
          this.descent = t1 - this.ascent;
        } catch (exception) {
          H.unwrapException(exception);
          this._fromEstimation$1(textFormat);
        } finally {
          J.remove$0$ax(div);
        }
      }
    },
    TextField: {
      "^": "InteractiveObject;_text$_text<,_defaultTextFormat,_text$_autoSize,_text$_type,_caretIndex,_caretLine,_caretTime,_caretX,_caretY,_caretWidth,_caretHeight,_text$_wordWrap,_multiline,_displayAsPassword,_text$_background,_border,_passwordChar,_backgroundColor,_borderColor,_maxChars,_text$_width,_text$_height,_text$_textWidth,_text$_textHeight,_text$_textLineMetrics,_text$_refreshPending,_text$_cacheAsBitmap,_text$_renderTexture,_text$_renderTextureQuad,doubleClickEnabled,mouseEnabled,mouseCursor,tabEnabled,tabIndex,displayObjectID,_display$_x,_display$_y,_pivotX,_pivotY,_scaleX,_scaleY,_skewX,_skewY,_rotation,_alpha,_visible,_off,_mask,_blendMode,_filters,_cache,_display$_name,_parent,_transformationMatrix,_transformationMatrixRefresh,userData,_pixelRatio,_eventStreams",
      get$text: function(_) {
        return this._text$_text;
      },
      get$mouseCursor: function() {
        return this._text$_type === "input" ? "text" : this.mouseCursor;
      },
      set$text: function(_, value) {
        this._text$_text = value;
        this._caretIndex = value.length;
        this._text$_refreshPending |= 3;
      },
      get$x: function(_) {
        this._text$_refreshTextLineMetrics$0();
        return A.DisplayObject.prototype.get$x.call(this, this);
      },
      get$width: function(_) {
        this._text$_refreshTextLineMetrics$0();
        return this._text$_width;
      },
      get$height: function(_) {
        this._text$_refreshTextLineMetrics$0();
        return this._text$_height;
      },
      get$transformationMatrix: function() {
        this._text$_refreshTextLineMetrics$0();
        return A.DisplayObject.prototype.get$transformationMatrix.call(this);
      },
      get$bounds: function() {
        this._text$_refreshTextLineMetrics$0();
        var t1 = this._text$_width;
        this._text$_refreshTextLineMetrics$0();
        return new U.Rectangle0(0, 0, t1, this._text$_height, [P.num]);
      },
      hitTestInput$2: function(localX, localY) {
        var t1;
        if (!(localX < 0)) {
          this._text$_refreshTextLineMetrics$0();
          t1 = localX >= this._text$_width;
        } else
          t1 = true;
        if (t1)
          return;
        if (!(localY < 0)) {
          this._text$_refreshTextLineMetrics$0();
          t1 = localY >= this._text$_height;
        } else
          t1 = true;
        if (t1)
          return;
        return this;
      },
      render$1: function(renderState) {
        var t1;
        this._text$_refreshTextLineMetrics$0();
        t1 = renderState._engine$_renderContext;
        !(t1 instanceof L.RenderContextWebGL);
        this._text$_refreshCache$1(renderState._currentContextState.matrix);
        t1.renderTextureQuad$2(renderState, this._text$_renderTextureQuad);
        this._caretTime = this._caretTime + renderState.deltaTime;
        if (this._text$_type === "input")
          this.get$stage() != null;
      },
      renderFiltered$1: function(renderState) {
        var t1;
        if (this._text$_type === "input")
          this.super$DisplayObject$renderFiltered(renderState);
        t1 = renderState._engine$_renderContext;
        !(t1 instanceof L.RenderContextWebGL);
        this._text$_refreshTextLineMetrics$0();
        this._text$_refreshCache$1(renderState._currentContextState.matrix);
        t1.renderTextureQuadFiltered$3(renderState, this._text$_renderTextureQuad, this._filters);
      },
      _text$_refreshTextLineMetrics$0: function() {
        var t1, textFormat, textFormatSize, textFormatStrokeWidth, textFormatLeftMargin, textFormatRightMargin, textFormatTopMargin, textFormatBottomMargin, textFormatIndent, textFormatLeading, textFormatAlign, fontStyle, fontStyleMetrics, fontStyleMetricsAscent, fontStyleMetricsDescent, canvasContext, paragraphLines, paragraphSplit, paragraphs, startIndex, p, paragraph, t2, t3, line, textLineMetrics, indent, offsetX, offsetY, width, autoWidth, autoHeight, availableWidth, text, t4, shiftX, t5, shiftY;
        t1 = this._text$_refreshPending;
        if ((t1 & 1) === 0)
          return;
        else
          this._text$_refreshPending = t1 & 254;
        t1 = this._text$_textLineMetrics;
        C.JSArray_methods.set$length(t1, 0);
        textFormat = this._defaultTextFormat;
        textFormatSize = V.ensureNum(textFormat.size);
        textFormatStrokeWidth = V.ensureNum(textFormat.strokeWidth);
        textFormatLeftMargin = V.ensureNum(textFormat.leftMargin);
        textFormatRightMargin = V.ensureNum(textFormat.rightMargin);
        textFormatTopMargin = V.ensureNum(textFormat.topMargin);
        textFormatBottomMargin = V.ensureNum(textFormat.bottomMargin);
        textFormatIndent = V.ensureNum(textFormat.indent);
        textFormatLeading = V.ensureNum(textFormat.leading);
        textFormatAlign = V.ensureString(textFormat.align);
        fontStyle = textFormat.get$_text$_cssFontStyle();
        fontStyleMetrics = Y._getFontStyleMetrics(textFormat);
        fontStyleMetricsAscent = V.ensureNum(fontStyleMetrics.ascent);
        fontStyleMetricsDescent = V.ensureNum(fontStyleMetrics.descent);
        canvasContext = $.$get$_dummyCanvasContext0();
        paragraphLines = H.setRuntimeTypeInfo([], [P.$int]);
        paragraphSplit = P.RegExp_RegExp("\\r\\n|\\r|\\n", true, false);
        paragraphs = C.JSString_methods.split$1(this._text$_text, paragraphSplit);
        canvasContext.font = fontStyle + " ";
        canvasContext.textAlign = "start";
        canvasContext.textBaseline = "alphabetic";
        canvasContext.setTransform(1, 0, 0, 1, 0, 0);
        for (startIndex = 0, p = 0; p < paragraphs.length; ++p) {
          paragraph = paragraphs[p];
          if (typeof paragraph !== "string")
            continue;
          paragraphLines.push(t1.length);
          paragraph = this._passwordEncoder$1(paragraph);
          t1.push(new Y.TextLineMetrics(paragraph, startIndex, 0, 0, 0, 0, 0, 0, 0, 0));
          startIndex += paragraph.length + 1;
        }
        this._text$_textWidth = 0;
        this._text$_textHeight = 0;
        for (t2 = textFormatTopMargin + textFormatSize, t3 = textFormatLeading + textFormatSize + fontStyleMetricsDescent, line = 0; line < t1.length; ++line) {
          textLineMetrics = t1[line];
          if (!(textLineMetrics instanceof Y.TextLineMetrics))
            continue;
          indent = C.JSArray_methods.contains$1(paragraphLines, line) ? textFormatIndent : 0;
          offsetX = textFormatLeftMargin + indent;
          offsetY = t2 + line * t3;
          width = canvasContext.measureText(textLineMetrics._text$_text).width;
          width.toString;
          textLineMetrics._text$_x = offsetX;
          textLineMetrics._text$_y = offsetY;
          textLineMetrics._text$_width = width;
          textLineMetrics._text$_height = textFormatSize;
          textLineMetrics._text$_ascent = fontStyleMetricsAscent;
          textLineMetrics._text$_descent = fontStyleMetricsDescent;
          textLineMetrics._text$_leading = textFormatLeading;
          textLineMetrics._text$_indent = indent;
          this._text$_textWidth = P.max(this._text$_textWidth, offsetX + width + textFormatRightMargin);
          this._text$_textHeight = offsetY + fontStyleMetricsDescent + textFormatBottomMargin;
        }
        t2 = textFormatStrokeWidth * 2;
        t3 = this._text$_textWidth + t2;
        this._text$_textWidth = t3;
        this._text$_textHeight += t2;
        autoWidth = C.JSNumber_methods.ceil$0(t3);
        autoHeight = C.JSNumber_methods.ceil$0(this._text$_textHeight);
        t2 = this._text$_width;
        if (t2 !== autoWidth || this._text$_height !== autoHeight)
          switch (this._text$_autoSize) {
            case "left":
              this._text$_width = autoWidth;
              this._text$_height = autoHeight;
              t2 = autoWidth;
              break;
            case "right":
              this.super$DisplayObject$x(0, A.DisplayObject.prototype.get$x.call(this, this) - (autoWidth - this._text$_width));
              this._text$_width = autoWidth;
              this._text$_height = autoHeight;
              t2 = autoWidth;
              break;
            case "center":
              this.super$DisplayObject$x(0, A.DisplayObject.prototype.get$x.call(this, this) - (autoWidth - this._text$_width) / 2);
              this._text$_width = autoWidth;
              this._text$_height = autoHeight;
              t2 = autoWidth;
              break;
          }
        availableWidth = t2 - textFormatLeftMargin - textFormatRightMargin;
        for (line = 0; t2 = t1.length, line < t2; ++line) {
          textLineMetrics = t1[line];
          if (!(textLineMetrics instanceof Y.TextLineMetrics))
            continue;
          switch (textFormatAlign) {
            case "center":
            case "justify":
              textLineMetrics._text$_x = textLineMetrics._text$_x + (availableWidth - textLineMetrics._text$_width) / 2;
              break;
            case "right":
            case "end":
              textLineMetrics._text$_x = textLineMetrics._text$_x + (availableWidth - textLineMetrics._text$_width);
              break;
            default:
              textLineMetrics._text$_x += textFormatStrokeWidth;
          }
          textLineMetrics._text$_y += textFormatStrokeWidth;
        }
        if (this._text$_type === "input") {
          for (line = t2 - 1, t2 = this._caretIndex; line >= 0; --line) {
            textLineMetrics = t1[line];
            if (!(textLineMetrics instanceof Y.TextLineMetrics))
              continue;
            t3 = textLineMetrics._text$_textIndex;
            if (t2 >= t3) {
              text = C.JSString_methods.substring$2(textLineMetrics._text$_text, 0, t2 - t3);
              this._caretLine = line;
              t3 = textLineMetrics._text$_x;
              t4 = canvasContext.measureText(text).width;
              t4.toString;
              this._caretX = t3 + t4;
              this._caretY = textLineMetrics._text$_y - fontStyleMetricsAscent * 0.9;
              this._caretWidth = 2;
              this._caretHeight = textFormatSize;
              break;
            }
          }
          for (t2 = this._caretX, t3 = this._text$_width, t4 = t3 * 0.2, shiftX = 0; shiftX + t2 > t3;)
            shiftX -= t4;
          for (; shiftX + t2 < 0;)
            shiftX += t4;
          for (t3 = this._caretY, t4 = this._caretHeight, t5 = this._text$_height, shiftY = 0; shiftY + t3 + t4 > t5;)
            shiftY -= textFormatSize;
          for (; shiftY + t3 < 0;)
            shiftY += textFormatSize;
          this._caretX = t2 + shiftX;
          this._caretY += shiftY;
          for (line = 0; line < t1.length; ++line) {
            textLineMetrics = t1[line];
            if (!(textLineMetrics instanceof Y.TextLineMetrics))
              continue;
            textLineMetrics._text$_x += shiftX;
            textLineMetrics._text$_y += shiftY;
          }
        }
      },
      _text$_refreshCache$1: function(globalMatrix) {
        var t1, width, height, t2, matrix, context;
        t1 = this._text$_refreshPending;
        if ((t1 & 2) === 0)
          return;
        else
          this._text$_refreshPending = t1 & 253;
        t1 = globalMatrix._data;
        t1 = Math.sqrt(Math.abs(t1[0] * t1[3] - t1[1] * t1[2]));
        width = C.JSNumber_methods.ceil$0(P.max(1, this._text$_width * t1));
        height = C.JSNumber_methods.ceil$0(P.max(1, this._text$_height * t1));
        t2 = this._text$_renderTexture;
        if (t2 == null) {
          t2 = L.RenderTexture$(width, height, 16777215);
          this._text$_renderTexture = t2;
          t2 = t2.get$quad();
          t1 = L.RenderTextureQuad$(t2.renderTexture, t2.sourceRectangle, t2.offsetRectangle, t2.rotation, t1);
          this._text$_renderTextureQuad = t1;
        } else {
          t2.resize$2(0, width, height);
          t2 = this._text$_renderTexture.get$quad();
          t1 = L.RenderTextureQuad$(t2.renderTexture, t2.sourceRectangle, t2.offsetRectangle, t2.rotation, t1);
          this._text$_renderTextureQuad = t1;
        }
        matrix = t1.get$drawMatrix();
        t1 = this._text$_renderTexture;
        t1 = t1.get$canvas(t1);
        t1.toString;
        context = t1.getContext("2d");
        t1 = matrix._data;
        context.setTransform(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
        context.clearRect(0, 0, this._text$_width, this._text$_height);
        this._text$_renderText$1(context);
        this._text$_renderTexture.update$0();
      },
      _text$_renderText$1: function(context) {
        var textFormat, lineWidth, t1, i, lm, t2, t3, t4;
        textFormat = this._defaultTextFormat;
        lineWidth = C.JSDouble_methods.ceil$0(textFormat.bold ? textFormat.size / 10 : textFormat.size / 20);
        context.save();
        context.beginPath();
        context.rect(0, 0, this._text$_width, this._text$_height);
        context.clip();
        context.font = textFormat.get$_text$_cssFontStyle() + " ";
        context.textAlign = "start";
        context.textBaseline = "alphabetic";
        context.lineCap = "round";
        context.lineJoin = "round";
        t1 = textFormat.strokeWidth;
        if (t1 > 0) {
          context.lineWidth = t1 * 2;
          context.strokeStyle = V.color2rgb(textFormat.strokeColor);
          for (t1 = this._text$_textLineMetrics, i = 0; i < t1.length; ++i) {
            lm = t1[i];
            t2 = J.getInterceptor$x(lm);
            context.strokeText(lm.get$_text$_text(), t2.get$x(lm), t2.get$y(lm));
          }
        }
        context.lineWidth = lineWidth;
        context.strokeStyle = V.color2rgb(textFormat.color);
        context.fillStyle = V.color2rgb(textFormat.color);
        for (t1 = this._text$_textLineMetrics, i = 0; i < t1.length; ++i) {
          lm = t1[i];
          t2 = lm.get$_text$_text();
          t3 = J.getInterceptor$x(lm);
          t4 = t3.get$x(lm);
          t3 = t3.get$y(lm);
          context.fillText(t2, t4, t3);
        }
        context.restore();
      },
      _passwordEncoder$1: function(text) {
        return text;
      },
      _onKeyDown$1: [function(keyboardEvent) {
        var text, textLength, textLineMetrics, caretIndex, caretLine, caretIndexNew, tlm, tlmFrom, tlmTo, lineIndex;
        if (this._text$_type === "input") {
          this._text$_refreshTextLineMetrics$0();
          text = this._text$_text;
          textLength = text.length;
          textLineMetrics = this._text$_textLineMetrics;
          caretIndex = this._caretIndex;
          caretLine = this._caretLine;
          switch (keyboardEvent.keyCode) {
            case 8:
              keyboardEvent._isDefaultPrevented = true;
              if (caretIndex > 0) {
                caretIndexNew = caretIndex - 1;
                this._text$_text = C.JSString_methods.substring$2(text, 0, caretIndexNew) + C.JSString_methods.substring$1(text, caretIndex);
              } else
                caretIndexNew = -1;
              break;
            case 35:
              keyboardEvent._isDefaultPrevented = true;
              tlm = textLineMetrics[caretLine];
              caretIndexNew = tlm.get$_text$_textIndex() + tlm.get$_text$_text().length;
              break;
            case 36:
              keyboardEvent._isDefaultPrevented = true;
              caretIndexNew = textLineMetrics[caretLine].get$_text$_textIndex();
              break;
            case 37:
              keyboardEvent._isDefaultPrevented = true;
              caretIndexNew = caretIndex > 0 ? caretIndex - 1 : -1;
              break;
            case 38:
              keyboardEvent._isDefaultPrevented = true;
              if (caretLine > 0 && caretLine < textLineMetrics.length) {
                tlmFrom = textLineMetrics[caretLine];
                tlmTo = textLineMetrics[caretLine - 1];
                lineIndex = P.min(caretIndex - tlmFrom.get$_text$_textIndex(), tlmTo.get$_text$_text().length);
                caretIndexNew = tlmTo.get$_text$_textIndex() + lineIndex;
              } else
                caretIndexNew = 0;
              break;
            case 39:
              keyboardEvent._isDefaultPrevented = true;
              caretIndexNew = caretIndex < textLength ? caretIndex + 1 : -1;
              break;
            case 40:
              keyboardEvent._isDefaultPrevented = true;
              if (caretLine >= 0 && caretLine < textLineMetrics.length - 1) {
                tlmFrom = textLineMetrics[caretLine];
                tlmTo = textLineMetrics[caretLine + 1];
                lineIndex = P.min(caretIndex - tlmFrom.get$_text$_textIndex(), tlmTo.get$_text$_text().length);
                caretIndexNew = tlmTo.get$_text$_textIndex() + lineIndex;
              } else
                caretIndexNew = textLength;
              break;
            case 46:
              keyboardEvent._isDefaultPrevented = true;
              if (caretIndex < textLength) {
                this._text$_text = C.JSString_methods.substring$2(text, 0, caretIndex) + C.JSString_methods.substring$1(text, caretIndex + 1);
                caretIndexNew = caretIndex;
              } else
                caretIndexNew = -1;
              break;
            default:
              caretIndexNew = -1;
          }
          if (caretIndexNew !== -1) {
            this._caretIndex = caretIndexNew;
            this._caretTime = 0;
            this._text$_refreshPending |= 3;
          }
        }
      }, "call$1", "get$_onKeyDown", 2, 0, 71],
      _onTextInput$1: [function(textEvent) {
        var t1, caretIndex, newText, t2;
        if (this._text$_type === "input") {
          textEvent._isDefaultPrevented = true;
          t1 = this._text$_text;
          caretIndex = this._caretIndex;
          newText = textEvent.text;
          if (newText === "\r")
            newText = "\n";
          if (newText === "\n" && true)
            newText = "";
          if (newText === "")
            return;
          t2 = this._maxChars;
          if (t2 !== 0 && t1.length >= t2)
            return;
          this._text$_text = C.JSString_methods.substring$2(t1, 0, caretIndex) + newText + C.JSString_methods.substring$1(t1, caretIndex);
          this._caretIndex = caretIndex + newText.length;
          this._caretTime = 0;
          this._text$_refreshPending |= 3;
        }
      }, "call$1", "get$_onTextInput", 2, 0, 61],
      _text$_onMouseDown$1: [function(mouseEvent) {
        var mouseX, mouseY, canvasContext, t1, line, textLineMetrics, text, lineX, t2, t3, t4, bestDistance, bestIndex, c, width, distance;
        mouseX = mouseEvent.localX;
        mouseX.toString;
        mouseY = mouseEvent.localY;
        mouseY.toString;
        canvasContext = $.$get$_dummyCanvasContext0();
        canvasContext.setTransform(1, 0, 0, 1, 0, 0);
        for (t1 = this._text$_textLineMetrics, line = 0; line < t1.length; ++line) {
          textLineMetrics = t1[line];
          if (!(textLineMetrics instanceof Y.TextLineMetrics))
            continue;
          text = textLineMetrics._text$_text;
          lineX = textLineMetrics._text$_x;
          t2 = textLineMetrics._text$_y;
          t3 = textLineMetrics._text$_ascent;
          t4 = textLineMetrics._text$_descent;
          if (t2 - t3 <= mouseY && t2 + t4 >= mouseY) {
            for (t2 = text.length, bestDistance = 1 / 0, bestIndex = 0, c = 0; c <= t2; ++c) {
              width = canvasContext.measureText(C.JSString_methods.substring$2(text, 0, c)).width;
              width.toString;
              distance = Math.abs(lineX + width - mouseX);
              if (distance < bestDistance) {
                bestIndex = c;
                bestDistance = distance;
              }
            }
            this._caretIndex = textLineMetrics._text$_textIndex + bestIndex;
            this._caretTime = 0;
            this._text$_refreshPending |= 3;
          }
        }
      }, "call$1", "get$_text$_onMouseDown", 2, 0, 24]
    },
    TextFormat: {
      "^": "Object;font,size,color,strokeWidth,strokeColor,fillGradient,weight,bold,italic,underline,align<,topMargin<,bottomMargin<,leftMargin,rightMargin,indent,leading<",
      clone$0: function(_) {
        return new Y.TextFormat(this.font, this.size, this.color, this.strokeWidth, this.strokeColor, this.fillGradient, this.weight, this.bold, false, false, this.align, this.topMargin, this.bottomMargin, this.leftMargin, this.rightMargin, this.indent, this.leading);
      },
      get$_text$_cssFontStyle: function() {
        var fontStyle = "" + this.weight + " " + this.size + "px " + this.font;
        if (this.bold)
          fontStyle = "bold " + this.size + "px " + this.font;
        return fontStyle;
      }
    },
    TextLineMetrics: {
      "^": "Object;_text$_text<,_text$_textIndex<,_text$_x,_text$_y,_text$_width,_text$_height,_text$_ascent,_text$_descent,_text$_leading,_text$_indent",
      get$x: function(_) {
        return this._text$_x;
      },
      get$y: function(_) {
        return this._text$_y;
      },
      get$width: function(_) {
        return this._text$_width;
      },
      get$height: function(_) {
        return this._text$_height;
      },
      get$leading: function() {
        return this._text$_leading;
      }
    }
  }], ["stagexl.ui.mouse", "package:stagexl/src/ui/mouse.dart",, Q, {
    "^": "",
    MouseCursorData: {
      "^": "Object;url>,hotSpot<"
    }
  }], ["stagexl_richtextfield", "package:stagexl_richtextfield/stagexl_richtextfield.dart",, A, {
    "^": "",
    _color2rgb: function(color) {
      var t1, t2;
      if (typeof color === "string")
        return color;
      if (typeof color === "number" && Math.floor(color) === color) {
        t1 = C.JSInt_methods._shrOtherPositive$1(color, 16);
        t2 = C.JSInt_methods._shrOtherPositive$1(color, 8);
        return "rgb(" + (t1 & 255) + "," + (t2 & 255) + "," + (color & 255) + ")";
      }
      return "rgb(0,0,0)";
    },
    _ensureNum: function(value) {
      if (typeof value === "number")
        return value;
      else
        throw H.wrapException(P.ArgumentError$("The supplied value (" + H.S(value) + ") is not a number."));
    },
    _ensureString: function(value) {
      if (typeof value === "string")
        return value;
      else
        throw H.wrapException(P.ArgumentError$("The supplied value (" + H.S(value) + ") is not a string."));
    },
    _RichFontStyleMetrics: {
      "^": "Object;fontStyle,ascent,descent,height>",
      _RichFontStyleMetrics$1: function(fontStyle) {
        var text, block, div, t1, t2, exception;
        this.fontStyle = fontStyle;
        text = W._ElementFactoryProvider_createElement_tag("span", null);
        t1 = J.get$style$x(text);
        t2 = this.fontStyle;
        t1.font = t2;
        J.set$text$x(text, "Hg");
        block = W._ElementFactoryProvider_createElement_tag("div", null);
        t1 = J.get$style$x(block);
        t1.display = "inline-block";
        t1 = J.get$style$x(block);
        t1.width = "1px";
        t1 = J.get$style$x(block);
        t1.height = "0px";
        div = W._ElementFactoryProvider_createElement_tag("div", null);
        J.append$1$x(div, block);
        J.append$1$x(div, text);
        document.body.appendChild(div);
        try {
          t1 = J.get$style$x(block);
          t1.verticalAlign = "baseline";
          this.ascent = C.JSNumber_methods.round$0(block.offsetTop) - C.JSNumber_methods.round$0(text.offsetTop);
          t1 = J.get$style$x(block);
          t1.verticalAlign = "bottom";
          t1 = C.JSNumber_methods.round$0(block.offsetTop) - C.JSNumber_methods.round$0(text.offsetTop);
          this.height = t1;
          this.descent = t1 - this.ascent;
        } catch (exception) {
          H.unwrapException(exception);
        } finally {
          J.remove$0$ax(div);
        }
      },
      static: {
        _RichFontStyleMetrics$: function(fontStyle) {
          var t1 = new A._RichFontStyleMetrics(null, 0, 0, 0);
          t1._RichFontStyleMetrics$1(fontStyle);
          return t1;
        }
      }
    },
    RichTextField: {
      "^": "InteractiveObject;",
      setFormat$3: function(setFormat, startIndex, endIndex) {
        var add, numFormats, i, t1, cur, t2, t3, t4, t5, t6, f1, f2;
        add = setFormat.clone$0(0);
        if (startIndex === 0 && endIndex === -1) {
          this._textFormats = [add];
          return;
        }
        add.startIndex = startIndex;
        add.endIndex = endIndex;
        numFormats = this._textFormats.length;
        for (i = 0; i < numFormats; ++i) {
          t1 = this._textFormats;
          cur = t1[i];
          t2 = add.startIndex;
          t3 = cur.startIndex;
          t4 = t2 <= t3;
          if (t4) {
            t5 = add.endIndex;
            if (t5 >= t3) {
              t6 = cur.endIndex;
              if (!(t5 < t6 && t6 !== -1))
                t5 = t5 !== -1 && t6 === -1;
              else
                t5 = true;
            } else
              t5 = false;
          } else
            t5 = false;
          if (t5) {
            cur.startIndex = add.endIndex + 1;
            t1.push(add);
          } else {
            t3 = t2 > t3;
            if (t3) {
              t5 = cur.endIndex;
              if (t2 <= t5 || t5 === -1) {
                t6 = add.endIndex;
                if (!(t6 >= t5 && t5 !== -1))
                  t5 = t6 === -1 && t5 === -1;
                else
                  t5 = true;
              } else
                t5 = false;
            } else
              t5 = false;
            if (t5) {
              cur.endIndex = t2 - 1;
              t1.push(add);
            } else {
              if (t3) {
                t2 = add.endIndex;
                t3 = cur.endIndex;
                if (!(t2 < t3 && t2 !== -1))
                  t2 = t2 !== -1 && t3 === -1;
                else
                  t2 = true;
              } else
                t2 = false;
              if (t2) {
                f1 = cur.clone$0(0);
                f2 = f1.clone$0(0);
                f1.startIndex = cur.startIndex;
                f1.endIndex = add.startIndex - 1;
                f2.startIndex = add.endIndex + 1;
                f2.endIndex = cur.endIndex;
                C.JSArray_methods.removeAt$1(this._textFormats, i);
                this._textFormats.push(f1);
                this._textFormats.push(f2);
                this._textFormats.push(add);
              } else {
                if (t4) {
                  t2 = add.endIndex;
                  t3 = cur.endIndex;
                  t2 = t2 >= t3 && t3 !== -1 || t2 === -1;
                } else
                  t2 = false;
                if (t2) {
                  C.JSArray_methods.removeAt$1(t1, i);
                  this._textFormats.push(add);
                }
              }
            }
          }
        }
        C.JSArray_methods.sort$1(this._textFormats, new A.RichTextField_setFormat_closure());
        this._refreshPending |= 2;
        return;
      },
      defaultParser$1: [function(rawtext) {
        var t1, formatRanges;
        t1 = {};
        t1.pos = 0;
        t1.action = null;
        t1.newtext = "";
        t1.arg = null;
        formatRanges = [];
        C.JSArray_methods.forEach$1(rawtext.split("{"), new A.RichTextField_defaultParser_closure(t1, formatRanges));
        this._stagexl_richtextfield$_text = t1.newtext;
        t1.base = null;
        C.JSArray_methods.forEach$1(formatRanges, new A.RichTextField_defaultParser_closure0(t1, this));
      }, "call$1", "get$defaultParser", 2, 0, 4],
      _applyTextTagArg$2: function(arg, base) {
        var t1, result;
        t1 = J.getInterceptor$s(arg).substring$2(arg, 0, 1);
        if (C.JSString_methods.contains$1("+-*/", t1)) {
          result = C.JSString_methods.contains$1(arg, "x") ? H.Primitives_parseInt(C.JSString_methods.substring$1(arg, 1), null, null) : H.Primitives_parseDouble(C.JSString_methods.substring$1(arg, 1), null);
          switch (t1) {
            case "+":
              result = J.$add$ns(base, result);
              break;
            case "-":
              result = J.$sub$n(base, result);
              break;
            case "*":
              result = J.$mul$ns(base, result);
              break;
            case "/":
              result = J.$div$n(base, result);
              break;
          }
        } else
          result = C.JSString_methods.contains$1(arg, "x") ? H.Primitives_parseInt(arg, null, null) : H.Primitives_parseDouble(arg, null);
        return result;
      },
      get$text: function(_) {
        return this._stagexl_richtextfield$_text;
      },
      set$text: function(_, value) {
        var t1 = H.stringReplaceAllUnchecked(value, "\r\n", "\n");
        t1.toString;
        t1 = H.stringReplaceAllUnchecked(t1, "\r", "\n");
        this._stagexl_richtextfield$_text = t1;
        this._rawText = t1;
        if (this._parse && value !== "") {
          t1 = this._textFormats;
          C.JSArray_methods.removeRange$2(t1, 1, t1.length);
          this._textFormats[0].set$endIndex(-1);
          t1 = this._stagexl_richtextfield$_text;
          this.parser.call$1(t1);
        }
        this._refreshPending |= 3;
      },
      get$x: function(_) {
        this._refreshTextLineMetrics$0();
        return A.DisplayObject.prototype.get$x.call(this, this);
      },
      get$width: function(_) {
        this._refreshTextLineMetrics$0();
        return this._stagexl_richtextfield$_width;
      },
      get$height: function(_) {
        this._refreshTextLineMetrics$0();
        return this._stagexl_richtextfield$_height;
      },
      getFormatAt$1: function(index) {
        return C.JSArray_methods.firstWhere$2$orElse(this._textFormats, new A.RichTextField_getFormatAt_closure(index), new A.RichTextField_getFormatAt_closure0(this));
      },
      get$bounds: function() {
        this._refreshTextLineMetrics$0();
        var t1 = this._stagexl_richtextfield$_width;
        this._refreshTextLineMetrics$0();
        return new U.Rectangle0(0, 0, t1, this._stagexl_richtextfield$_height, [P.num]);
      },
      hitTestInput$2: function(localX, localY) {
        var t1;
        if (!(localX < 0)) {
          this._refreshTextLineMetrics$0();
          t1 = localX >= this._stagexl_richtextfield$_width;
        } else
          t1 = true;
        if (t1)
          return;
        if (!(localY < 0)) {
          this._refreshTextLineMetrics$0();
          t1 = localY >= this._stagexl_richtextfield$_height;
        } else
          t1 = true;
        if (t1)
          return;
        return this;
      },
      render$1: function(renderState) {
        var t1, t2, t3, t4;
        this._refreshTextLineMetrics$0();
        t1 = renderState._engine$_renderContext;
        t2 = J.getInterceptor(t1);
        t3 = !!t2.$isRenderContextWebGL || this._cacheAsBitmap;
        t4 = renderState._currentContextState;
        if (t3) {
          this._refreshCache$1(t4.matrix);
          t1.renderTextureQuad$2(renderState, this.get$_renderTextureQuad());
        } else {
          t2.setTransform$1(t1, t4.matrix);
          t2 = renderState._currentContextState.alpha;
          t1._activeAlpha = t2;
          t1 = t1._renderingContext;
          t1.globalAlpha = t2;
          this._renderText$1(t1);
        }
      },
      renderFiltered$1: function(renderState) {
        var t1 = renderState._engine$_renderContext;
        if (t1 instanceof L.RenderContextWebGL || this._cacheAsBitmap) {
          this._refreshTextLineMetrics$0();
          this._refreshCache$1(renderState._currentContextState.matrix);
          t1.renderTextureQuadFiltered$3(renderState, this.get$_renderTextureQuad(), this._filters);
        } else
          this.super$DisplayObject$renderFiltered(renderState);
      },
      _getLineWidth$2: function(line, startIndex) {
        var rtfEndIndex, canvasContext, t1, t2, lineWidth, rtf, t3, rtfEndIndex0;
        rtfEndIndex = line.length;
        canvasContext = $.$get$_dummyCanvasContext();
        canvasContext.textAlign = "start";
        canvasContext.textBaseline = "alphabetic";
        canvasContext.setTransform(1, 0, 0, 1, 0, 0);
        for (t1 = this._textFormats, t2 = C.JSArray_methods.get$iterator(t1), t1 = new H.WhereIterator(t2, new A.RichTextField__getLineWidth_closure(startIndex, startIndex + rtfEndIndex), [H.getTypeArgumentByIndex(t1, 0)]), lineWidth = 0; t1.moveNext$0();) {
          rtf = t2.get$current();
          canvasContext.font = rtf.get$_cssFontStyle();
          t3 = rtf.endIndex;
          rtfEndIndex0 = t3 === -1 ? rtfEndIndex : t3 - startIndex + 1;
          lineWidth += canvasContext.measureText(C.JSString_methods.substring$2(line, P.max(rtf.startIndex - startIndex, 0), P.min(rtfEndIndex0, rtfEndIndex))).width;
        }
        return lineWidth;
      },
      _refreshTextLineMetrics$0: function() {
        var t1, firstFormat, strokeWidth, textFormatIndent, textFormatLeftMargin, textFormatRightMargin, availableWidth, paragraphLines, canvasContext, t2, t3, startIndex, checkLine, validLine, lineWidth, lineIndent, _i, paragraph, t4, t5, _i0, word, t6, checkLine0, t7, nofit, fit, cut, lineHeights, nextHeight, line, textLineMetrics, lineIndex, lineFormat, textFormatSize, textFormatTopMargin, textFormatBottomMargin, textFormatLeading, textFormatAlign, fontStyle, fontStyleMetricsAscent, fontStyleMetricsDescent, indent, offsetX, lineHeights0, width, offsetX0, offsetY, autoWidth, autoHeight;
        t1 = this._refreshPending;
        if ((t1 & 1) === 0)
          return;
        else
          this._refreshPending = t1 & 254;
        t1 = this._textLineMetrics;
        C.JSArray_methods.set$length(t1, 0);
        firstFormat = this._textFormats[0];
        strokeWidth = A._ensureNum(firstFormat.strokeWidth);
        textFormatIndent = A._ensureNum(firstFormat.indent);
        textFormatLeftMargin = A._ensureNum(firstFormat.leftMargin);
        textFormatRightMargin = A._ensureNum(firstFormat.rightMargin);
        availableWidth = this._stagexl_richtextfield$_width - textFormatLeftMargin - textFormatRightMargin;
        paragraphLines = H.setRuntimeTypeInfo([], [P.$int]);
        canvasContext = $.$get$_dummyCanvasContext();
        canvasContext.textAlign = "start";
        canvasContext.textBaseline = "alphabetic";
        canvasContext.setTransform(1, 0, 0, 1, 0, 0);
        for (t2 = this._stagexl_richtextfield$_text.split("\n"), t3 = t2.length, startIndex = 0, checkLine = "", validLine = "", lineWidth = 0, lineIndent = 0, _i = 0; _i < t2.length; t2.length === t3 || (0, H.throwConcurrentModificationError)(t2), ++_i) {
          paragraph = t2[_i];
          paragraphLines.push(t1.length);
          if (!this._wordWrap) {
            t1.push(new A.RichTextLineMetrics(paragraph, startIndex, 0, 0, 0, 0, 0, 0, 0, 0));
            startIndex += paragraph.length + 1;
          } else {
            for (t4 = J.split$1$s(paragraph, " "), t5 = t4.length, lineIndent = textFormatIndent, checkLine = null, _i0 = 0; _i0 < t4.length; t4.length === t5 || (0, H.throwConcurrentModificationError)(t4), ++_i0, validLine = checkLine, checkLine = checkLine0) {
              word = t4[_i0];
              t6 = checkLine == null;
              checkLine0 = t6 ? word : H.S(checkLine) + " " + H.S(word);
              lineWidth = this._getLineWidth$2(checkLine0, startIndex);
              for (; lineIndent + lineWidth > availableWidth; checkLine0 = word, lineIndent = 0) {
                if (t6) {
                  t7 = J.getInterceptor$asx(checkLine0);
                  nofit = t7.get$length(checkLine0);
                  for (fit = 1; fit < J.$sub$n(nofit, 1);) {
                    cut = C.JSNumber_methods._tdivFast$1(fit + nofit, 2);
                    lineWidth = this._getLineWidth$2(t7.substring$2(checkLine0, 0, cut), startIndex);
                    if (lineIndent + lineWidth > availableWidth)
                      nofit = cut;
                    else
                      fit = cut;
                  }
                  if (fit < t7.get$length(checkLine0)) {
                    t1.push(new A.RichTextLineMetrics(t7.substring$2(checkLine0, 0, fit), startIndex, 0, 0, 0, 0, 0, 0, 0, 0));
                    startIndex += fit;
                    word = t7.substring$1(checkLine0, fit);
                    lineWidth = this._getLineWidth$2(word, startIndex);
                    continue;
                  }
                  t1.push(new A.RichTextLineMetrics(checkLine0, startIndex, 0, 0, 0, 0, 0, 0, 0, 0));
                  startIndex += checkLine0.length + 1;
                  checkLine0 = null;
                } else {
                  t1.push(new A.RichTextLineMetrics(checkLine, startIndex, 0, 0, 0, 0, 0, 0, 0, 0));
                  startIndex += checkLine.length + 1;
                  checkLine0 = word;
                }
                lineIndent = 0;
                break;
              }
            }
            if (checkLine != null) {
              t1.push(new A.RichTextLineMetrics(checkLine, startIndex, 0, 0, 0, 0, 0, 0, 0, 0));
              startIndex += checkLine.length + 1;
            }
          }
        }
        this._textWidth = 0;
        this._textHeight = 0;
        for (lineHeights = 0, nextHeight = 0, line = 0; line < t1.length; ++line) {
          textLineMetrics = t1[line];
          lineIndex = textLineMetrics._textIndex;
          t2 = textLineMetrics._stagexl_richtextfield$_text.length;
          lineFormat = C.JSArray_methods.firstWhere$2$orElse(this._textFormats, new A.RichTextField__refreshTextLineMetrics_closure(lineIndex), new A.RichTextField__refreshTextLineMetrics_closure0());
          if (lineFormat == null)
            continue;
          for (t3 = this._textFormats, t4 = C.JSArray_methods.get$iterator(t3), t3 = new H.WhereIterator(t4, new A.RichTextField__refreshTextLineMetrics_closure1(lineIndex, t2 + lineIndex), [H.getTypeArgumentByIndex(t3, 0)]), textFormatSize = 0; t3.moveNext$0();)
            textFormatSize = P.max(A._ensureNum(t4.get$current().size), textFormatSize);
          textFormatTopMargin = A._ensureNum(lineFormat.get$topMargin());
          textFormatBottomMargin = A._ensureNum(lineFormat.get$bottomMargin());
          textFormatLeading = A._ensureNum(lineFormat.get$leading());
          textFormatAlign = A._ensureString(lineFormat.get$align());
          fontStyle = lineFormat.get$_cssFontStyle();
          t2 = $.$get$_fontStyleMetrics();
          if (!t2.containsKey$1(fontStyle))
            t2.$indexSet(0, fontStyle, A._RichFontStyleMetrics$(fontStyle));
          t2 = t2.$index(0, fontStyle);
          fontStyleMetricsAscent = A._ensureNum(t2.ascent);
          fontStyleMetricsDescent = A._ensureNum(t2.descent);
          canvasContext.font = fontStyle;
          indent = C.JSArray_methods.contains$1(paragraphLines, line) ? textFormatIndent : 0;
          offsetX = textFormatLeftMargin + indent;
          lineHeights0 = lineHeights + (textFormatTopMargin + C.JSNumber_methods.round$0(fontStyleMetricsAscent * this.lineSpacing));
          width = this._getLineWidth$2(textLineMetrics._stagexl_richtextfield$_text, lineIndex);
          switch (textFormatAlign) {
            case "center":
            case "justify":
              offsetX0 = offsetX + (availableWidth - width) / 2;
              break;
            case "right":
            case "end":
              offsetX0 = offsetX + (availableWidth - width);
              break;
            default:
              offsetX0 = offsetX + strokeWidth;
          }
          offsetY = textFormatTopMargin + textFormatSize + lineHeights + strokeWidth;
          textLineMetrics._x = offsetX0;
          textLineMetrics._y = offsetY;
          textLineMetrics._stagexl_richtextfield$_width = width;
          textLineMetrics._stagexl_richtextfield$_height = textFormatSize;
          textLineMetrics._ascent = fontStyleMetricsAscent;
          textLineMetrics._descent = fontStyleMetricsDescent;
          textLineMetrics._leading = textFormatLeading;
          textLineMetrics._indent = indent;
          this._textWidth = P.max(this._textWidth, offsetX + width + textFormatRightMargin);
          this._textHeight = nextHeight;
          nextHeight = offsetY + fontStyleMetricsDescent + textFormatBottomMargin;
          if (width > 0)
            this._textHeight = nextHeight;
          lineHeights = lineHeights0;
        }
        t1 = strokeWidth * 2;
        t2 = this._textWidth + t1;
        this._textWidth = t2;
        this._textHeight += t1;
        autoWidth = this._wordWrap ? this._stagexl_richtextfield$_width : C.JSNumber_methods.ceil$0(t2);
        autoHeight = C.JSNumber_methods.ceil$0(this._textHeight);
        if (this._stagexl_richtextfield$_width !== autoWidth || this._stagexl_richtextfield$_height !== autoHeight)
          switch (this._autoSize) {
            case "left":
              this._stagexl_richtextfield$_width = autoWidth;
              this._stagexl_richtextfield$_height = autoHeight;
              break;
            case "right":
              this.super$DisplayObject$x(0, A.DisplayObject.prototype.get$x.call(this, this) - (autoWidth - this._stagexl_richtextfield$_width));
              this._stagexl_richtextfield$_width = autoWidth;
              this._stagexl_richtextfield$_height = autoHeight;
              break;
            case "center":
              this.super$DisplayObject$x(0, A.DisplayObject.prototype.get$x.call(this, this) - (autoWidth - this._stagexl_richtextfield$_width) / 2);
              this._stagexl_richtextfield$_width = autoWidth;
              this._stagexl_richtextfield$_height = autoHeight;
              break;
          }
      },
      _refreshCache$1: function(globalMatrix) {
        var t1, pixelRatio, width, height, matrix, context;
        t1 = this._refreshPending;
        if ((t1 & 2) === 0)
          return;
        else
          this._refreshPending = t1 & 253;
        t1 = globalMatrix._data;
        pixelRatio = this.sqrt$1(Math.abs(t1[0] * t1[3] - t1[1] * t1[2]));
        width = C.JSNumber_methods.ceil$0(P.max(1, this._stagexl_richtextfield$_width));
        height = C.JSNumber_methods.ceil$0(P.max(1, this._stagexl_richtextfield$_height));
        t1 = this._renderTexture;
        if (t1 == null) {
          t1 = L.RenderTexture$(width, height, 16777215);
          this._renderTexture = t1;
          t1 = t1.get$quad();
          this.set$_renderTextureQuad(L.RenderTextureQuad$(t1.renderTexture, t1.sourceRectangle, t1.offsetRectangle, t1.rotation, pixelRatio));
        } else {
          t1.resize$2(0, width, height);
          t1 = this._renderTexture.get$quad();
          this.set$_renderTextureQuad(L.RenderTextureQuad$(t1.renderTexture, t1.sourceRectangle, t1.offsetRectangle, t1.rotation, pixelRatio));
        }
        matrix = this._renderTexture.get$quad().get$drawMatrix();
        t1 = this._renderTexture;
        t1 = t1.get$canvas(t1);
        t1.toString;
        context = t1.getContext("2d");
        t1 = matrix._data;
        context.setTransform(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
        context.clearRect(0, 0, this._stagexl_richtextfield$_width, this._stagexl_richtextfield$_height);
        this._renderText$1(context);
        this._renderTexture.update$0();
      },
      _renderText$1: function(context) {
        var trueHeight, offsetY, t1, i, lm, startIndex, t2, t3, t4, offsetX, rtf, rtfEndIndex, text, _i, lm0, t5, tfWidth, lineWidth, underlineY, strikethroughY, overlineY;
        context.save();
        context.beginPath();
        context.rect(0, 0, this._stagexl_richtextfield$_width, this._stagexl_richtextfield$_height);
        context.clip();
        context.textAlign = "start";
        context.textBaseline = "alphabetic";
        trueHeight = C.JSNumber_methods.ceil$0(this._textHeight);
        switch (this._valign) {
          case "top":
            offsetY = 0;
            break;
          case "middle":
            offsetY = (this._stagexl_richtextfield$_height - trueHeight) / 2;
            break;
          case "bottom":
            offsetY = this._stagexl_richtextfield$_height - trueHeight;
            break;
          default:
            offsetY = 0;
        }
        for (t1 = this._textLineMetrics, i = 0; i < t1.length; ++i) {
          lm = t1[i];
          startIndex = lm._textIndex;
          t2 = lm._stagexl_richtextfield$_text.length;
          for (t3 = this._textFormats, t4 = C.JSArray_methods.get$iterator(t3), t3 = new H.WhereIterator(t4, new A.RichTextField__renderText_closure(startIndex, startIndex + t2), [H.getTypeArgumentByIndex(t3, 0)]), offsetX = 0; t3.moveNext$0();) {
            rtf = t4.get$current();
            t2 = rtf.endIndex;
            rtfEndIndex = t2 === -1 ? lm._stagexl_richtextfield$_text.length : t2 - startIndex + 1;
            text = J.substring$2$s(lm._stagexl_richtextfield$_text, P.max(rtf.startIndex - startIndex, 0), P.min(rtfEndIndex, lm._stagexl_richtextfield$_text.length));
            context.font = rtf.get$_cssFontStyle();
            context.fillStyle = A._color2rgb(rtf.color);
            t2 = rtf.strokeWidth;
            if (t2 > 0) {
              context.lineWidth = t2 * 2;
              context.strokeStyle = A._color2rgb(rtf.strokeColor);
              for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
                lm0 = t1[_i];
                context.strokeText(text, lm0._x, lm0._y + offsetY);
              }
            }
            context.strokeStyle = A._color2rgb(rtf.color);
            t2 = lm._x;
            t5 = lm._y;
            context.fillText(text, t2 + offsetX, t5 + offsetY);
            tfWidth = context.measureText(text).width;
            if (rtf.underline || rtf.strikethrough || rtf.overline) {
              t2 = rtf.bold;
              t5 = rtf.size;
              lineWidth = C.JSDouble_methods.ceil$0(t2 ? t5 / 10 : t5 / 20);
              t5 = lm._y;
              underlineY = C.JSNumber_methods.round$0(t5 + lineWidth);
              if (C.JSInt_methods.$mod(lineWidth, 2) !== 0)
                underlineY += 0.5;
              t2 = rtf.size;
              strikethroughY = C.JSNumber_methods.round$0(t5 - t2 / 4);
              overlineY = C.JSNumber_methods.round$0(t5 - t2 / 1.25);
              context.strokeStyle = A._color2rgb(rtf.color);
              context.lineWidth = lineWidth;
              context.beginPath();
              if (rtf.underline) {
                t2 = underlineY + offsetY;
                context.moveTo(lm._x + offsetX, t2);
                context.lineTo(lm._x + offsetX + tfWidth, t2);
              }
              if (rtf.strikethrough) {
                t2 = strikethroughY + offsetY;
                context.moveTo(lm._x + offsetX, t2);
                context.lineTo(lm._x + offsetX + tfWidth, t2);
              }
              if (rtf.overline) {
                t2 = overlineY + offsetY;
                context.moveTo(lm._x + offsetX, t2);
                context.lineTo(lm._x + offsetX + tfWidth, t2);
              }
              context.stroke();
              context.closePath();
            }
            offsetX += tfWidth;
          }
        }
        context.restore();
      },
      _onMouseDown$1: [function(mouseEvent) {
      }, "call$1", "get$_onMouseDown", 2, 0, 24],
      RichTextField$3: function(text, textFormat, parse) {
        var t1 = new A.RichTextFormat("Arial", 12, 0, 0, 4278190080, null, 0, -1, false, false, false, false, false, "left", 0, 0, 0, 0, 0, 0);
        this._textFormats[0] = t1.clone$0(0);
        t1 = this._refreshPending |= 3;
        this._parse = true;
        this._refreshPending = t1 | 3;
        t1 = this.get$defaultParser();
        this.parser = t1;
        if (text !== "") {
          this._rawText = this._stagexl_richtextfield$_text;
          t1.call$1(text);
        } else
          this.set$text(0, text);
        this.on$1(0, "mouseDown")._subscribe$3(this.get$_onMouseDown(), false, 0);
      }
    },
    RichTextField_setFormat_closure: {
      "^": "Closure:2;",
      call$2: function(a, b) {
        return a.get$startIndex() - b.get$startIndex();
      }
    },
    RichTextField_defaultParser_closure: {
      "^": "Closure:0;_box_0,formatRanges",
      call$1: function(chunk) {
        var actText, t1, newtext, t2, action, actArg;
        actText = J.split$1$s(chunk, "}");
        t1 = this._box_0;
        if (actText.length === 1) {
          newtext = C.JSString_methods.$add(t1.newtext, actText[0]);
          t1.newtext = newtext;
          t2 = newtext;
        } else {
          action = actText[0];
          t1.action = action;
          if (!J.startsWith$1$s(action, "/")) {
            if (C.JSString_methods.contains$1(action, "=")) {
              actArg = action.split("=");
              action = actArg[0];
              t1.action = action;
              t1.arg = actArg[1];
              t2 = action;
            } else
              t2 = action;
            this.formatRanges.push([t2, t1.arg, t1.pos, -1]);
          } else {
            t1.action = C.JSString_methods.substring$1(action, 1);
            J.$indexSet$ax(C.JSArray_methods.lastWhere$1(this.formatRanges, new A.RichTextField_defaultParser__closure()), 3, t1.pos - 1);
          }
          newtext = C.JSString_methods.$add(t1.newtext, actText[1]);
          t1.newtext = newtext;
          t2 = newtext;
        }
        t1.pos = t2.length;
      }
    },
    RichTextField_defaultParser__closure: {
      "^": "Closure:0;",
      call$1: function(e) {
        return J.$eq$(J.$index$asx(e, 3), -1);
      }
    },
    RichTextField_defaultParser_closure0: {
      "^": "Closure:0;_box_0,$this",
      call$1: function(range) {
        var t1, t2, t3, t4;
        t1 = this.$this;
        t2 = J.getInterceptor$asx(range);
        t3 = this._box_0;
        t3.base = t1.getFormatAt$1(t2.$index(range, 2)).clone$0(0);
        switch (t2.$index(range, 0)) {
          case "b":
            t3.base.bold = true;
            break;
          case "u":
            t3.base.underline = true;
            break;
          case "i":
            t3.base.italic = true;
            break;
          case "s":
            t3.base.strikethrough = true;
            break;
          case "o":
            t3.base.overline = true;
            break;
          case "color":
            t3.base.color = J.toInt$0$n(t1._applyTextTagArg$2(t2.$index(range, 1), t3.base.color));
            break;
          case "size":
            t3.base.size = t1._applyTextTagArg$2(t2.$index(range, 1), t3.base.size);
            break;
          case "font":
            t3.base.font = t2.$index(range, 1);
            break;
          default:
            t4 = t1.presets;
            if (t4.containsKey$1(t2.$index(range, 0)))
              t3.base = t4.$index(0, t2.$index(range, 0));
            break;
        }
        t1.setFormat$3(t3.base, t2.$index(range, 2), t2.$index(range, 3));
      }
    },
    RichTextField_getFormatAt_closure: {
      "^": "Closure:0;index",
      call$1: function(f) {
        var t1 = this.index;
        if (!(f.get$startIndex() > t1))
          t1 = f.get$endIndex() < t1 && f.get$endIndex() !== -1;
        else
          t1 = true;
        return !t1;
      }
    },
    RichTextField_getFormatAt_closure0: {
      "^": "Closure:1;$this",
      call$0: function() {
        return this.$this._textFormats[0];
      }
    },
    RichTextField__getLineWidth_closure: {
      "^": "Closure:0;startIndex,endIndex",
      call$1: function(f) {
        var t1;
        if (!(f.get$startIndex() > this.endIndex))
          t1 = f.get$endIndex() < this.startIndex && f.get$endIndex() !== -1;
        else
          t1 = true;
        return !t1;
      }
    },
    RichTextField__refreshTextLineMetrics_closure: {
      "^": "Closure:0;lineIndex",
      call$1: function(f) {
        var t1 = this.lineIndex;
        if (t1 >= f.get$startIndex())
          t1 = t1 <= f.get$endIndex() || f.get$endIndex() === -1;
        else
          t1 = false;
        return t1;
      }
    },
    RichTextField__refreshTextLineMetrics_closure0: {
      "^": "Closure:1;",
      call$0: function() {
        return;
      }
    },
    RichTextField__refreshTextLineMetrics_closure1: {
      "^": "Closure:0;lineIndex,lineEndIndex",
      call$1: function(f) {
        var t1;
        if (!(f.get$startIndex() > this.lineEndIndex))
          t1 = f.get$endIndex() < this.lineIndex && f.get$endIndex() !== -1;
        else
          t1 = true;
        return !t1;
      }
    },
    RichTextField__renderText_closure: {
      "^": "Closure:0;startIndex,endIndex",
      call$1: function(f) {
        var t1;
        if (!(f.get$startIndex() > this.endIndex))
          t1 = f.get$endIndex() < this.startIndex && f.get$endIndex() !== -1;
        else
          t1 = true;
        return !t1;
      }
    },
    RichTextFormat: {
      "^": "Object;font,size,color,strokeWidth,strokeColor,fillGradient,startIndex<,endIndex@,bold,italic,underline,strikethrough,overline,align<,topMargin<,bottomMargin<,leftMargin,rightMargin,indent,leading<",
      clone$0: function(_) {
        return new A.RichTextFormat(this.font, this.size, this.color, this.strokeWidth, this.strokeColor, this.fillGradient, this.startIndex, this.endIndex, this.bold, this.italic, this.underline, this.strikethrough, this.overline, this.align, this.topMargin, this.bottomMargin, this.leftMargin, this.rightMargin, this.indent, this.leading);
      },
      get$_cssFontStyle: function() {
        var fontStyle = H.S(this.size) + "px " + H.S(this.font) + ", sans-serif";
        if (this.bold)
          fontStyle = "bold " + fontStyle;
        return this.italic ? "italic " + fontStyle : fontStyle;
      }
    },
    RichTextLineMetrics: {
      "^": "Object;_stagexl_richtextfield$_text,_textIndex,_x,_y,_stagexl_richtextfield$_width,_stagexl_richtextfield$_height,_ascent,_descent,_leading,_indent",
      get$x: function(_) {
        return this._x;
      },
      get$y: function(_) {
        return this._y;
      },
      get$width: function(_) {
        return this._stagexl_richtextfield$_width;
      },
      get$height: function(_) {
        return this._stagexl_richtextfield$_height;
      },
      get$leading: function() {
        return this._leading;
      }
    }
  }], ["ByondClient", "webclient.dart",, N, {
    "^": "",
    MatrixIsIdentity: function(m) {
      var t1;
      if (m == null)
        return true;
      t1 = m._data;
      return t1[0] === 1 && t1[1] === 0 && t1[2] === 0 && t1[3] === 1 && t1[4] === 0 && t1[5] === 0;
    },
    MatrixEqual: function(m1, m2) {
      var t1, t2, t3;
      if (m1 == null)
        return m2 == null || N.MatrixIsIdentity(m2);
      if (m2 == null)
        return N.MatrixIsIdentity(m1);
      t1 = m1._data;
      t2 = t1[0];
      t3 = m2._data;
      return t2 === t3[0] && t1[1] === t3[1] && t1[2] === t3[2] && t1[3] === t3[3] && t1[4] === t3[4] && t1[5] === t3[5];
    },
    ColorEqual: function(c1, c2) {
      if (c1 == null)
        return c2 == null || c2.get$isWhite();
      if (c2 == null)
        return c1.get$isWhite();
      return c1.$eq(0, c2);
    },
    ByondJS_msgEventHandler: [function(e) {
      return $.$get$ByondJS_skin().msgEvent$1(e);
    }, "call$1", "webclient_ByondJS_msgEventHandler$closure", 2, 0, 98, 3],
    ByondJS_create: function() {
      var t1, exception, byond, t2, old_prompt, $prompt, lb;
      $.ByondJS__domloaded = false;
      try {
        t1 = window;
        C.Window_methods._removeEventListener$3(t1, "message", N.webclient_ByondJS_msgEventHandler$closure(), null);
      } catch (exception) {
        H.unwrapException(exception);
      }
      t1 = window;
      C.Window_methods._addEventListener$3(t1, "message", N.webclient_ByondJS_msgEventHandler$closure(), null);
      P.print("Creating byond function and module");
      t1 = $.$get$context();
      byond = t1.$index(0, "byond");
      if (byond == null) {
        byond = N.ByondJS__wrapClosure(new N.ByondJS_create_closure(), 2);
        t1.$indexSet(0, "byond", byond);
      }
      P.print("Adding bind and curry functions");
      if (!(J.$index$asx(t1.$index(0, "Function"), "bind") instanceof P.JsFunction))
        J.$indexSet$ax(t1.$index(0, "Function"), "bind", t1.callMethod$2("eval", ["(\r\n\t\t\tfunction(o) {var a=Array.prototype.slice.call(arguments,1),l=a.length,f=this; return function(){return f.apply(o,a.concat(Array.prototype.slice.call(arguments)));}}\r\n\t\t)"]));
      if (!(J.$index$asx(t1.$index(0, "Function"), "curry") instanceof P.JsFunction))
        J.$indexSet$ax(t1.$index(0, "Function"), "curry", t1.callMethod$2("eval", ["( \r\n\t\t\tfunction() {var a=Array.prototype.slice.call(arguments),l=a.length,f=this; return function(){return f.apply(this,a.concat(Array.prototype.slice.call(arguments)));}}\r\n\t\t)"]));
      t2 = J.getInterceptor$ax(byond);
      t2.$indexSet(byond, "local_id", C.C__JSRandom.nextInt$1(4294967295));
      P.print("Creating skin module");
      if (t2.$index(byond, "skin") == null)
        t2.$indexSet(byond, "skin", P.JsObject_JsObject(t1.$index(0, "Object"), null));
      N.ByondJS_extend(J.$index$asx(t1.$index(0, "byond"), "skin"), $.$get$ByondJS_skin().get$methods());
      P.print("Creating prompt function and module");
      old_prompt = t2.$index(byond, "prompt");
      $prompt = N.ByondJS__wrapClosure(new N.ByondJS_create_closure0(), 1);
      t2.$indexSet(byond, "prompt", $prompt);
      N.ByondJS_extend(t2.$index(byond, "prompt"), old_prompt);
      if ($prompt.$index(0, "fn") == null)
        $prompt.$indexSet(0, "fn", N.ByondJS_promptMethods());
      else
        N.ByondJS_extend($prompt.$index(0, "fn"), N.ByondJS_promptMethods());
      $prompt.$indexSet(0, "which", N.ByondJS__wrapClosure(new N.ByondJS_create_closure1(), 1));
      P.print("Creating lightbox module");
      lb = N.ByondJS__wrapClosure(new N.ByondJS_create_closure2(), 2);
      t2.$indexSet(byond, "lightbox", lb);
      lb.$indexSet(0, "close", N.ByondJS__wrapClosure(new N.ByondJS_create_closure3(), 1));
      lb.$indexSet(0, "clickoff", N.ByondJS__wrapClosure(new N.ByondJS_create_closure4(), 0));
      lb.$indexSet(0, "resize", N.ByondJS__wrapClosure(new N.ByondJS_create_closure5(), 0));
      $.$get$ByondJS_lightbox().toString;
      lb.$indexSet(0, "styles", P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["color", "black", "opacity", 0.5])));
      P.print("Creating event module");
      t2.$indexSet(byond, "event", P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["ignore", N.ByondJS__wrapClosure(new N.ByondJS_create_closure6(), 1), "end", N.ByondJS__wrapClosure(new N.ByondJS_create_closure7(), 1)])));
      P.print("Creating byond.fn methods");
      N.ByondJS_extend(byond, N.ByondJS_methods());
      if (t2.$index(byond, "fn") == null)
        t2.$indexSet(byond, "fn", N.ByondJS_classMethods());
      else
        N.ByondJS_extend(t2.$index(byond, "fn"), N.ByondJS_classMethods());
      P.print("Creating byond.winsetfn methods");
      if (t2.$index(byond, "winsetfn") == null)
        t2.$indexSet(byond, "winsetfn", N.ByondJS_winsetMethods());
      else
        N.ByondJS_extend(t2.$index(byond, "winsetfn"), N.ByondJS_winsetMethods());
      P.print("Checking for DOM load");
      N.ByondJS_onDomLoaded(N.webclient_ByondJS_start$closure());
    },
    ByondJS_start: [function() {
      var cb, t1;
      if (!$.ByondJS__domloaded)
        P.print("DOM loaded");
      $.ByondJS__domloaded = true;
      cb = $.ByondJS__onready;
      $.ByondJS__onready = null;
      t1 = cb != null;
      if (t1)
        P.print("Creating client");
      if (t1)
        cb.call$0();
    }, "call$0", "webclient_ByondJS_start$closure", 0, 0, 3],
    ByondJS__wrapClosure: function(f, n) {
      return $.$get$context().callMethod$2("eval", ["(function(f,n){\r\n\t\t\treturn function(){\r\n\t\t\t\treturn f.apply(null, Array.prototype.slice.call(arguments,0,n));\r\n\t\t\t};\r\n\t\t})"]).apply$1([f, n]);
    },
    ByondJS__wrapChain: function(f) {
      return $.$get$context().callMethod$2("eval", ["(function(f){\r\n\t\t\treturn function(a,b){\r\n\t\t\t\tf(a,b); for(var i=2,l=arguments.length; i<l; ++i) f(a,arguments[i]);\r\n\t\t\t\treturn a;\r\n\t\t\t};\r\n\t\t})"]).apply$1([f]);
    },
    ByondJS__wrapVarArgs: function(f) {
      return $.$get$context().callMethod$2("eval", ["(function(f){\r\n\t\t\treturn function(){\r\n\t\t\t\treturn f(Array.prototype.slice.call(arguments));\r\n\t\t\t};\r\n\t\t})"]).apply$1([f]);
    },
    ByondJS__wrapControl: function(f) {
      return $.$get$context().callMethod$2("eval", ["(function(f){\r\n\t\t\treturn function(){\r\n\t\t\t\treturn f(this,Array.prototype.slice.call(arguments));\r\n\t\t\t};\r\n\t\t})"]).apply$1([f]);
    },
    ByondJS__wrapEvent: function(n, p) {
      return $.$get$context().callMethod$2("eval", ["(function(n,p){\r\n\t\t\treturn function(){\r\n\t\t\t\tvar fn = this.config[n];\r\n\t\t\t\tif(!fn) return;\r\n\t\t\t\tif(typeof fn == 'string') {\r\n\t\t\t\t\tif(p && fn.indexOf('[[*]]') >= 0) {\r\n\t\t\t\t\t\tp = this.winget(p);\r\n\t\t\t\t\t\tif(typeof p == 'number') p = ''+p;\r\n\t\t\t\t\t\tif(typeof p != 'string') p = '';\r\n\t\t\t\t\t\tfn = fn.replace(/\\[\\[\\*\\]\\]/g, p);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this.input(fn);\r\n\t\t\t\t}\r\n\t\t\t\tif(typeof fn == 'function' || (typeof fn == 'Object' && fn.constructor === 'Funtion')) return fn.call(this); \r\n\t\t\t};\r\n\t\t})"]).apply$1([n, p]);
    },
    ByondJS_toBool: function(x, parse) {
      var i;
      if (x == null)
        return parse && null;
      if (typeof x === "boolean")
        return x;
      if (typeof x === "string") {
        x = C.JSString_methods.trim$0(x);
        if (!parse)
          return x.length > 0;
        if (x === "true" || x === "on")
          return true;
        if (x === "false" || x === "off")
          return false;
        i = H.Primitives_parseInt(x, null, new N.ByondJS_toBool_closure());
        if (typeof i === "number")
          return i !== 0;
        return;
      }
      if (typeof x === "number")
        return x !== 0;
      return true;
    },
    ByondJS_toNum: function(x, parse) {
      var def, i;
      def = parse ? null : 0;
      if (x == null)
        return def;
      if (typeof x === "number")
        return isFinite(x) ? x : def;
      if (typeof x === "boolean")
        return x ? 1 : 0;
      if (typeof x === "string") {
        x = C.JSString_methods.trim$0(x);
        if (parse) {
          if (x === "true" || x === "on")
            return 1;
          if (x === "false" || x === "off")
            return 0;
        }
        i = H.Primitives_parseDouble(x, new N.ByondJS_toNum_closure());
        if (typeof i === "number" && isFinite(i))
          return i;
        return def;
      }
      return 1;
    },
    ByondJS_toPoint: function(xy) {
      var m, t1, x, y;
      if (xy == null)
        return;
      if (J.$eq$(xy, "none") || typeof xy !== "string")
        return new P.Point(0, 0, [null]);
      m = $.$get$ByondJS__sizeRx().firstMatch$1(xy);
      if (m != null) {
        t1 = m._match;
        x = H.Primitives_parseDouble(t1[1], new N.ByondJS_toPoint_closure());
        y = H.Primitives_parseDouble(t1[2], new N.ByondJS_toPoint_closure0());
      } else {
        x = 0;
        y = 0;
      }
      return new P.Point(x, y, [null]);
    },
    ByondJS_toAnchor: function(xy) {
      var m, t1, x, y;
      if (J.getInterceptor(xy).$eq(xy, "none") || typeof xy !== "string" || C.JSString_methods.get$isEmpty(C.JSString_methods.trim$0(xy)))
        return new P.Point(-1, -1, [null]);
      m = $.$get$ByondJS__sizeRx().firstMatch$1(xy);
      if (m != null) {
        t1 = m._match;
        x = H.Primitives_parseDouble(t1[1], new N.ByondJS_toAnchor_closure());
        y = H.Primitives_parseDouble(t1[2], new N.ByondJS_toAnchor_closure0());
      } else {
        x = 0;
        y = 0;
      }
      if (x < 0 || y < 0) {
        x = -1;
        y = -1;
      } else {
        x = C.JSNumber_methods.clamp$2(x, 0, 100);
        y = J.clamp$2$n(y, 0, 100);
      }
      return new P.Point(x, y, [null]);
    },
    ByondJS_stage: function() {
      var t1 = $.ByondJS__stage;
      if (t1 == null) {
        t1 = document.createDocumentFragment();
        $.ByondJS__stage = t1;
      }
      return t1;
    },
    ByondJS_backstage: function() {
      var t1, t2, t3;
      if ($.ByondJS__backstage == null) {
        t1 = document;
        t2 = t1.createElement("div");
        $.ByondJS__backstage = t2;
        t2 = t2.style;
        t3 = (t2 && C.CssStyleDeclaration_methods)._browserPropertyName$1(t2, "visibility");
        t2.setProperty(t3, "hidden", "");
        t2 = $.ByondJS__backstage.style;
        t3 = (t2 && C.CssStyleDeclaration_methods)._browserPropertyName$1(t2, "overflow");
        t2.setProperty(t3, "hidden", "");
        t2 = $.ByondJS__backstage.style;
        t3 = (t2 && C.CssStyleDeclaration_methods)._browserPropertyName$1(t2, "position");
        t2.setProperty(t3, "absolute", "");
        t2 = $.ByondJS__backstage.style;
        t3 = (t2 && C.CssStyleDeclaration_methods)._browserPropertyName$1(t2, "left");
        t2.setProperty(t3, "-10000px", "");
        t2 = $.ByondJS__backstage.style;
        t3 = (t2 && C.CssStyleDeclaration_methods)._browserPropertyName$1(t2, "top");
        t2.setProperty(t3, "-10000px", "");
        t2 = $.ByondJS__backstage.style;
        t3 = (t2 && C.CssStyleDeclaration_methods)._browserPropertyName$1(t2, "width");
        t2.setProperty(t3, "100%", "");
        t2 = $.ByondJS__backstage.style;
        t3 = (t2 && C.CssStyleDeclaration_methods)._browserPropertyName$1(t2, "height");
        t2.setProperty(t3, "100%", "");
        t1.body.appendChild($.ByondJS__backstage);
      }
      return $.ByondJS__backstage;
    },
    ByondJS_isBackstage: function(e, atall) {
      var t1, byondclass;
      if (e == null)
        return false;
      for (; e = e.parentNode, !!J.getInterceptor(e).$isElement;) {
        t1 = N.ByondJS_backstage();
        if (e == null ? t1 == null : e === t1)
          return true;
        if (atall)
          continue;
        byondclass = e.getAttribute("byondclass");
        if (byondclass != null && byondclass.length !== 0)
          return false;
      }
      return false;
    },
    ByondJS_availableName: function(type) {
      var t1, i, $name;
      type = $.$get$ByondJS_skin().sanitizeClass$1(type);
      type.toString;
      type = H.stringReplaceAllUnchecked(type, ".", "_");
      for (t1 = document, i = 1; $name = type + C.JSInt_methods.toString$0(i), t1.getElementById($name) != null;)
        ++i;
      return $name;
    },
    ByondJS_keys: function(obj) {
      var t1, own, keys;
      t1 = $.$get$context();
      own = J.$index$asx(J.$index$asx(t1.$index(0, "Object"), "prototype"), "hasOwnProperty");
      keys = t1.$index(0, "Object").callMethod$2("keys", [obj]);
      keys.toString;
      return new H.WhereIterable(keys, new N.ByondJS_keys_closure(obj, own), [H.getRuntimeTypeArgument(keys, "ListMixin", 0)]);
    },
    ByondJS_extend: [function(src, obj) {
      var t1, t2, p;
      if (obj == null)
        return src;
      for (t1 = N.ByondJS_keys(obj), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new H.WhereIterator(t2, t1._f, [H.getTypeArgumentByIndex(t1, 0)]); t1.moveNext$0();) {
        p = t2.get$current();
        src.$indexSet(0, p, obj.$index(0, p));
      }
      return src;
    }, "call$2", "webclient_ByondJS_extend$closure", 4, 0, 15, 21, 20],
    ByondJS_tryExtend: [function(src, obj) {
      var p, t1, t2, exception;
      if (obj == null)
        return src;
      for (t1 = N.ByondJS_keys(obj), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new H.WhereIterator(t2, t1._f, [H.getTypeArgumentByIndex(t1, 0)]); t1.moveNext$0();) {
        p = t2.get$current();
        try {
          src.$indexSet(0, p, obj.$index(0, p));
        } catch (exception) {
          H.unwrapException(exception);
        }
      }
      return src;
    }, "call$2", "webclient_ByondJS_tryExtend$closure", 4, 0, 15, 21, 20],
    ByondJS_extendUnused: [function(src, obj) {
      var t1, t2, p;
      if (obj == null)
        return src;
      for (t1 = N.ByondJS_keys(obj), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new H.WhereIterator(t2, t1._f, [H.getTypeArgumentByIndex(t1, 0)]); t1.moveNext$0();) {
        p = t2.get$current();
        if (src.$index(0, p) != null)
          src.$indexSet(0, p, obj.$index(0, p));
      }
      return src;
    }, "call$2", "webclient_ByondJS_extendUnused$closure", 4, 0, 15, 21, 20],
    ByondJS_extendDeep: [function(src, obj) {
      var t1, t2, t3, p, t4;
      if (obj == null)
        return src;
      for (t1 = N.ByondJS_keys(obj), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new H.WhereIterator(t2, t1._f, [H.getTypeArgumentByIndex(t1, 0)]), t3 = [null]; t1.moveNext$0();) {
        p = t2.get$current();
        src.$indexSet(0, p, obj.$index(0, p));
        if (src.$index(0, p) instanceof P.JsArray) {
          t4 = [];
          C.JSArray_methods.addAll$1(t4, J.map$1$ax(src.$index(0, p), P.js___convertToJS$closure()));
          src.$indexSet(0, p, new P.JsArray(t4, t3));
        } else if (src.$index(0, p) instanceof P.JsObject)
          src.$indexSet(0, p, N.ByondJS_extendDeep(P.JsObject_JsObject($.$get$context().$index(0, "Object"), null), src.$index(0, p)));
      }
      return src;
    }, "call$2", "webclient_ByondJS_extendDeep$closure", 4, 0, 15, 21, 20],
    ByondJS_toCamel: [function(s) {
      var t1 = $.$get$ByondJS__toCamelRx();
      s.toString;
      return H.stringReplaceAllFuncUnchecked(s, t1, new N.ByondJS_toCamel_closure(), null);
    }, "call$1", "webclient_ByondJS_toCamel$closure", 2, 0, 14, 9],
    ByondJS_fromCamel: [function(s) {
      var t1 = $.$get$ByondJS__fromCamelRx1();
      s.toString;
      return H.stringReplaceAllFuncUnchecked(s, t1, new N.ByondJS_fromCamel_closure(), null);
    }, "call$1", "webclient_ByondJS_fromCamel$closure", 2, 0, 14, 9],
    ByondJS_sanitizeId: [function(s) {
      var i;
      if (typeof s !== "string")
        return "";
      i = C.JSString_methods.indexOf$1(s, ":");
      if (i >= 0)
        return N.ByondJS_sanitizeId(C.JSString_methods.substring$2(s, 0, i)) + C.JSString_methods.substring$1(s, i);
      return H.stringReplaceAllUnchecked(s.toLowerCase(), $.$get$ByondJS__nonIdRx(), "");
    }, "call$1", "webclient_ByondJS_sanitizeId$closure", 2, 0, 14, 9],
    ByondJS_isByondUrl: function(url, anyByond, byDefault) {
      if (url == null || url.length === 0)
        return false;
      if ((anyByond ? $.$get$ByondJS__byondUrlRx() : $.$get$ByondJS__byondUrlQueryRx())._nativeRegExp.test(H.checkString(url)))
        return true;
      if (C.JSString_methods.matchAsPrefix$1("?", url) != null)
        return true;
      if (C.JSString_methods.matchAsPrefix$1("#", url) != null)
        return false;
      if ($.$get$ByondJS__protocolRx()._nativeRegExp.test(H.checkString(url)))
        return false;
      return byDefault;
    },
    ByondJS_css: [function(args) {
      var e, prop, v, val, _, _0, t1, t2, t3, t4, t5, value, exception, line;
      t1 = J.getInterceptor$asx(args);
      if (t1.get$length(args) < 2)
        return "";
      try {
        if (!J.getInterceptor(t1.$index(args, 0)).$isElement)
          return "";
        e = t1.$index(args, 0);
        prop = null;
        v = null;
        if (t1.$index(args, 1) instanceof P.JsObject) {
          for (t2 = N.ByondJS_keys(t1.$index(args, 1)), t3 = J.get$iterator$ax(t2.__internal$_iterable), t2 = new H.WhereIterator(t3, t2._f, [H.getTypeArgumentByIndex(t2, 0)]); t2.moveNext$0();) {
            prop = t3.get$current();
            val = J.$index$asx(t1.$index(args, 1), prop);
            if (val == null)
              continue;
            t4 = val;
            if (typeof t4 !== "string")
              val = J.toString$0$(val);
            try {
              t4 = J.get$style$x(e);
              t5 = N.ByondJS_fromCamel(prop);
              value = val;
              t5 = J._browserPropertyName$1$x(t4, t5);
              if (value == null)
                value = "";
              t4.setProperty(t5, value, "");
            } catch (exception) {
              t4 = H.unwrapException(exception);
              _ = t4;
              line = H.S(_);
              t4 = $.printToZone;
              if (t4 == null)
                H.printString(line);
              else
                t4.call$1(line);
            }
          }
          return "";
        }
        t2 = t1.$index(args, 1);
        if (typeof t2 !== "string")
          return;
        prop = t1.$index(args, 1);
        v = t1.get$length(args) > 2 ? t1.$index(args, 2) : null;
        if (v == null) {
          t1 = J.getComputedStyle$0$x(e);
          t1 = (t1 && C.CssStyleDeclaration_methods).getPropertyValue$1(t1, N.ByondJS_fromCamel(prop));
          return t1;
        } else {
          t1 = v;
          if (typeof t1 !== "string")
            v = J.toString$0$(v);
        }
        t1 = J.get$style$x(e);
        t2 = N.ByondJS_fromCamel(prop);
        value = v;
        t2 = J._browserPropertyName$1$x(t1, t2);
        if (value == null)
          value = "";
        t1.setProperty(t2, value, "");
      } catch (exception) {
        t1 = H.unwrapException(exception);
        _0 = t1;
        P.print(_0);
      }
      return "";
    }, "call$1", "webclient_ByondJS_css$closure", 2, 0, 30, 16],
    ByondJS_css2rgb: [function(c, isRetry) {
      var e, _, props, ret, l, _i, t1, t2, d, m, l0, i, j, j0, i0, match, vals, v, exception;
      props = ["r", "g", "b", "a"];
      ret = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["r", 255, "g", 255, "b", 255, "a", 255]));
      c = J.trim$0$s(c);
      l = J.get$length$asx(c);
      if (J.$eq$(c, "transparent") || J.$eq$(c, "none"))
        for (_i = 0; _i < 4; ++_i)
          ret.$indexSet(0, props[_i], 0);
      else {
        t1 = $.$get$ByondJS__hexRx();
        t2 = c;
        if (t1._nativeRegExp.test(H.checkString(t2))) {
          if (l < 7) {
            d = 1;
            m = 17;
          } else {
            d = 2;
            m = 1;
          }
          l0 = 1 + d * 4;
          if (l0 < l)
            l = l0;
          ret = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
          for (i = 0, j = 1; j0 = j + d, j0 <= l; j = j0, i = i0) {
            i0 = i + 1;
            ret.$indexSet(0, props[i], H.Primitives_parseInt(J.substring$2$s(c, j, j0), 16, null) * m);
          }
        } else {
          match = $.$get$ByondJS__rgbaRx().firstMatch$1(c);
          if (match != null) {
            vals = J.split$1$s(match._match[1], $.$get$ByondJS__commaRx());
            l = vals.length;
            i = 0;
            while (true) {
              if (!(i < l && i < 4))
                break;
              if (J.endsWith$1$s(vals[1], "%"))
                v = H.Primitives_parseDouble(vals[i], new N.ByondJS_css2rgb_closure()) * 25.5;
              else
                v = i < 3 ? H.Primitives_parseDouble(vals[i], new N.ByondJS_css2rgb_closure0()) : H.Primitives_parseDouble(vals[i], null) * 255;
              v = C.JSInt_methods.clamp$2(J.round$0$n(v), 0, 255);
              ret.$indexSet(0, props[i], v);
              ++i;
            }
          } else if (!isRetry) {
            t1 = document;
            e = t1.createElement("div");
            N.ByondJS_backstage().appendChild(e);
            try {
              t1 = J.get$style$x(e);
              t2 = c;
              t1.toString;
              t1.color = t2 == null ? "" : t2;
              t1 = J.getComputedStyle$0$x(e);
              c = (t1 && C.CssStyleDeclaration_methods).getPropertyValue$1(t1, "color");
              t1 = N.ByondJS_css2rgb(c, true);
              return t1;
            } catch (exception) {
              t1 = H.unwrapException(exception);
              _ = t1;
              P.print(_);
            }
            J.remove$0$ax(e);
          }
        }
      }
      return ret;
    }, function(c) {
      return N.ByondJS_css2rgb(c, false);
    }, "call$2", "call$1", "webclient_ByondJS_css2rgb$closure", 2, 2, 101, 34, 1, 87],
    ByondJS_rgb2hex: [function(rgb, opacity, byondFormat) {
      var prop, t1, props, _i, exception;
      t1 = rgb;
      if (typeof t1 === "string")
        rgb = N.ByondJS_css2rgb(rgb, false);
      if (!(rgb instanceof P.JsObject))
        return byondFormat ? "none" : "transparent";
      props = ["r", "g", "b"];
      for (_i = 0; _i < 3; ++_i) {
        prop = props[_i];
        t1 = J.$index$asx(rgb, prop);
        if (typeof t1 === "string")
          try {
            J.$indexSet$ax(rgb, prop, H.Primitives_parseInt(J.$index$asx(rgb, prop), null, null));
          } catch (exception) {
            H.unwrapException(exception);
            J.$indexSet$ax(rgb, prop, 0);
          }
        t1 = J.$index$asx(rgb, prop);
        if (typeof t1 !== "number")
          J.$indexSet$ax(rgb, prop, 255);
        J.$indexSet$ax(rgb, prop, C.JSInt_methods.clamp$2(J.round$0$n(J.$index$asx(rgb, prop)), 0, 255));
      }
      if (opacity >= 1)
        return "#" + C.JSString_methods.substring$1(C.JSInt_methods.toRadixString$1((16777216 | J.$shl$n(J.$index$asx(rgb, "r"), 16) | J.$shl$n(J.$index$asx(rgb, "g"), 8) | J.$index$asx(rgb, "b")) >>> 0, 16), 1).toUpperCase();
      opacity = C.JSNumber_methods.clamp$2(opacity, 0, 1);
      return byondFormat ? "#" + C.JSString_methods.substring$1(C.JSInt_methods.toRadixString$1((J.$shl$n(J.$index$asx(rgb, "r"), 24) | J.$shl$n(J.$index$asx(rgb, "g"), 16) | J.$shl$n(J.$index$asx(rgb, "b"), 8) | C.JSNumber_methods.round$0(opacity * 255)) >>> 0, 16), 1).toUpperCase() : "rgba(" + H.S(J.$index$asx(rgb, "r")) + "," + H.S(J.$index$asx(rgb, "g")) + "," + H.S(J.$index$asx(rgb, "b")) + "," + H.S(opacity) + ")";
    }, function(rgb) {
      return N.ByondJS_rgb2hex(rgb, 1, false);
    }, function(rgb, opacity) {
      return N.ByondJS_rgb2hex(rgb, opacity, false);
    }, "call$3", "call$1", "call$2", "webclient_ByondJS_rgb2hex$closure", 2, 4, 102, 58, 34, 59, 60, 61],
    ByondJS_defaultColor: [function($name) {
      var t1, color, def, a;
      t1 = document.body;
      t1 = (t1 && C.BodyElement_methods).getComputedStyle$0(t1);
      color = N.ByondJS_css2rgb((t1 && C.CssStyleDeclaration_methods).getPropertyValue$1(t1, N.ByondJS_fromCamel($name)), false);
      if (color == null)
        return "#000000";
      def = N.ByondJS_fromCamel($name) === "background-color" ? 255 : 0;
      a = color.$index(0, "a");
      if (a < 255) {
        a /= 255;
        color.$indexSet(0, "r", C.JSInt_methods.clamp$2(J.round$0$n(J.$add$ns(J.$mul$ns(J.$sub$n(color.$index(0, "r"), def), a), def)), 0, 255));
        color.$indexSet(0, "g", C.JSInt_methods.clamp$2(J.round$0$n(J.$add$ns(J.$mul$ns(J.$sub$n(color.$index(0, "g"), def), a), def)), 0, 255));
        color.$indexSet(0, "b", C.JSInt_methods.clamp$2(J.round$0$n(J.$add$ns(J.$mul$ns(J.$sub$n(color.$index(0, "b"), def), a), def)), 0, 255));
      }
      return N.ByondJS_rgb2hex(color, 1, false);
    }, "call$1", "webclient_ByondJS_defaultColor$closure", 2, 0, 103, 17],
    ByondJS_generateStyles: function() {
      var sheet, i, t1, t2, t3, rules, j, r, sel, t4, t5, sels, bodysels, rbody, j0, exception, tocopy, prop, propValue, se, styles, bk, a, fg, cbk, fhsl;
      for (t1 = document, t2 = new W._FrozenElementList(t1.querySelectorAll("style"), [null]), t2 = new H.ListIterator(t2, t2.get$length(t2), 0, null); t2.moveNext$0();) {
        t3 = t2.__internal$_current.sheet;
        if (!J.getInterceptor(t3).$isCssStyleSheet)
          continue;
        sheet = t3;
        rules = J.get$cssRules$x(sheet);
        i = null;
        for (i = 0, j = null; J.$lt$n(i, rules.length); i = J.$add$ns(i, 1)) {
          if (!J.getInterceptor(rules[i]).$isCssStyleRule)
            continue;
          r = rules[i];
          sel = r.selectorText;
          t3 = $.$get$ByondJS__bodyRx();
          t4 = t3._nativeRegExp;
          t5 = typeof sel !== "string";
          if (t5)
            H.throwExpression(H.argumentErrorValue(sel));
          if (t4.test(sel)) {
            t4 = $.$get$ByondJS__htmlRx()._nativeRegExp;
            if (t5)
              H.throwExpression(H.argumentErrorValue(sel));
            t4 = !t4.test(sel);
          } else
            t4 = false;
          if (t4) {
            sels = J.split$1$s(sel, P.RegExp_RegExp("[\\s\\n]*,[\\s\\n]*", true, false));
            bodysels = [];
            rbody = C.JSString_methods.trim$0(J.substring$1$s(r.cssText, sel.length));
            for (j = 0; t4 = sels.length, j < t4; ++j) {
              t4 = sels[j];
              t5 = t3._nativeRegExp;
              if (typeof t4 !== "string")
                H.throwExpression(H.argumentErrorValue(t4));
              if (t5.test(t4)) {
                bodysels.push(sels[j]);
                j0 = j - 1;
                C.JSArray_methods.removeAt$1(sels, j);
                j = j0;
              }
            }
            if (t4 > 0 && bodysels.length > 0) {
              t3 = C.JSArray_methods.join$1(sels, ", ") + " " + rbody;
              t4 = i;
              i = J.$add$ns(t4, 1);
              J.insertRule$2$x(sheet, t3, t4);
              if (bodysels.length > 0) {
                t3 = C.JSArray_methods.join$1(bodysels, ", ") + " " + rbody;
                t4 = i;
                i = J.$add$ns(t4, 1);
                J.insertRule$2$x(sheet, t3, t4);
              }
              try {
                J.removeRule$1$x(sheet, i);
              } catch (exception) {
                H.unwrapException(exception);
                J.deleteRule$1$x(sheet, i);
              }
              i = J.$sub$n(i, 1);
              r = J.get$cssRules$x(sheet)[i];
              sel = r.selectorText;
            }
            for (j = 0, tocopy = ""; t3 = r.style, j < t3.length; ++j) {
              prop = t3.item(j);
              t3 = $.$get$ByondJS__bodyKeepRx();
              t3.toString;
              prop.length;
              if (t3._execAnchored$2(prop, 0) != null) {
                t3 = H.S(prop) + ": ";
                t4 = r.style;
                propValue = (t4 && C.CssStyleDeclaration_methods)._getPropertyValueHelper$1(t4, prop);
                tocopy += t3 + H.S(propValue != null ? propValue : "") + "; ";
              }
            }
            tocopy = C.JSString_methods.trim$0(tocopy);
            t3 = $.$get$ByondJS__bodyRx();
            sel.toString;
            t3 = H.S(H.stringReplaceAllUnchecked(sel, t3, ".byond_output_styles")) + " " + rbody;
            t4 = i;
            i = J.$add$ns(t4, 1);
            J.insertRule$2$x(sheet, t3, t4);
            if (tocopy.length > 0) {
              t3 = H.S(sel) + " {" + tocopy + "}";
              t4 = i;
              i = J.$add$ns(t4, 1);
              J.insertRule$2$x(sheet, t3, t4);
            }
            try {
              J.removeRule$1$x(sheet, i);
            } catch (exception) {
              H.unwrapException(exception);
              J.deleteRule$1$x(sheet, i);
            }
            i = J.$sub$n(i, 1);
            rules = J.get$cssRules$x(sheet);
          }
        }
      }
      se = t1.querySelector("style#byond_styles");
      if (se == null) {
        t2 = t1.createElement("style");
        t2.type = "text/css";
        t2.id = "byond_styles";
        t3 = t1.head;
        t3.insertBefore(t2, t3.firstChild);
        styles = t2.sheet;
      } else
        styles = se.sheet;
      t2 = t1.body;
      t2 = (t2 && C.BodyElement_methods).getComputedStyle$0(t2);
      bk = N.ByondJS_css2rgb((t2 && C.CssStyleDeclaration_methods).getPropertyValue$1(t2, "background-color"), false);
      a = bk.$index(0, "a");
      if (a < 255) {
        a /= 255;
        bk.$indexSet(0, "r", C.JSInt_methods.clamp$2(J.round$0$n(J.$add$ns(J.$mul$ns(J.$sub$n(bk.$index(0, "r"), 255), a), 255)), 0, 255));
        bk.$indexSet(0, "g", C.JSInt_methods.clamp$2(J.round$0$n(J.$add$ns(J.$mul$ns(J.$sub$n(bk.$index(0, "g"), 255), a), 255)), 0, 255));
        bk.$indexSet(0, "b", C.JSInt_methods.clamp$2(J.round$0$n(J.$add$ns(J.$mul$ns(J.$sub$n(bk.$index(0, "b"), 255), a), 255)), 0, 255));
        bk.$indexSet(0, "a", 255);
      }
      t1 = t1.body;
      t1 = (t1 && C.BodyElement_methods).getComputedStyle$0(t1);
      fg = N.ByondJS_css2rgb((t1 && C.CssStyleDeclaration_methods).getPropertyValue$1(t1, "color"), false);
      a = bk.$index(0, "a");
      if (a < 255) {
        a /= 255;
        fg.$indexSet(0, "r", C.JSInt_methods.clamp$2(J.round$0$n(J.$mul$ns(fg.$index(0, "r"), a)), 0, 255));
        fg.$indexSet(0, "g", C.JSInt_methods.clamp$2(J.round$0$n(J.$mul$ns(fg.$index(0, "g"), a)), 0, 255));
        fg.$indexSet(0, "b", C.JSInt_methods.clamp$2(J.round$0$n(J.$mul$ns(fg.$index(0, "b"), a)), 0, 255));
        fg.$indexSet(0, "a", 255);
      }
      styles.insertRule("* {box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;}", 0);
      styles.insertRule(".byond_bk {background-color: " + N.ByondJS_rgb2hex(bk, 1, false) + ";}", 1);
      styles.insertRule(".byond_bk1 {background-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(bk, 0.067), 1, false) + ";}", 2);
      styles.insertRule(".byond_bk2 {background-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(bk, 0.2), 1, false) + ";}", 3);
      styles.insertRule(".byond_boxbk {background-color: " + N.ByondJS_rgb2hex(bk, 1, false) + "; border-color: " + N.ByondJS_rgb2hex(fg, 1, false) + ";}", 4);
      styles.insertRule(".byond_boxbk1 {background-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(bk, 0.067), 1, false) + "; border-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(fg, 0.2), 1, false) + ";}", 5);
      styles.insertRule(".byond_boxbk2 {background-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(bk, 0.2), 1, false) + "; border-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(fg, 0.2), 1, false) + ";}", 6);
      styles.insertRule(".byond_border {border-color: " + N.ByondJS_rgb2hex(fg, 1, false) + ";}", 7);
      styles.insertRule(".byond_border1 {border-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(fg, 0.2), 1, false) + ";}", 8);
      styles.insertRule(".byond_borderbk {border-color: " + N.ByondJS_rgb2hex(bk, 1, false) + ";}", 9);
      styles.insertRule(".byond_borderbk1 {border-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(bk, 0.2), 1, false) + ";}", 10);
      styles.insertRule(".byond_buttonbk {background-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(bk, 0.067), 1, false) + "; border-color: " + N.ByondJS_rgb2hex(fg, 0.333, false) + ";}", 11);
      styles.insertRule(".byond_buttonbk.disabled:hover {background-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(bk, 0.067), 1, false) + ";}", 12);
      styles.insertRule(".byond_buttonbk.disabled{opacity:0.75;}", 13);
      styles.insertRule(".byond_buttonbk:hover, .byond_choicebk:hover {background-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(bk, 0.2), 1, false) + ";}", 14);
      styles.insertRule(".byond_buttonbk.selected, .byond_buttonbk.selected:hover {background-color: " + N.ByondJS_rgb2hex(N.ByondJS_shade(bk, 0.25), 1, false) + ";}", 15);
      cbk = N.ByondJS_rgb2hsl(bk);
      fhsl = N.ByondJS_rgb2hsl(fg);
      if (J.$eq$(cbk.$index(0, "s"), 0)) {
        if (J.$eq$(fhsl.$index(0, "s"), 0))
          fhsl.$indexSet(0, "h", 60);
        cbk.$indexSet(0, "h", fhsl.$index(0, "h"));
      } else if (J.$eq$(fhsl.$index(0, "s"), 0))
        fhsl.$indexSet(0, "h", cbk.$index(0, "h"));
      cbk.$indexSet(0, "h", C.JSNumber_methods.$mod(J.$div$n(J.$add$ns(cbk.$index(0, "h"), fhsl.$index(0, "h")), 2) + 180, 360));
      cbk.$indexSet(0, "s", 1);
      cbk.$indexSet(0, "l", J.$div$n(J.$add$ns(cbk.$index(0, "l"), fhsl.$index(0, "l")), 2));
      cbk = N.ByondJS_hsl2rgb(cbk);
      styles.insertRule(".byond_choicebk.selected, .byond_choicebk.selected:hover {color: " + (N.ByondJS_grayscale(cbk) > 0.5 ? "black" : "white") + "; background-color: " + N.ByondJS_rgb2hex(cbk, 1, false) + ";}", 16);
    },
    ByondJS_addFont: function($name, style, url, mimeType) {
      var cname, rule, newsrc, t1, t2, sheet, sheet0, sty, attrs, brx, irx, checkstyle, contents, i, i0;
      if ($.ByondJS_fontRules == null)
        $.ByondJS_fontRules = P.HashMap_HashMap(null, null, null, null, null);
      cname = $name + "|||" + H.S(style);
      rule = $.ByondJS_fontRules.$index(0, cname);
      newsrc = "url(" + N.ByondJS_cssQuote(url) + ")";
      if (mimeType != null)
        if (C.JSString_methods.indexOf$1(mimeType, "truetype") >= 0 || C.JSString_methods.indexOf$1(mimeType, "ttf") >= 0)
          newsrc += " format(truetype)";
        else if (C.JSString_methods.indexOf$1(mimeType, "opentype") >= 0 || C.JSString_methods.indexOf$1(mimeType, "otf") >= 0)
          newsrc += " format(opentype)";
        else if (C.JSString_methods.indexOf$1(mimeType, "woff2") >= 0)
          newsrc += " format(woff2)";
        else if (C.JSString_methods.indexOf$1(mimeType, "woff") >= 0)
          newsrc += " format(woff)";
      if (rule == null) {
        for (t1 = document, t2 = new W._FrozenElementList(t1.querySelectorAll("style"), [null]), t2 = new H.ListIterator(t2, t2.get$length(t2), 0, null), sheet = null; t2.moveNext$0();) {
          sheet0 = t2.__internal$_current.sheet;
          if (!J.getInterceptor(sheet0).$isCssStyleSheet)
            continue;
          sheet = sheet0;
        }
        if (sheet == null) {
          sty = t1.createElement("style");
          t1.head.appendChild(sty);
          sheet = sty.sheet;
        }
        attrs = [];
        attrs.push("font-family: " + N.ByondJS_cssQuote($name));
        brx = P.RegExp_RegExp("bold", false, false);
        irx = P.RegExp_RegExp("italic", false, false);
        if (style != null) {
          if (brx._nativeRegExp.test(style)) {
            attrs.push("font-weight: bold");
            checkstyle = C.JSNull_methods.$add(null, "bold ");
          } else
            checkstyle = null;
          if (irx._nativeRegExp.test(style)) {
            attrs.push("font-style: italic");
            checkstyle = C.JSNull_methods.$add(checkstyle, "italic ");
          }
        } else
          checkstyle = null;
        attrs.push("src: " + newsrc);
        sheet.insertRule("@font-face {" + C.JSArray_methods.join$1(attrs, "; ") + "}", 0);
        $.ByondJS_fontRules.$indexSet(0, cname, sheet.cssRules[0]);
        t1 = $.$get$context();
        if (t1.$index(0, "checkFont") != null)
          t1.callMethod$2("checkFont", [N.ByondJS_cssQuote($name), checkstyle, new N.ByondJS_addFont_closure()]);
      } else {
        contents = rule.cssText;
        attrs = C.JSString_methods.split$1(C.JSString_methods.trim$0(C.JSString_methods.substring$2(contents, J.getInterceptor$asx(contents).indexOf$1(contents, "{") + 1, C.JSString_methods.lastIndexOf$1(contents, "}"))), P.RegExp_RegExp("\\s*;\\s*", true, false));
        if (attrs.length > 0 && J.get$isEmpty$asx(C.JSArray_methods.get$last(attrs)))
          attrs.pop();
        for (i = attrs.length; i0 = i - 1, i > 0; i = i0)
          if (J.startsWith$1$s(attrs[i0], "src:")) {
            attrs[i0] = J.$add$ns(attrs[i0], ", " + newsrc);
            break;
          }
        if (i0 < 0)
          attrs.push("src: " + newsrc);
        sheet = rule.parentStyleSheet;
        sheet.insertRule("@font-face {" + C.JSArray_methods.join$1(attrs, "; ") + "}", 0);
        sheet.removeRule(C._CssRuleList_methods.indexOf$1(sheet.cssRules, rule));
        $.ByondJS_fontRules.$indexSet(0, cname, sheet.cssRules[0]);
      }
    },
    ByondJS_cssQuote: function(s) {
      return '"' + H.stringReplaceAllFuncUnchecked(s, P.RegExp_RegExp("'\"\\\\", true, false), new N.ByondJS_cssQuote_closure(), null) + '"';
    },
    ByondJS_rgb2hsl: function(rgb) {
      var r, g, b, x, y, z, t1, h, l;
      r = rgb.$index(0, "r");
      g = rgb.$index(0, "g");
      b = rgb.$index(0, "b");
      x = C.JSNumber_methods.clamp$2(P.min(P.min(r, g), b), 0, 255);
      y = C.JSNumber_methods.clamp$2(P.max(P.max(r, g), b), 0, 255);
      z = y - x;
      if (z === 0)
        return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["h", 0, "s", 0, "l", y / 255, "a", rgb.$index(0, "a")]));
      else if (y === r) {
        t1 = b > g ? 360 : 0;
        h = (g - b) * 60 / z + t1;
      } else
        h = y === g ? (b - r) * 60 / z + 120 : (r - g) * 60 / z + 240;
      l = (x + y) / 510;
      return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["h", h, "s", z / (255 * P.min(l, 1 - l)), "l", l, "a", rgb.$index(0, "a")]));
    },
    ByondJS_hsl2rgb: function(hsl) {
      var h, s, l, d, x, y, z, i, ar;
      h = hsl.$index(0, "h");
      s = hsl.$index(0, "s");
      l = hsl.$index(0, "l");
      d = s * P.min(l, 1 - l);
      x = C.JSInt_methods.clamp$2(C.JSNumber_methods.round$0((l - d) * 255), 0, 255);
      y = C.JSInt_methods.clamp$2(C.JSNumber_methods.round$0((l + d) * 255), 0, 255);
      z = C.JSNumber_methods.round$0(x + Math.abs(60 - C.JSNumber_methods.$mod(h + 60, 120)) / 60 * (y - x));
      i = C.JSNumber_methods._tdivFast$1(C.JSNumber_methods.$mod(h, 360), 60);
      ar = [x, x, z, y, y, z, x, x, z, y];
      return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["r", ar[i + 4], "g", ar[i + 2], "b", ar[i], "a", hsl.$index(0, "a")]));
    },
    ByondJS_grayscale: function(rgb) {
      return J.$div$n(J.$add$ns(J.$add$ns(J.$mul$ns(rgb.$index(0, "r"), 0.3), J.$mul$ns(rgb.$index(0, "g"), 0.59)), J.$mul$ns(rgb.$index(0, "b"), 0.11)), 255);
    },
    ByondJS_shade: function(rgb, shade) {
      var hsl = N.ByondJS_rgb2hsl(rgb);
      if (N.ByondJS_grayscale(rgb) > 0.5)
        shade = -shade;
      hsl.$indexSet(0, "l", J.clamp$2$n(J.$add$ns(hsl.$index(0, "l"), shade), 0, 1));
      return N.ByondJS_hsl2rgb(hsl);
    },
    ByondJS_cssColor: [function(args) {
      var t1, v;
      t1 = J.getInterceptor$asx(args);
      if (t1.get$length(args) < 2)
        return;
      v = t1.get$length(args) > 2 ? t1.$index(args, 2) : null;
      if (v == null)
        return N.ByondJS_rgb2hex(N.ByondJS_css2rgb(N.ByondJS_css(args), false), 1, true);
      if (J.$eq$(v, "none"))
        t1.$indexSet(args, 2, "");
      return N.ByondJS_css(args);
    }, "call$1", "webclient_ByondJS_cssColor$closure", 2, 0, 11, 16],
    ByondJS_toPx: function(unit) {
      var t1, t2, t3, t4, match, f;
      t1 = $.$get$ByondJS__toPxMap();
      if (t1.$index(0, unit) != null)
        return t1.$index(0, unit);
      t2 = W._ElementFactoryProvider_createElement_tag("div", null);
      N.ByondJS_backstage().appendChild(t2);
      t3 = t2.style;
      t4 = C.JSString_methods.$add("100", unit);
      t3.fontSize = t4;
      t3 = $.$get$ByondJS__unitsRx();
      t4 = N.ByondJS_css([t2, "fontSize"]);
      t3.toString;
      t4.length;
      match = t3._execAnchored$2(t4, 0);
      f = match == null ? 1 : H.Primitives_parseDouble(match._match[0], new N.ByondJS_toPx_closure()) / 100;
      if (f <= 0)
        f = 1;
      t1.$indexSet(0, unit, f);
      t1 = t2.parentNode;
      if (t1 != null)
        t1.removeChild(t2);
      return f;
    },
    ByondJS_cssUnit: function(args) {
      var t1, e, unit, t2, t3, k, t4, p, v, match;
      t1 = args.length;
      if (t1 < 3)
        return;
      e = args[0];
      unit = args[1];
      t2 = args[2];
      t3 = J.getInterceptor(t2);
      if (!!t3.$isJsObject) {
        k = N.ByondJS_keys(t2);
        for (t1 = J.get$iterator$ax(k.__internal$_iterable), t4 = new H.WhereIterator(t1, k._f, [H.getTypeArgumentByIndex(k, 0)]); t4.moveNext$0();) {
          p = t1.get$current();
          N.ByondJS_cssUnit([e, unit, p, t3.$index(t2, p)]);
        }
        return;
      }
      v = t1 > 3 ? args[3] : null;
      if (v == null) {
        v = N.ByondJS_css([e, t2]);
        t1 = $.$get$ByondJS__unitsRx();
        t1.toString;
        v.length;
        match = t1._execAnchored$2(v, 0);
        if (match == null)
          return 0;
        v = H.Primitives_parseDouble(match._match[0], new N.ByondJS_cssUnit_closure());
        return unit === "px" ? v : v / N.ByondJS_toPx(unit);
      }
      if (typeof v === "number")
        v = C.JSString_methods.$add(C.JSNumber_methods.toString$0(v), unit);
      else {
        if (typeof v === "string") {
          t1 = $.$get$ByondJS__numOnlyRx();
          t3 = C.JSString_methods.trim$0(v);
          t1 = t1._nativeRegExp;
          t1 = t1.test(t3);
        } else
          t1 = false;
        if (t1)
          v = J.$add$ns(v, unit);
      }
      return N.ByondJS_css([e, t2, v]);
    },
    ByondJS_cssPx: [function(args) {
      var t1 = P.List_List$from(args, true, null);
      C.JSArray_methods.insert$2(t1, 1, "px");
      return N.ByondJS_cssUnit(t1);
    }, "call$1", "webclient_ByondJS_cssPx$closure", 2, 0, 11, 16],
    ByondJS_cssPt: [function(args) {
      var t1 = J.getInterceptor$asx(args);
      if (t1.get$length(args) > 2)
        t1 = J.$eq$(t1.$index(args, 2), 0) || J.$eq$(t1.$index(args, 2), "");
      else
        t1 = false;
      if (t1) {
        t1 = P.List_List$from(args, true, null);
        t1[2] = "";
        return N.ByondJS_css(t1);
      }
      t1 = P.List_List$from(args, true, null);
      C.JSArray_methods.insert$2(t1, 1, "pt");
      return N.ByondJS_cssUnit(t1);
    }, "call$1", "webclient_ByondJS_cssPt$closure", 2, 0, 11, 16],
    ByondJS_innerSize: function(elem) {
      var t1, x, y, t2, t3;
      if (elem != null) {
        t1 = J.getInterceptor(elem);
        t1 = !!t1.$isDocument || !!t1.$isWindow;
      } else
        t1 = true;
      if (t1)
        return new P.Point(window.innerWidth, window.innerHeight, [null]);
      if (!!J.getInterceptor(elem).$isElement) {
        x = C.JSNumber_methods.round$0(elem.offsetWidth);
        y = C.JSNumber_methods.round$0(elem.offsetHeight);
        t1 = P.List_List$from([elem, "padding-left"], true, null);
        C.JSArray_methods.insert$2(t1, 1, "px");
        t1 = N.ByondJS_cssUnit(t1);
        t2 = P.List_List$from([elem, "padding-right"], true, null);
        C.JSArray_methods.insert$2(t2, 1, "px");
        t2 = J.$add$ns(t1, N.ByondJS_cssUnit(t2));
        t1 = P.List_List$from([elem, "border-left"], true, null);
        C.JSArray_methods.insert$2(t1, 1, "px");
        t1 = J.$add$ns(t2, N.ByondJS_cssUnit(t1));
        t2 = P.List_List$from([elem, "border-right"], true, null);
        C.JSArray_methods.insert$2(t2, 1, "px");
        t2 = J.$add$ns(t1, N.ByondJS_cssUnit(t2));
        t1 = P.List_List$from([elem, "padding-top"], true, null);
        C.JSArray_methods.insert$2(t1, 1, "px");
        t1 = N.ByondJS_cssUnit(t1);
        t3 = P.List_List$from([elem, "padding-bottom"], true, null);
        C.JSArray_methods.insert$2(t3, 1, "px");
        t3 = J.$add$ns(t1, N.ByondJS_cssUnit(t3));
        t1 = P.List_List$from([elem, "border-top"], true, null);
        C.JSArray_methods.insert$2(t1, 1, "px");
        t1 = J.$add$ns(t3, N.ByondJS_cssUnit(t1));
        t3 = P.List_List$from([elem, "border-bottom"], true, null);
        C.JSArray_methods.insert$2(t3, 1, "px");
        return new P.Point(x - t2, y - J.$add$ns(t1, N.ByondJS_cssUnit(t3)), [null]);
      }
      return new P.Point(0, 0, [null]);
    },
    ByondJS_cssUrl: function(args) {
      var t1, e, prop, url, i, t2;
      t1 = args.length;
      if (t1 < 2)
        return;
      e = args[0];
      prop = args[1];
      url = t1 > 2 ? args[2] : null;
      if (url == null) {
        t1 = J.getComputedStyle$0$x(e);
        url = C.JSString_methods.trim$0((t1 && C.CssStyleDeclaration_methods).getPropertyValue$1(t1, N.ByondJS_fromCamel(prop)));
        if (C.JSString_methods.startsWith$1(url, "url('") && C.JSString_methods.endsWith$1(url, "')"))
          url = C.JSString_methods.substring$2(url, 5, url.length - 2);
        else if (C.JSString_methods.startsWith$1(url, 'url("') && C.JSString_methods.endsWith$1(url, '")'))
          url = C.JSString_methods.substring$2(url, 5, url.length - 2);
        else if (C.JSString_methods.startsWith$1(url, "url(") && C.JSString_methods.endsWith$1(url, ")"))
          url = C.JSString_methods.substring$2(url, 4, url.length - 1);
        else
          return "";
        i = C.JSString_methods.indexOf$1(url, "\\");
        t1 = i + 1;
        t2 = i >= 0;
        while (true) {
          if (!(t2 && t1 < url.length))
            break;
          url = C.JSString_methods.substring$2(url, 0, i) + C.JSString_methods.substring$1(url, t1);
          C.JSString_methods.indexOf$2(url, "\\", t1);
        }
        if (C.JSString_methods.startsWith$1(url, "http://" + H.S($.me.host) + ":" + H.S($.me.port)))
          url = C.JSString_methods.substring$1(url, ("http://" + H.S($.me.host) + ":" + H.S($.me.port)).length);
        for (; C.JSString_methods.startsWith$1(url, "/");)
          url = C.JSString_methods.substring$1(url, 1);
        return url;
      }
      if (url === "none")
        url = "";
      else {
        t1 = H.stringReplaceAllUnchecked(url, "\\", "\\\\");
        t1.toString;
        url = C.JSString_methods.$add("url('", H.stringReplaceAllUnchecked(t1, "'", "\\'")) + "')";
      }
      N.ByondJS_css([e, prop, url]);
    },
    ByondJS_controlStyles: function(control, create) {
      var cfg, t1, s, t2, $top, sheet;
      cfg = control.$index(0, "config");
      t1 = J.getInterceptor(cfg);
      if (!t1.$isJsObject)
        return;
      s = t1.$index(cfg, "stylesheet");
      if (!J.getInterceptor(s).$isStyleElement) {
        if (!create)
          return;
        t2 = document;
        $top = t2.body;
        s = t2.createElement("style");
        t1.$indexSet(cfg, "stylesheet", s);
        $top.appendChild(s);
      }
      sheet = H.interceptedTypeCast(s, "$isStyleElement").sheet;
      if (!J.getInterceptor(sheet).$isCssStyleSheet)
        return;
      return sheet;
    },
    ByondJS_getControlCssRule: function(control, selector) {
      var sheet, prefix, rules, selectors, n, rule, i, rule0;
      sheet = N.ByondJS_controlStyles(control, false);
      if (sheet == null)
        return;
      prefix = C.JSString_methods.$add("#", control.$index(0, "id")) + " ";
      rules = sheet.rules;
      selectors = P.LinkedHashMap_LinkedHashMap$fromIterable(selector.split(","), new N.ByondJS_getControlCssRule_closure(prefix), new N.ByondJS_getControlCssRule_closure0(), null, null);
      n = rules.length;
      for (rule = null, i = 0; i < n; ++i) {
        rule0 = rules[i];
        if (!J.getInterceptor(rule0).$isCssStyleRule)
          continue;
        if (J.$eq$(selectors.$index(0, J.trim$0$s(rule0.selectorText)), true))
          return rule0.style.cssText;
        rule = rule0;
      }
      return;
    },
    ByondJS_setControlCssRule: function(control, selector, text) {
      var t1, t2, t3, sheet, prefix, rules, selectors, i, s, i0, t4;
      t1 = {};
      t2 = text == null;
      t3 = !t2;
      sheet = N.ByondJS_controlStyles(control, t3);
      if (sheet == null)
        return t3 ? null : 0;
      prefix = C.JSString_methods.$add("#", control.$index(0, "id")) + " ";
      rules = sheet.rules;
      t1.rules = rules;
      t1.rule = null;
      selectors = P.LinkedHashMap_LinkedHashMap$fromIterable(selector.split(","), new N.ByondJS_setControlCssRule_closure(prefix), new N.ByondJS_setControlCssRule_closure0(), null, null);
      t1.ret = null;
      if (t2)
        t1.ret = 0;
      for (i = rules.length, s = null; i0 = i - 1, i > 0; i = i0) {
        t4 = t1.rules[i0];
        if (!J.getInterceptor(t4).$isCssStyleRule)
          continue;
        t1.rule = t4;
        s = J.trim$0$s(t4.selectorText);
        if (J.$eq$(selectors.$index(0, s), true)) {
          if (t2) {
            t1.ret = J.$add$ns(t1.ret, 1);
            sheet.deleteRule(i0);
          } else {
            t4 = t1.rule;
            t4.style.cssText = text;
            t1.ret = t4.style.cssText;
          }
          selectors.remove$1(0, s);
        }
      }
      if (t3)
        selectors.get$keys().forEach$1(0, new N.ByondJS_setControlCssRule_closure1(t1, text, sheet));
      return t1.ret;
    },
    ByondJS_controlCssAttr: function(control, selector, vals) {
      var t1, t2, c, sheet, prefix, rules, t3, selectors, names, nl, i, s, i0, propValue, j, $name, val, t4, value;
      t1 = {};
      t1.selector = selector;
      t2 = vals instanceof P.JsObject;
      if (!t2 && typeof vals !== "string")
        return;
      if (t2 && J.$eq$(control.$index(0, "loading"), true)) {
        c = control.$index(0, "_loadCompleter");
        if (c != null) {
          c.future.then$1(new N.ByondJS_controlCssAttr_closure(t1, control, vals));
          return;
        }
      }
      sheet = N.ByondJS_controlStyles(control, t2);
      if (sheet == null)
        return;
      prefix = C.JSString_methods.$add("#", control.$index(0, "id")) + " ";
      rules = sheet.rules;
      t1.rules = rules;
      t1.rule = null;
      if (selector == null) {
        t1.selector = "";
        t3 = "";
      } else
        t3 = selector;
      selectors = P.LinkedHashMap_LinkedHashMap$fromIterable(t3.split(","), new N.ByondJS_controlCssAttr_closure0(prefix), new N.ByondJS_controlCssAttr_closure1(), null, null);
      names = t2 ? P.List_List$from(N.ByondJS_keys(vals), true, null) : [vals];
      t1.j = null;
      nl = names.length;
      t1.name = null;
      t1.val = null;
      for (i = rules.length, s = null; i0 = i - 1, i > 0; i = i0) {
        t2 = t1.rules[i0];
        if (!J.getInterceptor(t2).$isCssStyleRule)
          continue;
        t1.rule = t2;
        s = J.trim$0$s(t2.selectorText);
        if (J.$eq$(selectors.$index(0, s), true)) {
          t2 = J.getInterceptor(vals);
          if (!t2.$isJsObject) {
            t2 = t1.rule.style;
            propValue = (t2 && C.CssStyleDeclaration_methods)._getPropertyValueHelper$1(t2, N.ByondJS_fromCamel(vals));
            return propValue != null ? propValue : "";
          }
          for (t1.j = 0, t3 = 0; t3 < nl; j = t1.j + 1, t1.j = j, t3 = j) {
            $name = names[t3];
            t1.name = $name;
            if (typeof $name !== "string")
              continue;
            val = t2.$index(vals, $name);
            t1.val = val;
            if (typeof val === "number") {
              val = J.toString$0$(val) + "px";
              t1.val = val;
              t3 = val;
            } else
              t3 = val;
            if (t3 == null)
              t1.rule.style.removeProperty(N.ByondJS_fromCamel(t1.name));
            else if (typeof t3 === "string") {
              t3 = t1.rule.style;
              t4 = N.ByondJS_fromCamel(t1.name);
              value = t1.val;
              t4 = (t3 && C.CssStyleDeclaration_methods)._browserPropertyName$1(t3, t4);
              if (value == null)
                value = "";
              t3.setProperty(t4, value, "");
            }
          }
          if (t1.rule.style.cssText.length === 0)
            sheet.deleteRule(i0);
          selectors.remove$1(0, s);
        }
      }
      if (vals instanceof P.JsObject)
        selectors.get$keys().forEach$1(0, new N.ByondJS_controlCssAttr_closure2(t1, vals, sheet, names, nl));
      return;
    },
    ByondJS_attr: [function(args) {
      var e, $name, value, _, _0, t1, t2, t3, t4, t5, exception, line;
      t1 = J.getInterceptor$asx(args);
      if (t1.get$length(args) < 2)
        return;
      e = t1.$index(args, 0);
      $name = null;
      value = null;
      if (t1.$index(args, 1) instanceof P.JsObject)
        for (t2 = N.ByondJS_keys(t1.$index(args, 1)), t3 = J.get$iterator$ax(t2.__internal$_iterable), t2 = new H.WhereIterator(t3, t2._f, [H.getTypeArgumentByIndex(t2, 0)]); t2.moveNext$0();) {
          $name = t3.get$current();
          try {
            t4 = J.$index$asx(t1.$index(args, 1), $name);
            if (typeof t4 === "number")
              J.setAttribute$2$x(e, $name, J.toString$0$(J.$index$asx(t1.$index(args, 1), $name)));
            else if (J.$index$asx(t1.$index(args, 1), $name) == null) {
              t4 = e;
              t4.toString;
              t5 = $name;
              t4.getAttribute(t5);
              t4.removeAttribute(t5);
            } else {
              t4 = J.$index$asx(t1.$index(args, 1), $name);
              if (typeof t4 === "string")
                J.setAttribute$2$x(e, $name, J.$index$asx(t1.$index(args, 1), $name));
            }
          } catch (exception) {
            t4 = H.unwrapException(exception);
            _ = t4;
            line = H.S(_);
            t4 = $.printToZone;
            if (t4 == null)
              H.printString(line);
            else
              t4.call$1(line);
          }
        }
      t2 = t1.$index(args, 1);
      if (typeof t2 !== "string")
        return;
      $name = t1.$index(args, 1);
      if (t1.get$length(args) < 3)
        return J.getAttribute$1$x(e, $name);
      t2 = t1.$index(args, 2);
      if (typeof t2 === "number")
        value = J.toString$0$(t1.$index(args, 2));
      else {
        t2 = t1.$index(args, 2);
        if (typeof t2 !== "string" && t1.$index(args, 2) != null)
          return;
        value = t1.$index(args, 2);
      }
      try {
        if (value != null)
          J.setAttribute$2$x(e, $name, value);
        else {
          t1 = e;
          t1.toString;
          t2 = $name;
          t1.getAttribute(t2);
          t1.removeAttribute(t2);
        }
      } catch (exception) {
        t1 = H.unwrapException(exception);
        _0 = t1;
        line = H.S(_0);
        t1 = $.printToZone;
        if (t1 == null)
          H.printString(line);
        else
          t1.call$1(line);
      }
      return;
    }, "call$1", "webclient_ByondJS_attr$closure", 2, 0, 11, 16],
    ByondJS_elementContains: [function($parent, child) {
      if (child == null || $parent == null)
        return false;
      if (child == null ? $parent == null : child === $parent)
        return true;
      for (; child = child.parentNode, !!J.getInterceptor(child).$isElement;)
        if (child == null ? $parent == null : child === $parent)
          return true;
      return false;
    }, "call$2", "webclient_ByondJS_elementContains$closure", 4, 0, 77, 7, 62],
    ByondJS_controlChildren: function($parent, all, children) {
      var t1, returns, n, c;
      t1 = J.getInterceptor($parent);
      if (!!t1.$isJsObject)
        $parent = t1.$index($parent, "top");
      if (!J.getInterceptor($parent).$isElement) {
        t1 = [];
        C.JSArray_methods.addAll$1(t1, C.JSArray_methods.map$1([], P.js___convertToJS$closure()));
        return new P.JsArray(t1, [null]);
      }
      returns = children == null;
      if (returns)
        children = [];
      for (n = $parent.firstChild, t1 = all !== true, c = null; n != null; n = n.nextSibling) {
        if (!J.getInterceptor(n).$isElement)
          continue;
        c = $.$get$ByondJS_skin().find$1(0, n);
        if (c != null) {
          children.push(c);
          if (t1)
            continue;
        }
        N.ByondJS_controlChildren(n, all, children);
      }
      if (returns) {
        t1 = [];
        C.JSArray_methods.addAll$1(t1, (children && C.JSArray_methods).map$1(children, P.js___convertToJS$closure()));
        t1 = new P.JsArray(t1, [null]);
      } else
        t1 = null;
      return t1;
    },
    ByondJS_onDomLoaded: function(callback) {
      var t1, t2;
      t1 = new N.ByondJS_onDomLoaded_done(callback);
      if (document.readyState === "complete") {
        P.print("DOM has already loaded");
        t1.call$0();
        return;
      }
      P.print("Adding listener for DOM load event");
      t2 = window;
      C.Window_methods._addEventListener$3(t2, "load", new N.ByondJS_onDomLoaded_ondone(t1), null);
    },
    ByondJS_dmEscape: function(arg, quote) {
      var t1;
      if (quote != null) {
        t1 = H.stringReplaceAllUnchecked(H.stringReplaceAllFuncUnchecked(arg, P.RegExp_RegExp("([" + quote + "\\\\])", true, false), new N.ByondJS_dmEscape_closure(), null), "\t", "\\t");
        t1.toString;
        t1 = H.stringReplaceAllUnchecked(t1, "\n", "\\n");
        t1.toString;
        arg = C.JSString_methods.$add(quote, H.stringReplaceAllUnchecked(t1, "\r", "")) + quote;
      } else {
        t1 = H.stringReplaceAllUnchecked(arg, "\\", "\\\\");
        t1.toString;
        arg = H.stringReplaceAllUnchecked(t1, "s*", "-");
      }
      return arg;
    },
    ByondJS_iconUrl: [function(a) {
      var t1, l, names, params, i, t2, t3, k, id, state, dir, frame, moving, info, s, icon;
      t1 = J.getInterceptor$asx(a);
      l = t1.get$length(a);
      names = ["icon", "state", "dir", "frame", "moving"];
      params = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
      for (i = 0; i < l; ++i)
        if (t1.$index(a, i) instanceof P.JsObject) {
          for (t2 = N.ByondJS_keys(t1.$index(a, i)), t3 = J.get$iterator$ax(t2.__internal$_iterable), t2 = new H.WhereIterator(t3, t2._f, [H.getTypeArgumentByIndex(t2, 0)]); t2.moveNext$0();) {
            k = t3.get$current();
            params.$indexSet(0, k, J.$index$asx(t1.$index(a, i), k));
          }
          break;
        } else if (i < 5)
          params.$indexSet(0, names[i], t1.$index(a, i));
      id = J.round$0$n(N.ByondJS_toNum(params.$index(0, "icon"), false));
      t1 = params.$index(0, "state");
      state = typeof t1 === "string" ? params.$index(0, "state") : null;
      dir = J.round$0$n(N.ByondJS_toNum(params.$index(0, "dir"), false));
      frame = J.round$0$n(N.ByondJS_toNum(params.$index(0, "frame"), false));
      --frame;
      if (frame < 0)
        frame = null;
      moving = N.ByondJS_toBool(params.$index(0, "moving"), true);
      info = $.me.iconInfoMap.$index(0, id);
      if (info == null)
        return;
      s = info.stateFor$2(state, moving);
      if (s == null)
        return;
      icon = info.icons[s.IconFrame$2(dir, frame)];
      if (icon != null && icon.get$bounds() != null && icon.get$bitmapData() != null) {
        t1 = icon.get$bitmapData().clone$0(0).renderTextureQuad.renderTexture;
        return t1.get$canvas(t1).toDataURL("image/png", null);
      }
      return;
    }, "call$1", "webclient_ByondJS_iconUrl$closure", 2, 0, 30, 0],
    ByondJS_atomsInUse: function() {
      var atoms, result, val, ctrl, _, t1, t2, _i, t3, t4, exception, line;
      atoms = P.LinkedHashMap__makeEmpty();
      result = null;
      val = null;
      for (t1 = new W._FrozenElementList(document.querySelectorAll("[atom]"), [null]), t1 = new H.ListIterator(t1, t1.get$length(t1), 0, null); t1.moveNext$0();) {
        val = H.Primitives_parseInt(t1.__internal$_current.getAttribute("atom"), null, new N.ByondJS_atomsInUse_closure());
        if (val != null)
          J.$indexSet$ax(atoms, val, true);
      }
      for (t1 = $.$get$ByondJS_skin().controls, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
        ctrl = t1[_i];
        try {
          result = ctrl.callMethod$1("atomsInUse");
          if (result instanceof P.JsArray)
            for (t3 = result, t3 = new H.ListIterator(t3, J.get$length$asx(t3), 0, null); t3.moveNext$0();) {
              val = t3.__internal$_current;
              t4 = val;
              if (typeof t4 === "string")
                val = H.Primitives_parseInt(val, null, new N.ByondJS_atomsInUse_closure0());
              else {
                t4 = val;
                if (typeof t4 === "number")
                  val = J.floor$0$n(val);
              }
              t4 = val;
              if (typeof t4 === "number" && Math.floor(t4) === t4)
                J.$indexSet$ax(atoms, val, true);
            }
        } catch (exception) {
          t3 = H.unwrapException(exception);
          _ = t3;
          line = H.S(_);
          t3 = $.printToZone;
          if (t3 == null)
            H.printString(line);
          else
            t3.call$1(line);
        }
      }
      return J.toList$0$ax(atoms.get$keys());
    },
    ByondJS_garbageScan: function() {
      var t1, t2, _i, id, atom;
      for (t1 = N.ByondJS_atomsInUse(), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
        id = t1[_i];
        atom = $.me.infoMap.$index(0, id);
        if (atom != null)
          atom.garbageScan$0();
      }
    },
    ByondJS_methods: function() {
      return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["toCamelCase", N.webclient_ByondJS_toCamel$closure(), "fromCamelCase", N.webclient_ByondJS_fromCamel$closure(), "sanitizeId", N.webclient_ByondJS_sanitizeId$closure(), "htmlEncode", new N.ByondJS_methods_closure(), "htmlDecode", new N.ByondJS_methods_closure0(), "stripHtml", new N.ByondJS_methods_closure1(), "simpleHtml", new N.ByondJS_methods_closure2(), "winset2bool", new N.ByondJS_methods_closure3(), "winset2num", new N.ByondJS_methods_closure4(), "winset2xy", new N.ByondJS_methods_closure5(), "dmEncode", new N.ByondJS_methods_closure6(), "filearg", new N.ByondJS_methods_closure7(), "extend", N.ByondJS__wrapChain(N.webclient_ByondJS_extend$closure()), "tryExtend", N.ByondJS__wrapChain(N.webclient_ByondJS_tryExtend$closure()), "extendUnused", N.ByondJS__wrapChain(N.webclient_ByondJS_extendUnused$closure()), "extendDeep", N.ByondJS__wrapChain(N.webclient_ByondJS_extendDeep$closure()), "fixjs", $.$get$context().callMethod$2("eval", ["(function(f){\r\n\t\t\tvar m,l,s=f.toString(),i=s.indexOf('{')+1,j=s.lastIndexOf('}');\r\n\t\t\ts=s.substr(i,j-i).trim();\r\n\t\t\twhile((m=s.match(/((window|document)\\.location(\\.href)?\\s*=\\s*)/))){i=m.index;l=m[0].length;j=s.indexOf(';',i+l);if(j<0)j=s.length;s=s.substr(0,i)+'byond.go('+s.substr(i+l,j-i-l)+')'+s.substr(j);}\r\n\t\t\ttry{window.eval(s);}catch(_){}\r\n\t\t})"]), "domain", new N.ByondJS_methods_closure8(), "url", new N.ByondJS_methods_closure9(), "cacheUrl", new N.ByondJS_methods_closure10(), "iconUrl", N.ByondJS__wrapVarArgs(N.webclient_ByondJS_iconUrl$closure()), "fileUrl", new N.ByondJS_methods_closure11(), "isByondUrl", N.ByondJS__wrapVarArgs(new N.ByondJS_methods_closure12()), "stage", new N.ByondJS_methods_closure13(), "backstage", new N.ByondJS_methods_closure14(), "isBackstage", N.ByondJS__wrapVarArgs(new N.ByondJS_methods_closure15()), "frameMsg", new N.ByondJS_methods_closure16(), "attr", N.ByondJS__wrapVarArgs(N.webclient_ByondJS_attr$closure()), "css", N.ByondJS__wrapVarArgs(N.webclient_ByondJS_css$closure()), "cssColor", N.ByondJS__wrapVarArgs(N.webclient_ByondJS_cssColor$closure()), "cssPx", N.ByondJS__wrapVarArgs(N.webclient_ByondJS_cssPx$closure()), "cssPt", N.ByondJS__wrapVarArgs(N.webclient_ByondJS_cssPt$closure()), "toPx", N.ByondJS__wrapVarArgs(new N.ByondJS_methods_closure17()), "css2rgb", N.webclient_ByondJS_css2rgb$closure(), "rgb2hex", N.webclient_ByondJS_rgb2hex$closure(), "defaultColor", N.webclient_ByondJS_defaultColor$closure(), "font2css", N.ByondJS__wrapVarArgs(new N.ByondJS_methods_closure18()), "css2font", N.ByondJS__wrapVarArgs(new N.ByondJS_methods_closure19()), "contains", N.webclient_ByondJS_elementContains$closure(), "controlFor", N.ByondJS__wrapClosure(new N.ByondJS_methods_closure20(), 1), "children", N.ByondJS__wrapClosure(new N.ByondJS_methods_closure21(), 2), "pos", N.ByondJS__wrapClosure(new N.ByondJS_methods_closure22(), 1), "innerSize", new N.ByondJS_methods_closure23(), "fillAtomIcons", new N.ByondJS_methods_closure24(), "mapConfig", new N.ByondJS_methods_closure25(), "hasMacro", new N.ByondJS_methods_closure26(), "getMacro", new N.ByondJS_methods_closure27(), "getMacros", new N.ByondJS_methods_closure28(), "isCharKey", new N.ByondJS_methods_closure29(), "userMacros", new N.ByondJS_methods_closure30(), "fireMacro", new N.ByondJS_methods_closure31(), "parseMacro", new N.ByondJS_methods_closure32(), "keyEvent", new N.ByondJS_methods_closure33(), "gamepadEvent", new N.ByondJS_methods_closure34(), "unstickKeys", new N.ByondJS_methods_closure35(), "poll", new N.ByondJS_methods_closure36()]));
    },
    ByondJS_classMethods: function() {
      return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["create", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure()), "postLoad", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure0()), "output", new N.ByondJS_classMethods_closure1(), "clear", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure2()), "content", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure3()), "remove", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure4()), "keyEvent", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure5()), "link", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure6()), "winset", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure7()), "winget", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure8()), "popup", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure9()), "popdown", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure10()), "stats", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure11()), "dockOrder", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure12()), "onbrowserupdate", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure13()), "onsize", N.ByondJS__wrapEvent("onSize", "size"), "onshow", N.ByondJS__wrapEvent("onShow", null), "onhide", N.ByondJS__wrapEvent("onHide", null), "onclose", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure14()), "paneAdopted", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure15()), "titleChanged", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure16()), "adopt", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure17()), "parent", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure18()), "_pop", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure19()), "dock", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure20()), "isBackstage", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure21()), "setAnchors", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure22()), "reanchor", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure23()), "input", N.ByondJS__wrapClosure(new N.ByondJS_classMethods_closure24(), 1), "expand", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure25()), "topic", N.ByondJS__wrapClosure(new N.ByondJS_classMethods_closure26(), 1), "mouse", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure27()), "captureMouse", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure28()), "releaseMouse", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure29()), "mouseReleased", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure30()), "mouseEvent", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure31()), "dragTarget", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure32()), "iconInfo", N.ByondJS__wrapClosure(new N.ByondJS_classMethods_closure33(), 1), "atomInfo", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure34()), "atomVerbs", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure35()), "atomIcon", N.ByondJS__wrapClosure(new N.ByondJS_classMethods_closure36(), 1), "atomsInUse", new N.ByondJS_classMethods_closure37(), "cssRule", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure38()), "css", N.ByondJS__wrapControl(new N.ByondJS_classMethods_closure39())]));
    },
    ByondJS__wrapWinset: function(f) {
      return $.$get$context().callMethod$2("eval", ["(function(f){\r\n\t\t\treturn function(a,b){return f(this,a,b);};\r\n\t\t})"]).apply$1([f]);
    },
    ByondJS__wrapWinsetCss: function(fn, prop, none) {
      return $.$get$context().callMethod$2("eval", ["(function(f,c,n){\r\n\t\t\treturn function(a,b){return (a==null||a===undefined||a!=n) ? f([this.content(b),c,a]) : byond.css(this.content(b),c,'');};\r\n\t\t})"]).apply$1([fn, prop, none]);
    },
    ByondJS__clampAnchor: function(a) {
      return new P.Point(J.clamp$2$n(a.x, 0, 100), J.clamp$2$n(a.y, 0, 100), [null]);
    },
    ByondJS__cssAnchor: function(px, anchor, width) {
      anchor = C.JSNumber_methods.clamp$2(anchor, 0, 100);
      if (anchor === 0)
        return H.S(px) + "px";
      px -= C.JSDouble_methods.round$0(anchor * width / 100);
      return px === 0 ? H.S(anchor) + "%" : "calc(" + H.S(anchor) + "% + " + H.S(px) + "px)";
    },
    ByondJS__wrapWinsetEventHandler: function(p) {
      return N.ByondJS__wrapWinset(new N.ByondJS__wrapWinsetEventHandler_closure(p));
    },
    ByondJS_winsetMethods: function() {
      return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["type", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure()), "title", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure0()), "color", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure1()), "textColor", N.ByondJS__wrapWinsetCss(N.webclient_ByondJS_cssColor$closure(), "color", null), "backgroundColor", N.ByondJS__wrapWinsetCss(N.webclient_ByondJS_cssColor$closure(), "backgroundColor", null), "textAlign", N.ByondJS__wrapWinsetCss(N.webclient_ByondJS_css$closure(), "textAlign", null), "fontSize", N.ByondJS__wrapWinsetCss(N.webclient_ByondJS_cssPt$closure(), "fontSize", 0), "fontFamily", N.ByondJS__wrapWinsetCss(N.webclient_ByondJS_css$closure(), "fontFamily", null), "fontStyle", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure2()), "image", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure3()), "icon", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure4()), "isVisible", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure5()), "onSize", N.ByondJS__wrapWinsetEventHandler("onSize"), "onShow", N.ByondJS__wrapWinsetEventHandler("onShow"), "onHide", N.ByondJS__wrapWinsetEventHandler("onHide"), "onClose", N.ByondJS__wrapWinsetEventHandler("onClose"), "pos", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure6()), "size", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure7()), "anchor1", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure8()), "anchor2", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure9()), "focus", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure10()), "macro", N.ByondJS__wrapWinset(new N.ByondJS_winsetMethods_closure11())]));
    },
    ByondJS_promptMethods: function() {
      return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["create", N.ByondJS__wrapControl(new N.ByondJS_promptMethods_closure()), "fill", new N.ByondJS_promptMethods_closure0(), "show", N.ByondJS__wrapControl(new N.ByondJS_promptMethods_closure1()), "onshow", N.ByondJS__wrapControl(new N.ByondJS_promptMethods_closure2()), "reply", N.ByondJS__wrapControl(new N.ByondJS_promptMethods_closure3()), "cancel", N.ByondJS__wrapControl(new N.ByondJS_promptMethods_closure4()), "onclose", N.ByondJS__wrapControl(new N.ByondJS_promptMethods_closure5()), "onclickoff", N.ByondJS__wrapControl(new N.ByondJS_promptMethods_closure6()), "cleanup", N.ByondJS__wrapControl(new N.ByondJS_promptMethods_closure7())]));
    },
    ByondJS_builtinCommands: function() {
      return P.LinkedHashMap__makeLiteral(["winset", new N.ByondJS_builtinCommands_closure(), "skin", new N.ByondJS_builtinCommands_closure0()]);
    },
    niceNum: function(n) {
      var ret, i, t1;
      if (typeof n !== "number")
        return n == null ? "0" : J.toString$0$(n);
      ret = C.JSNumber_methods.toStringAsFixed$1(n, 4);
      if (C.JSString_methods.endsWith$1(ret, "0") && C.JSString_methods.indexOf$1(ret, ".") >= 0) {
        i = ret.length - 1;
        for (; t1 = ret[i], t1 === "0";)
          --i;
        ret = C.JSString_methods.substring$2(ret, 0, (t1 === "." ? i - 1 : i) + 1);
      }
      return ret;
    },
    IsTurf: [function(n) {
      return J.$and$n(n, 4278190080) === 16777216;
    }, "call$1", "webclient__IsTurf$closure", 2, 0, 70],
    XYZtoTurfIdCheck: function(x, y, z) {
      var ms = $.me.mapInfo;
      if (x < 0 || y < 0 || z < 0 || x >= ms.maxx || y >= ms.maxy || z >= ms.maxz)
        return 0;
      return (x + (y + z * ms.maxy) * ms.maxx | 16777216) >>> 0;
    },
    main: [function() {
      P.print("Setting DOM load callback");
      $.ByondJS__onready = N.webclient__startServer$closure();
      if ($.ByondJS__domloaded)
        N.ByondJS_start();
      N.ByondJS_create();
    }, "call$0", "webclient__main$closure", 0, 0, 3],
    startServer: [function() {
      $.me = N.ByondClient$();
    }, "call$0", "webclient__startServer$closure", 0, 0, 3],
    AtomColorMatrix: {
      "^": "Object;matrix,inUse,_strHash",
      _copyMatrix$1: function(m) {
        var t1, i, i0;
        m.length;
        for (t1 = this.matrix, i = 20; i0 = i - 1, i > 0; i = i0)
          t1[i0] = m[i0];
        this.normalize$0();
      },
      canon$0: function() {
        var t1, c;
        t1 = $.me.canonicalColorMatrixMap;
        c = t1.$index(0, this.get$strHash());
        if (c == null) {
          $.me.canonicalColorMatrixMap.$indexSet(0, this.get$strHash(), this);
          c = this;
        }
        return c;
      },
      get$strHash: function() {
        var t1 = this._strHash;
        if (t1 == null) {
          t1 = this.matrix;
          t1.toString;
          t1 = new H.MappedListIterable(t1, new N.AtomColorMatrix_strHash_closure(), [null, null]).join$1(0, ",");
          this._strHash = t1;
        }
        return t1;
      },
      get$hashCode: function(_) {
        return J.get$hashCode$(this.get$strHash());
      },
      eq$1: function(other) {
        var m1, m2, i, i0;
        m1 = this.matrix;
        m2 = other.matrix;
        for (i = 20; i0 = i - 1, i > 0; i = i0)
          if (!J.$eq$(m1[i0], m2[i0]))
            return false;
        return true;
      },
      garbageScan$1: function(update) {
        this.inUse = true;
      },
      garbageScan$0: function() {
        return this.garbageScan$1(true);
      },
      get$last4: function() {
        return [J.$mul$ns(this.matrix[16], 255), J.$mul$ns(this.matrix[17], 255), J.$mul$ns(this.matrix[18], 255), J.$mul$ns(this.matrix[19], 255)];
      },
      normalize$0: function() {
        var i, i0;
        for (i = 20; i0 = i - 1, i > 0; i = i0)
          if (J.$le$n(this.matrix[i0], 0.001) && J.$ge$n(this.matrix[i0], -0.001))
            this.matrix[i0] = 0;
      },
      $mul: function(_, c) {
        var t1, m1, mr, cf, j, k, f, i, m2;
        t1 = J.getInterceptor(c);
        if (!!t1.$isAtomColor) {
          if (c.matrix)
            return this.$mul(0, true);
          m1 = this.matrix;
          mr = new Array(20);
          mr.fixed$length = Array;
          cf = [c.red / 255, c.green / 255, c.blue / 255, c.alpha / 255];
          for (j = 0, k = 0; j < 4; ++j) {
            f = cf[j];
            for (i = 0; i < 4; ++i) {
              mr[k] = J.$mul$ns(m1[k], f);
              ++k;
            }
          }
          for (i = 0; i < 4; ++i) {
            mr[k] = m1[k];
            ++k;
          }
          t1 = new N.AtomColorMatrix(null, true, null);
          t1.matrix = mr;
          t1.normalize$0();
          return t1;
        }
        if (!!t1.$isAtomColorMatrix) {
          m1 = this.matrix;
          m2 = c.matrix;
          mr = new Array(20);
          mr.fixed$length = Array;
          mr[0] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[0], m2[0]), J.$mul$ns(m1[1], m2[4])), J.$mul$ns(m1[2], m2[8])), J.$mul$ns(m1[3], m2[12]));
          mr[1] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[0], m2[1]), J.$mul$ns(m1[1], m2[5])), J.$mul$ns(m1[2], m2[9])), J.$mul$ns(m1[3], m2[13]));
          mr[2] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[0], m2[2]), J.$mul$ns(m1[1], m2[6])), J.$mul$ns(m1[2], m2[10])), J.$mul$ns(m1[3], m2[14]));
          mr[3] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[0], m2[3]), J.$mul$ns(m1[1], m2[7])), J.$mul$ns(m1[2], m2[11])), J.$mul$ns(m1[3], m2[15]));
          mr[4] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[4], m2[0]), J.$mul$ns(m1[5], m2[4])), J.$mul$ns(m1[6], m2[8])), J.$mul$ns(m1[7], m2[12]));
          mr[5] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[4], m2[1]), J.$mul$ns(m1[5], m2[5])), J.$mul$ns(m1[6], m2[9])), J.$mul$ns(m1[7], m2[13]));
          mr[6] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[4], m2[2]), J.$mul$ns(m1[5], m2[6])), J.$mul$ns(m1[6], m2[10])), J.$mul$ns(m1[7], m2[14]));
          mr[7] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[4], m2[3]), J.$mul$ns(m1[5], m2[7])), J.$mul$ns(m1[6], m2[11])), J.$mul$ns(m1[7], m2[15]));
          mr[8] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[8], m2[0]), J.$mul$ns(m1[9], m2[4])), J.$mul$ns(m1[10], m2[8])), J.$mul$ns(m1[11], m2[12]));
          mr[9] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[8], m2[1]), J.$mul$ns(m1[9], m2[5])), J.$mul$ns(m1[10], m2[9])), J.$mul$ns(m1[11], m2[13]));
          mr[10] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[8], m2[2]), J.$mul$ns(m1[9], m2[6])), J.$mul$ns(m1[10], m2[10])), J.$mul$ns(m1[11], m2[14]));
          mr[11] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[8], m2[3]), J.$mul$ns(m1[9], m2[7])), J.$mul$ns(m1[10], m2[11])), J.$mul$ns(m1[11], m2[15]));
          mr[12] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[12], m2[0]), J.$mul$ns(m1[13], m2[4])), J.$mul$ns(m1[14], m2[8])), J.$mul$ns(m1[15], m2[12]));
          mr[13] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[12], m2[1]), J.$mul$ns(m1[13], m2[5])), J.$mul$ns(m1[14], m2[9])), J.$mul$ns(m1[15], m2[13]));
          mr[14] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[12], m2[2]), J.$mul$ns(m1[13], m2[6])), J.$mul$ns(m1[14], m2[10])), J.$mul$ns(m1[15], m2[14]));
          mr[15] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[12], m2[3]), J.$mul$ns(m1[13], m2[7])), J.$mul$ns(m1[14], m2[11])), J.$mul$ns(m1[15], m2[15]));
          mr[16] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[16], m2[0]), J.$mul$ns(m1[17], m2[4])), J.$mul$ns(m1[18], m2[8])), J.$mul$ns(m1[19], m2[12]));
          mr[17] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[16], m2[1]), J.$mul$ns(m1[17], m2[5])), J.$mul$ns(m1[18], m2[9])), J.$mul$ns(m1[19], m2[13]));
          mr[18] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[16], m2[2]), J.$mul$ns(m1[17], m2[6])), J.$mul$ns(m1[18], m2[10])), J.$mul$ns(m1[19], m2[14]));
          mr[19] = J.$add$ns(J.$add$ns(J.$add$ns(J.$mul$ns(m1[16], m2[3]), J.$mul$ns(m1[17], m2[7])), J.$mul$ns(m1[18], m2[11])), J.$mul$ns(m1[19], m2[15]));
          t1 = new N.AtomColorMatrix(null, true, null);
          t1.matrix = mr;
          t1.normalize$0();
          return t1;
        }
        return this;
      },
      AtomColorMatrix$0: function() {
        var t1, i;
        t1 = new Array(20);
        t1.fixed$length = Array;
        this.matrix = t1;
        for (i = 0; i < 20; ++i)
          t1[i] = 0;
        t1[0] = 1;
        t1[5] = 1;
        t1[10] = 1;
        t1[15] = 1;
      },
      AtomColorMatrix$fromColor$1: function(c) {
        var t1, t2, i;
        t1 = new Array(20);
        t1.fixed$length = Array;
        this.matrix = t1;
        t2 = c.matrix;
        if (t2 != null)
          this._copyMatrix$1(t2.matrix);
        else {
          for (i = 0; i < 20; ++i)
            t1[i] = 0;
          t1[0] = c.red / 255;
          t1[5] = c.green / 255;
          t1[10] = c.blue / 255;
          t1[15] = c.alpha / 255;
        }
      },
      static: {
        AtomColorMatrix$: function() {
          var t1 = new N.AtomColorMatrix(null, true, null);
          t1.AtomColorMatrix$0();
          return t1;
        },
        AtomColorMatrix$fromColor: function(c) {
          var t1 = new N.AtomColorMatrix(null, true, null);
          t1.AtomColorMatrix$fromColor$1(c);
          return t1;
        },
        AtomColorMatrix_interpolate: function(from, to, t) {
          var q, mr, m1, m2, i, i0, t1;
          if (t === 0)
            return from;
          if (t === 1)
            return to;
          if (from == null) {
            if (to == null)
              return;
            t = 1 - t;
            from = to;
            to = null;
          }
          if (to == null)
            to = N.AtomColorMatrix$();
          q = 1 - t;
          mr = new Array(20);
          mr.fixed$length = Array;
          m1 = from.matrix;
          m2 = to.matrix;
          for (i = 20; i0 = i - 1, i > 0; i = i0)
            mr[i0] = q * m1[i0] + t * m2[i0];
          t1 = new N.AtomColorMatrix(null, true, null);
          t1.matrix = mr;
          return t1;
        },
        AtomColorMatrix_interpolateAdd: function(src, from, to, t) {
          var q, mr, m1, m2, i, i0, ret;
          if (t === 0)
            return src;
          if (from == null) {
            if (to == null)
              return;
            t = 1 - t;
            from = to;
            to = null;
          }
          if (to == null)
            to = N.AtomColorMatrix$();
          q = 1 - t;
          mr = new Array(20);
          mr.fixed$length = Array;
          m1 = from.matrix;
          m2 = to.matrix;
          for (i = 20; i0 = i - 1, i > 0; i = i0)
            mr[i0] = q * m1[i0] + t * m2[i0];
          ret = new N.AtomColorMatrix(null, true, null);
          ret.matrix = mr;
          return src != null ? src.$mul(0, ret) : ret;
        }
      }
    },
    AtomColorMatrix_strHash_closure: {
      "^": "Closure:52;",
      call$1: [function(n) {
        return J.toStringAsFixed$1$n(n, 3);
      }, null, null, 2, 0, null, 27, "call"]
    },
    AtomColor: {
      "^": "Object;red,green,blue,alpha,matrix,inUse,_strHash",
      get$isWhite: function() {
        return this.red === 255 && this.green === 255 && this.blue === 255 && this.alpha === 255 && this.matrix == null;
      },
      $eq: function(_, color) {
        var t1, t2;
        if (color == null)
          return false;
        if (this.get$hashCode(this) === color.get$hashCode(color)) {
          t1 = this.matrix;
          if (t1 != null) {
            t2 = color.matrix;
            t1 = t2 != null && t1.eq$1(t2);
          } else
            t1 = color.matrix == null;
        } else
          t1 = false;
        return t1;
      },
      get$strHash: function() {
        var t1 = this._strHash;
        if (t1 == null) {
          t1 = this.matrix;
          t1 = t1 != null ? t1.get$strHash() : C.JSInt_methods.toRadixString$1(this.get$hashCode(this), 16);
          this._strHash = t1;
        }
        return t1;
      },
      get$hashCode: function(_) {
        return (this.alpha << 24 | this.red << 16 | this.green << 8 | this.blue) >>> 0;
      },
      toString$0: function(_) {
        var t1 = this.matrix;
        if (t1 == null)
          return "rgba(" + C.JSArray_methods.join$1([this.red, this.green, this.blue, this.alpha], ",") + ")";
        t1 = t1.matrix;
        return "matrix(" + (t1 && C.JSArray_methods).join$1(t1, ",") + ")";
      },
      canon$0: function() {
        var t1, c;
        t1 = $.me.canonicalColorMap;
        c = t1.$index(0, this.get$strHash());
        if (c == null) {
          $.me.canonicalColorMap.$indexSet(0, this.get$strHash(), this);
          c = this;
        }
        return c;
      },
      garbageScan$1: function(update) {
        var t1;
        this.inUse = true;
        t1 = this.matrix;
        if (t1 != null)
          t1.inUse = true;
      },
      garbageScan$0: function() {
        return this.garbageScan$1(true);
      },
      $mul: function(_, c) {
        var t1;
        if (c == null)
          return this;
        t1 = this.matrix;
        if (t1 == null) {
          if (c.matrix == null)
            return new N.AtomColor(C.JSInt_methods._tdivFast$1(this.red * c.red + 127, 255), C.JSInt_methods._tdivFast$1(this.green * c.green + 127, 255), C.JSInt_methods._tdivFast$1(this.blue * c.blue + 127, 255), C.JSInt_methods._tdivFast$1(this.alpha * c.alpha + 127, 255), null, true, null);
          return new N.AtomColor(255, 255, 255, 255, N.AtomColorMatrix$fromColor(this).$mul(0, c.matrix), true, null);
        } else
          return new N.AtomColor(255, 255, 255, 255, t1.$mul(0, c), true, null);
      },
      AtomColor$_clone$2: function(c, deep) {
        var t1, t2, t3;
        this.red = c.red;
        this.green = c.green;
        this.blue = c.blue;
        this.alpha = c.alpha;
        t1 = c.matrix;
        if (t1 != null) {
          t1 = t1.matrix;
          t2 = new N.AtomColorMatrix(null, true, null);
          t3 = new Array(20);
          t3.fixed$length = Array;
          t2.matrix = t3;
          t2._copyMatrix$1(t1);
          t1 = t2;
        } else
          t1 = null;
        this.matrix = t1;
      },
      static: {
        AtomColor$_clone: function(c, deep) {
          var t1 = new N.AtomColor(255, 255, 255, 255, null, true, null);
          t1.AtomColor$_clone$2(c, true);
          return t1;
        },
        AtomColor_interpolate: function(from, to, t) {
          var t1, t2, t3, q, fr, fg, fb, fa, tr, tg, tb, ta;
          if (t === 0)
            return from;
          if (t === 1)
            return to;
          if (from == null) {
            if (to == null)
              return;
            t = 1 - t;
            from = to;
            to = null;
          }
          if (to == null) {
            t1 = from.matrix;
            if (t1 != null)
              return new N.AtomColor(255, 255, 255, 255, N.AtomColorMatrix_interpolate(t1, null, t), true, null);
            to = new N.AtomColor(255, 255, 255, 255, null, true, null);
          } else {
            t1 = to.matrix;
            t2 = t1 != null;
            if (t2) {
              t1 = from.matrix;
              t1 = t1 != null ? t1 : N.AtomColorMatrix$fromColor(from);
              return new N.AtomColor(255, 255, 255, 255, N.AtomColorMatrix_interpolate(t1, to.matrix, t), true, null);
            } else {
              t3 = from.matrix;
              if (t3 != null)
                return new N.AtomColor(255, 255, 255, 255, N.AtomColorMatrix_interpolate(t3, t2 ? t1 : N.AtomColorMatrix$fromColor(to), t), true, null);
            }
          }
          q = 1 - t;
          fr = from.red;
          fg = from.green;
          fb = from.blue;
          fa = from.alpha;
          tr = to.red;
          tg = to.green;
          tb = to.blue;
          ta = to.alpha;
          return new N.AtomColor(C.JSNumber_methods.round$0(C.JSNumber_methods.clamp$2(q * fr + t * tr, 0, 255)), C.JSNumber_methods.round$0(C.JSNumber_methods.clamp$2(q * fg + t * tg, 0, 255)), C.JSNumber_methods.round$0(C.JSNumber_methods.clamp$2(q * fb + t * tb, 0, 255)), C.JSNumber_methods.round$0(C.JSNumber_methods.clamp$2(q * fa + t * ta, 0, 255)), null, true, null);
        },
        AtomColor_interpolateAdd: function(src, from, to, t) {
          var t1, t2, t3, q, fr, fg, fb, fa, tr, tg, tb, ta;
          if (t === 0)
            return src;
          if (from == null) {
            if (to == null)
              return;
            t = 1 - t;
            from = to;
            to = null;
          }
          if (to == null) {
            if (from.matrix != null) {
              if (src != null) {
                t1 = src.matrix;
                t1 = t1 != null ? t1 : N.AtomColorMatrix$fromColor(src);
              } else
                t1 = null;
              return new N.AtomColor(255, 255, 255, 255, N.AtomColorMatrix_interpolateAdd(t1, from.matrix, null, t), true, null);
            }
            to = new N.AtomColor(255, 255, 255, 255, null, true, null);
          } else if (to.matrix != null) {
            if (src != null) {
              t1 = src.matrix;
              t1 = t1 != null ? t1 : N.AtomColorMatrix$fromColor(src);
            } else
              t1 = null;
            t2 = from.matrix;
            t2 = t2 != null ? t2 : N.AtomColorMatrix$fromColor(from);
            return new N.AtomColor(255, 255, 255, 255, N.AtomColorMatrix_interpolateAdd(t1, t2, to.matrix, t), true, null);
          } else if (from.matrix != null) {
            if (src != null) {
              t1 = src.matrix;
              t1 = t1 != null ? t1 : N.AtomColorMatrix$fromColor(src);
            } else
              t1 = null;
            t2 = from.matrix;
            t3 = to.matrix;
            return new N.AtomColor(255, 255, 255, 255, N.AtomColorMatrix_interpolateAdd(t1, t2, t3 != null ? t3 : N.AtomColorMatrix$fromColor(to), t), true, null);
          }
          q = 1 - t;
          fr = from.red;
          fg = from.green;
          fb = from.blue;
          fa = from.alpha;
          tr = to.red;
          tg = to.green;
          tb = to.blue;
          ta = to.alpha;
          return new N.AtomColor(C.JSNumber_methods.round$0(C.JSNumber_methods.clamp$2(src.red + q * fr + t * tr, 0, 255)), C.JSNumber_methods.round$0(C.JSNumber_methods.clamp$2(src.green + q * fg + t * tg, 0, 255)), C.JSNumber_methods.round$0(C.JSNumber_methods.clamp$2(src.blue + q * fb + t * tb, 0, 255)), C.JSNumber_methods.round$0(C.JSNumber_methods.clamp$2(src.alpha + q * fa + t * ta, 0, 255)), null, true, null);
        }
      }
    },
    ScreenCorner: {
      "^": "Object;map,x>,y>,px,py,xAlign,yAlign,valid",
      Parse$1: function(str) {
        var m, p, error, m0, foundMap, t1, xy, xyi, sxy, xa, ya, isX, mod, exception, t2, width;
        m = null;
        m0 = $.$get$ScreenCorner_maprx().matchAsPrefix$1(0, str);
        m = m0;
        if (m0 != null) {
          foundMap = m.get$_match()[1];
          m0 = $.$get$ScreenCorner_nsewrx().matchAsPrefix$1(0, foundMap);
          m = m0;
          if (m0 != null) {
            t1 = m.get$_match()[1];
            t1 = t1 == null ? foundMap == null : t1 === foundMap;
          } else
            t1 = false;
          if (t1)
            foundMap = null;
          else
            str = C.JSString_methods.substring$1(str, C.JSString_methods.indexOf$1(str, ":") + 1);
        } else
          foundMap = null;
        xy = P.List_List$from(new H.MappedListIterable(str.split(","), new N.ScreenCorner_Parse_closure(), [null, null]), true, null);
        p = null;
        this.y = null;
        this.x = null;
        this.py = 0;
        this.px = 0;
        this.yAlign = 0;
        this.xAlign = 0;
        t1 = xy.length;
        if (t1 === 1) {
          if (J.$eq$(xy[0], "CENTER")) {
            this.y = 0;
            this.x = 0;
            this.xAlign = $.$get$ScreenCorner_xAlignment().$index(0, xy[0]);
            this.yAlign = $.$get$ScreenCorner_yAlignment().$index(0, xy[0]);
            return true;
          }
          m0 = $.$get$ScreenCorner_diagrx().firstMatch$1(str);
          m = m0;
          if (m0 != null) {
            this.xAlign = $.$get$ScreenCorner_xAlignment().$index(0, m.get$_match()[2]);
            t1 = $.$get$ScreenCorner_yAlignment().$index(0, m.get$_match()[1]);
            this.yAlign = t1;
            this.x = this.xAlign > 0 ? $.me.mapInfo.mapTileWidth : 1;
            this.y = t1 > 0 ? $.me.mapInfo.mapTileHeight : 1;
            return true;
          }
          return false;
        }
        if (t1 > 2)
          return false;
        error = false;
        for (xyi = 0; xyi < xy.length; ++xyi) {
          sxy = xy[xyi];
          p = 0;
          m0 = $.$get$ScreenCorner_nsewrx().firstMatch$1(sxy);
          m = m0;
          if (m0 != null) {
            xa = $.$get$ScreenCorner_xAlignment().$index(0, m.get$_match()[1]);
            ya = $.$get$ScreenCorner_yAlignment().$index(0, m.get$_match()[1]);
            if (xyi === 0)
              isX = $.$get$ScreenCorner_nsrx().firstMatch$1(sxy) == null;
            else {
              if (xa === 0.5 && ya === 0.5)
                if (this.x != null)
                  xa = null;
                else if (this.y != null)
                  ya = null;
              if (ya != null)
                isX = this.x == null && $.$get$ScreenCorner_ewrx().firstMatch$1(sxy) != null;
              else
                isX = true;
            }
            if (xa != null) {
              this.xAlign = xa;
              this.x = 1;
            }
            if (ya != null) {
              this.yAlign = ya;
              this.y = 1;
            }
            sxy = C.JSString_methods.trim$0(J.substring$1$s(sxy, m.get$_match()[1].length));
            while (true) {
              t1 = $.$get$ScreenCorner_modrx();
              t1.toString;
              m0 = t1._execAnchored$2(sxy, 0);
              m = m0;
              if (!(m0 != null))
                break;
              sxy = C.JSString_methods.trim$0(C.JSString_methods.substring$1(sxy, m.get$_match()[0].length));
              mod = m.get$_match()[1];
              try {
                p = H.Primitives_parseInt(m.get$_match()[2], null, null);
              } catch (exception) {
                H.unwrapException(exception);
                p = 0;
                error = true;
              }
              while (true) {
                t1 = J.getInterceptor$s(mod).endsWith$1(mod, "-");
                if (!(t1 || C.JSString_methods.endsWith$1(mod, "+")))
                  break;
                if (t1)
                  p = J.$negate$n(p);
                mod = C.JSString_methods.trim$0(C.JSString_methods.substring$2(mod, 0, mod.length - 1));
              }
              if (mod === ":")
                if (isX)
                  this.px = this.px + p;
                else
                  this.py = this.py + p;
              else if (isX) {
                t1 = this.x;
                this.x = t1 == null ? p : t1 + p;
              } else {
                t1 = this.y;
                this.y = t1 == null ? p : t1 + p;
              }
            }
          } else {
            isX = this.x == null;
            if (isX)
              this.xAlign = 0;
            else
              this.yAlign = 0;
            if (isX)
              this.x = 0;
            else
              this.y = 0;
            while (true) {
              t1 = $.$get$ScreenCorner_digrx();
              t1.toString;
              sxy.length;
              m0 = t1._execAnchored$2(sxy, 0);
              m = m0;
              if (!(m0 != null))
                break;
              sxy = C.JSString_methods.trim$0(J.substring$1$s(sxy, m.get$_match()[0].length));
              mod = m.get$_match()[1];
              try {
                p = H.Primitives_parseInt(m.get$_match()[2], null, null);
              } catch (exception) {
                H.unwrapException(exception);
                p = 0;
                error = true;
              }
              while (true) {
                t1 = J.getInterceptor$s(mod).endsWith$1(mod, "-");
                if (!(t1 || C.JSString_methods.endsWith$1(mod, "+")))
                  break;
                if (t1)
                  p = J.$negate$n(p);
                mod = C.JSString_methods.trim$0(C.JSString_methods.substring$2(mod, 0, mod.length - 1));
              }
              if (mod === ":")
                if (isX)
                  this.px = this.px + p;
                else
                  this.py = this.py + p;
              else if (isX) {
                t1 = this.x;
                this.x = t1 == null ? p : t1 + p;
              } else {
                t1 = this.y;
                this.y = t1 == null ? p : t1 + p;
              }
            }
          }
        }
        t1 = this.x;
        if (t1 == null || this.y == null)
          return false;
        t2 = this.xAlign;
        if (t2 > 0) {
          width = $.me.mapInfo.mapTileWidth - 1;
          this.x = t1 + C.JSNumber_methods.floor$0(width * t2);
          t1 = this.xAlign;
          if (t1 < 1 && C.JSInt_methods.$mod(width, 2) === 1)
            this.px = this.px + C.JSNumber_methods.floor$0(t1 * $.me.iconWidth);
        }
        t1 = this.yAlign;
        if (t1 > 0) {
          width = $.me.mapInfo.mapTileHeight - 1;
          this.y = this.y + C.JSNumber_methods.floor$0(width * t1);
          t1 = this.yAlign;
          if (t1 < 1 && C.JSInt_methods.$mod(width, 2) === 1)
            this.py = this.py + C.JSNumber_methods.floor$0(t1 * $.me.iconHeight);
        }
        this.map = foundMap;
        return !error;
      },
      ScreenCorner$1: function(str) {
        var i, t1;
        this.valid = false;
        str = C.JSString_methods.trim$0(str);
        if (!this.Parse$1(str)) {
          i = C.JSString_methods.indexOf$1(str, ":");
          if (i < 0)
            return;
          t1 = N.ByondJS_sanitizeId(C.JSString_methods.substring$2(str, 0, i));
          this.map = t1;
          if (t1.length === 0)
            this.map = null;
          if (!this.Parse$1(C.JSString_methods.substring$1(str, i + 1)))
            return;
        }
        this.valid = true;
      },
      static: {
        ScreenCorner$: function(str) {
          var t1 = new N.ScreenCorner(null, 0, 0, 0, 0, 0, 0, true);
          t1.ScreenCorner$1(str);
          return t1;
        }
      }
    },
    ScreenCorner_Parse_closure: {
      "^": "Closure:4;",
      call$1: [function(e) {
        return J.trim$0$s(e).toUpperCase();
      }, null, null, 2, 0, null, 3, "call"]
    },
    ScreenRange: {
      "^": "Object;c1,c2,original",
      toString$0: function(_) {
        return this.original;
      },
      Parse$1: function(str) {
        var t1, i, t2, t3, t4, t5, t6;
        this.c2 = null;
        this.c1 = null;
        t1 = J.getInterceptor$s(str).trim$0(str);
        this.original = t1;
        i = C.JSString_methods.indexOf$1(str, " to ");
        if (i >= 0) {
          t1 = N.ScreenCorner$(C.JSString_methods.trim$0(C.JSString_methods.substring$2(str, 0, i)));
          this.c1 = t1;
          if (!t1.valid) {
            this.c1 = null;
            return;
          }
          t1 = N.ScreenCorner$(C.JSString_methods.trim$0(C.JSString_methods.substring$1(str, i + 4)));
          this.c2 = t1;
          if (!t1.valid) {
            this.c2 = null;
            this.c1 = null;
            return;
          }
          t2 = this.c1;
          t3 = t2.x;
          t4 = t1.x;
          if (t3 == null ? t4 == null : t3 === t4) {
            t5 = t2.y;
            t6 = t1.y;
            t6 = t5 == null ? t6 == null : t5 === t6;
            t5 = t6;
          } else
            t5 = false;
          if (t5)
            this.c2 = null;
          else {
            t1.map = t2.map;
            t1.px = t2.px;
            t1.py = t2.py;
            if (t4 < t3) {
              t2.x = t4;
              t1.x = t3;
            }
            t3 = t1.y;
            t4 = t2.y;
            if (t3 < t4) {
              t2.y = t3;
              t1.y = t4;
            }
          }
        } else {
          t1 = N.ScreenCorner$(t1);
          this.c1 = t1;
          if (!t1.valid) {
            this.c1 = null;
            return;
          }
        }
      }
    },
    ClientRect: {
      "^": "Object;_oob,_oob_at_all,left,right,top,bottom,cx,cy",
      toString$0: function(_) {
        return C.JSArray_methods.join$1([this.left, this.top, this.right, this.bottom, this.cx, this.cy], ",");
      },
      offset$2: function(_, x, y) {
        this.cx += x;
        this.cy += y;
        this.left += x;
        this.right = this.right + x;
        this.top += y;
        this.bottom = this.bottom + y;
        this._oob_at_all = null;
        this._oob = null;
      },
      union$1: function(other) {
        if (other == null)
          return;
        this.left = P.min(this.left, other.left);
        this.right = P.max(this.right, other.right);
        this.top = P.min(this.top, other.top);
        this.bottom = P.max(this.bottom, other.bottom);
      },
      ClientRect$2: function(width, height) {
        this.top = 0;
        this.left = 0;
        this.right = width;
        this.bottom = height;
        this.cx = width / 2 | 0;
        this.cy = height / 2 | 0;
      },
      static: {
        ClientRect$: function(width, height) {
          var t1 = new N.ClientRect(null, null, null, null, null, null, null, null);
          t1.ClientRect$2(width, height);
          return t1;
        }
      }
    },
    AppearanceCore: {
      "^": "Object;iconId,iconState,dir,layer*,plane,pixel_x,pixel_y,pixel_w,pixel_z,glideSize,transform,color,blendMode,bits,maptext,maptextWidth,maptextHeight,maptextX,maptextY,_flags,invisibility,luminosity,infraLuminosity,_oob,_animated",
      get$moving: function() {
        return (this._flags & 128) !== 0;
      },
      set$is_overlay: function(flag) {
        var t1 = this._flags;
        t1 = flag ? t1 | 2 : t1 & 4294967293;
        this._flags = t1;
        return t1;
      },
      get$glideType: function() {
        return (this.bits >>> 14 & 3) + 1 & 3;
      },
      get$override: function() {
        return (this.bits & 262144) !== 0;
      },
      get$atomOpacity: function() {
        return (this.bits & 1) !== 0;
      },
      get$longGlide: function() {
        return (this.bits & 2097152) !== 0;
      },
      get$resetColor: function() {
        return (this.bits & 4194304) !== 0;
      },
      set$resetColor: function(b) {
        this.bits = (this.bits | 4194304) >>> 0;
      },
      set$resetAlpha: function(b) {
        this.bits = (this.bits | 8388608) >>> 0;
      },
      set$resetTransform: function(_, b) {
        this.bits = (this.bits | 16777216) >>> 0;
      },
      get$noClientColor: function() {
        return (this.bits & 33554432) !== 0;
      },
      set$noClientColor: function(b) {
        this.bits = (this.bits | 33554432) >>> 0;
      },
      get$keepTogether: function() {
        return (this.bits & 67108864) !== 0;
      },
      get$keepApart: function() {
        return (this.bits & 134217728) !== 0;
      },
      set$keepApart: function(b) {
        var t1 = this.bits;
        if (b)
          this.bits = (t1 | 134217728) >>> 0;
        else
          this.bits = (t1 & 4160749567) >>> 0;
      },
      get$planeMaster: function() {
        return (this.bits & 268435456) !== 0;
      },
      get$tileBound: function() {
        return (this.bits & 536870912) !== 0;
      },
      get$oob: function() {
        var t1, t2, t3, t4;
        t1 = this._oob;
        if (t1 != null)
          return t1;
        if (this.transform != null || this.pixel_x !== 0 || this.pixel_y !== 0 || this.pixel_w !== 0 || this.pixel_z !== 0) {
          this._oob = true;
          return true;
        }
        t1 = $.me.iconInfoMap.$index(0, this.iconId);
        if (t1 == null)
          return false;
        t2 = t1._width;
        t3 = $.me;
        t4 = t3.iconWidth;
        if (!(t2 > t4)) {
          t1 = t1._height;
          t1 = t1 > (t3.mapformat !== 0 ? t3.iconHeight : t4);
        } else
          t1 = true;
        if (t1) {
          this._oob = true;
          return true;
        }
        this._oob = false;
        return false;
      },
      get$animated: function() {
        var t1, s;
        t1 = this._animated;
        if (t1 != null)
          return t1;
        t1 = $.me.iconInfoMap.$index(0, this.iconId);
        if (t1 == null) {
          this._animated = false;
          return false;
        }
        s = t1.stateFor$2(this.iconState, false);
        if (s == null) {
          this._animated = false;
          return false;
        }
        t1 = s.frames > 1;
        this._animated = t1;
        return t1;
      },
      animating$1: function(time) {
        var t1;
        if (!this.get$animated())
          return false;
        t1 = $.me.iconInfoMap.$index(0, this.iconId);
        return t1 != null && t1.animatedState$3(this.iconState, false, time);
      },
      cmpMask$1: function(other) {
        var t1, t2, mask;
        t1 = this.iconId;
        t2 = other.iconId;
        mask = (t1 == null ? t2 != null : t1 !== t2) ? 1 : 0;
        t1 = this.iconState;
        t2 = other.iconState;
        if (t1 == null ? t2 != null : t1 !== t2)
          mask |= 2;
        t1 = this.maptext;
        t2 = other.maptext;
        if (t1 == null ? t2 != null : t1 !== t2)
          mask |= 4;
        if (this.maptextWidth !== other.maptextWidth)
          mask |= 8;
        if (this.maptextHeight !== other.maptextHeight)
          mask |= 16;
        if (this.maptextX !== other.maptextX)
          mask |= 32;
        if (this.maptextY !== other.maptextY)
          mask |= 64;
        if (this.layer !== other.layer)
          mask |= 128;
        t1 = this.dir;
        t2 = other.dir;
        if (t1 == null ? t2 != null : t1 !== t2)
          mask |= 256;
        t1 = this.invisibility;
        t2 = other.invisibility;
        if (t1 == null ? t2 != null : t1 !== t2)
          mask |= 512;
        if (this.pixel_x !== other.pixel_x || this.pixel_y !== other.pixel_y || this.pixel_w !== other.pixel_w || this.pixel_z !== other.pixel_z)
          mask |= 1024;
        t1 = this.luminosity;
        t2 = other.luminosity;
        if (t1 == null ? t2 != null : t1 !== t2)
          mask |= 2048;
        t1 = this.infraLuminosity;
        t2 = other.infraLuminosity;
        if (t1 == null ? t2 != null : t1 !== t2)
          mask |= 4096;
        if (!N.MatrixEqual(this.transform, other.transform))
          mask |= 8192;
        return !N.ColorEqual(this.color, other.color) ? mask | 16384 : mask;
      },
      copyMask$2: function(other, mask) {
        var result, t1;
        if (mask === 0)
          return this;
        result = N.AppearanceCore$_clone(this);
        if ((mask & 1) !== 0) {
          result.iconId = other.iconId;
          if (!result.get$tileBound())
            result._oob = null;
        }
        if ((mask & 2) !== 0)
          result.iconState = other.iconState;
        if ((mask & 4) !== 0)
          result.maptext = other.maptext;
        if ((mask & 8) !== 0)
          result.maptextWidth = other.maptextWidth;
        if ((mask & 16) !== 0)
          result.maptextHeight = other.maptextHeight;
        if ((mask & 32) !== 0)
          result.maptextX = other.maptextX;
        if ((mask & 64) !== 0)
          result.maptextY = other.maptextY;
        if ((mask & 128) !== 0)
          result.layer = other.layer;
        if ((mask & 256) !== 0)
          result.dir = other.dir;
        if ((mask & 512) !== 0)
          result.invisibility = other.invisibility;
        if ((mask & 1024) !== 0) {
          result.pixel_x = other.pixel_x;
          result.pixel_y = other.pixel_y;
          result.pixel_w = other.pixel_w;
          result.pixel_z = other.pixel_z;
          if (!result.get$tileBound())
            result._oob = true;
        }
        if ((mask & 2048) !== 0)
          result.luminosity = other.luminosity;
        if ((mask & 4096) !== 0)
          result.infraLuminosity = other.infraLuminosity;
        if ((mask & 8192) !== 0) {
          t1 = other.transform;
          result.transform = t1;
          if (t1 != null && !result.get$tileBound())
            result._oob = true;
        }
        if ((mask & 16384) !== 0)
          result.color = other.color;
        return result;
      },
      interpolate$3: function(next, t, animFlags) {
        var q, result, t1, sst2, sst1, t2, t3, preint;
        if (t === 0)
          return this;
        if (t === 1)
          return next;
        q = 1 - t;
        next.toString;
        result = N.AppearanceCore$_clone(next);
        t1 = this.transform;
        if (t1 != null || next.transform != null)
          if ((animFlags & 2) !== 0) {
            result.transform = T.Matrix$fromIdentity();
            sst2 = next.transform;
            sst2 = sst2 != null ? sst2 : T.Matrix$fromIdentity();
            sst1 = this.transform;
            sst1 = sst1 != null ? sst1 : T.Matrix$fromIdentity();
            t1 = result.transform;
            sst1 = sst1._data;
            t2 = sst1[0];
            sst2 = sst2._data;
            t3 = sst2[0];
            t1 = t1._data;
            t1[0] = t2 * q + t3 * t;
            t1[1] = sst1[1] * q + sst2[1] * t;
            t1[2] = sst1[2] * q + sst2[2] * t;
            t1[3] = sst1[3] * q + sst2[3] * t;
            t1[4] = sst1[4] * q + sst2[4] * t;
            t1[5] = sst1[5] * q + sst2[5] * t;
          } else {
            preint = N.AppearanceCore_MatrixPreInterpolate(t1, next.transform);
            result.transform = N.AppearanceCore_MatrixInterpolate(this.transform, preint[0], preint[1], preint[2], preint[3], t);
          }
        t1 = this.color;
        if (t1 != null || next.color != null)
          result.color = N.AtomColor_interpolate(t1, next.color, t);
        result.layer = this.layer * q + next.layer * t;
        result.pixel_x = C.JSNumber_methods.round$0(this.pixel_x * q + next.pixel_x * t);
        result.pixel_y = C.JSNumber_methods.round$0(this.pixel_y * q + next.pixel_y * t);
        result.pixel_w = C.JSNumber_methods.round$0(this.pixel_w * q + next.pixel_w * t);
        result.pixel_z = C.JSNumber_methods.round$0(this.pixel_z * q + next.pixel_z * t);
        result.maptextX = C.JSNumber_methods.round$0(this.maptextX * q + next.maptextX * t);
        result.maptextY = C.JSNumber_methods.round$0(this.maptextY * q + next.maptextY * t);
        result.luminosity = C.JSNumber_methods.round$0(this.luminosity * q + next.luminosity * t);
        result.infraLuminosity = C.JSNumber_methods.round$0(this.infraLuminosity * q + next.infraLuminosity * t);
        result._oob = null;
        return result;
      },
      interpolateAdd$4: function(src, next, t, animFlags) {
        var q, result, t1, sst2, sst1, t2, t3, t4, preint;
        if (t === 0)
          return src;
        q = 1 - t;
        next.toString;
        result = N.AppearanceCore$_clone(next);
        t1 = this.transform;
        if (t1 != null || next.transform != null) {
          if ((animFlags & 2) !== 0) {
            result.transform = T.Matrix$fromIdentity();
            sst2 = next.transform;
            sst2 = sst2 != null ? sst2 : T.Matrix$fromIdentity();
            sst1 = this.transform;
            sst1 = sst1 != null ? sst1 : T.Matrix$fromIdentity();
            t1 = result.transform;
            sst1 = sst1._data;
            t2 = sst1[0];
            sst2 = sst2._data;
            t3 = sst2[0];
            t4 = t1._data;
            t4[0] = t2 * q + t3 * t;
            t4[1] = sst1[1] * q + sst2[1] * t;
            t4[2] = sst1[2] * q + sst2[2] * t;
            t4[3] = sst1[3] * q + sst2[3] * t;
            t4[4] = sst1[4] * q + sst2[4] * t;
            t4[5] = sst1[5] * q + sst2[5] * t;
          } else {
            preint = N.AppearanceCore_MatrixPreInterpolate(t1, next.transform);
            t1 = N.AppearanceCore_MatrixInterpolate(this.transform, preint[0], preint[1], preint[2], preint[3], t);
            result.transform = t1;
          }
          t2 = src.transform;
          if (t2 != null)
            t1.copyFromAndConcat$2(t2, t1);
        }
        t1 = this.color;
        if (t1 != null || next.color != null)
          result.color = N.AtomColor_interpolateAdd(src.color, t1, next.color, t);
        else
          result.color = src.color;
        result.layer = src.layer + (next.layer - this.layer) * t;
        result.pixel_x = src.pixel_x + C.JSNumber_methods.round$0((next.pixel_x - this.pixel_x) * t);
        result.pixel_y = src.pixel_y + C.JSNumber_methods.round$0((next.pixel_y - this.pixel_y) * t);
        result.pixel_w = src.pixel_w + C.JSNumber_methods.round$0((next.pixel_w - this.pixel_w) * t);
        result.pixel_z = src.pixel_z + C.JSNumber_methods.round$0((next.pixel_z - this.pixel_z) * t);
        result.maptextX = src.maptextX + C.JSNumber_methods.round$0((next.maptextX - this.maptextX) * t);
        result.maptextY = src.maptextY + C.JSNumber_methods.round$0((next.maptextY - this.maptextY) * t);
        result.luminosity = src.luminosity + C.JSNumber_methods.round$0((next.luminosity - this.luminosity) * t);
        result.infraLuminosity = src.infraLuminosity + C.JSNumber_methods.round$0((next.infraLuminosity - this.infraLuminosity) * t);
        result._oob = null;
        return result;
      },
      AppearanceCore$_clone$1: function(base) {
        this.iconId = base.iconId;
        this.iconState = base.iconState;
        this.dir = base.dir;
        this.layer = base.layer;
        this.plane = base.plane;
        this.pixel_x = base.pixel_x;
        this.pixel_y = base.pixel_y;
        this.pixel_w = base.pixel_w;
        this.pixel_z = base.pixel_z;
        this.transform = base.transform;
        this.color = base.color;
        this.blendMode = base.blendMode;
        this.bits = base.bits;
        this._flags = base._flags;
        this.maptext = base.maptext;
        this.maptextWidth = base.maptextWidth;
        this.maptextHeight = base.maptextHeight;
        this.maptextX = base.maptextX;
        this.maptextY = base.maptextY;
        this.glideSize = base.glideSize;
        this.invisibility = base.invisibility;
        this.luminosity = base.luminosity;
        this.infraLuminosity = base.infraLuminosity;
        this._oob = base._oob;
      },
      static: {
        AppearanceCore$_clone: function(base) {
          var t1 = new N.AppearanceCore(65535, "", 2, -1, 0, 0, 0, 0, 0, 0, null, null, 0, 0, null, 0, 0, 0, 0, 0, 0, 0, 0, null, null);
          t1.AppearanceCore$_clone$1(base);
          return t1;
        },
        AppearanceCore_MatrixDeconstruct: function(m) {
          var t1, t2, t3, d, c, s, mc, angle, sst;
          if (N.MatrixIsIdentity(m)) {
            if (m != null) {
              t1 = m._data;
              t1 = T.Matrix$(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
            } else
              t1 = T.Matrix$fromIdentity();
            return [t1, 0];
          }
          t1 = m._data;
          t2 = t1[2];
          t3 = t1[3];
          d = t2 * t2 + t3 * t3;
          if (d < 1e-12)
            return;
          c = t3 / Math.sqrt(d);
          if (c > -1) {
            s = -t1[2];
            mc = c;
          } else {
            s = 0;
            mc = -1;
          }
          if (mc >= 0.9999)
            return [T.Matrix$(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]), 0];
          if (mc <= -0.9999)
            return [T.Matrix$(-t1[0], -t1[1], -t1[2], -t1[3], t1[4], t1[5]), 3.141592653589793];
          Math.abs(mc) < 0.0001;
          angle = s < 0 ? -Math.acos(c) : Math.acos(c);
          sst = T.Matrix$(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
          sst.rotate$1(0, -angle);
          t2 = sst._data;
          t2[4] = t1[4];
          t2[5] = t1[5];
          return [sst, angle];
        },
        AppearanceCore_MatrixPreInterpolate: function(m1, m2) {
          var d1, d2, t1, sst1, angle1, sst2, angle2, adelta, linear, t2;
          d1 = N.AppearanceCore_MatrixDeconstruct(m1);
          d2 = N.AppearanceCore_MatrixDeconstruct(m2);
          if (d1 == null) {
            t1 = m1._data;
            sst1 = T.Matrix$(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
            angle1 = 0;
          } else {
            sst1 = d1[0];
            angle1 = d1[1];
          }
          if (d2 == null) {
            t1 = m2._data;
            sst2 = T.Matrix$(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
            angle2 = 0;
          } else {
            sst2 = d2[0];
            angle2 = d2[1];
          }
          adelta = angle2 - angle1;
          if (adelta > 3.141592653589793) {
            adelta -= 6.283185307179586;
            if (angle2 >= 0)
              angle2 -= 6.283185307179586;
            else
              angle1 += 6.283185307179586;
          } else if (adelta < -3.141592653589793) {
            adelta += 6.283185307179586;
            if (angle1 >= 0)
              angle1 -= 6.283185307179586;
            else
              angle2 += 6.283185307179586;
          }
          t1 = Math.abs(adelta);
          linear = (t1 < 0.0001 || Math.abs(t1 - 3.141592653589793) < 0.0001) && true;
          if (linear) {
            if (Math.abs(Math.abs(angle1) - 3.141592653589793) < 0.0001) {
              t1 = sst1._data;
              t1[0] = -t1[0];
              t1[1] = -t1[1];
              t1[2] = -t1[2];
              t1[3] = -t1[3];
            }
            angle1 = 0;
            angle2 = 0;
          }
          t1 = sst2._data;
          t2 = sst1._data;
          t2[0] = t1[0] - t2[0];
          t2[1] = t1[1] - t2[1];
          t2[2] = t1[2] - t2[2];
          t2[3] = t1[3] - t2[3];
          t2[4] = t1[4] - t2[4];
          t2[5] = t1[5] - t2[5];
          return [sst1, angle1, angle2, linear];
        },
        AppearanceCore_MatrixInterpolate: function(m, sst, angle1, angle2, linear, t) {
          var t1, x, y, t2;
          angle2 = (angle2 - angle1) * t;
          if (m != null) {
            t1 = m._data;
            m = T.Matrix$(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
          } else
            m = T.Matrix$fromIdentity();
          t1 = m._data;
          x = t1[4];
          y = t1[5];
          if (linear) {
            t2 = sst._data;
            t1[0] = t1[0] + t2[0] * t;
            t1[1] = t1[1] + t2[1] * t;
            t1[2] = t1[2] + t2[2] * t;
            t1[3] = t1[3] + t2[3] * t;
            t1[4] = x + t2[4] * t;
            t1[5] = y + t2[5] * t;
            return m;
          }
          if (Math.abs(angle1) > 0.0001) {
            angle2 += angle1;
            m.rotate$1(0, -angle1);
          }
          t2 = sst._data;
          t1[0] = t1[0] + t2[0] * t;
          t1[1] = t1[1] + t2[1] * t;
          t1[2] = t1[2] + t2[2] * t;
          t1[3] = t1[3] + t2[3] * t;
          if (Math.abs(angle2) > 0.0001)
            m.rotate$1(0, angle2);
          t1[4] = x + t2[4] * t;
          t1[5] = y + t2[5] * t;
          return m;
        }
      }
    },
    Appearance: {
      "^": "Object;id',name,mouseOpacity,isDropZone,handlesMouseOver,handlesMouseMove,handlesMouseWheel,overCursor,dragCursor,dropCursor,core<,overlays,underlays,screenLoc,inUse,garbage,lastUsed,_animated,_composite",
      get$animated: function() {
        var t1, t2, _i;
        t1 = this._animated;
        if (t1 != null)
          return t1;
        if (this.core.get$animated()) {
          this._animated = true;
          return true;
        }
        t1 = this.underlays;
        if (t1 != null)
          for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
            if (t1[_i].get$animated()) {
              this._animated = true;
              return true;
            }
        t1 = this.overlays;
        if (t1 != null)
          for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
            if (t1[_i].get$animated()) {
              this._animated = true;
              return true;
            }
        this._animated = false;
        return false;
      },
      animating$1: function(time) {
        var t1, t2, _i;
        if (this.get$animated()) {
          if (this.core.animating$1(time))
            return true;
          t1 = this.underlays;
          if (t1 != null)
            for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
              if (t1[_i].animating$1(time))
                return true;
          t1 = this.overlays;
          if (t1 != null)
            for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
              if (t1[_i].animating$1(time))
                return true;
        }
        return false;
      },
      garbageScan$1: function(update) {
        var t1, t2, _i;
        this.inUse = true;
        this.lastUsed = $.me.currentTime;
        this.garbage = false;
        t1 = this.core.color;
        if (t1 != null)
          t1.garbageScan$1(true);
        t1 = this.underlays;
        if (t1 != null)
          for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
            t1[_i].garbageScan$1(true);
        t1 = this.overlays;
        if (t1 != null)
          for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
            t1[_i].garbageScan$1(true);
      },
      garbageScan$0: function() {
        return this.garbageScan$1(true);
      },
      pendingIcons$1: function(pending) {
        var t1, t2, _i, o;
        t1 = this.core.iconId;
        if (t1 !== 65535 && $.me.iconInfoMap.$index(0, t1) == null) {
          if (pending == null)
            pending = [];
          pending.push(this.core.iconId);
        }
        t1 = this.underlays;
        if (t1 != null)
          for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            o = t1[_i];
            if (o != null)
              pending = o.pendingIcons$1(pending);
          }
        t1 = this.overlays;
        if (t1 != null)
          for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            o = t1[_i];
            if (o != null)
              pending = o.pendingIcons$1(pending);
          }
        return pending;
      },
      Fill$5: function(icons, atom, base, moving, time) {
        var core, cloned, core0, t1, t2, resetPixels, bc, wasOverlay, groupBegin, _i, ic, inf, a1, a2, tic, groupEnd;
        this.lastUsed = $.me.currentTime;
        if (base != null) {
          core = this.core;
          core.toString;
          if ((base._flags & 2) === 0 || core.iconState.length !== 0 || core.iconId !== 65535) {
            if ((core.bits & 65536) === 0 && core.iconState.length === 0 && base.iconState.length !== 0) {
              cloned = N.AppearanceCore$_clone(core);
              core0 = cloned;
              core0.iconState = base.iconState;
            } else {
              core0 = core;
              cloned = null;
            }
            t1 = core.iconId;
            if (t1 === 65535) {
              t2 = base.iconId;
              t1 = t2 == null ? t1 != null : t2 !== t1;
            } else
              t1 = false;
            if (t1) {
              if (cloned == null) {
                cloned = N.AppearanceCore$_clone(core);
                core0 = cloned;
              }
              core0.iconId = base.iconId;
              if (!core0.get$tileBound())
                core0._oob = null;
            }
          } else {
            core0 = core;
            cloned = null;
          }
          if (core.layer < -100) {
            if (cloned == null) {
              cloned = N.AppearanceCore$_clone(core);
              core0 = cloned;
            }
            core0.layer = base.layer;
          }
          if ((core.bits & 512) === 0) {
            t1 = core.dir;
            t2 = base.dir;
            t2 = t1 == null ? t2 != null : t1 !== t2;
            t1 = t2;
          } else
            t1 = false;
          if (t1) {
            if (cloned == null) {
              cloned = N.AppearanceCore$_clone(core);
              core0 = cloned;
            }
            core0.dir = base.dir;
          }
          if (core.plane !== base.plane) {
            if (cloned == null) {
              cloned = N.AppearanceCore$_clone(core);
              core0 = cloned;
            }
            if (core.plane === -32767) {
              core0.plane = base.plane;
              resetPixels = false;
            } else {
              core0.set$keepApart(true);
              core0.blendMode = 1;
              core0.set$resetColor(true);
              core0.set$resetAlpha(true);
              core0.set$resetTransform(0, true);
              resetPixels = true;
            }
          } else
            resetPixels = false;
          if (base.get$keepTogether() && !core0.get$keepApart()) {
            if (cloned == null) {
              cloned = N.AppearanceCore$_clone(core);
              core0 = cloned;
            }
            core0.blendMode = 1;
            core0.set$resetColor(true);
            core0.set$resetAlpha(true);
            core0.set$resetTransform(0, true);
            core0.set$noClientColor(true);
            resetPixels = true;
          }
          if (!resetPixels)
            t1 = base.pixel_x !== 0 || base.pixel_y !== 0 || base.pixel_w !== 0 || base.pixel_z !== 0;
          else
            t1 = false;
          if (t1) {
            if (cloned == null) {
              cloned = N.AppearanceCore$_clone(core);
              core0 = cloned;
            }
            core0.pixel_x = core0.pixel_x + base.pixel_x;
            core0.pixel_y = core0.pixel_y + base.pixel_y;
            core0.pixel_w = core0.pixel_w + base.pixel_w;
            core0.pixel_z = core0.pixel_z + base.pixel_z;
            if (!core0.get$tileBound())
              core0._oob = true;
          }
          if (base.get$noClientColor() && !core0.get$noClientColor() && !core0.get$resetColor()) {
            if (cloned == null) {
              cloned = N.AppearanceCore$_clone(core);
              core0 = cloned;
            }
            core0.set$noClientColor(true);
          }
          if (base.transform != null && (core0.bits & 16777216) === 0) {
            if (cloned == null) {
              cloned = N.AppearanceCore$_clone(core);
              core0 = cloned;
            }
            t1 = core.transform;
            t2 = base.transform;
            if (t1 == null) {
              core0.transform = t2;
              t1 = t2;
            } else {
              t1 = t2._data;
              t1 = T.Matrix$(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
              t1.copyFromAndConcat$2(core0.transform, t1);
              core0.transform = t1;
            }
            if (t1 != null && !core0.get$tileBound())
              core0._oob = true;
          }
          if (base.color != null && (core0.bits & 12582912) !== 12582912) {
            if (cloned == null) {
              cloned = N.AppearanceCore$_clone(core);
              core0 = cloned;
            }
            bc = base.color;
            if ((core0.bits & 8388608) !== 0) {
              bc.toString;
              bc = N.AtomColor$_clone(bc, true);
              t1 = bc.matrix;
              if (t1 != null) {
                t1 = t1.matrix;
                t1[3] = 0;
                t1[7] = 0;
                t1[11] = 0;
                t1[12] = 0;
                t1[13] = 0;
                t1[14] = 0;
                t1[15] = 1;
                t1[19] = 0;
              } else
                bc.alpha = 255;
            }
            if (core0.get$resetColor()) {
              if (J.$eq$(bc, base.color)) {
                bc.toString;
                bc = N.AtomColor$_clone(bc, true);
              }
              t1 = bc.matrix;
              if (t1 != null) {
                t1 = t1.matrix;
                t1[0] = 1;
                t1[1] = 0;
                t1[2] = 0;
                t1[4] = 0;
                t1[5] = 1;
                t1[6] = 0;
                t1[8] = 0;
                t1[9] = 0;
                t1[10] = 1;
                t1[16] = 0;
                t1[17] = 0;
                t1[18] = 0;
              } else {
                bc.blue = 255;
                bc.green = 255;
                bc.red = 255;
              }
            }
            if (core.color == null)
              core0.color = bc;
            else
              core0.color = core0.color.$mul(0, bc);
          }
          if (core.blendMode === 0 && base.blendMode !== 0) {
            core = cloned == null ? N.AppearanceCore$_clone(core) : core0;
            core.blendMode = base.blendMode;
          } else
            core = core0;
          base = core;
        } else {
          base = this.core;
          if (base != null) {
            if (base.plane === -32767) {
              base.toString;
              base = N.AppearanceCore$_clone(base);
              base.plane = 0;
            }
          } else
            base = new N.AppearanceCore(65535, "", 2, -1, 0, 0, 0, 0, 0, 0, null, null, 0, 0, null, 0, 0, 0, 0, 0, 0, 0, 0, null, null);
        }
        wasOverlay = (base._flags & 2) !== 0;
        groupBegin = icons.length;
        if (this.underlays != null) {
          base.set$is_overlay(true);
          for (t1 = this.underlays, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
            t1[_i].Fill$5(icons, atom, base, moving, time);
          base.set$is_overlay(wasOverlay);
        }
        ic = N.MapAtom$(false);
        ic.info = atom;
        inf = $.me.iconInfoMap.$index(0, base.iconId);
        ic.icon = inf != null && !base.get$planeMaster() ? inf.IconAt$4(base.iconState, moving, base.dir, time) : null;
        ic.pixel_x = base.pixel_x;
        ic.pixel_y = base.pixel_y;
        ic.pixel_w = base.pixel_w;
        ic.pixel_z = base.pixel_z;
        ic.set$layer(0, base.layer);
        ic.plane = base.plane;
        t1 = base.blendMode;
        ic.blendModeNum = t1;
        ic._blendMode = C.List_eLp[t1];
        t1 = base.transform;
        if (t1 != null) {
          ic.flags |= 4;
          ic.transform = t1;
          t1 = t1._data;
          t2 = t1[0];
          t1 = t1[1];
          ic.set$scaleX(Math.sqrt(t2 * t2 + t1 * t1));
          if (ic.transform._data[0] < 0)
            ic.set$scaleX(-ic._scaleX);
          a1 = Math.asin(ic.transform._data[1] / ic._scaleX);
          if (a1 < 0.000001 && a1 > -0.000001)
            a1 = 0;
          else if (a1 > 1.5707953267948966)
            a1 = 1.5707963267948966;
          else if (a1 < -1.5707953267948966)
            a1 = -1.5707963267948966;
          t1 = ic.transform._data;
          t2 = t1[2];
          t1 = t1[3];
          ic.set$scaleY(Math.sqrt(t2 * t2 + t1 * t1));
          if (ic.transform._data[3] < 0)
            ic.set$scaleY(-ic._scaleY);
          a2 = Math.asin(-ic.transform._data[2] / ic._scaleY);
          if (a2 < 0.000001 && a2 > -0.000001)
            a2 = 0;
          else if (a2 > 1.5707953267948966)
            a2 = 1.5707963267948966;
          else if (a2 < -1.5707953267948966)
            a2 = -1.5707963267948966;
          if (a1 < a2 + 0.000001 && a1 > a2 - 0.000001) {
            ic.set$rotation(a2);
            a1 = a2;
          } else if (a1 === 0 || a2 === 0)
            ic.set$rotation(0);
          else if (a1 === 1.5707963267948966 || a2 === 1.5707963267948966)
            ic.set$rotation(1.5707963267948966);
          else if (a1 === -1.5707963267948966 || a2 === -1.5707963267948966)
            ic.set$rotation(1.5707963267948966);
          else
            ic.set$rotation((a1 + a2) / 2);
          ic.set$skewY(a1 - ic._rotation);
          ic.set$skewX(a2 - ic._rotation);
        }
        t1 = base.color;
        if (t1 != null) {
          ic.flags |= 8;
          ic.baseColor = t1;
          ic.color = t1;
        }
        ic.noClientColor = base.get$noClientColor();
        ic.set$keepTogether(base.get$keepTogether());
        ic.set$keepApart(base.get$keepApart());
        t1 = base.get$planeMaster();
        t2 = ic.flags;
        t1 = t1 ? t2 | 256 : t2 & 4294967039;
        ic.flags = t1;
        if ((t1 & 256) !== 0)
          ic._filters.push(new K.FlattenFilter());
        icons.push(ic);
        t1 = this.core;
        t2 = t1.maptext;
        if (t2 != null)
          if (ic.icon == null) {
            t2 = new N.AtomIcon(null, null, null, null, null, null, null, null, t1.maptextWidth, t1.maptextHeight, 0, 0, null, t2, false, null, null);
            t2._isComplete = true;
            ic.icon = t2;
            ic.pixel_w = ic.pixel_w + t1.maptextX;
            ic.pixel_z = ic.pixel_z + t1.maptextY;
          } else {
            tic = N.MapAtom$(false);
            tic.info = atom;
            tic.set$is_overlay(true);
            t1 = this.core;
            t2 = t1.maptext;
            t2 = new N.AtomIcon(null, null, null, null, null, null, null, null, t1.maptextWidth, t1.maptextHeight, 0, 0, null, t2, false, null, null);
            t2._isComplete = true;
            tic.icon = t2;
            tic.pixel_w = t1.maptextX;
            tic.pixel_z = t1.maptextY;
            tic.set$layer(0, base.layer);
            tic.plane = base.plane;
            t1 = base.blendMode;
            tic.blendModeNum = t1;
            tic._blendMode = C.List_eLp[t1];
            ic.overlays = [tic];
            ic.isSimple = false;
          }
        if (this.overlays != null) {
          base.set$is_overlay(true);
          for (t1 = this.overlays, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
            t1[_i].Fill$5(icons, atom, base, moving, time);
          base.set$is_overlay(wasOverlay);
        }
        groupEnd = icons.length;
        if ((base.get$keepTogether() || base.get$keepApart()) && groupEnd > groupBegin) {
          t1 = icons[groupBegin];
          t1.set$groupBegin(t1.get$groupBegin() + 1);
          t1 = icons[groupEnd - 1];
          t1.set$groupEnd(J.$add$ns(t1.get$groupEnd(), 1));
        }
      },
      get$composite: function() {
        var t1, a, t2, layer, i, i0;
        if (this._composite == null) {
          t1 = this.core;
          if (t1.pixel_x !== 0 || t1.pixel_y !== 0 || t1.pixel_w !== 0 || t1.pixel_z !== 0) {
            a = N.Appearance$_clone(this, true);
            t1 = a.core;
            t1.pixel_z = 0;
            t1.pixel_w = 0;
            t1.pixel_y = 0;
            t1.pixel_x = 0;
          } else
            a = this;
          if (a.core.transform != null) {
            if (a === this)
              a = N.Appearance$_clone(a, true);
            a.core.transform = null;
          }
          t1 = [];
          this._composite = t1;
          a.Fill$5(t1, null, null, false, 0);
          t1 = this._composite;
          (t1 && C.JSArray_methods).checkGrowable$1(t1, "removeWhere");
          C.JSArray_methods._removeWhere$2(t1, new N.Appearance_composite_closure(), true);
          t1 = this._composite;
          t2 = t1.length;
          if (t2 > 0) {
            layer = J.get$layer$x(t1[0]);
            for (i = 0; ++i, i < t2;)
              if (J.$lt$n(J.get$layer$x(this._composite[i]), 0)) {
                if (layer >= 0)
                  J.set$layer$x(this._composite[i], layer);
              } else
                layer = J.get$layer$x(this._composite[i]);
            i = t2 - 1;
            layer = J.get$layer$x(this._composite[i]);
            for (; --i, i >= 0;)
              if (J.$lt$n(J.get$layer$x(this._composite[i]), 0)) {
                if (layer >= 0)
                  J.set$layer$x(this._composite[i], layer);
              } else
                layer = J.get$layer$x(this._composite[i]);
          }
          i = this._composite.length;
          if (i > 1) {
            for (; i0 = i - 1, i > 0; i = i0)
              this._composite[i0].set$tile_x(i0);
            t1 = this._composite;
            (t1 && C.JSArray_methods).sort$1(t1, new N.Appearance_composite_simpleSort());
          }
        }
        return this._composite;
      },
      Appearance$fromMsg$1: function(msg) {
        var flags, cursorFlags, overCursor, dragCursor, dropCursor, t1, t2, t3, t4, t5, n, i, oid, exbits, ma, mb, mtx, mc, md, mty, color, f, j, val;
        this.core = new N.AppearanceCore(65535, "", 2, -1, 0, 0, 0, 0, 0, 0, null, null, 0, 0, null, 0, 0, 0, 0, 0, 0, 0, 0, null, null);
        this.id = msg.getUint32as16$0();
        this.name = msg.getUTFString$0();
        flags = msg._webclient$_data.getUint8(msg._pos++);
        cursorFlags = msg._webclient$_data.getUint8(msg._pos++);
        this.mouseOpacity = flags & 3;
        this.isDropZone = (flags & 4) !== 0;
        this.handlesMouseOver = (flags & 8) !== 0;
        this.handlesMouseMove = (flags & 16) !== 0;
        this.handlesMouseWheel = (flags & 32) !== 0;
        if ((cursorFlags & 1) !== 0) {
          overCursor = msg._webclient$_data.getUint8(msg._pos++);
          if (overCursor === 2)
            overCursor = $.me.appearanceMap.$index(0, msg.getUint32as16$0());
        } else
          overCursor = null;
        if ((cursorFlags & 2) !== 0) {
          dragCursor = msg._webclient$_data.getUint8(msg._pos++);
          if (dragCursor === 2)
            dragCursor = $.me.appearanceMap.$index(0, msg.getUint32as16$0());
        } else
          dragCursor = null;
        if ((cursorFlags & 4) !== 0) {
          dropCursor = msg._webclient$_data.getUint8(msg._pos++);
          if (dropCursor === 2)
            dropCursor = $.me.appearanceMap.$index(0, msg.getUint32as16$0());
        } else
          dropCursor = null;
        $.me.appearanceMap.$indexSet(0, this.id, this);
        if (msg._webclient$_data.byteLength - msg._pos > 0) {
          this.core.iconId = msg.getUint32as16$0();
          this.core.iconState = msg.getUTFString$0();
          this.core.dir = msg._webclient$_data.getUint8(msg._pos++);
          this.core.bits = msg.getUint32$0(0);
          this.core.layer = msg.getFloat32$0(0);
          t1 = this.core;
          t2 = t1.iconId;
          if (t2 === 65535)
            t1._oob = false;
          else {
            t1.toString;
            t1 = $.me.iconInfoMap.$index(0, t2);
            if (t1 != null) {
              t2 = this.core;
              t3 = t1._width;
              t4 = $.me;
              t5 = t4.iconWidth;
              if (!(t3 > t5)) {
                t1 = t1._height;
                t1 = t1 > (t4.mapformat !== 0 ? t4.iconHeight : t5);
              } else
                t1 = true;
              t2._oob = t1;
            }
          }
          n = msg.getUint16$0(0);
          if (n > 0) {
            this.overlays = [];
            for (i = 0; i < n; ++i) {
              oid = msg.getUint32as16$0();
              if (oid !== 65535)
                this.overlays.push($.me.appearanceMap.$index(0, oid));
            }
          }
          n = msg.getUint16$0(0);
          if (n > 0) {
            this.underlays = [];
            for (i = 0; i < n; ++i) {
              oid = msg.getUint32as16$0();
              if (oid !== 65535)
                this.underlays.push($.me.appearanceMap.$index(0, oid));
            }
          }
          exbits = msg._webclient$_data.getUint8(msg._pos++);
          if ((exbits & 128) !== 0)
            exbits = msg.getUint32$0(0);
          if ((exbits & 1) !== 0) {
            this.core.pixel_x = msg.getInt16$0(0);
            this.core.pixel_y = msg.getInt16$0(0);
            this.core.pixel_w = msg.getInt16$0(0);
            this.core.pixel_z = msg.getInt16$0(0);
            this.core._oob = true;
          }
          if ((exbits & 2) !== 0)
            this.core.glideSize = msg.getFloat32$0(0);
          if ((exbits & 4) !== 0) {
            ma = msg.getFloat32$0(0);
            mb = msg.getFloat32$0(0);
            mtx = msg.getFloat32$0(0);
            mc = msg.getFloat32$0(0);
            md = msg.getFloat32$0(0);
            mty = msg.getFloat32$0(0);
            this.core.transform = T.Matrix$(ma, -mc, -mb, md, mtx, -mty);
            this.core._oob = true;
          }
          if ((exbits & 8) !== 0) {
            color = new N.AtomColor(255, 255, 255, 255, null, true, null);
            color.red = msg._webclient$_data.getUint8(msg._pos++);
            color.green = msg._webclient$_data.getUint8(msg._pos++);
            color.blue = msg._webclient$_data.getUint8(msg._pos++);
            color.alpha = msg._webclient$_data.getUint8(msg._pos++);
            this.core.color = color.canon$0();
          }
          if ((exbits & 16) !== 0)
            this.core.blendMode = msg._webclient$_data.getUint8(msg._pos++);
          if ((exbits & 32) !== 0) {
            this.core.maptext = msg.getUTFString$0();
            this.core.maptextWidth = msg.getUint16$0(0);
            this.core.maptextHeight = msg.getUint16$0(0);
            this.core.maptextX = msg.getInt16$0(0);
            this.core.maptextY = msg.getInt16$0(0);
          }
          if ((exbits & 64) !== 0)
            this.screenLoc = msg.getUTFString$0();
          if ((exbits & 128) !== 0) {
            this.core.invisibility = msg._webclient$_data.getUint8(msg._pos++);
            this.core.luminosity = msg._webclient$_data.getUint8(msg._pos++);
            this.core.infraLuminosity = msg._webclient$_data.getUint8(msg._pos++);
          }
          if ((exbits & 256) !== 0)
            this.core.plane = msg.getInt16$0(0);
          if ((exbits & 512) !== 0) {
            color = new N.AtomColor(255, 255, 255, 255, null, true, null);
            f = new Array(20);
            f.fixed$length = Array;
            for (j = 0; j < 4; ++j)
              for (i = 0; i < 16; i += 4) {
                val = msg._webclient$_data.getFloat32(msg._pos, true);
                msg._pos += 4;
                f[i + j] = val;
              }
            for (i = 0; i < 4; ++i) {
              val = msg._webclient$_data.getFloat32(msg._pos, true);
              msg._pos += 4;
              f[i + 16] = val;
            }
            t1 = new N.AtomColorMatrix(null, true, null);
            t1.matrix = f;
            t1.normalize$0();
            color.matrix = t1.canon$0();
            this.core.color = color.canon$0();
          }
        }
        if (overCursor instanceof N.Appearance)
          this.overCursor = N.AtomCursor_AtomCursor$fromAppearance(this, overCursor);
        else if (typeof overCursor === "number" && Math.floor(overCursor) === overCursor)
          this.overCursor = $.me.cursorMap.$index(0, overCursor);
        if (dragCursor instanceof N.Appearance)
          this.dragCursor = N.AtomCursor_AtomCursor$fromAppearance(this, dragCursor);
        else if (typeof dragCursor === "number" && Math.floor(dragCursor) === dragCursor)
          this.dragCursor = $.me.cursorMap.$index(0, dragCursor);
        if (dropCursor instanceof N.Appearance)
          this.dropCursor = N.AtomCursor_AtomCursor$fromAppearance(this, dropCursor);
        else if (typeof dropCursor === "number" && Math.floor(dropCursor) === dropCursor)
          this.dropCursor = $.me.cursorMap.$index(0, dropCursor);
      },
      Appearance$3: function(id, $name, flags) {
        this.mouseOpacity = flags & 3;
        this.isDropZone = (flags & 4) !== 0;
        this.handlesMouseOver = (flags & 8) !== 0;
        this.handlesMouseMove = (flags & 16) !== 0;
        this.handlesMouseWheel = (flags & 32) !== 0;
        this.core = new N.AppearanceCore(65535, "", 2, -1, 0, 0, 0, 0, 0, 0, null, null, 0, 0, null, 0, 0, 0, 0, 0, 0, 0, 0, null, null);
      },
      Appearance$_clone$2: function(other, deep) {
        var t1;
        this.name = other.name;
        this.mouseOpacity = other.mouseOpacity;
        this.isDropZone = other.isDropZone;
        this.handlesMouseOver = other.handlesMouseOver;
        this.handlesMouseMove = other.handlesMouseMove;
        this.overCursor = other.overCursor;
        this.dragCursor = other.dragCursor;
        this.dropCursor = other.dropCursor;
        this.overlays = other.overlays;
        this.underlays = other.underlays;
        this.screenLoc = other.screenLoc;
        t1 = other.core;
        this.core = t1;
        if (deep && t1 != null) {
          t1.toString;
          this.core = N.AppearanceCore$_clone(t1);
        }
      },
      static: {
        Appearance$: function(id, $name, flags) {
          var t1 = new N.Appearance(id, $name, null, null, null, null, null, null, null, null, null, null, null, null, true, false, 0, null, null);
          t1.Appearance$3(id, $name, flags);
          return t1;
        },
        Appearance$fromMsg: function(msg) {
          var t1 = new N.Appearance(null, null, null, null, null, null, null, null, null, null, null, null, null, null, true, false, 0, null, null);
          t1.Appearance$fromMsg$1(msg);
          return t1;
        },
        Appearance$_clone: function(other, deep) {
          var t1 = new N.Appearance(null, null, null, null, null, null, null, null, null, null, null, null, null, null, true, false, 0, null, null);
          t1.Appearance$_clone$2(other, deep);
          return t1;
        }
      }
    },
    Appearance_composite_closure: {
      "^": "Closure:7;",
      call$1: function(ma) {
        var t1;
        if ((ma.flags & 2) !== 0) {
          t1 = ma.icon;
          t1 = t1 == null || t1.get$text(t1) != null;
        } else
          t1 = false;
        return t1;
      }
    },
    Appearance_composite_simpleSort: {
      "^": "Closure:47;",
      call$2: function(a, b) {
        var ret = a.plane - b.plane;
        if (ret !== 0)
          return ret;
        ret = a._layer - b._layer;
        if (ret !== 0)
          return ret;
        return a.tile_x - b.tile_x;
      }
    },
    Animation: {
      "^": "Object;transition,from,to,_cached,easing,loop,animFlags,duration,total_duration,mask>,start,end,total_end,_cachedTime,next,usePixels,pixel_x,pixel_y,pixel_w,pixel_z,sequence",
      get$count: function() {
        var n, cur;
        for (n = 0, cur = this; cur != null; cur = cur.next)
          ++n;
        return n;
      },
      get$last: function(_) {
        var cur, n;
        for (cur = this; n = cur.next, n != null; cur = n)
          ;
        return cur;
      },
      get$thisTail: function() {
        var cur, n;
        for (cur = this; true; cur = n) {
          n = cur.next;
          if (n == null || (n.animFlags & 4) !== 0)
            return cur;
        }
        return this;
      },
      get$nextHead: function() {
        for (var cur = this.next; cur != null; cur = cur.next)
          if ((cur.animFlags & 4) !== 0)
            return cur;
        return;
      },
      get$lastHead: function() {
        var cur, $top;
        for (cur = this.next, $top = this; cur != null; cur = cur.next)
          if ((cur.animFlags & 4) !== 0)
            $top = cur;
        return $top;
      },
      ease$2: function(t, d) {
        var t1, t2, in_only, out_only, use_default, adjusted, b, s;
        t = d <= 0 ? 0 : t / d;
        t1 = this.easing;
        t2 = t1 & 192;
        in_only = t2 === 64;
        out_only = t2 === 128;
        use_default = t2 === 0;
        switch (t1 & 63) {
          case 1:
            if (in_only)
              return Math.sin((t - 1) * 1.5707963267948966) + 1;
            if (out_only)
              return Math.sin(t * 1.5707963267948966);
            return (Math.sin((t - 0.5) * 3.141592653589793) + 1) * 0.5;
          case 2:
            if (!in_only && !out_only) {
              t1 = t * 2;
              if (t <= 0.5)
                t = t1;
              else {
                t = t1 - 1;
                out_only = true;
              }
              adjusted = true;
            } else
              adjusted = false;
            if (out_only)
              t = 1 - t;
            t = 1 - Math.sqrt(P.max(1 - t * t, 0));
            if (adjusted)
              t *= 0.5;
            return out_only ? 1 - t : t;
          case 3:
            if (!in_only && !out_only) {
              t1 = t * 2;
              if (t <= 0.5)
                t = t1;
              else {
                t = t1 - 1;
                out_only = true;
              }
              adjusted = true;
            } else
              adjusted = false;
            if (out_only)
              t = 1 - t;
            t *= t * t;
            if (adjusted)
              t *= 0.5;
            return out_only ? 1 - t : t;
          case 7:
            if (!in_only && !out_only) {
              t1 = t * 2;
              if (t <= 0.5)
                t = t1;
              else {
                t = t1 - 1;
                out_only = true;
              }
              adjusted = true;
            } else
              adjusted = false;
            if (out_only)
              t = 1 - t;
            t *= t;
            if (adjusted)
              t *= 0.5;
            return out_only ? 1 - t : t;
          case 4:
            if (use_default)
              out_only = true;
            if (!in_only && !out_only) {
              t1 = t * 2;
              if (t <= 0.5) {
                t = t1;
                in_only = true;
              } else
                t = t1 - 1;
              adjusted = true;
            } else
              adjusted = false;
            b = (in_only ? 1 - t : t) * 2.75;
            if (b <= 0)
              t = 0;
            else if (b <= 1)
              t = b * b;
            else if (b <= 2) {
              b -= 1.5;
              t = b * b + 0.75;
            } else if (b <= 2.5) {
              b -= 2.25;
              t = b * b + 0.9375;
            } else if (b <= 2.75) {
              b -= 2.625;
              t = b * b + 0.984375;
            } else
              t = 1;
            if (adjusted)
              t *= 0.5;
            return in_only ? 1 - t : t;
          case 6:
            if (!in_only && !out_only) {
              t1 = t * 2;
              if (t <= 0.5)
                t = t1;
              else {
                t = t1 - 1;
                out_only = true;
              }
              adjusted = true;
              s = 2.59491;
            } else {
              adjusted = false;
              s = 1.70158;
            }
            if (out_only)
              t = 1 - t;
            t *= t * ((s + 1) * t - s);
            if (adjusted)
              t *= 0.5;
            return out_only ? 1 - t : t;
          case 5:
            if (use_default)
              out_only = true;
            if (!in_only && !out_only) {
              t1 = t * 2;
              if (t <= 0.5) {
                t = t1;
                in_only = true;
              } else
                t = t1 - 1;
              adjusted = true;
            } else
              adjusted = false;
            if (in_only)
              t = 1 - t;
            t = 1 - Math.pow(2, -t * 10) * Math.cos(t * 3.141592653589793 / 0.15);
            if (adjusted)
              t *= 0.5;
            return in_only ? 1 - t : t;
          default:
            return t;
        }
      },
      currentAppearance$1: function(base) {
        var now, t1, f, head, d, t2, anim, t3;
        now = $.me.currentMs;
        t1 = this.total_end;
        if (t1 != null && now >= t1)
          return;
        if (now === this._cachedTime)
          return this._cached;
        this._cached = null;
        this._cachedTime = now;
        t1 = this.transition;
        f = t1 != null ? t1.from : this.from;
        for (head = this; head != null; head = head.get$nextHead()) {
          d = now - this.start;
          t1 = head.total_duration;
          if (d > t1) {
            t2 = head.loop;
            if (t2 > 0 && d > t1 * t2) {
              anim = head.get$thisTail();
              f = head.from;
              t1 = this._cached;
              if (t1 == null) {
                base.toString;
                t1 = N.Appearance$_clone(base, false);
                this._cached = t1;
                t1.core = t1.core.copyMask$2(f.core.interpolate$3(anim.to.core, 1, this.animFlags), this.mask);
              } else {
                t2 = t1.core;
                t1.core = t2.copyMask$2(f.core.interpolateAdd$4(t2, anim.to.core, 1, this.animFlags), this.mask);
              }
              continue;
            }
            d = t1 > 0 ? C.JSInt_methods.$mod(d, t1) : 0;
            f = head.from;
          }
          for (anim = head; t1 = anim != null, t1; anim = anim.next) {
            t2 = anim.duration;
            if (d < t2)
              break;
            d -= t2;
          }
          if (t1)
            t1 = (anim === head || (anim.animFlags & 4) === 0) && d >= 0;
          else
            t1 = false;
          if (t1) {
            if (anim !== this)
              f = anim.from;
            d = anim.ease$2(d, anim.duration);
            t1 = this._cached;
            t2 = anim.to;
            if (t1 == null) {
              base.toString;
              t1 = N.Appearance$_clone(base, false);
              this._cached = t1;
              t1.core = t1.core.copyMask$2(f.core.interpolate$3(t2.core, d, this.animFlags), this.mask);
            } else {
              t3 = t1.core;
              t1.core = t3.copyMask$2(f.core.interpolateAdd$4(t3, t2.core, d, this.animFlags), this.mask);
            }
          }
        }
        if (this.usePixels && this._cached != null) {
          t1 = this._cached.core;
          t1.pixel_x = t1.pixel_x - this.pixel_x;
          t1.pixel_y = t1.pixel_y - this.pixel_y;
          t1.pixel_w = t1.pixel_w - this.pixel_w;
          t1.pixel_z = t1.pixel_z - this.pixel_z;
        }
        return this._cached;
      },
      garbageScan$0: function() {
        var src, t1;
        for (src = this; src != null;) {
          t1 = src.transition;
          if (t1 != null)
            t1.garbageScan$0();
          t1 = src.from;
          if (t1 != null)
            t1.garbageScan$0();
          t1 = src.to;
          if (t1 != null)
            t1.garbageScan$0();
          src = src.next;
        }
      },
      Animation$asTransition$2: function(info, src) {
        this.from = src.from;
        this.mask = src.mask;
        this.pixel_x = src.pixel_x;
        this.pixel_y = src.pixel_y;
        this.pixel_w = src.pixel_w;
        this.pixel_z = src.pixel_z;
      },
      static: {
        Animation$asTransition: function(info, src) {
          var t1 = new N.Animation(null, null, null, null, 0, 1, 0, null, null, 0, null, null, null, null, null, false, 0, 0, 0, 0, 0);
          t1.Animation$asTransition$2(info, src);
          return t1;
        }
      }
    },
    PendingFlick: {
      "^": "Object;atomId,iconId,iconState,time",
      apply$0: function() {
        var t1, atom, t2, a, t3, t4, duration;
        t1 = this.atomId;
        atom = $.me.infoMap.$index(0, t1);
        if (atom != null) {
          t2 = atom._appearance;
          t2.toString;
          a = N.Appearance$_clone(t2, true);
          t2 = this.iconId;
          if (t2 != null)
            a.core.iconId = t2;
          t2 = this.iconState;
          if (t2 != null)
            a.core.iconState = t2;
          t2 = this.time;
          t3 = new N.Flick(a, t2, null);
          t4 = $.me;
          duration = t4.tickLag / 1000;
          t3.end = t2 + (t4.iconInfoMap.$index(0, a.core.iconId) != null ? $.me.iconInfoMap.$index(0, a.core.iconId).flickDuration$1(a.core.iconState) : duration);
          atom.flick = t3;
          atom.inert = false;
          atom.prepareTick$1(true);
          if ((t1 & 4278190080) >>> 0 === 218103808) {
            t2 = $.me.infoMap.$index(0, atom.locId);
            if (t2 != null) {
              t2.inert = false;
              t2.prepareTick$1(true);
            }
          }
        } else if (!($.me.currentTime - this.time > 10))
          return;
        $.me.pendingFlicks.remove$1(0, t1);
      }
    },
    Flick: {
      "^": "Object;appearance',start,end"
    },
    AtomInfo: {
      "^": "Object;id',sequence,_appearance<,_lastIcon,lastIconSet,inert?,tickIndex<,cantick<,inUse,garbage,inView@,isEx@,_oob,order,locId@,glide,flick,images,_animation,x>,y>,z,tile_x?,tile_y,pixel_x,pixel_y,pixel_w,pixel_z,step_x,step_y,step_size,mapOffsetX,mapOffsetY,boundRect,logicalBounds,screenLoc,onScreen,creationTime,_normalVis,_isVisible,_drawDark,_blackness,_mapicons,_screenicons,_composite,icons_dirty,position_dirty?,mapOffset_dirty?,composite_dirty,_visbounds,_visboundsTiles,displayBoundsDirty,_displayBounds",
      set$appearance: function(_, a) {
        var t1, t2, t3, t4;
        t1 = this._appearance;
        if (a == null ? t1 != null : a !== t1) {
          if (t1 != null) {
            t2 = a.core;
            t3 = t2.iconId;
            t1 = t1.core;
            t4 = t1.iconId;
            if (t3 == null ? t4 == null : t3 === t4) {
              t2 = t2.iconState;
              t1 = t1.iconState;
              t1 = t2 == null ? t1 != null : t2 !== t1;
            } else
              t1 = true;
            if (t1)
              this.creationTime = $.me.currentTime;
          }
          this._oob = a != null && a.core.get$oob() ? true : null;
          this._visboundsTiles = null;
          this._visbounds = null;
          this._appearance = a;
          this.composite_dirty = true;
          this.icons_dirty = true;
          this.inert = false;
          if (this.cantick && this.tickIndex < 0)
            this.prepareTick$1(true);
          if ((this.id & 4278190080) >>> 0 === 218103808) {
            t1 = $.me.infoMap.$index(0, this.locId);
            if (t1 != null) {
              t1.inert = false;
              t1._oob = null;
              t1._visboundsTiles = null;
              t1._visbounds = null;
              if (t1.cantick && t1.tickIndex < 0)
                t1.prepareTick$1(true);
            }
          }
        }
      },
      set$drawDark: function(b) {
        var t1;
        if (b !== this._drawDark) {
          if (!this.icons_dirty) {
            if (b) {
              if (this._blackness == null) {
                t1 = N.MapAtom$blackness();
                this._blackness = t1;
                t1.calculateIconOffset$0();
              }
              this._mapicons.push(this._blackness);
            } else {
              t1 = this._mapicons;
              (t1 && C.JSArray_methods).remove$1(t1, this._blackness);
            }
            this.position_dirty = true;
          }
          this._drawDark = b;
        }
      },
      alwaysGlide$0: function() {
        var t1 = this.glide;
        if (t1 == null)
          this.glide = new N.Glide(true, true, false, false, false, null, null, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0, 0, 65535, null);
        else
          t1.persist = true;
      },
      get$moving: function() {
        if ((this.id & 4278190080) >>> 0 === 218103808) {
          var t1 = $.me.infoMap.$index(0, this.locId);
          if (t1 != null)
            return t1.get$moving();
        }
        t1 = this.glide;
        return t1 != null && t1.moving !== 0;
      },
      get$moveTime: function() {
        if ((this.id & 4278190080) >>> 0 === 218103808) {
          var t1 = $.me.infoMap.$index(0, this.locId);
          if (t1 != null)
            return t1.get$moveTime();
        }
        t1 = this.glide;
        return t1 != null ? t1.move_started : 0;
      },
      addPendingImages$0: function() {
        var pend, t1;
        pend = $.me.pendingImages.$index(0, this.id);
        if (pend != null) {
          t1 = this.images;
          if (t1 == null) {
            t1 = [];
            this.images = t1;
          }
          (t1 && C.JSArray_methods).addAll$1(t1, J.map$1$ax(pend, new N.AtomInfo_addPendingImages_closure()));
          this.inert = false;
          if (this.cantick && this.tickIndex < 0)
            this.prepareTick$1(true);
          this.composite_dirty = true;
          this.icons_dirty = true;
        }
      },
      removeImage$1: function(img) {
        var t1 = this.images;
        if (t1 == null)
          return;
        (t1 && C.JSArray_methods).remove$1(t1, img);
        if (this.images.length === 0)
          this.images = null;
        this.inert = false;
        this._oob = null;
        this._visboundsTiles = null;
        this._visbounds = null;
        if (this.cantick && this.tickIndex < 0)
          this.prepareTick$1(true);
        this.composite_dirty = true;
        this.icons_dirty = true;
      },
      get$animation: function(_) {
        var t1, t2;
        t1 = this._animation;
        if (t1 == null)
          return;
        t2 = t1.total_end;
        if (!(t2 == null || t2 > $.me.currentMs)) {
          this.set$animation(0, null);
          this._oob = null;
          return t1;
        }
        return t1;
      },
      set$animation: function(_, a) {
        var t1;
        this._animation = a;
        this.icons_dirty = true;
        this.inert = false;
        this._oob = null;
        if (this.cantick && this.tickIndex < 0)
          this.prepareTick$1(true);
        if ((this.id & 4278190080) >>> 0 === 218103808) {
          t1 = $.me.infoMap.$index(0, this.locId);
          if (t1 != null) {
            t1.inert = false;
            t1._oob = null;
            if (t1.cantick && t1.tickIndex < 0)
              t1.prepareTick$1(true);
          }
        }
      },
      get$currentAppearance: function() {
        var t1, t2, a;
        t1 = this._appearance;
        if (t1 != null) {
          t2 = this._animation;
          if (t2 != null) {
            a = t2.currentAppearance$1(t1);
            t1 = a == null;
          } else {
            a = null;
            t1 = true;
          }
        } else {
          a = null;
          t1 = true;
        }
        if (t1)
          return this._appearance;
        return a;
      },
      get$animating: function() {
        var t1, t2, _i, img, t3, time;
        if (this.flick != null || this.get$animation(this) != null)
          return true;
        t1 = this.images;
        if (t1 != null)
          for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            img = t1[_i];
            if (img != null)
              t3 = img.icons_dirty || img.get$animating();
            else
              t3 = false;
            if (t3)
              return true;
          }
        if (this._appearance == null)
          return false;
        time = this.creationTime;
        t1 = this.glide;
        if (t1 != null && t1.moving !== 0 && time < this.get$moveTime())
          time = this.get$moveTime();
        return this._appearance.animating$1($.me.currentTime - time);
      },
      get$turfId: function() {
        var l, t1;
        for (l = this; l != null;) {
          t1 = l.id;
          if ((t1 & 4278190080) >>> 0 === 16777216)
            return t1;
          l = $.me.infoMap.$index(0, l.locId);
        }
        return 0;
      },
      get$bounds: function() {
        var t1 = this.boundRect;
        return t1 != null ? t1 : $.me.defaultBounds;
      },
      updateXYZ$0: function() {
        var t, s, id, t1, t2;
        t = this.id;
        t = (t & 4278190080) >>> 0 === 16777216 ? t : this.locId;
        if (t != null && (t & 4278190080) >>> 0 === 16777216) {
          s = $.me.mapInfo;
          id = (t & 4278190080) >>> 0 === 16777216 ? t & 16777215 : -1;
          t1 = s.maxx;
          this.x = C.JSInt_methods.$mod(id, t1);
          t1 = C.JSInt_methods.$tdiv(id, t1);
          this.y = t1;
          t2 = s.maxy;
          this.z = C.JSInt_methods.$tdiv(t1, t2);
          this.y = C.JSInt_methods.$mod(t1, t2);
        } else {
          this.z = -1;
          this.y = -1;
          this.x = -1;
        }
      },
      get$visbounds: function() {
        var t1, t2, i, i0, sub, pw, pz, dir, pz0;
        t1 = this._visbounds;
        if (t1 != null)
          return t1;
        this._visboundsTiles = null;
        if (this.icons_dirty)
          this.position_dirty = true;
        this.RefreshIcons$0();
        if (this._mapicons.length === 0) {
          t1 = $.me;
          t2 = t1._defaultClientRect;
          if (t2 == null) {
            t2 = t1.iconWidth;
            t2 = N.ClientRect$(t2, t1.mapformat !== 0 ? t1.iconHeight : t2);
            t1._defaultClientRect = t2;
            t1 = t2;
          } else
            t1 = t2;
          return t1;
        }
        for (this.RefreshIcons$0(), i = this._mapicons.length; i0 = i - 1, i > 0; i = i0) {
          this.RefreshIcons$0();
          sub = this._mapicons[i0].get$visbounds();
          t1 = this._visbounds;
          if (t1 != null)
            t1.union$1(sub);
          else {
            t1 = new N.ClientRect(null, null, null, null, null, null, null, null);
            t1._oob = sub._oob;
            t1._oob_at_all = sub._oob_at_all;
            t1.left = sub.left;
            t1.right = sub.right;
            t1.top = sub.top;
            t1.bottom = sub.bottom;
            t1.cx = sub.cx;
            t1.cy = sub.cy;
            this._visbounds = t1;
          }
        }
        this._visbounds.offset$2(0, this.pixel_x, this.pixel_y);
        pw = this.pixel_w;
        if (pw !== 0 || this.pixel_z !== 0) {
          pz = this.pixel_z;
          dir = $.me.mapdir;
          if ((dir & 10) !== 0) {
            pw = -pw;
            pz = -pz;
          }
          if ((dir & 12) !== 0) {
            pz0 = -pw;
            pw = pz;
            pz = pz0;
          }
          this._visbounds.offset$2(0, pw, pz);
        }
        return this._visbounds;
      },
      get$visboundsTiles: function() {
        var t1, v, t2, t3, l, r, t4, t;
        t1 = this._visboundsTiles;
        if (t1 == null) {
          v = this.get$visbounds();
          if (this._visbounds == null)
            return $.me.defaultVisboundsTiles;
          t1 = v.left;
          t2 = $.me;
          t3 = t2.iconWidth;
          l = C.JSInt_methods.$tdiv(t1, t3);
          r = C.JSInt_methods.$tdiv(v.right - 1, t3);
          t1 = v.top;
          t4 = t2.mapformat !== 0;
          t = C.JSInt_methods.$tdiv(t1, t4 ? t2.iconHeight : t3);
          t1 = v.bottom;
          t2 = t4 ? t2.iconHeight : t3;
          t2 = new U.Rectangle0(l, t, r - l, C.JSInt_methods.$tdiv(t1 - 1, t2) - t, [P.$int]);
          this._visboundsTiles = t2;
          t1 = t2;
        }
        return t1;
      },
      get$oob: function() {
        var t1, a, i, i0;
        t1 = this._oob;
        if (t1 != null)
          return t1;
        a = this.get$currentAppearance();
        if (a != null) {
          if (a.core.get$tileBound()) {
            this._oob = false;
            return false;
          }
          if (a.core.get$oob()) {
            this._oob = true;
            return true;
          }
        }
        t1 = this.images;
        if (t1 != null)
          for (i = t1.length; i0 = i - 1, i > 0; i = i0)
            if (this.images[i0].get$oob()) {
              this._oob = true;
              return true;
            }
        if (this.pixel_x + this.step_x !== 0 || this.pixel_y + this.step_y !== 0 || this.pixel_w !== 0 || this.pixel_z !== 0) {
          this._oob = true;
          return true;
        }
        this._oob = false;
        return false;
      },
      get$lastIconInfo: function() {
        var t1 = this._lastIcon;
        if (t1 === 65535)
          return;
        return $.me.iconMap.$index(0, t1);
      },
      get$composite: function() {
        var t1, main, t2, _i, ix, iy, transform, a, b, c, d, tx, ty, det, t3, ma, t4;
        if (this.composite_dirty || this._composite == null) {
          t1 = this.MapIcons$2(true, true);
          this._composite = t1;
          (t1 && C.JSArray_methods).checkGrowable$1(t1, "removeWhere");
          C.JSArray_methods._removeWhere$2(t1, new N.AtomInfo_composite_closure(), true);
          t1 = this._composite;
          main = (t1 && C.JSArray_methods).firstWhere$2$orElse(t1, new N.AtomInfo_composite_closure0(), null);
          for (t1 = this._composite, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
            t1[_i].calculateIconOffset$0();
          if (main != null) {
            ix = main.iconOffsetX;
            iy = main.iconOffsetY;
            transform = main.transform;
            t1 = transform != null;
            if (t1) {
              t2 = transform._data;
              a = t2[0];
              b = t2[1];
              c = t2[2];
              d = t2[3];
              tx = t2[4];
              ty = t2[5];
              det = a * d - b * c;
              t2[0] = d / det;
              t2[1] = -b / det;
              t2[2] = -c / det;
              t2[3] = a / det;
              t3 = -tx;
              t2[4] = t3 * t2[0] - ty * t2[2];
              t2[5] = t3 * t2[1] - ty * t2[3];
            }
            for (t2 = this._composite, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, H.throwConcurrentModificationError)(t2), ++_i) {
              ma = t2[_i];
              ma.iconOffsetX = ma.iconOffsetX - ix;
              ma.iconOffsetY = ma.iconOffsetY - iy;
              if (t1)
                if (ma !== main) {
                  t4 = ma.transform;
                  if (t4 == null)
                    ma.transform = transform;
                  else
                    t4.copyFromAndConcat$2(transform, t4);
                } else
                  ma.transform = null;
            }
          }
          this.composite_dirty = false;
        }
        return this._composite;
      },
      RefreshIcons$0: function() {
        var t1, a;
        if (this.icons_dirty) {
          this._mapicons = this.MapIcons$1(false);
          if (this.screenLoc == null)
            if ((this.id & 4278190080) >>> 0 === 218103808) {
              t1 = this._appearance;
              t1 = t1 != null && t1.core.get$override();
            } else
              t1 = false;
          else
            t1 = true;
          this._screenicons = t1 ? this.MapIcons$1(true) : null;
          if (this._drawDark) {
            if (this._blackness == null) {
              t1 = N.MapAtom$blackness();
              this._blackness = t1;
              t1.calculateIconOffset$0();
            }
            this._mapicons.push(this._blackness);
          }
          a = this.get$currentAppearance();
          this.calculateMapOffset$0();
          if (a.mouseOpacity !== 2) {
            t1 = this._mapicons;
            (t1 && C.JSArray_methods).checkGrowable$1(t1, "removeWhere");
            C.JSArray_methods._removeWhere$2(t1, new N.AtomInfo_RefreshIcons_closure(), true);
            t1 = this._screenicons;
            if (t1 != null) {
              (t1 && C.JSArray_methods).checkGrowable$1(t1, "removeWhere");
              C.JSArray_methods._removeWhere$2(t1, new N.AtomInfo_RefreshIcons_closure0(), true);
            }
          }
          t1 = this._mapicons;
          (t1 && C.JSArray_methods).forEach$1(t1, new N.AtomInfo_RefreshIcons_closure1(this));
          t1 = this._screenicons;
          if (t1 != null)
            (t1 && C.JSArray_methods).forEach$1(t1, new N.AtomInfo_RefreshIcons_closure2());
          if (this._appearance != null)
            this.icons_dirty = false;
        }
      },
      MapIcons$2: function(ignorePixels, composite) {
        var a, time, t1, cloned_a, fa, t2, icons, base, cloned, replace, _i, img, ia, t3, t4, tmp, len, layer, i, i0;
        a = this._appearance;
        if (a != null)
          a.lastUsed = $.me.currentTime;
        a = composite ? a : this.get$currentAppearance();
        if (a == null)
          return [];
        if (composite && this.images == null)
          return a.get$composite();
        time = this.creationTime;
        if (this.get$moving() && time < this.get$moveTime())
          time = this.get$moveTime();
        t1 = this.flick;
        if (t1 != null && !composite) {
          t1.toString;
          if (!($.me.currentTime < t1.end)) {
            this.flick = null;
            cloned_a = false;
          } else {
            fa = t1.appearance;
            a = N.Appearance$_clone(a, true);
            a.overlays = fa.overlays;
            a.underlays = fa.underlays;
            t1 = a.core;
            t2 = fa.core;
            t1.iconId = t2.iconId;
            t1.iconState = t2.iconState;
            time = this.flick.start;
            cloned_a = true;
          }
        } else
          cloned_a = false;
        if (ignorePixels) {
          t1 = a.core;
          t1 = t1.pixel_x !== 0 || t1.pixel_y !== 0 || t1.pixel_w !== 0 || t1.pixel_z !== 0;
        } else
          t1 = false;
        if (t1) {
          if (!cloned_a) {
            a = N.Appearance$_clone(a, true);
            cloned_a = true;
          }
          t1 = a.core;
          t1.pixel_z = 0;
          t1.pixel_w = 0;
          t1.pixel_y = 0;
          t1.pixel_x = 0;
        }
        icons = [];
        if ((this.id & 4278190080) >>> 0 === 218103808 && $.me.infoMap.$index(0, this.locId) != null && $.me.infoMap.$index(0, this.locId)._appearance != null) {
          base = $.me.infoMap.$index(0, this.locId)._appearance.core;
          if (a.core.plane === -32767) {
            if (!cloned_a)
              a = N.Appearance$_clone(a, true);
            a.core.plane = base.plane;
          }
          if (base.iconId !== 65535 && a.core.iconId === 65535) {
            base.toString;
            base = N.AppearanceCore$_clone(base);
            base.iconId = null;
            cloned = true;
          } else
            cloned = false;
          if (base.iconState.length !== 0 && a.core.iconState.length === 0) {
            if (!cloned)
              base = N.AppearanceCore$_clone(base);
            base.iconState = "";
          }
        } else
          base = null;
        if (this._isVisible || composite) {
          t1 = this.get$moving() && !composite;
          a.Fill$5(icons, this, base, t1, composite ? 0 : $.me.currentTime - time);
        }
        replace = icons.length;
        t1 = this.images;
        if (t1 != null)
          if (!this._isVisible)
            t2 = this._normalVis || (this.id & 4278190080) >>> 0 === 67108864 || composite;
          else
            t2 = true;
        else
          t2 = false;
        if (t2)
          for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            img = t1[_i];
            if (img == null)
              continue;
            ia = img._appearance;
            if (ia == null)
              continue;
            img.icons_dirty = true;
            t3 = ia.core.dir;
            t4 = a.core.dir;
            if (t3 == null ? t4 != null : t3 !== t4) {
              if (ia.id != null) {
                ia = N.Appearance$_clone(ia, true);
                img.set$appearance(0, ia);
              }
              ia.core.dir = a.core.dir;
            }
            if (ia.core.layer < 0) {
              if (img._appearance.id != null) {
                ia = N.Appearance$_clone(ia, true);
                img.set$appearance(0, ia);
              }
              ia.core.layer = 5;
            }
            if ((ia.core.bits & 262144) !== 0) {
              t3 = this._normalVis || (this.id & 4278190080) >>> 0 === 67108864;
              if (t3 !== img._normalVis) {
                img.icons_dirty = true;
                img._normalVis = t3;
              }
              if (t3 !== img._isVisible) {
                img.icons_dirty = true;
                img._isVisible = t3;
              }
              if (ignorePixels) {
                img.RefreshIcons$0();
                tmp = img._screenicons;
              } else {
                img.RefreshIcons$0();
                tmp = img._mapicons;
              }
              (tmp && C.JSArray_methods).forEach$1(tmp, new N.AtomInfo_MapIcons_closure(this));
              P.RangeError_checkValidRange(0, replace, icons.length, null, null, null);
              icons.splice(0, replace - 0);
              C.JSArray_methods.insertAll$2(icons, 0, tmp);
              replace = tmp.length;
            } else {
              if (!img._normalVis) {
                img.icons_dirty = true;
                img._normalVis = true;
              }
              if (!img._isVisible) {
                img.icons_dirty = true;
                img._isVisible = true;
              }
              img.RefreshIcons$0();
              tmp = img._mapicons;
              (tmp && C.JSArray_methods).forEach$1(tmp, new N.AtomInfo_MapIcons_closure0(this));
              C.JSArray_methods.addAll$1(icons, tmp);
            }
          }
        len = icons.length;
        if (len > 0) {
          layer = J.get$layer$x(icons[0]);
          for (i = 0; ++i, i < len;)
            if (J.$lt$n(J.get$layer$x(icons[i]), 0)) {
              if (layer >= 0)
                J.set$layer$x(icons[i], layer);
            } else
              layer = J.get$layer$x(icons[i]);
          i = len - 1;
          layer = J.get$layer$x(icons[i]);
          for (; --i, i >= 0;)
            if (J.$lt$n(J.get$layer$x(icons[i]), 0)) {
              if (layer >= 0)
                J.set$layer$x(icons[i], layer);
            } else
              layer = J.get$layer$x(icons[i]);
        }
        for (i = 0; i < len; ++i)
          if (icons[i].get$groupBegin() > 0) {
            i0 = i - 1;
            N.AtomInfo_GroupChildrenAt(icons, i, len);
            len = icons.length;
            i = i0;
          }
        return icons;
      },
      MapIcons$1: function(ignorePixels) {
        return this.MapIcons$2(ignorePixels, false);
      },
      pendingIcons$1: function(pending) {
        var a, t1, t2, _i, img;
        a = this._appearance;
        if (a != null)
          pending = a.pendingIcons$1(pending);
        t1 = this.images;
        if (t1 != null)
          for (t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            img = t1[_i];
            if (img != null)
              pending = img.pendingIcons$1(pending);
          }
        return pending;
      },
      pendingIcons$0: function() {
        return this.pendingIcons$1(null);
      },
      get$mainIcon: function() {
        var t1 = this._mapicons;
        if (t1 == null)
          return;
        return (t1 && C.JSArray_methods).firstWhere$2$orElse(t1, new N.AtomInfo_mainIcon_closure(), new N.AtomInfo_mainIcon_closure0());
      },
      get$mainIconId: function() {
        var t1, ma;
        t1 = this.get$composite();
        ma = (t1 && C.JSArray_methods).firstWhere$2$orElse(t1, new N.AtomInfo_mainIconId_closure(), new N.AtomInfo_mainIconId_closure0());
        if (ma != null && ma.icon != null)
          return ma.icon._webclient$_index;
        return 65535;
      },
      calculateMapOffset$0: function() {
        var t1, dir, _px, _py, pw, pz, t2, _b, t3, _tx, px, t4, t5, _ty, py, t6, t7, px0, po, s;
        if (!this.mapOffset_dirty)
          return;
        this.mapOffset_dirty = false;
        t1 = $.me;
        dir = t1.mapdir;
        _px = this.pixel_x + this.step_x;
        _py = this.pixel_y + this.step_y;
        pw = this.pixel_w;
        pz = this.pixel_z;
        t2 = this.glide;
        if (t2 != null) {
          _px += C.JSNumber_methods.round$0(t2.glide_x);
          _py += C.JSNumber_methods.round$0(t2.glide_y);
        }
        _b = this.boundRect;
        _b = _b != null ? _b : t1.defaultBounds;
        t2 = this.x;
        t3 = t1.iconWidth;
        _tx = t2 * t3;
        px = _px + _tx;
        t4 = this.y;
        t5 = t1.mapformat;
        _ty = t4 * (t5 !== 0 ? t1.iconHeight : t3);
        py = _py + _ty;
        t6 = (dir & 10) !== 0;
        if (t6) {
          px = -px;
          py = -py;
        }
        t7 = (dir & 12) !== 0;
        if (t7) {
          px0 = -py;
          py = px;
          px = px0;
        }
        switch (t5) {
          case 1:
            this.mapOffsetX = C.JSInt_methods._tdivFast$1(px + py, 2) + pw;
            this.mapOffsetY = C.JSInt_methods._tdivFast$1(px - py, 4) - pz;
            this.tile_x = t2;
            this.tile_y = t4;
            po = _px + ((dir & 9) !== 0 ? _b.left + _b.width - 1 : _b.left);
            if (po < 0 || po >= t3)
              this.tile_x = t2 + C.JSDouble_methods.floor$0(po / t3);
            po = _py + ((dir & 5) !== 0 ? _b.top : _b.top + _b.height - 1);
            if (!(po < 0)) {
              t1 = $.me;
              t1 = po >= (t1.mapformat !== 0 ? t1.iconHeight : t1.iconWidth);
            } else
              t1 = true;
            if (t1) {
              t1 = this.tile_y;
              t2 = $.me;
              this.tile_y = t1 + C.JSDouble_methods.floor$0(po / (t2.mapformat !== 0 ? t2.iconHeight : t2.iconWidth));
            }
            break;
          case 2:
            this.mapOffsetX = px + pw;
            t1 = t1.iconHeight;
            this.mapOffsetY = -(C.JSDouble_methods.round$0(py * t1 / t3) + pz);
            this.tile_x = t2;
            this.tile_y = t4;
            po = _py + ((dir & 5) !== 0 ? _b.top : _b.top + _b.height - 1);
            if (!(po < 0))
              t2 = po >= (t5 !== 0 ? t1 : t3);
            else
              t2 = true;
            if (t2)
              this.tile_y = t4 + C.JSDouble_methods.floor$0(po / (t5 !== 0 ? t1 : t3));
            break;
          default:
            this.mapOffsetX = px + pw;
            this.mapOffsetY = -(py + pz);
            this.tile_x = t2;
            this.tile_y = t4;
            break;
        }
        if (dir !== 1) {
          if (t6) {
            this.tile_x = -this.tile_x;
            this.tile_y = -this.tile_y;
          }
          if (t7) {
            s = this.tile_y;
            this.tile_y = this.tile_x;
            this.tile_x = -s;
          }
        }
        this.logicalBounds = new U.Rectangle0(_tx + _px + _b.left, _ty + _py + _b.top, _b.width, _b.height, [null]);
        this.displayBoundsDirty = true;
      },
      prepareTick$1: function(t) {
        var t1, other;
        if (t) {
          if (this.tickIndex < 0) {
            t1 = $.me.tickingAtoms;
            this.tickIndex = t1.length;
            t1.push(this);
          }
        } else if (this.tickIndex >= 0) {
          other = $.me.tickingAtoms.pop();
          if (other !== this) {
            other.tickIndex = this.tickIndex;
            $.me.tickingAtoms[this.tickIndex] = other;
          }
          this.tickIndex = -1;
        }
      },
      tick$0: function() {
        var t1, t2;
        t1 = this.glide;
        if (t1 != null) {
          t2 = t1.moving;
          if (t1.glide$0() || this.glide.changed) {
            this.glide.changed = false;
            this.mapOffset_dirty = true;
            this.calculateMapOffset$0();
            this.position_dirty = !this.icons_dirty;
            if (this.z >= 0)
              $.me.mapInfo.mapResort$0();
            this.inert = false;
            if (this.cantick && this.tickIndex < 0)
              this.prepareTick$1(true);
          }
          if (t2 === 0 && this.glide.moving === 0) {
            if (!this.glide.persist)
              this.glide = null;
          } else
            this.icons_dirty = true;
        }
        if (!this.icons_dirty && this.get$animating())
          this.icons_dirty = true;
        t1 = this.icons_dirty;
        this.inert = !t1;
        if (this.cantick)
          this.prepareTick$1(t1);
      },
      beginGlide$0: function() {
        var t1, t2, c, t3, t4, t5, t6, my, t7, t8, mx, gx, t9, gy, bigJump, t10, t11, t12;
        this.inert = false;
        if (this.cantick && this.tickIndex < 0)
          this.prepareTick$1(true);
        if ($.me.get$pixelGlide())
          this.alwaysGlide$0();
        else if (this.glide == null)
          this.glide = new N.Glide(false, true, false, false, false, null, null, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, 0, 0, 65535, null);
        t1 = this.glide;
        if (!$.me.get$pixelGlide()) {
          t2 = this._appearance;
          t2 = t2 != null && t2.core.get$longGlide();
        } else
          t2 = true;
        t1.longGlide = t2;
        t2 = this.glide;
        t2.id = this.id;
        t1 = this._appearance;
        t2.name = t1 != null ? t1.name : "";
        c = t1.core;
        if ($.me.get$pixelGlide()) {
          t1 = this.glide;
          t2 = this.x;
          t3 = this.y;
          t4 = this.z;
          t5 = this.step_x;
          t6 = this.step_y;
          my = this.step_size;
          t7 = c.get$glideType();
          t1.toString;
          if (t7 === 0 || t1.last_x < 0 || t2 < 0 || t1.last_z !== t4)
            t1.reset$0(0);
          else {
            t7 = t1.last_x;
            t8 = $.me;
            mx = t8.iconWidth;
            gx = (t2 - t7) * mx + (t5 - t1.last_step_x);
            t7 = t1.last_y;
            t9 = t8.mapformat !== 0 ? t8.iconHeight : mx;
            gy = (t3 - t7) * t9 + (t6 - t1.last_step_y);
            if (my !== 0) {
              t1.speed = my;
              mx = my;
            } else {
              my = t8.iconHeight;
              t1.speed = P.max(mx, my);
            }
            t1.glide_x -= gx;
            t1.glide_y -= gy;
            if (t4 === t1.last_z)
              if (!t1.isMissile) {
                t7 = Math.abs(gx) >= mx * 2 || Math.abs(gy) >= my * 2;
                bigJump = t7;
              } else
                bigJump = false;
            else
              bigJump = true;
            if (bigJump)
              t1.reset$0(0);
            else if (t1.trim$0(0)) {
              t1.glide_x -= gx;
              t1.glide_y -= gy;
            }
            t1.changed = true;
            t1.dir = t1.dir;
            if (!bigJump)
              t7 = t1.glide_x !== 0 || t1.glide_y !== 0;
            else
              t7 = false;
            if (t7) {
              if (t1.moving === 0)
                t1.move_started = $.me.currentTime;
              t1.moving = 1 + C.JSDouble_methods.ceil$0(100 / $.me.clientTickLag);
            }
          }
          t1.setLastCoords$5(t2, t3, t4, t5, t6);
        } else {
          if (this.step_x === 0)
            if (this.step_y === 0) {
              t1 = this.glide;
              if (t1 != null)
                t1 = t1.last_step_x !== 0 || t1.last_step_y !== 0;
              else
                t1 = false;
              if (!t1) {
                t1 = this.boundRect;
                t1 = t1 != null && !J.$eq$(t1, $.me.defaultBounds);
              } else
                t1 = true;
            } else
              t1 = true;
          else
            t1 = true;
          t2 = this.glide;
          t3 = this.x;
          t4 = this.y;
          t5 = this.z;
          if (t1) {
            t1 = this.step_x;
            t6 = this.step_y;
            if (!t2.persist)
              t2.persist = true;
            t2.gliding = false;
            if (t3 >= 0) {
              t7 = t2.last_x;
              if (t7 >= 0)
                if (t5 === t2.last_z) {
                  t8 = $.me;
                  t9 = t8.iconWidth;
                  if (!(Math.abs((t3 - t7) * t9 + t1 - t2.last_step_x) >= t9 * 2)) {
                    t7 = t2.last_y;
                    t10 = t8.mapformat !== 0;
                    t11 = t10 ? t8.iconHeight : t9;
                    t12 = t2.last_step_y;
                    t8 = t10 ? t8.iconHeight : t9;
                    t8 = Math.abs((t4 - t7) * t11 + t6 - t12) >= t8 * 2;
                    t7 = t8;
                  } else
                    t7 = true;
                } else
                  t7 = true;
              else
                t7 = true;
            } else
              t7 = true;
            if (t7)
              t2.reset$0(0);
            else if (t3 !== t2.last_x || t1 !== t2.last_step_x || t4 !== t2.last_y || t6 !== t2.last_step_y) {
              if (t2.moving === 0)
                t2.move_started = $.me.currentTime;
              t2.moving = 1 + C.JSDouble_methods.ceil$0(100 / $.me.clientTickLag);
            }
            t2.setLastCoords$5(t3, t4, t5, t1, t6);
          } else
            t2.add$5(0, t3, t4, t5, c.glideSize, c.get$glideType());
        }
      },
      garbageScan$0: function() {
        var t1, i, i0;
        this.inUse = true;
        this.garbage = false;
        t1 = this._appearance;
        if (t1 != null)
          t1.garbageScan$0();
        t1 = this._animation;
        if (t1 != null)
          t1.garbageScan$0();
        t1 = this._mapicons;
        if (t1 != null)
          for (i = t1.length; i0 = i - 1, i > 0; i = i0)
            this._mapicons[i0].garbageScan$0();
        t1 = this._screenicons;
        if (t1 != null)
          for (i = t1.length; i0 = i - 1, i > 0; i = i0)
            this._screenicons[i0].garbageScan$0();
      },
      AtomInfo$3: function(id, _appearance, old) {
        var t1 = this.id;
        if (t1 != null && t1 !== 65535) {
          t1 = (t1 & 4278190080) >>> 0 !== 1879048192;
          this.cantick = t1;
          if (t1)
            this.prepareTick$1(true);
        }
        t1 = $.globalSequence + 1;
        $.globalSequence = t1;
        this.sequence = t1;
      },
      static: {
        AtomInfo$: function(id, _appearance, old) {
          var t1;
          $.$get$AtomInfo_defaultAppearance();
          t1 = new N.AtomInfo(id, null, _appearance, 65535, null, false, -1, false, true, false, false, false, null, 0, 0, null, null, null, null, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, null, null, null, false, 0, false, false, false, null, null, null, null, true, false, true, true, null, null, false, null);
          t1.AtomInfo$3(id, _appearance, old);
          return t1;
        },
        AtomInfo_GroupChildrenAt: function(icons, b, len) {
          var i, ec, i0, j, t1, bc, k, t, k0, b0, master, range, deleteCount, t2, t3;
          for (i = b, ec = null; i < len; ++i) {
            if (i > b && icons[i].get$groupBegin() > 0) {
              i0 = i - 1;
              N.AtomInfo_GroupChildrenAt(icons, i, len);
              len = icons.length;
              i = i0;
              continue;
            }
            ec = icons[i].get$groupEnd();
            if (ec > 0)
              break;
          }
          if (i >= len) {
            icons[b].set$groupBegin(0);
            return;
          }
          for (j = b; j <= i; ++j)
            if (icons[j].get$keepApart() && !icons[j].get$keepTogether()) {
              icons[j].set$keepApart(false);
              for (j = b; j <= i; ++j)
                icons[j].set$keptApart(true);
              t1 = icons[b];
              t1.set$groupBegin(t1.get$groupBegin() - 1);
              t1 = icons[i];
              t1.set$groupEnd(J.$sub$n(t1.get$groupEnd(), 1));
              return;
            }
          bc = icons[b].get$groupBegin() - 1;
          --ec;
          t1 = icons[b];
          icons[i].set$groupEnd(0);
          t1.set$groupBegin(0);
          while (true) {
            if (!(b <= i && icons[b].get$keptApart()))
              break;
            ++b;
          }
          while (true) {
            if (!(b <= i && icons[i].get$keptApart()))
              break;
            --i;
          }
          for (j = b, k = null; j <= i; ++j) {
            if (icons[j].get$keepTogether())
              break;
            if (icons[j].get$keptApart()) {
              t = icons[j];
              for (k = j; k > b; k = k0) {
                k0 = k - 1;
                icons[k] = icons[k0];
              }
              b0 = b + 1;
              icons[b] = t;
              b = b0;
            }
          }
          for (j = i; j >= b; --j) {
            if (icons[j].get$keepTogether())
              break;
            if (icons[j].get$keptApart()) {
              t = icons[j];
              for (k = j; k < i; k = k0) {
                k0 = k + 1;
                icons[k] = icons[k0];
              }
              i0 = i - 1;
              icons[i] = t;
              i = i0;
            }
          }
          if (b > i)
            return;
          if (b === i) {
            master = icons[b];
            t1 = master.flags;
            if ((t1 & 1024) !== 0) {
              t1 &= 4294966271;
              master.flags = t1;
              t1 |= 2048;
              master.flags = t1;
            }
            master.flags = t1 & 4294966783;
            master.groupBegin = bc;
            master.groupEnd = ec;
            if (master.isSimple) {
              t1 = master._filters;
              t1 = t1.length !== 0 && C.JSArray_methods.get$first(t1) instanceof K.FlattenFilter;
            } else
              t1 = false;
            if (t1)
              C.JSArray_methods.removeAt$1(master._filters, 0);
            return;
          }
          if (b < i) {
            for (j = b; j <= i; ++j)
              icons[j].set$unsortedIndex(j - b);
            range = C.JSArray_methods.sublist$2(icons, b, i + 1);
            t1 = range.length - 1;
            if (t1 - 0 <= 32)
              H.Sort__insertionSort(range, 0, t1, N.webclient_ByondMap_layerSort$closure());
            else
              H.Sort__dualPivotQuicksort(range, 0, t1, N.webclient_ByondMap_layerSort$closure());
            for (j = b, k = 0; j <= i; ++j, k = k0) {
              k0 = k + 1;
              icons[j] = range[k];
            }
          }
          j = b;
          while (true) {
            if (!(j <= i)) {
              master = null;
              k = -1;
              break;
            }
            if (icons[j].get$keepTogether()) {
              master = icons[j];
              k = j;
              break;
            }
            ++j;
          }
          if (master == null)
            return;
          t1 = master.flags;
          if ((t1 & 1024) !== 0) {
            t1 &= 4294966271;
            master.flags = t1;
            master.flags = t1 | 2048;
          }
          master.groupBegin = bc;
          master.groupEnd = ec;
          if (k > b) {
            t1 = master.underlays;
            if (t1 == null)
              master.underlays = C.JSArray_methods.sublist$2(icons, b, k);
            else
              (t1 && C.JSArray_methods).addAll$1(t1, C.JSArray_methods.sublist$2(icons, b, k));
            P.RangeError_checkValidRange(b, k, icons.length, null, null, null);
            deleteCount = k - b;
            icons.splice(b, deleteCount);
            i -= deleteCount;
            k = b;
          }
          if (i > k) {
            t1 = master.overlays;
            t2 = i + 1;
            t3 = k + 1;
            if (t1 == null)
              master.overlays = C.JSArray_methods.sublist$2(icons, t3, t2);
            else
              (t1 && C.JSArray_methods).addAll$1(t1, C.JSArray_methods.sublist$2(icons, t3, t2));
            P.RangeError_checkValidRange(t3, t2, icons.length, null, null, null);
            icons.splice(t3, t2 - t3);
          }
          master.isSimple = (master.flags & 256) === 0 && master.overlays == null && master.underlays == null;
          master.calculateIconOffset$0();
          master.calculateSubbounds$0();
        }
      }
    },
    AtomInfo_addPendingImages_closure: {
      "^": "Closure:0;",
      call$1: [function(imgId) {
        return $.me.infoMap.$index(0, imgId);
      }, null, null, 2, 0, null, 63, "call"]
    },
    AtomInfo_composite_closure: {
      "^": "Closure:7;",
      call$1: function(ma) {
        var t1;
        if ((ma.flags & 2) !== 0)
          if (ma.isSimple) {
            t1 = ma.icon;
            t1 = t1 == null || t1.get$text(t1) != null;
          } else
            t1 = false;
        else
          t1 = false;
        return t1;
      }
    },
    AtomInfo_composite_closure0: {
      "^": "Closure:7;",
      call$1: function(ma) {
        return (ma.flags & 2) === 0;
      }
    },
    AtomInfo_RefreshIcons_closure: {
      "^": "Closure:7;",
      call$1: function(ma) {
        return ma.icon == null && (ma.flags & 256) === 0 && ma.isSimple;
      }
    },
    AtomInfo_RefreshIcons_closure0: {
      "^": "Closure:7;",
      call$1: function(ma) {
        return ma.icon == null && (ma.flags & 256) === 0 && ma.isSimple;
      }
    },
    AtomInfo_RefreshIcons_closure1: {
      "^": "Closure:7;$this",
      call$1: function(ma) {
        var t1 = this.$this;
        if (ma.info === t1) {
          ma.calculateIconOffset$0();
          ma._logicalBounds = t1.logicalBounds;
          ma.logicalBoundsDirty = false;
          ma.displayBoundsDirty = true;
        }
      }
    },
    AtomInfo_RefreshIcons_closure2: {
      "^": "Closure:7;",
      call$1: function(ma) {
        ma.flags = ma.flags | 1;
        ma.subplane = (ma.subplane | 1) >>> 0;
        ma.calculateIconOffset$0();
      }
    },
    AtomInfo_MapIcons_closure: {
      "^": "Closure:7;$this",
      call$1: function(m) {
        m.info = this.$this;
      }
    },
    AtomInfo_MapIcons_closure0: {
      "^": "Closure:7;$this",
      call$1: function(m) {
        m.info = this.$this;
        m.set$is_overlay(true);
      }
    },
    AtomInfo_mainIcon_closure: {
      "^": "Closure:7;",
      call$1: function(m) {
        return (m.flags & 2) === 0;
      }
    },
    AtomInfo_mainIcon_closure0: {
      "^": "Closure:1;",
      call$0: function() {
        return;
      }
    },
    AtomInfo_mainIconId_closure: {
      "^": "Closure:7;",
      call$1: function(m) {
        return (m.flags & 2) === 0;
      }
    },
    AtomInfo_mainIconId_closure0: {
      "^": "Closure:1;",
      call$0: function() {
        return;
      }
    },
    Glide: {
      "^": "Object;persist,gliding,changed,isMissile,longGlide,last_move,move_started,moving<,moveTime,glide_x,glide_y,target_dx,target_dy,dir,glideSize,speed,last_x,last_y,last_z,last_step_x,last_step_y,id',name",
      setLastCoords$5: function(x, y, z, step_x, step_y) {
        this.last_x = x;
        this.last_y = y;
        this.last_z = z;
        if (step_x != null) {
          this.last_step_x = step_x;
          this.last_step_y = step_y;
        }
      },
      setLastCoords$3: function(x, y, z) {
        return this.setLastCoords$5(x, y, z, null, null);
      },
      updateSpeed$1: function(a) {
        var t1;
        if (a == null || a.core.glideSize === 0)
          return;
        t1 = a.core;
        this.speed = t1.glideSize;
        this.longGlide = t1.get$longGlide();
      },
      add$5: function(_, x, y, z, new_speed, glideType) {
        var use_accel, t1, t2, dir, t3, t4, tile, lapse, opp, bigJump, gx, gy;
        this.persist = true;
        this.glideSize = new_speed;
        if (new_speed === 0) {
          new_speed = 4;
          use_accel = true;
        } else
          use_accel = false;
        t1 = glideType !== 0;
        if (!t1 || this.last_x < 0 || x < 0 || this.last_z !== z)
          this.reset$0(0);
        else {
          t2 = this.last_x;
          if (x !== t2 || y !== this.last_y) {
            if (t2 !== x)
              dir = 0 | (x > t2 ? 4 : 8);
            else
              dir = 0;
            t2 = this.last_y;
            if (t2 !== y)
              dir |= y > t2 ? 1 : 2;
            if (this.glide_x === 0 && this.glide_y === 0) {
              t1 = this.last_move;
              if (t1 == null || this.speed === 0 || !use_accel)
                this.speed = new_speed;
              else {
                t2 = $.me;
                t3 = t2.currentTime;
                t4 = t2.tickLag;
                tile = t2.iconWidth;
                t2 = this.speed;
                t2 = t2 !== 0 ? tile / t2 : tile;
                lapse = (t3 - t1) * (1000 / t4) + t2;
                t1 = C.JSNumber_methods.ceil$0(lapse !== 0 ? tile / lapse : tile);
                this.speed = t1;
                t1 = P.max(t1, new_speed);
                this.speed = t1;
                if (t1 < 1)
                  this.speed = 1;
                else {
                  t2 = $.me.iconWidth;
                  if (t1 * 2 > t2)
                    this.speed = t2 / 2;
                }
              }
            } else {
              t2 = this.dir;
              opp = (dir & 3) !== 0 ? dir ^ 3 : dir;
              if ((opp & 12) !== 0)
                opp ^= 12;
              if ((t2 & dir) !== 0) {
                if (use_accel) {
                  t2 = C.JSNumber_methods.floor$0(this.speed) + 2;
                  this.speed = t2;
                  t3 = $.me.iconWidth;
                  if (t2 * 2 > t3)
                    this.speed = t3 / 2;
                }
                if (glideType !== 3) {
                  if (this.glide_x * (x - this.last_x) < 0)
                    this.glide_x = 0;
                  if (this.glide_y * (y - this.last_y) < 0)
                    this.glide_y = 0;
                }
              }
              t2 = this.dir;
              if (dir !== t2)
                t1 = (!t1 || glideType === 1) && opp !== t2;
              else
                t1 = false;
              if (t1) {
                this.glide_y = 0;
                this.glide_x = 0;
              }
            }
            if (z === this.last_z)
              if (!this.isMissile) {
                t1 = Math.abs(x - this.last_x) > 1 || Math.abs(y - this.last_y) > 1;
                bigJump = t1;
              } else
                bigJump = false;
            else
              bigJump = true;
            t1 = this.last_x;
            t2 = $.me;
            t3 = t2.iconWidth;
            gx = (x - t1) * t3;
            t1 = this.last_y;
            t2 = t2.mapformat !== 0 ? t2.iconHeight : t3;
            gy = (y - t1) * t2;
            this.glide_x -= gx;
            this.glide_y -= gy;
            if (bigJump)
              this.reset$0(0);
            else if (this.trim$0(0)) {
              this.glide_x -= gx;
              this.glide_y -= gy;
            }
            this.changed = true;
            this.dir = dir;
            if (!bigJump)
              t1 = this.glide_x !== 0 || this.glide_y !== 0;
            else
              t1 = false;
            if (t1) {
              if (this.moving === 0)
                this.move_started = $.me.currentTime;
              this.moving = 1 + C.JSDouble_methods.ceil$0(100 / $.me.clientTickLag);
            }
          } else
            return;
        }
        this.setLastCoords$3(x, y, z);
        this.last_move = $.me.currentTime;
      },
      reset$0: function(_) {
        this.moving = 0;
        this.dir = 0;
        if (this.glide_x !== 0 || this.glide_y !== 0)
          this.changed = true;
        this.glide_x = this.target_dx;
        this.glide_y = this.target_dy;
      },
      trim$1: function(_, aggressive) {
        var agx, agy, t1, t2, t3, over_x, over_y, over;
        if (this.isMissile)
          return false;
        agx = Math.abs(this.glide_x - this.target_dx);
        agy = Math.abs(this.glide_y - this.target_dy);
        t1 = $.me;
        t2 = t1.iconWidth;
        if (!(agx >= 2 * t2))
          t2 = agy >= 2 * (t1.mapformat !== 0 ? t1.iconHeight : t2);
        else
          t2 = true;
        if (t2) {
          if (!t1.get$canGlide()) {
            this.glide_x = this.target_dx;
            this.glide_y = this.target_dy;
            return false;
          }
          if (agy === 0) {
            t1 = this.glide_x;
            t2 = this.target_dx;
            t3 = $.me;
            this.glide_x = (t1 > t2 ? 2 * t3.iconWidth - 1 : 1 - 2 * t3.iconWidth) + t2;
          } else if (agx === 0) {
            t1 = this.glide_y;
            t2 = this.target_dy;
            t3 = $.me;
            if (t1 > t2)
              t1 = 2 * (t3.mapformat !== 0 ? t3.iconHeight : t3.iconWidth) - 1;
            else
              t1 = 1 - 2 * (t3.mapformat !== 0 ? t3.iconHeight : t3.iconWidth);
            this.glide_y = t1 + t2;
          } else {
            t1 = $.me;
            t2 = t1.iconWidth;
            over_x = agx / (2 * t2 - 1.5);
            over_y = agy / (2 * (t1.mapformat !== 0 ? t1.iconHeight : t2) - 1.5);
            over = over_x >= over_y ? over_x : over_y;
            if (over >= 1) {
              t1 = this.glide_x;
              t2 = this.target_dx;
              this.glide_x = (t1 - t2) / over + t2;
              t2 = this.glide_y;
              t1 = this.target_dy;
              this.glide_y = (t2 - t1) / over + t1;
            }
          }
          this.changed = true;
          return true;
        }
        return false;
      },
      trim$0: function($receiver) {
        return this.trim$1($receiver, false);
      },
      copyFrom$1: function(g) {
        this.glide_x = g.glide_x;
        this.glide_y = g.glide_y;
        this.speed = g.speed;
        this.dir = g.dir;
      },
      glide$0: function() {
        var t1, agx, agy, sp, dir, t2, t3, d;
        if (!this.gliding) {
          t1 = this.moving;
          if (t1 > 0)
            this.moving = t1 - 1;
          return false;
        }
        if (!$.me.get$canGlide() && !this.isMissile) {
          this.glide_y = 0;
          this.glide_x = 0;
          t1 = this.moving;
          if (t1 > 0)
            this.moving = t1 - 1;
          return false;
        }
        agx = Math.abs(this.glide_x - this.target_dx);
        agy = Math.abs(this.glide_y - this.target_dy);
        sp = this.speed;
        dir = this.dir;
        if (agx !== 0 || agy !== 0) {
          if (!this.isMissile) {
            t1 = $.me;
            t2 = t1.iconWidth;
            if (!(agx > t2))
              t3 = agy > (t1.mapformat !== 0 ? t1.iconHeight : t2);
            else
              t3 = true;
            if (t3) {
              if (!(agx >= 2 * t2))
                t3 = agy >= 2 * (t1.mapformat !== 0 ? t1.iconHeight : t2);
              else
                t3 = true;
              if (t3) {
                this.trim$1(0, false);
                agx = Math.abs(this.glide_x - this.target_dx);
                agy = Math.abs(this.glide_y - this.target_dy);
              } else {
                t1 = t1.mapformat !== 0 ? t1.iconHeight : t2;
                sp = C.JSNumber_methods.ceil$0(sp * P.max(agx / t2, agy / t1));
              }
            }
          }
          sp *= $.me.clientTickMultiple;
          d = this.longGlide ? P.max(agx, agy) : Math.sqrt(agx * agx + agy * agy);
          if (d <= sp + 0.5) {
            this.glide_x = this.target_dx;
            this.glide_y = this.target_dy;
          } else {
            this.dir = dir;
            t1 = this.glide_x;
            t2 = this.target_dx;
            t3 = agx * sp / d;
            if (t1 > t2) {
              t1 -= t3;
              this.glide_x = t1;
              if (t1 < t2 + 0.5)
                this.glide_x = t2;
            } else {
              t1 += t3;
              this.glide_x = t1;
              if (t1 > t2 - 0.5)
                this.glide_x = t2;
            }
            t1 = this.glide_y;
            t2 = this.target_dy;
            t3 = agy * sp / d;
            if (t1 > t2) {
              t1 -= t3;
              this.glide_y = t1;
              if (t1 < t2 + 0.5)
                this.glide_y = t2;
            } else {
              t1 += t3;
              this.glide_y = t1;
              if (t1 > t2 - 0.5)
                this.glide_y = t2;
            }
          }
          if (this.moving === 0)
            this.move_started = $.me.currentTime;
          this.moving = 1 + C.JSDouble_methods.ceil$0(100 / $.me.clientTickLag);
          this.changed = true;
          return true;
        } else {
          this.dir = 0;
          t1 = this.moving;
          if (t1 > 0)
            this.moving = t1 - 1;
          return false;
        }
      }
    },
    Missile: {
      "^": "Object;atom,trackAtom,srcTurf,destTurf,trackId,trackSequence,init",
      Missile$4: function(appearance, srcTurf, destTurf, trackId) {
        var t1, id, t2;
        t1 = $.me.missiles;
        t1.toString;
        id = J.$add$ns(new P._HashMapKeyIterable(t1, [H.getTypeArgumentByIndex(t1, 0)]).firstWhere$2$orElse(0, new N.Missile_closure(), new N.Missile_closure0()), 1);
        t1 = N.AtomInfo$(id, appearance, null);
        t1.alwaysGlide$0();
        this.atom = t1;
        appearance.toString;
        appearance = N.Appearance$_clone(appearance, true);
        t1.set$appearance(0, appearance);
        appearance.mouseOpacity = 0;
        t1 = appearance.core;
        if (t1.layer < 0)
          t1.layer = 5;
        t2 = this.atom.glide;
        t2.isMissile = true;
        t2.longGlide = t1.get$longGlide();
        $.me.infoMap.$indexSet(0, id, this.atom);
        $.me.missiles.$indexSet(0, id, this);
      },
      static: {
        Missile$: function(appearance, srcTurf, destTurf, trackId) {
          var t1 = new N.Missile(null, null, srcTurf, destTurf, trackId, null, false);
          t1.Missile$4(appearance, srcTurf, destTurf, trackId);
          return t1;
        }
      }
    },
    Missile_closure: {
      "^": "Closure:45;",
      call$1: function(mi) {
        return $.me.missiles.$index(0, mi + 1) == null;
      }
    },
    Missile_closure0: {
      "^": "Closure:1;",
      call$0: function() {
        return 1879048191;
      }
    },
    ByondClient: {
      "^": "Object;loading,postloading,loadingStage,reloading,loadingProgress,loadingProgressRect,loadingTextField,corsLoadOptions,resources_received,needs_key,getting_key,server_has_key,loginComplete,webid,loggedIn,skinLoaded,pendingMessages,stage,exStages,mapInfo,stageShown,renderLoop,curBytes,totBytes,mapformat,mapdir,iconWidth,iconHeight,defaultBounds,mapTileWidth,mapTileHeight,mapHomeX,mapHomeY,mapHomeZ,host,port,socket,macro,pendingIconInfo,iconInfoMap,iconMap,infoMap,tickingAtoms,appearanceMap,cursorMap,pendingFlicks,pendingImages,missiles,playerMob,soundList,mapOptions,mapReceived,canonicalColorMap,canonicalColorMatrixMap,maptextCache,startTime,currentTime,currentMs,scanningGarbage,nextScanTime,_defaultClientRect,defaultVisboundsTiles,dmbFlags,dmbFlagsEx,glitz,defaultVerbCategory,activity,activityTimer,tickLag,clientTickLag,clientTickMultiple,clientInfo,stats,verbPanels,verbs,jsverbs,localFiles,cacheQueue,fullSkin,fullSkinAvailable,oldSkinHtml,_loaderTimer,_enableSound,_enableMusic",
      get$canGlide: function() {
        return this.clientTickLag < this.tickLag || (this.glitz & 64) !== 0;
      },
      get$pixelGlide: function() {
        return this.clientTickLag < this.tickLag && (this.glitz & 64) === 0;
      },
      reset$0: function(_) {
        var t1, t2, t3, t4, t5, t6, t7, elem, skinElem;
        t1 = P.$int;
        this.iconInfoMap = P.HashMap_HashMap(null, null, null, t1, N.IconInfo);
        this.pendingIconInfo = P.HashMap_HashMap(null, null, null, t1, P.Completer);
        this.iconMap = P.HashMap_HashMap(null, null, null, t1, N.AtomIcon);
        this.infoMap = P.HashMap_HashMap(null, null, null, t1, N.AtomInfo);
        this.tickingAtoms = [];
        this.cursorMap = P.HashMap_HashMap(null, null, null, t1, N.AtomCursor);
        this.appearanceMap = P.HashMap_HashMap(null, null, null, t1, N.Appearance);
        this.pendingFlicks = P.HashMap_HashMap(null, null, null, t1, N.PendingFlick);
        this.pendingImages = P.HashMap_HashMap(null, null, null, t1, [P.List, P.$int]);
        this.missiles = P.HashMap_HashMap(null, null, null, t1, N.Missile);
        this.playerMob = 0;
        t2 = P.String;
        this.canonicalColorMap = P.HashMap_HashMap(null, null, null, t2, N.AtomColor);
        this.canonicalColorMatrixMap = P.HashMap_HashMap(null, null, null, t2, N.AtomColorMatrix);
        this.maptextCache = new N.MaptextCache(P.LinkedHashMap__makeEmpty());
        this.tickLag = 100;
        this.clientTickLag = 100;
        this.clientTickMultiple = 1;
        this.currentTime = 0;
        this.currentMs = 0;
        this.nextScanTime = 300;
        this.scanningGarbage = false;
        this.resources_received = false;
        this.loginComplete = new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [null]), [null]);
        this.fullSkin = null;
        this.fullSkinAvailable = null;
        this.postloading = false;
        this.skinLoaded = false;
        this.pendingMessages = [];
        t3 = this.mapInfo;
        if (t3 != null)
          t3.ticking = false;
        t1 = P.HashMap_HashMap(null, null, null, t1, t1);
        t3 = P.HashMap_HashMap(null, null, null, t2, P.bool);
        t4 = N.AtomInfo$(65535, null, null);
        t5 = N.AtomInfo$(65535, null, null);
        t5.alwaysGlide$0();
        t6 = N.AtomInfo$(65535, null, null);
        t6.alwaysGlide$0();
        t7 = N.AtomInfo$(65535, null, null);
        t7.alwaysGlide$0();
        this.mapInfo = new N.MapInfo(null, null, new N.MapView(null, t1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false, false, false, true, true, true, false, 0), true, 0, 0, 0, 0, [], [], [], [], [], [], 0, 0, 0, 0, 0, 0, 0, 0, 0, t3, t4, 0, 1, 0, 0, new U.Rectangle0(0, 0, 0, 0, [null]), 0, false, false, t5, t6, t7, 0, 0, 0, 0, 0, true, true, N.Appearance$(65535, "", 0));
        this.stats = [];
        for (t1 = this.exStages, t1 = t1.get$values(t1), t1 = new H.MappedIterator(null, J.get$iterator$ax(t1.__internal$_iterable), t1._f, [H.getTypeArgumentByIndex(t1, 0), H.getTypeArgumentByIndex(t1, 1)]); t1.moveNext$0();)
          t1.__internal$_current._stageRenderMode = C.StageRenderMode_1;
        this.stage = null;
        this.exStages = P.HashMap_HashMap(null, null, null, t2, N.ByondMap);
        this.stageShown = false;
        for (t1 = document, t2 = new W._FrozenElementList(t1.querySelectorAll("[byondskin]"), [null]), t2 = new H.ListIterator(t2, t2.get$length(t2), 0, null); t2.moveNext$0();) {
          elem = t2.__internal$_current;
          t3 = elem.parentNode;
          if (t3 != null)
            t3.removeChild(elem);
        }
        skinElem = t1.querySelector("#skin");
        t1 = this.oldSkinHtml;
        if (t1 != null && skinElem != null)
          J.setInnerHtml$2$treeSanitizer$x(skinElem, t1, $.$get$ByondJS_sanitizer());
        $.$get$ByondJS_skin().reset$0(0);
        P.print("ByondSkin finished resetting");
        this.cursorMap.$indexSet(0, 0, null);
        this.cursorMap.$indexSet(0, 1, N.AtomCursor$(null, null, null));
        this.cursorMap.$indexSet(0, 2, null);
        t1 = this.cursorMap;
        t2 = new N.AtomCursor("auto", null, null, false);
        t2.isRegistered = true;
        t1.$indexSet(0, 5, t2);
        t2 = this.cursorMap;
        t1 = new N.AtomCursor("crosshair", null, null, false);
        t1.isRegistered = true;
        t2.$indexSet(0, 6, t1);
        t1 = this.cursorMap;
        t2 = new N.AtomCursor("pointer", null, null, false);
        t2.isRegistered = true;
        t1.$indexSet(0, 7, t2);
        P.print("Loading default drag/drop cursors");
        t2 = this.corsLoadOptions;
        A.BitmapData_load("http://" + H.S(this.host) + ":" + H.S(this.port) + "/res/drag.png", t2).then$1(new N.ByondClient_reset_closure(this));
        A.BitmapData_load("http://" + H.S(this.host) + ":" + H.S(this.port) + "/res/drop.png", t2).then$1(new N.ByondClient_reset_closure0(this));
        P.print("Sound resets");
        t1 = this.soundList;
        if (t1 != null)
          t1.stop$0(0);
        this.soundList = new N.SoundList([]);
        if (this.clientInfo != null)
          this.setCursor$1(null);
        this.clientInfo = new N.ClientInfo(null, null, null, null, null, null);
        this.macro = N.ByondMacro$();
        this.dmbFlagsEx = 0;
        this.dmbFlags = 0;
        this.glitz = 255;
        this.loggedIn = false;
        this.mapReceived = false;
        this.totBytes = 0;
        this.curBytes = 0;
        t1 = new N.CacheQueue([], [], [], [], null, null, null, null);
        t1._onSuccess = null;
        t1._onProgress = null;
        t1._webclient$_onError = null;
        t1._webclient$_onDone = null;
        this.cacheQueue = t1;
        this.verbs = P.LinkedHashMap__makeEmpty();
        this.stats = [];
        this.verbPanels = P.LinkedHashMap__makeEmpty();
        this.jsverbs = null;
        this.localFiles = P.LinkedHashMap__makeEmpty();
        P.print("Timer reset");
        this.activity = false;
        t1 = this.activityTimer;
        if (t1 != null)
          t1.cancel$0();
        this.activityTimer = P.Timer_Timer$periodic(P.Duration$(0, 0, 0, 0, 0, 120), this.get$handleTimer());
        P.print("Done resetting");
      },
      cleanup$0: function() {
        var t1, exception;
        t1 = this.activityTimer;
        if (t1 != null)
          t1.cancel$0();
        t1 = this.soundList;
        if (t1 != null)
          t1.stop$0(0);
        t1 = this.socket;
        if (t1 != null)
          try {
            t1.close();
          } catch (exception) {
            H.unwrapException(exception);
          }
      },
      setCursor$1: function(cursor) {
        var t1, t2, id, icon, bitmapData;
        t1 = this.clientInfo;
        t2 = t1.curCursor;
        if (cursor == null ? t2 == null : cursor === t2)
          return;
        t1.curCursor = cursor;
        if (cursor == null) {
          $.Mouse__cursorName = "auto";
          t1 = $.$get$Mouse__cursorChangedEvent();
          if (!t1.get$_mayAddEvent())
            H.throwExpression(t1._addEventError$0());
          t1._sendData$1("auto");
        } else {
          t1 = cursor.isRegistered && cursor.icon == null;
          t2 = cursor.id;
          if (t1) {
            $.Mouse__cursorName = t2;
            t1 = $.$get$Mouse__cursorChangedEvent();
            if (!t1.get$_mayAddEvent())
              H.throwExpression(t1._addEventError$0());
            t1._sendData$1(t2);
          } else {
            id = J.toString$0$(t2);
            if (!cursor.isRegistered) {
              icon = cursor.icon;
              bitmapData = icon == null ? null : icon.get$bitmapData();
              if (bitmapData != null) {
                t1 = bitmapData.clone$0(0).renderTextureQuad.renderTexture;
                t1 = t1.get$canvas(t1).toDataURL("image/png", null);
                t2 = cursor.hotspot;
                $.$get$Mouse__cursorDatas().$indexSet(0, id, new Q.MouseCursorData(t1, t2));
                $.Mouse__cursorName = id;
                t2 = $.$get$Mouse__cursorChangedEvent();
                if (!t2.get$_mayAddEvent())
                  H.throwExpression(t2._addEventError$0());
                t2._sendData$1(id);
                cursor.isRegistered = true;
              } else {
                $.Mouse__cursorName = "auto";
                t1 = $.$get$Mouse__cursorChangedEvent();
                if (!t1.get$_mayAddEvent())
                  H.throwExpression(t1._addEventError$0());
                t1._sendData$1("auto");
              }
            } else {
              $.Mouse__cursorName = id;
              t1 = $.$get$Mouse__cursorChangedEvent();
              if (!t1.get$_mayAddEvent())
                H.throwExpression(t1._addEventError$0());
              t1._sendData$1(id);
            }
          }
        }
      },
      handlePostLoad$0: [function() {
        var t1, t2, urlRx, div, t3;
        t1 = {};
        if (this.loading || this.loadingStage != null) {
          t2 = this.loadingStage;
          if (t2 != null) {
            t2.removeChildren$0();
            this.renderLoop.removeStage$1(this.loadingStage);
          }
          this.loading = false;
          this.loadingStage = null;
          this.reloading = false;
        } else if (this.reloading)
          this.reloading = false;
        else
          return;
        if (this.skinLoaded)
          return;
        t2 = document;
        if (t2.querySelector("#loader") != null)
          J.remove$0$ax(t2.querySelector("#loader"));
        P.print("All resources loaded");
        if (this.fullSkinAvailable == null && this.fullSkin == null) {
          t1 = new P._Future(0, $.Zone__current, null, [null]);
          this.fullSkinAvailable = new P._AsyncCompleter(t1, [null]);
          t1.then$1(new N.ByondClient_handlePostLoad_closure(this));
          return;
        }
        urlRx = P.RegExp_RegExp("^\\w+://", true, false);
        div = t2.querySelector("#skin");
        t1.div = div;
        if (div == null) {
          t3 = W._ElementFactoryProvider_createElement_tag("div", null);
          t1.div = t3;
          t3.id = "skin";
          t2.body.appendChild(t3);
        }
        if (this.postloading)
          return;
        this.postloading = true;
        P.Future_wait([], null, false).then$1(new N.ByondClient_handlePostLoad_closure0(t1, this, urlRx, ["byondclass", "isdefault", "fullid", "skinparams", "width", "height", "style", "class"]));
      }, "call$0", "get$handlePostLoad", 0, 0, 3],
      createStage$0: function() {
        var ctrl, newStage, t1, stageCtrl, maps, defaultMap, foundStage, i, stageElem, otherCanvas, isDefault, stageName, oldStage, t2, t3, t4, newStage0, exception;
        t1 = $.$get$ByondJS_skin();
        stageCtrl = t1.find$1(0, ":map");
        maps = t1.findAll$2(null, "map");
        defaultMap = stageCtrl != null ? stageCtrl.$index(0, "elem") : null;
        this.mapInfo.ticking = false;
        for (t1 = this.mapOptions, foundStage = false, i = 0; i < maps.get$length(maps); ++i) {
          if (i === C.JSInt_methods.toInt$0(i))
            if (i >= maps.get$length(maps))
              H.throwExpression(P.RangeError$range(i, 0, maps.get$length(maps), null, null));
          if (maps.super$JsObject$$index(0, i) != null) {
            if (i === C.JSInt_methods.toInt$0(i))
              if (i >= maps.get$length(maps))
                H.throwExpression(P.RangeError$range(i, 0, maps.get$length(maps), null, null));
            stageElem = J.$index$asx(maps.super$JsObject$$index(0, i), "elem");
          } else
            stageElem = null;
          if (!!J.getInterceptor(stageElem).$isCanvasElement) {
            if (i === C.JSInt_methods.toInt$0(i))
              if (i >= maps.get$length(maps))
                H.throwExpression(P.RangeError$range(i, 0, maps.get$length(maps), null, null));
            ctrl = maps.super$JsObject$$index(0, i);
            this.mapReceived = false;
            otherCanvas = stageElem.cloneNode(false);
            isDefault = defaultMap === stageElem;
            C.CanvasElement_methods.replaceWith$1(stageElem, otherCanvas);
            if (isDefault)
              defaultMap = otherCanvas;
            stageName = isDefault ? null : J.$index$asx(ctrl, "id");
            oldStage = this.exStages.$index(0, stageName);
            newStage = null;
            if (oldStage != null)
              oldStage._stageRenderMode = C.StageRenderMode_1;
            t2 = this.exStages;
            t3 = this.clientTickLag;
            t3 = C.JSNumber_methods.round$0(P.max(20, 1000 / (t3 <= 10 ? 10 : t3)));
            t4 = t1.$index(0, "webGL");
            newStage0 = N.ByondMap$(otherCanvas, 4278190080, t3, null, t1.$index(0, "sharp"), t4, null);
            newStage = newStage0;
            t2.$indexSet(0, stageName, newStage0);
            if (isDefault) {
              this.stage = newStage;
              foundStage = true;
            }
            t2 = this.renderLoop;
            t3 = newStage;
            t2.toString;
            t4 = t3._renderLoop;
            if (t4 != null) {
              C.JSArray_methods.remove$1(t4._stages, t3);
              t3._renderLoop = null;
            }
            t2._stages.push(t3);
            t3._renderLoop = t2;
            if (ctrl != null)
              try {
                t2 = J.$index$asx(ctrl, "config");
                J.$indexSet$ax(t2, "engine", newStage.get$_renderContext().get$renderEngine() === C.RenderEngine_0 ? "WebGL" : "Canvas2D");
                ctrl.callMethod$1("mapConfig");
              } catch (exception) {
                H.unwrapException(exception);
              }
            otherCanvas.setAttribute("tabindex", "-1");
          }
        }
        if (!!J.getInterceptor(defaultMap).$isCanvasElement)
          defaultMap.focus();
        if (!foundStage) {
          t1 = this.stage;
          if (t1 != null)
            t1._stageRenderMode = C.StageRenderMode_1;
          this.stage = null;
        }
        this.mapInfo.mapTick$1(true);
      },
      handleTimer$1: [function(timer) {
        var msg;
        if (this.activity === false && this.loggedIn) {
          msg = N.ByondMessage$(225);
          msg._elems.push(new N.MessageElem(0, msg.get$_putUint8()));
          ++msg._pos;
          msg.send$1(0, this.socket);
          this.activity = true;
        }
        this.activity = false;
      }, "call$1", "get$handleTimer", 2, 0, 63, 64],
      outputObject$2: function(obj, ctrl) {
        var result, t1, b, msg, id, len, t2;
        result = $.$get$ByondJS_skin().output$2(ctrl, obj);
        if (this.loggedIn) {
          t1 = J.getInterceptor(result);
          if (!!t1.$isJsObject) {
            t1 = t1.$index(result, "browse");
            t1 = typeof t1 === "string";
          } else
            t1 = false;
        } else
          t1 = false;
        if (t1) {
          b = result.$index(0, "browse");
          msg = N.ByondMessage$(243);
          id = result.$index(0, "raw_id");
          len = result.$index(0, "raw_len");
          if (typeof id === "number" && typeof len === "number" && id !== 0)
            b = "";
          t1 = msg.get$_putString();
          t2 = b.length;
          msg._elems.push(new N.MessageElem(b, t1));
          msg._pos += t2 + 1;
          msg._elems.push(new N.MessageElem(ctrl, t1));
          msg._pos += ctrl.length + 1;
          if (id != null && !J.$eq$(id, 0)) {
            t1 = msg.get$_putUint32();
            msg._elems.push(new N.MessageElem(id, t1));
            msg._pos += 4;
            msg._elems.push(new N.MessageElem(len, t1));
            msg._pos += 4;
          }
          msg.send$1(0, this.socket);
          this.activity = true;
        }
      },
      sendCommandMessage$1: function(command) {
        var t1, msg;
        if (!this.loggedIn) {
          t1 = this.loginComplete;
          if (t1 == null) {
            t1 = new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [null]), [null]);
            this.loginComplete = t1;
          }
          t1.future.then$1(new N.ByondClient_sendCommandMessage_closure(this, command));
          return;
        }
        msg = N.ByondMessage$(209);
        t1 = command.length;
        msg._elems.push(new N.MessageElem(command, msg.get$_putString()));
        msg._pos += t1 + 1;
        msg.send$1(0, this.socket);
        this.activity = true;
      },
      sendExpandMessage$2: function(command, id) {
        var t1, msg, t2;
        if (!this.loggedIn) {
          t1 = this.loginComplete;
          if (t1 == null) {
            t1 = new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [null]), [null]);
            this.loginComplete = t1;
          }
          t1.future.then$1(new N.ByondClient_sendExpandMessage_closure(this, command, id));
          return;
        }
        msg = N.ByondMessage$(245);
        t1 = msg.get$_putString();
        t2 = command.length;
        msg._elems.push(new N.MessageElem(command, t1));
        msg._pos += t2 + 1;
        t2 = id.length;
        msg._elems.push(new N.MessageElem(id, t1));
        msg._pos += t2 + 1;
        msg.send$1(0, this.socket);
        this.activity = true;
      },
      sendTopicMessage$1: function(topic) {
        var t1, msg;
        if (!this.loggedIn) {
          t1 = this.loginComplete;
          if (t1 == null) {
            t1 = new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [null]), [null]);
            this.loginComplete = t1;
          }
          t1.future.then$1(new N.ByondClient_sendTopicMessage_closure(this, topic));
          return;
        }
        msg = N.ByondMessage$(129);
        t1 = topic.length;
        msg._elems.push(new N.MessageElem(topic, msg.get$_putString()));
        msg._pos += t1 + 1;
        msg.send$1(0, this.socket);
        this.activity = true;
      },
      getIconInfo$1: function(id) {
        var js;
        if (typeof id === "string")
          id = H.Primitives_parseInt(id, null, new N.ByondClient_getIconInfo_closure());
        else
          id = C.JSNumber_methods.floor$0(id);
        if (id === 65535)
          return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["width", this.iconWidth, "height", this.iconHeight]));
        if (id < 0 || this.iconMap.$index(0, id) == null)
          return;
        js = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["width", this.iconMap.$index(0, id).get$bounds().width, "height", this.iconMap.$index(0, id).get$bounds().height]));
        if (J.get$text$x(this.iconMap.$index(0, id)) != null)
          js.$indexSet(0, "text", J.get$text$x(this.iconMap.$index(0, id)));
        return js;
      },
      getAtomInfo$2: function(id, ex) {
        var t1, t2, atom, js, a, t3, m, m2, mm;
        t1 = {};
        t1.id = id;
        if (typeof id === "string") {
          id = H.Primitives_parseInt(id, null, new N.ByondClient_getAtomInfo_closure());
          t1.id = id;
          t2 = id;
        } else {
          if (typeof id === "number") {
            id = J.floor$0$n(id);
            t1.id = id;
          } else
            return;
          t2 = id;
        }
        if (t2 < 0)
          return;
        atom = this.infoMap.$index(0, t2);
        if (atom == null)
          return;
        js = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
        js.$indexSet(0, "id", t2);
        t2 = atom._appearance;
        js.$indexSet(0, "name", t2 != null ? t2.name : "");
        a = atom._appearance;
        if (a != null) {
          js.$indexSet(0, "appearance", a.id);
          js.$indexSet(0, "icon", a.core.iconId);
          js.$indexSet(0, "state", a.core.iconState);
          js.$indexSet(0, "dir", a.core.dir);
        }
        if (ex) {
          for (t2 = this.stage.sorted, t3 = C.JSArray_methods.get$iterator(t2), t2 = new H.WhereIterator(t3, new N.ByondClient_getAtomInfo_closure0(t1), [H.getTypeArgumentByIndex(t2, 0)]), m = null; t2.moveNext$0();) {
            m2 = t3.get$current();
            if ((m2.flags & 1) === 0) {
              m = m2;
              break;
            }
            if (m == null)
              m = m2;
          }
          if (m != null) {
            mm = m.transform;
            if (mm != null) {
              t1 = mm._data;
              js.$indexSet(0, "transform", [t1[0], t1[1], t1[4], t1[2], t1[3], t1[5]]);
            }
            js.$indexSet(0, "x", m.baseX);
            js.$indexSet(0, "y", m.baseY);
            t1 = m.icon;
            js.$indexSet(0, "width", t1 != null ? t1._width : $.me.iconWidth);
            t1 = m.icon;
            js.$indexSet(0, "height", t1 != null ? t1._height : $.me.iconHeight);
          }
        }
        return js;
      },
      getAtomInfo$1: function(id) {
        return this.getAtomInfo$2(id, false);
      },
      compositeIconDS$2: function(ctx, ma) {
        var t1 = ma.icon;
        if (t1 == null)
          return true;
        t1 = P.LinkedHashMap__makeLiteral(["icon", t1._webclient$_index, "x", ma.iconOffsetX, "y", ma.iconOffsetY, "transform", ma.transform, "color", ma.color, "blend", ma.blendModeNum]);
        return this.compositeIcon$2(ctx, P._wrapToDart(P.JsObject__convertDataTree(t1)));
      },
      compositeIcon$2: function(ctx, obj) {
        var icon, bounds, bitmap, m, color, blend, x, y, t1, filter, op, q, srcRect, t2, t3, t4, t5;
        icon = this.iconMap.$index(0, obj.$index(0, "icon"));
        if (icon == null || icon.get$text(icon) != null)
          return true;
        bounds = icon.get$bounds();
        bitmap = icon.get$bitmapData();
        if (bounds == null || bitmap == null)
          return false;
        m = obj.$index(0, "transform");
        color = obj.$index(0, "color");
        blend = obj.$index(0, "blend");
        x = obj.$index(0, "x");
        y = obj.$index(0, "y");
        if (x == null)
          x = 0;
        if (y == null)
          y = 0;
        if (m != null) {
          t1 = J.getInterceptor(m);
          if (!!t1.$isJsArray)
            m = T.Matrix$(t1.$index(m, 0), t1.$index(m, 1), t1.$index(m, 2), t1.$index(m, 3), t1.$index(m, 4), t1.$index(m, 5));
          else if (!!t1.$isMatrix) {
            t1 = m._data;
            m = T.Matrix$(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
          }
          m.prependTranslation$2(-bounds.width / 2, -bounds.height / 2);
          t1 = J.getInterceptor$x(m);
          t1.translate$2(m, bounds.width / 2, bounds.height / 2);
          ctx.setTransform(t1.get$a(m), m.get$b(), m.get$c(), m.get$d(), m.get$tx(), m.get$ty());
        } else
          ctx.setTransform(1, 0, 0, 1, 0, 0);
        if (color != null) {
          bitmap = bitmap.clone$0(0);
          t1 = color.matrix;
          if (t1 != null) {
            t1 = t1.matrix;
            filter = D.ColorMatrixFilter$((t1 && C.JSArray_methods).sublist$2(t1, 0, 16), color.matrix.get$last4());
          } else
            filter = D.ColorMatrixFilter$([color.red / 255, 0, 0, 0, 0, color.green / 255, 0, 0, 0, 0, color.blue / 255, 0, 0, 0, 0, color.alpha / 255], [0, 0, 0, 0]);
          filter.apply$1(bitmap);
        }
        op = typeof blend === "number" ? C.List_n5Y[blend] : null;
        ctx.globalCompositeOperation = op != null ? op : "source-over";
        q = bitmap.renderTextureQuad;
        srcRect = q.sourceRectangle;
        t1 = q.renderTexture;
        t1 = t1.get$canvas(t1);
        t2 = srcRect.left;
        t3 = srcRect.top;
        t4 = bounds.width;
        t5 = bounds.height;
        ctx.drawImage(t1, t2, t3, t4, t5, x, y, t4, t5);
        return true;
      },
      waitForIconInfo$1: function(id) {
        var info, t1, c;
        info = this.iconInfoMap.$index(0, id);
        if (info != null) {
          t1 = new P._Future(0, $.Zone__current, null, [null]);
          t1._asyncComplete$1(info);
          return t1;
        }
        c = this.pendingIconInfo.$index(0, id);
        if (c == null) {
          c = new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [null]), [null]);
          this.pendingIconInfo.$indexSet(0, id, c);
        }
        return c.future;
      },
      waitForAtomIcon$1: function(id) {
        var info, t1, pendingIcons, futures, _i;
        info = this.infoMap.$index(0, id);
        if (info == null) {
          t1 = new P._Future(0, $.Zone__current, null, [null]);
          t1._asyncComplete$1(null);
          return t1;
        }
        pendingIcons = info.pendingIcons$0();
        if (pendingIcons != null) {
          futures = [];
          for (t1 = pendingIcons.length, _i = 0; _i < pendingIcons.length; pendingIcons.length === t1 || (0, H.throwConcurrentModificationError)(pendingIcons), ++_i)
            futures.push(this.waitForIconInfo$1(pendingIcons[_i]));
          t1 = new P._Future(0, $.Zone__current, null, [null]);
          P.Future_wait(futures, null, false).then$1(new N.ByondClient_waitForAtomIcon_closure(id, new P._AsyncCompleter(t1, [null])));
          return t1;
        }
        t1 = new P._Future(0, $.Zone__current, null, [null]);
        t1._asyncComplete$1(id);
        return t1;
      },
      getAtomIcon$1: function(id) {
        var atom, info, icon, canvas, ctx, t1, t2, _i;
        atom = $.me.infoMap.$index(0, id);
        if (atom == null)
          return;
        info = this.getAtomInfo$1(id);
        if (info == null)
          return;
        icon = this.iconMap.$index(0, info.$index(0, "icon"));
        canvas = W.CanvasElement_CanvasElement(null, null);
        if (icon != null) {
          canvas.width = icon._width;
          canvas.height = icon._height;
        } else {
          canvas.width = this.iconWidth;
          canvas.height = this.iconHeight;
        }
        ctx = (canvas && C.CanvasElement_methods).getContext$1(canvas, "2d");
        for (t1 = atom.get$composite(), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
          if (!this.compositeIconDS$2(ctx, t1[_i]))
            return "";
        return canvas.toDataURL("image/png", null);
      },
      getAtomVerbs$2: function(id, atom) {
        var msg;
        if (typeof atom === "string")
          atom = H.Primitives_parseInt(atom, null, new N.ByondClient_getAtomVerbs_closure());
        if (typeof atom !== "number")
          return;
        msg = N.ByondMessage$(210);
        msg._elems.push(new N.MessageElem(1, msg.get$_putUint8()));
        ++msg._pos;
        msg._elems.push(new N.MessageElem(atom, msg.get$_putUint32()));
        msg._pos += 4;
        msg.putUTFString$1(id);
        msg.send$1(0, this.socket);
        this.activity = true;
      },
      mapConfig$2: function(params, id) {
        var map, ctrl, t1, mode, s, map0, lb, zoom, w, h, scalex, scaley, scale, rgb;
        map = this.stage;
        if (id != null) {
          ctrl = $.$get$ByondJS_skin().find$1(0, id);
          if (ctrl == null)
            return;
          map = ctrl.$index(0, "isDefault") ? this.stage : this.exStages.$index(0, id);
        }
        if (map == null)
          return;
        t1 = params.$index(0, "engine");
        if (typeof t1 === "string") {
          mode = J.toLowerCase$0$s(J.trim$0$s(params.$index(0, "engine")));
          t1 = map._renderContext.get$renderEngine() === C.RenderEngine_0 ? "WebGL" : "Canvas2D";
          if (mode !== t1.toLowerCase()) {
            this.mapOptions.$indexSet(0, "webGL", mode === "webgl");
            this.createStage$0();
            return;
          }
        }
        params.$indexSet(0, "engine", map._renderContext.get$renderEngine() === C.RenderEngine_0 ? "WebGL" : "Canvas2D");
        s = N.ByondJS_toBool(params.$index(0, "sharp"), true);
        if (s != null && s !== this.mapOptions.$index(0, "sharp")) {
          this.mapOptions.$indexSet(0, "sharp", s);
          t1 = this.stage;
          if (t1 != null)
            t1.set$hq(s);
          for (t1 = this.exStages, t1 = t1.get$values(t1), t1 = new H.MappedIterator(null, J.get$iterator$ax(t1.__internal$_iterable), t1._f, [H.getTypeArgumentByIndex(t1, 0), H.getTypeArgumentByIndex(t1, 1)]); t1.moveNext$0();) {
            map0 = t1.__internal$_current;
            if (map0 != null)
              map0.set$hq(s);
          }
        }
        params.$indexSet(0, "sharp", this.mapOptions.$index(0, "sharp"));
        lb = N.ByondJS_toBool(params.$index(0, "letterbox"), false);
        zoom = params.$index(0, "zoom");
        if (typeof zoom === "string")
          zoom = H.Primitives_parseDouble(zoom, new N.ByondClient_mapConfig_closure());
        else if (typeof zoom !== "number")
          zoom = 0;
        if (typeof zoom === "number" && zoom < 0)
          zoom = 0;
        if (lb == null)
          lb = true;
        t1 = J.getInterceptor(zoom);
        if (t1.$eq(zoom, 1)) {
          map._stageScaleMode = C.StageScaleMode_2;
          map._updateCanvasSize$0();
        } else if (t1.$gt(zoom, 0)) {
          map._stageScaleMode = C.StageScaleMode_2;
          map._updateCanvasSize$0();
          zoom = 1;
        } else {
          map._stageScaleMode = lb ? C.StageScaleMode_3 : C.StageScaleMode_1;
          map._updateCanvasSize$0();
        }
        params.$indexSet(0, "zoom", zoom);
        params.$indexSet(0, "letterbox", lb);
        w = map._sourceWidth;
        h = map._sourceHeight;
        if (zoom === 0) {
          scalex = map._stageWidth / P.max(w, 1);
          scaley = map._stageHeight / P.max(h, 1);
          scale = lb ? P.min(scalex, scaley) : P.max(scalex, scaley);
        } else
          scale = zoom;
        params.$indexSet(0, "viewSize", "" + C.JSNumber_methods.round$0(w * scale) + "x" + C.JSNumber_methods.round$0(h * scale));
        params.$indexSet(0, "iconWidth", this.iconWidth);
        params.$indexSet(0, "iconHeight", this.iconHeight);
        params.$indexSet(0, "map", map._webclient$_canvas);
        t1 = params.$index(0, "backgroundColor");
        if (typeof t1 === "string") {
          rgb = N.ByondJS_css2rgb(params.$index(0, "backgroundColor"), false);
          map.backgroundColor = (4278190080 | J.$shl$n(rgb.$index(0, "r"), 16) | J.$shl$n(rgb.$index(0, "g"), 8) | rgb.$index(0, "b")) >>> 0;
        }
      },
      sendMouseCommand$3: function(control, params, $event) {
        var map, type, t1, map0, id, dst, mouseAtom, rid, exception, res, x, y;
        if (params == null)
          params = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeEmpty());
        type = params.$index(0, "type");
        if (params.$index(0, "event") != null && $event == null)
          $event = params.$index(0, "event");
        t1 = $event == null;
        if (!t1 && typeof type !== "string")
          switch ($event.type) {
            case "mousedown":
              type = "down";
              break;
            case "down":
              type = "down";
              break;
            case "mouseup":
              type = "up";
              break;
            case "up":
              type = "up";
              break;
            case "click":
              type = "click";
              break;
            case "contextmenu":
              type = "click";
              break;
            case "dblclick":
              type = "dblclick";
              break;
            case "mousemove":
              type = "move";
              break;
            case "move":
              type = "move";
              break;
            case "mouseover":
              type = "move";
              break;
            case "over":
              type = "move";
              break;
            case "mouseout":
              type = "leave";
              break;
            case "out":
              type = "leave";
              break;
            case "mouseenter":
              type = "move";
              break;
            case "enter":
              type = "move";
              break;
            case "mouseleave":
              type = "leave";
              break;
            case "leave":
              type = "leave";
              break;
            default:
              return;
          }
        if (t1)
          return;
        map0 = this.stage;
        map = map0;
        t1 = J.getInterceptor(control);
        if (t1.$eq(control, map0.control))
          this.stage.mouseCommand$1($event);
        else if (control != null) {
          id = t1.$index(control, "id");
          map = this.exStages.$index(0, id);
          if (map != null)
            map.mouseCommand$1($event);
          else
            map = this.stage;
        }
        if (type === "leave") {
          type = "move";
          dst = 65535;
        } else {
          dst = params.$index(0, "atom");
          if (typeof dst === "string")
            dst = H.Primitives_parseInt(dst, null, null);
          else
            dst = typeof dst === "number" ? C.JSNumber_methods.floor$0(dst) : 65535;
        }
        mouseAtom = N.MouseAtom$fromSkin(dst, params.$index(0, "element"), $event, params.$index(0, "id"), params.$index(0, "panel"));
        if (type === "click")
          if ((mouseAtom.mouseFlags & 2) !== 0 && this.rclick$1(control)) {
            rid = mouseAtom.info.id;
            if (rid !== 65535)
              $.$get$ByondJS_skin().output$2(":map", P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["atoms", [], "atom", rid])));
          } else
            this.sendMouseMessage$4(1, mouseAtom, null, "");
        else if (type === "dblclick")
          this.sendMouseMessage$4(2, mouseAtom, null, "");
        else if (type === "down") {
          $.ByondMap_dragAtom = mouseAtom;
          this.sendMouseMessage$4(3, mouseAtom, null, "");
        } else if (type === "up") {
          this.sendMouseMessage$4(4, mouseAtom, null, "");
          t1 = $.ByondMap_dragAtom;
          if (t1 != null && mouseAtom.compare$1(t1) !== 0) {
            this.sendMouseDragDropMessage$4(7, $.ByondMap_dragAtom, mouseAtom, "");
            $.ByondMap_dragAtom = null;
            if (J.$eq$($.$get$ByondJS_skin().mouseCapture, J.get$control$x(map)))
              try {
                J.get$control$x(map).callMethod$1("releaseMouse");
              } catch (exception) {
                H.unwrapException(exception);
              }
          }
        } else if (type === "move" || type === "drag") {
          res = mouseAtom.compare$1($.ByondMap_moveAtom);
          if (type !== "drag")
            t1 = $event.button !== 0 || $.ByondMap_dragAtom != null;
          else
            t1 = true;
          if (t1) {
            t1 = $.ByondMap_dragAtom;
            if (t1 != null && res !== 0)
              this.sendMouseDragDropMessage$4(6, t1, mouseAtom, "");
          } else if (res === 2)
            this.sendMouseMessage$4(5, mouseAtom, $.ByondMap_moveAtom, "");
          else if (res === 1)
            this.sendMouseMessage$2(21, mouseAtom);
          $.ByondMap_moveAtom = mouseAtom;
          $.ByondMap_overAtom = null;
          if (res !== 0)
            N.ByondMap_mouseAtomChanged();
        } else if (type === "wheel") {
          if (!!J.getInterceptor($event).$isWheelEvent) {
            x = null + C.WheelEvent_methods.get$deltaX($event);
            y = null + C.WheelEvent_methods.get$deltaY($event);
          } else {
            x = null;
            y = null;
          }
          this.sendMouseMessage$5(25, mouseAtom, null, "", new P.Point(x, y, [null]));
        }
      },
      sendMouseMessage$5: function($event, atom, lastAtom, params, xy) {
        var t1, t2, cursor, msg, t3, t4, _xy;
        if ($event === 5 || $event === 4) {
          t1 = this.clientInfo;
          t2 = t1.allCursor;
          if (t2 != null)
            this.setCursor$1(t2);
          else {
            t2 = atom.info._appearance;
            cursor = t2 != null ? t2.overCursor : null;
            if (cursor == null)
              this.setCursor$1(t1.defCursor);
            else if (cursor === this.cursorMap.$index(0, 1))
              this.setCursor$1(this.clientInfo.overCursor);
            else
              this.setCursor$1(cursor);
          }
        }
        if (!this.loggedIn || !this.isValidMouseEvent$3($event, atom, lastAtom))
          return;
        if ($event >= 16)
          $event -= 16;
        msg = N.ByondMessage$(215);
        t1 = msg.get$_putUint8();
        msg._elems.push(new N.MessageElem(0, t1));
        ++msg._pos;
        msg._elems.push(new N.MessageElem($event, t1));
        ++msg._pos;
        t2 = atom.mouseFlags;
        msg._elems.push(new N.MessageElem(t2, t1));
        ++msg._pos;
        t2 = atom.info.id;
        msg._elems.push(new N.MessageElem(t2, msg.get$_putUint32()));
        msg._pos += 4;
        if ($event === 9) {
          if (xy == null)
            xy = new P.Point(0, 0, [null]);
          t2 = J.round$0$n(xy.x);
          t3 = msg.get$_putInt16();
          msg._elems.push(new N.MessageElem(t2, t3));
          msg._pos += 2;
          t2 = J.round$0$n(xy.y);
          msg._elems.push(new N.MessageElem(t2, t3));
          msg._pos += 2;
        }
        t2 = atom.isMap;
        t3 = msg._elems;
        t4 = msg.get$_putInt16();
        if (t2) {
          t3.push(new N.MessageElem(atom.x, t4));
          msg._pos += 2;
          t2 = atom.y;
          msg._elems.push(new N.MessageElem(t2, t4));
          msg._pos += 2;
        } else {
          t3.push(new N.MessageElem(32768, t4));
          msg._pos += 2;
          msg._elems.push(new N.MessageElem(32768, t4));
          msg._pos += 2;
        }
        _xy = atom.mouseCoords$1(this.stage);
        msg._elems.push(new N.MessageElem(_xy.x, t4));
        msg._pos += 2;
        msg._elems.push(new N.MessageElem(_xy.y, t4));
        msg._pos += 2;
        t2 = atom.flags;
        msg._elems.push(new N.MessageElem(t2, t1));
        ++msg._pos;
        t1 = atom.panel;
        t2 = msg.get$_putString();
        t3 = t1.length;
        msg._elems.push(new N.MessageElem(t1, t2));
        msg._pos += t3 + 1;
        t3 = atom.control;
        t1 = t3.length;
        msg._elems.push(new N.MessageElem(t3, t2));
        msg._pos += t1 + 1;
        msg._elems.push(new N.MessageElem(params, t2));
        msg._pos += params.length + 1;
        msg.send$1(0, this.socket);
        this.activity = true;
      },
      sendMouseMessage$4: function($event, atom, lastAtom, params) {
        return this.sendMouseMessage$5($event, atom, lastAtom, params, null);
      },
      sendMouseMessage$2: function($event, atom) {
        return this.sendMouseMessage$5($event, atom, null, "", null);
      },
      sendMouseMessage$3: function($event, atom, lastAtom) {
        return this.sendMouseMessage$5($event, atom, lastAtom, "", null);
      },
      sendMouseDragDropMessage$4: function($event, src, targ, params) {
        var t1, t2, cursor, msg, t3, t4, t5, _xy, t6;
        if ($event === 6) {
          t1 = this.clientInfo;
          t2 = t1.allCursor;
          if (t2 != null)
            this.setCursor$1(t2);
          else {
            t2 = targ.info._appearance;
            if (t2 != null && t2.isDropZone) {
              t2 = src.info._appearance;
              cursor = t2 != null ? t2.dropCursor : null;
              if (cursor == null)
                this.setCursor$1(t1.defCursor);
              else if (cursor === this.cursorMap.$index(0, 1))
                this.setCursor$1(this.clientInfo.dropCursor);
              else
                this.setCursor$1(cursor);
            } else {
              t2 = src.info._appearance;
              cursor = t2 != null ? t2.dragCursor : null;
              if (cursor == null)
                this.setCursor$1(t1.defCursor);
              else if (cursor === this.cursorMap.$index(0, 1))
                this.setCursor$1(this.clientInfo.dragCursor);
              else
                this.setCursor$1(cursor);
            }
          }
        }
        if (!this.loggedIn || !this.isValidMouseEvent$2($event, targ))
          return;
        msg = N.ByondMessage$(215);
        t1 = msg.get$_putUint8();
        msg._elems.push(new N.MessageElem(0, t1));
        ++msg._pos;
        msg._elems.push(new N.MessageElem($event, t1));
        ++msg._pos;
        t2 = src.mouseFlags;
        msg._elems.push(new N.MessageElem(t2, t1));
        ++msg._pos;
        t2 = src.info.id;
        t3 = msg.get$_putUint32();
        msg._elems.push(new N.MessageElem(t2, t3));
        msg._pos += 4;
        t2 = src.isMap;
        t4 = msg._elems;
        t5 = msg.get$_putInt16();
        if (t2) {
          t4.push(new N.MessageElem(src.x, t5));
          msg._pos += 2;
          t2 = src.y;
          msg._elems.push(new N.MessageElem(t2, t5));
          msg._pos += 2;
        } else {
          t4.push(new N.MessageElem(32768, t5));
          msg._pos += 2;
          msg._elems.push(new N.MessageElem(32768, t5));
          msg._pos += 2;
        }
        _xy = targ.mouseCoords$1(this.stage);
        msg._elems.push(new N.MessageElem(_xy.x, t5));
        msg._pos += 2;
        msg._elems.push(new N.MessageElem(_xy.y, t5));
        msg._pos += 2;
        t2 = src.flags;
        msg._elems.push(new N.MessageElem(t2, t1));
        ++msg._pos;
        t2 = src.panel;
        t4 = msg.get$_putString();
        t6 = t2.length;
        msg._elems.push(new N.MessageElem(t2, t4));
        msg._pos += t6 + 1;
        t6 = src.control;
        t2 = t6.length;
        msg._elems.push(new N.MessageElem(t6, t4));
        msg._pos += t2 + 1;
        t2 = targ.info.id;
        msg._elems.push(new N.MessageElem(t2, t3));
        msg._pos += 4;
        t2 = targ.isMap;
        t3 = msg._elems;
        if (t2) {
          t3.push(new N.MessageElem(targ.x, t5));
          msg._pos += 2;
          t2 = targ.y;
          msg._elems.push(new N.MessageElem(t2, t5));
          msg._pos += 2;
        } else {
          t3.push(new N.MessageElem(32768, t5));
          msg._pos += 2;
          msg._elems.push(new N.MessageElem(32768, t5));
          msg._pos += 2;
        }
        t2 = targ.flags;
        msg._elems.push(new N.MessageElem(t2, t1));
        ++msg._pos;
        t1 = targ.panel;
        t2 = t1.length;
        msg._elems.push(new N.MessageElem(t1, t4));
        msg._pos += t2 + 1;
        t2 = targ.control;
        t1 = t2.length;
        msg._elems.push(new N.MessageElem(t2, t4));
        msg._pos += t1 + 1;
        msg._elems.push(new N.MessageElem(params, t4));
        msg._pos += params.length + 1;
        msg.send$1(0, this.socket);
        this.activity = true;
      },
      sendMouseDragDropMessage$3: function($event, src, targ) {
        return this.sendMouseDragDropMessage$4($event, src, targ, "");
      },
      processMouseReplyMessage$1: function(msg) {
        var $event, panel, control, n, atoms, i, val;
        msg._webclient$_data.getUint8(msg._pos++);
        $event = msg._webclient$_data.getUint8(msg._pos++);
        msg._webclient$_data.getUint8(msg._pos++);
        msg.getUint32$0(0);
        msg.getInt16$0(0);
        msg.getInt16$0(0);
        msg.getInt16$0(0);
        msg.getInt16$0(0);
        msg._webclient$_data.getInt8(msg._pos++);
        panel = msg.getString$0(0);
        control = msg.getString$0(0);
        if ($event === 8) {
          n = msg.getUint16$0(0);
          atoms = new P.JsArray([], [null]);
          if (control.length === 0)
            control = ":map";
          if (panel.length !== 0)
            control += ":" + panel;
          for (i = 0; i < n; ++i) {
            val = msg._webclient$_data.getUint32(msg._pos, true);
            msg._pos += 4;
            atoms.callMethod$2("push", [val]);
          }
          $.$get$ByondJS_skin().output$2(control, P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["atoms", atoms])));
        }
      },
      rclick$1: function(control) {
        var t1;
        if (($.me.dmbFlags & 268435456) !== 0)
          return false;
        t1 = J.getInterceptor(control);
        if (!!t1.$isJsObject && t1.$index(control, "config") instanceof P.JsObject && J.$eq$(J.$index$asx(t1.$index(control, "config"), "rightClick"), true))
          return false;
        return true;
      },
      isValidMouseEvent$3: function($event, atom, lastAtom) {
        var flagSet, flag, t1;
        flagSet = this.dmbFlags;
        switch ($event) {
          case 1:
            flag = 4;
            break;
          case 2:
            flag = 8;
            break;
          case 3:
            flag = 4194304;
            break;
          case 4:
            flag = 2097152;
            break;
          case 5:
            if (lastAtom != null) {
              t1 = lastAtom.info._appearance;
              t1 = t1 != null && t1.handlesMouseOver;
            } else
              t1 = false;
            if (!t1) {
              t1 = atom.info._appearance;
              t1 = t1 != null && t1.handlesMouseOver;
            } else
              t1 = true;
            if (t1)
              return true;
            flag = 33554432;
            break;
          case 6:
            t1 = atom.info._appearance;
            if (t1 != null && t1.isDropZone)
              return true;
            flag = 16777216;
            break;
          case 7:
            t1 = atom.info._appearance;
            if (t1 != null && t1.isDropZone)
              return true;
            flag = 8388608;
            break;
          case 21:
            t1 = atom.info._appearance;
            if (t1 != null && t1.handlesMouseMove)
              return true;
            flagSet = this.dmbFlagsEx;
            flag = 1;
            break;
          case 8:
            return true;
          case 25:
            t1 = atom.info._appearance;
            if (t1 != null && t1.handlesMouseWheel)
              return true;
            flagSet = this.dmbFlagsEx;
            flag = 2;
            break;
          default:
            flag = 0;
        }
        return (flagSet & flag) !== 0;
      },
      isValidMouseEvent$2: function($event, atom) {
        return this.isValidMouseEvent$3($event, atom, null);
      },
      processMessage$1: function(msg) {
        var val, line, t1, val0, t2, t3, browserfill, pong, str, ctrl, id, len, obj, url, strlen, info, c, val1, t4, flags, iconId, state, appearance, t, update, img, atom, pend, val2, text, $name, p, file, reply, n, p0, old, clone, icon;
        switch (msg.type) {
          case 0:
            val = msg._webclient$_data.getUint16(msg._pos, true);
            msg._pos += 2;
            line = "Quit: code " + val;
            t1 = $.printToZone;
            if (t1 == null)
              H.printString(line);
            else
              t1.call$1(line);
            t1 = this.soundList;
            if (t1 != null)
              t1.stop$0(0);
            break;
          case 1:
            val = msg._webclient$_data.getUint32(msg._pos, true);
            t1 = msg._pos += 4;
            val0 = msg._webclient$_data.getUint32(t1, true);
            msg._pos += 4;
            line = "Version: " + val + ", " + val0;
            t1 = $.printToZone;
            if (t1 == null)
              H.printString(line);
            else
              t1.call$1(line);
            msg = new N.ByondMessage(null, null, 0, -1);
            t1 = [];
            msg._elems = t1;
            msg._pos = 0;
            t1.push(new N.MessageElem(1, msg.get$_putType()));
            msg._pos += 2;
            msg._elems.push(new N.MessageElem(0, msg.get$_putUint8()));
            ++msg._pos;
            t1 = this.host;
            t2 = msg.get$_putString();
            t3 = t1.length;
            msg._elems.push(new N.MessageElem(t1, t2));
            msg._pos += t3 + 1;
            browserfill = $.$get$ByondJS_browserFill();
            if (typeof browserfill !== "string")
              browserfill = "";
            t1 = browserfill.length;
            msg._elems.push(new N.MessageElem(browserfill, t2));
            msg._pos += t1 + 1;
            msg.send$1(0, this.socket);
            this.activity = true;
            break;
          case 30:
            this.reset$0(0);
            this.reloading = true;
            break;
          case 225:
            t1 = msg._webclient$_data;
            t2 = t1.byteLength;
            t3 = msg._pos;
            if (t2 - t3 > 0) {
              msg._pos = t3 + 1;
              pong = t1.getUint8(t3);
            } else
              pong = 0;
            if (pong === 0) {
              msg = new N.ByondMessage(null, null, 0, -1);
              t1 = [];
              msg._elems = t1;
              msg._pos = 0;
              t1.push(new N.MessageElem(225, msg.get$_putType()));
              msg._pos += 2;
              msg._elems.push(new N.MessageElem(1, msg.get$_putUint8()));
              ++msg._pos;
              msg.send$1(0, this.socket);
              this.activity = true;
            }
            break;
          case 161:
            break;
          case 26:
            this.processKeyMessage$1(msg);
            break;
          case 14:
            this.processCacheListMessage$1(msg);
            break;
          case 39:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else {
              str = msg.getString$0(0);
              ctrl = msg._webclient$_data.byteLength - msg._pos > 0 ? msg.getString$0(0) : ":output";
              t1 = msg._webclient$_data;
              t2 = t1.byteLength;
              t3 = msg._pos;
              if (t2 - t3 > 0) {
                val = t1.getUint32(t3, true);
                t1 = msg._pos += 4;
                id = val;
              } else {
                t1 = t3;
                id = 0;
              }
              t2 = msg._webclient$_data;
              if (t2.byteLength - t1 > 0) {
                val = t2.getUint32(t1, true);
                msg._pos += 4;
                len = val;
              } else
                len = 0;
              obj = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
              obj.$indexSet(0, "text", str);
              if (id !== 0) {
                obj.$indexSet(0, "raw_id", id);
                obj.$indexSet(0, "raw_len", len);
              }
              this.outputObject$2(obj, ctrl);
            }
            break;
          case 176:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else
              this.outputObject$2(this.msgReadStatValue$1(msg), msg.getString$0(0));
            break;
          case 243:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else
              this.processFileMessage$1(msg);
            break;
          case 121:
            url = msg.getString$0(0);
            $.$get$ByondJS_skin().sendOutMsg$1("link:" + url);
            break;
          case 59:
            val = msg._webclient$_data.getUint32(msg._pos, true);
            t1 = msg._pos += 4;
            this.dmbFlags = val;
            if ((val & 2147483648) >>> 0 !== 0 && msg._webclient$_data.byteLength - t1 > 0) {
              val = msg._webclient$_data.getUint32(t1, true);
              t1 = msg._pos += 4;
              this.dmbFlagsEx = val;
            } else
              this.dmbFlagsEx = 0;
            t2 = msg._webclient$_data;
            msg._pos = t1 + 1;
            this.glitz = t2.getUint8(t1);
            msg._webclient$_data.getUint8(msg._pos++);
            val = msg._webclient$_data.getUint16(msg._pos, true);
            t1 = msg._pos += 2;
            if (val === 65535) {
              val = msg._webclient$_data.getUint32(t1, true);
              msg._pos += 4;
              strlen = val;
            } else
              strlen = val;
            this.defaultVerbCategory = strlen > 0 ? msg.getString$1(0, strlen) : "";
            break;
          case 207:
            info = N.IconInfo$(msg);
            this.iconInfoMap.$indexSet(0, info.id, info);
            c = this.pendingIconInfo.$index(0, info.id);
            if (c != null) {
              this.pendingIconInfo.remove$1(0, info.id);
              c.complete$1(0, info);
            }
            break;
          case 240:
            this.processAnimationMessage$1(msg);
            break;
          case 248:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else if (this.stage != null) {
              t1 = this.mapInfo;
              t1.toString;
              val = msg._webclient$_data.getUint16(msg._pos, true);
              t2 = msg._pos += 2;
              val0 = msg._webclient$_data.getUint16(t2, true);
              t2 = msg._pos += 2;
              val1 = msg._webclient$_data.getUint16(t2, true);
              msg._pos += 2;
              t1.resizeMap$3(val, val0, val1);
              val = msg._webclient$_data.getUint16(msg._pos, true);
              t2 = msg._pos += 2;
              t1.mapTileWidth = val;
              val = msg._webclient$_data.getUint16(t2, true);
              t2 = msg._pos += 2;
              t1.mapTileHeight = val;
              t3 = $.me;
              val = msg._webclient$_data.getUint16(t2, true);
              t2 = msg._pos += 2;
              t3.iconWidth = val;
              t3 = $.me;
              val = msg._webclient$_data.getUint16(t2, true);
              t2 = msg._pos += 2;
              t3.iconHeight = val;
              t3 = $.me;
              t3.defaultBounds = new U.Rectangle0(0, 0, t3.iconWidth, t3.iconHeight, [null]);
              t4 = msg._webclient$_data;
              msg._pos = t2 + 1;
              t2 = t4.getUint8(t2);
              t1.format = t2;
              t3.mapformat = t2;
              t2 = msg._webclient$_data.getUint8(msg._pos++);
              t1.dir = t2;
              if (t2 <= 0 || t2 > 8 || (t2 & t2 - 1) >>> 0 !== 0) {
                t1.dir = 1;
                t2 = 1;
              }
              $.me.mapdir = t2;
              val = msg._webclient$_data.getUint16(msg._pos, true);
              t2 = msg._pos += 2;
              t1.homeX = val;
              val = msg._webclient$_data.getUint16(t2, true);
              t2 = msg._pos += 2;
              t1.homeY = val;
              val = msg._webclient$_data.getUint16(t2, true);
              t2 = msg._pos += 2;
              t1.drawViewX = val;
              val = msg._webclient$_data.getUint16(t2, true);
              msg._pos += 2;
              t1.drawViewY = val;
              t1.viewChanged = true;
              t1.refreshScreen$0();
            }
            break;
          case 249:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else if (this.stage != null)
              this.mapInfo.processTurfBlockMessage$1(msg);
            break;
          case 250:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else if (this.stage != null)
              this.mapInfo.processTurfChangeMessage$1(msg);
            break;
          case 134:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else if (this.stage != null)
              this.mapInfo.processAreaMessage$1(msg);
            break;
          case 251:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else if (this.stage != null)
              this.mapInfo.processMovableChangeMessage$1(msg);
            break;
          case 118:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else if (this.stage != null) {
              t1 = this.mapInfo;
              if (t1.readMovableChanges$3$isScreen(msg, t1.screen, true) > 0)
                t1.refreshScreen$0();
            }
            break;
          case 108:
            if (this.skinLoaded) {
              val = msg._webclient$_data.getUint32(msg._pos, true);
              t1 = msg._pos += 4;
              t2 = msg._webclient$_data;
              msg._pos = t1 + 1;
              flags = t2.getUint8(t1);
              iconId = (flags & 1) !== 0 ? msg.getUint32as16$0() : null;
              if ((flags & 2) !== 0) {
                val0 = msg._webclient$_data.getUint16(msg._pos, true);
                t1 = msg._pos += 2;
                if (val0 === 65535) {
                  val0 = msg._webclient$_data.getUint32(t1, true);
                  msg._pos += 4;
                  strlen = val0;
                } else
                  strlen = val0;
                state = strlen > 0 ? msg.getString$1(0, strlen) : "";
              } else
                state = null;
              t1 = new N.PendingFlick(val, iconId, state, null);
              t2 = $.me;
              t1.time = t2.currentTime;
              t2.pendingFlicks.$indexSet(0, val, t1);
            }
            break;
          case 37:
            if (this.skinLoaded) {
              appearance = this.appearanceMap.$index(0, msg.getUint32as16$0());
              t1 = msg.getUint32as16$0();
              t2 = msg.getUint32as16$0();
              t = msg._webclient$_data.getUint8(msg._pos++);
              N.Missile$(appearance, (t1 | 16777216) >>> 0, (t2 | 16777216) >>> 0, (msg.getUint32as16$0() & 16777215 | t << 24) >>> 0);
            }
            break;
          case 51:
          case 53:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            update = msg.type === 53;
            id = (msg.getUint32as16$0() | 218103808) >>> 0;
            appearance = this.appearanceMap.$index(0, msg.getUint32as16$0());
            val = msg._webclient$_data.getUint32(msg._pos, true);
            msg._pos += 4;
            img = this.infoMap.$index(0, id);
            if (img != null) {
              if (!update || img.locId !== val) {
                this.removeImage$1(img);
                update = false;
              }
              img.set$appearance(0, appearance);
            } else {
              t1 = this.infoMap;
              img = N.AtomInfo$(id, appearance, null);
              t1.$indexSet(0, id, img);
            }
            img.locId = val;
            if (!update) {
              atom = val !== 0 ? this.infoMap.$index(0, val) : null;
              pend = this.pendingImages.$index(0, val);
              if (pend == null) {
                pend = [];
                this.pendingImages.$indexSet(0, val, pend);
              }
              J.add$1$ax(pend, img.id);
              if (atom != null) {
                t1 = atom.images;
                if (t1 == null) {
                  t1 = [];
                  atom.images = t1;
                }
                t1.push(img);
                atom.composite_dirty = true;
                atom.icons_dirty = true;
                atom._oob = null;
                atom._visboundsTiles = null;
                atom._visbounds = null;
                atom.inert = false;
                if (atom.cantick && atom.tickIndex < 0)
                  atom.prepareTick$1(true);
              }
            }
            break;
          case 52:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else
              this.processImageDelMessage$1(msg);
            break;
          case 113:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else {
              val = msg._webclient$_data.getUint32(msg._pos, true);
              msg._pos += 4;
              this.playerMob = (val | 50331648) >>> 0;
              this.mapInfo.viewChanged = true;
            }
            break;
          case 56:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else
              this.mapInfo.client.set$appearance(0, this.appearanceMap.$index(0, msg.getUint32as16$0()));
            break;
          case 242:
            val = msg._webclient$_data.getUint16(msg._pos, true);
            t1 = msg._pos += 2;
            val0 = msg._webclient$_data.getUint16(t1, true);
            t1 = msg._pos += 2;
            val1 = msg._webclient$_data.getUint16(t1, true);
            t1 = msg._pos += 2;
            val2 = msg._webclient$_data.getUint16(t1, true);
            t1 = msg._pos += 2;
            if (val2 === 65535) {
              val2 = msg._webclient$_data.getUint32(t1, true);
              msg._pos += 4;
              strlen = val2;
            } else
              strlen = val2;
            text = strlen > 0 ? msg.getString$1(0, strlen) : "";
            t1 = this.iconMap;
            t2 = new N.AtomIcon(null, null, null, null, null, null, null, null, val0, val1, 0, val, null, text, false, null, null);
            t2._isComplete = true;
            t1.$indexSet(0, val, t2);
            break;
          case 208:
            this.processMacroMessage$1(msg);
            break;
          case 211:
          case 213:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else
              this.processPromptMessage$1(msg);
            break;
          case 246:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else {
              val = msg._webclient$_data.getUint16(msg._pos, true);
              t1 = msg._pos += 2;
              if (val === 65535) {
                val = msg._webclient$_data.getUint32(t1, true);
                msg._pos += 4;
                strlen = val;
              } else
                strlen = val;
              $name = strlen > 0 ? msg.getString$1(0, strlen) : "";
              t1 = msg._webclient$_data;
              t2 = t1.byteLength;
              t3 = msg._pos;
              if (t2 - t3 > 0) {
                val = t1.getUint32(t3, true);
                msg._pos += 4;
                p = val;
              } else
                p = 4294967295;
              file = this.localFiles.$index(0, $name);
              reply = new N.ByondMessage(null, null, 0, -1);
              t1 = [];
              reply._elems = t1;
              reply._pos = 0;
              t1.push(new N.MessageElem(246, reply.get$_putType()));
              reply._pos += 2;
              reply._elems.push(new N.MessageElem($name, reply.get$_putString()));
              reply._pos += $name.length + 1;
              if (p === 4294967295) {
                t1 = file != null ? file._webclient$_data.byteLength : 0;
                reply._elems.push(new N.MessageElem(t1, reply.get$_putUint32()));
                reply._pos += 4;
              } else if (file == null) {
                reply._elems.push(new N.MessageElem(p, reply.get$_putUint32()));
                reply._pos += 4;
                reply._elems.push(new N.MessageElem(-1, reply.get$_putInt32()));
                reply._pos += 4;
              } else {
                n = P.min(file._webclient$_data.byteLength - p, 262144);
                if (n < 0)
                  n = 0;
                p0 = file._webclient$_data.byteLength;
                if (p > p0)
                  p = p0;
                t1 = reply.get$_putUint32();
                reply._elems.push(new N.MessageElem(p, t1));
                reply._pos += 4;
                reply._elems.push(new N.MessageElem(n, t1));
                reply._pos += 4;
                if (n > 0) {
                  t1 = file._webclient$_data;
                  t2 = t1.byteLength;
                  len = p + n > t2 ? t2 - p : n;
                  t1 = t1.buffer;
                  t1.toString;
                  H._checkViewArguments(t1, p, len);
                  t1 = new DataView(t1, p, len);
                  t2 = t1.byteLength;
                  reply._elems.push(new N.MessageElem(t1, reply.get$_putBytes()));
                  reply._pos = reply._pos + t2;
                }
              }
              reply.send$1(0, this.socket);
              this.activity = true;
            }
            break;
          case 212:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else
              this.processAlertMessage$1(msg);
            break;
          case 245:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else
              this.processExpansionMessage$1(msg);
            break;
          case 247:
            N.Appearance$fromMsg(msg);
            break;
          case 221:
            this.processStatsMessage$1(msg);
            break;
          case 223:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else
              this.processSoundMessage$1(msg);
            break;
          case 229:
            if (!this.skinLoaded && this.fullSkin != null)
              this.pendingMessages.push(msg);
            else
              this.processWinsetMessage$1(msg);
            break;
          case 222:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else
              this.processWingetMessage$1(msg);
            break;
          case 177:
            if (!this.skinLoaded)
              this.pendingMessages.push(msg);
            else {
              val = msg._webclient$_data.getUint16(msg._pos, true);
              t1 = msg._pos += 2;
              if (val === 65535) {
                val = msg._webclient$_data.getUint32(t1, true);
                msg._pos += 4;
                strlen = val;
              } else
                strlen = val;
              old = strlen > 0 ? msg.getString$1(0, strlen) : "";
              val = msg._webclient$_data.getUint16(msg._pos, true);
              t1 = msg._pos += 2;
              if (val === 65535) {
                val = msg._webclient$_data.getUint32(t1, true);
                msg._pos += 4;
                strlen = val;
              } else
                strlen = val;
              clone = strlen > 0 ? msg.getString$1(0, strlen) : "";
              $.$get$ByondJS_skin().clone$2(0, old, clone);
            }
            break;
          case 244:
            val = msg._webclient$_data.getUint16(msg._pos, true);
            t1 = msg._pos += 2;
            t2 = msg._webclient$_data;
            msg._pos = t1 + 1;
            if (t2.getUint8(t1) === 0) {
              val0 = msg._webclient$_data.getUint16(msg._pos, true);
              t1 = msg._pos += 2;
              val1 = msg._webclient$_data.getUint16(t1, true);
              t1 = msg._pos += 2;
              val2 = msg._webclient$_data.getUint16(t1, true);
              msg._pos += 2;
              this.cursorMap.$indexSet(0, val, N.AtomCursor$(val, this.iconMap.$index(0, val0), new U.Point0(val1, val2, [null])));
            }
            break;
          case 231:
            icon = $.me.iconInfoMap.$index(0, msg.getUint32as16$0());
            t1 = this.clientInfo;
            if (icon != null) {
              t1.defCursor = N.AtomCursor_AtomCursor$fromIcon(icon, "");
              this.clientInfo.overCursor = N.AtomCursor_AtomCursor$fromIcon(icon, "over");
              this.clientInfo.dragCursor = N.AtomCursor_AtomCursor$fromIcon(icon, "drag");
              this.clientInfo.dropCursor = N.AtomCursor_AtomCursor$fromIcon(icon, "drop");
              this.clientInfo.allCursor = N.AtomCursor_AtomCursor$fromIcon(icon, "all");
              t1 = this.clientInfo;
              if (t1.overCursor == null)
                t1.overCursor = this.cursorMap.$index(0, 6);
              t1 = this.clientInfo;
              if (t1.dragCursor == null)
                t1.dragCursor = this.cursorMap.$index(0, 3);
              t1 = this.clientInfo;
              if (t1.dropCursor == null)
                t1.dropCursor = this.cursorMap.$index(0, 4);
            } else {
              t1.defCursor = null;
              t1.overCursor = this.cursorMap.$index(0, 6);
              this.clientInfo.dragCursor = this.cursorMap.$index(0, 3);
              this.clientInfo.dropCursor = this.cursorMap.$index(0, 4);
              this.clientInfo.allCursor = null;
            }
            break;
          case 55:
            val = msg._webclient$_data.getUint32(msg._pos, true);
            t1 = msg._pos += 4;
            this.tickLag = val;
            this.clientTickLag = val;
            t2 = msg._webclient$_data;
            if (t2.byteLength - t1 > 0) {
              val = t2.getUint32(t1, true);
              msg._pos += 4;
              this.clientTickLag = val;
              t1 = val;
            } else
              t1 = val;
            this.clientTickMultiple = t1 / this.tickLag;
            break;
          case 175:
            break;
          case 210:
            this.processVerbsMessage$1(msg);
            break;
          case 215:
            this.processMouseReplyMessage$1(msg);
            break;
          default:
            t1 = $.printToZone;
            if (t1 == null)
              H.printString("Unknown message!");
            else
              t1.call$1("Unknown message!");
            break;
        }
      },
      processMacroMessage$1: function(msg) {
        var sets, nsets, command, i, val, t1, strlen, $name, set, j, val0;
        sets = P.LinkedHashMap__makeEmpty();
        nsets = msg.getUint16$0(0);
        for (command = null, i = 0; i < nsets; ++i) {
          val = msg._webclient$_data.getUint16(msg._pos, true);
          t1 = msg._pos += 2;
          if (val === 65535) {
            val = msg._webclient$_data.getUint32(t1, true);
            msg._pos += 4;
            strlen = val;
          } else
            strlen = val;
          $name = strlen > 0 ? msg.getString$1(0, strlen) : "";
          set = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
          sets.$indexSet(0, $name, set);
          val = msg._webclient$_data.getUint16(msg._pos, true);
          msg._pos += 2;
          for (j = 0; j < val; ++j) {
            val0 = msg._webclient$_data.getUint16(msg._pos, true);
            t1 = msg._pos += 2;
            if (val0 === 65535) {
              val0 = msg._webclient$_data.getUint32(t1, true);
              msg._pos += 4;
              strlen = val0;
            } else
              strlen = val0;
            $name = strlen > 0 ? msg.getString$1(0, strlen) : "";
            val0 = msg._webclient$_data.getUint16(msg._pos, true);
            t1 = msg._pos += 2;
            if (val0 === 65535) {
              val0 = msg._webclient$_data.getUint32(t1, true);
              msg._pos += 4;
              strlen = val0;
            } else
              strlen = val0;
            command = strlen > 0 ? msg.getString$1(0, strlen) : "";
            t1 = P.LinkedHashMap__makeLiteral(["command", command]);
            set.$indexSet(0, $name, P._wrapToDart(P.JsObject__convertDataTree(t1)));
          }
        }
        $.$get$ByondJS_skin().setMacros$1(sets);
      },
      activateKey$1: function(key) {
        var msg, t1;
        this.webid = key;
        if (this.getting_key)
          if (key.length !== 0)
            this.getting_key = false;
          else
            return;
        if (this.needs_key) {
          this.needs_key = false;
          msg = N.ByondMessage$(26);
          t1 = this.webid;
          msg._elems.push(new N.MessageElem(t1, msg.get$_putString()));
          msg._pos += t1.length + 1;
          this.webid = "";
          msg.send$1(0, this.socket);
          this.activity = true;
        }
      },
      checkLoginCompletion$0: function() {
        var t1 = this.loginComplete;
        if (t1 == null)
          return;
        if (this.server_has_key && this.resources_received && t1.future._state === 0)
          t1.complete$0(0);
      },
      processKeyMessage$1: function(msg) {
        var t1, exception;
        if (msg._webclient$_data.byteLength - msg._pos > 0) {
          this.server_has_key = true;
          this.checkLoginCompletion$0();
          return;
        }
        this.needs_key = true;
        this.server_has_key = false;
        t1 = this.loginComplete;
        if (t1 != null && t1.future._state !== 0) {
          this.loginComplete = null;
          this.loggedIn = true;
          t1 = null;
        }
        if (t1 == null)
          this.loginComplete = new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [null]), [null]);
        if (!this.getting_key) {
          t1 = this.webid;
          if (t1.length !== 0)
            this.activateKey$1(t1);
          if (this.webid.length === 0) {
            this.getting_key = true;
            try {
              if (W._convertNativeToDart_Window(window.parent) !== window)
                J.postMessage$2$x(W._convertNativeToDart_Window(window.parent), "key", "*");
              else
                this.activateKey$1("-");
            } catch (exception) {
              H.unwrapException(exception);
              this.activateKey$1("-");
            }
          }
        }
      },
      processCacheListMessage$1: function(msg) {
        var n, i, val, type, val0, t1, url;
        n = msg.getUint16$0(0);
        this.totBytes += msg.getUint32$0(0);
        for (i = 0; i < n; ++i) {
          val = msg._webclient$_data.getUint32(msg._pos, true);
          msg._pos += 4;
          type = msg.getString$0(0);
          val0 = msg._webclient$_data.getUint32(msg._pos, true);
          msg._pos += 4;
          t1 = "cache/" + C.JSInt_methods.toString$0(val) + type;
          url = "http://" + H.S(this.host) + ":" + H.S(this.port) + "/" + t1;
          this.totBytes -= val0;
          this.cacheQueue.add$1(0, new N.CacheItem(url, C.JSInt_methods.toString$0(val), type, val0, 0, 0, false));
        }
        if (this.totBytes === 0)
          this.handlePostLoad$0();
      },
      updateLoader$1: function(bytes) {
        this.curBytes += bytes;
        if (this._loaderTimer != null)
          return;
        this._loaderTimer = P.Future_Future$delayed(P.Duration$(0, 0, 0, 250, 0, 0), new N.ByondClient_updateLoader_closure(this), null);
      },
      processSoundMessage$1: function(msg) {
        var crc, type, t1, snd, flags, $status, fbcount, i, val, t2;
        crc = msg.getUint32$0(0);
        type = msg.getString$0(0).toLowerCase();
        if (crc === 4294967295)
          t1 = null;
        else {
          t1 = "cache/" + C.JSInt_methods.toString$0(crc) + type;
          t1 = "http://" + H.S(this.host) + ":" + H.S(this.port) + "/" + t1;
        }
        snd = new N.SoundInfo(t1, false, 0, false, 255, 0, false, 0, 0, 1, 0, 0, 0, 1, null, null, new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [null]), [null]));
        snd.repeat = msg._webclient$_data.getUint8(msg._pos++) !== 0;
        snd.wait = msg._webclient$_data.getUint8(msg._pos++) !== 0;
        snd.channel = msg.getUint16$0(0);
        snd.volume = msg._webclient$_data.getUint8(msg._pos++);
        flags = msg._webclient$_data.getUint8(msg._pos++);
        if ((flags & 1) !== 0) {
          snd.pan = msg._webclient$_data.getUint8(msg._pos++);
          t1 = msg.getFloat32$0(0);
          snd.frequency = t1;
          if (t1 === 0)
            snd.frequency = 1;
          snd.priority = msg._webclient$_data.getUint8(msg._pos++);
          $status = msg._webclient$_data.getUint8(msg._pos++);
        } else
          $status = 0;
        if ((flags & 2) !== 0) {
          snd.x = msg.getFloat32$0(0);
          snd.y = msg.getFloat32$0(0);
          snd.z = msg.getFloat32$0(0);
          t1 = msg.getFloat32$0(0);
          snd.falloff = t1;
          if (t1 <= 0)
            snd.falloff = 1;
        }
        if ((flags & 32) !== 0) {
          fbcount = msg._webclient$_data.getUint8(msg._pos++);
          snd.fallback = [];
          for (i = 0; i < fbcount; ++i) {
            val = msg._webclient$_data.getUint32(msg._pos, true);
            msg._pos += 4;
            t1 = msg.getString$0(0);
            t2 = snd.fallback;
            t1 = "cache/" + C.JSInt_methods.toString$0(val) + t1.toLowerCase();
            t2.push("http://" + H.S(this.host) + ":" + H.S(this.port) + "/" + t1);
          }
        }
        this.soundList.add$3(0, type, snd, $status);
      },
      set$enableSound: function(b) {
        var t1;
        if (b == null)
          return;
        this._enableSound = b;
        t1 = this.soundList;
        if (t1 == null)
          return;
        if (b)
          t1.toString;
        else
          t1.stop$0(0);
      },
      set$enableMusic: function(b) {
        var t1;
        if (b == null)
          return;
        this._enableMusic = b;
        t1 = this.soundList;
        if (t1 == null)
          return;
        if (b)
          t1.toString;
        else
          t1.stopMusic$0();
      },
      msgReadStatValue$1: function(msg) {
        var obj, type, val, s, t1, appearanceId, info, images, l, app, i, img, strlen, count, count0;
        obj = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
        type = msg._webclient$_data.getUint8(msg._pos++);
        if (type === 0) {
          obj.$indexSet(0, "text", "");
          obj.$indexSet(0, "null", true);
        } else if (type === 42) {
          val = msg._webclient$_data.getFloat32(msg._pos, true);
          msg._pos += 4;
          s = C.JSNumber_methods.toStringAsPrecision$1(val, 6);
          t1 = P.RegExp_RegExp("\\.0+$", true, false);
          s = H.stringReplaceAllUnchecked(s, t1, "");
          t1 = P.RegExp_RegExp("\\.0*[eE]", true, false);
          s.toString;
          s = H.stringReplaceAllUnchecked(s, t1, "e");
          obj.$indexSet(0, "num", val);
          obj.$indexSet(0, "text", s);
        } else if (type === 2) {
          val = msg._webclient$_data.getUint32(msg._pos, true);
          msg._pos += 4;
          appearanceId = msg.getUint32as16$0();
          obj.$indexSet(0, "atom", val);
          obj.$indexSet(0, "text", "");
          info = this.infoMap.$index(0, val);
          t1 = this.appearanceMap;
          if (info == null) {
            info = N.AtomInfo$(val, t1.$index(0, appearanceId), null);
            this.infoMap.$indexSet(0, val, info);
          } else
            info.set$appearance(0, t1.$index(0, appearanceId));
          t1 = info.get$mainIconId();
          info._lastIcon = t1;
          obj.$indexSet(0, "icon", t1);
          t1 = info._appearance;
          obj.$indexSet(0, "text", t1 != null ? t1.name : "");
          images = info.images;
          if (images != null) {
            l = images.length;
            for (app = null, i = 0; i < l; ++i) {
              img = images[i];
              if (img != null) {
                app = img.get$currentAppearance();
                t1 = app != null && (app.core.bits & 262144) !== 0;
              } else
                t1 = false;
              if (t1) {
                t1 = app.name;
                if (t1.length !== 0)
                  obj.$indexSet(0, "text", t1);
              }
            }
          }
        } else if (type === 6) {
          val = msg._webclient$_data.getUint16(msg._pos, true);
          t1 = msg._pos += 2;
          if (val === 65535) {
            val = msg._webclient$_data.getUint32(t1, true);
            msg._pos += 4;
            strlen = val;
          } else
            strlen = val;
          obj.$indexSet(0, "text", strlen > 0 ? msg.getString$1(0, strlen) : "");
        } else if (type === 15) {
          t1 = [];
          C.JSArray_methods.addAll$1(t1, C.JSArray_methods.map$1([], P.js___convertToJS$closure()));
          l = new P.JsArray(t1, [null]);
          obj.$indexSet(0, "list", l);
          val = msg._webclient$_data.getUint16(msg._pos, true);
          msg._pos += 2;
          for (count = val; count0 = count - 1, count > 0; count = count0)
            l.callMethod$2("push", [this.msgReadStatValue$1(msg)]);
        } else if (type === 12) {
          val = msg._webclient$_data.getUint16(msg._pos, true);
          t1 = msg._pos += 2;
          if (val === 65535) {
            val = msg._webclient$_data.getUint32(t1, true);
            msg._pos += 4;
            strlen = val;
          } else
            strlen = val;
          obj.$indexSet(0, "file", strlen > 0 ? msg.getString$1(0, strlen) : "");
        }
        return obj;
      },
      processFileMessage$1: function(msg) {
        var t1, obj, opts, ctrl, nopts, i, val, strlen, $name, value;
        t1 = $.$get$context();
        obj = P.JsObject_JsObject(t1.$index(0, "Object"), null);
        opts = P.JsObject_JsObject(t1.$index(0, "Object"), null);
        obj.$indexSet(0, "file", msg.getUTFString$0());
        ctrl = msg.getUTFString$0();
        nopts = msg.getUint16$0(0);
        obj.$indexSet(0, "options", opts);
        for (i = 0; i < nopts; ++i) {
          val = msg._webclient$_data.getUint16(msg._pos, true);
          t1 = msg._pos += 2;
          if (val === 65535) {
            val = msg._webclient$_data.getUint32(t1, true);
            msg._pos += 4;
            strlen = val;
          } else
            strlen = val;
          $name = strlen > 0 ? msg.getString$1(0, strlen) : "";
          val = msg._webclient$_data.getUint16(msg._pos, true);
          t1 = msg._pos += 2;
          if (val === 65535) {
            val = msg._webclient$_data.getUint32(t1, true);
            msg._pos += 4;
            strlen = val;
          } else
            strlen = val;
          value = strlen > 0 ? msg.getString$1(0, strlen) : "";
          if ($name === "window")
            ctrl = value;
          else
            opts.$indexSet(0, $name, value);
        }
        if (opts.$index(0, "display") != null && N.ByondJS_toNum(opts.$index(0, "display"), true) === 0)
          return;
        this.outputObject$2(obj, ctrl);
      },
      processPromptMessage$1: function(msg) {
        var t1, choices, jsParams, type, n, i, val, strlen, accept;
        t1 = {};
        t1.id = null;
        choices = [];
        jsParams = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
        if (msg.type === 213) {
          jsParams.$indexSet(0, "command", msg.getUTFString$0());
          jsParams.$indexSet(0, "help", msg.getUTFString$0());
          jsParams.$indexSet(0, "canCancel", true);
          type = msg.getUint32$0(0);
          t1.id = msg.getInt32$0(0);
          n = msg._webclient$_data.byteLength - msg._pos > 0 ? msg.getUint16$0(0) : 0;
        } else {
          t1.id = msg.getInt32$0(0);
          jsParams.$indexSet(0, "help", msg.getUTFString$0());
          jsParams.$indexSet(0, "title", msg.getUTFString$0());
          jsParams.$indexSet(0, "defaultChoice", msg.getUTFString$0());
          type = msg.getUint32$0(0);
          jsParams.$indexSet(0, "canCancel", (type & 128) !== 0);
          n = msg.getUint16$0(0);
        }
        jsParams.$indexSet(0, "reply", new N.ByondClient_processPromptMessage_closure(t1, this));
        jsParams.$indexSet(0, "cancel", new N.ByondClient_processPromptMessage_closure0(t1, this));
        for (i = 0; i < n; ++i) {
          val = msg._webclient$_data.getUint16(msg._pos, true);
          t1 = msg._pos += 2;
          if (val === 65535) {
            val = msg._webclient$_data.getUint32(t1, true);
            msg._pos += 4;
            strlen = val;
          } else
            strlen = val;
          choices.push(strlen > 0 ? msg.getString$1(0, strlen) : "");
        }
        if (n > 0) {
          t1 = [];
          C.JSArray_methods.addAll$1(t1, C.JSArray_methods.map$1(choices, P.js___convertToJS$closure()));
          jsParams.$indexSet(0, "choices", new P.JsArray(t1, [null]));
          jsParams.$indexSet(0, "type", "any");
        } else if ((type & 2048) !== 0)
          jsParams.$indexSet(0, "type", "message");
        else if ((type & 131072) !== 0)
          jsParams.$indexSet(0, "type", "color");
        else if ((type & 1552) !== 0) {
          jsParams.$indexSet(0, "type", "file");
          if ((type & 16) === 0) {
            accept = [];
            if ((type & 512) !== 0)
              accept.push("image/png,image/gif,image/jpeg,image/bmp,.dmi");
            if ((type & 1024) !== 0)
              accept.push("audio/*");
            jsParams.$indexSet(0, "accept", C.JSArray_methods.join$1(accept, ","));
          }
        } else if ((type & 32768) !== 0)
          jsParams.$indexSet(0, "type", "password");
        else if ((type & 8) !== 0 && (type & 4) === 0)
          jsParams.$indexSet(0, "type", "num");
        else
          jsParams.$indexSet(0, "type", "text");
        this.macro.unstick$0();
        $.$get$ByondJS_skin().createPrompt$1(jsParams);
      },
      processAlertMessage$1: function(msg) {
        var id, help, title, n, buttons, jsParams, i, val, t1, strlen;
        id = msg.getInt32$0(0);
        help = msg.getUTFString$0();
        title = msg.getUTFString$0();
        n = msg.getUint16$0(0);
        buttons = [];
        jsParams = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
        jsParams.$indexSet(0, "alert", true);
        jsParams.$indexSet(0, "type", "alert");
        jsParams.$indexSet(0, "help", help);
        jsParams.$indexSet(0, "title", title);
        jsParams.$indexSet(0, "reply", new N.ByondClient_processAlertMessage_closure(this, id));
        jsParams.$indexSet(0, "cancel", new N.ByondClient_processAlertMessage_closure0(this, id));
        for (i = 0; i < n; ++i) {
          val = msg._webclient$_data.getUint16(msg._pos, true);
          t1 = msg._pos += 2;
          if (val === 65535) {
            val = msg._webclient$_data.getUint32(t1, true);
            msg._pos += 4;
            strlen = val;
          } else
            strlen = val;
          buttons.push(strlen > 0 ? msg.getString$1(0, strlen) : "");
        }
        t1 = [];
        C.JSArray_methods.addAll$1(t1, C.JSArray_methods.map$1(buttons, P.js___convertToJS$closure()));
        jsParams.$indexSet(0, "choices", new P.JsArray(t1, [null]));
        this.macro.unstick$0();
        $.$get$ByondJS_skin().createPrompt$1(jsParams);
      },
      processAnimationMessage$1: function(msg) {
        var atomId, start, isNew, sequence, n, info, t1, skip, i, fromId, toId, val, val0, t2, easing, animFlags, val1, skip0, from, to, t3, $top, isFirst, t4, old, h, ta;
        atomId = msg.getUint32$0(0);
        start = msg.getFloat32$0(0);
        isNew = msg._webclient$_data.getUint8(msg._pos++) !== 0;
        sequence = msg.getUint16$0(0);
        n = msg.getUint16$0(0);
        info = (atomId & 4278190080) >>> 0 === 83886080 ? this.mapInfo.client : this.infoMap.$index(0, atomId);
        if (info == null) {
          t1 = this.infoMap;
          info = N.AtomInfo$(atomId, null, null);
          t1.$indexSet(0, atomId, info);
          if ((atomId & 4261412864) >>> 0 === 33554432)
            info.alwaysGlide$0();
        }
        if (n === 0) {
          info.set$animation(0, null);
          skip = 0;
        } else {
          if (sequence !== 0) {
            t1 = info._animation;
            t1 = t1 != null && t1.sequence === sequence;
          } else
            t1 = false;
          skip = t1 ? info._animation.get$count() : 0;
        }
        for (i = 0; i < n; ++i, skip = skip0) {
          fromId = msg.getUint32as16$0();
          toId = msg.getUint32as16$0();
          val = msg._webclient$_data.getFloat32(msg._pos, true);
          t1 = msg._pos += 4;
          val0 = msg._webclient$_data.getInt32(t1, true);
          t1 = msg._pos += 4;
          t2 = msg._webclient$_data;
          msg._pos = t1 + 1;
          easing = t2.getUint8(t1);
          animFlags = msg._webclient$_data.getUint8(msg._pos++);
          if ((animFlags & 4) !== 0) {
            val1 = msg._webclient$_data.getFloat32(msg._pos, true);
            msg._pos += 4;
            start = val1;
          }
          skip0 = skip - 1;
          if (skip > 0)
            continue;
          from = this.appearanceMap.$index(0, fromId);
          to = this.appearanceMap.$index(0, toId);
          if (from == null) {
            if (to == null)
              continue;
            from = to;
          } else if (to == null)
            to = from;
          t1 = C.JSNumber_methods.round$0(val * 100);
          t2 = new N.Animation(null, from, to, null, easing, val0, animFlags, t1, null, 0, null, null, null, null, null, false, 0, 0, 0, 0, sequence);
          t3 = info._animation;
          $top = t3 != null ? t3.get$lastHead() : null;
          if ($top == null) {
            t3 = (animFlags & 4294967291) >>> 0;
            t2.animFlags = t3;
            isFirst = true;
          } else {
            t3 = animFlags;
            isFirst = isNew;
          }
          if ((t3 & 4) !== 0)
            isFirst = false;
          t4 = from != null && to != null ? from.core.cmpMask$1(to.core) : 0;
          t2.mask = t4;
          if (isFirst || (t3 & 4) !== 0) {
            if ((t3 & 4) === 0) {
              old = info.get$animation(info);
              if (old != null) {
                t1 = old.total_end;
                t1 = (t1 == null || t1 > $.me.currentMs) && (t3 & 1) === 0;
              } else
                t1 = false;
              if (t1)
                t2.transition = N.Animation$asTransition(info, t2);
              t1 = (info.id & 4278190080) >>> 0;
              if (t1 === 33554432 || t1 === 50331648) {
                t2.usePixels = true;
                t2.mask |= 1024;
              } else if (t1 === 83886080) {
                t2.usePixels = true;
                t2.mask |= 1024;
              }
            }
            t1 = t2.duration;
            t2.total_duration = t1;
            t3 = t2.loop;
            if (t3 === 0) {
              t2.loop = 1;
              t3 = 1;
            }
            t4 = start + $.me.currentMs;
            t2.start = t4;
            if (t3 > 0)
              t2.end = t4 + t1 * t3;
            if (isFirst) {
              info.set$animation(0, t2);
              t2.total_end = t2.end;
            } else {
              t1 = info._animation;
              (t1 != null ? t1.get$last(t1) : null).next = t2;
              t1 = info._animation;
              t3 = t1.total_end;
              if (t3 != null) {
                t4 = t2.end;
                t3 = t4 == null || t4 > t3;
              } else
                t3 = false;
              if (t3)
                t1.total_end = t2.end;
            }
          } else {
            $top.mask |= t4;
            t3 = info._animation;
            (t3 != null ? t3.get$last(t3) : null).next = t2;
            t1 = $top.total_duration + t1;
            $top.total_duration = t1;
            t2.loop = 1;
            t2 = $top.loop;
            if (t2 > 0) {
              t1 = $top.start + t1 * t2;
              $top.end = t1;
              t2 = info._animation;
              t3 = t2.total_end;
              if (t3 != null)
                t3 = t1 > t3;
              else
                t3 = false;
              if (t3)
                t2.total_end = t1;
            }
          }
          h = info._animation;
          if (h.usePixels) {
            ta = h.get$last(h).to;
            if (ta != null) {
              ta = ta.core;
              h.pixel_x = ta.pixel_x;
              h.pixel_y = ta.pixel_y;
              h.pixel_w = ta.pixel_w;
              h.pixel_z = ta.pixel_z;
            }
          }
          isNew = false;
          sequence = 0;
        }
      },
      removeImage$1: function(img) {
        var loc, atom, pend, t1;
        loc = img.locId;
        atom = loc !== 0 ? this.infoMap.$index(0, loc) : null;
        pend = this.pendingImages.$index(0, loc);
        if (pend != null) {
          t1 = J.getInterceptor$ax(pend);
          t1.remove$1(pend, img.id);
          if (t1.get$isEmpty(pend))
            this.pendingImages.remove$1(0, loc);
        }
        if (atom != null) {
          atom.removeImage$1(img);
          return;
        }
      },
      processImageDelMessage$1: function(msg) {
        var id, img;
        for (; msg._webclient$_data.byteLength - msg._pos > 0;) {
          id = (msg.getUint32as16$0() | 218103808) >>> 0;
          img = this.infoMap.$index(0, id);
          if (img != null) {
            this.removeImage$1(img);
            img.prepareTick$1(false);
          }
          this.infoMap.remove$1(0, id);
        }
      },
      processExpansionMessage$1: function(msg) {
        var obj, ctrl, n, t1, choices, n0, val, strlen;
        obj = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
        msg._webclient$_data.getUint8(msg._pos++);
        ctrl = msg.getUTFString$0();
        obj.$indexSet(0, "text", msg.getUTFString$0());
        n = msg.getUint16$0(0);
        if (n !== 0) {
          t1 = [];
          C.JSArray_methods.addAll$1(t1, C.JSArray_methods.map$1([], P.js___convertToJS$closure()));
          choices = new P.JsArray(t1, [null]);
          obj.$indexSet(0, "choices", choices);
          for (; n0 = n - 1, n > 0; n = n0) {
            val = msg._webclient$_data.getUint16(msg._pos, true);
            t1 = msg._pos += 2;
            if (val === 65535) {
              val = msg._webclient$_data.getUint32(t1, true);
              msg._pos += 4;
              strlen = val;
            } else
              strlen = val;
            choices.callMethod$2("push", [strlen > 0 ? msg.getString$1(0, strlen) : ""]);
          }
        }
        if (ctrl === "")
          ctrl = ":input";
        $.$get$ByondJS_skin().output$2(ctrl, obj);
      },
      processWinsetMessage$1: function(msg) {
        var nCtrls, property, value, i, t1, val, t2, strlen, ctrlName, j, val0, t3, html;
        nCtrls = msg.getUint16$0(0);
        for (property = null, value = null, i = 0; i < nCtrls; ++i) {
          t1 = P.LinkedHashMap__makeEmpty();
          t1 = P._wrapToDart(P.JsObject__convertDataTree(t1));
          val = msg._webclient$_data.getUint16(msg._pos, true);
          t2 = msg._pos += 2;
          if (val === 65535) {
            val = msg._webclient$_data.getUint32(t2, true);
            msg._pos += 4;
            strlen = val;
          } else
            strlen = val;
          ctrlName = strlen > 0 ? msg.getString$1(0, strlen) : "";
          val = msg._webclient$_data.getUint16(msg._pos, true);
          msg._pos += 2;
          for (j = 0; j < val; ++j) {
            val0 = msg._webclient$_data.getUint16(msg._pos, true);
            t2 = msg._pos += 2;
            if (val0 === 65535) {
              val0 = msg._webclient$_data.getUint32(t2, true);
              msg._pos += 4;
              strlen = val0;
            } else
              strlen = val0;
            property = strlen > 0 ? msg.getString$1(0, strlen) : "";
            val0 = msg._webclient$_data.getUint16(msg._pos, true);
            t2 = msg._pos += 2;
            if (val0 === 65535) {
              val0 = msg._webclient$_data.getUint32(t2, true);
              msg._pos += 4;
              strlen = val0;
            } else
              strlen = val0;
            value = strlen > 0 ? msg.getString$1(0, strlen) : "";
            t1.$indexSet(0, property, value);
          }
          $.$get$ByondJS_skin().winset$2(ctrlName, t1);
        }
        if (msg._webclient$_data.byteLength - msg._pos > 0) {
          this.fullSkin = [];
          for (; t1 = msg._webclient$_data, t2 = t1.byteLength, t3 = msg._pos, t2 - t3 > 0;) {
            val = t1.getUint16(t3, true);
            t1 = msg._pos += 2;
            if (val === 65535) {
              val = msg._webclient$_data.getUint32(t1, true);
              msg._pos += 4;
              strlen = val;
            } else
              strlen = val;
            html = strlen > 0 ? msg.getString$1(0, strlen) : "";
            this.fullSkin.push(html);
          }
          t1 = this.fullSkinAvailable;
          if (t1 != null)
            t1.complete$0(0);
        }
      },
      processWingetMessage$1: function(msg) {
        var pid, ctrlName, nProps, obj, i, val, t1, strlen, reply, keys, t2, _i, property, value, t3, t4;
        pid = msg.getUint32$0(0);
        ctrlName = msg.getUTFString$0();
        nProps = msg.getUint16$0(0);
        obj = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeEmpty());
        for (i = 0; i < nProps; ++i) {
          val = msg._webclient$_data.getUint16(msg._pos, true);
          t1 = msg._pos += 2;
          if (val === 65535) {
            val = msg._webclient$_data.getUint32(t1, true);
            msg._pos += 4;
            strlen = val;
          } else
            strlen = val;
          obj.$indexSet(0, strlen > 0 ? msg.getString$1(0, strlen) : "", "");
        }
        $.$get$ByondJS_skin().winget$2(ctrlName, obj);
        reply = N.ByondMessage$(222);
        reply._elems.push(new N.MessageElem(pid, reply.get$_putUint32()));
        reply._pos += 4;
        keys = P.List_List$from(N.ByondJS_keys(obj), true, null);
        t1 = keys.length;
        reply._elems.push(new N.MessageElem(t1, reply.get$_putUint16()));
        reply._pos += 2;
        for (t1 = keys.length, t2 = reply.get$_putUTFString(), _i = 0; _i < keys.length; keys.length === t1 || (0, H.throwConcurrentModificationError)(keys), ++_i) {
          property = keys[_i];
          value = obj.$index(0, property);
          if (value == null)
            value = "";
          if (typeof value !== "string")
            value = J.toString$0$(value);
          t3 = property.length;
          t4 = t3 < 65535 ? 2 : 6;
          reply._elems.push(new N.MessageElem(property, t2));
          reply._pos += t3 + t4;
          t4 = value.length;
          t3 = t4 < 65535 ? 2 : 6;
          reply._elems.push(new N.MessageElem(value, t2));
          reply._pos += t4 + t3;
        }
        reply.send$1(0, this.socket);
        this.activity = true;
      },
      sendStats$0: function() {
        var t1, t2, t3, t4, panels;
        t1 = [null, null];
        t2 = [];
        C.JSArray_methods.addAll$1(t2, new H.MappedListIterable(this.stats, new N.ByondClient_sendStats_closure(), t1).map$1(0, P.js___convertToJS$closure()));
        t3 = [null];
        t4 = this.jsverbs;
        if (t4 == null) {
          t4 = this.verbPanels;
          t4 = t4.get$values(t4);
          panels = P.List_List$from(new H.WhereIterable(t4, new N.ByondClient_sendStats_closure0(), [H.getRuntimeTypeArgument(t4, "Iterable", 0)]), true, null);
          C.JSArray_methods.sort$1(panels, new N.ByondClient_sendStats_closure1());
          t4 = [];
          C.JSArray_methods.addAll$1(t4, new H.MappedListIterable(panels, new N.ByondClient_sendStats_closure2(), t1).map$1(0, P.js___convertToJS$closure()));
          t4 = new P.JsArray(t4, t3);
          this.jsverbs = t4;
          t1 = t4;
        } else
          t1 = t4;
        $.$get$ByondJS_skin().stats$2(new P.JsArray(t2, t3), t1);
      },
      processStatsMessage$1: function(msg) {
        var ndiff, items, panel, obj, i, c, r, at, nr, val, t1, flags, j, t2, strlen, at0, changed, np;
        ndiff = msg.getUint16$0(0);
        if (ndiff > 0) {
          for (items = null, panel = null, obj = null, i = 0, c = null, r = null, at = null, nr = null; i < ndiff; ++i) {
            val = msg._webclient$_data.getUint16(msg._pos, true);
            t1 = msg._pos += 2;
            flags = val >>> 14;
            j = val & 16383;
            if (flags === 0) {
              panel = this.stats[j];
              panel.changed = true;
              val = msg._webclient$_data.getUint16(t1, true);
              t1 = msg._pos += 2;
              t2 = msg._webclient$_data;
              msg._pos = t1 + 1;
              panel.deleteRows$2(val, t2.getUint8(t1));
              nr = msg._webclient$_data.getUint8(msg._pos++);
              items = [];
              for (r = 0; r < nr; ++r)
                for (c = 0; c < 3; ++c) {
                  obj = this.msgReadStatValue$1(msg);
                  if (!J.$eq$(obj.$index(0, "null"), true))
                    t1 = J.$eq$(obj.$index(0, "text"), "") && obj.$index(0, "icon") != null;
                  else
                    t1 = true;
                  if (t1)
                    obj = null;
                  items.push(obj);
                }
              at = panel._rows;
              at = val > at ? at : val;
              C.JSArray_methods.insertAll$2(panel._items, at * 3, items);
              panel._rows = panel._rows + (items.length / 3 | 0);
              at = val;
            } else if (flags === 1) {
              val = msg._webclient$_data.getUint16(t1, true);
              t1 = msg._pos += 2;
              if (val === 65535) {
                val = msg._webclient$_data.getUint32(t1, true);
                msg._pos += 4;
                strlen = val;
              } else
                strlen = val;
              t1 = strlen > 0 ? msg.getString$1(0, strlen) : "";
              panel = new N.StatPanel(t1, 0, [], true);
              val = msg._webclient$_data.getUint16(msg._pos, true);
              msg._pos += 2;
              items = [];
              for (r = 0; r < val; ++r)
                for (c = 0; c < 3; ++c) {
                  obj = this.msgReadStatValue$1(msg);
                  if (!J.$eq$(obj.$index(0, "null"), true))
                    t1 = J.$eq$(obj.$index(0, "text"), "") && obj.$index(0, "icon") != null;
                  else
                    t1 = true;
                  if (t1)
                    obj = null;
                  items.push(obj);
                }
              at0 = panel._rows;
              at0 = 0 > at0 ? at0 : 0;
              C.JSArray_methods.insertAll$2(panel._items, at0 * 3, items);
              panel._rows = panel._rows + (items.length / 3 | 0);
              C.JSArray_methods.insert$2(this.stats, j, panel);
              nr = val;
            } else if (flags === 2)
              C.JSArray_methods.removeAt$1(this.stats, j);
          }
          changed = true;
        } else {
          np = msg.getUint16$0(0);
          changed = np !== 0 || this.stats.length !== 0;
          C.JSArray_methods.set$length(this.stats, 0);
          for (obj = null, i = 0, c = null; i < np; ++i) {
            val = msg._webclient$_data.getUint16(msg._pos, true);
            t1 = msg._pos += 2;
            if (val === 65535) {
              val = msg._webclient$_data.getUint32(t1, true);
              msg._pos += 4;
              strlen = val;
            } else
              strlen = val;
            t1 = strlen > 0 ? msg.getString$1(0, strlen) : "";
            panel = new N.StatPanel(t1, 0, [], true);
            val = msg._webclient$_data.getUint16(msg._pos, true);
            msg._pos += 2;
            items = [];
            for (r = 0; r < val; ++r)
              for (c = 0; c < 3; ++c) {
                obj = this.msgReadStatValue$1(msg);
                if (!J.$eq$(obj.$index(0, "null"), true))
                  t1 = J.$eq$(obj.$index(0, "text"), "") && obj.$index(0, "icon") != null;
                else
                  t1 = true;
                if (t1)
                  obj = null;
                items.push(obj);
              }
            at = panel._rows;
            at = 0 > at ? at : 0;
            C.JSArray_methods.insertAll$2(panel._items, at * 3, items);
            panel._rows = panel._rows + (items.length / 3 | 0);
            this.stats.push(panel);
          }
        }
        if (!changed)
          return;
        this.sendStats$0();
      },
      processVerbsMessage$1: function(msg) {
        var i, n, j, bits, args, $name, desc, panelName, verb, panel, id, flag, val, t1, strlen, t2, obj, verbs, verbsUsed, arg;
        i = msg._webclient$_data.getUint8(msg._pos++);
        if (i === 0) {
          n = msg.getUint16$0(0);
          for (i = 0, j = null, bits = null, args = null, $name = null, desc = null, panelName = null, verb = null, panel = null; i < n; ++i) {
            id = msg.getUint32as16$0();
            flag = msg._webclient$_data.getUint8(msg._pos++);
            if (flag === 2) {
              val = msg._webclient$_data.getUint16(msg._pos, true);
              t1 = msg._pos += 2;
              if (val === 65535) {
                val = msg._webclient$_data.getUint32(t1, true);
                msg._pos += 4;
                strlen = val;
              } else
                strlen = val;
              $name = strlen > 0 ? msg.getString$1(0, strlen) : "";
              val = msg._webclient$_data.getUint16(msg._pos, true);
              t1 = msg._pos += 2;
              if (val === 65535) {
                val = msg._webclient$_data.getUint32(t1, true);
                msg._pos += 4;
                strlen = val;
              } else
                strlen = val;
              desc = strlen > 0 ? msg.getString$1(0, strlen) : "";
              val = msg._webclient$_data.getUint16(msg._pos, true);
              t1 = msg._pos += 2;
              if (val === 65535) {
                val = msg._webclient$_data.getUint32(t1, true);
                msg._pos += 4;
                strlen = val;
              } else
                strlen = val;
              panelName = strlen > 0 ? msg.getString$1(0, strlen) : "";
              val = msg._webclient$_data.getUint16(msg._pos, true);
              t1 = msg._pos += 2;
              t2 = msg._webclient$_data;
              msg._pos = t1 + 1;
              args = t2.getUint8(t1);
              for (j = 0; j < args; ++j) {
                msg._webclient$_data.getUint32(msg._pos, true);
                t1 = msg._pos += 4;
                t2 = msg._webclient$_data;
                msg._pos = t1 + 1;
                t2.getUint8(t1);
                msg._webclient$_data.getUint8(msg._pos++);
              }
              if (panelName.length === 0) {
                panelName = this.defaultVerbCategory;
                if (panelName == null || panelName.length === 0)
                  panelName = "Commands";
              }
              this.verbs.$indexSet(0, id, new N.VerbInfo(id, $name, desc, panelName, val, true, true));
              panel = this.verbPanels.$index(0, panelName);
              if (panel == null) {
                panel = new N.VerbPanel(panelName, [], null, true, false);
                this.verbPanels.$indexSet(0, panelName, panel);
              }
              t1 = this.verbs.$index(0, id);
              t2 = panel._items;
              if (!C.JSArray_methods.contains$1(t2, t1)) {
                t2.push(t1);
                panel.changed = true;
              }
              bits = val;
            } else {
              verb = this.verbs.$index(0, id);
              if (verb != null) {
                verb.available = flag !== 0;
                verb.changed = true;
                panelName = verb._panel;
                panel = this.verbPanels.$index(0, panelName);
                if (panel == null) {
                  t1 = this.verbPanels;
                  t2 = [];
                  panel = new N.VerbPanel(panelName, t2, null, true, false);
                  if (!C.JSArray_methods.contains$1(t2, verb)) {
                    t2.push(verb);
                    panel.changed = true;
                  }
                  t1.$indexSet(0, panelName, panel);
                }
                panel.changed = true;
              }
            }
          }
          this.jsverbs = null;
          this.sendStats$0();
        } else if (i === 1) {
          obj = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
          verbs = new P.JsArray([], [null]);
          obj.$indexSet(0, "atom", msg.getUint32$0(0));
          panelName = msg.getUTFString$0();
          n = msg.getUint16$0(0);
          verbsUsed = P.LinkedHashMap__makeEmpty();
          for (i = 0; i < n; ++i) {
            val = msg._webclient$_data.getUint16(msg._pos, true);
            t1 = msg._pos += 2;
            if (val === 65535) {
              val = msg._webclient$_data.getUint32(t1, true);
              msg._pos += 4;
              strlen = val;
            } else
              strlen = val;
            $name = strlen > 0 ? msg.getString$1(0, strlen) : "";
            val = msg._webclient$_data.getUint16(msg._pos, true);
            t1 = msg._pos += 2;
            if (val === 65535) {
              val = msg._webclient$_data.getUint32(t1, true);
              msg._pos += 4;
              strlen = val;
            } else
              strlen = val;
            arg = strlen > 0 ? msg.getString$1(0, strlen) : "";
            val = msg._webclient$_data.getUint16(msg._pos, true);
            t1 = msg._pos += 2;
            if (val === 65535) {
              val = msg._webclient$_data.getUint32(t1, true);
              msg._pos += 4;
              strlen = val;
            } else
              strlen = val;
            desc = strlen > 0 ? msg.getString$1(0, strlen) : "";
            if (verbsUsed.$index(0, $name) !== true) {
              t1 = P.LinkedHashMap__makeLiteral(["name", $name, "args", arg, "desc", desc]);
              verbs.callMethod$2("push", [P._wrapToDart(P.JsObject__convertDataTree(t1))]);
            }
            verbsUsed.$indexSet(0, $name, true);
          }
          obj.$indexSet(0, "verbs", verbs);
          $.$get$ByondJS_skin().output$2(panelName, obj);
        }
      },
      getSkinStyle$2: function(id, param) {
        var params, t1, res, control;
        params = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeEmpty());
        params.$indexSet(0, param, "");
        t1 = $.$get$ByondJS_skin();
        t1.winget$2(id, params);
        res = J.toString$0$(params.$index(0, param));
        if (res != null && res.length !== 0)
          return res;
        control = t1.find$1(0, id);
        if (control != null)
          return N.ByondJS_css([control.$index(0, "top"), param]);
        return;
      },
      garbageScan$0: function() {
        var t1, t2, funcs, c, afterFunc;
        t1 = {};
        t2 = this.currentTime;
        if (t2 < this.nextScanTime)
          return;
        if (this.scanningGarbage)
          return;
        this.scanningGarbage = true;
        this.nextScanTime = t2 + 300;
        t1.del = null;
        t1.garbage = null;
        t1.delStr = null;
        funcs = [];
        funcs.push(new N.ByondClient_garbageScan_closure(this, null, null, null, null));
        funcs.push(new N.ByondClient_garbageScan_closure0());
        funcs.push(new N.ByondClient_garbageScan_closure1(this));
        funcs.push(this.get$clientInfoGarbageScan());
        funcs.push(new N.ByondClient_garbageScan_closure2(t1, this, null));
        funcs.push(new N.ByondClient_garbageScan_closure3(t1, this, t2 - 150, null));
        funcs.push(new N.ByondClient_garbageScan_closure4(t1, this, null));
        t2 = new P._Future(0, $.Zone__current, null, [null]);
        c = new P._AsyncCompleter(t2, [null]);
        t1.fi = 0;
        t1.nextFunc = null;
        afterFunc = new N.ByondClient_garbageScan_closure5(t1, c);
        t1.nextFunc = new N.ByondClient_garbageScan_closure6(t1, funcs, c, afterFunc);
        afterFunc.call$1(P.Future_Future(funcs[0], null));
        t2.then$1(new N.ByondClient_garbageScan_closure7(this));
      },
      clientInfoGarbageScan$0: [function() {
        var t1, id, img, t2;
        for (t1 = this.pendingImages, t1 = t1.get$values(t1), t1 = new H.MappedIterator(null, J.get$iterator$ax(t1.__internal$_iterable), t1._f, [H.getTypeArgumentByIndex(t1, 0), H.getTypeArgumentByIndex(t1, 1)]), id = null, img = null; t1.moveNext$0();)
          for (t2 = J.get$iterator$ax(t1.__internal$_current); t2.moveNext$0();) {
            id = t2.get$current();
            img = this.infoMap.$index(0, id);
            if (img != null)
              img.garbageScan$0();
          }
      }, "call$0", "get$clientInfoGarbageScan", 0, 0, 3],
      ByondClient$0: function() {
        var newport, newport0, t1, t2, exception, t3, id;
        t1 = this.corsLoadOptions;
        t1.corsEnabled = true;
        P.print("Setting host and port");
        this.host = window.location.hostname;
        this.port = window.location.port;
        try {
          t2 = $.$get$context();
          if (N.ByondJS_toBool(t2.$index(0, "byond_local"), false)) {
            this.host = "127.0.0.1";
            newport = t2.$index(0, "byond_port");
            if (newport != null)
              this.port = H.S(newport);
          }
          if (N.ByondJS_toBool(t2.$index(0, "byond_host"), false)) {
            this.host = t2.$index(0, "byond_host");
            newport0 = t2.$index(0, "byond_port");
            if (newport0 != null)
              this.port = H.S(newport0);
          }
        } catch (exception) {
          H.unwrapException(exception);
        }
        P.print("Doing reset");
        this.reset$0(0);
        P.print("Begin render loop");
        t2 = new K.Juggler(null, null, 0, P.StreamController_StreamController$broadcast(null, null, false, P.num));
        t3 = new K._AnimatableLink(null, null);
        t2._firstAnimatableLink = t3;
        t2._lastAnimatableLink = t3;
        t2 = new A.RenderLoop(t2, H.setRuntimeTypeInfo([], [A.Stage]), false, 0, new R.EnterFrameEvent(0, "enterFrame", false, C.EventPhase_1, null, null, false, false), new R.ExitFrameEvent("exitFrame", false, C.EventPhase_1, null, null, false, false), new R.RenderEvent("render", false, C.EventPhase_1, null, null, false, false), false);
        t2.start$0(0);
        this.renderLoop = t2;
        this.loading = true;
        A.BitmapData_load("http://" + H.S(this.host) + ":" + H.S(this.port) + "/res/splashlogo.png", t1).then$1(new N.ByondClient_closure(this));
        P.print("Getting user ID");
        id = window.location.search;
        id = id != null && C.JSString_methods.startsWith$1(id, "?") ? J.substring$1$s(id, 1) : "";
        P.print("Opening Websocket");
        t1 = W.WebSocket_WebSocket("ws://" + H.S(this.host) + ":" + H.S(this.port) + "/" + id, null);
        this.socket = t1;
        t1.binaryType = "arraybuffer";
        t2 = W.Event;
        W._EventStreamSubscription$(t1, "open", new N.ByondClient_closure0(), false, t2);
        t1 = this.socket;
        t1.toString;
        W._EventStreamSubscription$(t1, "close", new N.ByondClient_closure1(this), false, W.CloseEvent);
        t1 = this.socket;
        t1.toString;
        W._EventStreamSubscription$(t1, "error", new N.ByondClient_closure2(), false, t2);
        t2 = this.socket;
        t2.toString;
        W._EventStreamSubscription$(t2, "message", new N.ByondClient_closure3(this), false, W.MessageEvent);
        P.print("Client creation complete");
      },
      static: {
        ByondClient$: function() {
          var t1 = P.String;
          t1 = new N.ByondClient(false, false, null, false, null, null, null, new A.BitmapDataLoadOptions(true, true, false, 2, false), false, false, false, false, null, "", false, false, [], null, P.HashMap_HashMap(null, null, null, t1, N.ByondMap), null, false, null, 0, 0, 0, 1, 32, 32, new U.Rectangle0(0, 0, 32, 32, [null]), 0, 0, 0, 0, -1, "", "0", null, null, null, null, null, null, [], null, null, null, null, null, 0, null, P.LinkedHashMap__makeLiteral(["webGL", true, "sharp", true]), false, P.HashMap_HashMap(null, null, null, t1, N.AtomColor), P.HashMap_HashMap(null, null, null, t1, N.AtomColorMatrix), new N.MaptextCache(P.LinkedHashMap__makeEmpty()), null, 0, 0, false, 300, null, new U.Rectangle0(0, 0, 0, 0, [P.$int]), 0, 0, 255, null, null, null, 100, 100, 1, null, [], P.LinkedHashMap__makeEmpty(), P.LinkedHashMap__makeEmpty(), null, P.LinkedHashMap__makeEmpty(), null, null, null, null, null, true, true);
          t1.ByondClient$0();
          return t1;
        }
      }
    },
    ByondClient_closure: {
      "^": "Closure:0;$this",
      call$1: [function(bitmapData) {
        var t1, canvas, skinElement, t2, t3, loadingBitmap, normalWidth, normalHeight, t4, progressWidth, t5, t6, t7, t8, t9, command;
        P.print("Begin loader setup");
        t1 = document;
        canvas = t1.querySelector("#loader");
        if (canvas == null) {
          canvas = W.CanvasElement_CanvasElement(null, null);
          canvas.id = "loader";
          skinElement = t1.querySelector("#skin");
          if (skinElement == null) {
            skinElement = W._ElementFactoryProvider_createElement_tag("div", null);
            t1.body.appendChild(skinElement);
          }
          skinElement.appendChild(canvas);
        }
        t1 = canvas.style;
        t1.width = "100%";
        t1 = canvas.style;
        t1.height = "100%";
        t1 = this.$this;
        t2 = A.Stage$(canvas, null, null, null);
        t1.loadingStage = t2;
        t3 = J.getInterceptor$x(bitmapData);
        t2._sourceWidth = V.ensureInt(J.round$0$n(t3.get$width(bitmapData)));
        t2._updateCanvasSize$0();
        t2 = t1.loadingStage;
        t3 = J.round$0$n(t3.get$height(bitmapData));
        t2.toString;
        t2._sourceHeight = V.ensureInt(t3);
        t2._updateCanvasSize$0();
        t2 = t1.loadingStage;
        t2._stageScaleMode = C.StageScaleMode_3;
        t2._updateCanvasSize$0();
        t1.renderLoop.addStage$1(t1.loadingStage);
        P.print("Adding items to loader");
        t2 = $.DisplayObject__nextID;
        $.DisplayObject__nextID = t2 + 1;
        loadingBitmap = new A.Bitmap(bitmapData, t2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
        t2 = bitmapData.width;
        loadingBitmap.set$scaleX(1);
        normalWidth = loadingBitmap.get$width(loadingBitmap);
        loadingBitmap.set$scaleX(normalWidth !== 0 ? t2 / normalWidth : 1);
        t3 = bitmapData.height;
        loadingBitmap.set$scaleY(1);
        normalHeight = loadingBitmap.get$height(loadingBitmap);
        loadingBitmap.set$scaleY(normalHeight !== 0 ? t3 / normalHeight : 1);
        t4 = t1.loadingStage;
        t4.addChildAt$2(loadingBitmap, t4._children.length);
        progressWidth = C.JSDouble_methods.toInt$0(0.7 * t2);
        t4 = [U.GraphicsCommand];
        t5 = H.setRuntimeTypeInfo([], t4);
        t6 = H.setRuntimeTypeInfo([], t4);
        t7 = new U.Graphics(t5, t6, null);
        t8 = $.DisplayObject__nextID;
        $.DisplayObject__nextID = t8 + 1;
        t9 = T.Matrix$fromIdentity();
        t2 = (t2 - progressWidth - 50) / 2;
        t3 -= 50;
        t1.loadingProgressRect = new U.Rectangle0(t2, t3, progressWidth, 20, [null]);
        command = U.GraphicsCommandRect$(t2, t3, progressWidth, 20);
        command._setGraphics$1(t7);
        t5.push(command);
        C.JSArray_methods.set$length(t6, 0);
        t7._drawing$_bounds = null;
        command = new U.GraphicsCommandStrokeColor(4294967295, 1, C.JointStyle_0, C.CapsStyle_0, null);
        command._setGraphics$1(t7);
        t5.push(command);
        C.JSArray_methods.set$length(t6, 0);
        t7._drawing$_bounds = null;
        t6 = t1.loadingStage;
        t6.addChildAt$2(new A.Shape(t7, t8, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, t9, true, null, null, null), t6._children.length);
        t6 = H.setRuntimeTypeInfo([], t4);
        t4 = H.setRuntimeTypeInfo([], t4);
        t9 = $.DisplayObject__nextID;
        $.DisplayObject__nextID = t9 + 1;
        t9 = new A.Shape(new U.Graphics(t6, t4, null), t9, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
        t1.loadingProgress = t9;
        t4 = t1.loadingStage;
        t4.addChildAt$2(t9, t4._children.length);
        t4 = H.setRuntimeTypeInfo([], [Y.TextLineMetrics]);
        t9 = $.DisplayObject__nextID;
        $.DisplayObject__nextID = t9 + 1;
        t9 = new Y.TextField("", null, "none", "dynamic", 0, 0, 0, 0, 0, 0, 0, false, false, false, false, false, "\u2022", 16777215, 0, 0, 100, 100, 0, 0, t4, 3, true, null, null, false, true, "auto", true, 0, t9, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
        t9.set$text(0, "");
        t9._defaultTextFormat = new Y.TextFormat("Arial", 12, 0, 0, 4278190080, null, 400, false, false, false, "left", 0, 0, 0, 0, 0, 0).clone$0(0);
        t9._text$_refreshPending |= 3;
        t9.on$1(0, "keyDown")._subscribe$3(t9.get$_onKeyDown(), false, 0);
        t9.on$1(0, "textInput")._subscribe$3(t9.get$_onTextInput(), false, 0);
        t9.on$1(0, "mouseDown")._subscribe$3(t9.get$_text$_onMouseDown(), false, 0);
        t1.loadingTextField = t9;
        t9._defaultTextFormat = new Y.TextFormat("Monospace", 20, 10526880, 0, 4278190080, null, 400, true, false, false, "left", 0, 0, 0, 0, 0, 0).clone$0(0);
        t9._text$_refreshPending |= 3;
        t2 = t1.loadingTextField;
        t2._text$_width = 50;
        t3 = t2._text$_refreshPending |= 3;
        t2._text$_height = 40;
        t2._text$_refreshPending = t3 | 3;
        t2.set$text(0, "  0%");
        t2 = t1.loadingTextField;
        t3 = t1.loadingProgressRect;
        t2.set$x(0, t3.left + t3.width + 5);
        t1.loadingTextField.set$y(0, t1.loadingProgressRect.top - 2);
        t3 = t1.loadingTextField;
        t3.mouseEnabled = false;
        t1 = t1.loadingStage;
        t1.addChildAt$2(t3, t1._children.length);
        P.print("Loader creation finished");
      }, null, null, 2, 0, null, 18, "call"]
    },
    ByondClient_closure0: {
      "^": "Closure:0;",
      call$1: function($event) {
        return P.print("Socket: open");
      }
    },
    ByondClient_closure1: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        var t1;
        P.print("Socket: close");
        t1 = this.$this.soundList;
        if (t1 != null)
          t1.stop$0(0);
      }
    },
    ByondClient_closure2: {
      "^": "Closure:0;",
      call$1: function($event) {
        return P.print("Socket: error");
      }
    },
    ByondClient_closure3: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this.processMessage$1(N.ByondMessage$fromBuffer(J.get$data$x($event)));
      }
    },
    ByondClient_reset_closure: {
      "^": "Closure:0;$this",
      call$1: [function(bitmapData) {
        this.$this.cursorMap.$indexSet(0, 3, N.AtomCursor$("drag", new N.AtomIcon(bitmapData, null, null, null, null, null, null, null, 32, 32, 0, null, null, null, false, null, null), new U.Point0(16, 8, [null])));
      }, null, null, 2, 0, null, 18, "call"]
    },
    ByondClient_reset_closure0: {
      "^": "Closure:0;$this",
      call$1: [function(bitmapData) {
        this.$this.cursorMap.$indexSet(0, 4, N.AtomCursor$("drop", new N.AtomIcon(bitmapData, null, null, null, null, null, null, null, 32, 32, 0, null, null, null, false, null, null), new U.Point0(12, 4, [null])));
      }, null, null, 2, 0, null, 18, "call"]
    },
    ByondClient_handlePostLoad_closure: {
      "^": "Closure:0;$this",
      call$1: [function(value) {
        return this.$this.handlePostLoad$0();
      }, null, null, 2, 0, null, 12, "call"]
    },
    ByondClient_handlePostLoad_closure0: {
      "^": "Closure:0;_box_0,$this,urlRx,allowed_attrs",
      call$1: [function(values) {
        var item, _, t1, base, t2, t3, t4, t5, t6, skin, _i, skinPiece, frag, t7, t8, t9, imgSrc, t10, template, $name, line, js, scriptSrc, t11, t12, exception, validator, pending;
        P.print("Beginning skin load");
        t1 = document;
        if (t1.querySelector("base") == null) {
          base = t1.createElement("base");
          base.setAttribute("href", "http://" + H.S($.me.host) + ":" + H.S($.me.port));
          t1.head.appendChild(base);
        }
        for (t2 = this.$this, t3 = t2.fullSkin, t4 = t3.length, t5 = [null], t6 = this.urlRx._nativeRegExp, skin = "", _i = 0; _i < t3.length; t3.length === t4 || (0, H.throwConcurrentModificationError)(t3), ++_i) {
          skinPiece = t3[_i];
          frag = t1.createDocumentFragment();
          t7 = W._ElementFactoryProvider_createElement_tag("div", null);
          frag.appendChild(t7);
          t8 = J.getInterceptor$x(t7);
          t8.setInnerHtml$2$treeSanitizer(t7, skinPiece, $.$get$ByondJS_sanitizer());
          item = null;
          for (t9 = new W._FrozenElementList(t7.querySelectorAll("img"), t5), t9 = new H.ListIterator(t9, t9.get$length(t9), 0, null); t9.moveNext$0();) {
            item = t9.__internal$_current;
            imgSrc = J.getAttribute$1$x(item, "src");
            if (typeof imgSrc === "string")
              t10 = !t6.test(imgSrc);
            else
              t10 = false;
            if (t10)
              J.setAttribute$2$x(item, "src", "http://" + H.S(t2.host) + ":" + H.S(t2.port) + "/" + H.S(imgSrc));
          }
          for (t9 = new W._FrozenElementList(t7.querySelectorAll("byondclass,byondprompt"), t5), t9 = new H.ListIterator(t9, t9.get$length(t9), 0, null); t9.moveNext$0();) {
            template = t9.__internal$_current;
            $name = template.getAttribute("name");
            if ($name == null || $name === "")
              continue;
            line = "Loading " + template.tagName.toLowerCase() + " " + H.S($name);
            t10 = $.printToZone;
            if (t10 == null)
              H.printString(line);
            else
              t10.call$1(line);
            for (t10 = new W._FrozenElementList(template.querySelectorAll("script"), t5), t10 = new H.ListIterator(t10, t10.get$length(t10), 0, null), js = ""; t10.moveNext$0();) {
              item = t10.__internal$_current;
              scriptSrc = J.getAttribute$1$x(item, "src");
              if (typeof scriptSrc === "string") {
                if (!t6.test(scriptSrc)) {
                  t11 = item;
                  scriptSrc = "http://" + H.S(t2.host) + ":" + H.S(t2.port) + "/" + scriptSrc;
                  J.setAttribute$2$x(t11, "src", scriptSrc);
                }
                line = "Loading script (async) " + scriptSrc;
                t11 = $.printToZone;
                if (t11 == null)
                  H.printString(line);
                else
                  t11.call$1(line);
                J.setAttribute$2$x(item, "byondskin", "1");
                t1.head.appendChild(item);
              } else {
                js = C.JSString_methods.$add(js, J.get$text$x(item));
                t11 = item;
                t12 = J.getInterceptor$x(t11);
                if (t12.get$parentNode(t11) != null) {
                  t12.get$parentNode(t11);
                  t12.get$parentNode(t11).removeChild(t11);
                }
              }
            }
            for (t10 = new W._FrozenElementList(template.querySelectorAll("style"), t5), t10 = new H.ListIterator(t10, t10.get$length(t10), 0, null); t10.moveNext$0();) {
              item = t10.__internal$_current;
              t7.appendChild(item);
            }
            $.$get$ByondJS_nospaces().walk$1(template);
            $.$get$ByondJS_skin().defineClass$4($name, js, J.get$innerHtml$x(template), template.tagName.toLowerCase() === "byondprompt");
            t10 = template.parentNode;
            if (t10 != null)
              t10.removeChild(template);
          }
          for (t9 = new W._FrozenElementList(t7.querySelectorAll("script"), t5), t9 = new H.ListIterator(t9, t9.get$length(t9), 0, null); t9.moveNext$0();) {
            item = t9.__internal$_current;
            scriptSrc = J.getAttribute$1$x(item, "src");
            if (typeof scriptSrc === "string")
              if (C.JSString_methods.endsWith$1(scriptSrc, "webclient.dart.js")) {
                t10 = item;
                t11 = J.getInterceptor$x(t10);
                if (t11.get$parentNode(t10) != null) {
                  t11.get$parentNode(t10);
                  t11.get$parentNode(t10).removeChild(t10);
                }
              } else {
                if (!t6.test(scriptSrc)) {
                  t10 = item;
                  scriptSrc = "http://" + H.S(t2.host) + ":" + H.S(t2.port) + "/" + scriptSrc;
                  J.setAttribute$2$x(t10, "src", scriptSrc);
                }
                line = "Loading script (async) " + scriptSrc;
                t10 = $.printToZone;
                if (t10 == null)
                  H.printString(line);
                else
                  t10.call$1(line);
                J.setAttribute$2$x(item, "byondskin", "1");
                t1.head.appendChild(item);
              }
            else {
              line = "Loading inline script (async): " + C.JsonCodec_null_null.encode$1(J.get$text$x(item).length >= 100 ? J.substring$2$s(J.get$text$x(item), 0, 100) + "..." : J.get$text$x(item));
              t10 = $.printToZone;
              if (t10 == null)
                H.printString(line);
              else
                t10.call$1(line);
              try {
                $.$get$context().callMethod$2("eval", [J.get$text$x(item)]);
              } catch (exception) {
                t10 = H.unwrapException(exception);
                _ = t10;
                line = H.S(_);
                t10 = $.printToZone;
                if (t10 == null)
                  H.printString(line);
                else
                  t10.call$1(line);
                line = "Error was in script: " + C.JsonCodec_null_null.encode$1(J.get$text$x(item).length >= 100 ? J.substring$2$s(J.get$text$x(item), 0, 100) + "..." : J.get$text$x(item));
                t10 = $.printToZone;
                if (t10 == null)
                  H.printString(line);
                else
                  t10.call$1(line);
              }
              t10 = item;
              t11 = J.getInterceptor$x(t10);
              if (t11.get$parentNode(t10) != null) {
                t11.get$parentNode(t10);
                t11.get$parentNode(t10).removeChild(t10);
              }
            }
          }
          for (t9 = new W._FrozenElementList(t7.querySelectorAll("style"), t5), t9 = new H.ListIterator(t9, t9.get$length(t9), 0, null); t9.moveNext$0();) {
            item = t9.__internal$_current;
            t10 = $.printToZone;
            if (t10 == null)
              H.printString("Loading styles");
            else
              t10.call$1("Loading styles");
            J.setAttribute$2$x(item, "byondskin", "1");
            t1.head.appendChild(item);
          }
          $.$get$ByondJS_nospaces().walk$1(t7);
          skin = C.JSString_methods.$add(skin, t8.get$innerHtml(t7));
          t8 = t7.parentNode;
          if (t8 != null)
            t8.removeChild(t7);
        }
        P.print("Generating default styles");
        N.ByondJS_generateStyles();
        t1 = H.setRuntimeTypeInfo([], [W.NodeValidator]);
        validator = new W.NodeValidatorBuilder(t1);
        t1.push(W._Html5NodeValidator$(null));
        t1.push(W._TemplatingNodeValidator$());
        t3 = this.allowed_attrs;
        validator.allowCustomElement$4$attributes$uriAttributes$uriPolicy("div", t3, null, null);
        validator.allowCustomElement$4$attributes$uriAttributes$uriPolicy("canvas", t3, null, null);
        t1.push(new N.DataAttributeValidator());
        P.print("Filling skin HTML");
        t1 = this._box_0;
        t2.oldSkinHtml = J.get$innerHtml$x(t1.div);
        J.setInnerHtml$2$validator$x(t1.div, skin, validator);
        P.print("Creating skin controls");
        $.$get$ByondJS_skin().load$1(0, t1.div);
        P.print("Activating map");
        t2.createStage$0();
        t2.skinLoaded = true;
        pending = t2.pendingMessages;
        t2.pendingMessages = [];
        for (t1 = pending.length, _i = 0; _i < pending.length; pending.length === t1 || (0, H.throwConcurrentModificationError)(pending), ++_i)
          t2.processMessage$1(pending[_i]);
        P.print("Ready to begin play");
        if (t2.needs_key)
          t2.activateKey$1(t2.webid);
        t2.resources_received = true;
        t1 = t2.loginComplete;
        if (t1 != null) {
          t1.future.then$1(new N.ByondClient_handlePostLoad__closure(t2));
          t2.checkLoginCompletion$0();
        } else {
          try {
            J.postMessage$2$x(W._convertNativeToDart_Window(window.parent), "ready", "*");
          } catch (exception) {
            H.unwrapException(exception);
          }
          t2.loggedIn = true;
          N.ByondMessage$(183).send$1(0, t2.socket);
          t2.activity = true;
          t2.postloading = false;
        }
      }, null, null, 2, 0, null, 66, "call"]
    },
    ByondClient_handlePostLoad__closure: {
      "^": "Closure:0;$this",
      call$1: [function(_) {
        var exception, t1;
        try {
          J.postMessage$2$x(W._convertNativeToDart_Window(window.parent), "ready", "*");
        } catch (exception) {
          H.unwrapException(exception);
        }
        t1 = this.$this;
        t1.loggedIn = true;
        N.ByondMessage$(183).send$1(0, t1.socket);
        t1.activity = true;
        t1.postloading = false;
      }, null, null, 2, 0, null, 5, "call"]
    },
    ByondClient_sendCommandMessage_closure: {
      "^": "Closure:0;$this,command",
      call$1: [function(_) {
        this.$this.sendCommandMessage$1(this.command);
      }, null, null, 2, 0, null, 5, "call"]
    },
    ByondClient_sendExpandMessage_closure: {
      "^": "Closure:0;$this,command,id",
      call$1: [function(_) {
        this.$this.sendExpandMessage$2(this.command, this.id);
      }, null, null, 2, 0, null, 5, "call"]
    },
    ByondClient_sendTopicMessage_closure: {
      "^": "Closure:0;$this,topic",
      call$1: [function(_) {
        this.$this.sendTopicMessage$1(this.topic);
      }, null, null, 2, 0, null, 5, "call"]
    },
    ByondClient_getIconInfo_closure: {
      "^": "Closure:0;",
      call$1: function(_) {
        return 65535;
      }
    },
    ByondClient_getAtomInfo_closure: {
      "^": "Closure:0;",
      call$1: function(_) {
        return 65535;
      }
    },
    ByondClient_getAtomInfo_closure0: {
      "^": "Closure:7;_box_0",
      call$1: function(m) {
        var t1, t2;
        t1 = m.info.id;
        t2 = this._box_0.id;
        return (t1 == null ? t2 == null : t1 === t2) && (m.flags & 2) === 0;
      }
    },
    ByondClient_waitForAtomIcon_closure: {
      "^": "Closure:0;id,c",
      call$1: [function(_) {
        this.c.complete$1(0, this.id);
      }, null, null, 2, 0, null, 5, "call"]
    },
    ByondClient_getAtomVerbs_closure: {
      "^": "Closure:0;",
      call$1: function(_) {
        return;
      }
    },
    ByondClient_mapConfig_closure: {
      "^": "Closure:0;",
      call$1: function(s) {
        return 0;
      }
    },
    ByondClient_updateLoader_closure: {
      "^": "Closure:1;$this",
      call$0: function() {
        var t1, exception, percent, str, t2, t3, command;
        t1 = this.$this;
        if ((t1.reloading || t1.loading) && t1.totBytes > 0) {
          try {
            J.postMessage$2$x(W._convertNativeToDart_Window(window.parent), "progress:" + t1.curBytes + "/" + t1.totBytes, "*");
          } catch (exception) {
            H.unwrapException(exception);
          }
          if (t1.loadingStage != null) {
            percent = C.JSInt_methods.$tdiv(100 * t1.curBytes, t1.totBytes);
            if (percent === 100)
              str = "100%";
            else
              str = percent >= 10 ? " " + percent + "%" : "  " + percent + "%";
            t1.loadingTextField.set$text(0, str);
            t2 = t1.loadingProgress.graphics;
            t3 = t1.loadingProgressRect;
            command = U.GraphicsCommandRect$(t3.left, t3.top, C.JSNumber_methods._tdivFast$1(percent * t3.width, 100), t3.height);
            command._setGraphics$1(t2);
            t2._originalCommands.push(command);
            C.JSArray_methods.set$length(t2._compiledCommands, 0);
            t2._drawing$_bounds = null;
            t2 = t1.loadingProgress.graphics;
            command = new U.GraphicsCommandFillColor(4294901760, null);
            command._setGraphics$1(t2);
            t2._originalCommands.push(command);
            C.JSArray_methods.set$length(t2._compiledCommands, 0);
            t2._drawing$_bounds = null;
          }
          if (t1.curBytes >= t1.totBytes)
            P.Timer_Timer(P.Duration$(0, 0, 0, 0, 0, 1), t1.get$handlePostLoad());
        }
        t1._loaderTimer = null;
      }
    },
    ByondClient_processPromptMessage_closure: {
      "^": "Closure:0;_box_0,$this",
      call$1: [function(choice) {
        var msg, t1, t2;
        msg = N.ByondMessage$(214);
        t1 = this._box_0.id;
        msg._elems.push(new N.MessageElem(t1, msg.get$_putInt32()));
        msg._pos += 4;
        t1 = choice != null ? choice : "";
        t2 = t1.length;
        msg._elems.push(new N.MessageElem(t1, msg.get$_putString()));
        msg._pos += t2 + 1;
        t2 = this.$this;
        msg.send$1(0, t2.socket);
        t2.activity = true;
      }, null, null, 2, 0, null, 33, "call"]
    },
    ByondClient_processPromptMessage_closure0: {
      "^": "Closure:1;_box_0,$this",
      call$0: [function() {
        var msg, t1;
        msg = N.ByondMessage$(214);
        t1 = this._box_0.id;
        msg._elems.push(new N.MessageElem(t1, msg.get$_putInt32()));
        msg._pos += 4;
        msg._elems.push(new N.MessageElem("", msg.get$_putString()));
        ++msg._pos;
        t1 = this.$this;
        msg.send$1(0, t1.socket);
        t1.activity = true;
      }, null, null, 0, 0, null, "call"]
    },
    ByondClient_processAlertMessage_closure: {
      "^": "Closure:0;$this,id",
      call$1: [function(choice) {
        var msg, t1, t2;
        P.print("Replying");
        msg = N.ByondMessage$(214);
        msg._elems.push(new N.MessageElem(this.id, msg.get$_putInt32()));
        msg._pos += 4;
        t1 = choice != null ? choice : "";
        t2 = t1.length;
        msg._elems.push(new N.MessageElem(t1, msg.get$_putString()));
        msg._pos += t2 + 1;
        t2 = this.$this;
        msg.send$1(0, t2.socket);
        t2.activity = true;
        P.print("Message sent");
      }, null, null, 2, 0, null, 33, "call"]
    },
    ByondClient_processAlertMessage_closure0: {
      "^": "Closure:1;$this,id",
      call$0: [function() {
        var msg, t1;
        msg = N.ByondMessage$(214);
        msg._elems.push(new N.MessageElem(this.id, msg.get$_putInt32()));
        msg._pos += 4;
        msg._elems.push(new N.MessageElem("", msg.get$_putString()));
        ++msg._pos;
        t1 = this.$this;
        msg.send$1(0, t1.socket);
        t1.activity = true;
      }, null, null, 0, 0, null, "call"]
    },
    ByondClient_sendStats_closure: {
      "^": "Closure:53;",
      call$1: [function(sp) {
        var c, t1, t2, t3;
        c = sp.changed;
        sp.changed = false;
        t1 = sp._webclient$_name;
        t2 = sp._rows;
        t3 = [];
        C.JSArray_methods.addAll$1(t3, C.JSArray_methods.map$1(sp._items, P.js___convertToJS$closure()));
        return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["name", t1, "rows", t2, "cols", 3, "changed", c, "items", new P.JsArray(t3, [null])]));
      }, null, null, 2, 0, null, 68, "call"]
    },
    ByondClient_sendStats_closure0: {
      "^": "Closure:26;",
      call$1: function(panel) {
        return panel.get$available(panel);
      }
    },
    ByondClient_sendStats_closure1: {
      "^": "Closure:38;",
      call$2: function(a, b) {
        return J.compareTo$1$ns(a._webclient$_name, b._webclient$_name);
      }
    },
    ByondClient_sendStats_closure2: {
      "^": "Closure:26;",
      call$1: [function(panel) {
        return panel.get$js();
      }, null, null, 2, 0, null, 69, "call"]
    },
    ByondClient_garbageScan_closure: {
      "^": "Closure:1;$this,atom,appearance,color,colorMatrix",
      call$0: [function() {
        var atom, appearance, color, colorMatrix, t1, t2, t3, t4;
        for (t1 = this.$this, t2 = t1.infoMap, t2 = t2.get$values(t2), t2 = new H.MappedIterator(null, J.get$iterator$ax(t2.__internal$_iterable), t2._f, [H.getTypeArgumentByIndex(t2, 0), H.getTypeArgumentByIndex(t2, 1)]), t3 = this.atom, t4 = t3 != null; t2.moveNext$0();) {
          atom = t2.__internal$_current;
          if (t4)
            t3.inUse = false;
        }
        for (t2 = t1.appearanceMap, t2 = t2.get$values(t2), t2 = new H.MappedIterator(null, J.get$iterator$ax(t2.__internal$_iterable), t2._f, [H.getTypeArgumentByIndex(t2, 0), H.getTypeArgumentByIndex(t2, 1)]), t3 = this.appearance, t4 = t3 != null; t2.moveNext$0();) {
          appearance = t2.__internal$_current;
          if (t4)
            t3.inUse = false;
        }
        for (t2 = t1.canonicalColorMap, t2 = t2.get$values(t2), t2 = new H.MappedIterator(null, J.get$iterator$ax(t2.__internal$_iterable), t2._f, [H.getTypeArgumentByIndex(t2, 0), H.getTypeArgumentByIndex(t2, 1)]), t3 = this.color, t4 = t3 != null; t2.moveNext$0();) {
          color = t2.__internal$_current;
          if (t4)
            t3.inUse = false;
        }
        for (t1 = t1.canonicalColorMatrixMap, t1 = t1.get$values(t1), t1 = new H.MappedIterator(null, J.get$iterator$ax(t1.__internal$_iterable), t1._f, [H.getTypeArgumentByIndex(t1, 0), H.getTypeArgumentByIndex(t1, 1)]), t2 = this.colorMatrix, t3 = t2 != null; t1.moveNext$0();) {
          colorMatrix = t1.__internal$_current;
          if (t3)
            t2.inUse = false;
        }
      }, null, null, 0, 0, null, "call"]
    },
    ByondClient_garbageScan_closure0: {
      "^": "Closure:1;",
      call$0: [function() {
        return N.ByondJS_garbageScan();
      }, null, null, 0, 0, null, "call"]
    },
    ByondClient_garbageScan_closure1: {
      "^": "Closure:1;$this",
      call$0: [function() {
        return this.$this.mapInfo.garbageScan$0();
      }, null, null, 0, 0, null, "call"]
    },
    ByondClient_garbageScan_closure2: {
      "^": "Closure:1;_box_0,$this,id",
      call$0: [function() {
        var id, t1, t2, t3, t4, _i;
        t1 = this._box_0;
        t1.del = [];
        t2 = this.$this;
        t2.infoMap.forEach$1(0, new N.ByondClient_garbageScan__closure4(t1));
        for (t1 = t1.del, t3 = t1.length, t4 = this.id, _i = 0; _i < t1.length; t1.length === t3 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          id = t1[_i];
          t2.infoMap.remove$1(0, t4);
        }
      }, null, null, 0, 0, null, "call"]
    },
    ByondClient_garbageScan__closure4: {
      "^": "Closure:36;_box_0",
      call$2: function(id, atom) {
        if (atom == null) {
          this._box_0.del.push(id);
          return;
        }
        if (atom.inUse)
          return;
        if (atom.garbage) {
          atom.prepareTick$1(false);
          this._box_0.del.push(id);
        } else
          atom.garbage = true;
      }
    },
    ByondClient_garbageScan_closure3: {
      "^": "Closure:1;_box_0,$this,recent,id",
      call$0: [function() {
        var id, t1, t2, t3, t4, t5, _i, msg, t6;
        t1 = this._box_0;
        t1.del = [];
        t1.garbage = [];
        t2 = this.$this;
        t2.appearanceMap.forEach$1(0, new N.ByondClient_garbageScan__closure3(t1, this.recent));
        for (t3 = t1.del, t4 = t3.length, t5 = this.id, _i = 0; _i < t3.length; t3.length === t4 || (0, H.throwConcurrentModificationError)(t3), ++_i) {
          id = t3[_i];
          t2.appearanceMap.remove$1(0, t5);
        }
        if (t1.garbage.length > 0) {
          msg = N.ByondMessage$(115);
          t3 = t1.garbage.length;
          msg._elems.push(new N.MessageElem(t3, msg.get$_putUint16()));
          msg._pos += 2;
          for (t1 = t1.garbage, t3 = t1.length, t4 = msg.get$_putUint16as32(), _i = 0; _i < t1.length; t1.length === t3 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            id = t1[_i];
            t6 = t5 < 32768 ? 2 : 4;
            msg._elems.push(new N.MessageElem(t5, t4));
            msg._pos += t6;
          }
          msg.send$1(0, t2.socket);
          t2.activity = true;
        }
      }, null, null, 0, 0, null, "call"]
    },
    ByondClient_garbageScan__closure3: {
      "^": "Closure:40;_box_0,recent",
      call$2: function(id, appearance) {
        var t1;
        if (appearance.inUse || appearance.lastUsed > this.recent)
          return;
        t1 = this._box_0;
        if (appearance.garbage)
          t1.del.push(id);
        else {
          t1.garbage.push(id);
          appearance.garbage = true;
        }
      }
    },
    ByondClient_garbageScan_closure4: {
      "^": "Closure:1;_box_0,$this,strId",
      call$0: [function() {
        var strId, t1, t2, t3, t4, t5, _i;
        t1 = this._box_0;
        t1.delStr = [];
        t2 = this.$this;
        t2.canonicalColorMatrixMap.forEach$1(0, new N.ByondClient_garbageScan__closure1(t1));
        for (t3 = t1.delStr, t4 = t3.length, t5 = this.strId, _i = 0; _i < t3.length; t3.length === t4 || (0, H.throwConcurrentModificationError)(t3), ++_i) {
          strId = t3[_i];
          t2.canonicalColorMatrixMap.remove$1(0, t5);
        }
        t1.delStr = [];
        t2.canonicalColorMap.forEach$1(0, new N.ByondClient_garbageScan__closure2(t1));
        for (t1 = t1.delStr, t3 = t1.length, _i = 0; _i < t1.length; t1.length === t3 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          strId = t1[_i];
          t2.canonicalColorMap.remove$1(0, t5);
        }
      }, null, null, 0, 0, null, "call"]
    },
    ByondClient_garbageScan__closure1: {
      "^": "Closure:41;_box_0",
      call$2: function(id, colorMatrix) {
        if (!colorMatrix.inUse)
          this._box_0.delStr.push(id);
      }
    },
    ByondClient_garbageScan__closure2: {
      "^": "Closure:42;_box_0",
      call$2: function(id, color) {
        if (!color.inUse)
          this._box_0.delStr.push(id);
      }
    },
    ByondClient_garbageScan_closure5: {
      "^": "Closure:43;_box_0,c",
      call$1: function(f) {
        f.then$1(new N.ByondClient_garbageScan__closure(this._box_0)).catchError$1(new N.ByondClient_garbageScan__closure0(this.c));
      }
    },
    ByondClient_garbageScan__closure: {
      "^": "Closure:0;_box_0",
      call$1: [function(_) {
        return this._box_0.nextFunc.call$0();
      }, null, null, 2, 0, null, 5, "call"]
    },
    ByondClient_garbageScan__closure0: {
      "^": "Closure:0;c",
      call$1: [function(_) {
        P.print("Garbage error: " + H.S(J.toString$0$(_)));
        this.c.complete$0(0);
      }, null, null, 2, 0, null, 5, "call"]
    },
    ByondClient_garbageScan_closure6: {
      "^": "Closure:1;_box_0,funcs,c,afterFunc",
      call$0: function() {
        var t1, t2;
        t1 = this._box_0;
        t2 = this.funcs;
        if (++t1.fi >= t2.length) {
          this.c.complete$0(0);
          return;
        }
        this.afterFunc.call$1(P.Future_Future$delayed(P.Duration$(0, 0, 0, 500, 0, 0), t2[t1.fi], null));
      }
    },
    ByondClient_garbageScan_closure7: {
      "^": "Closure:0;$this",
      call$1: [function(_) {
        this.$this.scanningGarbage = false;
      }, null, null, 2, 0, null, 5, "call"]
    },
    HtmlField: {
      "^": "RichTextField;_stagexl_richtextfield$_text,_rawText,_textFormats,presets,_autoSize,_valign,_wordWrap,_stagexl_richtextfield$_multiline,_stagexl_richtextfield$_background,_stagexl_richtextfield$_border,_parse,_stagexl_richtextfield$_backgroundColor,_stagexl_richtextfield$_borderColor,_stagexl_richtextfield$_maxChars,_stagexl_richtextfield$_width,_stagexl_richtextfield$_height,lineSpacing,_textWidth,_textHeight,_textLineMetrics,parser,_refreshPending,_cacheAsBitmap,_cacheAsBitmapCanvas,_renderTexture,doubleClickEnabled,mouseEnabled,mouseCursor,tabEnabled,tabIndex,displayObjectID,_display$_x,_display$_y,_pivotX,_pivotY,_scaleX,_scaleY,_skewX,_skewY,_rotation,_alpha,_visible,_off,_mask,_blendMode,_filters,_cache,_display$_name,_parent,_transformationMatrix,_transformationMatrixRefresh,userData,_pixelRatio,_eventStreams",
      _getText$2: function(node, text) {
        var t1, t2, _i;
        t1 = J.getInterceptor$x(node);
        if (t1.get$nodeType(node) === 3)
          text = C.JSString_methods.$add(text, t1.get$text(node));
        for (t1 = t1.get$childNodes(node), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
          text = this._getText$2(t1[_i], text);
        return text;
      },
      _getText$1: function(node) {
        return this._getText$2(node, "");
      },
      _formatText$3: function(node, fmt, idx) {
        var t1, $name, value, style, t2, idx0, _i;
        t1 = J.getInterceptor$x(node);
        if (t1.get$nodeType(node) === 1) {
          $name = t1.get$nodeName(node).toLowerCase();
          if ($name === "b")
            fmt.bold = true;
          else if ($name === "i")
            fmt.italic = true;
          else if ($name === "u")
            fmt.underline = true;
          else if ($name === "strike")
            fmt.strikethrough = true;
          else if ($name === "font") {
            value = t1.get$attributes(node)._html$_element.getAttribute("face");
            if (value != null)
              fmt.font = value;
            value = t1.get$attributes(node)._html$_element.getAttribute("color");
            if (value != null)
              fmt.color = this._parseColor$2(value, fmt.color);
            value = t1.get$attributes(node)._html$_element.getAttribute("size");
            if (value != null)
              fmt.size = this._parseSize$2(value, fmt.size);
          }
          value = t1.get$attributes(node)._html$_element.getAttribute("align");
          if (value != null)
            fmt.align = value;
          value = t1.get$attributes(node)._html$_element.getAttribute("valign");
          if (value != null) {
            this._valign = value;
            this._refreshPending |= 3;
          }
          value = t1.get$attributes(node)._html$_element.getAttribute("style");
          if (value != null) {
            style = this._parseStyle$1(value);
            value = style.$index(0, "font-family");
            if (value != null)
              fmt.font = value;
            value = style.$index(0, "color");
            if (value != null)
              fmt.color = this._parseColor$2(value, fmt.color);
            value = style.$index(0, "font-size");
            if (value != null)
              fmt.size = this._parseSize$2(value, fmt.size);
            value = style.$index(0, "text-align");
            if (value != null)
              fmt.align = value;
            value = style.$index(0, "vertical-align");
            if (value != null) {
              this._valign = value;
              this._refreshPending |= 3;
            }
          }
        } else if (t1.get$nodeType(node) === 3) {
          t2 = fmt.size;
          if (t2 !== J.round$0$n(t2)) {
            fmt = fmt.clone$0(0);
            fmt.size = J.round$0$n(fmt.size);
          }
          idx0 = idx + t1.get$text(node).length;
          this.setFormat$3(fmt, idx, idx0 - 1);
          idx = idx0;
        }
        for (t1 = t1.get$childNodes(node), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
          idx = this._formatText$3(t1[_i], fmt.clone$0(0), idx);
        return idx;
      },
      _formatText$2: function(node, fmt) {
        return this._formatText$3(node, fmt, 0);
      },
      _parseStyle$1: function(style) {
        var map, $L, t1, _i, L2;
        map = P.LinkedHashMap__makeEmpty();
        $L = style.split(";");
        for (t1 = $L.length, _i = 0; _i < $L.length; $L.length === t1 || (0, H.throwConcurrentModificationError)($L), ++_i) {
          L2 = J.split$1$s($L[_i], ":");
          if (L2.length === 2)
            map.$indexSet(0, J.toLowerCase$0$s(J.trim$0$s(L2[0])), L2[1]);
        }
        return map;
      },
      _parseColor$2: function(color, fallback) {
        var res;
        if (typeof color === "string")
          return color;
        if (color[0] === "#") {
          P.RangeError_checkValueInInterval(0, 0, color.length, "startIndex", null);
          res = H.Primitives_parseInt(H.stringReplaceFirstUnchecked(color, "#", "0x", 0), null, null);
          if (typeof res === "number" && Math.floor(res) === res)
            return res;
        }
        return fallback;
      },
      _parseSize$2: function(size, fallback) {
        var valpart, val, t1;
        valpart = P.RegExp_RegExp("^[0-9\\.]+", true, false).stringMatch$1(size);
        if (valpart == null)
          return fallback;
        val = P.num_parse(valpart, null);
        t1 = valpart.length;
        if (t1 < size.length)
          if (C.JSString_methods.trim$0(J.substring$1$s(size, t1)) === "%")
            return C.JSNumber_methods.round$0(this._textFormats[0].size * val) / 100;
        val *= N.ByondJS_toPx("pt");
        return val > 0 ? val : fallback;
      },
      HtmlField$2: function(str, map) {
        var t1, validator, t2, t3, $document, value;
        this._parse = false;
        t1 = this._refreshPending |= 3;
        this._valign = "bottom";
        this._refreshPending = t1 | 3;
        this.lineSpacing = 1.2;
        t1 = H.setRuntimeTypeInfo([], [W.NodeValidator]);
        validator = new W.NodeValidatorBuilder(t1);
        t1.push(W._Html5NodeValidator$(null));
        t1.push(W._TemplatingNodeValidator$());
        validator.allowCustomElement$4$attributes$uriAttributes$uriPolicy("p", ["align", "valign", "style"], null, null);
        validator.allowCustomElement$4$attributes$uriAttributes$uriPolicy("span", ["align", "valign", "style"], null, null);
        validator.allowCustomElement$4$attributes$uriAttributes$uriPolicy("div", ["align", "valign", "style"], null, null);
        t1.push(W._SimpleNodeValidator$(null, ["*::style"], null, null));
        t1 = document;
        t2 = t1.body;
        t2 = J.get$innerHtml$x((t2 && C.BodyElement_methods).createFragment$3$treeSanitizer$validator(t2, str, null, validator));
        t3 = $.$get$ByondJS_maptextSanitizer();
        t1 = t1.body;
        $document = (t1 && C.BodyElement_methods).createFragment$3$treeSanitizer$validator(t1, t2, t3, null);
        this.set$text(0, this._getText$1($document));
        t3 = this._textFormats[0];
        t3.bold = false;
        t3.italic = false;
        t3.underline = false;
        t3.strikethrough = false;
        value = $.me.getSkinStyle$2(":map", "font-style");
        if (value != null)
          t1 = value.length !== 0;
        else
          t1 = false;
        if (t1) {
          t1 = J.split$1$s(value, P.RegExp_RegExp("[\\s,]", true, false));
          map = P.HashMap_HashMap(null, null, null, null, null);
          P.Maps__fillMapWithMappedIterable(map, t1, null, new N.HtmlField_closure());
          if (J.$eq$(map.$index(0, "bold"), true))
            this._textFormats[0].bold = true;
          if (J.$eq$(map.$index(0, "italic"), true))
            this._textFormats[0].italic = true;
          if (J.$eq$(map.$index(0, "underline"), true))
            this._textFormats[0].underline = true;
          if (J.$eq$(map.$index(0, "strike"), true))
            this._textFormats[0].strikethrough = true;
        }
        value = $.me.getSkinStyle$2(":map", "font-family");
        if (value != null)
          this._textFormats[0].font = value;
        value = $.me.getSkinStyle$2(":map", "font-size");
        if (value != null) {
          t1 = this._textFormats[0];
          t1.size = this._parseSize$2(value, t1.size);
        }
        value = $.me.getSkinStyle$2(":map", "color");
        if (value != null) {
          t1 = this._textFormats[0];
          t1.color = this._parseColor$2(value, t1.color);
        }
        value = $.me.getSkinStyle$2(":map", "text-align");
        if (value != null)
          this._textFormats[0].align = value;
        value = $.me.getSkinStyle$2(":map", "vertical-align");
        if (value != null) {
          this._valign = value;
          this._refreshPending |= 3;
        }
        this._formatText$2($document, this._textFormats[0]);
      },
      static: {
        HtmlField$: function(str, map) {
          var t1, t2, t3;
          t1 = P.LinkedHashMap__makeEmpty();
          t2 = H.setRuntimeTypeInfo([], [A.RichTextLineMetrics]);
          t3 = $.DisplayObject__nextID;
          $.DisplayObject__nextID = t3 + 1;
          t3 = new N.HtmlField("", "", [new A.RichTextFormat("Arial", 12, 0, 0, 4278190080, null, 0, -1, false, false, false, false, false, "left", 0, 0, 0, 0, 0, 0)], t1, "none", "top", false, false, false, false, true, 16777215, 0, 0, 100, 100, 1, 0, 0, t2, null, 3, true, null, null, false, true, "auto", true, 0, t3, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
          t3.RichTextField$3("", null, true);
          t3.HtmlField$2(str, map);
          return t3;
        }
      }
    },
    HtmlField_closure: {
      "^": "Closure:0;",
      call$1: function(e) {
        return true;
      }
    },
    AtomIcon: {
      "^": "Object;_bitmapDataSheet,_bitmapData,hotspot_x,hotspot_y,isSolid,isEmpty>,_rect,_bounds,_width,_height,_frame,_webclient$_index,_crc,_text,_isComplete,_waiting,_visbounds",
      set$bitmapDataSheet: function(bitmapDataSheet) {
        var t1;
        this._bitmapDataSheet = bitmapDataSheet;
        this._isComplete = true;
        t1 = this._waiting;
        if (t1 != null) {
          this._waiting = null;
          t1.complete$1(0, this.get$bitmapData());
        }
      },
      get$bounds: function() {
        if (!this.sync$0())
          return;
        return this._bounds;
      },
      get$bitmapData: function() {
        if (!this.sync$0())
          return;
        return this._bitmapData;
      },
      get$width: function(_) {
        return this._width;
      },
      get$height: function(_) {
        return this._height;
      },
      get$visbounds: function() {
        var t1 = this._visbounds;
        if (t1 == null) {
          t1 = N.ClientRect$(this._width, this._height);
          this._visbounds = t1;
        }
        return t1;
      },
      get$text: function(_) {
        if (!this.sync$0())
          return;
        return this._text;
      },
      sync$0: function() {
        var t1, t2, t3, t4, hash, m, rows, t5, cols, t6, row, col;
        if (this._rect != null)
          return true;
        t1 = this._bitmapDataSheet;
        if (t1 == null) {
          t1 = this._text;
          if (t1 == null)
            return false;
          t2 = this._width;
          t3 = this._height;
          this._rect = new U.Rectangle0(0, 0, t2, t3, [null]);
          t4 = $.me.maptextCache;
          hash = N.MaptextCacheItem_hashFor(t1, t2, t3, null);
          t4 = t4.items;
          m = t4.$index(0, hash);
          if (m == null) {
            m = new N.MaptextCacheItem(t1, null, t2, t3, null, true, 0, [], null);
            t4.$indexSet(0, hash, m);
          }
          m.icons.push(this);
          t1 = m.get$bitmapData();
          this._bitmapDataSheet = t1;
        }
        t2 = this._height;
        if (t2 === 0)
          return false;
        t3 = t1.height;
        rows = C.JSNumber_methods.$tdiv(t3, t2);
        t4 = t1.width;
        t5 = this._width;
        cols = C.JSNumber_methods.$tdiv(t4, t5);
        t6 = this._frame;
        row = C.JSInt_methods.$tdiv(t6, cols);
        col = C.JSInt_methods.$mod(t6, cols);
        if (row >= rows || col >= cols)
          return false;
        t6 = new U.Rectangle0(t5 * col, t2 * row, t5, t2, [null]);
        this._rect = t6;
        if (t5 === t4 && t2 === t3)
          this._bitmapData = t1;
        else
          this._bitmapData = A.BitmapData$fromRenderTextureQuad(t1.renderTextureQuad.cut$1(t6));
        t1 = this._rect;
        this._bounds = new U.Rectangle0(t1.left, t1.top, t1.width, t1.height, [H.getTypeArgumentByIndex(t1, 0)]);
        return true;
      },
      hitTest$2: function(x, y) {
        var t1;
        if (this.isEmpty === true || x < 0 || x >= this._width || y < 0 || y >= this._height)
          return false;
        if (this.isSolid === true)
          return true;
        if (this.get$bitmapData() != null) {
          t1 = this.get$bitmapData();
          t1.toString;
          t1 = (A.BitmapDataUpdateBatch$(t1).getPixel32$2(x, y) & 4278190080) >>> 0 !== 0;
        } else
          t1 = false;
        return t1;
      }
    },
    AtomCursor: {
      "^": "Object;id',icon,hotspot,isRegistered",
      AtomCursor$3: function(id, icon, hotspot) {
        var t1, t2;
        t1 = this.icon;
        if (t1 != null) {
          t2 = this.hotspot;
          if (t2 == null)
            this.hotspot = new U.Point0(t1._width / 2 | 0, t1._height / 2 | 0, [null]);
          else {
            if (J.$lt$n(t2.x, 0) || J.$ge$n(this.hotspot.x, this.icon._width))
              this.hotspot.x = this.icon._width / 2 | 0;
            if (J.$lt$n(this.hotspot.y, 0) || J.$ge$n(this.hotspot.y, this.icon._height))
              this.hotspot.y = this.icon._height / 2 | 0;
          }
        }
      },
      static: {
        AtomCursor$: function(id, icon, hotspot) {
          var t1 = new N.AtomCursor(id, icon, hotspot, false);
          t1.AtomCursor$3(id, icon, hotspot);
          return t1;
        },
        AtomCursor_AtomCursor$fromIcon: function(icon, state) {
          var canon, ic, found, t1;
          canon = C.JSInt_methods.toString$0(icon.id) + "." + state;
          if (icon.still.$index(0, state) == null)
            return;
          ic = icon.IconAt$4(state, false, 2, 0);
          if (ic == null)
            return;
          found = $.me.cursorMap.$index(0, canon);
          if (found != null)
            return found;
          t1 = $.me.cursorMap;
          found = N.AtomCursor$(canon, ic, new U.Point0(ic.hotspot_x, ic.hotspot_y, [null]));
          t1.$indexSet(0, canon, found);
          return found;
        },
        AtomCursor_AtomCursor$fromAppearance: function(base, sub) {
          var t1, t2, _icon, _state, canon, found, i;
          t1 = sub.core;
          t1.toString;
          t1 = $.me.iconInfoMap.$index(0, t1.iconId);
          t2 = $.me;
          if (t1 != null) {
            t1 = sub.core;
            t1.toString;
            _icon = t2.iconInfoMap.$index(0, t1.iconId);
          } else {
            t1 = base.core;
            t1.toString;
            _icon = t2.iconInfoMap.$index(0, t1.iconId);
          }
          _state = sub.core.iconState;
          _state = _state.length !== 0 ? _state : base.core.iconState;
          t1 = _icon != null;
          canon = C.JSString_methods.$add((t1 ? C.JSInt_methods.toString$0(_icon.id) : "-") + ".", _state);
          found = $.me.cursorMap.$index(0, canon);
          if (found == null) {
            if (t1) {
              i = _icon.IconAt$4(_state, false, 2, 0);
              if (i == null)
                i = _icon.IconAt$4("", false, 2, 0);
            } else
              i = null;
            t1 = $.me.cursorMap;
            found = N.AtomCursor$(canon, i, i != null ? new U.Point0(i.hotspot_x, i.hotspot_y, [null]) : null);
            t1.$indexSet(0, canon, found);
          }
          return found;
        }
      }
    },
    ClientInfo: {
      "^": "Object;curCursor,defCursor,overCursor,dragCursor,dropCursor,allCursor"
    },
    IconState: {
      "^": "Object;name,flags,dirs,frames,loop,total_delay,total_loop,delays,icons",
      get$moving: function() {
        return (this.flags & 2) !== 0;
      },
      idir$1: function(dir) {
        var t1, d;
        t1 = this.dirs;
        if (t1 < 4)
          return 0;
        d = C.List_2Vk[dir];
        if (d < t1)
          return d;
        return C.List_2Vk[C.List_2Vk0[dir]];
      },
      IconAt$2: function(dir, time) {
        var _idir, t1, diricons, t2, f, d;
        _idir = this.idir$1(dir);
        t1 = this.icons;
        if (_idir >= t1.length)
          return 65535;
        diricons = t1[_idir];
        if (this.frames <= 1)
          return C.JSArray_methods.get$first(diricons);
        time *= 10;
        t1 = this.loop;
        if (t1 > 0)
          if (time >= t1 * this.total_delay)
            return (this.flags & 1) !== 0 ? C.JSArray_methods.get$first(diricons) : C.JSArray_methods.get$last(diricons);
        time = C.JSNumber_methods.remainder$1(time, this.total_delay);
        for (t1 = this.frames, t2 = this.delays, f = 0; f < t1; ++f) {
          d = t2[f];
          if (time < d)
            return diricons[f];
          time -= d;
        }
        for (f = t1 - 1; f > 0; --f) {
          d = t2[f];
          if (time < d)
            return diricons[f];
          time -= d;
        }
        return C.JSArray_methods.get$first(diricons);
      },
      IconFrame$2: function(dir, frame) {
        var diricons = this.icons[this.idir$1(dir)];
        if (frame == null)
          frame = 0;
        if (frame >= diricons.length)
          return 65535;
        return diricons[frame];
      },
      IconState$1: function(msg) {
        var t1, f, val, t2, t3, d, perdir;
        this.name = msg.getUTFString$0();
        this.flags = msg._webclient$_data.getUint8(msg._pos++);
        t1 = msg._webclient$_data.getUint8(msg._pos++);
        this.dirs = t1;
        if (t1 === 0)
          this.dirs = 1;
        this.frames = msg.getUint16$0(0);
        this.loop = msg.getUint16$0(0);
        this.icons = [];
        if (this.frames > 1) {
          this.delays = [];
          this.total_delay = 0;
          for (f = 0, t1 = 0; f < this.frames; ++f) {
            t1 = this.delays;
            val = msg._webclient$_data.getFloat32(msg._pos, true);
            msg._pos += 4;
            t1.push(val);
            t1 = this.total_delay + val;
            this.total_delay = t1;
          }
          if ((this.flags & 1) !== 0) {
            t1 *= 2;
            this.total_delay = t1;
            t2 = this.delays;
            t2 = (t2 && C.JSArray_methods).get$first(t2);
            t3 = this.delays;
            t3 = t1 - (t2 - (t3 && C.JSArray_methods).get$last(t3));
            this.total_delay = t3;
            t1 = t3;
          }
          t2 = this.loop;
          if (t2 > 0)
            this.total_loop = t1 * t2;
          else
            this.total_loop = 0;
        } else {
          this.total_loop = 0;
          this.total_delay = 0;
        }
        for (d = 0; d < this.dirs; ++d) {
          perdir = [];
          this.icons.push(perdir);
          for (f = 0; f < this.frames; ++f) {
            val = msg._webclient$_data.getUint16(msg._pos, true);
            msg._pos += 2;
            perdir.push(val);
          }
        }
      },
      static: {
        IconState$: function(msg) {
          var t1 = new N.IconState(null, null, null, null, 0, null, null, null, null);
          t1.IconState$1(msg);
          return t1;
        }
      }
    },
    IconInfo: {
      "^": "Object;id',_crc,_width,_height,icons,states,still,moving<,defaultStill,defaultMoving",
      get$width: function(_) {
        return this._width;
      },
      get$height: function(_) {
        return this._height;
      },
      stateFor$2: function(state, isMoving) {
        var i;
        if (state != null && state.length !== 0) {
          if (isMoving == null) {
            i = this.still.$index(0, state);
            if (i != null)
              return i;
            i = this.moving.$index(0, state);
            if (i != null)
              return i;
            i = this.defaultStill;
            if (i != null)
              return i;
            return this.defaultMoving;
          }
          i = isMoving ? this.moving.$index(0, state) : this.still.$index(0, state);
          if (i == null)
            i = isMoving ? this.defaultMoving : this.defaultStill;
          return i;
        }
        if (isMoving == null) {
          i = this.defaultStill;
          if (i != null)
            return i;
          return this.defaultMoving;
        }
        return isMoving ? this.defaultMoving : this.defaultStill;
      },
      IconAt$4: function(state, isMoving, dir, time) {
        var i;
        if (state.length !== 0) {
          i = isMoving ? this.moving.$index(0, state) : this.still.$index(0, state);
          if (i == null)
            i = isMoving ? this.defaultMoving : this.defaultStill;
        } else
          i = isMoving ? this.defaultMoving : this.defaultStill;
        if (i == null)
          return;
        if (!isMoving && (i.flags & 2) !== 0)
          time = 0;
        return this.icons[i.IconAt$2(dir, time)];
      },
      flickDuration$1: function(state) {
        var i, t1;
        if (state.length !== 0) {
          i = this.still.$index(0, state);
          if (i == null)
            i = this.moving.$index(0, state);
        } else
          i = this.defaultStill;
        if (i == null)
          return $.me.tickLag / 1000;
        t1 = i.total_delay;
        return t1 > 0 ? t1 / 10 : $.me.tickLag / 1000;
      },
      animatedState$3: function(state, isMoving, time) {
        var i, t1;
        if (state.length !== 0) {
          i = this.still.$index(0, state);
          if (i == null)
            i = this.defaultStill;
        } else
          i = this.defaultStill;
        if (i == null)
          return false;
        if (i.frames > 1)
          t1 = i.loop <= 0 || time < i.total_loop + 1;
        else
          t1 = false;
        return t1;
      },
      IconInfo$1: function(msg) {
        var count, t1, i, t2, state, t3, t4, n, val, val0;
        this._crc = msg.getUint32$0(0);
        this._width = msg.getUint16$0(0);
        this._height = msg.getUint16$0(0);
        this.id = msg.getUint32as16$0();
        count = msg.getUint16$0(0);
        for (t1 = this.states, i = 0; i < count; ++i)
          t1.push(N.IconState$(msg));
        for (t2 = this.still, i = 0; i < count; ++i) {
          state = t1[i];
          t3 = state.name;
          if (t3.length === 0) {
            t4 = this.defaultStill;
            if (t4 != null)
              if (t4.name.length === 0)
                t4 = (t4.flags & 2) !== 0 && (state.flags & 2) === 0;
              else
                t4 = true;
            else
              t4 = true;
            if (t4)
              this.defaultStill = state;
            t4 = this.defaultMoving;
            if (t4 != null)
              if (t4.name.length === 0)
                t4 = (t4.flags & 2) === 0 && (state.flags & 2) !== 0;
              else
                t4 = true;
            else
              t4 = true;
            if (t4)
              this.defaultMoving = state;
          }
          if (t2.$index(0, t3) != null)
            t3 = t2.$index(0, state.name).get$moving() && (state.flags & 2) === 0;
          else
            t3 = true;
          if (t3)
            t2.$indexSet(0, state.name, state);
          if (this.moving.$index(0, state.name) != null)
            t3 = !this.moving.$index(0, state.name).get$moving() && (state.flags & 2) !== 0;
          else
            t3 = true;
          if (t3)
            this.moving.$indexSet(0, state.name, state);
        }
        n = msg.getUint16$0(0);
        this.icons = new Array(n);
        for (i = 0; i < n; ++i) {
          val = msg._webclient$_data.getUint16(msg._pos, true);
          t1 = msg._pos += 2;
          val0 = msg._webclient$_data.getUint16(t1, true);
          msg._pos += 2;
          if (val === 65535)
            continue;
          t1 = this.icons;
          t2 = $.me.iconMap;
          t3 = new N.AtomIcon(null, null, null, null, null, null, null, null, this._width, this._height, i, val, this._crc, null, false, null, null);
          t2.$indexSet(0, val, t3);
          t1[i] = t3;
          t3 = this.icons[i];
          t1 = this._width;
          t3.hotspot_x = C.JSInt_methods.$mod(val0, t1);
          t3.hotspot_y = C.JSInt_methods.$tdiv(val0, t1);
        }
        t1 = $.me;
        t2 = this._crc;
        t1.toString;
        t2 = "cache/" + J.toString$0$(t2);
        A.BitmapData_load("http://" + H.S(t1.host) + ":" + H.S(t1.port) + "/" + t2, $.me.corsLoadOptions).then$1(new N.IconInfo_closure(this, n)).catchError$1(new N.IconInfo_closure0(this, n));
      },
      static: {
        IconInfo$: function(msg) {
          var t1, t2;
          t1 = P.String;
          t2 = N.IconState;
          t2 = new N.IconInfo(null, null, null, null, null, [], P.HashMap_HashMap(null, null, null, t1, t2), P.HashMap_HashMap(null, null, null, t1, t2), null, null);
          t2.IconInfo$1(msg);
          return t2;
        }
      }
    },
    IconInfo_closure: {
      "^": "Closure:44;$this,n",
      call$1: [function(bitmapData) {
        var t1, ys, t2, i, icon, t3, t4;
        if (bitmapData != null)
          for (t1 = this.$this._width, ys = 1; C.JSInt_methods._shlPositive$1(1, ys) < t1; ++ys)
            ;
        for (t1 = this.n, t2 = this.$this, i = 0; i < t1; ++i) {
          icon = t2.icons[i];
          if (icon == null)
            continue;
          icon.set$bitmapDataSheet(bitmapData);
          icon.sync$0();
          t3 = $.me.stage;
          if (t3 != null) {
            t3.updateAtomIcon$1(icon);
            t3 = $.me.exStages;
            C.JSArray_methods.forEach$1(P.List_List$from(t3.get$values(t3), true, null), new N.IconInfo__closure(icon));
            t3 = $.me;
            t4 = t3.clientInfo.curCursor;
            if (t4 != null && t4.icon === icon)
              t3.setCursor$1(t4);
          }
        }
      }, null, null, 2, 0, null, 18, "call"]
    },
    IconInfo__closure: {
      "^": "Closure:34;icon",
      call$1: function(s) {
        return s.updateAtomIcon$1(this.icon);
      }
    },
    IconInfo_closure0: {
      "^": "Closure:0;$this,n",
      call$1: [function(_) {
        var t1, t2, i, icon;
        P.print("Icon: caught error " + H.S(_));
        for (t1 = this.n, t2 = this.$this, i = 0; i < t1; ++i) {
          icon = t2.icons[i];
          if (icon == null)
            continue;
          icon.set$bitmapDataSheet(null);
        }
      }, null, null, 2, 0, null, 5, "call"]
    },
    MaptextCacheItem: {
      "^": "Object;_text,_webclient$_map,_width,_height,_bitmapData,redraw,lastUsed,icons,_strHash",
      get$hashCode: function(_) {
        var t1 = this._strHash;
        if (t1 == null) {
          t1 = N.MaptextCacheItem_hashFor(this._text, this._width, this._height, this._webclient$_map);
          this._strHash = t1;
        }
        return J.get$hashCode$(t1);
      },
      get$bitmapData: function() {
        var htmlField, t1, t2, updateBatch, renderState;
        this.lastUsed = $.me.currentTime;
        if (!this.redraw)
          return this._bitmapData;
        this.redraw = false;
        this._bitmapData = A.BitmapData_BitmapData(this._width, this._height, 0, 1);
        htmlField = N.HtmlField$(this._text, this._webclient$_map);
        t1 = this._width;
        t1.toString;
        htmlField._stagexl_richtextfield$_width = t1;
        t1 = htmlField._refreshPending |= 3;
        t2 = this._height;
        t2.toString;
        htmlField._stagexl_richtextfield$_height = t2;
        t1 |= 3;
        htmlField._refreshPending = t1;
        htmlField._wordWrap = true;
        htmlField._refreshPending = t1 | 3;
        htmlField._cacheAsBitmap = false;
        t1 = this._bitmapData;
        t1.toString;
        updateBatch = A.BitmapDataUpdateBatch$(t1);
        renderState = L.RenderState$(updateBatch._renderContext, updateBatch._drawMatrix, null, null);
        htmlField.render$1(renderState);
        updateBatch.bitmapData.renderTextureQuad.renderTexture.update$0();
        return this._bitmapData;
      },
      redraw$0: function() {
        return this.redraw.call$0();
      },
      static: {
        MaptextCacheItem_hashFor: function(text, width, height, map) {
          return C.JSArray_methods.join$1(["", text, J.toString$0$(width), J.toString$0$(height)], "|");
        }
      }
    },
    MaptextCache: {
      "^": "Object;items",
      updateMap$1: function(map) {
        var t1 = this.items;
        t1 = t1.get$values(t1);
        C.JSArray_methods.forEach$1(P.List_List$from(t1, true, H.getRuntimeTypeArgument(t1, "Iterable", 0)), new N.MaptextCache_updateMap_closure(map));
      }
    },
    MaptextCache_updateMap_closure: {
      "^": "Closure:46;map",
      call$1: function(m) {
        var t1, t2, icons, _i, i;
        t1 = m._webclient$_map;
        t2 = this.map;
        if (t1 == null ? t2 == null : t1 === t2) {
          m.redraw = true;
          icons = P.List_List$from(m.icons, true, null);
          for (t1 = icons.length, _i = 0; _i < icons.length; icons.length === t1 || (0, H.throwConcurrentModificationError)(icons), ++_i) {
            i = icons[_i];
            i.set$bitmapDataSheet(null);
            i._rect = null;
            t2 = $.me.stage;
            if (t2 != null)
              t2.updateAtomIcon$1(i);
            t2 = $.me.exStages;
            C.JSArray_methods.forEach$1(P.List_List$from(t2.get$values(t2), true, null), new N.MaptextCache_updateMap__closure(i));
          }
        }
      }
    },
    MaptextCache_updateMap__closure: {
      "^": "Closure:34;i",
      call$1: function(s) {
        return s.updateAtomIcon$1(this.i);
      }
    },
    KeyInfo: {
      "^": "Object;keyCode,value,isAlt,isCtrl,isShift,isRep,isUp,maps"
    },
    KeyRepeater: {
      "^": "Object;_started,valid,old",
      loop$0: function(_) {
        var fired, delay, t1, t2, t3;
        if (!this.valid)
          return;
        fired = $.me.macro.doRepeat$0();
        delay = $.me.tickLag;
        if (!!fired) {
          t1 = Date.now();
          t2 = $.me.tickLag;
          t3 = C.JSInt_methods._tdivFast$1(P.Duration$(0, 0, 0, t1 - this._started._value, 0, 0)._duration, 1000);
          this._started = new P.DateTime(t1, false);
          t1 = $.me.tickLag;
          C.JSNumber_methods.ceil$0(C.JSInt_methods.clamp$2(delay + (t2 - t3), t1 * 0.5, t1 * 1.5));
        }
        P.Future_Future$delayed(P.Duration$(0, 0, 0, $.me.tickLag, 0, 0), new N.KeyRepeater_loop_closure(this), null);
      },
      KeyRepeater$1: function(old) {
        P.Future_Future$delayed(P.Duration$(0, 0, 0, this.old ? 333 : $.me.tickLag * 2, 0, 0), new N.KeyRepeater_closure(this), null);
      },
      static: {
        KeyRepeater$: function(old) {
          var t1 = new N.KeyRepeater(new P.DateTime(Date.now(), false), true, old);
          t1.KeyRepeater$1(old);
          return t1;
        }
      }
    },
    KeyRepeater_closure: {
      "^": "Closure:1;$this",
      call$0: function() {
        return this.$this.loop$0(0);
      }
    },
    KeyRepeater_loop_closure: {
      "^": "Closure:1;$this",
      call$0: function() {
        return this.$this.loop$0(0);
      }
    },
    ByondMacroData: {
      "^": "Object;keyCode,name,command,_mapTo,isUp,isRep,local,mapToCode",
      get$isEmpty: function(_) {
        return this.command == null && this._mapTo == null;
      }
    },
    ByondMacro: {
      "^": "Object;_keyToMacro,_keyToMacroLocal,_oldstyles,_keyDown,_stopwatch,_repeater,_keyToStr,_strToKey",
      _getKeyInfo$1: function(keyCode) {
        var t1, t2, _i, t3, info, t4;
        for (t1 = this._keyDown, t2 = t1.length, _i = 0; t3 = t1.length, _i < t3; t3 === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          info = t1[_i];
          t4 = info.keyCode;
          t4 = t4 == null ? keyCode == null : t4 === keyCode;
          if (t4)
            return info;
        }
        return;
      },
      reset$0: function(_) {
        var t1;
        C.JSArray_methods.set$length(this._keyDown, 0);
        t1 = this._repeater;
        if (t1 != null)
          t1.valid = false;
        this._repeater = null;
      },
      unstick$0: function() {
        var t1, i, i0, info, command;
        for (t1 = this._keyDown, i = t1.length; i0 = i - 1, i > 0; i = i0) {
          if (i0 >= t1.length)
            continue;
          info = t1[i0];
          command = this.lookup$5(info.keyCode, info.isAlt, info.isCtrl, info.isShift, false);
          if (command != null && command.length !== 0)
            $.$get$ByondJS_skin().doInput$1(command);
          if (i0 < t1.length)
            C.JSArray_methods.removeAt$1(t1, i0);
        }
        this.reset$0(0);
      },
      doRepeat$0: function() {
        var t1, t2, old, t3, info, command;
        t1 = this._stopwatch;
        t2 = t1._stop;
        if (t2 == null)
          t2 = $.Primitives_timerTicks.call$0();
        if (C.JSInt_methods.$tdiv((t2 - t1._core$_start) * 1000, $.Stopwatch__frequency) < $.me.tickLag * 0.75)
          return false;
        t2 = this._repeater;
        old = t2 != null && t2.old;
        for (t2 = this._keyDown, t2 = new H.ReversedListIterable(t2, [H.getTypeArgumentByIndex(t2, 0)]), t2 = new H.ListIterator(t2, t2.get$length(t2), 0, null), t3 = !old; t2.moveNext$0();) {
          info = t2.__internal$_current;
          if (info == null)
            continue;
          command = this.lookup$7$noOld$soft(info.keyCode, info.isAlt, info.isCtrl, info.isShift, info.value, t3, true);
          if (command != null) {
            if (command.length !== 0) {
              t2 = t1._stop;
              t1._core$_start = t2 == null ? $.Primitives_timerTicks.call$0() : t2;
              $.$get$ByondJS_skin().doInput$1(command);
            }
            break;
          }
        }
        return true;
      },
      isCharKey$1: function(k) {
        var s = this._keyToStr[k];
        return s != null && J.get$length$asx(s) === 1;
      },
      lookupCode$2: function(keyStr, stripModifiers) {
        var t1, i, code, codehi;
        if (typeof keyStr !== "string")
          return 0;
        t1 = C.JSString_methods.trim$0(keyStr.toUpperCase());
        keyStr = H.stringReplaceAllUnchecked(t1, " ", "+");
        i = J.getInterceptor$asx(keyStr).indexOf$1(keyStr, "+");
        if (i >= 0) {
          code = this.lookupCode$1(C.JSString_methods.substring$2(keyStr, 0, i));
          keyStr = C.JSString_methods.substring$1(keyStr, i + 1);
          for (; keyStr.length !== 0;) {
            i = C.JSString_methods.indexOf$1(keyStr, "+");
            if (i >= 0) {
              codehi = this.lookupCode$1(C.JSString_methods.substring$1(keyStr, i));
              keyStr = C.JSString_methods.substring$1(keyStr, i + 1);
            } else {
              codehi = this.lookupCode$1(keyStr);
              keyStr = "";
            }
            code = N.ByondMacro_combineCodes(code, codehi);
          }
          return code;
        }
        code = this._strToKey.$index(0, keyStr);
        if (code != null)
          return code;
        return 0;
      },
      lookupCode$1: function(keyStr) {
        return this.lookupCode$2(keyStr, false);
      },
      lookupName$1: function(code) {
        var t1, lo, hi;
        t1 = C.JSInt_methods._shrOtherPositive$1(code, 16);
        if (t1 !== 0) {
          lo = this.lookupName$1(code & 65535);
          hi = this.lookupName$1(t1);
          if (lo == null)
            return hi;
          if (hi == null)
            return lo;
          return lo + "+" + hi;
        }
        return this._keyToStr[code];
      },
      nameToJS$1: function(keyStr) {
        var parts, i, rep, up, ctrl, shift, alt, old, i0, uc, fmtStr, code, t1, t2;
        keyStr = C.JSString_methods.trim$0(keyStr.toUpperCase());
        parts = H.stringReplaceAllUnchecked(keyStr, " ", "+").split("+");
        for (i = parts.length, rep = false, up = false, ctrl = false, shift = false, alt = false, old = false; i0 = i - 1, i > 0; i = i0) {
          uc = parts[i0].toUpperCase();
          if (uc === "REP") {
            C.JSArray_methods.removeAt$1(parts, i0);
            rep = true;
          } else if (uc === "UP") {
            C.JSArray_methods.removeAt$1(parts, i0);
            up = true;
          } else if (uc === "OLDSTYLE") {
            C.JSArray_methods.removeAt$1(parts, i0);
            old = true;
          } else if (uc === "SHIFT") {
            C.JSArray_methods.removeAt$1(parts, i0);
            shift = true;
          } else if (uc === "CTRL") {
            C.JSArray_methods.removeAt$1(parts, i0);
            ctrl = true;
          } else if (uc === "ALT") {
            C.JSArray_methods.removeAt$1(parts, i0);
            alt = true;
          }
        }
        keyStr = parts.length !== 0 ? C.JSArray_methods.join$1(parts, "+") : "";
        fmtStr = shift ? "SHIFT+" : "";
        if (ctrl)
          fmtStr += "CTRL+";
        if (alt)
          fmtStr += "ALT+";
        code = this.lookupCode$1(keyStr);
        t1 = code != null;
        keyStr = t1 ? this.lookupName$1(code) : C.JSString_methods.trim$0(keyStr);
        if (keyStr != null)
          fmtStr += keyStr;
        if (up)
          fmtStr += "+UP";
        t2 = P.LinkedHashMap__makeLiteral(["name", rep ? fmtStr + "+REP" : fmtStr, "key", keyStr, "keyCode", code, "shift", shift, "ctrl", ctrl, "alt", alt, "rep", rep, "up", up, "old", old]);
        t2 = P._wrapToDart(P.JsObject__convertDataTree(t2));
        if (t1 && (code & 4294901760) >>> 0 !== 0) {
          t1 = [];
          C.JSArray_methods.addAll$1(t1, C.JSArray_methods.map$1(this.lookupName$1(code).split("+"), P.js___convertToJS$closure()));
          t2.$indexSet(0, "combo", new P.JsArray(t1, [null]));
        }
        return t2;
      },
      allMacros$1: function(local) {
        var macros, t1, t2, t3, $name, macro, data;
        macros = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeEmpty());
        for (t1 = this._keyToMacro, t2 = new P._HashMapKeyIterator(t1, t1._computeKeys$0(), 0, null), t3 = this._oldstyles; t2.moveNext$0();) {
          $name = t2._collection$_current;
          macro = this.nameToJS$1($name);
          if (J.$eq$(macro.$index(0, "keyCode"), 0))
            continue;
          data = t1.$index(0, $name);
          macro.$indexSet(0, "command", data.command);
          macro.$indexSet(0, "mapTo", data._mapTo);
          macro.$indexSet(0, "local", false);
          macros.$indexSet(0, $name, macro);
          if (J.$eq$(t3.$index(0, $name), true))
            macro.$indexSet(0, "old", true);
        }
        for (t1 = this._keyToMacroLocal, t2 = new P._HashMapKeyIterator(t1, t1._computeKeys$0(), 0, null); t2.moveNext$0();) {
          $name = t2._collection$_current;
          macro = this.nameToJS$1($name);
          if (J.$eq$(macro.$index(0, "keyCode"), 0))
            continue;
          data = t1.$index(0, $name);
          macro.$indexSet(0, "command", data.command);
          macro.$indexSet(0, "mapTo", data._mapTo);
          macro.$indexSet(0, "local", true);
          macros.$indexSet(0, $name, macro);
        }
        return macros;
      },
      allMacros$0: function() {
        return this.allMacros$1(null);
      },
      getMacro$2: function($name, local) {
        var macro, data;
        if (typeof $name !== "string")
          return;
        macro = this.nameToJS$1($name);
        $name = macro != null ? macro.$index(0, "name") : null;
        if (typeof $name !== "string")
          return;
        data = this._keyToMacro.$index(0, $name);
        if (data != null) {
          if (J.$eq$(macro.$index(0, "keyCode"), 0))
            return;
          macro.$indexSet(0, "command", data.command);
          macro.$indexSet(0, "mapTo", data._mapTo);
          macro.$indexSet(0, "local", false);
          if (J.$eq$(this._oldstyles.$index(0, $name), true))
            macro.$indexSet(0, "old", true);
          return macro;
        }
        data = this._keyToMacroLocal.$index(0, $name);
        if (data != null) {
          macro = this.nameToJS$1($name);
          if (J.$eq$(macro.$index(0, "keyCode"), 0))
            return;
          macro.$indexSet(0, "command", null);
          macro.$indexSet(0, "mapTo", data._mapTo);
          macro.$indexSet(0, "local", true);
          return macro;
        }
        return;
      },
      getMacro$1: function($name) {
        return this.getMacro$2($name, null);
      },
      insert$4: function(_, keyStr, verbStr, mapTo, local) {
        var js, fmtStr, which, data, t1;
        js = this.nameToJS$1(keyStr);
        fmtStr = js.$index(0, "name");
        which = local ? this._keyToMacroLocal : this._keyToMacro;
        data = which.$index(0, fmtStr);
        if (data == null) {
          if (verbStr == null && mapTo == null)
            return;
          data = new N.ByondMacroData(null, null, verbStr, null, null, null, local, 0);
          data.name = js.$index(0, "name");
          data.keyCode = js.$index(0, "keyCode");
          data.isUp = js.$index(0, "up");
          data.isRep = js.$index(0, "rep");
          t1 = $.me.macro.lookupCode$1(mapTo);
          data.mapToCode = t1;
          t1 = t1 !== 0 ? $.me.macro.lookupName$1(t1) : null;
          data._mapTo = t1;
          if (!(verbStr == null && t1 == null))
            which.$indexSet(0, fmtStr, data);
        } else {
          data.command = verbStr;
          t1 = $.me.macro.lookupCode$1(mapTo);
          data.mapToCode = t1;
          t1 = t1 !== 0 ? $.me.macro.lookupName$1(t1) : null;
          data._mapTo = t1;
          if (data.command == null && t1 == null)
            which.remove$1(0, fmtStr);
        }
        this._oldstyles.$indexSet(0, fmtStr, js.$index(0, "old"));
      },
      insert$3: function($receiver, keyStr, verbStr, mapTo) {
        return this.insert$4($receiver, keyStr, verbStr, mapTo, false);
      },
      insertSet$2: function(set, local) {
        var t1, t2, obj, $name, t3;
        for (t1 = N.ByondJS_keys(set), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new H.WhereIterator(t2, t1._f, [H.getTypeArgumentByIndex(t1, 0)]), obj = null; t1.moveNext$0();) {
          $name = t2.get$current();
          if (typeof $name !== "string")
            continue;
          obj = set.$index(0, $name);
          if (typeof obj === "string")
            this.insert$4(0, $name, obj, null, true);
          else {
            t3 = J.getInterceptor(obj);
            if (!!t3.$isJsObject)
              this.insert$4(0, $name, t3.$index(obj, "command"), t3.$index(obj, "mapTo"), true);
          }
        }
      },
      record$1: function(e) {
        var t1, t2, isUp;
        if (e == null)
          return;
        t1 = e.type;
        t2 = t1 === "keydown";
        isUp = !t2;
        if (isUp && t1 !== "keyup")
          return;
        if (t2 && this._getKeyInfo$1(e.keyCode) != null)
          return;
        if (isUp && this._getKeyInfo$1(e.keyCode) == null)
          return;
        this.lookup$5(e.keyCode, e.altKey, e.ctrlKey, e.shiftKey, t2);
      },
      commandFor$1: function(str) {
        var data = this._keyToMacroLocal.$index(0, str);
        if (data == null || data.command == null)
          data = this._keyToMacro.$index(0, str);
        return data != null ? data.command : null;
      },
      lookup$13$canRecurse$isAuto$isMap$isRep$noChange$noOld$recurse$soft: function(keyCode, isAlt, isCtrl, isShift, value, canRecurse, isAuto, isMap, isRep, noChange, noOld, recurse, soft) {
        var t1, keyInfo, isUp, t4, t2, t3, x, y, keyStr, t5, t6, oldValue, t7, id, anyCommand, keyName, firstRepeat, keyIsRep, command, bits, bitCheck, tried, _i, newbits;
        t1 = {};
        t1.value = value;
        t1.isRep = isRep;
        t1.command = null;
        t1.x = null;
        t1.y = null;
        if (keyCode >= 385)
          return;
        keyInfo = noChange && !recurse ? new N.KeyInfo(keyCode, value, false, false, false, false, false, 0) : this._getKeyInfo$1(keyCode);
        t1.isUp = null;
        if (typeof value === "boolean") {
          isUp = !value;
          t1.isUp = isUp;
          t4 = isUp;
          t2 = null;
          t3 = null;
        } else if (typeof value === "number") {
          isUp = J.$eq$(value, 0);
          t1.isUp = isUp;
          t4 = isUp;
          t2 = null;
          t3 = null;
        } else {
          t2 = J.getInterceptor(value);
          if (!!t2.$isJsObject) {
            x = N.ByondJS_toNum(t2.$index(value, "x"), false);
            t1.x = x;
            y = N.ByondJS_toNum(J.$index$asx(value, "y"), false);
            t1.y = y;
            isUp = x === 0 && y === 0;
            t1.isUp = isUp;
            t4 = isUp;
            t3 = y;
            t2 = x;
          } else {
            t1.isUp = true;
            t2 = null;
            t3 = null;
            t4 = true;
          }
        }
        keyStr = this._keyToStr[keyCode];
        if (keyStr === "Shift")
          isShift = false;
        else if (keyStr === "Ctrl")
          isCtrl = false;
        else if (keyStr === "Alt")
          isAlt = false;
        t5 = !noChange;
        if (t5 && !recurse)
          if (t4) {
            if (keyInfo == null)
              return;
            isAlt = keyInfo.isAlt;
            isCtrl = keyInfo.isCtrl;
            isShift = keyInfo.isShift;
            if (!soft) {
              t6 = keyInfo.isUp;
              oldValue = t6 ? false : keyInfo.value;
              t7 = keyInfo.maps;
              if (t7 > 0) {
                if (!isMap) {
                  keyInfo.value = value;
                  keyInfo.isUp = true;
                  return;
                }
                --t7;
                keyInfo.maps = t7;
                if (t7 > 0 || !t6)
                  return;
              }
              t6 = this._keyDown;
              C.JSArray_methods.remove$1(t6, keyInfo);
              if (t6.length === 0 && this._repeater != null) {
                this._repeater.valid = false;
                this._repeater = null;
              }
              if (!(keyCode > 0 && keyCode <= 255)) {
                id = keyCode & 65439;
                t6 = id >= 256 && id <= 275;
              } else
                t6 = true;
              if (t6) {
                anyCommand = this.lookup$6$noChange(384, false, false, false, false, true);
                if (anyCommand != null) {
                  keyName = this.lookupName$1(keyCode);
                  keyName = keyName == null ? "" : H.stringReplaceAllFuncUnchecked(keyName, P.RegExp_RegExp("([\\'\"])", true, false), new N.ByondMacro_lookup_closure(), null);
                  anyCommand = H.stringReplaceAllUnchecked(anyCommand, "[[*]]", keyName);
                  $.$get$ByondJS_skin().doInput$1(anyCommand);
                }
              }
            } else
              oldValue = null;
            t6 = isRep;
            firstRepeat = false;
          } else {
            if (keyInfo == null) {
              keyInfo = new N.KeyInfo(keyCode, value, false, false, false, false, false, 0);
              if (!soft) {
                if (isMap)
                  keyInfo.isUp = true;
                this._keyDown.push(keyInfo);
                if (this._repeater == null && keyCode > 0 && keyCode <= 255)
                  this._repeater = N.KeyRepeater$(false);
                if (!(keyCode > 0 && keyCode <= 255)) {
                  id = keyCode & 65439;
                  t6 = id >= 256 && id <= 275;
                } else
                  t6 = true;
                if (t6) {
                  anyCommand = this.lookup$6$noChange(384, false, false, false, true, true);
                  if (anyCommand != null) {
                    keyName = this.lookupName$1(keyCode);
                    keyName = keyName == null ? "" : H.stringReplaceAllFuncUnchecked(keyName, P.RegExp_RegExp("([\\'\"])", true, false), new N.ByondMacro_lookup_closure0(), null);
                    anyCommand = H.stringReplaceAllUnchecked(anyCommand, "[[*]]", keyName);
                    $.$get$ByondJS_skin().doInput$1(anyCommand);
                  }
                }
                firstRepeat = true;
              } else
                firstRepeat = false;
              t6 = isRep;
              oldValue = null;
            } else {
              oldValue = keyInfo.isUp ? false : keyInfo.value;
              if (!(keyCode >= 256 && keyCode <= 383)) {
                t6 = keyInfo.isAlt;
                if (t6 == null ? isAlt == null : t6 === isAlt) {
                  t6 = keyInfo.isCtrl;
                  if (t6 == null ? isCtrl == null : t6 === isCtrl) {
                    t6 = keyInfo.isShift;
                    if (t6 == null ? isShift == null : t6 === isShift)
                      t6 = isMap || J.$eq$(oldValue, value);
                    else
                      t6 = false;
                  } else
                    t6 = false;
                  keyIsRep = t6;
                } else
                  keyIsRep = false;
              } else
                keyIsRep = true;
              if (!isMap) {
                keyInfo.value = value;
                keyInfo.isUp = false;
              }
              isRep = isRep || keyIsRep;
              t1.isRep = isRep;
              if (!soft)
                keyInfo.isRep = keyIsRep;
              t6 = isRep;
              firstRepeat = false;
            }
            if (!soft) {
              keyInfo.isAlt = isAlt;
              keyInfo.isCtrl = isCtrl;
              keyInfo.isShift = isShift;
            }
          }
        else {
          t6 = isRep;
          oldValue = null;
          firstRepeat = false;
        }
        if (keyStr == null)
          keyStr = "null";
        if (isShift)
          keyStr = C.JSString_methods.$add("SHIFT+", keyStr);
        if (isCtrl)
          keyStr = C.JSString_methods.$add("CTRL+", keyStr);
        if (isAlt)
          keyStr = C.JSString_methods.$add("ALT+", keyStr);
        if (t5 && keyCode >= 256 && keyCode <= 383) {
          t7 = new N.ByondMacro_lookup_TryMatch(this, keyCode);
          id = keyCode & 65439;
          if (id >= 256 && id <= 275) {
            if (!J.$eq$(oldValue, value))
              t1.isRep = false;
            t7.call$1(new N.ByondMacro_lookup_closure1(t1, this, keyCode));
            return t1.command;
          }
          if (id >= 276 && id <= 277) {
            if (!(value instanceof P.JsObject)) {
              t1.y = 0;
              t1.x = 0;
              t2 = 0;
              t3 = 0;
            }
            t5 = J.getInterceptor(oldValue);
            if (!!t5.$isJsObject) {
              if (!t4) {
                t4 = N.ByondJS_toNum(t5.$index(oldValue, "x"), false);
                if (t2 == null ? t4 == null : t2 === t4) {
                  t2 = N.ByondJS_toNum(t5.$index(oldValue, "y"), false);
                  t2 = t3 == null ? t2 == null : t3 === t2;
                  isRep = t2;
                } else
                  isRep = false;
              } else
                isRep = false;
              t1.isRep = isRep;
            }
            t7.call$1(new N.ByondMacro_lookup_closure2(t1, this));
            return t1.command;
          }
          if (id >= 282 && id <= 283) {
            if (typeof value !== "number") {
              t1.value = 0;
              t1.isUp = true;
              t2 = 0;
            } else
              t2 = value;
            t1.isRep = J.$eq$(t2, oldValue);
            t7.call$1(new N.ByondMacro_lookup_closure3(t1, this));
            return t1.command;
          }
        }
        if (t4) {
          keyStr += "+UP";
          t1.command = this.commandFor$1(keyStr);
          firstRepeat = false;
        } else if (t6) {
          if (isMap)
            return "";
          if (t5) {
            t2 = this._stopwatch;
            t3 = t2._stop;
            if (t3 == null)
              t3 = $.Primitives_timerTicks.call$0();
            t2 = C.JSInt_methods.$tdiv((t3 - t2._core$_start) * 1000, $.Stopwatch__frequency) < $.me.tickLag * 0.75;
          } else
            t2 = false;
          if (t2)
            return "";
          keyStr += "+REP";
          t1.command = this.commandFor$1(keyStr);
        } else {
          command = this.commandFor$1(keyStr);
          t1.command = command;
          if (command == null)
            t2 = !noChange || recurse;
          else
            t2 = false;
          if (t2) {
            command = this.commandFor$1(keyStr + "+REP");
            t1.command = command;
            if (command == null && recurse)
              return;
            t2 = command;
          } else
            t2 = command;
          if (t2 != null && recurse && !soft) {
            keyInfo.isAlt = isAlt;
            keyInfo.isCtrl = isCtrl;
            keyInfo.isShift = isShift;
          }
          t2 = t2 == null;
          if (t2 && t5 && canRecurse && keyCode > 0 && keyCode <= 255)
            if (t2) {
              t2 = isAlt ? 1 : 0;
              t3 = isCtrl ? 2 : 0;
              t4 = isShift ? 4 : 0;
              bits = t2 | t3 | t4;
              bitCheck = [6, 5, 3, 4, 2, 1, 0];
              tried = P.LinkedHashMap__makeLiteral([bits, true]);
              for (_i = 0; _i < 7; ++_i) {
                newbits = bitCheck[_i] & bits;
                if (tried.$index(0, newbits) === true)
                  continue;
                tried.$indexSet(0, newbits, true);
                command = this.lookup$9$canRecurse$noChange$recurse$soft(keyCode, (newbits & 1) !== 0, (newbits & 2) !== 0, (newbits & 4) !== 0, true, false, true, true, soft);
                t1.command = command;
                if (command != null)
                  break;
              }
            }
        }
        if (t5 && !soft && t1.isRep && !noOld)
          return "";
        if (firstRepeat && t1.command != null && J.$eq$(this._oldstyles.$index(0, keyStr + "+REP"), true)) {
          t2 = this._repeater;
          if (t2 != null)
            t2.valid = false;
          this._repeater = N.KeyRepeater$(true);
        }
        if (t5) {
          t2 = this._stopwatch;
          t3 = t2._stop;
          t2._core$_start = t3 == null ? $.Primitives_timerTicks.call$0() : t3;
        }
        if (isMap)
          $.$get$ByondJS_skin().doInput$1(t1.command);
        return t1.command;
      },
      lookup$5: function(keyCode, isAlt, isCtrl, isShift, value) {
        return this.lookup$13$canRecurse$isAuto$isMap$isRep$noChange$noOld$recurse$soft(keyCode, isAlt, isCtrl, isShift, value, false, false, false, false, false, false, false, false);
      },
      lookup$6$canRecurse: function(keyCode, isAlt, isCtrl, isShift, value, canRecurse) {
        return this.lookup$13$canRecurse$isAuto$isMap$isRep$noChange$noOld$recurse$soft(keyCode, isAlt, isCtrl, isShift, value, canRecurse, false, false, false, false, false, false, false);
      },
      lookup$7$canRecurse$soft: function(keyCode, isAlt, isCtrl, isShift, value, canRecurse, soft) {
        return this.lookup$13$canRecurse$isAuto$isMap$isRep$noChange$noOld$recurse$soft(keyCode, isAlt, isCtrl, isShift, value, canRecurse, false, false, false, false, false, false, soft);
      },
      lookup$9$canRecurse$isAuto$isRep$noChange: function(keyCode, isAlt, isCtrl, isShift, value, canRecurse, isAuto, isRep, noChange) {
        return this.lookup$13$canRecurse$isAuto$isMap$isRep$noChange$noOld$recurse$soft(keyCode, isAlt, isCtrl, isShift, value, canRecurse, isAuto, false, isRep, noChange, false, false, false);
      },
      lookup$8$canRecurse$isRep$noChange: function(keyCode, isAlt, isCtrl, isShift, value, canRecurse, isRep, noChange) {
        return this.lookup$13$canRecurse$isAuto$isMap$isRep$noChange$noOld$recurse$soft(keyCode, isAlt, isCtrl, isShift, value, canRecurse, false, false, isRep, noChange, false, false, false);
      },
      lookup$6$noChange: function(keyCode, isAlt, isCtrl, isShift, value, noChange) {
        return this.lookup$13$canRecurse$isAuto$isMap$isRep$noChange$noOld$recurse$soft(keyCode, isAlt, isCtrl, isShift, value, false, false, false, false, noChange, false, false, false);
      },
      lookup$9$canRecurse$noChange$recurse$soft: function(keyCode, isAlt, isCtrl, isShift, value, canRecurse, noChange, recurse, soft) {
        return this.lookup$13$canRecurse$isAuto$isMap$isRep$noChange$noOld$recurse$soft(keyCode, isAlt, isCtrl, isShift, value, canRecurse, false, false, false, noChange, false, recurse, soft);
      },
      lookup$6$isMap: function(keyCode, isAlt, isCtrl, isShift, value, isMap) {
        return this.lookup$13$canRecurse$isAuto$isMap$isRep$noChange$noOld$recurse$soft(keyCode, isAlt, isCtrl, isShift, value, false, false, isMap, false, false, false, false, false);
      },
      lookup$7$noOld$soft: function(keyCode, isAlt, isCtrl, isShift, value, noOld, soft) {
        return this.lookup$13$canRecurse$isAuto$isMap$isRep$noChange$noOld$recurse$soft(keyCode, isAlt, isCtrl, isShift, value, false, false, false, false, false, noOld, false, soft);
      },
      ByondMacro$0: function() {
        var t1, stick, stick0, header, t2, i, $name, t3;
        t1 = this._keyToStr;
        t1[8] = "Back";
        t1[9] = "Tab";
        t1[12] = "Center";
        t1[13] = "Return";
        t1[16] = "Shift";
        t1[17] = "Ctrl";
        t1[18] = "Alt";
        t1[19] = "Pause";
        t1[27] = "Escape";
        t1[32] = "Space";
        t1[33] = "Northeast";
        t1[34] = "Southeast";
        t1[35] = "Southwest";
        t1[36] = "Northwest";
        t1[37] = "West";
        t1[38] = "North";
        t1[39] = "East";
        t1[40] = "South";
        t1[41] = "Select";
        t1[43] = "Execute";
        t1[44] = "Snapshot";
        t1[45] = "Insert";
        t1[46] = "Delete";
        t1[47] = "Help";
        t1[48] = "0";
        t1[49] = "1";
        t1[50] = "2";
        t1[51] = "3";
        t1[52] = "4";
        t1[53] = "5";
        t1[54] = "6";
        t1[55] = "7";
        t1[56] = "8";
        t1[57] = "9";
        t1[65] = "A";
        t1[66] = "B";
        t1[67] = "C";
        t1[68] = "D";
        t1[69] = "E";
        t1[70] = "F";
        t1[71] = "G";
        t1[72] = "H";
        t1[73] = "I";
        t1[74] = "J";
        t1[75] = "K";
        t1[76] = "L";
        t1[77] = "M";
        t1[78] = "N";
        t1[79] = "O";
        t1[80] = "P";
        t1[81] = "Q";
        t1[82] = "R";
        t1[83] = "S";
        t1[84] = "T";
        t1[85] = "U";
        t1[86] = "V";
        t1[87] = "W";
        t1[88] = "X";
        t1[89] = "Y";
        t1[90] = "Z";
        t1[96] = "Numpad0";
        t1[97] = "Numpad1";
        t1[98] = "Numpad2";
        t1[99] = "Numpad3";
        t1[100] = "Numpad4";
        t1[101] = "Numpad5";
        t1[102] = "Numpad6";
        t1[103] = "Numpad7";
        t1[104] = "Numpad8";
        t1[105] = "Numpad9";
        t1[106] = "Multiply";
        t1[107] = "Add";
        t1[109] = "Subtract";
        t1[110] = "Decimal";
        t1[111] = "Divide";
        t1[112] = "F1";
        t1[113] = "F2";
        t1[114] = "F3";
        t1[115] = "F4";
        t1[116] = "F5";
        t1[117] = "F6";
        t1[118] = "F7";
        t1[119] = "F8";
        t1[120] = "F9";
        t1[121] = "F10";
        t1[122] = "F11";
        t1[123] = "F12";
        t1[124] = "F13";
        t1[125] = "F14";
        t1[126] = "F15";
        t1[127] = "F16";
        t1[128] = "F17";
        t1[129] = "F18";
        t1[130] = "F19";
        t1[131] = "F20";
        t1[132] = "F21";
        t1[133] = "F22";
        t1[134] = "F23";
        t1[135] = "F24";
        t1[186] = ";";
        t1[187] = "=";
        t1[188] = ",";
        t1[189] = "-";
        t1[190] = ".";
        t1[191] = "/";
        t1[192] = "`";
        t1[219] = "[";
        t1[220] = "\\";
        t1[221] = "]";
        t1[222] = "'";
        t1[384] = "Any";
        t1[256] = "GamepadFace1";
        t1[257] = "GamepadFace2";
        t1[258] = "GamepadFace3";
        t1[259] = "GamepadFace4";
        t1[260] = "GamepadL1";
        t1[261] = "GamepadR1";
        t1[262] = "GamepadL2";
        t1[263] = "GamepadR2";
        t1[264] = "GamepadSelect";
        t1[265] = "GamepadStart";
        t1[266] = "GamepadL3";
        t1[267] = "GamepadR3";
        t1[268] = "GamepadUp";
        t1[269] = "GamepadDown";
        t1[270] = "GamepadLeft";
        t1[271] = "GamepadRight";
        t1[272] = "GamepadUpLeft";
        t1[273] = "GamepadDownLeft";
        t1[274] = "GamepadUpRight";
        t1[275] = "GamepadDownRight";
        t1[276] = "GamepadLeftAnalog";
        t1[277] = "GamepadRightAnalog";
        t1[280] = "GamepadRaw";
        t1[282] = "GamepadDir";
        t1[283] = "GamepadDir4";
        for (stick = 1; stick < 4; stick = stick0) {
          stick0 = stick + 1;
          header = "Gamepad" + C.JSInt_methods.toString$0(stick0);
          for (t2 = stick << 5, i = 256; i < 288; ++i) {
            $name = t1[i];
            if ($name != null)
              t1[(i | t2) >>> 0] = header + C.JSString_methods.substring$1($name, 7);
          }
        }
        for (t2 = this._strToKey, i = 0; i < 385; ++i) {
          t3 = t1[i];
          if (t3 != null)
            t2.$indexSet(0, J.toUpperCase$0$s(t3), i);
        }
      },
      static: {
        ByondMacro_isGamepadButtonMacro: function(id) {
          id &= 65439;
          return id >= 256 && id <= 275;
        },
        ByondMacro_isGamepadButtonDirMacro: function(id) {
          id &= 65439;
          return id >= 268 && id <= 275;
        },
        ByondMacro_isGamepadAnalogMacro: function(id) {
          id &= 65439;
          return id >= 276 && id <= 277;
        },
        ByondMacro_isGamepadDpadMacro: function(id) {
          id &= 65439;
          return id >= 282 && id <= 283;
        },
        ByondMacro$: function() {
          var t1, t2, t3, t4, t5, t6;
          t1 = P.String;
          t2 = N.ByondMacroData;
          t3 = P.HashMap_HashMap(null, null, null, t1, t2);
          t2 = P.HashMap_HashMap(null, null, null, t1, t2);
          t4 = P.HashMap_HashMap(null, null, null, t1, P.bool);
          t5 = new P.Stopwatch(0, 0);
          if ($.Stopwatch__frequency == null) {
            H.Primitives_initTicker();
            $.Stopwatch__frequency = $.Primitives_timerFrequency;
          }
          t5._core$_start = $.Primitives_timerTicks.call$0() - 0;
          t5._stop = null;
          t6 = new Array(385);
          t6.fixed$length = Array;
          t1 = new N.ByondMacro(t3, t2, t4, [], t5, null, t6, P.HashMap_HashMap(null, null, null, t1, P.$int));
          t1.ByondMacro$0();
          return t1;
        },
        ByondMacro_combineCodes: function(code, newcode) {
          var t1, t2, comb, id, code0, p1, p2;
          t1 = C.JSInt_methods._shrOtherPositive$1(newcode, 16);
          if (t1 !== 0)
            return N.ByondMacro_combineCodes(N.ByondMacro_combineCodes(code, newcode & 65535), t1);
          t1 = C.JSInt_methods._shrOtherPositive$1(code, 16);
          if (t1 !== 0) {
            t2 = code & 65535;
            comb = N.ByondMacro_combineCodes(t2, newcode);
            if (comb === 4294967295)
              return comb;
            if (C.JSInt_methods._shrOtherPositive$1(comb, 16) === 0)
              return (comb | code & 4294901760) >>> 0;
            comb = N.ByondMacro_combineCodes(t1, newcode);
            if (comb === 4294967295)
              return comb;
            if (C.JSInt_methods._shrOtherPositive$1(comb, 16) === 0)
              return (t2 | comb << 16) >>> 0;
            return code;
          }
          id = code & 65439;
          if (id >= 268 && id <= 275) {
            id = newcode & 65439;
            t1 = id >= 268 && id <= 275;
          } else
            t1 = false;
          if (t1) {
            code0 = C.List_zrv[C.List_2Vk1[(code & 63999) - 268] | C.List_2Vk1[newcode - 268]];
            if (code0 === 0)
              return 4294967295;
            code = (code0 | code & 1536) >>> 0;
          }
          p1 = N.ByondMacro_codePriority(code);
          p2 = N.ByondMacro_codePriority(newcode);
          if (p2 >= p1)
            t1 = p1 === p2 && newcode < code;
          else
            t1 = true;
          if (t1)
            return (newcode | code << 16) >>> 0;
          return (code | newcode << 16) >>> 0;
        },
        ByondMacro_codePriority: function(code) {
          var t1 = C.JSInt_methods._shrOtherPositive$1(code, 16);
          if (t1 !== 0)
            return P.max(N.ByondMacro_codePriority(code & 65535), N.ByondMacro_codePriority(t1));
          if (code === 0)
            return 0;
          if (code > 0 && code <= 255)
            return 1;
          if (N.ByondMacro_isGamepadButtonDirMacro(code))
            return 4;
          if (N.ByondMacro_isGamepadButtonMacro(code))
            return 2;
          if (N.ByondMacro_isGamepadAnalogMacro(code))
            return 5;
          if (N.ByondMacro_isGamepadDpadMacro(code))
            return 6;
          return 0;
        }
      }
    },
    ByondMacro_lookup_closure: {
      "^": "Closure:33;",
      call$1: function(m) {
        return C.JSString_methods.$add("\\", m.group$1(0));
      }
    },
    ByondMacro_lookup_closure0: {
      "^": "Closure:33;",
      call$1: function(m) {
        return C.JSString_methods.$add("\\", m.group$1(0));
      }
    },
    ByondMacro_lookup_TryMatch: {
      "^": "Closure:48;$this,keyCode",
      call$1: function(f) {
        var t1, t2, iter, t3, other, data, other0;
        t1 = this.$this;
        t2 = t1._keyToMacro;
        t2 = t2.get$values(t2);
        iter = new H.MappedIterator(null, J.get$iterator$ax(t2.__internal$_iterable), t2._f, [H.getTypeArgumentByIndex(t2, 0), H.getTypeArgumentByIndex(t2, 1)]);
        for (t2 = this.keyCode, t3 = t1._keyToMacroLocal, other = null; iter.moveNext$0();) {
          data = iter.__internal$_current;
          if (t3.$index(0, data.name) != null)
            continue;
          other = data.keyCode;
          other0 = other & 65535;
          if (other0 === t2)
            other = C.JSInt_methods._shrOtherPositive$1(other, 16);
          else {
            if (!(C.JSInt_methods._shrOtherPositive$1(other, 16) === t2))
              continue;
            other = other0;
          }
          if (other !== 0 && t1._getKeyInfo$1(other) == null)
            continue;
          f.call$2(data, other);
        }
        t3 = t3.get$values(t3);
        iter = new H.MappedIterator(null, J.get$iterator$ax(t3.__internal$_iterable), t3._f, [H.getTypeArgumentByIndex(t3, 0), H.getTypeArgumentByIndex(t3, 1)]);
        for (; iter.moveNext$0();) {
          data = iter.__internal$_current;
          other = data.keyCode;
          other0 = other & 65535;
          if (other0 === t2)
            other = C.JSInt_methods._shrOtherPositive$1(other, 16);
          else {
            if (!(C.JSInt_methods._shrOtherPositive$1(other, 16) === t2))
              continue;
            other = other0;
          }
          if (other !== 0 && t1._getKeyInfo$1(other) == null)
            continue;
          f.call$2(data, other);
        }
      }
    },
    ByondMacro_lookup_closure1: {
      "^": "Closure:25;_box_0,$this,keyCode",
      call$2: function(data, other) {
        var t1, t2, t3, _command, key1, key2;
        t1 = other !== 0;
        if (t1 && !N.ByondMacro_isGamepadButtonMacro(other))
          return;
        if (t1 && other < this.keyCode)
          return;
        t1 = data.isUp;
        t2 = this._box_0;
        t3 = t2.isUp;
        if (t1 == null ? t3 == null : t1 === t3)
          t1 = !t2.isRep || data.isRep;
        else
          t1 = false;
        if (t1) {
          _command = data.command;
          if (_command != null) {
            if (C.JSString_methods.indexOf$1(_command, "[[id]]") >= 0) {
              t1 = this.$this.lookupName$1(data.keyCode);
              H.checkString(t1);
              _command = H.stringReplaceAllUnchecked(_command, "[[id]]", t1);
            }
            if (J.indexOf$1$asx(_command, "[[value]]") >= 0) {
              t1 = t2.value;
              if (typeof t1 === "number")
                t1 = N.niceNum(t1);
              else
                t1 = t2.isUp ? "0" : "1";
              H.checkString(t1);
              _command = H.stringReplaceAllUnchecked(_command, "[[value]]", t1);
            }
            if (J.indexOf$1$asx(_command, "[[*]]") >= 0) {
              t1 = t2.value;
              if (typeof t1 === "number")
                t1 = N.niceNum(t1);
              else
                t1 = t2.isUp ? "0" : "1";
              H.checkString(t1);
              _command = H.stringReplaceAllUnchecked(_command, "[[*]]", t1);
            }
            if (t2.command == null)
              t2.command = _command;
            $.$get$ByondJS_skin().doInput$1(_command);
          }
        }
        if (!t2.isRep && data.mapToCode !== 0) {
          t1 = data.mapToCode;
          key1 = t1 & 65535;
          key2 = C.JSInt_methods._shrOtherPositive$1(t1, 16);
          if (!(key1 > 0 && key1 <= 255))
            key1 = 0;
          if (!(key2 > 0 && key2 <= 255))
            key2 = 0;
          if (key1 > 0 && key1 <= 255)
            this.$this.lookup$6$isMap(key1, false, false, false, !t2.isUp, true);
          if (key2 > 0 && key2 <= 255)
            this.$this.lookup$6$isMap(key2, false, false, false, !t2.isUp, true);
        }
      },
      call$1: function(data) {
        return this.call$2(data, null);
      }
    },
    ByondMacro_lookup_closure2: {
      "^": "Closure:25;_box_0,$this",
      call$2: function(data, other) {
        var t1, _command, t2;
        t1 = this._box_0;
        if (!t1.isRep || data.isRep) {
          _command = data.command;
          if (_command != null) {
            if (C.JSString_methods.indexOf$1(_command, "[[id]]") >= 0) {
              t2 = this.$this.lookupName$1(data.keyCode);
              H.checkString(t2);
              _command = H.stringReplaceAllUnchecked(_command, "[[id]]", t2);
            }
            if (J.indexOf$1$asx(_command, "[[x]]") >= 0) {
              t2 = N.niceNum(t1.x);
              H.checkString(t2);
              _command = H.stringReplaceAllUnchecked(_command, "[[x]]", t2);
            }
            if (J.indexOf$1$asx(_command, "[[y]]") >= 0) {
              t2 = N.niceNum(t1.y);
              H.checkString(t2);
              _command = H.stringReplaceAllUnchecked(_command, "[[y]]", t2);
            }
            if (J.indexOf$1$asx(_command, "[[value]]") >= 0)
              _command = H.stringReplaceAllUnchecked(_command, "[[value]]", C.JSString_methods.$add(N.niceNum(t1.x) + ",", N.niceNum(t1.y)));
            if (J.indexOf$1$asx(_command, "[[*]]") >= 0)
              _command = H.stringReplaceAllUnchecked(_command, "[[*]]", C.JSString_methods.$add(N.niceNum(t1.x) + ",", N.niceNum(t1.y)));
            if (t1.command == null)
              t1.command = _command;
            $.$get$ByondJS_skin().doInput$1(_command);
          }
        }
      },
      call$1: function(data) {
        return this.call$2(data, null);
      }
    },
    ByondMacro_lookup_closure3: {
      "^": "Closure:50;_box_0,$this",
      call$1: function(data) {
        var t1, _command, t2;
        t1 = this._box_0;
        if (!t1.isRep || data.get$isRep()) {
          _command = data.get$command();
          if (_command.indexOf$1(0, "[[id]]").$ge(0, 0))
            _command = _command.replaceAll$2(0, "[[id]]", this.$this.lookupName$1(data.get$keyCode(data)));
          if (_command.indexOf$1(0, "[[value]]").$ge(0, 0)) {
            t2 = t1.value;
            _command = _command.replaceAll$2(0, "[[value]]", typeof t2 === "number" ? N.niceNum(t2) : "0");
          }
          if (_command.indexOf$1(0, "[[*]]").$ge(0, 0)) {
            t2 = t1.value;
            _command = _command.replaceAll$2(0, "[[*]]", typeof t2 === "number" ? N.niceNum(t2) : "0");
          }
          if (t1.command == null)
            t1.command = _command;
          $.$get$ByondJS_skin().doInput$1(_command);
        }
      }
    },
    PixelFilter: {
      "^": "BitmapFilter;",
      renderFilter$3: function(renderState, renderTextureQuad, pass) {
        renderTextureQuad.renderTexture.set$filtering(C.RenderTextureFiltering_9728);
        renderState._engine$_renderContext.renderTextureQuad$2(renderState, renderTextureQuad);
      }
    },
    ByondMap: {
      "^": "Stage;mainSprite,viewSprite,screenSprite,fullWidth,fullHeight,name,control>,unsorted,sorted,screenLeft,screenRight,screenBottom,screenTop,screenBottomStart,_fullRect,_clipRect,resort,sorting,_webclient$_canvas,_hq,color,colorMap,_display$_canvas,_renderContext,_renderLoop,_sourceWidth,_sourceHeight,_stageWidth,_stageHeight,Stage__pixelRatio,_contentRectangle,_clientTransformation,_stageTransformation,_renderState,_inputEventMode,_stageRenderMode,_stageScaleMode,_stageAlign,_mouseCursor,_mousePosition,_mouseTarget,_drags,_touchPoints,_mouseButtons,juggler,focus,backgroundColor,preventDefaultOnTouch,preventDefaultOnMouse,preventDefaultOnWheel,preventDefaultOnKeyboard,_children,_mouseChildren,_tabChildren,doubleClickEnabled,mouseEnabled,mouseCursor,tabEnabled,tabIndex,displayObjectID,_display$_x,_display$_y,_pivotX,_pivotY,_scaleX,_scaleY,_skewX,_skewY,_rotation,_alpha,_visible,_off,_mask,_blendMode,_filters,_cache,_display$_name,_parent,_transformationMatrix,_transformationMatrixRefresh,userData,_pixelRatio,_eventStreams",
      set$hq: function(b) {
        var t1, old, oldChildren;
        t1 = this._hq;
        if (t1 == null ? b == null : t1 === b)
          return;
        old = t1 ? this.mainSprite : this;
        oldChildren = P.List_List$from(new A.DisplayObjectChildren(old, old._children), true, null);
        this._hq = b;
        this.removeChildren$0();
        C.JSArray_methods.set$length(this.screenSprite._filters, 0);
        C.JSArray_methods.set$length(this.viewSprite._filters, 0);
        t1 = this.mainSprite;
        C.JSArray_methods.set$length(t1._filters, 0);
        C.JSArray_methods.set$length(this._filters, 0);
        if (this._hq) {
          this.addChildAt$2(t1, this._children.length);
          new A.DisplayObjectChildren(t1, t1._children).addAll$1(0, oldChildren);
          t1._pixelRatio = 1;
          t1._filters.push(new N.PixelFilter());
          this._filters.push(new K.FlattenFilter());
        } else {
          t1.removeChildren$0();
          new A.DisplayObjectChildren(this, this._children).addAll$1(0, oldChildren);
        }
        this._resized$1(null);
      },
      _resized$1: [function($event) {
        var t1, t2, clientWidth, clientHeight, zoom;
        t1 = this._hq;
        t2 = this.fullWidth;
        if (t1) {
          t1 = this._webclient$_canvas;
          clientWidth = t1.clientWidth;
          clientHeight = t1.clientHeight;
          zoom = C.JSNumber_methods.round$0(P.max(1, P.min(clientWidth / P.max(t2, 1), clientHeight / P.max(this.fullHeight, 1))));
          this._sourceWidth = V.ensureInt(C.JSInt_methods.round$0(this.fullWidth * zoom));
          this._updateCanvasSize$0();
          this._sourceHeight = V.ensureInt(C.JSInt_methods.round$0(this.fullHeight * zoom));
          this._updateCanvasSize$0();
          t2 = this.mainSprite;
          t2.set$scaleY(zoom);
          t2.set$scaleX(zoom);
        } else {
          this._sourceWidth = V.ensureInt(t2);
          this._updateCanvasSize$0();
          this._sourceHeight = V.ensureInt(this.fullHeight);
          this._updateCanvasSize$0();
        }
      }, "call$1", "get$_resized", 2, 0, 32],
      mappedColor$1: function(c) {
        var t1, t2, r;
        t1 = this.color;
        if (t1 == null)
          return c;
        if (c == null)
          return t1;
        t1 = this.colorMap;
        t2 = c._strHash;
        if (t2 == null) {
          t2 = c.matrix;
          t2 = t2 != null ? t2.get$strHash() : C.JSInt_methods.toRadixString$1((c.alpha << 24 | c.red << 16 | c.green << 8 | c.blue) >>> 0, 16);
          c._strHash = t2;
        }
        r = t1.$index(0, t2);
        if (r == null) {
          t1 = this.colorMap;
          t2 = c._strHash;
          if (t2 == null) {
            t2 = c.matrix;
            t2 = t2 != null ? t2.get$strHash() : C.JSInt_methods.toRadixString$1((c.alpha << 24 | c.red << 16 | c.green << 8 | c.blue) >>> 0, 16);
            c._strHash = t2;
          }
          r = c.$mul(0, this.color);
          t1.$indexSet(0, t2, r);
        }
        return r;
      },
      CheckColor$1: function(c) {
        var t1, t2, _i, m;
        if (!N.ColorEqual(this.color, c)) {
          this.color = c != null && !c.get$isWhite() ? c : null;
          this.colorMap = P.HashMap_HashMap(null, null, null, P.String, N.AtomColor);
          if (this.color != null)
            for (t1 = this.unsorted, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
              m = t1[_i];
              if (!m.noClientColor) {
                m.color = this.mappedColor$1(m.baseColor);
                if ((m.flags & 1) !== 0)
                  m.updateScreen$0();
                m.updated = true;
              }
            }
          else
            for (t1 = this.unsorted, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
              m = t1[_i];
              m.color = m.baseColor;
              if ((m.flags & 1) !== 0)
                m.updateScreen$0();
              m.updated = true;
            }
        }
      },
      mouseCommand$1: function(e) {
        var button, t1, ma;
        button = e.button;
        t1 = e.type;
        if (t1 === "mouseup" || t1 === "mouseleave")
          if ($.ByondMap_dragAtom != null) {
            ma = N.MouseAtom$fromSkin(0, null, null, null, null);
            if (button == null)
              button = 0;
            if ((button & 1) !== 0)
              ma.mouseFlags |= 1;
            if ((button & 2) !== 0)
              ma.mouseFlags |= 2;
            if ((button & 4) !== 0)
              ma.mouseFlags |= 4;
            if (e.shiftKey)
              ma.mouseFlags |= 16;
            if (e.ctrlKey)
              ma.mouseFlags |= 8;
            if (e.altKey)
              ma.mouseFlags |= 32;
            $.me.sendMouseDragDropMessage$3(7, $.ByondMap_dragAtom, ma);
            $.ByondMap_dragAtom = null;
          }
      },
      set$clipRect: function(rect) {
        var t1, t2;
        t1 = rect == null;
        t2 = this.viewSprite;
        if (t1)
          t2._mask = null;
        else
          t2._mask = new A._RectangleMask(new U.Rectangle0(rect.left, rect.top, rect.width, rect.height, [P.num]), T.Matrix$fromIdentity(), T.Matrix$fromIdentity(), false, false, 4278190080, 1);
        t2 = [P.num];
        this.screenSprite._mask = new A._RectangleMask(new U.Rectangle0(0, 0, this.fullWidth, this.fullHeight, t2), T.Matrix$fromIdentity(), T.Matrix$fromIdentity(), false, false, 4278190080, 1);
        if (t1)
          rect = new U.Rectangle0(0, 0, this.fullWidth, this.fullHeight, [null]);
        this._fullRect = new U.Rectangle0(0, 0, this.fullWidth, this.fullHeight, t2);
        this._clipRect = new U.Rectangle0(rect.left, rect.top, rect.width, rect.height, t2);
      },
      _mouseClickHandler$2: function($event, buttonFlags) {
        var t1 = $event._events$_target;
        if (t1 instanceof N.MapAtom) {
          $.ByondMap_overAtom = N.MouseAtom$(this, t1, $event, buttonFlags);
          if (buttonFlags === 2 && $.me.rclick$1(this.control)) {
            $.me.sendMouseMessage$2(8, $.ByondMap_overAtom);
            this.clearMouseInfo$0();
            return;
          }
          $.me.sendMouseMessage$2(1, $.ByondMap_overAtom);
          this.clearMouseInfo$0();
        } else if (t1 === this) {
          t1 = N.MouseAtom$(this, null, $event, buttonFlags);
          $.ByondMap_overAtom = t1;
          $.me.sendMouseMessage$2(1, t1);
          this.clearMouseInfo$0();
        }
      },
      _mouseDblClickHandler$2: function($event, buttonFlags) {
        var t1 = $event._events$_target;
        if (t1 instanceof N.MapAtom) {
          t1 = N.MouseAtom$(this, t1, $event, buttonFlags);
          $.ByondMap_overAtom = t1;
          $.me.sendMouseMessage$2(2, t1);
          this.clearMouseInfo$0();
        } else if (t1 === this) {
          t1 = N.MouseAtom$(this, null, $event, buttonFlags);
          $.ByondMap_overAtom = t1;
          $.me.sendMouseMessage$2(2, t1);
          this.clearMouseInfo$0();
        }
      },
      _mouseDownHandler$2: function($event, buttonFlags) {
        var t1 = $event._events$_target;
        if (t1 instanceof N.MapAtom) {
          $.ByondMap_overAtom = N.MouseAtom$(this, t1, $event, buttonFlags);
          this.clearMouseInfo$0();
          t1 = $.ByondMap_overAtom;
          $.ByondMap_dragAtom = t1;
          $.me.sendMouseMessage$2(3, t1);
        }
      },
      _mouseUpHandler$2: function($event, buttonFlags) {
        var exception, t1, mouseAtom;
        if (J.$eq$($.$get$ByondJS_skin().mouseCapture, this.control))
          try {
            this.control.callMethod$1("releaseMouse");
          } catch (exception) {
            H.unwrapException(exception);
          }
        t1 = $event._events$_target;
        mouseAtom = N.MouseAtom$(this, t1 instanceof N.MapAtom ? t1 : null, $event, buttonFlags);
        $.me.sendMouseMessage$2(4, mouseAtom);
        t1 = $.ByondMap_dragAtom;
        if (t1 != null && mouseAtom.compare$1(t1) !== 0)
          $.me.sendMouseDragDropMessage$3(7, $.ByondMap_dragAtom, mouseAtom);
        $.ByondMap_overAtom = mouseAtom;
        this.clearMouseInfo$0();
      },
      _mouseMoveHandler$1: [function($event) {
        var exception, t1, mouseAtom, res;
        if (J.$eq$($.$get$ByondJS_skin().mouseCapture, this.control))
          try {
            this.control.callMethod$1("releaseMouse");
          } catch (exception) {
            H.unwrapException(exception);
          }
        t1 = $event._events$_target;
        mouseAtom = N.MouseAtom$(this, t1 instanceof N.MapAtom ? t1 : null, $event, 0);
        res = mouseAtom.compare$1($.ByondMap_moveAtom);
        if ($event.buttonDown || $event._type === "drag" || $.ByondMap_dragAtom != null) {
          t1 = $.ByondMap_dragAtom;
          if (t1 != null && res !== 0)
            $.me.sendMouseDragDropMessage$3(6, t1, mouseAtom);
        } else if (res === 2)
          $.me.sendMouseMessage$3(5, mouseAtom, $.ByondMap_moveAtom);
        else if (res === 1)
          $.me.sendMouseMessage$2(21, mouseAtom);
        $.ByondMap_moveAtom = mouseAtom;
        $.ByondMap_overAtom = null;
        if (res === 2)
          N.ByondMap_mouseAtomChanged();
      }, "call$1", "get$_mouseMoveHandler", 2, 0, 31],
      _mouseLeaveHandler$1: [function($event) {
        var exception;
        if ($.ByondMap_dragAtom != null)
          try {
            this.control.callMethod$1("captureMouse");
          } catch (exception) {
            H.unwrapException(exception);
          }
        if ($.ByondMap_dragAtom == null && $.ByondMap_moveAtom != null) {
          $.me.sendMouseMessage$3(5, N.MouseAtom$(this, null, null, 0), $.ByondMap_moveAtom);
          $.ByondMap_overAtom = null;
          this.clearMouseInfo$0();
        }
      }, "call$1", "get$_mouseLeaveHandler", 2, 0, 32],
      _mouseWheelHandler$1: [function($event) {
        var t1 = $event._events$_target;
        if (t1 instanceof N.MapAtom) {
          t1 = N.MouseAtom$(this, t1, $event, 0);
          $.ByondMap_overAtom = t1;
          $.me.sendMouseMessage$5(25, t1, null, "", new P.Point($event.deltaX, -$event.deltaY, [null]));
          this.clearMouseInfo$0();
        } else if (t1 === this) {
          t1 = N.MouseAtom$(this, null, $event, 0);
          $.ByondMap_overAtom = t1;
          $.me.sendMouseMessage$5(25, t1, null, "", new P.Point($event.deltaX, -$event.deltaY, [null]));
          this.clearMouseInfo$0();
        }
      }, "call$1", "get$_mouseWheelHandler", 2, 0, 31],
      clearMouseInfo$0: function() {
        var t1, hadMove;
        t1 = $.ByondMap_moveAtom;
        hadMove = t1 != null && t1.info.id !== 0;
        $.ByondMap_moveAtom = null;
        $.ByondMap_dragAtom = null;
        if (hadMove)
          N.ByondMap_mouseAtomChanged();
      },
      updateAtomIcon$1: function(icon) {
        var icons, i, i0;
        if (icon == null)
          return;
        icons = N.MapInfo_allMapIcons();
        for (i = icons.length; i0 = i - 1, i > 0; i = i0)
          icons[i0].updateAtomIcon$1(icon);
      },
      doAtoms$2: function(atomIds, inUse) {
        var t1, uslen, atom, i, m, group, t2, i0, dirty, jlen, j;
        t1 = this.unsorted;
        uslen = t1.length;
        for (atom = null, i = 0; i < uslen; ++i) {
          m = t1[i];
          group = m.group;
          if (!J.$eq$(inUse.$index(0, group), true)) {
            m.removed = true;
            t2 = m.screen;
            if (t2 != null)
              t2.removed = true;
            i0 = i - 1;
            C.JSArray_methods.removeAt$1(t1, i);
            --uslen;
            i = i0;
          } else {
            atom = $.me.infoMap.$index(0, group);
            dirty = atom.icons_dirty || atom.position_dirty;
            atom.position_dirty = false;
            i = this.copyScreenMapAtoms$3(this.copyMapAtoms$3(i, atom, dirty), atom, dirty) - 1;
            uslen = t1.length;
            inUse.remove$1(0, group);
          }
        }
        jlen = atomIds.length;
        for (j = 0; j < jlen; ++j) {
          group = atomIds[j];
          if (!J.$eq$(inUse.$index(0, group), true))
            continue;
          atom = $.me.infoMap.$index(0, group);
          i = this.copyMapAtoms$3(t1.length, atom, true);
          this.copyScreenMapAtoms$3(i, atom, true);
        }
        if (this.resort)
          this.sort$0(0);
        else
          this.nonsort$0();
      },
      doScreenAtoms$2: function(atomIds, dirty) {
        var t1, uslen, atom, i, m, group, wasDirty, t2, i0, jlen, j;
        t1 = this.unsorted;
        uslen = t1.length;
        for (atom = null, i = 0; i < uslen; ++i) {
          m = t1[i];
          group = m.group;
          wasDirty = dirty.$index(0, group);
          if (wasDirty == null) {
            m.removed = true;
            t2 = m.screen;
            if (t2 != null)
              t2.removed = true;
            i0 = i - 1;
            C.JSArray_methods.removeAt$1(t1, i);
            --uslen;
            i = i0;
          } else {
            atom = $.me.infoMap.$index(0, group);
            atom.position_dirty = false;
            i = this.copyScreenMapAtoms$3(i, atom, wasDirty) - 1;
            uslen = t1.length;
            dirty.remove$1(0, group);
          }
        }
        jlen = atomIds.length;
        for (j = 0; j < jlen; ++j) {
          group = atomIds[j];
          if (!J.$eq$(dirty.$index(0, group), true))
            continue;
          atom = $.me.infoMap.$index(0, group);
          i = t1.length;
          this.copyScreenMapAtoms$3(i, atom, true);
        }
        if (this.resort)
          this.sort$0(0);
        else
          this.nonsort$0();
      },
      copyMapAtoms$3: function(idx, info, dirty) {
        var t1, uslen, ib, group, mo, t2, icons, len, homeX, homeY, i, t3, t4, olayer, oplane;
        t1 = this.unsorted;
        uslen = t1.length;
        ib = info.x >= 0 && info.z === $.me.mapHomeZ;
        group = info.id;
        if (ib) {
          if (!dirty) {
            mo = null;
            while (true) {
              if (idx < uslen) {
                mo = t1[idx];
                t2 = mo.group;
                t2 = (t2 == null ? group == null : t2 === group) && (mo.flags & 1) === 0;
              } else
                t2 = false;
              if (!t2)
                break;
              ++idx;
            }
            return idx;
          }
          if (info.mapOffset_dirty)
            info.calculateMapOffset$0();
          info.RefreshIcons$0();
          icons = info._mapicons;
          len = icons.length;
          t2 = $.me;
          homeX = t2.mapHomeX + info.mapOffsetX;
          homeY = t2.mapHomeY + info.mapOffsetY;
          for (t2 = [A.DisplayObject], mo = null, i = 0; i < len; ++i) {
            if (idx < uslen) {
              mo = t1[idx];
              t3 = mo.group;
              t3 = (t3 == null ? group != null : t3 !== group) || (mo.flags & 1) !== 0;
            } else
              t3 = true;
            if (t3) {
              t3 = H.setRuntimeTypeInfo([], t2);
              t4 = $.DisplayObject__nextID;
              $.DisplayObject__nextID = t4 + 1;
              mo = new N.MapAtom(null, null, null, null, null, true, true, null, 0, 0, 0, null, null, null, null, 1, 1, 0, 0, 0, false, null, null, false, null, 0, 0, 0, 0, 0, 0, null, null, 0, 0, null, null, null, null, true, true, 0, 0, 0, 0, 0, 0, null, null, null, true, null, null, null, t3, true, true, false, true, "auto", true, 0, t4, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
              t4 = $.DisplayObject__nextID;
              $.DisplayObject__nextID = t4 + 1;
              t4 = new A.Bitmap(null, t4, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
              mo.bitmap = t4;
              mo.addChildAt$2(t4, t3.length);
              mo.doubleClickEnabled = true;
              C.JSArray_methods.insert$2(t1, idx, mo);
              ++uslen;
              mo.copyFrom$1(icons[i]);
              this.resort = true;
            } else {
              olayer = mo._layer;
              oplane = mo.plane;
              mo.copyFrom$1(icons[i]);
              if (olayer !== mo._layer || oplane !== mo.plane)
                this.resort = true;
            }
            mo.color = this.color != null && !mo.noClientColor ? this.mappedColor$1(mo.baseColor) : mo.baseColor;
            mo.group = group;
            mo.tile_x = info.tile_x;
            mo.tile_y = info.tile_y;
            mo.copyPos$2(homeX, homeY);
            mo.updateScreen$0();
            mo.updated = true;
            mo.redraw$0();
            ++idx;
          }
          if ((info.id & 4278190080) >>> 0 === 16777216) {
            t3 = $.me.infoMap.$index(0, info.locId);
            if (t3 != null) {
              t3.RefreshIcons$0();
              icons = t3._mapicons;
              len = icons.length;
              for (i = 0; i < len; ++i) {
                if (idx < uslen) {
                  mo = t1[idx];
                  t3 = mo.group;
                  t3 = (t3 == null ? group != null : t3 !== group) || (mo.flags & 1) !== 0;
                } else
                  t3 = true;
                if (t3) {
                  t3 = H.setRuntimeTypeInfo([], t2);
                  t4 = $.DisplayObject__nextID;
                  $.DisplayObject__nextID = t4 + 1;
                  mo = new N.MapAtom(null, null, null, null, null, true, true, null, 0, 0, 0, null, null, null, null, 1, 1, 0, 0, 0, false, null, null, false, null, 0, 0, 0, 0, 0, 0, null, null, 0, 0, null, null, null, null, true, true, 0, 0, 0, 0, 0, 0, null, null, null, true, null, null, null, t3, true, true, false, true, "auto", true, 0, t4, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
                  t4 = $.DisplayObject__nextID;
                  $.DisplayObject__nextID = t4 + 1;
                  t4 = new A.Bitmap(null, t4, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
                  mo.bitmap = t4;
                  mo.addChildAt$2(t4, t3.length);
                  mo.doubleClickEnabled = true;
                  C.JSArray_methods.insert$2(t1, idx, mo);
                  ++uslen;
                  mo.copyFrom$1(icons[i]);
                  this.resort = true;
                } else {
                  olayer = mo._layer;
                  oplane = mo.plane;
                  mo.copyFrom$1(icons[i]);
                  if (olayer !== mo._layer || oplane !== mo.plane)
                    this.resort = true;
                }
                mo.group = group;
                mo.tile_x = info.tile_x;
                mo.tile_y = info.tile_y;
                mo.copyPos$2(homeX, homeY);
                mo.updateScreen$0();
                mo.updated = true;
                ++idx;
              }
            }
          }
        } else
          mo = null;
        while (true) {
          if (idx < uslen) {
            mo = t1[idx];
            t2 = mo.group;
            t2 = (t2 == null ? group == null : t2 === group) && (mo.flags & 1) === 0;
          } else
            t2 = false;
          if (!t2)
            break;
          mo.removed = true;
          C.JSArray_methods.removeAt$1(t1, idx);
          --uslen;
        }
        return idx;
      },
      copyScreenMapAtoms$3: function(idx, info, dirty) {
        var sr, icons, t1, uslen, len, group, mo, t2, t3, t4, t5, t6, t7, t8, homeY, y, i, t9, homeX, x, olayer;
        sr = info.screenLoc;
        info.RefreshIcons$0();
        icons = info._screenicons;
        t1 = this.unsorted;
        uslen = t1.length;
        len = icons != null ? icons.length : 0;
        group = info.id;
        if (!dirty) {
          mo = null;
          while (true) {
            if (idx < uslen) {
              mo = t1[idx];
              t2 = mo.group;
              t2 = (t2 == null ? group == null : t2 === group) && (mo.flags & 1) !== 0;
            } else
              t2 = false;
            if (!t2)
              break;
            ++idx;
          }
          return idx;
        }
        if (info.onScreen) {
          t2 = info.screenLoc;
          t2 = t2 != null && t2.c1 != null;
        } else
          t2 = false;
        if (t2) {
          t2 = sr.c1;
          t2 = t2 != null ? t2.map : null;
          t3 = this.name;
          t3 = t2 == null ? t3 == null : t2 === t3;
          t2 = t3;
        } else
          t2 = false;
        if (t2) {
          t2 = this.screenBottomStart;
          t3 = sr.c1;
          t4 = t3 != null;
          t5 = t4 ? t3.y : 1;
          t6 = $.me;
          t7 = t6.iconHeight;
          t8 = t4 ? t3.py : 0;
          homeY = (t2 - (t5 - 1)) * t7 - t8;
          y = t4 ? t3.y : 1;
          t2 = [A.DisplayObject];
          t3 = t6;
          mo = null;
          i = null;
          while (true) {
            t4 = sr.c2;
            if (t4 != null)
              t4 = t4.y;
            else {
              t4 = sr.c1;
              t4 = t4 != null ? t4.y : 1;
            }
            if (!(y <= t4))
              break;
            t4 = sr.c1;
            t5 = t4 != null;
            t6 = t5 ? t4.x : 1;
            t7 = this.screenLeft;
            t8 = t3.iconWidth;
            t9 = t5 ? t4.px : 0;
            homeX = (t6 - 1 + t7) * t8 + t9;
            x = t5 ? t4.x : 1;
            while (true) {
              t4 = sr.c2;
              if (t4 != null)
                t4 = t4.x;
              else {
                t4 = sr.c1;
                t4 = t4 != null ? t4.x : 1;
              }
              if (!(x <= t4))
                break;
              for (i = 0; i < len; ++i) {
                if (idx < uslen) {
                  mo = t1[idx];
                  t3 = mo.group;
                  t3 = (t3 == null ? group != null : t3 !== group) || (mo.flags & 1) === 0 || mo.tile_x !== x || mo.tile_y !== y;
                } else
                  t3 = true;
                if (t3) {
                  t3 = H.setRuntimeTypeInfo([], t2);
                  t4 = $.DisplayObject__nextID;
                  $.DisplayObject__nextID = t4 + 1;
                  mo = new N.MapAtom(null, null, null, null, null, true, true, null, 0, 0, 0, null, null, null, null, 1, 1, 0, 0, 0, false, null, null, false, null, 0, 0, 0, 0, 0, 0, null, null, 0, 0, null, null, null, null, true, true, 0, 0, 0, 0, 0, 0, null, null, null, true, null, null, null, t3, true, true, false, true, "auto", true, 0, t4, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
                  t4 = $.DisplayObject__nextID;
                  $.DisplayObject__nextID = t4 + 1;
                  t4 = new A.Bitmap(null, t4, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
                  mo.bitmap = t4;
                  mo.addChildAt$2(t4, t3.length);
                  mo.doubleClickEnabled = true;
                  C.JSArray_methods.insert$2(t1, idx, mo);
                  ++uslen;
                  this.resort = true;
                }
                olayer = mo._layer;
                mo.copyFrom$1(icons[i]);
                if (olayer !== mo._layer)
                  this.resort = true;
                mo.color = this.color != null && !mo.noClientColor ? this.mappedColor$1(mo.baseColor) : mo.baseColor;
                mo.group = group;
                mo.tile_x = x;
                mo.tile_y = y;
                mo.copyPos$2(homeX, homeY);
                mo.updateScreen$0();
                mo.updated = true;
                ++idx;
              }
              while (true) {
                if (idx < uslen) {
                  mo = t1[idx];
                  t3 = mo.group;
                  t3 = (t3 == null ? group == null : t3 === group) && (mo.flags & 1) !== 0 && mo.tile_x === x && mo.tile_y === y;
                } else
                  t3 = false;
                if (!t3)
                  break;
                t1[idx].set$removed(true);
                C.JSArray_methods.removeAt$1(t1, idx);
                --uslen;
              }
              t3 = $.me;
              homeX += t3.iconWidth;
              ++x;
            }
            homeY -= t3.iconHeight;
            ++y;
          }
        } else
          mo = null;
        while (true) {
          if (idx < uslen) {
            mo = t1[idx];
            t2 = mo.group;
            t2 = (t2 == null ? group == null : t2 === group) && (mo.flags & 1) !== 0;
          } else
            t2 = false;
          if (!t2)
            break;
          mo.removed = true;
          t2 = mo.screen;
          if (t2 != null)
            t2.removed = true;
          C.JSArray_methods.removeAt$1(t1, idx);
          --uslen;
        }
        return idx;
      },
      sort$0: function(_) {
        var t1, l, t2, i, t3;
        t1 = this.unsorted;
        l = t1.length;
        if (this.sorting)
          return;
        this.resort = false;
        this.sorting = true;
        t2 = this.sorted;
        if (t2.length !== l)
          C.JSArray_methods.set$length(t2, l);
        for (i = 0; i < l; ++i) {
          t3 = t1[i];
          t2[i] = t3;
          t3.set$unsortedIndex(i);
        }
        switch ($.me.mapformat) {
          case 1:
            C.JSArray_methods.sort$1(t2, N.webclient_ByondMap_isoSort$closure());
            break;
          case 2:
            C.JSArray_methods.sort$1(t2, N.webclient_ByondMap_sideSort$closure());
            break;
          default:
            C.JSArray_methods.sort$1(t2, N.webclient_ByondMap_layerSort$closure());
            break;
        }
        this.postsort$0();
        this.sorting = false;
      },
      postsort$0: function() {
        var t1, t2, i, i0, m;
        t1 = this.unsorted;
        C.JSArray_methods.checkGrowable$1(t1, "removeWhere");
        C.JSArray_methods._removeWhere$2(t1, new N.ByondMap_postsort_closure(), true);
        t2 = this.sorted;
        C.JSArray_methods.checkGrowable$1(t2, "removeWhere");
        C.JSArray_methods._removeWhere$2(t2, new N.ByondMap_postsort_closure0(), true);
        this.ArrangeAll$0();
        for (i = t1.length; i0 = i - 1, i > 0; i = i0) {
          m = t1[i0];
          if (m.updated) {
            m.redraw$0();
            m.updated = false;
          }
        }
      },
      nonsort$0: function() {
        var t1, t2, i, i0, m;
        t1 = this.unsorted;
        C.JSArray_methods.checkGrowable$1(t1, "removeWhere");
        C.JSArray_methods._removeWhere$2(t1, new N.ByondMap_nonsort_closure(), true);
        t2 = this.sorted;
        C.JSArray_methods.checkGrowable$1(t2, "removeWhere");
        C.JSArray_methods._removeWhere$2(t2, new N.ByondMap_nonsort_closure0(), true);
        this.ArrangeAll$0();
        for (i = t1.length; i0 = i - 1, i > 0; i = i0) {
          m = t1[i0];
          if (m.updated) {
            m.redraw$0();
            m.updated = false;
          }
        }
      },
      ArrangeAll$0: function() {
        var t1, len, $top, t2, tlen, newChildren, t3, t4, i, j, ti, m2, s, subs, m, t5, ti0, t6;
        t1 = this.sorted;
        len = t1.length;
        $top = this._hq ? this.mainSprite : this;
        t2 = $top._children;
        tlen = t2.length;
        newChildren = [];
        for (t3 = [P.num], t4 = [A.DisplayObject], i = 0, j = null, ti = 0, m2 = null, s = null, subs = null; i < len; ++i) {
          m = t1[i];
          t5 = m.flags;
          if ((t5 & 256) !== 0) {
            j = i + 1;
            if (j < len && t1[j].get$planeMaster())
              continue;
            t5 = s != null;
            if (!t5 || s.is_screen) {
              if (t5)
                s.UpdateChildren$1(newChildren);
              C.JSArray_methods.set$length(newChildren, 0);
              ti0 = ti + 1;
              if (ti < tlen) {
                if (ti >= t2.length)
                  H.throwExpression(P.ArgumentError$("The supplied index is out of bounds."));
                s = t2[ti];
              } else {
                t5 = H.setRuntimeTypeInfo([], t4);
                t6 = $.DisplayObject__nextID;
                $.DisplayObject__nextID = t6 + 1;
                s = new N.MapPlane(null, null, new U.Rectangle0(0, 0, 1, 1, t3), false, null, true, null, null, null, t5, true, true, false, true, "auto", true, 0, t6, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
                $top.addChildAt$2(s, t2.length);
                ++tlen;
              }
              s.set$bounds(this._clipRect);
              s.is_screen = false;
              ti = ti0;
            }
            newChildren.push(m);
            t5 = this._fullRect;
            if (!J.$eq$(m._fullBounds, t5)) {
              m._fullBounds = t5;
              m.updated = true;
            }
            t5 = this._clipRect;
            if (!J.$eq$(m._mapBounds, t5)) {
              m._mapBounds = t5;
              m.updated = true;
            }
            if (subs == null)
              subs = [];
            else
              C.JSArray_methods.set$length(subs, 0);
            while (true) {
              ++i;
              if (i < len) {
                m2 = t1[i];
                t5 = m2.plane === m.plane;
              } else
                t5 = false;
              if (!t5)
                break;
              subs.push(m2);
            }
            --i;
            m.UpdateChildren$1(subs);
            continue;
          }
          t6 = s != null;
          if (!t6 || s.is_screen !== ((t5 & 1) !== 0)) {
            if (t6)
              s.UpdateChildren$1(newChildren);
            C.JSArray_methods.set$length(newChildren, 0);
            ti0 = ti + 1;
            if (ti < tlen) {
              if (ti >= t2.length)
                H.throwExpression(P.ArgumentError$("The supplied index is out of bounds."));
              s = t2[ti];
            } else {
              t5 = H.setRuntimeTypeInfo([], t4);
              t6 = $.DisplayObject__nextID;
              $.DisplayObject__nextID = t6 + 1;
              s = new N.MapPlane(null, null, new U.Rectangle0(0, 0, 1, 1, t3), false, null, true, null, null, null, t5, true, true, false, true, "auto", true, 0, t6, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
              $top.addChildAt$2(s, t2.length);
              ++tlen;
            }
            t5 = (m.flags & 1) !== 0;
            s.is_screen = t5;
            s.set$bounds(t5 ? this._fullRect : this._clipRect);
            ti = ti0;
          }
          newChildren.push(m);
        }
        if (s != null)
          s.UpdateChildren$1(newChildren);
        if (ti < tlen)
          $top.removeChildren$1(ti);
      },
      ByondMap$7$color$frameRate$height$hq$webGL$width: function(canvas, color, frameRate, height, hq, webGL, width) {
        var t1;
        this.backgroundColor = color;
        this._stageRenderMode = C.StageRenderMode_2;
        this._webclient$_canvas = canvas;
        t1 = $.$get$ByondJS_skin();
        t1 = t1.find$1(0, t1.controlParent$1(canvas));
        this.control = t1;
        if (t1 != null)
          this.name = J.$eq$(t1.$index(0, "isDefault"), true) ? null : this.control.$index(0, "id");
        this.doubleClickEnabled = true;
        this._hq = null;
        this.set$hq(hq);
        this._resized$1(null);
        this.on$1(0, "resize")._subscribe$3(this.get$_resized(), false, 0);
        this.on$1(0, "click")._subscribe$3(new N.ByondMap_closure(this), false, 0);
        this.on$1(0, "doubleClick")._subscribe$3(new N.ByondMap_closure0(this), false, 0);
        this.on$1(0, "mouseDown")._subscribe$3(new N.ByondMap_closure1(this), false, 0);
        this.on$1(0, "mouseUp")._subscribe$3(new N.ByondMap_closure2(this), false, 0);
        this.on$1(0, "middleClick")._subscribe$3(new N.ByondMap_closure3(this), false, 0);
        this.on$1(0, "middleDoubleClick")._subscribe$3(new N.ByondMap_closure4(this), false, 0);
        this.on$1(0, "middleMouseDown")._subscribe$3(new N.ByondMap_closure5(this), false, 0);
        this.on$1(0, "middleMouseUp")._subscribe$3(new N.ByondMap_closure6(this), false, 0);
        this.on$1(0, "rightClick")._subscribe$3(new N.ByondMap_closure7(this), false, 0);
        this.on$1(0, "rightDoubleClick")._subscribe$3(new N.ByondMap_closure8(this), false, 0);
        this.on$1(0, "rightMouseDown")._subscribe$3(new N.ByondMap_closure9(this), false, 0);
        this.on$1(0, "rightMouseUp")._subscribe$3(new N.ByondMap_closure10(this), false, 0);
        this.on$1(0, "mouseMove")._subscribe$3(this.get$_mouseMoveHandler(), false, 0);
        this.on$1(0, "mouseLeave")._subscribe$3(this.get$_mouseLeaveHandler(), false, 0);
        this.on$1(0, "mouseWheel")._subscribe$3(this.get$_mouseWheelHandler(), false, 0);
      },
      static: {
        ByondMap$: function(canvas, color, frameRate, height, hq, webGL, width) {
          var t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, opts, t12, t13, t14, t15, t16, t17, t18;
          t1 = [A.DisplayObject];
          t2 = H.setRuntimeTypeInfo([], t1);
          t3 = $.DisplayObject__nextID;
          $.DisplayObject__nextID = t3 + 1;
          t4 = T.Matrix$fromIdentity();
          t5 = H.setRuntimeTypeInfo([], t1);
          t6 = $.DisplayObject__nextID;
          $.DisplayObject__nextID = t6 + 1;
          t7 = T.Matrix$fromIdentity();
          t8 = H.setRuntimeTypeInfo([], t1);
          t9 = $.DisplayObject__nextID;
          $.DisplayObject__nextID = t9 + 1;
          t10 = T.Matrix$fromIdentity();
          t11 = P.HashMap_HashMap(null, null, null, P.String, N.AtomColor);
          opts = new A.StageOptions(C.RenderEngine_0, C.InputEventMode_0, C.StageRenderMode_0, C.StageScaleMode_3, C.StageAlign_4, 4294967295, false, false, 5, true, true, false, false);
          opts.renderEngine = webGL ? C.RenderEngine_0 : C.RenderEngine_1;
          t12 = P.num;
          t13 = T.Matrix$fromIdentity();
          t14 = T.Matrix$fromIdentity();
          t15 = H.setRuntimeTypeInfo([], [A._Drag]);
          t16 = new H.JsLinkedHashMap(0, null, null, null, null, null, 0, [P.$int, A._TouchPoint]);
          t17 = new K.Juggler(null, null, 0, P.StreamController_StreamController$broadcast(null, null, false, t12));
          t18 = new K._AnimatableLink(null, null);
          t17._firstAnimatableLink = t18;
          t17._lastAnimatableLink = t18;
          t1 = H.setRuntimeTypeInfo([], t1);
          t18 = $.DisplayObject__nextID;
          $.DisplayObject__nextID = t18 + 1;
          t18 = new N.ByondMap(new A.Sprite(null, null, null, t2, true, true, false, true, "auto", true, 0, t3, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, t4, true, null, null, null), new A.Sprite(null, null, null, t5, true, true, false, true, "auto", true, 0, t6, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, t7, true, null, null, null), new A.Sprite(null, null, null, t8, true, true, false, true, "auto", true, 0, t9, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, t10, true, null, null, null), 0, 0, null, null, [], [], 0, 0, 0, 0, 0, null, null, false, false, null, true, null, t11, null, null, null, 0, 0, 0, 0, 1, new U.Rectangle0(0, 0, 0, 0, [t12]), t13, t14, null, C.InputEventMode_0, C.StageRenderMode_0, C.StageScaleMode_3, C.StageAlign_4, "default", new U.Point0(0, 0, [t12]), null, t15, t16, [new A._MouseButton("mouseDown", "mouseUp", "click", "doubleClick", null, false, 0, 0), new A._MouseButton("middleMouseDown", "middleMouseUp", "middleClick", "middleClick", null, false, 0, 0), new A._MouseButton("rightMouseDown", "rightMouseUp", "rightClick", "rightClick", null, false, 0, 0)], t17, null, 4294967295, true, true, false, false, t1, true, true, false, true, "auto", true, 0, t18, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
          t18.Stage$4$height$options$width(canvas, height, opts, width);
          t18.ByondMap$7$color$frameRate$height$hq$webGL$width(canvas, color, frameRate, height, hq, webGL, width);
          return t18;
        },
        ByondMap_mouseAtomChanged: function() {
          var js, t1;
          js = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeEmpty());
          t1 = $.ByondMap_moveAtom;
          if (t1 != null && t1.info.id !== 0) {
            t1 = t1.info._appearance;
            js.$indexSet(0, "text", t1 != null ? t1.name : "");
            js.$indexSet(0, "atom", $.ByondMap_moveAtom.info.id);
          } else {
            t1 = $.ByondMap_overAtom;
            if (t1 != null && t1.info.id !== 0) {
              t1 = t1.info._appearance;
              js.$indexSet(0, "text", t1 != null ? t1.name : "");
              js.$indexSet(0, "atom", $.ByondMap_overAtom.info.id);
            } else
              js.$indexSet(0, "null", true);
          }
          $.$get$ByondJS_skin().status$1(0, js);
        },
        ByondMap_layerSort: [function(a, b) {
          var t1, t2, la, lb, ai, bi;
          t1 = a.plane;
          t2 = b.plane;
          if (t1 !== t2)
            return t1 - t2;
          t1 = (a.flags & 256) !== 0;
          if (t1 !== ((b.flags & 256) !== 0))
            return t1 ? -1 : 1;
          t1 = a.subplane;
          t2 = b.subplane;
          if (t1 !== t2)
            return t1 - t2;
          t1 = a._layer;
          t2 = b._layer;
          if (t1 !== t2)
            return t1 < t2 ? -1 : 1;
          la = a.get$logicalBounds();
          lb = b.get$logicalBounds();
          if (la != null)
            if (lb != null) {
              t1 = la.width;
              t2 = lb.width;
              if (t1 == null ? t2 == null : t1 === t2) {
                t1 = la.height;
                t2 = lb.height;
                t2 = t1 == null ? t2 != null : t1 !== t2;
                t1 = t2;
              } else
                t1 = true;
            } else
              t1 = false;
          else
            t1 = false;
          if (t1) {
            t1 = la.left;
            t2 = lb.left;
            if (t1 == null ? t2 != null : t1 !== t2)
              return t2 - t1;
            t1 = la.top;
            t2 = lb.top;
            if (t1 == null ? t2 != null : t1 !== t2)
              return t2 - t1;
          }
          t1 = a.tile_y;
          t2 = b.tile_y;
          if (t1 == null ? t2 != null : t1 !== t2)
            return t2 - t1;
          t1 = a.tile_x;
          t2 = b.tile_x;
          if (t1 == null ? t2 != null : t1 !== t2)
            return t2 - t1;
          ai = a.info;
          bi = b.info;
          if (ai == null ? bi != null : ai !== bi) {
            t1 = ai.locId;
            t2 = bi.locId;
            if (t1 == null ? t2 == null : t1 === t2) {
              t1 = ai.order;
              t2 = bi.order;
              t2 = t1 == null ? t2 != null : t1 !== t2;
              t1 = t2;
            } else
              t1 = false;
            if (t1)
              return ai.order - bi.order;
            return ai.id - bi.id;
          }
          return a.unsortedIndex - b.unsortedIndex;
        }, "call$2", "webclient_ByondMap_layerSort$closure", 4, 0, 19, 0, 4],
        ByondMap_isoSort: [function(a, b) {
          var t1, t2, ta, tb, la, lb, ai, bi;
          t1 = a.plane;
          t2 = b.plane;
          if (t1 !== t2)
            return t1 - t2;
          t1 = (a.flags & 256) !== 0;
          if (t1 !== ((b.flags & 256) !== 0))
            return t1 ? -1 : 1;
          t1 = a.subplane;
          t2 = b.subplane;
          if (t1 !== t2)
            return t1 - t2;
          if (a.get$is_screenOrTopdown())
            return b.get$is_screenOrTopdown() ? N.ByondMap_layerSort(a, b) : 1;
          else if (b.get$is_screenOrTopdown())
            return -1;
          t1 = a.tile_x;
          ta = t1 - a.tile_y;
          t2 = b.tile_x;
          tb = t2 - b.tile_y;
          if (ta !== tb)
            return ta - tb;
          if (t1 !== t2)
            return t1 - t2;
          t1 = a._layer;
          t2 = b._layer;
          if (t1 !== t2)
            return t1 < t2 ? -1 : 1;
          la = a.get$logicalBounds();
          lb = b.get$logicalBounds();
          if (la != null && lb != null) {
            ta = la.left + la.width - la.top;
            tb = lb.left + lb.width - lb.top;
            if (ta !== tb)
              return ta - tb;
          }
          ai = a.info;
          bi = b.info;
          if (ai == null ? bi != null : ai !== bi) {
            t1 = ai.locId;
            t2 = bi.locId;
            if (t1 == null ? t2 == null : t1 === t2) {
              t1 = ai.order;
              t2 = bi.order;
              t2 = t1 == null ? t2 != null : t1 !== t2;
              t1 = t2;
            } else
              t1 = false;
            if (t1)
              return ai.order - bi.order;
            return ai.id - bi.id;
          }
          return a.unsortedIndex - b.unsortedIndex;
        }, "call$2", "webclient_ByondMap_isoSort$closure", 4, 0, 19],
        ByondMap_sideSort: [function(a, b) {
          var t1, t2, la, lb, ai, bi;
          t1 = a.plane;
          t2 = b.plane;
          if (t1 !== t2)
            return t1 - t2;
          t1 = (a.flags & 256) !== 0;
          if (t1 !== ((b.flags & 256) !== 0))
            return t1 ? -1 : 1;
          t1 = a.subplane;
          t2 = b.subplane;
          if (t1 !== t2)
            return t1 - t2;
          if (a.get$is_screenOrTopdown())
            return b.get$is_screenOrTopdown() ? N.ByondMap_layerSort(a, b) : 1;
          else if (b.get$is_screenOrTopdown())
            return -1;
          t1 = a.tile_y;
          t2 = b.tile_y;
          if (t1 == null ? t2 != null : t1 !== t2)
            return t2 - t1;
          t1 = a._layer;
          t2 = b._layer;
          if (t1 !== t2)
            return t1 < t2 ? -1 : 1;
          la = a.get$logicalBounds();
          lb = b.get$logicalBounds();
          if (la != null && lb != null && (a.flags & 2) === 0 && (b.flags & 2) === 0) {
            a.info.get$moving() || b.info.get$moving();
            t1 = la.top;
            t2 = lb.top;
            if (t1 == null ? t2 != null : t1 !== t2)
              return t2 - t1;
          }
          ai = a.info;
          bi = b.info;
          if (ai == null ? bi != null : ai !== bi) {
            t1 = ai.locId;
            t2 = bi.locId;
            if (t1 == null ? t2 == null : t1 === t2) {
              t1 = ai.order;
              t2 = bi.order;
              t2 = t1 == null ? t2 != null : t1 !== t2;
              t1 = t2;
            } else
              t1 = false;
            if (t1)
              return ai.order - bi.order;
            return ai.id - bi.id;
          }
          return a.unsortedIndex - b.unsortedIndex;
        }, "call$2", "webclient_ByondMap_sideSort$closure", 4, 0, 19]
      }
    },
    ByondMap_closure: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseClickHandler$2($event, 1);
      }
    },
    ByondMap_closure0: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseDblClickHandler$2($event, 1);
      }
    },
    ByondMap_closure1: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseDownHandler$2($event, 1);
      }
    },
    ByondMap_closure2: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseUpHandler$2($event, 1);
      }
    },
    ByondMap_closure3: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseClickHandler$2($event, 4);
      }
    },
    ByondMap_closure4: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseDblClickHandler$2($event, 4);
      }
    },
    ByondMap_closure5: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseDownHandler$2($event, 4);
      }
    },
    ByondMap_closure6: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseUpHandler$2($event, 4);
      }
    },
    ByondMap_closure7: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseClickHandler$2($event, 2);
      }
    },
    ByondMap_closure8: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseDblClickHandler$2($event, 2);
      }
    },
    ByondMap_closure9: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseDownHandler$2($event, 2);
      }
    },
    ByondMap_closure10: {
      "^": "Closure:0;$this",
      call$1: function($event) {
        return this.$this._mouseUpHandler$2($event, 2);
      }
    },
    ByondMap_postsort_closure: {
      "^": "Closure:0;",
      call$1: function(e) {
        return e.get$removed();
      }
    },
    ByondMap_postsort_closure0: {
      "^": "Closure:0;",
      call$1: function(e) {
        return e.get$removed();
      }
    },
    ByondMap_nonsort_closure: {
      "^": "Closure:0;",
      call$1: function(e) {
        return e.get$removed();
      }
    },
    ByondMap_nonsort_closure0: {
      "^": "Closure:0;",
      call$1: function(e) {
        return e.get$removed();
      }
    },
    MapItem: {
      "^": "DisplayObjectContainer;",
      get$bounds: function() {
        var t1 = this._fullBounds;
        return t1 != null ? t1 : A.DisplayObjectContainer.prototype.get$bounds.call(this);
      },
      UpdateChildren$1: function(nc) {
        var t1, ol, nl, i, t2, i0, a, b, j, k, j0, ol0;
        t1 = this._children;
        ol = t1.length;
        nl = nc.length;
        for (i = 0; i < ol; ++i) {
          t2 = t1[i];
          if (!(t2 instanceof N.MapItem)) {
            i0 = i - 1;
            this.removeChildAt$1(i);
            --ol;
            i = i0;
            continue;
          }
          H.interceptedTypeCast(t2, "$isMapItem").oldIndex = i;
        }
        for (a = null, b = null, i = 0, j = 0, k = null; i < ol;)
          if (j < nl) {
            a = t1[i];
            j0 = j + 1;
            b = nc[j];
            if ((a == null ? b == null : a === b) || !(a instanceof N.MapItem)) {
              ++i;
              j = j0;
              continue;
            }
            if (b._parent === this)
              k = b.oldIndex;
            else {
              ol0 = ol + 1;
              this.addChildAt$2(b, ol);
              k = ol;
              ol = ol0;
            }
            i0 = i + 1;
            if (i >= t1.length)
              H.throwExpression(P.ArgumentError$("The supplied index is out of bounds."));
            t2 = t1[i];
            if (k < 0 || k >= t1.length)
              H.throwExpression(P.ArgumentError$("The supplied index is out of bounds."));
            t1[i] = t1[k];
            t1[k] = t2;
            a.oldIndex = k;
            j = j0;
            i = i0;
          } else {
            this.removeChildAt$1(i);
            --ol;
          }
        for (; j < nl; j = j0) {
          j0 = j + 1;
          this.addChildAt$2(nc[j], t1.length);
        }
      }
    },
    MapPlane: {
      "^": "MapItem;_bounds,MapPlane__clipRect,nullBounds,is_screen,oldIndex,updated,_fullBounds,_mapBounds,_clipRect,_children,_mouseChildren,_tabChildren,doubleClickEnabled,mouseEnabled,mouseCursor,tabEnabled,tabIndex,displayObjectID,_display$_x,_display$_y,_pivotX,_pivotY,_scaleX,_scaleY,_skewX,_skewY,_rotation,_alpha,_visible,_off,_mask,_blendMode,_filters,_cache,_display$_name,_parent,_transformationMatrix,_transformationMatrixRefresh,userData,_pixelRatio,_eventStreams",
      get$bounds: function() {
        var t1, b;
        t1 = this._bounds;
        if (t1 != null)
          return t1;
        b = N.MapItem.prototype.get$bounds.call(this);
        if (b.width === 0 || b.height === 0)
          return this.nullBounds;
        return b;
      },
      set$bounds: function(rect) {
        var t1 = [P.num];
        this._bounds = new U.Rectangle0(rect.left, rect.top, rect.width, rect.height, t1);
        if (!J.$eq$(this.MapPlane__clipRect, rect)) {
          this.MapPlane__clipRect = rect;
          this._mask = new A._RectangleMask(new U.Rectangle0(rect.left, rect.top, rect.width, rect.height, t1), T.Matrix$fromIdentity(), T.Matrix$fromIdentity(), false, false, 4278190080, 1);
        }
      },
      render$1: function(renderState) {
        var t1, n, i;
        t1 = this._children;
        n = t1.length;
        for (i = 0; i < n; ++i)
          renderState.renderObject$1(t1[i]);
      }
    },
    MouseAtom: {
      "^": "Object;info,atom,map,flags,mouseFlags,x>,y>,localX,localY,trueX,trueY,isMap,panel,control>",
      compare$1: function(match) {
        var t1, t2;
        if (match != null) {
          t1 = match.info.id;
          t2 = this.info.id;
          if (t1 == null ? t2 == null : t1 === t2) {
            t1 = match.control;
            t2 = this.control;
            t1 = (t1 == null ? t2 != null : t1 !== t2) || match.isMap !== this.isMap;
          } else
            t1 = true;
        } else
          t1 = true;
        if (t1)
          return 2;
        if (this.isMap) {
          t1 = match.x;
          t2 = this.x;
          if (t1 == null ? t2 == null : t1 === t2) {
            t1 = match.y;
            t2 = this.y;
            t2 = t1 == null ? t2 != null : t1 !== t2;
            t1 = t2;
          } else
            t1 = true;
        } else {
          t1 = match.localX;
          t2 = this.localX;
          if (t1 == null ? t2 == null : t1 === t2) {
            t1 = match.localY;
            t2 = this.localY;
            t2 = t1 == null ? t2 != null : t1 !== t2;
            t1 = t2;
          } else
            t1 = true;
        }
        if (t1)
          return 1;
        return 0;
      },
      mouseCoords$1: function(stage) {
        var main, t1, xy, t2, height;
        if (this.trueX != null) {
          main = this.atom;
          if (main != null)
            main = main.get$mainIcon();
          if (main == null && this.info != null)
            main = this.info.get$mainIcon();
          while (true) {
            t1 = main != null;
            if (!(t1 && main._parent instanceof N.MapAtom))
              break;
            main = main._parent;
          }
          if (t1) {
            t1 = [P.num];
            xy = new U.Point0(0, 0, t1);
            main.globalToLocal$2(new U.Point0(this.trueX, this.trueY, t1), xy);
            t1 = J.round$0$n(J.$sub$n(xy.x, 0.25));
            t2 = main.icon;
            t2 = t2 != null ? t2.get$bounds().height : $.me.iconHeight;
            return new P.Point(t1 + 1, t2 - J.round$0$n(J.$sub$n(xy.y, 0.25)), [null]);
          } else
            return new P.Point(0, 0, [null]);
        } else if (this.localX != null) {
          height = $.me.iconHeight;
          t1 = this.info;
          if (t1 != null) {
            main = t1.get$mainIcon();
            if (main != null && main.icon != null)
              height = main.icon.get$bounds().height;
            else if (this.info.get$lastIconInfo() != null)
              height = this.info.get$lastIconInfo().get$bounds().height;
          }
          return new P.Point(this.localX + 1, height - this.localY, [null]);
        } else
          return new P.Point(0, 0, [null]);
      },
      MouseAtom$4: function(srcMap, atom, $event, buttonFlags) {
        var t1, t2, height;
        this.map = srcMap.name;
        t1 = this.atom;
        if (t1 == null)
          this.info = $.$get$MouseAtom_NONE();
        else {
          this.info = t1.info;
          this.flags = t1.flags;
        }
        this.flags = 0;
        if ($event != null) {
          t1 = $event.stageX;
          t1.toString;
          t1 = !isNaN(t1);
        } else
          t1 = false;
        if (t1) {
          this.mouseFlags = buttonFlags;
          if ($event.altKey) {
            t1 = buttonFlags | 32;
            this.mouseFlags = t1;
          } else
            t1 = buttonFlags;
          if ($event.ctrlKey) {
            t1 |= 8;
            this.mouseFlags = t1;
          }
          if ($event.shiftKey) {
            t1 |= 16;
            this.mouseFlags = t1;
          }
          if ($event._type === "contextmenu")
            this.mouseFlags = t1 | 2;
          t1 = $event.stageX;
          this.trueX = t1;
          t2 = $event.stageY;
          this.trueY = t2;
          this.x = J.floor$0$n(t1);
          height = $.me.stage._sourceHeight;
          t1 = srcMap._clipRect;
          if (t1 != null)
            height = t1.top + t1.height;
          this.y = height - J.floor$0$n(t2) - 1;
        }
        t1 = $.me.stage;
        if (t1 != null && t1.control != null)
          this.control = t1.control.$index(0, "id");
      },
      MouseAtom$fromSkin$5$atom$element$event$id$panel: function(atom, element, $event, id, panel) {
        var c, t, offset, op, t1, pt, t2, exception, t3, t4;
        t1 = $.me.infoMap.$index(0, atom);
        this.info = t1;
        if (t1 == null)
          this.info = $.$get$MouseAtom_NONE();
        this.isMap = false;
        if (id != null)
          this.control = id;
        if (panel != null)
          this.panel = panel;
        t1 = $event != null;
        if (t1) {
          pt = new P.Point($event.clientX, $event.clientY, [null]);
          if (element == null) {
            c = $.$get$ByondJS_skin().controlFor$1(W._convertNativeToDart_EventTarget($event.target));
            if (c != null && this.control.length === 0) {
              this.control = J.$index$asx(c, "id");
              try {
                t = c.callMethod$2("dragTarget", [$event]);
                if (this.panel.length === 0) {
                  t2 = J.$index$asx(t, "panel");
                  t2 = typeof t2 === "string";
                } else
                  t2 = false;
                if (t2)
                  this.panel = J.$index$asx(t, "panel");
                t2 = J.$index$asx(t, "control");
                if (typeof t2 === "string")
                  this.control = J.$index$asx(t, "control");
                if (!!J.getInterceptor(J.$index$asx(t, "element")).$isElement)
                  element = J.$index$asx(t, "element");
              } catch (exception) {
                H.unwrapException(exception);
              }
            }
          }
          if ($event.altKey)
            this.mouseFlags |= 32;
          if ($event.ctrlKey)
            this.mouseFlags |= 8;
          if ($event.shiftKey)
            this.mouseFlags |= 16;
          if ($event.type === "contextmenu")
            this.mouseFlags |= 2;
        } else
          pt = null;
        if (element != null && t1) {
          offset = null;
          op = J.get$offsetParent$x(element);
          while (true) {
            if (!(op != null && !J.$eq$(op, element)))
              break;
            offset = null;
            try {
              t1 = element;
              t2 = op;
              t1.toString;
              offset = W.Element__offsetToHelper(t1, t2);
            } catch (exception) {
              H.unwrapException(exception);
            }
            if (offset != null) {
              t1 = offset;
              t2 = C.JSNumber_methods.round$0(op.scrollLeft);
              t3 = C.JSNumber_methods.round$0(op.scrollTop);
              t4 = J.getInterceptor$x(t1);
              offset = new P.Point(J.$sub$n(t4.get$x(t1), t2), J.$sub$n(t4.get$y(t1), t3), [H.getTypeArgumentByIndex(t1, 0)]);
              t1 = offset;
              pt = new P.Point(J.$sub$n(pt.x, t1.get$x(t1)), J.$sub$n(pt.y, t1.get$y(t1)), [H.getTypeArgumentByIndex(pt, 0)]);
              element = op;
            } else {
              t1 = C.JSNumber_methods.round$0(op.scrollLeft);
              t2 = C.JSNumber_methods.round$0(op.scrollTop);
              pt = new P.Point(J.$add$ns(pt.x, t1), J.$add$ns(pt.y, t2), [H.getTypeArgumentByIndex(pt, 0)]);
            }
            op = J.get$offsetParent$x(op);
          }
        }
        this.y = null;
        this.x = null;
        if (pt != null) {
          this.localX = J.round$0$n(pt.x);
          this.localY = J.round$0$n(pt.y);
        } else {
          this.localY = null;
          this.localX = null;
        }
      },
      static: {
        MouseAtom$: function(srcMap, atom, $event, buttonFlags) {
          var t1 = new N.MouseAtom(null, atom, null, 0, 0, 0, 0, 0, 0, null, null, true, "", "");
          t1.MouseAtom$4(srcMap, atom, $event, buttonFlags);
          return t1;
        },
        MouseAtom$fromSkin: function(atom, element, $event, id, panel) {
          var t1 = new N.MouseAtom(null, null, null, 0, 0, 0, 0, 0, 0, null, null, true, "", "");
          t1.MouseAtom$fromSkin$5$atom$element$event$id$panel(atom, element, $event, id, panel);
          return t1;
        }
      }
    },
    MapAtom: {
      "^": "MapItem;info,icon,bitmap,underlays,overlays,display,isSimple<,subbounds,baseX,baseY,flags,screen,transform,baseColor,color,_layer,_fulllayer,plane,subplane,blendModeNum,noClientColor,unsortedIndex?,sortedIndex,removed@,group,groupBegin@,groupEnd@,pixel_x,pixel_y,pixel_w,pixel_z,iconOffsetX,iconOffsetY,visOffsetX,visOffsetY,isBlackness,_logicalBounds,_atomDisplayBounds,_displayBounds,logicalBoundsDirty,displayBoundsDirty,tile_x?,tile_y,step_x,step_y,boundWidth,boundHeight,dbX,dbY,oldIndex,updated,_fullBounds,_mapBounds,_clipRect,_children,_mouseChildren,_tabChildren,doubleClickEnabled,mouseEnabled,mouseCursor,tabEnabled,tabIndex,displayObjectID,_display$_x,_display$_y,_pivotX,_pivotY,_scaleX,_scaleY,_skewX,_skewY,_rotation,_alpha,_visible,_off,_mask,_blendMode,_filters,_cache,_display$_name,_parent,_transformationMatrix,_transformationMatrixRefresh,userData,_pixelRatio,_eventStreams",
      render$1: function(renderState) {
        var t1, n, i;
        if (this.isSimple) {
          t1 = this.bitmap.bitmapData;
          if (t1 != null)
            renderState._engine$_renderContext.renderTextureQuad$2(renderState, t1.renderTextureQuad);
        } else {
          t1 = this._children;
          n = t1.length;
          for (i = 0; i < n; ++i)
            renderState.renderObject$1(t1[i]);
        }
      },
      renderFiltered$1: function(renderState) {
        var t1;
        if (this.isSimple) {
          t1 = this.bitmap.bitmapData;
          if (t1 != null)
            renderState._engine$_renderContext.renderTextureQuadFiltered$3(renderState, t1.renderTextureQuad, this._filters);
        } else
          renderState._engine$_renderContext.renderObjectFiltered$2(renderState, this);
      },
      calculateIconOffset$0: function() {
        var pw, pz, pz0, t1, dir, px, py, px0, py0, pw0, t2, px1, pw1, t3, t4, t5, i, i0;
        pw = this.pixel_w;
        this.iconOffsetX = pw;
        pz = this.pixel_z;
        pz0 = -pz;
        this.iconOffsetY = pz0;
        if ((this.flags & 1) !== 0) {
          this.visOffsetX = pw;
          this.visOffsetY = pz;
          t1 = this.icon;
          this.iconOffsetY = pz0 - (t1 != null ? t1._height : $.me.iconHeight);
          return;
        } else {
          t1 = $.me;
          dir = t1.mapdir;
          px = this.pixel_x;
          py = this.pixel_y;
          if ((dir & 10) !== 0) {
            px0 = -px;
            py0 = -py;
            pw0 = -pw;
            pz = pz0;
          } else {
            pw0 = pw;
            py0 = py;
            px0 = px;
          }
          t2 = (dir & 12) !== 0;
          if (t2) {
            px1 = -py0;
            pw1 = -pz;
            pz = pw0;
            pw0 = pw1;
            py0 = px0;
            px0 = px1;
          }
          this.visOffsetX = px + pw0;
          this.visOffsetY = py + pz;
          switch (t1.mapformat) {
            case 1:
              if ((dir & 2) !== 0) {
                t2 = this.icon;
                t2 = pw - (t2 != null ? t2._width : t1.iconWidth);
                this.iconOffsetX = t2;
              } else if (t2) {
                t2 = this.icon;
                t2 = pw - ((t2 != null ? t2._width : t1.iconWidth) / 2 | 0);
                this.iconOffsetX = t2;
              } else
                t2 = pw;
              if ((dir & 3) !== 0) {
                t3 = this.icon;
                t4 = t3 != null;
                t5 = t4 ? t3._width : t1.iconWidth;
                t1 = t4 ? t3._height : t1.iconHeight;
                t1 = pz0 + ((t5 / 4 | 0) - t1);
                this.iconOffsetY = t1;
              } else if ((dir & 4) !== 0) {
                t3 = this.icon;
                t1 = pz0 - (t3 != null ? t3._height : t1.iconHeight);
                this.iconOffsetY = t1;
              } else {
                t3 = this.icon;
                t4 = t3 != null;
                t5 = t4 ? t3._width : t1.iconWidth;
                t1 = t4 ? t3._height : t1.iconHeight;
                t1 = pz0 + ((t5 / 2 | 0) - t1);
                this.iconOffsetY = t1;
              }
              this.iconOffsetX = t2 + C.JSDouble_methods.round$0((px0 + py0) / 2);
              this.iconOffsetY = t1 + C.JSDouble_methods.round$0((px0 - py0) / 4);
              break;
            case 2:
              t2 = pw + px0;
              this.iconOffsetX = t2;
              t3 = t1.iconHeight;
              t1 = t1.iconWidth;
              t4 = pz0 - C.JSDouble_methods.round$0(py0 * t3 / t1);
              this.iconOffsetY = t4;
              if ((dir & 6) !== 0) {
                t5 = this.icon;
                this.iconOffsetX = t2 + (t1 - (t5 != null ? t5._width : t1));
              }
              t1 = this.icon;
              this.iconOffsetY = t4 - (t1 != null ? t1._height : t3);
              break;
            default:
              t2 = pw + px0;
              this.iconOffsetX = t2;
              t3 = pz0 - py0;
              this.iconOffsetY = t3;
              if ((dir & 6) !== 0) {
                t4 = t1.iconWidth;
                t5 = this.icon;
                this.iconOffsetX = t2 + (t4 - (t5 != null ? t5._width : t4));
              }
              if ((dir & 5) !== 0) {
                t2 = this.icon;
                this.iconOffsetY = t3 - (t2 != null ? t2._height : t1.iconHeight);
              }
              break;
          }
        }
        t1 = this.underlays;
        if (t1 != null)
          for (i = t1.length; i0 = i - 1, i > 0; i = i0)
            this.underlays[i0].calculateSubIconOffset$0();
        t1 = this.overlays;
        if (t1 != null)
          for (i = t1.length; i0 = i - 1, i > 0; i = i0)
            this.overlays[i0].calculateSubIconOffset$0();
      },
      calculateSubIconOffset$0: function() {
        var pw, pz, pz0, dir, px, py, px0, py0, pw0, px1, pw1, t1, i, i0;
        pw = this.pixel_w;
        this.iconOffsetX = pw;
        pz = this.pixel_z;
        pz0 = -pz;
        this.iconOffsetY = pz0;
        dir = (this.flags & 1) !== 0 ? 1 : $.me.mapdir;
        px = this.pixel_x;
        py = this.pixel_y;
        if ((dir & 10) !== 0) {
          px0 = -px;
          py0 = -py;
          pw0 = -pw;
          pz = pz0;
        } else {
          pw0 = pw;
          py0 = py;
          px0 = px;
        }
        if ((dir & 12) !== 0) {
          px1 = -py0;
          pw1 = -pz;
          pz = pw0;
          pw0 = pw1;
          py0 = px0;
          px0 = px1;
        }
        this.visOffsetX = px + pw0;
        this.visOffsetY = py + pz;
        t1 = $.me;
        switch (t1.mapformat) {
          case 1:
            this.iconOffsetX = pw + C.JSDouble_methods.round$0((px0 + py0) / 2);
            this.iconOffsetY = pz0 + C.JSDouble_methods.round$0((px0 - py0) / 4);
            break;
          case 2:
            this.iconOffsetX = pw + px0;
            this.iconOffsetY = pz0 - C.JSDouble_methods.round$0(py0 * t1.iconHeight / t1.iconWidth);
            break;
          default:
            this.iconOffsetX = pw + px0;
            this.iconOffsetY = pz0 - py0;
            break;
        }
        t1 = this.underlays;
        if (t1 != null)
          for (i = t1.length; i0 = i - 1, i > 0; i = i0)
            this.underlays[i0].calculateSubIconOffset$0();
        t1 = this.overlays;
        if (t1 != null)
          for (i = t1.length; i0 = i - 1, i > 0; i = i0)
            this.overlays[i0].calculateSubIconOffset$0();
      },
      get$visbounds: function() {
        var t1, t2, t3, result, i, i0, swap, p1, p2, p3, x, y, d1x, d1y, d2x, d2y;
        t1 = this.icon;
        t2 = t1 != null;
        t3 = t2 ? t1._width : $.me.iconWidth;
        result = N.ClientRect$(t3, t2 ? t1._height : $.me.iconHeight);
        if (!this.isSimple) {
          t1 = this.underlays;
          if (t1 != null)
            for (i = t1.length; i0 = i - 1, i > 0; i = i0)
              result.union$1(this.underlays[i0].get$visbounds());
          t1 = this.overlays;
          if (t1 != null)
            for (i = t1.length; i0 = i - 1, i > 0; i = i0)
              result.union$1(this.overlays[i0].get$visbounds());
        }
        t1 = this.transform;
        if (t1 != null) {
          swap = result.top;
          t2 = -result.bottom;
          result.top = t2;
          result.bottom = -swap;
          t3 = [P.num];
          p1 = new U.Point0(result.left - result.cx, t2 - result.cy, t3);
          t1.transformPoint$2(p1, p1);
          p2 = new U.Point0(result.right - result.cx, result.top - result.cy, t3);
          t1.transformPoint$2(p2, p2);
          p3 = new U.Point0(result.left - result.cx, result.bottom - result.cy, t3);
          t1.transformPoint$2(p3, p3);
          x = p1.x;
          y = p1.y;
          d1x = J.$sub$n(p2.x, x);
          d1y = J.$sub$n(p2.y, y);
          d2x = J.$sub$n(p3.x, x);
          d2y = J.$sub$n(p3.y, y);
          result.left = C.JSNumber_methods.floor$0(x + P.min(d1x, 0) + P.min(d2x, 0)) + result.cx;
          result.right = C.JSNumber_methods.ceil$0(x + P.max(d1x, 0) + P.max(d2x, 0)) + result.cx;
          result.top = C.JSNumber_methods.floor$0(y + P.min(d1y, 0) + P.min(d2y, 0)) + result.cy;
          t1 = C.JSNumber_methods.ceil$0(y + P.max(d1y, 0) + P.max(d2y, 0)) + result.cy;
          result.bottom = t1;
          result._oob_at_all = null;
          result._oob = null;
          swap = result.top;
          result.top = -t1;
          result.bottom = -swap;
        }
        result.offset$2(0, this.visOffsetX, this.visOffsetY);
        return result;
      },
      get$layer: function(_) {
        return this._layer;
      },
      set$layer: function(_, l) {
        var t1;
        this._fulllayer = l;
        t1 = (this.flags & 1) !== 0 ? 1 : 0;
        this.subplane = t1;
        if (l >= 20000) {
          this.subplane = t1 - 8;
          this.set$is_background(true);
          l -= 20000;
        } else
          this.set$is_background(false);
        if (l >= 10000) {
          this.set$is_topdown(true);
          l -= 10000;
        } else
          this.set$is_topdown(false);
        t1 = this.flags;
        if ((t1 & 16) === 0)
          t1 = $.me.mapformat !== 0 && (t1 & 1) !== 0;
        else
          t1 = true;
        if (t1)
          this.subplane += 4;
        if (l >= 5000) {
          this.subplane += 2;
          this.set$is_effect(true);
          l -= 5000;
        } else
          this.set$is_effect(false);
        this._layer = l;
      },
      get$logicalBounds: function() {
        var t1, t2, t3, t4, t5;
        if (!this.logicalBoundsDirty)
          return this._logicalBounds;
        t1 = $.me;
        switch (t1.mapdir) {
          default:
            t2 = this.tile_x;
            t3 = t1.iconWidth;
            t4 = this.step_x;
            t5 = this.tile_y;
            t1 = t1.mapformat !== 0 ? t1.iconHeight : t3;
            t1 = new U.Rectangle0(t2 * t3 + t4, t5 * t1 + this.step_y, this.boundWidth, this.boundHeight, [null]);
            this._logicalBounds = t1;
            break;
        }
        this.logicalBoundsDirty = false;
        return t1;
      },
      get$width: function(_) {
        var t1 = this.icon;
        return t1 != null ? t1._width : $.me.iconWidth;
      },
      get$height: function(_) {
        var t1 = this.icon;
        return t1 != null ? t1._height : $.me.iconHeight;
      },
      get$is_screenOrTopdown: function() {
        return (this.flags & 17) !== 0;
      },
      get$planeMaster: function() {
        return (this.flags & 256) !== 0;
      },
      get$keepTogether: function() {
        return (this.flags & 512) !== 0;
      },
      get$keepApart: function() {
        return (this.flags & 1024) !== 0;
      },
      get$keptApart: function() {
        return (this.flags & 2048) !== 0;
      },
      set$is_overlay: function(flag) {
        var t1 = this.flags | 2;
        this.flags = t1;
        return t1;
      },
      set$is_topdown: function(flag) {
        var t1 = this.flags;
        t1 = flag ? t1 | 16 : t1 & 4294967279;
        this.flags = t1;
        return t1;
      },
      set$is_effect: function(flag) {
        var t1 = this.flags;
        t1 = flag ? t1 | 32 : t1 & 4294967263;
        this.flags = t1;
        return t1;
      },
      set$is_background: function(flag) {
        var t1 = this.flags;
        t1 = flag ? t1 | 64 : t1 & 4294967231;
        this.flags = t1;
        return t1;
      },
      set$keepTogether: function(flag) {
        var t1 = this.flags;
        t1 = flag ? t1 | 512 : t1 & 4294966783;
        this.flags = t1;
        return t1;
      },
      set$keepApart: function(flag) {
        var t1 = this.flags;
        t1 = flag ? t1 | 1024 : t1 & 4294966271;
        this.flags = t1;
        return t1;
      },
      set$keptApart: function(flag) {
        var t1 = this.flags | 2048;
        this.flags = t1;
        return t1;
      },
      copyFrom$1: function(o) {
        var t1, i, i0, childIndex, t2, t3, t4, t5, newAtom;
        this.info = o.info;
        this.icon = o.icon;
        t1 = o.bitmap;
        if (t1 != null)
          this.bitmap.bitmapData = t1.bitmapData;
        this.baseX = o.baseX;
        this.baseY = o.baseY;
        this.flags = o.flags;
        this.transform = o.transform;
        this.set$pivotX(o._pivotX);
        this.set$pivotY(o._pivotY);
        this.set$scaleX(o._scaleX);
        this.set$scaleY(o._scaleY);
        this.set$rotation(o._rotation);
        this.set$skewX(o._skewX);
        this.set$skewY(o._skewY);
        this.baseColor = o.baseColor;
        this.color = o.color;
        this.plane = o.plane;
        this.subplane = o.subplane;
        this._layer = o._layer;
        this._fulllayer = o._fulllayer;
        this._blendMode = o._blendMode;
        this.unsortedIndex = o.unsortedIndex;
        this._logicalBounds = o._logicalBounds;
        this.logicalBoundsDirty = o.logicalBoundsDirty;
        this._displayBounds = o._displayBounds;
        o.displayBoundsDirty;
        this.displayBoundsDirty = true;
        this.tile_x = o.tile_x;
        this.tile_y = o.tile_y;
        this.pixel_x = o.pixel_x;
        this.pixel_y = o.pixel_y;
        this.pixel_w = o.pixel_w;
        this.pixel_z = o.pixel_z;
        this.iconOffsetX = o.iconOffsetX;
        this.iconOffsetY = o.iconOffsetY;
        this._filters = o._filters;
        if (o.underlays == null) {
          t1 = this.underlays;
          if (t1 != null) {
            for (i = t1.length, t1 = this._children; i0 = i - 1, i > 0; i = i0 - 1) {
              childIndex = C.JSArray_methods.indexOf$1(t1, this.underlays[i0]);
              if (childIndex === -1)
                H.throwExpression(P.ArgumentError$("The supplied DisplayObject must be a child of the caller."));
              this.removeChildAt$1(childIndex);
            }
            this.underlays = null;
          }
          this.isSimple = (this.flags & 256) === 0 && o.overlays != null;
        } else {
          this.isSimple = false;
          if (this.underlays == null)
            this.underlays = [];
          for (t1 = this._children; t2 = this.underlays, t2.length > o.underlays.length;) {
            childIndex = C.JSArray_methods.indexOf$1(t1, t2.pop());
            if (childIndex === -1)
              H.throwExpression(P.ArgumentError$("The supplied DisplayObject must be a child of the caller."));
            this.removeChildAt$1(childIndex);
          }
          for (t2 = [A.DisplayObject]; i = this.underlays.length, i < o.underlays.length;) {
            t3 = this.display;
            t4 = H.setRuntimeTypeInfo([], t2);
            t5 = $.DisplayObject__nextID;
            $.DisplayObject__nextID = t5 + 1;
            newAtom = new N.MapAtom(null, null, null, null, null, t3, true, null, 0, 0, 0, null, null, null, null, 1, 1, 0, 0, 0, false, null, null, false, null, 0, 0, 0, 0, 0, 0, null, null, 0, 0, null, null, null, null, true, true, 0, 0, 0, 0, 0, 0, null, null, null, true, null, null, null, t4, true, true, false, true, "auto", true, 0, t5, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
            if (t3) {
              t3 = $.DisplayObject__nextID;
              $.DisplayObject__nextID = t3 + 1;
              t3 = new A.Bitmap(null, t3, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
              newAtom.bitmap = t3;
              newAtom.addChildAt$2(t3, t4.length);
              newAtom.doubleClickEnabled = true;
            }
            this.underlays.push(newAtom);
            this.addChildAt$2(newAtom, C.JSArray_methods.indexOf$1(t1, this.bitmap));
          }
          for (; i0 = i - 1, i > 0; i = i0)
            this.underlays[i0].copyFrom$1(o.underlays[i0]);
        }
        if (o.overlays == null) {
          t1 = this.overlays;
          if (t1 != null) {
            for (i = t1.length, t1 = this._children; i0 = i - 1, i > 0; i = i0 - 1) {
              childIndex = C.JSArray_methods.indexOf$1(t1, this.overlays[i0]);
              if (childIndex === -1)
                H.throwExpression(P.ArgumentError$("The supplied DisplayObject must be a child of the caller."));
              this.removeChildAt$1(childIndex);
            }
            this.overlays = null;
          }
          this.isSimple = (this.flags & 256) === 0 && this.underlays != null;
        } else {
          this.isSimple = false;
          if (this.overlays == null)
            this.overlays = [];
          for (t1 = this._children; t2 = this.overlays, t2.length > o.overlays.length;) {
            childIndex = C.JSArray_methods.indexOf$1(t1, t2.pop());
            if (childIndex === -1)
              H.throwExpression(P.ArgumentError$("The supplied DisplayObject must be a child of the caller."));
            this.removeChildAt$1(childIndex);
          }
          for (t2 = [A.DisplayObject]; i = this.overlays.length, i < o.overlays.length;) {
            t3 = this.display;
            t4 = H.setRuntimeTypeInfo([], t2);
            t5 = $.DisplayObject__nextID;
            $.DisplayObject__nextID = t5 + 1;
            newAtom = new N.MapAtom(null, null, null, null, null, t3, true, null, 0, 0, 0, null, null, null, null, 1, 1, 0, 0, 0, false, null, null, false, null, 0, 0, 0, 0, 0, 0, null, null, 0, 0, null, null, null, null, true, true, 0, 0, 0, 0, 0, 0, null, null, null, true, null, null, null, t4, true, true, false, true, "auto", true, 0, t5, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
            if (t3) {
              t3 = $.DisplayObject__nextID;
              $.DisplayObject__nextID = t3 + 1;
              t3 = new A.Bitmap(null, t3, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
              newAtom.bitmap = t3;
              newAtom.addChildAt$2(t3, t4.length);
              newAtom.doubleClickEnabled = true;
            }
            this.overlays.push(newAtom);
            this.addChildAt$2(newAtom, t1.length);
          }
          for (; i0 = i - 1, i > 0; i = i0) {
            newAtom = this.overlays[i0];
            newAtom.copyFrom$1(o.overlays[i0]);
            t1 = newAtom.icon;
            if (t1 != null && t1.get$text(t1) != null) {
              t1 = newAtom.baseY;
              t2 = this.icon;
              t2 = t2 != null ? t2._height : $.me.iconHeight;
              newAtom.baseY = t1 + (t2 - newAtom.icon._height);
            }
          }
        }
      },
      copyPos$2: function(bx, by) {
        var t1, i, i0;
        this.baseX = bx + this.iconOffsetX;
        this.baseY = by + this.iconOffsetY;
        t1 = this.underlays;
        if (t1 != null)
          for (i = t1.length; i0 = i - 1, i > 0; i = i0)
            this.underlays[i0].copyPos$2(0, 0);
        t1 = this.overlays;
        if (t1 != null)
          for (i = t1.length; i0 = i - 1, i > 0; i = i0)
            this.overlays[i0].copyPos$2(0, 0);
      },
      updateScreen$0: function() {
        return;
      },
      garbageScan$0: function() {
        var t1, i, i0;
        t1 = this.icon;
        t1 != null && t1.get$text(t1) != null && this.icon.get$bitmapData() != null;
        if (!this.isSimple) {
          t1 = this.underlays;
          if (t1 != null)
            for (i = t1.length; i0 = i - 1, i > 0; i = i0)
              this.underlays[i0].garbageScan$0();
          t1 = this.overlays;
          if (t1 != null)
            for (i = t1.length; i0 = i - 1, i > 0; i = i0)
              this.overlays[i0].garbageScan$0();
        }
      },
      updateAtomIcon$1: function(ic) {
        var t1, i, i0;
        if (this.icon === ic)
          this.redraw$0();
        if (!this.isSimple) {
          t1 = this.underlays;
          if (t1 != null)
            for (i = t1.length; i0 = i - 1, i > 0; i = i0)
              this.underlays[i0].updateAtomIcon$1(ic);
          t1 = this.overlays;
          if (t1 != null)
            for (i = t1.length; i0 = i - 1, i > 0; i = i0)
              this.overlays[i0].updateAtomIcon$1(ic);
        }
      },
      calculateSubbounds$0: function() {
        var t1, sx, sy, i, left, $top, right, bottom, i0, r, left0, top0, right0, bottom0, nx, ny;
        t1 = this.subbounds;
        if (t1 != null) {
          sx = t1.left;
          sy = t1.top;
        } else
          sx = 0;
        if (this.isSimple)
          this.subbounds = null;
        else {
          t1 = this.underlays;
          if (t1 != null)
            for (i = t1.length, left = 1 / 0, $top = 1 / 0, right = -1 / 0, bottom = -1 / 0; i0 = i - 1, i > 0; i = i0) {
              r = this.underlays[i0].getBounds$1(null);
              left0 = r.left;
              if (left0 < left)
                left = left0;
              top0 = r.top;
              if (top0 < $top)
                $top = top0;
              right0 = left0 + r.width;
              if (right0 > right)
                right = right0;
              bottom0 = top0 + r.height;
              if (bottom0 > bottom)
                bottom = bottom0;
            }
          else {
            left = 1 / 0;
            $top = 1 / 0;
            right = -1 / 0;
            bottom = -1 / 0;
          }
          t1 = this.overlays;
          if (t1 != null)
            for (i = t1.length; i0 = i - 1, i > 0; i = i0) {
              r = this.overlays[i0].getBounds$1(null);
              left0 = r.left;
              if (left0 < left)
                left = left0;
              top0 = r.top;
              if (top0 < $top)
                $top = top0;
              right0 = left0 + r.width;
              if (right0 > right)
                right = right0;
              bottom0 = top0 + r.height;
              if (bottom0 > bottom)
                bottom = bottom0;
            }
          nx = C.JSNumber_methods.floor$0(left);
          ny = C.JSNumber_methods.floor$0($top);
          this.subbounds = new U.Rectangle0(nx - sx, ny - sx, C.JSNumber_methods.ceil$0(right) - nx, C.JSNumber_methods.ceil$0(bottom) - ny, [null]);
        }
      },
      redraw$0: function() {
        var t1, i, i0, hasIcon, t2, filter, px, py;
        if (!this.isSimple) {
          t1 = this.overlays;
          if (t1 != null)
            for (i = t1.length; i0 = i - 1, i > 0; i = i0)
              this.overlays[i0].redraw$0();
          t1 = this.underlays;
          if (t1 != null)
            for (i = t1.length; i0 = i - 1, i > 0; i = i0)
              this.underlays[i0].redraw$0();
        }
        t1 = this.icon;
        hasIcon = t1 != null && t1.get$bounds() != null && (this.flags & 256) === 0;
        if ((this.flags & 256) === 0 && this.bitmap == null) {
          t1 = $.DisplayObject__nextID;
          $.DisplayObject__nextID = t1 + 1;
          t1 = new A.Bitmap(null, t1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
          this.bitmap = t1;
          this.addChildAt$2(t1, 0);
        }
        t1 = this.bitmap;
        t1.bitmapData = hasIcon ? this.icon.get$bitmapData() : null;
        t1 = this._filters;
        C.JSArray_methods.checkGrowable$1(t1, "removeWhere");
        C.JSArray_methods._removeWhere$2(t1, new N.MapAtom_redraw_closure(), true);
        t1 = this.color;
        if (t1 != null && !t1.get$isWhite()) {
          t1 = this.color;
          t2 = t1.matrix;
          if (t2 != null) {
            t1 = t2.matrix;
            filter = D.ColorMatrixFilter$((t1 && C.JSArray_methods).sublist$2(t1, 0, 16), this.color.matrix.get$last4());
          } else
            filter = D.ColorMatrixFilter$([t1.red / 255, 0, 0, 0, 0, t1.green / 255, 0, 0, 0, 0, t1.blue / 255, 0, 0, 0, 0, t1.alpha / 255], [0, 0, 0, 0]);
          this._filters.push(filter);
        }
        if ((this.flags & 256) !== 0) {
          t1 = this._mapBounds;
          t1 = (t1 != null ? t1 : this.get$bounds()).left;
          t2 = this._mapBounds;
          t2 = t2 != null ? t2 : this.get$bounds();
          this.set$pivotX((t1 + (t2.left + t2.width)) / 2);
          t1 = this._mapBounds;
          t1 = (t1 != null ? t1 : this.get$bounds()).top;
          t2 = this._mapBounds;
          t2 = t2 != null ? t2 : this.get$bounds();
          this.set$pivotY((t1 + (t2.top + t2.height)) / 2);
          this.set$x(0, this._pivotX);
          this.set$y(0, this._pivotY);
        } else {
          t1 = this.transform;
          if (t1 != null) {
            if (hasIcon) {
              t2 = this.icon;
              px = t2._width / 2;
              py = t2._height / 2;
            } else {
              t2 = $.me;
              px = t2.iconWidth / 2;
              py = t2.iconHeight / 2;
            }
            this.set$x(0, this.baseX + px + t1._data[4]);
            this.set$y(0, this.baseY + py + this.transform._data[5]);
            this.set$pivotX(px);
            this.set$pivotY(py);
          } else {
            this.set$x(0, this.baseX);
            this.set$y(0, this.baseY);
          }
        }
      },
      hitTestInput$2: function(localX, localY) {
        var t1, opac, i, t2, t3, t4, bitmapData, x, y, deltaX, deltaY, t5, t6, t7, t8, hit;
        t1 = this.info;
        if (t1 != null) {
          t1 = t1._appearance;
          opac = t1 != null ? t1.mouseOpacity : 1;
        } else
          opac = 1;
        if (opac === 0)
          return;
        localX.toString;
        if (isFinite(localX)) {
          localY.toString;
          t1 = !isFinite(localY);
        } else
          t1 = true;
        if (t1)
          return;
        for (t1 = this._children, i = t1.length - 1, t2 = opac === 2; i >= 0; --i) {
          if (i >= t1.length)
            H.throwExpression(P.ArgumentError$("The supplied index is out of bounds."));
          t3 = t1[i];
          t4 = this.bitmap;
          if (t3 == null ? t4 == null : t3 === t4) {
            if (this.isBlackness === true)
              return;
            if ((this.flags & 256) !== 0 || this.info == null)
              continue;
            t3 = this.icon;
            if (t3 != null && t3.get$text(t3) != null)
              continue;
            t3 = this.bitmap;
            bitmapData = t3.bitmapData;
            x = C.JSNumber_methods.round$0(localX - t3._display$_x);
            y = C.JSNumber_methods.round$0(localY - t3._display$_y);
            if (x < 0 || y < 0)
              continue;
            if (bitmapData != null) {
              if (x < bitmapData.width && y < bitmapData.height) {
                t3 = this.icon;
                if (t3 != null && t3.get$text(t3) != null || t2)
                  return this;
                t3 = this.icon;
                if (t3 != null && t3.hitTest$2(x, y))
                  return this;
              }
            } else {
              t3 = this.info._appearance;
              if ((t3 != null ? t3.mouseOpacity : 1) === 2) {
                t3 = $.me;
                t3 = x < t3.iconWidth && y < t3.iconHeight;
              } else
                t3 = false;
              if (t3)
                return this;
            }
            continue;
          }
          t4 = t3.get$transformationMatrix()._data;
          deltaX = localX - t4[4];
          deltaY = localY - t4[5];
          t5 = t4[3];
          t6 = t4[2];
          t7 = t4[0];
          t4 = t4[1];
          t8 = t7 * t5 - t4 * t6;
          hit = t3.hitTestInput$2((t5 * deltaX - t6 * deltaY) / t8, (t7 * deltaY - t4 * deltaX) / t8);
          if (hit != null)
            return hit;
        }
        if ((this.flags & 256) !== 0) {
          t1 = this.info._appearance;
          t1 = (t1 != null ? t1.mouseOpacity : 1) === 2;
        } else
          t1 = false;
        if (t1) {
          if (localX >= 0)
            if (localY >= 0) {
              t1 = this._mapBounds;
              if (localX <= (t1 != null ? t1 : this.get$bounds()).width) {
                t1 = this._mapBounds;
                t1 = localY <= (t1 != null ? t1 : this.get$bounds()).height;
              } else
                t1 = false;
            } else
              t1 = false;
          else
            t1 = false;
          if (t1)
            return this;
        }
        return;
      },
      get$mainIcon: function() {
        if ((this.flags & 2) === 0)
          return this;
        return C.JSArray_methods.firstWhere$2$orElse(H.interceptedTypeCast(this.get$stage(), "$isByondMap").unsorted, new N.MapAtom_mainIcon_closure(this), new N.MapAtom_mainIcon_closure0(this));
      },
      MapAtom$1: function(display) {
        var t1;
        if (this.display) {
          t1 = $.DisplayObject__nextID;
          $.DisplayObject__nextID = t1 + 1;
          t1 = new A.Bitmap(null, t1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
          this.bitmap = t1;
          this.addChildAt$2(t1, this._children.length);
          this.doubleClickEnabled = true;
        }
      },
      MapAtom$blackness$0: function() {
        var t1, t2, t3;
        t1 = new N.AtomIcon(null, null, null, null, null, null, null, null, 0, 0, 0, null, null, null, false, null, null);
        t2 = $.me;
        t3 = t2.iconWidth;
        t1._width = t3;
        t2 = t2.iconHeight;
        t1._height = t2;
        t2 = A.BitmapData_BitmapData(t3, t2, 4278190080, 1);
        t1._bitmapData = t2;
        t1._bitmapDataSheet = t2;
        t1._frame = 0;
        t1._webclient$_index = 0;
        t1._crc = -1;
        t1._isComplete = true;
        t1.isSolid = true;
        t1.isEmpty = false;
        this.icon = t1;
        this._layer = 1e12;
        this._fulllayer = 1e12;
        this.isBlackness = true;
      },
      static: {
        MapAtom$blackness: function() {
          var t1, t2;
          t1 = H.setRuntimeTypeInfo([], [A.DisplayObject]);
          t2 = $.DisplayObject__nextID;
          $.DisplayObject__nextID = t2 + 1;
          t2 = new N.MapAtom(null, null, null, null, null, false, true, null, 0, 0, 0, null, null, null, null, 1, 1, 0, 0, 0, false, null, null, false, null, 0, 0, 0, 0, 0, 0, null, null, 0, 0, null, null, null, null, true, true, 0, 0, 0, 0, 0, 0, null, null, null, true, null, null, null, t1, true, true, false, true, "auto", true, 0, t2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
          t2.MapAtom$blackness$0();
          return t2;
        },
        MapAtom$: function(display) {
          var t1, t2;
          t1 = H.setRuntimeTypeInfo([], [A.DisplayObject]);
          t2 = $.DisplayObject__nextID;
          $.DisplayObject__nextID = t2 + 1;
          t2 = new N.MapAtom(null, null, null, null, null, display, true, null, 0, 0, 0, null, null, null, null, 1, 1, 0, 0, 0, false, null, null, false, null, 0, 0, 0, 0, 0, 0, null, null, 0, 0, null, null, null, null, true, true, 0, 0, 0, 0, 0, 0, null, null, null, true, null, null, null, t1, true, true, false, true, "auto", true, 0, t2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, true, false, null, null, [], null, "", null, T.Matrix$fromIdentity(), true, null, null, null);
          t2.MapAtom$1(display);
          return t2;
        }
      }
    },
    MapAtom_redraw_closure: {
      "^": "Closure:106;",
      call$1: function(f) {
        return f instanceof D.ColorMatrixFilter;
      }
    },
    MapAtom_mainIcon_closure: {
      "^": "Closure:7;$this",
      call$1: function(m) {
        var t1, t2, t3;
        t1 = m.group;
        t2 = this.$this;
        t3 = t2.group;
        if (t1 == null ? t3 == null : t1 === t3) {
          t1 = m.info;
          t3 = t2.info;
          if (t1 == null ? t3 == null : t1 === t3) {
            t1 = m.tile_x;
            t3 = t2.tile_x;
            if (t1 == null ? t3 == null : t1 === t3) {
              t1 = m.tile_y;
              t3 = t2.tile_y;
              if (t1 == null ? t3 == null : t1 === t3) {
                t1 = m.flags;
                t1 = (t1 & 2) === 0 && (t1 & 1) !== 0 === ((t2.flags & 1) !== 0);
              } else
                t1 = false;
            } else
              t1 = false;
          } else
            t1 = false;
        } else
          t1 = false;
        return t1;
      }
    },
    MapAtom_mainIcon_closure0: {
      "^": "Closure:1;$this",
      call$0: function() {
        return this.$this;
      }
    },
    MapInfo: {
      "^": "Object;mapWidth,mapHeight,view,viewChanged,maxx,maxy,maxz,maxidx,turfsEx,turfsInView,areas,screen,movs,allmovs,mapTileWidth,mapTileHeight,screenLeft,screenRight,screenBottom,screenTop,screenBottomStart,drawViewX,drawViewY,auxMaps,client,format,dir,homeX,homeY,myBounds,nextMapTime,ticking,firstTick,my,eye,trueEye,clientPx,clientPy,sight,seeInvisible,seeInDark,eyeIsMob,centeredPlayer,eyeAppearance",
      fullResort$0: function() {
        var t1, t2, _i, t3;
        for (t1 = $.me.exStages, t1 = P.List_List$from(t1.get$values(t1), true, null), t2 = t1.length, _i = 0; t3 = t1.length, _i < t3; t3 === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i)
          t1[_i].resort = true;
      },
      mapResort$0: function() {
        var t1 = $.me.stage;
        if (t1 != null)
          t1.resort = true;
      },
      mapTick$1: function(begin) {
        var t1, t2, now, t3, oldnow, tick;
        t1 = $.me;
        t1.toString;
        t2 = Date.now();
        now = new P.DateTime(t2, false);
        t3 = t1.startTime;
        if (t3 == null) {
          t1.startTime = now;
          t3 = now;
        }
        t3 = C.JSInt_methods._tdivFast$1(P.Duration$(0, 0, 0, t2 - t3._value, 0, 0)._duration, 1000);
        t1.currentMs = t3;
        t2 = $.me;
        t1.currentTime = C.JSDouble_methods.round$0(t3 / t2.clientTickLag) * (t1.clientTickLag / 1000);
        oldnow = t2.currentMs;
        if (begin) {
          this.nextMapTime = oldnow;
          this.ticking = true;
          this.firstTick = true;
          P.Future_Future$delayed(P.Duration$(0, 0, 0, 0, 0, 0), new N.MapInfo_mapTick_closure(this), null);
          return;
        }
        if (!this.ticking || t2.stage == null)
          return;
        if (this.firstTick) {
          this.firstTick = false;
          this.refreshScreen$0();
          this.fullResort$0();
        }
        P.runZoned(this.get$drawMap(), new N.MapInfo_mapTick_closure0(), null, null);
        $.me.garbageScan$0();
        $.$get$ByondJS_skin().poll$0();
        t1 = $.me;
        t2 = t1.stage;
        if (t2 != null)
          t2._stageRenderMode = C.StageRenderMode_2;
        for (t1 = t1.exStages, t1 = t1.get$values(t1), t1 = new H.MappedIterator(null, J.get$iterator$ax(t1.__internal$_iterable), t1._f, [H.getTypeArgumentByIndex(t1, 0), H.getTypeArgumentByIndex(t1, 1)]); t1.moveNext$0();)
          t1.__internal$_current._stageRenderMode = C.StageRenderMode_2;
        t1 = $.me;
        t1.toString;
        now = C.JSInt_methods._tdivFast$1(P.Duration$(0, 0, 0, Date.now() - t1.startTime._value, 0, 0)._duration, 1000);
        tick = $.me.clientTickLag;
        t1 = P.max(P.min(C.JSDouble_methods.round$0(oldnow / tick + 1) * tick, now + tick), now - tick);
        this.nextMapTime = t1;
        P.Future_Future$delayed(P.Duration$(0, 0, 0, P.max(0, C.JSNumber_methods.clamp$2(t1 - now, 0, tick * 2)), 0, 0), new N.MapInfo_mapTick_closure1(this), null);
      },
      mapTick$0: function() {
        return this.mapTick$1(false);
      },
      garbageScan$0: function() {
        this.garbageScanList$1(this.turfsInView);
        this.garbageScanList$1(this.turfsEx);
        this.garbageScanList$1(this.areas);
        this.garbageScanList$1(this.movs);
        this.garbageScanList$1(this.screen);
        this.client.garbageScan$0();
      },
      garbageScanList$1: function(list) {
        var t1, _i, atomId, atom;
        for (t1 = list.length, _i = 0; _i < list.length; list.length === t1 || (0, H.throwConcurrentModificationError)(list), ++_i) {
          atomId = list[_i];
          atom = $.me.infoMap.$index(0, atomId);
          if (atom != null)
            atom.garbageScan$0();
        }
      },
      resizeMap$3: function(newx, newy, newz) {
        var incZ, newmax, oldincY, oldincZ, t1, remap, t2, oldturfs, x, y, _i, i, id, loc, z, atom, i0, atoms;
        incZ = newx * newy;
        newmax = incZ * newz;
        oldincY = this.maxx;
        oldincZ = oldincY * this.maxy;
        t1 = P.$int;
        remap = P.HashMap_HashMap(null, null, null, t1, t1);
        if (newmax === this.maxidx)
          return;
        if (oldincZ === incZ) {
          if (oldincY === newx && newz > this.maxz) {
            this.maxx = newx;
            this.maxy = newy;
            this.maxz = newz;
            this.maxidx = newmax;
            return;
          }
        } else if (this.maxz === 1 && newz === 1)
          if (newx === oldincY)
            if (newy > this.maxy) {
              this.maxx = newx;
              this.maxy = newy;
              this.maxz = newz;
              this.maxidx = newmax;
              return;
            }
        t1 = $.me.infoMap;
        t1.toString;
        t2 = H.getTypeArgumentByIndex(t1, 0);
        oldturfs = P.List_List$from(new H.WhereIterable(new P._HashMapKeyIterable(t1, [t2]), new N.MapInfo_resizeMap_closure(), [t2]), true, t2);
        C.JSArray_methods.sort$0(oldturfs);
        for (t1 = oldturfs.length, x = null, y = null, _i = 0; i = oldturfs.length, _i < i; oldturfs.length === t1 || (0, H.throwConcurrentModificationError)(oldturfs), ++_i) {
          id = oldturfs[_i];
          loc = id & 16777215;
          z = C.JSInt_methods.$tdiv(loc, oldincZ);
          if (z >= newz)
            continue;
          y = C.JSInt_methods.$mod(loc, oldincZ);
          x = C.JSInt_methods.$mod(y, oldincY);
          if (x >= newx)
            continue;
          y = C.JSInt_methods.$tdiv(y, oldincY);
          if (y >= newy)
            continue;
          remap.$indexSet(0, id, (x + newx * y + incZ * z | 16777216) >>> 0);
        }
        for (atom = null; i0 = i - 1, i > 0; i = i0) {
          id = oldturfs[i0];
          if (remap.$index(0, id) != null)
            continue;
          atom = $.me.infoMap.$index(0, id);
          if (atom != null)
            atom.prepareTick$1(false);
          $.me.infoMap.remove$1(0, id);
          C.JSArray_methods.remove$1(this.turfsEx, id);
          C.JSArray_methods.remove$1(this.turfsInView, id);
        }
        t1 = $.me.infoMap;
        t1 = t1.get$values(t1);
        t2 = H.getRuntimeTypeArgument(t1, "Iterable", 0);
        atoms = P.List_List$from(new H.WhereIterable(t1, new N.MapInfo_resizeMap_closure0(), [t2]), true, t2);
        for (i = atoms.length; i0 = i - 1, i > 0; i = i0) {
          atom = atoms[i0];
          if (J.$eq$($.me.infoMap.$index(0, atom.id), atom))
            $.me.infoMap.remove$1(0, atom.id);
          t1 = remap.$index(0, atom.id);
          atom.id = t1;
          $.me.infoMap.$indexSet(0, t1, atom);
        }
        t1 = [null, null];
        this.turfsEx = new H.MappedListIterable(this.turfsEx, new N.MapInfo_resizeMap_closure1(remap), t1).toList$1$growable(0, true);
        this.turfsInView = new H.MappedListIterable(this.turfsInView, new N.MapInfo_resizeMap_closure2(remap), t1).toList$1$growable(0, true);
        this.maxx = newx;
        this.maxy = newy;
        this.maxz = newz;
        this.maxidx = newmax;
      },
      refreshScreen$0: function() {
        var t1, _maxx, _maxy, ex, t2, len, t3, _minx, _miny, i, ofx, ofy, id, atom, sr, appearance, t4, t5, rect, x1, t6, x2, y1, y2, t7, t8, t9, t10, props, onShow;
        t1 = {};
        t1.oldWidth = null;
        t1.oldHeight = null;
        _maxx = this.mapTileWidth;
        _maxy = this.mapTileHeight;
        ex = P.LinkedHashMap__makeEmpty();
        t2 = this.auxMaps;
        t2.clear$0(0);
        len = this.screen.length;
        for (t3 = [null], _minx = 1, _miny = 1, i = 0, ofx = null, ofy = null; i < len; ++i) {
          id = this.screen[i];
          atom = $.me.infoMap.$index(0, id);
          if (atom == null || atom.screenLoc == null)
            continue;
          sr = atom.screenLoc;
          sr.Parse$1(sr.original);
          if (sr.c1 == null)
            continue;
          appearance = atom._appearance;
          if (appearance != null && (appearance.core.bits & 536870912) === 0) {
            t4 = appearance.core;
            t4.toString;
            t4 = $.me.iconInfoMap.$index(0, t4.iconId);
            if (t4 != null) {
              ofx = P.max(C.JSDouble_methods.ceil$0(t4._width / $.me.iconWidth) - 1, 0);
              ofy = P.max(C.JSDouble_methods.ceil$0(t4._height / $.me.iconHeight) - 1, 0);
            } else {
              ofx = 0;
              ofy = 0;
            }
          } else {
            ofx = 0;
            ofy = 0;
          }
          t4 = sr.c1;
          t5 = t4 != null;
          if ((t5 ? t4.map : null) != null) {
            t2.$indexSet(0, t5 ? t4.map : null, true);
            t4 = sr.c1;
            rect = ex.$index(0, t4 != null ? t4.map : null);
            if (rect != null) {
              t4 = rect.left;
              t5 = sr.c1;
              x1 = P.min(t4, t5 != null ? t5.x : 1);
              t4 = rect.left;
              t5 = rect.width;
              t6 = sr.c2;
              if (t6 != null)
                t6 = t6.x;
              else {
                t6 = sr.c1;
                t6 = t6 != null ? t6.x : 1;
              }
              x2 = P.max(t4 + t5, t6) + ofx;
              t6 = rect.top;
              t4 = sr.c1;
              y1 = P.min(t6, t4 != null ? t4.y : 1);
              t4 = rect.top;
              t5 = rect.height;
              t6 = sr.c2;
              if (t6 != null)
                t6 = t6.y;
              else {
                t6 = sr.c1;
                t6 = t6 != null ? t6.y : 1;
              }
              y2 = P.max(t4 + t5, t6) + ofy;
            } else {
              t4 = sr.c1;
              t5 = t4 != null;
              x1 = t5 ? t4.x : 1;
              t6 = sr.c2;
              t7 = t6 != null;
              if (t7)
                t8 = t6.x;
              else
                t8 = t5 ? t4.x : 1;
              x2 = t8 + ofx;
              y1 = t5 ? t4.y : 1;
              if (t7)
                t4 = t6.y;
              else
                t4 = t5 ? t4.y : 1;
              y2 = t4 + ofy;
            }
            t4 = sr.c1;
            t4 = t4 != null ? t4.map : null;
            ex.$indexSet(0, t4, new U.Rectangle0(x1, y1, x2 - x1, y2 - y1, t3));
            continue;
          }
          if ((t5 ? t4.x : 1) < _minx)
            _minx = t5 ? t4.x : 1;
          if ((t5 ? t4.y : 1) < _miny)
            _miny = t5 ? t4.y : 1;
          t6 = sr.c2;
          t7 = t6 != null;
          if (t7)
            t8 = t6.x;
          else
            t8 = t5 ? t4.x : 1;
          if (t8 + ofx > _maxx) {
            if (t7)
              t8 = t6.x;
            else
              t8 = t5 ? t4.x : 1;
            _maxx = t8 + ofx;
          }
          if (t7)
            t8 = t6.y;
          else
            t8 = t5 ? t4.y : 1;
          if (t8 + ofy > _maxy) {
            if (t7)
              t4 = t6.y;
            else
              t4 = t5 ? t4.y : 1;
            _maxy = t4 + ofy;
          }
          atom.position_dirty = true;
        }
        $.me.exStages.forEach$1(0, new N.MapInfo_refreshScreen_closure(t1, ex));
        t2 = $.me.stage;
        t4 = P.max(1 - _minx, 0);
        this.screenLeft = t4;
        t2.screenLeft = t4;
        t4 = $.me.stage;
        t2 = P.max(1 - _miny, 0);
        this.screenBottom = t2;
        t4.screenBottom = t2;
        t2 = $.me.stage;
        t4 = P.max(_maxx - this.mapTileWidth, 0);
        this.screenRight = t4;
        t2.screenRight = t4;
        t4 = $.me.stage;
        t2 = P.max(_maxy - this.mapTileHeight, 0);
        this.screenTop = t2;
        t4.screenTop = t2;
        t4 = $.me;
        t5 = t4.stage;
        t6 = this.mapTileHeight;
        t7 = t2 + t6;
        this.screenBottomStart = t7;
        t5.screenBottomStart = t7;
        t1.oldWidth = t5.fullWidth;
        t1.oldHeight = t5.fullHeight;
        t7 = this.screenLeft;
        t8 = this.screenRight;
        t9 = this.mapTileWidth;
        t10 = t4.iconWidth;
        t8 = (t7 + t8 + t9) * t10;
        this.mapWidth = t8;
        t5.fullWidth = t8;
        t8 = this.screenBottom;
        t4 = t4.iconHeight;
        t8 = (t2 + t8 + t6) * t4;
        this.mapHeight = t8;
        t5.fullHeight = t8;
        t5.set$clipRect(new U.Rectangle0(t7 * t10, t2 * t4, t9 * t10, t6 * t4, t3));
        t2 = $.me.stage;
        if (t2.fullWidth !== t1.oldWidth || t2.fullHeight !== t1.oldHeight)
          t2._resized$1(null);
        t1 = this.myBounds;
        this.myBounds = new U.Rectangle0(t1.left, t1.top, this.mapWidth, this.mapHeight, t3);
        t1 = $.me;
        if (!t1.stageShown) {
          t2 = t1.stage;
          t2 = t2._sourceWidth > 0 && t2._sourceHeight > 0;
        } else
          t2 = false;
        if (t2) {
          t1.stageShown = true;
          props = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["on-show", ""]));
          $.$get$ByondJS_skin().winget$2(":map", props);
          onShow = props.$index(0, "on-show");
          if (typeof onShow === "string" && onShow.length !== 0)
            J.$index$asx($.$get$context().$index(0, "byond"), "fn").callMethod$2("input", [onShow]);
        }
      },
      processTurfBlockMessage$1: function(msg) {
        var turfId, i, turf, appearance, turfs, aIds, oldId, t1, oldWidth, oldHeight, id, t2, width, height, ox0, oy0, ox1, oy1, nx0, ny0, t3, nx1, ny1, y, x, t4, turf0, turfId0, exception;
        oldId = msg.getUint32$0(0);
        t1 = oldId !== 0;
        if (t1) {
          oldWidth = msg.getUint16$0(0);
          oldHeight = msg.getUint16$0(0);
        } else {
          oldWidth = 0;
          oldHeight = 0;
        }
        id = msg.getUint32$0(0);
        t2 = id !== 0;
        if (t2) {
          width = msg.getUint16$0(0);
          height = msg.getUint16$0(0);
        } else {
          width = 0;
          height = 0;
        }
        turfId = null;
        i = null;
        turf = null;
        appearance = null;
        turfs = [];
        aIds = null;
        if (t1 && this.maxx > 0) {
          turfId = oldId & 16777215;
          ox0 = J.$mod$n(turfId, this.maxx);
          oy0 = J.$mod$n(J.$tdiv$n(turfId, this.maxx), this.maxy);
          ox1 = P.min(ox0 + oldWidth, this.maxx);
          oy1 = P.min(oy0 + oldHeight, this.maxy);
        } else {
          ox0 = -1;
          oy0 = -1;
          ox1 = -1;
          oy1 = -1;
        }
        if (t2 && this.maxx > 0) {
          turfId = id & 16777215;
          nx0 = J.$mod$n(turfId, this.maxx);
          ny0 = J.$tdiv$n(turfId, this.maxx);
          t1 = this.maxy;
          t2 = J.getInterceptor$n(ny0);
          t3 = t2.$tdiv(ny0, t1);
          this.trueEye.z = t3;
          this.eye.z = t3;
          ny0 = t2.$mod(ny0, t1);
          nx1 = P.min(nx0 + width, this.maxx);
          ny1 = P.min(ny0 + height, this.maxy);
        } else {
          nx0 = -1;
          ny0 = -1;
          nx1 = -1;
          ny1 = -1;
        }
        for (i = this.turfsInView.length; t1 = i, t2 = J.getInterceptor$n(t1), i = t2.$sub(t1, 1), t2.$gt(t1, 0);) {
          turf = $.me.infoMap.$index(0, this.turfsInView[i]);
          if (turf != null) {
            turf.set$inView(false);
            if (turf.get$isEx())
              C.JSArray_methods.add$1(this.turfsEx, this.turfsInView[i]);
          }
        }
        this.turfsInView = [];
        turfId = id;
        for (y = ny0; y < ny1; ++y) {
          for (t1 = y >= oy0, t2 = y >= oy1, x = nx0; x < nx1; ++x) {
            C.JSArray_methods.add$1(this.turfsInView, turfId);
            turf = $.me.infoMap.$index(0, turfId);
            if (turf == null) {
              t3 = $.me.infoMap;
              t4 = turfId;
              turf0 = N.AtomInfo$(turfId, null, null);
              turf0.updateXYZ$0();
              turf0.addPendingImages$0();
              turf = turf0;
              t3.$indexSet(0, t4, turf0);
            } else if (turf.get$isEx())
              C.JSArray_methods.remove$1(this.turfsEx, turfId);
            turf.set$inView(true);
            if (x < ox0 || x >= ox1 || !t1 || t2)
              J.add$1$ax(turfs, turfId);
            turfId = J.$add$ns(turfId, 1);
          }
          turfId = J.$add$ns(turfId, this.maxx - width);
        }
        try {
          aIds = msg.readIdRunLength$1(J.get$length$asx(turfs));
          for (i = 0; J.$lt$n(i, J.get$length$asx(turfs)); i = J.$add$ns(i, 1)) {
            t1 = $.me.infoMap;
            turfId0 = J.$index$asx(turfs, i);
            turfId = turfId0;
            turf = t1.$index(0, turfId0);
            appearance = $.me.appearanceMap.$index(0, J.$index$asx(aIds, i));
            J.set$appearance$x(turf, appearance);
          }
          aIds = msg.readIdRunLength$1(J.get$length$asx(turfs));
          for (i = 0; J.$lt$n(i, J.get$length$asx(turfs)); i = J.$add$ns(i, 1)) {
            t1 = $.me.infoMap;
            turfId0 = J.$index$asx(turfs, i);
            turfId = turfId0;
            turf = t1.$index(0, turfId0);
            turf.set$locId(J.$or$n(J.$index$asx(aIds, i), 67108864));
            t1 = turf;
            turf.set$mapOffset_dirty(true);
            t1.set$position_dirty(true);
            t1 = turf;
            t1.set$inert(false);
            if (t1.get$cantick() && t1.get$tickIndex() < 0)
              t1.prepareTick$1(true);
          }
        } catch (exception) {
          H.unwrapException(exception);
        }
        this.viewChanged = true;
        this.mapResort$0();
      },
      processTurfChangeMessage$1: function(msg) {
        var type, i, n, turfId, areaId, turfs, aIds, turf, area, appearance, inUse, newAreas, allTurfs, t1, turfId0, t2, t3, _i, t4, exception;
        try {
          type = msg._webclient$_data.getUint8(msg._pos++);
          i = null;
          n = msg.getUint16$0(0);
          turfId = null;
          areaId = null;
          turfs = new Array(n);
          aIds = null;
          turf = null;
          area = null;
          appearance = null;
          if (J.$eq$(type, 0)) {
            for (i = 0; J.$lt$n(i, n); i = J.$add$ns(i, 1)) {
              turfId = msg.getUint32as16$0();
              turf = $.me.infoMap.$index(0, turfId);
              if (turf != null && turf.get$isEx()) {
                turf.set$isEx(false);
                if (!turf.get$inView())
                  C.JSArray_methods.remove$1(this.turfsEx, turfId);
              }
            }
            return;
          }
          for (i = 0; J.$lt$n(i, n); i = J.$add$ns(i, 1))
            J.$indexSet$ax(turfs, i, (msg.getUint32as16$0() | 16777216) >>> 0);
          aIds = msg.readIdRunLength$1(J.get$length$asx(turfs));
          for (i = 0; J.$lt$n(i, J.get$length$asx(turfs)); i = J.$add$ns(i, 1)) {
            t1 = $.me.infoMap;
            turfId0 = J.$index$asx(turfs, i);
            turfId = turfId0;
            turf = t1.$index(0, turfId0);
            appearance = $.me.appearanceMap.$index(0, J.$index$asx(aIds, i));
            if (!this.viewChanged) {
              t1 = appearance.get$core();
              if (!((t1.bits & 1) !== 0 || t1.luminosity !== 0 || t1.infraLuminosity !== 0))
                if (turf != null) {
                  t1 = turf.get$_appearance().core;
                  t1 = (t1.bits & 1) !== 0 || t1.luminosity !== 0 || t1.infraLuminosity !== 0;
                } else
                  t1 = false;
              else
                t1 = true;
            } else
              t1 = false;
            if (t1)
              this.viewChanged = true;
            if (turf == null) {
              t1 = $.me.infoMap;
              t2 = turfId;
              t3 = N.AtomInfo$(turfId, appearance, null);
              t3.updateXYZ$0();
              t3.addPendingImages$0();
              t1.$indexSet(0, t2, t3);
            } else
              J.set$appearance$x(turf, appearance);
            if (!turf.get$isEx()) {
              turf.set$isEx(true);
              if (!turf.get$inView())
                C.JSArray_methods.add$1(this.turfsEx, turfId);
            }
          }
          aIds = msg.readIdRunLength$1(J.get$length$asx(turfs));
          for (i = 0; J.$lt$n(i, J.get$length$asx(turfs)); i = J.$add$ns(i, 1)) {
            t1 = $.me.infoMap;
            turfId0 = J.$index$asx(turfs, i);
            turfId = turfId0;
            turf = t1.$index(0, turfId0);
            areaId = J.$or$n(J.$index$asx(aIds, i), 67108864);
            t1 = turf.get$locId();
            t2 = areaId;
            if (t1 == null ? t2 != null : t1 !== t2) {
              if (!this.viewChanged) {
                t1 = turf;
                t1.toString;
                if ($.me.infoMap.$index(0, t1.get$locId()) != null) {
                  t1 = turf;
                  t1.toString;
                  t1 = $.me.infoMap.$index(0, t1.get$locId())._appearance.core;
                  t1 = (t1.bits & 1) !== 0 || t1.luminosity !== 1 || t1.infraLuminosity !== 0;
                } else
                  t1 = false;
              } else
                t1 = false;
              if (t1)
                this.viewChanged = true;
              turf.set$locId(areaId);
              area = $.me.infoMap.$index(0, areaId);
              if (!this.viewChanged)
                if (area != null) {
                  t1 = area.get$_appearance().core;
                  t1 = (t1.bits & 1) !== 0 || t1.luminosity !== 1 || t1.infraLuminosity !== 0;
                } else
                  t1 = false;
              else
                t1 = false;
              if (t1)
                this.viewChanged = true;
              turf.set$position_dirty(true);
            }
          }
          t1 = P.$int;
          t2 = P.bool;
          inUse = P.HashMap_HashMap(null, null, null, t1, t2);
          newAreas = P.HashMap_HashMap(null, null, null, t1, t2);
          t2 = $.me.infoMap;
          t2.toString;
          t1 = H.getTypeArgumentByIndex(t2, 0);
          allTurfs = P.List_List$from(new H.WhereIterable(new P._HashMapKeyIterable(t2, [t1]), N.webclient__IsTurf$closure(), [t1]), true, null);
          for (t1 = this.turfsInView, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            turfId = t1[_i];
            J.$indexSet$ax(inUse, turfId, true);
          }
          for (t1 = this.turfsEx, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            turfId = t1[_i];
            J.$indexSet$ax(inUse, turfId, true);
          }
          for (t1 = allTurfs, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            turfId = t1[_i];
            t3 = J.$eq$(J.$index$asx(inUse, turfId), true);
            t4 = $.me;
            if (!t3) {
              turf = t4.infoMap.$index(0, turfId);
              if (turf != null)
                turf.prepareTick$1(false);
              $.me.infoMap.remove$1(0, turfId);
            } else {
              areaId = t4.infoMap.$index(0, turfId).get$locId();
              t3 = areaId;
              J.$indexSet$ax(newAreas, areaId, true);
              J.$indexSet$ax(inUse, t3, true);
            }
          }
          for (t1 = newAreas, t1 = new P._HashMapKeyIterator(t1, t1._computeKeys$0(), 0, null), t2 = this.areas; t1.moveNext$0();) {
            areaId = t1._collection$_current;
            if (!C.JSArray_methods.contains$1(t2, areaId))
              t2.push(areaId);
          }
        } catch (exception) {
          H.unwrapException(exception);
        }
        this.mapResort$0();
      },
      processAreaMessage$1: function(msg) {
        var n, areaId, area, appearance, t1, t2, t3, area0, exception;
        try {
          n = msg.getUint16$0(0);
          areaId = null;
          area = null;
          appearance = null;
          for (t1 = this.areas; t2 = n, t3 = J.getInterceptor$n(t2), n = t3.$sub(t2, 1), t3.$gt(t2, 0);) {
            areaId = (msg.getUint32as16$0() | 67108864) >>> 0;
            if (!C.JSArray_methods.contains$1(t1, areaId))
              t1.push(areaId);
            appearance = $.me.appearanceMap.$index(0, msg.getUint32as16$0());
            area = $.me.infoMap.$index(0, areaId);
            if (area == null) {
              t2 = $.me.infoMap;
              t3 = areaId;
              area0 = N.AtomInfo$(areaId, appearance, null);
              area0.addPendingImages$0();
              area = area0;
              t2.$indexSet(0, t3, area0);
            } else
              J.set$appearance$x(area, appearance);
          }
          if (msg._webclient$_data.byteLength - msg._pos > 0) {
            n = msg.getUint16$0(0);
            for (; t2 = n, t3 = J.getInterceptor$n(t2), n = t3.$sub(t2, 1), t3.$gt(t2, 0);) {
              areaId = (msg.getUint32as16$0() | 67108864) >>> 0;
              C.JSArray_methods.remove$1(t1, areaId);
            }
          }
        } catch (exception) {
          H.unwrapException(exception);
        }
        this.mapResort$0();
      },
      processMovableChangeMessage$1: function(msg) {
        var t1, t2, eyeCore, t3, t4, t5, t6, t7, flags, t8, wasCentered, otx, oty, t9, tryGlide, oldSight, flags2;
        t1 = this.eye;
        if (t1._appearance == null)
          t1.set$appearance(0, N.Appearance$(65535, "", 0));
        t2 = t1._appearance;
        eyeCore = t2.core;
        t3 = this.trueEye;
        t3.set$appearance(0, t2);
        t2 = this.my;
        t4 = t2.pixel_x;
        t5 = this.clientPx;
        t6 = t2.pixel_y;
        t7 = this.clientPy;
        flags = msg._webclient$_data.getUint8(msg._pos++);
        t8 = new N.MapInfo_processMovableChangeMessage_eq(this);
        if ((flags & 2) !== 0) {
          wasCentered = t8.call$0();
          otx = t3.x;
          oty = t3.y;
          t2.x = msg.getInt16$0(0);
          t1.x = msg.getInt16$0(0);
          t2.y = msg.getInt16$0(0);
          t1.y = msg.getInt16$0(0);
          this.eyeIsMob = msg._webclient$_data.getUint8(msg._pos++) !== 0;
          eyeCore.bits = msg.getUint32$0(0);
          eyeCore.glideSize = msg.getFloat32$0(0);
          if ($.me.get$pixelGlide()) {
            t9 = eyeCore.glideSize;
            t3.step_size = t9;
            t1.step_size = t9;
          }
          t3.x = msg.getInt16$0(0);
          t9 = msg.getInt16$0(0);
          t3.y = t9;
          this.viewChanged = true;
          if (otx !== t3.x || oty !== t9)
            this.centeredPlayer = wasCentered && t8.call$0();
          tryGlide = true;
        } else
          tryGlide = false;
        if ((flags & 32) !== 0) {
          oldSight = this.sight;
          t8 = msg._webclient$_data.getUint8(msg._pos++);
          this.sight = t8;
          if ($.me.mapformat !== 0) {
            t8 = (t8 & 4294966015) >>> 0;
            this.sight = t8;
          }
          if (t8 == null ? oldSight != null : t8 !== oldSight)
            this.viewChanged = true;
        }
        if ((flags & 64) !== 0)
          $.me.msgReadStatValue$1(msg);
        flags2 = (flags & 128) !== 0 ? msg._webclient$_data.getUint8(msg._pos++) : 0;
        if ((flags2 & 1) !== 0) {
          this.seeInDark = msg._webclient$_data.getUint8(msg._pos++);
          this.viewChanged = true;
        }
        if ((flags2 & 2) !== 0) {
          this.seeInvisible = msg._webclient$_data.getUint8(msg._pos++);
          this.viewChanged = true;
        }
        if ((flags2 & 4) !== 0) {
          this.sight = msg.getUint32$0(0);
          this.viewChanged = true;
        }
        if ((flags2 & 8) !== 0) {
          eyeCore.pixel_x = msg.getInt16$0(0);
          eyeCore.pixel_y = msg.getInt16$0(0);
          eyeCore.pixel_w = msg.getInt16$0(0);
          eyeCore.pixel_z = msg.getInt16$0(0);
        }
        if ((flags2 & 16) !== 0) {
          this.clientPx = msg.getInt16$0(0);
          this.clientPy = msg.getInt16$0(0);
        }
        if ((flags2 & 32) !== 0) {
          t2.pixel_x = msg.getInt16$0(0);
          t2.pixel_y = msg.getInt16$0(0);
          t2.pixel_w = msg.getInt16$0(0);
          t2.pixel_z = msg.getInt16$0(0);
        } else {
          t2.pixel_z = 0;
          t2.pixel_w = 0;
          t2.pixel_y = 0;
          t2.pixel_x = 0;
        }
        if ($.me.get$pixelGlide()) {
          t8 = t2.pixel_x;
          if (t4 - t5 !== t8 - this.clientPx || t6 - t7 !== t2.pixel_y - this.clientPy)
            tryGlide = true;
          t3.step_x = t8;
          t1.step_x = t8;
          t2 = t2.pixel_y;
          t3.step_y = t2;
          t1.step_y = t2;
        }
        if (tryGlide) {
          t1.beginGlide$0();
          t3.beginGlide$0();
        }
        this.readMovableChanges$2(msg, this.movs);
      },
      readMovableChanges$3$isScreen: function(msg, myList, isScreen) {
        var count, glide, t1, ret, tryGlide, isNew, count0, flags, val, atom, t2, old, appearance, t3, val0, val1, val2, _i, id;
        count = msg.getUint16$0(0);
        glide = !isScreen;
        for (t1 = [null], ret = 0, tryGlide = null, isNew = null; count0 = count - 1, count > 0; count = count0) {
          ++ret;
          flags = msg._webclient$_data.getUint8(msg._pos++);
          val = msg._webclient$_data.getUint32(msg._pos, true);
          msg._pos += 4;
          atom = $.me.infoMap.$index(0, val);
          if (flags === 0) {
            if (!this.viewChanged)
              if (atom != null) {
                t2 = atom._appearance;
                if (t2 != null) {
                  t2 = t2.core;
                  t2 = (t2.bits & 1) !== 0 || t2.luminosity !== 0 || t2.infraLuminosity !== 0;
                } else
                  t2 = false;
              } else
                t2 = false;
            else
              t2 = false;
            if (t2)
              this.viewChanged = true;
            if (isScreen)
              atom.onScreen = false;
            C.JSArray_methods.remove$1(myList, val);
            continue;
          }
          if ((flags & 3) === 1) {
            if (!this.viewChanged)
              if (atom != null) {
                t2 = atom._appearance;
                if (t2 != null) {
                  t2 = t2.core;
                  t2 = (t2.bits & 1) !== 0 || t2.luminosity !== 0 || t2.infraLuminosity !== 0;
                } else
                  t2 = false;
              } else
                t2 = false;
            else
              t2 = false;
            if (t2)
              this.viewChanged = true;
            old = $.me.infoMap.$index(0, val);
            if (old != null)
              old.prepareTick$1(false);
            $.me.infoMap.$indexSet(0, val, null);
            atom = null;
          }
          if (atom == null) {
            t2 = $.me.infoMap;
            atom = N.AtomInfo$(val, null, null);
            atom.addPendingImages$0();
            t2.$indexSet(0, val, atom);
            if (isScreen)
              atom.onScreen = true;
            else {
              t2 = $.me.stage;
              if (t2 != null)
                t2.resort = true;
            }
            isNew = true;
          } else
            isNew = false;
          if (isNew) {
            C.JSArray_methods.remove$1(myList, val);
            myList.push(val);
          }
          if ((flags & 4) !== 0) {
            val = msg._webclient$_data.getUint32(msg._pos, true);
            msg._pos += 4;
            atom.locId = val;
            if (!this.viewChanged) {
              t2 = atom._appearance;
              if (t2 != null) {
                t2 = t2.core;
                t2 = (t2.bits & 1) !== 0 || t2.luminosity !== 0 || t2.infraLuminosity !== 0;
              } else
                t2 = false;
            } else
              t2 = false;
            if (t2)
              this.viewChanged = true;
            atom.mapOffset_dirty = true;
            atom.position_dirty = true;
            atom.updateXYZ$0();
            t2 = $.me.stage;
            if (t2 != null)
              t2.resort = true;
            tryGlide = glide;
          } else
            tryGlide = false;
          if ((flags & 8) !== 0) {
            if (!this.viewChanged) {
              t2 = atom._appearance;
              if (t2 != null) {
                t2 = t2.core;
                t2 = (t2.bits & 1) !== 0 || t2.luminosity !== 0 || t2.infraLuminosity !== 0;
              } else
                t2 = false;
            } else
              t2 = false;
            if (t2)
              this.viewChanged = true;
            appearance = $.me.appearanceMap.$index(0, msg.getUint32as16$0());
            atom.set$appearance(0, appearance);
            if (appearance != null && appearance.screenLoc != null) {
              t2 = new N.ScreenRange(null, null, null);
              t2.Parse$1(appearance.screenLoc);
              atom.screenLoc = t2;
            } else
              atom.screenLoc = null;
            if (!this.viewChanged) {
              t2 = atom._appearance;
              if (t2 != null) {
                t2 = t2.core;
                t2 = (t2.bits & 1) !== 0 || t2.luminosity !== 0 || t2.infraLuminosity !== 0;
              } else
                t2 = false;
            } else
              t2 = false;
            if (t2)
              this.viewChanged = true;
            t2 = atom.glide;
            if (t2 != null) {
              t3 = $.me;
              t3 = !(t3.clientTickLag < t3.tickLag && (t3.glitz & 64) === 0);
            } else
              t3 = false;
            if (t3)
              t2.updateSpeed$1(appearance);
          }
          if ((flags & 16) !== 0) {
            val = msg._webclient$_data.getInt16(msg._pos, true);
            t2 = msg._pos += 2;
            atom.pixel_x = val;
            val = msg._webclient$_data.getInt16(t2, true);
            t2 = msg._pos += 2;
            atom.pixel_y = val;
            val = msg._webclient$_data.getInt16(t2, true);
            t2 = msg._pos += 2;
            atom.pixel_w = val;
            val = msg._webclient$_data.getInt16(t2, true);
            msg._pos += 2;
            atom.pixel_z = val;
            atom._oob = null;
            atom._visbounds = null;
            atom._visboundsTiles = null;
            atom.mapOffset_dirty = true;
            atom.position_dirty = true;
            t2 = $.me.stage;
            if (t2 != null)
              t2.resort = true;
          }
          if ((flags & 32) !== 0) {
            val = msg._webclient$_data.getInt16(msg._pos, true);
            t2 = msg._pos += 2;
            atom.step_x = val;
            val = msg._webclient$_data.getInt16(t2, true);
            t2 = msg._pos += 2;
            atom.step_y = val;
            val = msg._webclient$_data.getFloat32(t2, true);
            msg._pos += 4;
            atom.step_size = val;
            atom._oob = null;
            atom._visbounds = null;
            atom._visboundsTiles = null;
            t2 = $.me.stage;
            if (t2 != null)
              t2.resort = true;
            atom.mapOffset_dirty = true;
            atom.position_dirty = true;
            tryGlide = glide;
          }
          if ((flags & 64) !== 0) {
            val = msg._webclient$_data.getInt16(msg._pos, true);
            t2 = msg._pos += 2;
            val0 = msg._webclient$_data.getInt16(t2, true);
            t2 = msg._pos += 2;
            val1 = msg._webclient$_data.getUint16(t2, true);
            t2 = msg._pos += 2;
            val2 = msg._webclient$_data.getUint16(t2, true);
            msg._pos += 2;
            atom.boundRect = new U.Rectangle0(val, val0, val1, val2, t1);
            atom.mapOffset_dirty = true;
            atom.position_dirty = true;
            t2 = $.me.stage;
            if (t2 != null)
              t2.resort = true;
          }
          if ((flags & 128) !== 0)
            atom.order = msg._webclient$_data.getUint8(msg._pos++);
          if (tryGlide)
            atom.beginGlide$0();
        }
        if (ret > 0) {
          t1 = this.movs;
          if (this.screen.length > 0) {
            this.allmovs = P.List_List$from(t1, true, null);
            for (t1 = this.screen, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
              id = t1[_i];
              if (!C.JSArray_methods.contains$1(this.allmovs, id))
                C.JSArray_methods.add$1(this.allmovs, id);
            }
          } else
            this.allmovs = t1;
        }
        return ret;
      },
      readMovableChanges$2: function(msg, myList) {
        return this.readMovableChanges$3$isScreen(msg, myList, false);
      },
      fillViewParams$0: function() {
        var t1, xoff, yoff, x0, y0, x1, y1, _seeThru, t2, t3, t4, turf, area, pt, _i, atomId, t5, t6, atom;
        t1 = this.view;
        xoff = t1.turfOffsetX;
        yoff = t1.turfOffsetY;
        x0 = P.max(xoff, 0);
        y0 = P.max(yoff, 0);
        x1 = P.min(xoff + t1.width, this.maxx);
        y1 = P.min(yoff + t1.height, this.maxy);
        _seeThru = (this.sight & 512) !== 0;
        t2 = new N.MapInfo_fillViewParams_fillAtom();
        for (t3 = this.turfsInView, t4 = t3.length, turf = null, area = null, pt = null, _i = 0; _i < t3.length; t3.length === t4 || (0, H.throwConcurrentModificationError)(t3), ++_i) {
          atomId = t3[_i];
          turf = $.me.infoMap.$index(0, atomId);
          if (turf != null) {
            t5 = turf.x;
            if (!(t5 < x0))
              if (!(t5 >= x1)) {
                t5 = turf.y;
                t5 = t5 < y0 || t5 >= y1 || turf.z !== $.me.mapHomeZ;
              } else
                t5 = true;
            else
              t5 = true;
          } else
            t5 = true;
          if (t5)
            continue;
          turf.toString;
          area = $.me.infoMap.$index(0, turf.locId);
          t5 = turf.x;
          t6 = turf.y;
          pt = t1.pt[t5 - xoff + (t6 - yoff) * t1.width];
          if (area != null) {
            pt.light = area._appearance.core.luminosity > 0;
            t2.call$2(area, pt);
          }
          t2.call$2(turf, pt);
          if (_seeThru)
            pt.clear = true;
        }
        for (t3 = this.movs, t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, H.throwConcurrentModificationError)(t3), ++_i) {
          atomId = t3[_i];
          atom = $.me.infoMap.$index(0, atomId);
          if (atom == null)
            continue;
          turf = $.me.infoMap.$index(0, atom.locId);
          if (turf != null) {
            t5 = turf.x;
            if (!(t5 < x0))
              if (!(t5 >= x1)) {
                t5 = turf.y;
                t5 = t5 < y0 || t5 >= y1 || turf.z !== $.me.mapHomeZ;
              } else
                t5 = true;
            else
              t5 = true;
          } else
            t5 = true;
          if (t5)
            continue;
          t5 = turf.x;
          t6 = turf.y;
          pt = t1.pt[t5 - xoff + (t6 - yoff) * t1.width];
          t2.call$2(atom, pt);
          if (_seeThru)
            pt.clear = true;
        }
      },
      drawMap$0: [function() {
        var atomIds, t1, t2, t3, tickingAtoms, i, i0, t4, eg, tg, t5, pg, sdx, sdy, clientAppearance, t6, t7, t8, t9, t10, t11, px, py, extra, t12, lengthChanged, inUse, atomId, atom, areaChange, area, auxScreen, _i, mapId, map;
        atomIds = P.List_List$from(this.turfsInView, true, null);
        C.JSArray_methods.addAll$1(atomIds, this.turfsEx);
        t1 = this.areas;
        C.JSArray_methods.addAll$1(atomIds, t1);
        C.JSArray_methods.addAll$1(atomIds, this.allmovs);
        t2 = $.me.missiles;
        t2.toString;
        C.JSArray_methods.addAll$1(atomIds, new P._HashMapKeyIterable(t2, [H.getTypeArgumentByIndex(t2, 0)]));
        t2 = this.client;
        t2.tick$0();
        t3 = $.me.pendingFlicks;
        if (t3._collection$_length !== 0) {
          t3 = t3.get$values(t3);
          C.JSArray_methods.forEach$1(P.List_List$from(t3, false, H.getRuntimeTypeArgument(t3, "Iterable", 0)), new N.MapInfo_drawMap_closure());
        }
        tickingAtoms = $.me.tickingAtoms;
        for (i = tickingAtoms.length; i0 = i - 1, i > 0; i = i0)
          tickingAtoms[i0].tick$0();
        t3 = $.me.missiles;
        if (t3._collection$_length !== 0)
          C.JSArray_methods.forEach$1(P.List_List$from(t3.get$values(t3), true, null), new N.MapInfo_drawMap_closure0());
        t3 = $.me;
        t3 = t3.infoMap.$index(0, t3.playerMob);
        t4 = this.eye;
        eg = t4.glide;
        tg = this.trueEye.glide;
        t5 = t3 != null;
        pg = t5 ? t3.glide : null;
        sdx = eg.glide_x * tg.glide_x > 0;
        sdy = eg.glide_y * tg.glide_y > 0;
        tg.glide$0();
        eg.speed = tg.speed;
        if (t5)
          if (sdx || sdy || this.centeredPlayer) {
            t3 = eg.glideSize;
            t3 = t3 === 0 || t3 === pg.glideSize;
          } else
            t3 = false;
        else
          t3 = false;
        if (t3) {
          if (tg.glide_x === 0) {
            eg.target_dx = 0;
            eg.glide_x = 0;
          } else {
            if (tg.last_x === eg.last_x)
              if (!$.me.get$pixelGlide() || tg.last_step_x === eg.last_step_x)
                t3 = sdx || this.centeredPlayer;
              else
                t3 = false;
            else
              t3 = false;
            if (t3)
              eg.target_dx = tg.target_dx;
          }
          if (tg.glide_y === 0) {
            eg.target_dy = 0;
            eg.glide_y = 0;
          } else {
            if (tg.last_y === eg.last_y) {
              if ($.me.get$pixelGlide()) {
                t3 = tg.last_step_y;
                t5 = eg.last_step_y;
                t5 = t3 == null ? t5 == null : t3 === t5;
                t3 = t5;
              } else
                t3 = true;
              if (t3)
                t3 = sdy || this.centeredPlayer;
              else
                t3 = false;
            } else
              t3 = false;
            if (t3)
              eg.target_dy = tg.target_dy;
          }
        } else {
          eg.target_dy = 0;
          eg.target_dx = 0;
        }
        eg.glide$0();
        if ($.me.stage == null)
          return;
        clientAppearance = t2.get$currentAppearance();
        if (clientAppearance != null)
          $.me.stage.CheckColor$1(clientAppearance.core.color);
        t2 = t4.x;
        t3 = t4.y;
        t5 = t4.z;
        t6 = this.my;
        t7 = t6.pixel_x;
        t8 = t4.glide;
        t9 = t8 != null;
        t10 = t9 ? C.JSNumber_methods.round$0(t8.glide_x) : 0;
        t11 = t6.pixel_y;
        t8 = t9 ? C.JSNumber_methods.round$0(t8.glide_y) : 0;
        this.updateMapHome$7(t2, t3, t5, t7 + t10, t11 + t8, t6.pixel_w, t6.pixel_z);
        if (this.viewChanged)
          this.view.viewChanged = true;
        px = t6.x;
        py = t6.y;
        if (($.me.dmbFlags & 134217728) !== 0) {
          px = t4.x;
          py = t4.y;
        }
        t2 = this.sight;
        extra = (t2 & 1280) !== 0 ? 2 : 0;
        t3 = this.view;
        t5 = t4.x;
        t6 = t4.y;
        t4 = t4.z;
        t7 = this.drawViewX + extra;
        t8 = this.drawViewY + extra;
        t9 = px - t5;
        t10 = py - t6;
        t11 = (t2 & 1) !== 0;
        t12 = this.seeInDark;
        t2 = (t2 & 65536) !== 0;
        if (t3.centerX !== t5 || t3.centerY !== t6 || t3.centerZ !== t4) {
          t3.centerX = t5;
          t3.centerY = t6;
          t3.centerZ = t4;
          t3.turfOffsetX = t5 - C.JSInt_methods._tdivFast$1(t3.width, 2);
          t3.turfOffsetY = t6 - C.JSInt_methods._tdivFast$1(t3.height, 2);
          t3.viewChanged = true;
        }
        if (t3.lengthX !== t7 || t3.lengthY !== t8) {
          t3.lengthX = t7;
          t3.lengthY = t8;
          t3.viewChanged = true;
          t3.eyeChanged = true;
          lengthChanged = true;
        } else
          lengthChanged = false;
        if (t3.eyeDx !== t9 || t3.eyeDy !== t10) {
          t3.eyeDx = t9;
          t3.eyeDy = t10;
          t3.eyeChanged = true;
          t3.viewChanged = true;
        }
        if (t3.blind === t11) {
          t4 = t3.nightVision;
          t4 = (t4 == null ? t12 != null : t4 !== t12) || t3.seeInfra !== t2;
        } else
          t4 = true;
        if (t4) {
          t3.seeall = false;
          t3.blind = t11;
          t3.nightVision = t12;
          t3.seeInfra = t2;
          t3.viewChanged = true;
        }
        if (lengthChanged || t3.pt == null)
          t3.resize$0(0);
        if (t3.eyeChanged) {
          t3.eyeX = 1 + (t3.lengthX / 2 | 0) + t3.eyeDx;
          t3.eyeY = 1 + (t3.lengthY / 2 | 0) + t3.eyeDy;
          t3.precalcEyeOffsets$0();
          t3.eyeChanged = false;
        }
        t3.showBoundaries = true;
        if (this.viewChanged || t3.viewChanged) {
          this.viewChanged = false;
          if (t3.setVisBits$0())
            t3.enumerateVisLocations$0();
        }
        t2 = P.$int;
        t3 = P.bool;
        inUse = P.HashMap_HashMap(null, null, null, t2, t3);
        for (i = atomIds.length; i0 = i - 1, i > 0; i = i0) {
          atomId = atomIds[i0];
          atom = $.me.infoMap.$index(0, atomId);
          if (atom == null)
            continue;
          if (this.atomIsVisible$2(atomId, atom)) {
            inUse.$indexSet(0, atomId, true);
            if (!atom.inert && atom.tickIndex < 0 && atom.cantick)
              atom.prepareTick$1(true);
          } else if (atom.tickIndex >= 0 && atom.glide == null)
            atom.prepareTick$1(false);
        }
        i = t1.length;
        while (true) {
          i0 = i - 1;
          if (!(i > 0)) {
            areaChange = false;
            break;
          }
          area = $.me.infoMap.$index(0, t1[i0]);
          if (area != null && area.icons_dirty) {
            areaChange = true;
            break;
          }
          i = i0;
        }
        if (areaChange)
          $.me.infoMap.forEach$1(0, new N.MapInfo_drawMap_closure1());
        t1 = this.auxMaps;
        if (t1._collection$_length !== 0) {
          auxScreen = P.HashMap_HashMap(null, null, null, t2, t3);
          for (t2 = this.screen, t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, H.throwConcurrentModificationError)(t2), ++_i) {
            atomId = t2[_i];
            atom = $.me.infoMap.$index(0, atomId);
            if (atom != null) {
              t4 = atom.screenLoc;
              if (t4 != null) {
                t4 = t4.c1;
                t4 = (t4 != null ? t4.map : null) != null;
              } else
                t4 = false;
            } else
              t4 = false;
            if (t4)
              auxScreen.$indexSet(0, atomId, atom.icons_dirty || atom.position_dirty);
          }
        } else
          auxScreen = null;
        t2 = $.me.stage;
        if (t2 != null)
          t2.doAtoms$2(atomIds, inUse);
        if (t1._collection$_length !== 0)
          for (t1 = new P._HashMapKeyIterator(t1, t1._computeKeys$0(), 0, null); t1.moveNext$0();) {
            mapId = t1._collection$_current;
            map = $.me.exStages.$index(0, mapId);
            if (map != null)
              map.doScreenAtoms$2(this.screen, auxScreen);
          }
      }, "call$0", "get$drawMap", 0, 0, 3],
      atomIsVisible$2: function(id, atom) {
        var t1, t2, vis, showSomething, loc, flag, rect, _z, _minx, _miny, _maxx, _maxy, turfId, _y, tvis, _x, turfId0;
        t1 = C.JSInt_methods._shrOtherPositive$1(id, 24);
        if (atom.x < 0 || atom.z !== $.me.mapHomeZ)
          if (t1 !== 4) {
            if (atom.onScreen) {
              t2 = atom.screenLoc;
              t2 = t2 != null && t2.c1 != null;
            } else
              t2 = false;
            t2 = !t2;
          } else
            t2 = false;
        else
          t2 = false;
        if (t2)
          return false;
        if (t1 === 1) {
          t1 = this.sight;
          if ((t1 & 16) !== 0) {
            if (!atom._isVisible) {
              atom.icons_dirty = true;
              atom._isVisible = true;
            }
            if (!atom._normalVis) {
              atom.icons_dirty = true;
              atom._normalVis = true;
            }
            return true;
          }
          if ((t1 & 1280) !== 0) {
            vis = this.view.visLocs.$index(0, id);
            atom.set$drawDark(vis == null || (vis & 1) === 0);
            showSomething = true;
          } else {
            atom.set$drawDark(false);
            showSomething = null;
          }
          loc = id;
        } else {
          if (t1 === 2) {
            if ((this.sight & 8) !== 0) {
              if (!atom._isVisible) {
                atom.icons_dirty = true;
                atom._isVisible = true;
              }
              if (!atom._normalVis) {
                atom.icons_dirty = true;
                atom._normalVis = true;
              }
              return true;
            }
            loc = atom.locId;
          } else if (t1 === 3) {
            flag = id === $.me.playerMob ? 36 : 4;
            if ((this.sight & flag) !== 0) {
              if (!atom._isVisible) {
                atom.icons_dirty = true;
                atom._isVisible = true;
              }
              if (!atom._normalVis) {
                atom.icons_dirty = true;
                atom._normalVis = true;
              }
              return true;
            }
            loc = atom.locId;
          } else
            loc = null;
          showSomething = null;
        }
        if ((this.sight & 256) !== 0) {
          if (!atom._normalVis) {
            atom.icons_dirty = true;
            atom._normalVis = true;
          }
          vis = 1;
          showSomething = true;
        } else {
          t1 = this.view;
          if (atom.get$oob()) {
            rect = atom.get$visboundsTiles();
            _z = t1.centerZ;
            _minx = P.max(P.max(0, atom.x + rect.left), t1.turfOffsetX + t1.x0);
            _miny = P.max(P.max(0, atom.y + rect.top), t1.turfOffsetY + t1.y0);
            _maxx = P.min(P.min(this.maxx - 1, atom.x + (rect.left + rect.width)), t1.turfOffsetX + t1.x1);
            _maxy = P.min(P.min(this.maxy - 1, atom.y + (rect.top + rect.height)), t1.turfOffsetY + t1.y1);
            turfId = N.XYZtoTurfIdCheck(_minx, _miny, _z);
            for (t2 = _maxx - _minx + 1, _y = _miny, vis = 0, tvis = null; _y <= _maxy; ++_y) {
              for (_x = _minx; _x <= _maxx; ++_x, turfId = turfId0) {
                turfId0 = turfId + 1;
                tvis = t1.visLocs.$index(0, turfId);
                if (tvis == null)
                  continue;
                vis = (vis | tvis) >>> 0;
                if ((vis & 1) !== 0) {
                  _y = _maxy;
                  turfId = turfId0;
                  break;
                }
              }
              turfId += this.maxx - t2;
            }
            t1 = (vis & 1) !== 0;
            if (t1 !== atom._normalVis) {
              atom.icons_dirty = true;
              atom._normalVis = t1;
            }
          } else {
            vis = t1.visLocs.$index(0, loc);
            if (vis == null) {
              if (atom._normalVis) {
                atom.icons_dirty = true;
                atom._normalVis = false;
              }
              vis = 0;
            } else {
              t1 = (vis & 1) !== 0;
              if (t1 !== atom._normalVis) {
                atom.icons_dirty = true;
                atom._normalVis = t1;
              }
            }
          }
        }
        t1 = this.atomIsVisibleDefault$2(atom, vis);
        if (t1 !== atom._isVisible) {
          atom.icons_dirty = true;
          atom._isVisible = t1;
        }
        if (showSomething !== true)
          if (!(atom._normalVis || (atom.id & 4278190080) >>> 0 === 67108864))
            if (atom.onScreen) {
              t1 = atom.screenLoc;
              t1 = t1 != null && t1.c1 != null;
            } else
              t1 = false;
          else
            t1 = true;
        else
          t1 = true;
        return t1;
      },
      atomIsVisibleDefault$3: function(atom, vis, extraSight) {
        var a, e;
        a = atom.get$currentAppearance();
        if (a == null || a.core.invisibility >= 101)
          return false;
        if ((vis & 5) === 4) {
          e = ($.me.dmbFlags & 134217728) !== 0 ? this.eye : this.trueEye;
          if (P.max(Math.abs(e.x - atom.x), Math.abs(e.y - atom.y)) >= a.core.infraLuminosity)
            return false;
        }
        return this.seeInvisible >= a.core.invisibility;
      },
      atomIsVisibleDefault$2: function(atom, vis) {
        return this.atomIsVisibleDefault$3(atom, vis, 0);
      },
      updateMapHome$7: function(center_x, center_y, center_z, px, py, pw, pz) {
        var t1, deltaX, deltaY, atom, t2, t3, centerScreenX, centerScreenY, _i, ma;
        t1 = $.me;
        deltaX = t1.mapHomeX;
        deltaY = t1.mapHomeY;
        atom = N.AtomInfo$(65535, null, null);
        atom.pixel_x = px;
        atom.pixel_y = py;
        atom.pixel_w = pw;
        atom.pixel_z = pz;
        atom.x = center_x;
        atom.y = center_y;
        atom.mapOffset_dirty = true;
        atom.calculateMapOffset$0();
        t1 = this.screenLeft;
        t2 = this.mapTileWidth;
        t3 = $.me;
        centerScreenX = C.JSInt_methods.round$0((t1 + (t2 / 2 | 0)) * t3.iconWidth);
        centerScreenY = C.JSInt_methods.round$0((this.screenTop + ((this.mapTileHeight + 1) / 2 | 0)) * t3.iconHeight);
        t2 = centerScreenX - atom.mapOffsetX;
        t3.mapHomeX = t2;
        t1 = centerScreenY - atom.mapOffsetY;
        t3.mapHomeY = t1;
        t3.mapHomeZ = center_z;
        deltaX = t2 - deltaX;
        deltaY = t1 - deltaY;
        if (deltaX !== 0 || deltaY !== 0) {
          this.myBounds = new U.Rectangle0(-t2, -t1, this.mapWidth, this.mapHeight, [null]);
          for (t1 = N.MapInfo_allMapIcons(), t2 = t1.length, _i = 0; t3 = t1.length, _i < t3; t3 === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            ma = t1[_i];
            if ((ma.flags & 1) !== 0)
              continue;
            ma.baseX += deltaX;
            ma.baseY += deltaY;
            ma.updated = true;
          }
        }
      },
      static: {
        MapInfo_allMapIcons: function() {
          var t1 = $.me.stage;
          if (t1 != null)
            return t1.unsorted;
          return [];
        }
      }
    },
    MapInfo_mapTick_closure: {
      "^": "Closure:1;$this",
      call$0: function() {
        return this.$this.mapTick$0();
      }
    },
    MapInfo_mapTick_closure0: {
      "^": "Closure:2;",
      call$2: [function(e, stack) {
        P.print("Map renderer error: " + H.S(e) + "\n" + H.S(stack));
      }, null, null, 4, 0, null, 3, 70, "call"]
    },
    MapInfo_mapTick_closure1: {
      "^": "Closure:1;$this",
      call$0: function() {
        return this.$this.mapTick$0();
      }
    },
    MapInfo_resizeMap_closure: {
      "^": "Closure:0;",
      call$1: function(t) {
        return J.$shr$n(t, 24) === 1;
      }
    },
    MapInfo_resizeMap_closure0: {
      "^": "Closure:54;",
      call$1: function(i) {
        return i != null && (i.id & 4278190080) >>> 0 === 16777216;
      }
    },
    MapInfo_resizeMap_closure1: {
      "^": "Closure:0;remap",
      call$1: [function(id) {
        return this.remap.$index(0, id);
      }, null, null, 2, 0, null, 10, "call"]
    },
    MapInfo_resizeMap_closure2: {
      "^": "Closure:0;remap",
      call$1: [function(id) {
        return this.remap.$index(0, id);
      }, null, null, 2, 0, null, 10, "call"]
    },
    MapInfo_refreshScreen_closure: {
      "^": "Closure:55;_box_0,ex",
      call$2: function(mapId, map) {
        var rect, t1, t2, t3, t4, t5;
        if (mapId == null)
          return;
        rect = this.ex.$index(0, mapId);
        if (rect == null)
          map.mainSprite.removeChildren$0();
        else {
          map.screenLeft = P.max(1 - rect.left, 0);
          map.screenBottom = P.max(1 - rect.top, 0);
          map.screenRight = P.max(rect.left + rect.width, 0);
          t1 = P.max(rect.top + rect.height, 0);
          map.screenTop = t1;
          map.screenBottomStart = t1;
          t2 = this._box_0;
          t2.oldWidth = map.fullWidth;
          t2.oldHeight = map.fullHeight;
          t3 = map.screenLeft;
          t4 = map.screenRight;
          t5 = $.me;
          map.fullWidth = (t3 + t4) * t5.iconWidth;
          map.fullHeight = (t1 + map.screenBottom) * t5.iconHeight;
          map.set$clipRect(null);
          if (map.fullWidth !== t2.oldWidth || map.fullHeight !== t2.oldHeight)
            map._resized$1(null);
        }
      }
    },
    MapInfo_processMovableChangeMessage_eq: {
      "^": "Closure:56;$this",
      call$0: function() {
        var t1, t2;
        t1 = this.$this;
        t2 = t1.eye;
        t1 = t1.trueEye;
        return C.ListEquality_DefaultEquality.equals$2([t2.x, t2.y, t2.z, t2.step_x, t2.step_y], [t1.x, t1.y, t1.z, t1.step_x, t1.step_y]);
      }
    },
    MapInfo_fillViewParams_fillAtom: {
      "^": "Closure:57;",
      call$2: function(atom, pt) {
        if (atom._appearance.core.get$atomOpacity())
          pt.clear = false;
        pt.lamp = P.max(pt.lamp, atom._appearance.core.luminosity);
        pt.infra_light = P.max(pt.infra_light, atom._appearance.core.infraLuminosity);
      }
    },
    MapInfo_drawMap_closure: {
      "^": "Closure:58;",
      call$1: function(pf) {
        pf.apply$0();
      }
    },
    MapInfo_drawMap_closure0: {
      "^": "Closure:59;",
      call$1: function(mi) {
        var glide, t1, t2, t0, speed, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, xyz, turfx, turfy, endx, endy, dx, dy, posx, posy, d, newdir;
        if (mi != null) {
          glide = mi.atom.glide;
          t1 = mi.trackAtom;
          if (t1 == null) {
            t2 = mi.trackId;
            if (t2 !== 0) {
              t1 = $.me.infoMap.$index(0, t2);
              mi.trackAtom = t1;
              t2 = t1 != null;
              t0 = t2;
              t2 = t1;
              t1 = t0;
            } else {
              t2 = t1;
              t1 = false;
            }
          } else {
            t2 = t1;
            t1 = false;
          }
          if (t1)
            mi.trackSequence = t2.sequence;
          if (!mi.init) {
            mi.init = true;
            t1 = mi.atom;
            t1.locId = mi.srcTurf;
            t1.updateXYZ$0();
            mi.atom.beginGlide$0();
            t1 = mi.atom;
            t1.locId = mi.destTurf;
            t1.updateXYZ$0();
            mi.atom.beginGlide$0();
            speed = mi.atom._appearance.core.glideSize;
            glide.speed = speed <= 0 ? $.me.iconWidth : speed;
          }
          t1 = mi.atom;
          t2 = t1.x;
          t3 = $.me;
          t4 = t3.iconWidth;
          t5 = glide.glide_x;
          t6 = t1.pixel_x;
          t7 = t1.y;
          t3 = t3.mapformat !== 0 ? t3.iconHeight : t4;
          t8 = glide.glide_y;
          t9 = t1.pixel_y;
          t10 = mi.trackAtom;
          if (t10 != null) {
            t11 = t10.sequence;
            t12 = mi.trackSequence;
            t11 = (t11 == null ? t12 == null : t11 === t12) && t10.z === t1.z;
          } else
            t11 = false;
          if (t11) {
            t10 = t10.get$turfId();
            mi.destTurf = t10;
            t1.locId = t10;
            mi.atom.updateXYZ$0();
            xyz = N.XYZ$fromLoc(mi.destTurf);
            t10 = xyz.x;
            t1 = $.me;
            t11 = t1.iconWidth;
            turfx = t10 * t11;
            t10 = xyz.y;
            turfy = t10 * (t1.mapformat !== 0 ? t1.iconHeight : t11);
            t1 = mi.trackAtom;
            t10 = t1.glide;
            t11 = t10 != null;
            t12 = t11 ? C.JSNumber_methods.round$0(t10.glide_x) : 0;
            endx = turfx + t12 + t1.pixel_x + t1.step_x;
            t10 = t11 ? C.JSNumber_methods.round$0(t10.glide_y) : 0;
            endy = turfy + t10 + t1.pixel_y + t1.step_y;
          } else {
            xyz = N.XYZ$fromLoc(mi.destTurf);
            t1 = xyz.x;
            t10 = $.me;
            t11 = t10.iconWidth;
            turfx = t1 * t11;
            t1 = xyz.y;
            turfy = t1 * (t10.mapformat !== 0 ? t10.iconHeight : t11);
            endy = turfy;
            endx = turfx;
          }
          t1 = mi.atom;
          t1.pixel_x = endx - turfx;
          t1.pixel_y = endy - turfy;
          dx = t2 * t4 + t5 + t6 - endx;
          glide.glide_x = dx;
          dy = t7 * t3 + t8 + t9 - endy;
          glide.glide_y = dy;
          glide.glide$0();
          t1 = dx === 0;
          if (!t1 || dy !== 0)
            glide.moving = 1;
          posx = endx + glide.glide_x;
          posy = endy + glide.glide_y;
          t2 = mi.atom;
          t3 = $.me;
          t2.x = C.JSInt_methods.clamp$2(C.JSDouble_methods.round$0(posx / t3.iconWidth), 0, t3.mapInfo.maxx - 1);
          t3 = mi.atom;
          t2 = $.me;
          t3.y = C.JSInt_methods.clamp$2(C.JSDouble_methods.round$0(posy / (t2.mapformat !== 0 ? t2.iconHeight : t2.iconWidth)), 0, t2.mapInfo.maxy - 1);
          t2 = mi.atom;
          t3 = t2.x;
          t4 = $.me;
          t5 = t4.iconWidth;
          glide.glide_x = posx - t3 * t5 - t2.pixel_x;
          t6 = t2.y;
          t4 = t4.mapformat !== 0 ? t4.iconHeight : t5;
          glide.glide_y = posy - t6 * t4 - t2.pixel_y;
          t2.locId = N.XYZtoTurfIdCheck(t3, t6, t2.z);
          t2 = mi.atom;
          t2.mapOffset_dirty = true;
          t2.position_dirty = true;
          $.me.mapInfo.mapResort$0();
          if (!t1 || dy !== 0) {
            d = Math.sqrt(dx * dx + dy * dy) * $.$get$Missile_sin22();
            t1 = -d;
            if (dx <= t1)
              newdir = 4;
            else
              newdir = dx >= d ? 8 : 0;
            if (dy <= t1)
              newdir |= 1;
            else if (dy >= d)
              newdir |= 2;
            if (newdir !== 0 && newdir !== mi.atom._appearance.core.dir)
              mi.atom._appearance.core.dir = newdir;
          } else if (!mi.atom.get$moving()) {
            $.me.infoMap.remove$1(0, mi.atom.id);
            $.me.missiles.remove$1(0, mi.atom.id);
          }
        }
      }
    },
    MapInfo_drawMap_closure1: {
      "^": "Closure:36;",
      call$2: function(turfId, turf) {
        var t1;
        if ((turfId & 4278190080) >>> 0 === 16777216) {
          turf.toString;
          t1 = $.me.infoMap.$index(0, turf.locId) != null && $.me.infoMap.$index(0, turf.locId).icons_dirty;
        } else
          t1 = false;
        if (t1)
          turf.position_dirty = true;
      }
    },
    MessageElem: {
      "^": "Object;val,func"
    },
    ByondMessage: {
      "^": "Object;_webclient$_data,_elems,_pos,type",
      get$length: function(_) {
        return this._webclient$_data.byteLength - this._pos;
      },
      getInt16$0: function(_) {
        var val = this._webclient$_data.getInt16(this._pos, true);
        this._pos += 2;
        return val;
      },
      getInt32$0: function(_) {
        var val = this._webclient$_data.getInt32(this._pos, true);
        this._pos += 4;
        return val;
      },
      getUint16$0: function(_) {
        var val = this._webclient$_data.getUint16(this._pos, true);
        this._pos += 2;
        return val;
      },
      getUint32$0: function(_) {
        var val = this._webclient$_data.getUint32(this._pos, true);
        this._pos += 4;
        return val;
      },
      getUint32as16$0: function() {
        var val, t1;
        val = this._webclient$_data.getUint16(this._pos, true);
        t1 = this._pos += 2;
        if ((val & 32768) !== 0) {
          val = (val & 32767 | this._webclient$_data.getUint16(t1, true) << 15) >>> 0;
          this._pos += 2;
        }
        return val;
      },
      getFloat32$0: function(_) {
        var val = this._webclient$_data.getFloat32(this._pos, true);
        this._pos += 4;
        return val;
      },
      getString$1: function(_, strlen) {
        var t1, t2, bytes, truelen;
        if (strlen === 0 || strlen > this._webclient$_data.byteLength - this._pos)
          strlen = this._webclient$_data.byteLength - this._pos;
        t1 = this._webclient$_data.buffer;
        t2 = this._pos;
        t1.toString;
        H._checkViewArguments(t1, t2, strlen);
        bytes = new Uint8Array(t1, t2, strlen);
        truelen = C.NativeUint8List_methods.indexOf$1(bytes, 0);
        if (truelen >= 0 && truelen < strlen) {
          t1 = this._webclient$_data.buffer;
          t2 = this._pos;
          t1.toString;
          H._checkViewArguments(t1, t2, truelen);
          bytes = new Uint8Array(t1, t2, truelen);
          strlen = truelen + 1;
        }
        this._pos += strlen;
        return C.Latin1Codec_false.decode$1(bytes);
      },
      getString$0: function($receiver) {
        return this.getString$1($receiver, 0);
      },
      getUTFString$0: function() {
        var strlen = this.getUint16$0(0);
        if (strlen === 65535)
          strlen = this.getUint32$0(0);
        return strlen > 0 ? this.getString$1(0, strlen) : "";
      },
      readIdRunLength$1: function(count) {
        var result, i, id, newId, rep;
        result = new Array(count);
        for (i = 0, id = 0, newId = null, rep = 0; i < count; ++i) {
          if (rep === 0) {
            newId = this.getUint32as16$0();
            if (newId === 2147483647)
              rep = this._webclient$_data.getUint8(this._pos++);
            else
              id = newId;
          } else
            --rep;
          result[i] = id;
        }
        return result;
      },
      send$1: function(_, socket) {
        var t1, t2, _i, elem;
        this._webclient$_data = new DataView(new ArrayBuffer(H._checkLength(this._pos)));
        this._pos = 0;
        for (t1 = this._elems, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          elem = t1[_i];
          elem.func.call$1(elem.val);
        }
        socket.send(this._webclient$_data.buffer);
      },
      putUTFString$1: function(val) {
        var t1, t2;
        t1 = val.length;
        t2 = t1 < 65535 ? 2 : 6;
        this._elems.push(new N.MessageElem(val, this.get$_putUTFString()));
        this._pos += t1 + t2;
        return;
      },
      _putType$1: [function(val) {
        this._webclient$_data.setUint16(this._pos, val, false);
        this._pos += 2;
      }, "call$1", "get$_putType", 2, 0, 9],
      _putInt16$1: [function(val) {
        this._webclient$_data.setInt16(this._pos, val, true);
        this._pos += 2;
      }, "call$1", "get$_putInt16", 2, 0, 9],
      _putInt32$1: [function(val) {
        this._webclient$_data.setInt32(this._pos, val, true);
        this._pos += 4;
      }, "call$1", "get$_putInt32", 2, 0, 9],
      _putUint8$1: [function(val) {
        this._webclient$_data.setUint8(this._pos++, val);
      }, "call$1", "get$_putUint8", 2, 0, 9],
      _putUint16$1: [function(val) {
        this._webclient$_data.setUint16(this._pos, val, true);
        this._pos += 2;
      }, "call$1", "get$_putUint16", 2, 0, 9],
      _putUint32$1: [function(val) {
        this._webclient$_data.setUint32(this._pos, val, true);
        this._pos += 4;
      }, "call$1", "get$_putUint32", 2, 0, 9],
      _putUint16as32$1: [function(val) {
        var t1, t2;
        t1 = this._webclient$_data;
        t2 = this._pos;
        if (val < 32768) {
          t1.setUint16(t2, val, true);
          this._pos += 2;
        } else {
          t1.setUint32(t2, ((val & 4294934528) << 1 | 32768 | val & 32767) >>> 0, true);
          this._pos += 4;
        }
      }, "call$1", "get$_putUint16as32", 2, 0, 9],
      _putString$1: [function(val) {
        var bytes, t1, _i, $byte;
        bytes = C.Latin1Codec_false.get$encoder().convert$1(val);
        for (t1 = bytes.length, _i = 0; _i < bytes.length; bytes.length === t1 || (0, H.throwConcurrentModificationError)(bytes), ++_i) {
          $byte = bytes[_i];
          this._webclient$_data.setUint8(this._pos++, $byte);
        }
        this._webclient$_data.setUint8(this._pos++, 0);
      }, "call$1", "get$_putString", 2, 0, 16],
      _putUTFString$1: [function(val) {
        var t1, t2, t3, bytes, _i, $byte;
        t1 = val.length;
        t2 = this._webclient$_data;
        t3 = this._pos;
        if (t1 < 65535) {
          t2.setUint16(t3, t1, true);
          this._pos += 2;
        } else {
          t2.setUint16(t3, 65535, true);
          t2 = this._pos += 2;
          this._webclient$_data.setUint32(t2, t1, true);
          this._pos += 4;
        }
        bytes = C.Latin1Codec_false.get$encoder().convert$1(val);
        for (t1 = bytes.length, _i = 0; _i < bytes.length; bytes.length === t1 || (0, H.throwConcurrentModificationError)(bytes), ++_i) {
          $byte = bytes[_i];
          this._webclient$_data.setUint8(this._pos++, $byte);
        }
      }, "call$1", "get$_putUTFString", 2, 0, 16],
      _putBytes$1: [function(val) {
        var n, n4, i;
        n = val.byteLength;
        n4 = C.JSInt_methods._tdivFast$1(n, 4) * 4;
        for (i = 0; i < n4; i += 4) {
          this._webclient$_data.setUint32(this._pos, val.getUint32(i, false), false);
          this._pos += 4;
        }
        for (; i < n; ++i)
          this._webclient$_data.setUint8(this._pos++, val.getUint8(i));
      }, "call$1", "get$_putBytes", 2, 0, 62],
      ByondMessage$fromBuffer$1: function(buffer) {
        var t1, val;
        this._webclient$_data = null;
        this._pos = 0;
        if (buffer.byteLength < 2) {
          this.type = -1;
          return;
        }
        buffer.toString;
        t1 = H.NativeByteData_NativeByteData$view(buffer, 0, null);
        this._webclient$_data = t1;
        val = t1.getUint16(0, false);
        this._pos += 2;
        this.type = val;
      },
      ByondMessage$1: function(type) {
        var t1 = [];
        this._elems = t1;
        this._pos = 0;
        t1.push(new N.MessageElem(type, this.get$_putType()));
        this._pos += 2;
      },
      static: {
        ByondMessage$fromBuffer: function(buffer) {
          var t1 = new N.ByondMessage(null, null, 0, -1);
          t1.ByondMessage$fromBuffer$1(buffer);
          return t1;
        },
        ByondMessage$: function(type) {
          var t1 = new N.ByondMessage(null, null, 0, -1);
          t1.ByondMessage$1(type);
          return t1;
        }
      }
    },
    NonValidator: {
      "^": "Object;",
      allowsElement$1: function(element) {
        return true;
      },
      allowsAttribute$3: function(element, attributeName, value) {
        return true;
      }
    },
    DataAttributeValidator: {
      "^": "Object;",
      allowsElement$1: function(element) {
        if (element.tagName === "LINK")
          if (element.getAttribute("rel") === "stylesheet")
            return true;
        return false;
      },
      allowsAttribute$3: function(element, attributeName, value) {
        if (C.JSString_methods.startsWith$1(attributeName, "data-"))
          return true;
        if (element.tagName === "LINK")
          return attributeName === "rel" || attributeName === "href" || attributeName === "type";
        return false;
      }
    },
    NonSanitizer: {
      "^": "Object;",
      sanitizeTree$1: function(node) {
      }
    },
    SpaceSanitizer: {
      "^": "Object;spaces",
      sanitizeTree$1: function(node) {
        this.walk$1(node);
      },
      trimNear$1: function(node) {
        if (node == null)
          return true;
        if (node.nodeType !== 1)
          return false;
        return node.tagName.toLowerCase() === "div";
      },
      walk$1: function(node) {
        var child, nextChild, t1;
        for (child = node.firstChild; child != null; child = nextChild) {
          nextChild = child.nextSibling;
          if (child.nodeType === 3) {
            if (nextChild != null && nextChild.nodeType === 3) {
              child.textContent = J.$add$ns(child.textContent, nextChild.textContent);
              t1 = nextChild.parentNode;
              if (t1 != null)
                t1.removeChild(nextChild);
              nextChild = child;
              continue;
            }
            if (this.trimNear$1(child.previousSibling))
              child.textContent = J.trimLeft$0$s(child.textContent);
            if (this.trimNear$1(nextChild))
              child.textContent = J.trimRight$0$s(child.textContent);
            if (child.textContent.length === 0) {
              t1 = child.parentNode;
              if (t1 != null)
                t1.removeChild(child);
              continue;
            }
          } else
            this.walk$1(child);
        }
      }
    },
    StripSanitizer: {
      "^": "Object;noconts",
      sanitizeTree$1: function(node) {
        this.walk$1(node);
      },
      walk$1: function(node) {
        var child, t1, t2, nextChild, t3, tag;
        for (child = node.firstChild, t1 = this.noconts._nativeRegExp, t2 = J.getInterceptor$x(node); child != null; child = nextChild) {
          nextChild = child.nextSibling;
          t3 = child.nodeType;
          if (t3 === 3)
            continue;
          else if (t3 === 1) {
            H.interceptedTypeCast(child, "$isElement");
            tag = child.tagName;
            if (typeof tag !== "string")
              H.throwExpression(H.argumentErrorValue(tag));
            if (!t1.test(tag) && child.firstChild != null) {
              t2.insertAllBefore$2(node, P.List_List$from(child.childNodes, true, null), nextChild);
              nextChild = child.nextSibling;
            }
            t3 = child.parentNode;
            if (t3 != null)
              t3.removeChild(child);
          } else
            this.walk$1(child);
        }
      }
    },
    SimpleSanitizer: {
      "^": "Object;allowed",
      sanitizeTree$1: function(node) {
        this.walk$1(node);
      },
      walk$1: function(node) {
        var child, t1, t2, nextChild, t3, tag;
        for (child = node.firstChild, t1 = this.allowed._nativeRegExp, t2 = J.getInterceptor$x(node); child != null; child = nextChild) {
          nextChild = child.nextSibling;
          t3 = child.nodeType;
          if (t3 === 3)
            continue;
          else if (t3 === 1) {
            H.interceptedTypeCast(child, "$isElement");
            tag = child.tagName;
            if (typeof tag !== "string")
              H.throwExpression(H.argumentErrorValue(tag));
            if (!t1.test(tag)) {
              t2.insertAllBefore$2(node, P.List_List$from(child.childNodes, true, null), nextChild);
              nextChild = child.nextSibling;
              t3 = child.parentNode;
              if (t3 != null)
                t3.removeChild(child);
            }
          } else
            this.walk$1(child);
        }
      }
    },
    MaptextSanitizer: {
      "^": "Object;",
      sanitizeTree$1: function(node) {
        this.walk$1(node);
      },
      walk$1: function(node) {
        var child, nextChild, t1, t2, newParent, txt, len, i, newParent0;
        for (child = node.firstChild; child != null; child = nextChild) {
          nextChild = child.nextSibling;
          t1 = child.nodeType;
          if (t1 === 3)
            if (J.startsWith$1$s(child.textContent, "\n")) {
              t2 = child.previousSibling;
              t2 = t2 != null && t2.nodeType === 1;
            } else
              t2 = false;
          else
            t2 = false;
          if (t2) {
            newParent = child.previousSibling;
            txt = child.textContent;
            len = txt.length;
            for (i = 0; i < len; ++i)
              if (txt[i] !== "\n")
                break;
            while (true) {
              newParent0 = newParent.lastChild;
              if (!(newParent0 != null && newParent0.nodeType === 1 && H.interceptedTypeCast(newParent0, "$isElement").tagName !== "BR"))
                break;
              newParent = newParent0;
            }
            if (i >= len) {
              newParent.appendChild(child);
              continue;
            }
            t1 = J.getInterceptor$s(txt).substring$2(txt, 0, i);
            newParent.appendChild(document.createTextNode(t1));
            child.textContent = C.JSString_methods.substring$1(txt, i);
          } else {
            if (t1 === 1) {
              H.interceptedTypeCast(child, "$isElement");
              if (child.tagName === "BR") {
                t1 = child.previousSibling;
                t1 = t1 != null && t1.nodeType === 1;
              } else
                t1 = false;
            } else
              t1 = false;
            if (t1) {
              newParent = child.previousSibling;
              while (true) {
                newParent0 = newParent.lastChild;
                if (!(newParent0 != null && newParent0.nodeType === 1 && H.interceptedTypeCast(newParent0, "$isElement").tagName !== "BR"))
                  break;
                newParent = newParent0;
              }
              newParent.appendChild(child);
            } else
              this.walk$1(child);
          }
        }
      }
    },
    SkinParam: {
      "^": "Object;name,value,not,iftrue,iffalse"
    },
    ByondJS_create_closure: {
      "^": "Closure:6;",
      call$2: [function(a, b) {
        return $.$get$ByondJS_skin().find$2(0, a, b);
      }, function(a) {
        return this.call$2(a, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 0, 4, "call"]
    },
    ByondJS_create_closure0: {
      "^": "Closure:0;",
      call$1: [function(a) {
        return $.$get$ByondJS_skin().createPrompt$1(a);
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondJS_create_closure1: {
      "^": "Closure:0;",
      call$1: [function(a) {
        return $.$get$ByondJS_skin().whichPrompt$1(a);
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondJS_create_closure2: {
      "^": "Closure:6;",
      call$2: [function(a, b) {
        return $.$get$ByondJS_lightbox().create$2(a, b);
      }, function(a) {
        return this.call$2(a, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 0, 4, "call"]
    },
    ByondJS_create_closure3: {
      "^": "Closure:21;",
      call$1: [function(a) {
        return $.$get$ByondJS_lightbox().close$1(0, a);
      }, function() {
        return this.call$1(null);
      }, "call$0", null, null, null, 0, 2, null, 2, 0, "call"]
    },
    ByondJS_create_closure4: {
      "^": "Closure:1;",
      call$0: [function() {
        return $.$get$ByondJS_lightbox().clickoff$0();
      }, null, null, 0, 0, null, "call"]
    },
    ByondJS_create_closure5: {
      "^": "Closure:1;",
      call$0: [function() {
        return $.$get$ByondJS_lightbox().resize$0(0);
      }, null, null, 0, 0, null, "call"]
    },
    ByondJS_create_closure6: {
      "^": "Closure:10;",
      call$1: [function(e) {
        var t1, t2;
        if (e == null)
          return;
        if (e.bubbles) {
          t1 = W._convertNativeToDart_EventTarget(e.target);
          t2 = W._convertNativeToDart_EventTarget(e.currentTarget);
          t2 = t1 == null ? t2 == null : t1 === t2;
          t1 = t2;
        } else
          t1 = false;
        if (t1)
          e.preventDefault();
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondJS_create_closure7: {
      "^": "Closure:0;",
      call$1: [function(e) {
        var t1 = J.getInterceptor$x(e);
        t1.stopPropagation$0(e);
        t1.preventDefault$0(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondJS_toBool_closure: {
      "^": "Closure:0;",
      call$1: function(_) {
        return;
      }
    },
    ByondJS_toNum_closure: {
      "^": "Closure:0;",
      call$1: function(_) {
        return;
      }
    },
    ByondJS_toPoint_closure: {
      "^": "Closure:0;",
      call$1: function(s) {
        return 0;
      }
    },
    ByondJS_toPoint_closure0: {
      "^": "Closure:0;",
      call$1: function(s) {
        return 0;
      }
    },
    ByondJS_toAnchor_closure: {
      "^": "Closure:0;",
      call$1: function(s) {
        return -1;
      }
    },
    ByondJS_toAnchor_closure0: {
      "^": "Closure:0;",
      call$1: function(s) {
        return -1;
      }
    },
    ByondJS_keys_closure: {
      "^": "Closure:0;obj,own",
      call$1: function(p) {
        return this.own.apply$2$thisArg([p], this.obj);
      }
    },
    ByondJS_toCamel_closure: {
      "^": "Closure:0;",
      call$1: function(m) {
        return m.$index(0, 1).toUpperCase();
      }
    },
    ByondJS_fromCamel_closure: {
      "^": "Closure:0;",
      call$1: function(m) {
        return "-" + m.$index(0, 1).toLowerCase();
      }
    },
    ByondJS_css2rgb_closure: {
      "^": "Closure:0;",
      call$1: function(s) {
        return 0;
      }
    },
    ByondJS_css2rgb_closure0: {
      "^": "Closure:0;",
      call$1: function(s) {
        return 0;
      }
    },
    ByondJS_addFont_closure: {
      "^": "Closure:0;",
      call$1: [function(n) {
        var t1 = $.me.exStages;
        C.JSArray_methods.forEach$1(P.List_List$from(new P._HashMapKeyIterable(t1, [H.getTypeArgumentByIndex(t1, 0)]), true, null), new N.ByondJS_addFont__closure());
      }, null, null, 2, 0, null, 27, "call"]
    },
    ByondJS_addFont__closure: {
      "^": "Closure:4;",
      call$1: function(s) {
        $.me.maptextCache.updateMap$1(s);
      }
    },
    ByondJS_cssQuote_closure: {
      "^": "Closure:0;",
      call$1: function(s) {
        return C.JSString_methods.$add("\\", s);
      }
    },
    ByondJS_toPx_closure: {
      "^": "Closure:0;",
      call$1: function(s) {
        return 0;
      }
    },
    ByondJS_cssUnit_closure: {
      "^": "Closure:0;",
      call$1: function(s) {
        return 0;
      }
    },
    ByondJS_getControlCssRule_closure: {
      "^": "Closure:4;prefix",
      call$1: function(s) {
        return this.prefix + J.trim$0$s(s);
      }
    },
    ByondJS_getControlCssRule_closure0: {
      "^": "Closure:4;",
      call$1: function(s) {
        return true;
      }
    },
    ByondJS_setControlCssRule_closure: {
      "^": "Closure:4;prefix",
      call$1: function(s) {
        return this.prefix + J.trim$0$s(s);
      }
    },
    ByondJS_setControlCssRule_closure0: {
      "^": "Closure:4;",
      call$1: function(s) {
        return true;
      }
    },
    ByondJS_setControlCssRule_closure1: {
      "^": "Closure:4;_box_0,text,sheet",
      call$1: function(s) {
        var t1, t2, rules, rule;
        t1 = this.sheet;
        t2 = this._box_0;
        t1.insertRule(s + " {}", t2.rules.length);
        rules = t1.rules;
        t2.rules = rules;
        rule = C._CssRuleList_methods.get$last(rules);
        t2.rule = rule;
        rule.style.cssText = this.text;
        t2.ret = rule.style.cssText;
      }
    },
    ByondJS_controlCssAttr_closure: {
      "^": "Closure:0;_box_0,control,vals",
      call$1: [function(_) {
        return N.ByondJS_controlCssAttr(this.control, this._box_0.selector, this.vals);
      }, null, null, 2, 0, null, 5, "call"]
    },
    ByondJS_controlCssAttr_closure0: {
      "^": "Closure:4;prefix",
      call$1: function(s) {
        return C.JSString_methods.trim$0(this.prefix + J.trim$0$s(s));
      }
    },
    ByondJS_controlCssAttr_closure1: {
      "^": "Closure:4;",
      call$1: function(s) {
        return true;
      }
    },
    ByondJS_controlCssAttr_closure2: {
      "^": "Closure:4;_box_0,vals,sheet,names,nl",
      call$1: function(s) {
        var t1, t2, t3, t4, t5, t6, j, $name, val, rules, rule, t7, value;
        t1 = this._box_0;
        t1.rule = null;
        for (t1.j = 0, t2 = this.nl, t3 = this.vals, t4 = this.names, t5 = this.sheet, t6 = 0; t6 < t2; j = t1.j + 1, t1.j = j, t6 = j) {
          $name = t4[t6];
          t1.name = $name;
          if (typeof $name !== "string")
            continue;
          val = t3.$index(0, $name);
          t1.val = val;
          if (typeof val === "number") {
            val = J.toString$0$(val) + "px";
            t1.val = val;
            t6 = val;
          } else
            t6 = val;
          if (typeof t6 === "string") {
            t6 = t1.rule;
            if (t6 == null) {
              t5.insertRule(s + " {}", t1.rules.length);
              rules = t5.rules;
              t1.rules = rules;
              rule = C._CssRuleList_methods.get$last(rules);
              t1.rule = rule;
              t6 = rule;
            }
            t6 = t6.style;
            t7 = N.ByondJS_fromCamel(t1.name);
            value = t1.val;
            t7 = (t6 && C.CssStyleDeclaration_methods)._browserPropertyName$1(t6, t7);
            if (value == null)
              value = "";
            t6.setProperty(t7, value, "");
          }
        }
      }
    },
    ByondJS_onDomLoaded_done: {
      "^": "Closure:3;callback",
      call$0: function() {
        var exception;
        P.print("DOM load detected");
        try {
          this.callback.call$0();
        } catch (exception) {
          H.unwrapException(exception);
        }
      }
    },
    ByondJS_onDomLoaded_ondone: {
      "^": "Closure:13;done",
      call$1: [function(e) {
        var t1, exception;
        P.print("DOM load event");
        this.done.call$0();
        P.print("Removing listener for DOM load event");
        try {
          t1 = window;
          C.Window_methods._removeEventListener$3(t1, "load", this, null);
        } catch (exception) {
          H.unwrapException(exception);
        }
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondJS_dmEscape_closure: {
      "^": "Closure:0;",
      call$1: function(m) {
        return C.JSString_methods.$add("\\", m.$index(0, 1));
      }
    },
    ByondJS_atomsInUse_closure: {
      "^": "Closure:0;",
      call$1: function(s) {
        return;
      }
    },
    ByondJS_atomsInUse_closure0: {
      "^": "Closure:0;",
      call$1: function(s) {
        return;
      }
    },
    ByondJS_methods_closure: {
      "^": "Closure:0;",
      call$1: [function(s) {
        var t1;
        if (typeof s === "number")
          return s;
        if (s == null)
          return "";
        if (typeof s !== "string")
          s = J.toString$0$(s);
        s.toString;
        t1 = H.stringReplaceAllUnchecked(s, "&", "&amp;");
        t1.toString;
        t1 = H.stringReplaceAllUnchecked(t1, "<", "&lt;");
        t1.toString;
        return H.stringReplaceAllUnchecked(t1, ">", "&gt;");
      }, null, null, 2, 0, null, 9, "call"]
    },
    ByondJS_methods_closure0: {
      "^": "Closure:0;",
      call$1: [function(s) {
        var t1;
        if (typeof s === "number")
          return s;
        if (s == null)
          return "";
        if (typeof s !== "string")
          s = J.toString$0$(s);
        s.toString;
        t1 = H.stringReplaceAllUnchecked(s, "<", "&lt;");
        t1.toString;
        s = H.stringReplaceAllUnchecked(t1, ">", "&gt;");
        t1 = document;
        t1 = t1.createElement("div");
        J.setInnerHtml$2$treeSanitizer$x(t1, s, $.$get$ByondJS_stripSanitizer());
        return t1.textContent;
      }, null, null, 2, 0, null, 9, "call"]
    },
    ByondJS_methods_closure1: {
      "^": "Closure:0;",
      call$1: [function(s) {
        var t1;
        if (s == null)
          return "";
        if (typeof s !== "string")
          s = J.toString$0$(s);
        t1 = document;
        t1 = t1.createElement("div");
        J.setInnerHtml$2$treeSanitizer$x(t1, s, $.$get$ByondJS_stripSanitizer());
        return t1.innerHTML;
      }, null, null, 2, 0, null, 9, "call"]
    },
    ByondJS_methods_closure2: {
      "^": "Closure:0;",
      call$1: [function(s) {
        var t1;
        if (s == null)
          return "";
        if (typeof s !== "string")
          s = J.toString$0$(s);
        t1 = document;
        t1 = t1.createElement("div");
        J.setInnerHtml$2$treeSanitizer$x(t1, s, $.$get$ByondJS_simpleSanitizer());
        return t1.innerHTML;
      }, null, null, 2, 0, null, 9, "call"]
    },
    ByondJS_methods_closure3: {
      "^": "Closure:0;",
      call$1: [function(s) {
        return N.ByondJS_toBool(s, true);
      }, null, null, 2, 0, null, 9, "call"]
    },
    ByondJS_methods_closure4: {
      "^": "Closure:0;",
      call$1: [function(s) {
        return N.ByondJS_toNum(s, true);
      }, null, null, 2, 0, null, 9, "call"]
    },
    ByondJS_methods_closure5: {
      "^": "Closure:0;",
      call$1: [function(s) {
        var xy = N.ByondJS_toPoint(s);
        if (xy != null)
          return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["x", xy.x, "y", xy.y]));
        return;
      }, null, null, 2, 0, null, 9, "call"]
    },
    ByondJS_methods_closure6: {
      "^": "Closure:0;",
      call$1: [function(s) {
        var quote;
        if (typeof s === "number")
          s = C.JSNumber_methods.toString$0(s);
        if (typeof s !== "string")
          return "";
        if (C.JSString_methods.startsWith$1(s, '"') || C.JSString_methods.startsWith$1(s, "'")) {
          quote = C.JSString_methods.substring$2(s, 0, 1);
          s = C.JSString_methods.substring$1(s, 1);
          if (C.JSString_methods.endsWith$1(s, quote))
            s = C.JSString_methods.substring$2(s, 0, s.length - 1);
        } else
          quote = null;
        return N.ByondJS_dmEscape(s, quote);
      }, null, null, 2, 0, null, 9, "call"]
    },
    ByondJS_methods_closure7: {
      "^": "Closure:65;",
      call$2: [function($name, r) {
        var t1, t2;
        if ($name == null)
          $name = "";
        t1 = $.me.localFiles;
        t2 = new N.LocalFile($name, null);
        t2._webclient$_data = new Uint8Array(H._ensureNativeList(r));
        t1.$indexSet(0, $name, t2);
        return $name;
      }, null, null, 4, 0, null, 17, 72, "call"]
    },
    ByondJS_methods_closure8: {
      "^": "Closure:1;",
      call$0: [function() {
        return "http://" + H.S($.me.host) + ":" + H.S($.me.port);
      }, null, null, 0, 0, null, "call"]
    },
    ByondJS_methods_closure9: {
      "^": "Closure:0;",
      call$1: [function(uri) {
        return C.JSString_methods.$add(C.JSString_methods.$add("http://", $.me.host) + ":" + J.toString$0$($.me.port) + "/", J.replaceAll$2$s(uri, P.RegExp_RegExp("^/+", true, false), ""));
      }, null, null, 2, 0, null, 73, "call"]
    },
    ByondJS_methods_closure10: {
      "^": "Closure:6;",
      call$2: [function(crc, ext) {
        var t1, t2;
        t1 = $.me;
        t2 = C.JSString_methods.$add("cache/", J.toString$0$(crc));
        t2 += typeof ext === "string" && ext !== "" ? C.JSString_methods.$add(".", ext) : "";
        return "http://" + H.S(t1.host) + ":" + H.S(t1.port) + "/" + t2;
      }, function(crc) {
        return this.call$2(crc, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 74, 75, "call"]
    },
    ByondJS_methods_closure11: {
      "^": "Closure:0;",
      call$1: [function(f) {
        var t1 = $.me;
        return "http://" + H.S(t1.host) + ":" + H.S(t1.port) + "/" + H.S(f);
      }, null, null, 2, 0, null, 14, "call"]
    },
    ByondJS_methods_closure12: {
      "^": "Closure:0;",
      call$1: [function(a) {
        var t1, url;
        t1 = J.getInterceptor$asx(a);
        if (J.$lt$n(t1.get$length(a), 1))
          return false;
        url = t1.$index(a, 0);
        return N.ByondJS_isByondUrl(url, J.$gt$n(t1.get$length(a), 1) && t1.$index(a, 1), true);
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondJS_methods_closure13: {
      "^": "Closure:1;",
      call$0: [function() {
        return N.ByondJS_stage();
      }, null, null, 0, 0, null, "call"]
    },
    ByondJS_methods_closure14: {
      "^": "Closure:1;",
      call$0: [function() {
        return N.ByondJS_backstage();
      }, null, null, 0, 0, null, "call"]
    },
    ByondJS_methods_closure15: {
      "^": "Closure:0;",
      call$1: [function(a) {
        var t1, atall;
        t1 = J.getInterceptor$asx(a);
        if (J.$lt$n(t1.get$length(a), 1) || !J.getInterceptor(t1.$index(a, 0)).$isElement)
          return false;
        atall = J.$gt$n(t1.get$length(a), 1) && N.ByondJS_toBool(t1.$index(a, 1), false);
        return N.ByondJS_isBackstage(t1.$index(a, 0), atall);
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondJS_methods_closure16: {
      "^": "Closure:66;",
      call$2: [function(s, cb) {
        return $.$get$ByondJS_skin().sendOutMsg$2(s, cb);
      }, function(s) {
        return this.call$2(s, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 9, 76, "call"]
    },
    ByondJS_methods_closure17: {
      "^": "Closure:0;",
      call$1: [function(a) {
        var t1, t2;
        t1 = J.getInterceptor$asx(a);
        if (J.$gt$n(t1.get$length(a), 0)) {
          t2 = t1.$index(a, 0);
          t2 = typeof t2 === "string";
        } else
          t2 = false;
        return N.ByondJS_toPx(t2 ? t1.$index(a, 0) : "px");
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondJS_methods_closure18: {
      "^": "Closure:0;",
      call$1: [function(a) {
        var result, t1, o, t2, prop, v, camel, t3, props, dec;
        result = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
        t1 = J.getInterceptor$asx(a);
        if (J.$lt$n(t1.get$length(a), 1) || !(t1.$index(a, 0) instanceof P.JsObject))
          return result;
        o = t1.$index(a, 0);
        for (t1 = N.ByondJS_keys(o), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new H.WhereIterator(t2, t1._f, [H.getTypeArgumentByIndex(t1, 0)]); t1.moveNext$0();) {
          prop = t2.get$current();
          v = o.$index(0, prop);
          camel = N.ByondJS_toCamel(prop);
          if (camel === "fontFamily")
            result.$indexSet(0, camel, v != null ? J.toString$0$(v) : null);
          else if (camel === "fontSize") {
            if (typeof v === "string") {
              t3 = $.$get$ByondJS__numUnitRx();
              t3.toString;
              t3 = t3._execAnchored$2(v, 0);
            } else
              t3 = false;
            if (t3)
              result.$indexSet(0, camel, v);
            else if (v != null)
              result.$indexSet(0, camel, J.toString$0$(v) + "pt");
            else
              result.$indexSet(0, camel, v);
          } else if (camel === "fontStyle") {
            props = C.JSString_methods.split$1(J.trim$0$s(v != null ? J.toString$0$(v) : ""), $.$get$ByondJS__commaRx());
            if (C.JSArray_methods.contains$1(props, "bold"))
              t3 = "bold";
            else
              t3 = C.JSArray_methods.contains$1(props, "normal") ? "normal" : null;
            result.$indexSet(0, "fontWeight", t3);
            result.$indexSet(0, "fontStyle", C.JSArray_methods.contains$1(props, "italic") ? "italic" : null);
            dec = [];
            if (C.JSArray_methods.contains$1(props, "underline"))
              dec.push("underline");
            if (C.JSArray_methods.contains$1(props, "strike"))
              dec.push("line-through");
            result.$indexSet(0, "textDecoration", dec.length !== 0 ? C.JSArray_methods.join$1(dec, " ") : null);
          }
        }
        return result;
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondJS_methods_closure19: {
      "^": "Closure:0;",
      call$1: [function(a) {
        var result, t1, o, t2, prop, v, camel, t3, n, m, styStr, t4, t5, sty, props;
        result = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
        t1 = J.getInterceptor$asx(a);
        if (J.$lt$n(t1.get$length(a), 1) || !(t1.$index(a, 0) instanceof P.JsObject))
          return result;
        o = t1.$index(a, 0);
        for (t1 = N.ByondJS_keys(o), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new H.WhereIterator(t2, t1._f, [H.getTypeArgumentByIndex(t1, 0)]); t1.moveNext$0();) {
          prop = t2.get$current();
          v = o.$index(0, prop);
          if (v == null)
            continue;
          v = J.trim$0$s(J.toString$0$(v));
          camel = N.ByondJS_toCamel(prop);
          if (camel === "fontFamily")
            result.$indexSet(0, camel, v);
          else if (camel === "fontSize") {
            t3 = $.$get$ByondJS__unitsRx();
            t3.toString;
            if (t3._execAnchored$2(v, 0)) {
              t3 = C.JSString_methods.trim$0(v);
              n = H.Primitives_parseDouble(t3, new N.ByondJS_methods__closure0());
              if (n != null) {
                m = $.$get$ByondJS__numUnitRx().firstMatch$1(t3);
                t3 = m != null;
              } else {
                m = null;
                t3 = false;
              }
              if (t3)
                n *= N.ByondJS_toPx(m._match[3]) / N.ByondJS_toPx("pt");
              if (n != null)
                result.$indexSet(0, camel, n);
            }
          } else if (camel === "fontStyle") {
            styStr = result.$index(0, "fontStyle");
            if (styStr == null) {
              result.$indexSet(0, "fontStyle", "");
              styStr = "";
            }
            t3 = J.trim$0$s(styStr);
            t4 = $.$get$ByondJS__commaRx();
            t3 = C.JSString_methods.split$1(t3, t4);
            t5 = H.getTypeArgumentByIndex(t3, 0);
            sty = P.List_List$from(new H.WhereIterable(t3, new N.ByondJS_methods__closure1(), [t5]), true, t5);
            if (C.JSArray_methods.contains$1(C.JSString_methods.split$1(C.JSString_methods.trim$0(v), t4), "italic"))
              C.JSArray_methods.add$1(sty, "italic");
            t3 = sty.length - 1;
            if (t3 - 0 <= 32)
              H.Sort__insertionSort(sty, 0, t3, P.core_Comparable_compare$closure());
            else
              H.Sort__dualPivotQuicksort(sty, 0, t3, P.core_Comparable_compare$closure());
            result.$indexSet(0, "fontStyle", C.JSArray_methods.join$1(sty, " "));
          } else if (camel === "fontWeight") {
            styStr = result.$index(0, "fontStyle");
            if (styStr == null) {
              result.$indexSet(0, "fontStyle", "");
              styStr = "";
            }
            t3 = C.JSString_methods.split$1(J.trim$0$s(styStr), $.$get$ByondJS__commaRx());
            t4 = H.getTypeArgumentByIndex(t3, 0);
            sty = P.List_List$from(new H.WhereIterable(t3, new N.ByondJS_methods__closure2(), [t4]), true, t4);
            if (C.JSString_methods.matchAsPrefix$1("bold", v) != null)
              C.JSArray_methods.add$1(sty, "bold");
            else if (C.JSString_methods.matchAsPrefix$1("normal", v) != null)
              C.JSArray_methods.add$1(sty, "normal");
            else if (J.round$0$n(H.Primitives_parseDouble(v, new N.ByondJS_methods__closure3())) > 400)
              C.JSArray_methods.add$1(sty, "bold");
            t3 = sty.length - 1;
            if (t3 - 0 <= 32)
              H.Sort__insertionSort(sty, 0, t3, P.core_Comparable_compare$closure());
            else
              H.Sort__dualPivotQuicksort(sty, 0, t3, P.core_Comparable_compare$closure());
            result.$indexSet(0, "fontStyle", C.JSArray_methods.join$1(sty, " "));
          } else if (camel === "textDecoration") {
            styStr = result.$index(0, "fontStyle");
            if (styStr == null) {
              result.$indexSet(0, "fontStyle", "");
              styStr = "";
            }
            t3 = J.trim$0$s(styStr);
            t4 = $.$get$ByondJS__commaRx();
            t3 = C.JSString_methods.split$1(t3, t4);
            t5 = H.getTypeArgumentByIndex(t3, 0);
            sty = P.List_List$from(new H.WhereIterable(t3, new N.ByondJS_methods__closure4(), [t5]), true, t5);
            props = C.JSString_methods.split$1(C.JSString_methods.trim$0(v), t4);
            if (C.JSArray_methods.contains$1(props, "line-through"))
              C.JSArray_methods.add$1(sty, "strike");
            if (C.JSArray_methods.contains$1(props, "underline"))
              C.JSArray_methods.add$1(sty, "underline");
            result.$indexSet(0, "fontStyle", C.JSArray_methods.join$1(sty, " "));
          }
        }
        return result;
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondJS_methods__closure0: {
      "^": "Closure:0;",
      call$1: function(_) {
        return;
      }
    },
    ByondJS_methods__closure1: {
      "^": "Closure:0;",
      call$1: function(s) {
        return !J.get$isEmpty$asx(s);
      }
    },
    ByondJS_methods__closure2: {
      "^": "Closure:0;",
      call$1: function(s) {
        return !J.get$isEmpty$asx(s);
      }
    },
    ByondJS_methods__closure3: {
      "^": "Closure:0;",
      call$1: function(_) {
        return 400;
      }
    },
    ByondJS_methods__closure4: {
      "^": "Closure:0;",
      call$1: function(s) {
        return !J.get$isEmpty$asx(s);
      }
    },
    ByondJS_methods_closure20: {
      "^": "Closure:6;",
      call$2: [function(a, b) {
        return $.$get$ByondJS_skin().controlFor$1(a);
      }, function(a) {
        return this.call$2(a, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 0, 4, "call"]
    },
    ByondJS_methods_closure21: {
      "^": "Closure:6;",
      call$2: [function(a, b) {
        return N.ByondJS_controlChildren(a, N.ByondJS_toBool(b, false), null);
      }, function(a) {
        return this.call$2(a, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 0, 4, "call"]
    },
    ByondJS_methods_closure22: {
      "^": "Closure:0;",
      call$1: [function(a) {
        var pos, t1;
        pos = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["x", 0, "y", 0]));
        if (!J.getInterceptor(a).$isNode)
          return pos;
        for (; t1 = J.getInterceptor(a), !!t1.$isNode;)
          if (!!t1.$isElement) {
            pos.$indexSet(0, "x", J.$add$ns(pos.$index(0, "x"), C.JSNumber_methods.round$0(a.offsetLeft)));
            pos.$indexSet(0, "y", J.$add$ns(pos.$index(0, "y"), C.JSNumber_methods.round$0(a.offsetTop)));
            a = a.offsetParent;
          } else
            a = a.parentNode;
        return pos;
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondJS_methods_closure23: {
      "^": "Closure:21;",
      call$1: [function(a) {
        var p, exception;
        p = null;
        try {
          p = N.ByondJS_innerSize(a);
        } catch (exception) {
          H.unwrapException(exception);
          p = new P.Point(0, 0, [null]);
        }
        return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["width", J.get$x$x(p), "height", J.get$y$x(p)]));
      }, function() {
        return this.call$1(null);
      }, "call$0", null, null, null, 0, 2, null, 2, 0, "call"]
    },
    ByondJS_methods_closure24: {
      "^": "Closure:1;",
      call$0: [function() {
        if ($.$get$ByondJS__delayed().$index(0, "fillAtomIcons") != null)
          return;
        $.$get$ByondJS__delayed().$indexSet(0, "fillAtomIcons", P.Future_Future(new N.ByondJS_methods__closure(), null));
      }, null, null, 0, 0, null, "call"]
    },
    ByondJS_methods__closure: {
      "^": "Closure:1;",
      call$0: function() {
        var t1, t2, t3, qc, t4, e, src, id, t5, fillingAtoms, fillingIcons;
        t1 = {};
        $.$get$ByondJS__delayed().remove$1(0, "fillAtomIcons");
        t2 = document;
        t3 = [null];
        qc = new W._FrozenElementList(t2.querySelectorAll("img[atom]"), t3);
        t1.fillingAtoms = null;
        t1.fillingIcons = null;
        for (t4 = new H.ListIterator(qc, qc.get$length(qc), 0, null); t4.moveNext$0();) {
          e = t4.__internal$_current;
          src = e.getAttribute("src");
          if (src != null && src !== "" && src !== "null")
            continue;
          src = e.getAttribute("fillingatom");
          if (src != null && src !== "" && src !== "null")
            continue;
          id = e.getAttribute("atom");
          if (typeof id === "string")
            id = H.Primitives_parseInt(id, null, new N.ByondJS_methods___closure());
          if (typeof id !== "number")
            continue;
          t5 = t1.fillingAtoms;
          if (t5 == null) {
            fillingAtoms = P.LinkedHashMap__makeEmpty();
            t1.fillingAtoms = fillingAtoms;
            t5 = fillingAtoms;
          }
          if (t5.$index(0, id) == null)
            t1.fillingAtoms.$indexSet(0, id, []);
          t1.fillingAtoms.$index(0, id).push(e);
          $.me.waitForAtomIcon$1(id).then$1(new N.ByondJS_methods___closure0(t1, e));
        }
        qc = new W._FrozenElementList(t2.querySelectorAll("img[icon]"), t3);
        for (t2 = new H.ListIterator(qc, qc.get$length(qc), 0, null); t2.moveNext$0();) {
          t3 = {};
          e = t2.__internal$_current;
          src = e.getAttribute("src");
          if (src != null && src !== "" && src !== "null")
            continue;
          src = e.getAttribute("fillingicon");
          if (src != null && src !== "" && src !== "null")
            continue;
          id = e.getAttribute("icon");
          t3.id = id;
          if (typeof id === "string") {
            id = H.Primitives_parseInt(id, null, new N.ByondJS_methods___closure1());
            t3.id = id;
            t4 = id;
          } else
            t4 = id;
          if (typeof t4 !== "number")
            continue;
          t5 = t1.fillingIcons;
          if (t5 == null) {
            fillingIcons = P.LinkedHashMap__makeEmpty();
            t1.fillingIcons = fillingIcons;
            t5 = fillingIcons;
          }
          if (t5.$index(0, t4) == null)
            t1.fillingIcons.$indexSet(0, t4, []);
          t1.fillingIcons.$index(0, t4).push(e);
          $.me.waitForIconInfo$1(t4).then$1(new N.ByondJS_methods___closure2(t3, t1, e));
        }
      }
    },
    ByondJS_methods___closure: {
      "^": "Closure:0;",
      call$1: function(id) {
        return;
      }
    },
    ByondJS_methods___closure0: {
      "^": "Closure:0;_box_1,e",
      call$1: [function(id) {
        var e, i, items, t1, t2, _i;
        i = $.me.getAtomIcon$1(id);
        items = this._box_1.fillingAtoms.$index(0, id);
        if (i != null && i !== "")
          for (t1 = items.length, t2 = this.e, _i = 0; _i < items.length; items.length === t1 || (0, H.throwConcurrentModificationError)(items), ++_i) {
            e = items[_i];
            t2.setAttribute("src", i);
          }
      }, null, null, 2, 0, null, 10, "call"]
    },
    ByondJS_methods___closure1: {
      "^": "Closure:0;",
      call$1: function(id) {
        return;
      }
    },
    ByondJS_methods___closure2: {
      "^": "Closure:67;_box_0,_box_1,e",
      call$1: [function(i) {
        var e, id, t1, items, t2, t3, _i, t4, t5, url;
        id = i.id;
        t1 = this._box_0;
        t1.id = id;
        if (i != null) {
          items = this._box_1.fillingIcons.$index(0, id);
          for (t2 = items.length, t3 = this.e, _i = 0; _i < items.length; items.length === t2 || (0, H.throwConcurrentModificationError)(items), ++_i) {
            e = items[_i];
            t4 = t1.id;
            t5 = P.LinkedHashMap__makeLiteral(["state", t3.getAttribute("iconstate"), "dir", t3.getAttribute("icondir"), "frame", t3.getAttribute("iconframe"), "moving", t3.getAttribute("iconmoving")]);
            url = N.ByondJS_iconUrl([t4, P._wrapToDart(P.JsObject__convertDataTree(t5))]);
            if (typeof url === "string")
              t3.setAttribute("src", url);
          }
        }
      }, null, null, 2, 0, null, 77, "call"]
    },
    ByondJS_methods_closure25: {
      "^": "Closure:2;",
      call$2: [function(params, id) {
        return $.me.mapConfig$2(params, id);
      }, null, null, 4, 0, null, 23, 10, "call"]
    },
    ByondJS_methods_closure26: {
      "^": "Closure:6;",
      call$2: [function(k, any) {
        var t1, t2, m;
        any = N.ByondJS_toBool(any, false);
        if (!!J.getInterceptor(k).$isKeyboardEvent) {
          t1 = k.type;
          t2 = t1 !== "keyup";
          if (t2 && t1 !== "keydown")
            return;
          return $.me.macro.lookup$7$canRecurse$soft(k.keyCode, k.altKey, k.ctrlKey, k.shiftKey, t2, any, true);
        }
        if (typeof k === "string") {
          m = $.me.macro.nameToJS$1(k);
          return $.me.macro.lookup$8$canRecurse$isRep$noChange(m.$index(0, "keyCode"), m.$index(0, "alt"), m.$index(0, "ctrl"), m.$index(0, "shift"), !m.$index(0, "up"), any, m.$index(0, "rep"), true);
        }
      }, function(k) {
        return this.call$2(k, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 31, 24, "call"]
    },
    ByondJS_methods_closure27: {
      "^": "Closure:0;",
      call$1: [function(c) {
        return $.me.macro.getMacro$1(c);
      }, null, null, 2, 0, null, 1, "call"]
    },
    ByondJS_methods_closure28: {
      "^": "Closure:1;",
      call$0: [function() {
        return $.me.macro.allMacros$0();
      }, null, null, 0, 0, null, "call"]
    },
    ByondJS_methods_closure29: {
      "^": "Closure:0;",
      call$1: [function(k) {
        return $.me.macro.isCharKey$1(k);
      }, null, null, 2, 0, null, 31, "call"]
    },
    ByondJS_methods_closure30: {
      "^": "Closure:0;",
      call$1: [function(params) {
        var t1 = $.me.macro;
        t1._keyToMacroLocal.clear$0(0);
        t1.insertSet$2(params, true);
        $.$get$ByondJS_skin().macrosChanged$0();
      }, null, null, 2, 0, null, 23, "call"]
    },
    ByondJS_methods_closure31: {
      "^": "Closure:68;",
      call$2: [function($name, hold) {
        var macro, m, command;
        macro = $.me.macro;
        m = macro.nameToJS$1($name);
        command = macro.lookup$9$canRecurse$isAuto$isRep$noChange(m.$index(0, "keyCode"), m.$index(0, "alt"), m.$index(0, "ctrl"), m.$index(0, "shift"), !m.$index(0, "up"), true, true, m.$index(0, "rep"), hold !== true);
        if (command != null) {
          if (command.length !== 0)
            $.$get$ByondJS_skin().doInput$1(command);
          return true;
        }
        return false;
      }, function($name) {
        return this.call$2($name, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 17, 81, "call"]
    },
    ByondJS_methods_closure32: {
      "^": "Closure:4;",
      call$1: [function($name) {
        return $.me.macro.nameToJS$1($name);
      }, null, null, 2, 0, null, 17, "call"]
    },
    ByondJS_methods_closure33: {
      "^": "Closure:6;",
      call$2: [function($event, any) {
        var isAlt, input, cmdText, t1, type, keyCode, isShift, isCtrl, t2, t3, t4, exception, command;
        any = N.ByondJS_toBool(any, false);
        isAlt = null;
        t1 = J.getInterceptor($event);
        if (!!t1.$isJsObject) {
          type = t1.$index($event, "type");
          keyCode = N.ByondJS_toNum(t1.$index($event, "keyCode"), false);
          isShift = N.ByondJS_toBool(t1.$index($event, "shiftKey"), false);
          isCtrl = N.ByondJS_toBool(t1.$index($event, "ctrlKey"), false);
          isAlt = N.ByondJS_toBool(t1.$index($event, "altKey"), false);
        } else if (!!t1.$isKeyboardEvent) {
          type = $event.type;
          keyCode = $event.keyCode;
          isShift = $event.shiftKey;
          isCtrl = $event.ctrlKey;
          isAlt = $event.altKey;
        } else {
          keyCode = null;
          isShift = null;
          isCtrl = null;
          type = null;
        }
        t2 = $.me.macro._getKeyInfo$1(keyCode);
        t3 = type !== "keyup";
        if (t3 && type !== "keydown")
          return false;
        if (!isCtrl && !isShift && !isAlt && type === "keydown" && $.me.macro.isCharKey$1(keyCode))
          try {
            input = $.$get$ByondJS_skin().find$1(0, ":input");
            cmdText = input != null ? input.callMethod$2("winget", ["text"]) : "";
            t4 = cmdText;
            if (typeof t4 === "string" && J.startsWith$1$s(cmdText, ".alt ") && C.JSString_methods.trim$0(J.substring$1$s(cmdText, 5)).length === 0)
              isAlt = true;
          } catch (exception) {
            H.unwrapException(exception);
          }
        command = $.me.macro.lookup$7$canRecurse$soft(keyCode, isAlt, isCtrl, isShift, t3, any, true);
        if (command != null) {
          $.me.macro.lookup$6$canRecurse(keyCode, isAlt, isCtrl, isShift, t3, any);
          if (command.length !== 0)
            $.$get$ByondJS_skin().doInput$1(command);
          if (!!t1.$isKeyboardEvent)
            $event.stopImmediatePropagation();
          return true;
        }
        if (t2 != null && type === "keydown")
          return true;
        return false;
      }, function($event) {
        return this.call$2($event, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 29, 24, "call"]
    },
    ByondJS_methods_closure34: {
      "^": "Closure:6;",
      call$2: [function($event, any) {
        var keyCode, t1;
        if (typeof $event === "string") {
          keyCode = $.me.macro.lookupCode$1($event);
          if (keyCode !== 0)
            $.me.macro.lookup$6$canRecurse(keyCode, false, false, false, any, any);
        } else {
          t1 = J.getInterceptor($event);
          if (!!t1.$isJsObject) {
            any = N.ByondJS_toBool(any, false);
            keyCode = $.me.macro.lookupCode$1(t1.$index($event, "name"));
            if (keyCode !== 0)
              $.me.macro.lookup$6$canRecurse(keyCode, false, false, false, t1.$index($event, "value"), any);
          }
        }
      }, function($event) {
        return this.call$2($event, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 29, 24, "call"]
    },
    ByondJS_methods_closure35: {
      "^": "Closure:1;",
      call$0: [function() {
        return $.me.macro.unstick$0();
      }, null, null, 0, 0, null, "call"]
    },
    ByondJS_methods_closure36: {
      "^": "Closure:6;",
      call$2: [function(c, b) {
        if (typeof c === "string")
          c = $.$get$ByondJS_skin().find$1(0, c);
        if (c instanceof P.JsObject)
          $.$get$ByondJS_skin().setPoll$2(c, N.ByondJS_toBool(b, false));
      }, function(c) {
        return this.call$2(c, true);
      }, "call$1", null, null, null, 2, 2, null, 83, 1, 4, "call"]
    },
    ByondJS_classMethods_closure: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure0: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure1: {
      "^": "Closure:6;",
      call$2: [function(a, b) {
        return;
      }, function(a) {
        return this.call$2(a, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 0, 4, "call"]
    },
    ByondJS_classMethods_closure2: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1 = J.getInterceptor$asx(c);
        if (N.ByondJS_toBool(t1.$index(c, "isPopup"), false) && N.ByondJS_toBool(t1.$index(c, "isRuntime"), false))
          c.callMethod$1("remove");
        else
          J.set$innerHtml$x(c.callMethod$2("content", a), "");
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure3: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        return J.$index$asx(c, "elem");
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure4: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        return $.$get$ByondJS_skin().remove$1(0, c);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure5: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        return false;
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure6: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var id, cb, props, _, _0, t1, url, mode, params, _i, p, prop, t2, p2, exception;
        t1 = J.getInterceptor$asx(a);
        if (J.$lt$n(t1.get$length(a), 1))
          return;
        url = t1.$index(a, 0);
        if (typeof url !== "string")
          return;
        if (!C.JSString_methods.startsWith$1(url, "byond:")) {
          $.$get$ByondJS_skin().sendOutMsg$1("link:" + url);
          return;
        }
        url = C.JSString_methods.substring$1(url, 6);
        for (; C.JSString_methods.startsWith$1(url, "/");)
          url = C.JSString_methods.substring$1(url, 1);
        if (C.JSString_methods.startsWith$1(url, "winset?") || C.JSString_methods.startsWith$1(url, "winget?")) {
          id = null;
          cb = null;
          mode = C.JSString_methods.substring$2(url, 0, 6);
          props = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
          params = $.$get$ByondJS_skin().parseParams$1(C.JSString_methods.substring$1(url, 7));
          for (t1 = params.length, _i = 0; _i < params.length; params.length === t1 || (0, H.throwConcurrentModificationError)(params), ++_i) {
            p = params[_i];
            J.$indexSet$ax(props, N.ByondJS_toCamel(p.name), p.value);
          }
          id = J.$index$asx(props, "id");
          props.deleteProperty$1("id");
          if (mode === "winget") {
            cb = J.$index$asx(props, "callback");
            prop = J.$index$asx(props, "property");
            if (cb == null || prop == null)
              return;
            props = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
            for (t1 = prop.split(","), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
              p2 = t1[_i];
              J.$indexSet$ax(props, N.ByondJS_fromCamel(p2), null);
            }
            try {
              $.$get$ByondJS_skin().winget$2(id, props);
              c.callMethod$2("script", [cb, props]);
            } catch (exception) {
              t1 = H.unwrapException(exception);
              _ = t1;
              P.print(_);
              return;
            }
          } else
            try {
              $.$get$ByondJS_skin().winset$2(id, props);
            } catch (exception) {
              t1 = H.unwrapException(exception);
              _0 = t1;
              P.print(_0);
              return;
            }
        } else if (C.JSString_methods.startsWith$1(url, "?"))
          $.me.sendTopicMessage$1(C.JSString_methods.substring$1(url, 1));
        else
          $.$get$ByondJS_skin().sendOutMsg$1("link:" + url);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure7: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, props, sub, wf, t2, t3, t4, t5, fn, p, t6, dot, id, t7, t8;
        t1 = J.getInterceptor$asx(a);
        if (J.$lt$n(t1.get$length(a), 1))
          return;
        props = t1.$index(a, 0);
        sub = J.$gt$n(t1.get$length(a), 1) ? t1.$index(a, 1) : null;
        t1 = J.getInterceptor$asx(c);
        wf = t1.$index(c, "winsetfn");
        for (t2 = N.ByondJS_keys(props), t3 = J.get$iterator$ax(t2.__internal$_iterable), t2 = new H.WhereIterator(t3, t2._f, [H.getTypeArgumentByIndex(t2, 0)]), t4 = J.getInterceptor$asx(wf), t5 = [null, null], fn = null; t2.moveNext$0();) {
          p = t3.get$current();
          t6 = J.getInterceptor$asx(p);
          dot = t6.lastIndexOf$1(p, ".");
          if (dot >= 0) {
            id = t1.$index(c, "fullid");
            if (J.$eq$(id, "") || id == null)
              id = t1.$index(c, "id");
            id = J.$add$ns(id, "." + t6.substring$2(p, 0, dot));
            t6 = P.LinkedHashMap__makeLiteral([t6.substring$1(p, dot + 1), props.$index(0, p)]);
            t6 = P._wrapToDart(P.JsObject__convertDataTree(t6));
            $.$get$ByondJS_skin().winset$2(id, t6);
            continue;
          }
          fn = t4.$index(wf, N.ByondJS_toCamel(p));
          if (fn instanceof P.JsFunction) {
            t6 = props.$index(0, p);
            t7 = fn._jsObject;
            t8 = P._convertToJS(c);
            t6 = P.List_List$from(new H.MappedListIterable([t6, sub], P.js___convertToJS$closure(), t5), true, null);
            P._convertToDart(t7.apply(t8, t6));
          }
        }
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure8: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, t2, p, obj, props, sub, wf, oldprops, _i, t3, t4, fn, t5, t6, t7, t8, dot, id, newp;
        t1 = J.getInterceptor$asx(a);
        if (J.$lt$n(t1.get$length(a), 1))
          return P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
        t2 = t1.$index(a, 0);
        if (typeof t2 === "string") {
          p = t1.$index(a, 0);
          obj = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral([p, 0]));
          t1.$indexSet(a, 0, obj);
          c.callMethod$2("winget", a);
          return P.List_List$from(N.ByondJS_keys(obj), true, null).length !== 1 ? obj : obj.$index(0, p);
        }
        props = t1.$index(a, 0);
        sub = J.$gt$n(t1.get$length(a), 1) ? t1.$index(a, 1) : null;
        t1 = J.getInterceptor$asx(c);
        wf = t1.$index(c, "winsetfn");
        if (props.hasProperty$1("*")) {
          oldprops = P.List_List$from(N.ByondJS_keys(props), true, null);
          for (t1 = oldprops.length, t2 = props._jsObject, _i = 0; _i < oldprops.length; oldprops.length === t1 || (0, H.throwConcurrentModificationError)(oldprops), ++_i) {
            p = oldprops[_i];
            if (typeof p !== "string" && typeof p !== "number")
              H.throwExpression(P.ArgumentError$("property is not a String or num"));
            delete t2[p];
          }
          for (t1 = N.ByondJS_keys(wf), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new H.WhereIterator(t2, t1._f, [H.getTypeArgumentByIndex(t1, 0)]), t3 = J.getInterceptor$asx(wf), t4 = [null, null], fn = null; t1.moveNext$0();) {
            p = t2.get$current();
            if (J.indexOf$1$asx(p, "_") === 0)
              continue;
            fn = t3.$index(wf, p);
            if (fn instanceof P.JsFunction) {
              t5 = N.ByondJS_fromCamel(p);
              t6 = fn._jsObject;
              t7 = P._convertToJS(c);
              t8 = P.List_List$from(new H.MappedListIterable([null, sub], P.js___convertToJS$closure(), t4), true, null);
              props.$indexSet(0, t5, P._convertToDart(t6.apply(t7, t8)));
            }
          }
          return props;
        }
        for (t2 = N.ByondJS_keys(props), t3 = J.get$iterator$ax(t2.__internal$_iterable), t2 = new H.WhereIterator(t3, t2._f, [H.getTypeArgumentByIndex(t2, 0)]), t4 = J.getInterceptor$asx(wf), t5 = [null, null], fn = null; t2.moveNext$0();) {
          p = t3.get$current();
          t6 = J.getInterceptor$asx(p);
          dot = t6.lastIndexOf$1(p, ".");
          if (dot >= 0) {
            id = t1.$index(c, "fullid");
            if (J.$eq$(id, "") || id == null)
              id = t1.$index(c, "id");
            id = J.$add$ns(id, "." + t6.substring$2(p, 0, dot));
            newp = t6.substring$1(p, dot + 1);
            t6 = P.LinkedHashMap__makeLiteral([newp, ""]);
            t6 = P._wrapToDart(P.JsObject__convertDataTree(t6));
            $.$get$ByondJS_skin().winget$2(id, t6);
            props.$indexSet(0, p, t6.$index(0, newp));
            continue;
          }
          fn = t4.$index(wf, N.ByondJS_toCamel(p));
          if (fn instanceof P.JsFunction) {
            t6 = fn._jsObject;
            t7 = P._convertToJS(c);
            t8 = P.List_List$from(new H.MappedListIterable([null, sub], P.js___convertToJS$closure(), t5), true, null);
            props.$indexSet(0, p, P._convertToDart(t6.apply(t7, t8)));
          }
        }
        return props;
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure9: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var options, p, _, t1, t2, _i, opt, t3, val, t4, e, exception;
        t1 = J.getInterceptor$asx(a);
        options = J.$gt$n(t1.get$length(a), 0) ? t1.$index(a, 0) : null;
        if (options == null)
          options = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
        $.me.macro.unstick$0();
        for (t1 = P.List_List$from(N.ByondJS_keys(options), true, null), t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          opt = t1[_i];
          t3 = J.getInterceptor$asx(opt);
          if (t3.indexOf$1(opt, "_") >= 0 || t3.indexOf$1(opt, "-") >= 0) {
            val = J.$index$asx(options, opt);
            t4 = options;
            t4.toString;
            if (typeof opt !== "string" && typeof opt !== "number")
              H.throwExpression(P.ArgumentError$("property is not a String or num"));
            delete t4.get$_jsObject()[opt];
            opt = N.ByondJS_toCamel(t3.replaceAll$2(opt, "_", "-"));
            J.$indexSet$ax(options, opt, val);
          }
        }
        t1 = J.getInterceptor$asx(c);
        e = t1.$index(c, "top");
        t1.$indexSet(c, "isPopup", true);
        N.ByondJS_backstage().appendChild(e);
        t1 = $.$get$ByondJS_skin();
        if (t1.classes.$index(0, "pop") != null) {
          if (J.$index$asx(options, "width") != null) {
            t2 = P.List_List$from([e, "width", J.$index$asx(options, "width")], true, null);
            C.JSArray_methods.insert$2(t2, 1, "px");
            N.ByondJS_cssUnit(t2);
          } else if (!(e.style.width.length !== 0)) {
            t2 = P.List_List$from([e, "width", "400"], true, null);
            C.JSArray_methods.insert$2(t2, 1, "px");
            N.ByondJS_cssUnit(t2);
          }
          if (C.JSNumber_methods.round$0(e.offsetWidth) > window.innerWidth * 0.75) {
            t2 = P.List_List$from([e, "width", window.innerWidth * 0.75], true, null);
            C.JSArray_methods.insert$2(t2, 1, "px");
            N.ByondJS_cssUnit(t2);
          }
          if (J.$index$asx(options, "height") != null) {
            t2 = P.List_List$from([e, "height", J.$index$asx(options, "height")], true, null);
            C.JSArray_methods.insert$2(t2, 1, "px");
            N.ByondJS_cssUnit(t2);
          } else
            e.style.height.length !== 0;
          if (C.JSNumber_methods.round$0(e.offsetHeight) > window.innerHeight * 0.75) {
            t2 = P.List_List$from([e, "height", window.innerHeight * 0.75], true, null);
            C.JSArray_methods.insert$2(t2, 1, "px");
            N.ByondJS_cssUnit(t2);
          }
          c.callMethod$2("onsize", []);
          t2 = document;
          p = t1.attach$2(t2.createElement("div"), "pop");
          try {
            J.$indexSet$ax(J.$index$asx(p, "config"), "isRuntime", true);
            p.callMethod$2("_open", [c, options]);
          } catch (exception) {
            t1 = H.unwrapException(exception);
            _ = t1;
            P.print(_);
          }
          return;
        }
        if (J.$index$asx(options, "width") != null) {
          t1 = P.List_List$from([e, "width", J.$index$asx(options, "width")], true, null);
          C.JSArray_methods.insert$2(t1, 1, "px");
          N.ByondJS_cssUnit(t1);
        } else
          e.style.width;
        if (J.$index$asx(options, "height") != null) {
          t1 = P.List_List$from([e, "height", J.$index$asx(options, "height")], true, null);
          C.JSArray_methods.insert$2(t1, 1, "px");
          N.ByondJS_cssUnit(t1);
        } else
          e.style.height;
        N.ByondJS_css([e, "maxWidth", "75%"]);
        N.ByondJS_css([e, "maxHeight", "75%"]);
        $.$get$context().$index(0, "byond").callMethod$2("lightbox", [e, P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["delay", 100, "onclose", new N.ByondJS_classMethods__closure4(c), "onclickoff", new N.ByondJS_classMethods__closure5(c)]))]);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods__closure4: {
      "^": "Closure:1;c",
      call$0: [function() {
        var t1, exception;
        try {
          t1 = this.c.callMethod$2("onclose", []);
          return t1;
        } catch (exception) {
          H.unwrapException(exception);
        }
      }, null, null, 0, 0, null, "call"]
    },
    ByondJS_classMethods__closure5: {
      "^": "Closure:1;c",
      call$0: [function() {
        var t1, exception;
        try {
          t1 = this.c.callMethod$1("onclickoff");
          return t1;
        } catch (exception) {
          H.unwrapException(exception);
        }
      }, null, null, 0, 0, null, "call"]
    },
    ByondJS_classMethods_closure10: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, e, pop, t2, t3;
        t1 = J.getInterceptor$asx(c);
        e = t1.$index(c, "top");
        pop = c.callMethod$2("_pop", []);
        if (pop != null)
          pop.callMethod$1("remove");
        t2 = $.$get$ByondJS_lightbox();
        t3 = t2._box;
        if (t3 == null ? e == null : t3 === e)
          t2.close$0(0);
        t1.$indexSet(c, "isPopup", false);
        N.ByondJS_backstage().appendChild(e);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure11: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure12: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        return 0;
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure13: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure14: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var oc, t1, t2, exception;
        t1 = J.getInterceptor$asx(c);
        oc = t1.$index(c, "config").$index(0, "onClose");
        t2 = oc;
        if (typeof t2 === "string")
          try {
            c.callMethod$2("input", [oc]);
          } catch (exception) {
            H.unwrapException(exception);
          }
        else if (oc instanceof P.JsFunction)
          try {
            oc.apply$2$thisArg([], c);
          } catch (exception) {
            H.unwrapException(exception);
          }
        else if (!!J.getInterceptor(oc).$isFunction)
          try {
            oc.call$0();
          } catch (exception) {
            H.unwrapException(exception);
          }
        if (J.$eq$(t1.$index(c, "isRuntime"), true))
          c.callMethod$1("remove");
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure15: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure16: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure17: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var oldparent, newparent, newid, _, _0, t1, config, t2, t3, t4, newparent0, $top, exception;
        t1 = J.getInterceptor$asx(c);
        config = t1.$index(c, "config");
        t2 = $.$get$ByondJS_skin();
        oldparent = t2.find$1(0, config.$index(0, "parent"));
        t3 = J.getInterceptor$asx(a);
        if (J.$gt$n(t3.get$length(a), 0)) {
          t4 = t3.$index(a, 0);
          newparent0 = typeof t4 === "string" ? t2.find$1(0, t3.$index(a, 0)) : t3.$index(a, 0);
        } else
          newparent0 = null;
        newparent = newparent0;
        newid = newparent != null ? J.$index$asx(newparent, "id") : null;
        if (newparent == null) {
          $top = t1.$index(c, "top");
          if ($top != null)
            N.ByondJS_backstage().appendChild($top);
        }
        if (J.$eq$(newparent, oldparent))
          return;
        if (oldparent != null)
          try {
            oldparent.callMethod$2("paneAdopted", [t1.$index(c, "id"), newid]);
          } catch (exception) {
            t1 = H.unwrapException(exception);
            _ = t1;
            P.print(_);
          }
        config.$indexSet(0, "parent", newid);
        if (newparent != null)
          try {
            newparent.callMethod$2("titleChanged", [c]);
          } catch (exception) {
            t1 = H.unwrapException(exception);
            _0 = t1;
            P.print(_0);
          }
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure18: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, config, $parent, e, e0;
        t1 = J.getInterceptor$asx(c);
        config = t1.$index(c, "config");
        $parent = $.$get$ByondJS_skin().find$1(0, config.$index(0, "parent"));
        if ($parent != null)
          return $parent;
        e = t1.$index(c, "top");
        if (e == null)
          return;
        for (; e0 = e.parentNode, !!J.getInterceptor(e0).$isElement; e = e0)
          if (e0.getAttribute("byondclass") != null) {
            e = e0;
            break;
          }
        return e != null ? $.$get$ByondJS_skin().find$1(0, e) : null;
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure19: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1;
        a = c.callMethod$2("parent", []);
        t1 = J.getInterceptor(a);
        if (!!t1.$isJsObject && J.$eq$(t1.$index(a, "type"), "pop"))
          return a;
        return;
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure20: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var $top, t1, v, dock, root, ord, n, base, ct, t2, ctord, dockables;
        $top = J.$index$asx(c, "top");
        t1 = J.getInterceptor$asx(a);
        if (J.$gt$n(t1.get$length(a), 0)) {
          v = t1.$index(a, 0);
          t1 = J.getInterceptor(v);
          if (!!t1.$isJsObject)
            v = t1.$index(v, "elem");
          dock = !!J.getInterceptor(v).$isElement ? v : null;
        } else
          dock = null;
        t1 = document;
        root = t1.querySelector("#skin");
        if (root == null)
          root = t1.body;
        ord = c.callMethod$1("dockOrder");
        if (typeof ord !== "number")
          ord = 0;
        n = $top.parentNode;
        t1 = J.getInterceptor$n(ord);
        base = null;
        ct = null;
        while (true) {
          if (!(n != null && n !== root))
            break;
          c$0: {
            if (!!J.getInterceptor(n).$isElement) {
              t2 = n.getAttribute("byondclass");
              t2 = typeof t2 !== "string";
            } else
              t2 = true;
            if (t2)
              break c$0;
            ct = $.$get$ByondJS_skin().find$1(0, n);
            if (ct != null) {
              ctord = ct.callMethod$1("dockOrder");
              if (t1.$lt(ord, typeof ctord !== "number" ? 0 : ctord)) {
                base = $top.parentNode;
                break;
              }
              base = n.parentNode;
            }
          }
          n = n.parentNode;
        }
        if (base == null)
          base = n;
        t1 = $top.parentNode;
        if (base == null ? t1 != null : base !== t1)
          base.appendChild($top);
        t1 = base.childNodes;
        t2 = [];
        C.JSArray_methods.addAll$1(t2, new H.WhereIterable(t1, new N.ByondJS_classMethods__closure3($top), [H.getRuntimeTypeArgument(t1, "ListMixin", 0)]).map$1(0, P.js___convertToJS$closure()));
        dockables = new P.JsArray(t2, [null]);
        if (dock != null)
          for (t1 = new H.ListIterator(dockables, dockables.get$length(dockables), 0, null); t1.moveNext$0();)
            dock.appendChild(t1.__internal$_current);
        return dockables;
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods__closure3: {
      "^": "Closure:0;top",
      call$1: function(e) {
        var t1 = J.getInterceptor(e);
        if (!t1.$eq(e, this.top))
          if (!!t1.$isElement) {
            t1 = e.getAttribute("byondclass");
            t1 = typeof t1 === "string";
          } else
            t1 = false;
        else
          t1 = false;
        return t1;
      }
    },
    ByondJS_classMethods_closure21: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, t2, atall;
        t1 = J.getInterceptor$asx(c);
        if (!J.getInterceptor(t1.$index(c, "top")).$isElement)
          return false;
        t2 = J.getInterceptor$asx(a);
        atall = J.$gt$n(t2.get$length(a), 0) && N.ByondJS_toBool(t2.$index(a, 0), false);
        return N.ByondJS_isBackstage(t1.$index(c, "top"), atall);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure22: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, config, p, inf, parentSize, a1, a2, xy1, xy2, t2, t3, t4, t5, t6, t7;
        t1 = J.getInterceptor$asx(c);
        config = t1.$index(c, "config");
        if (N.ByondJS_toBool(t1.$index(c, "loading"), false))
          return;
        p = t1.$index(c, "top").offsetParent;
        inf = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["pos", null, "size", null, "anchor1", null, "anchor2", null]));
        parentSize = N.ByondJS_innerSize(p);
        c.callMethod$2("winget", [inf]);
        a1 = N.ByondJS_toAnchor(inf.$index(0, "anchor1"));
        a2 = N.ByondJS_toAnchor(inf.$index(0, "anchor2"));
        a1 = N.ByondJS__clampAnchor(J.$lt$n(a1.x, 0) ? a2 : a1);
        a2 = N.ByondJS__clampAnchor(J.$lt$n(a2.x, 0) ? a1 : a2);
        xy1 = N.ByondJS_toPoint(inf.$index(0, "pos"));
        xy2 = N.ByondJS_toPoint(inf.$index(0, "size")).$add(0, xy1);
        t1 = a1.x;
        t2 = parentSize.x;
        t3 = a1.y;
        t4 = parentSize.y;
        t5 = [null];
        xy1 = xy1.$sub(0, new P.Point(C.JSNumber_methods.round$0(J.$div$n(J.$mul$ns(t1, t2), 100)), C.JSNumber_methods.round$0(J.$div$n(J.$mul$ns(t3, t4), 100)), t5));
        t6 = a2.x;
        t7 = a2.y;
        xy2 = xy2.$sub(0, new P.Point(C.JSNumber_methods.round$0(J.$div$n(J.$mul$ns(t6, t2), 100)), C.JSNumber_methods.round$0(J.$div$n(J.$mul$ns(t7, t4), 100)), t5));
        t5 = [];
        C.JSArray_methods.addAll$1(t5, C.JSArray_methods.map$1([xy1.x, xy1.y, xy2.x, xy2.y, t1, t3, t6, t7], P.js___convertToJS$closure()));
        config.$indexSet(0, "_anchorInfo", new P.JsArray(t5, [null]));
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure23: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var config, force_onsize, _, nums, _0, xy1, xy2, _1, _2, t1, t2, exception, parentSize, t3;
        t1 = J.getInterceptor$asx(c);
        config = t1.$index(c, "config");
        t2 = J.getInterceptor$asx(a);
        force_onsize = J.$gt$n(t2.get$length(a), 0) && N.ByondJS_toBool(t2.$index(a, 0), false);
        if (N.ByondJS_toBool(t1.$index(c, "loading"), false)) {
          if (force_onsize)
            try {
              c.callMethod$1("onsize");
            } catch (exception) {
              t1 = H.unwrapException(exception);
              _ = t1;
              P.print(_);
            }
          return false;
        }
        nums = J.$index$asx(config, "_anchorInfo");
        if (!(nums instanceof P.JsArray) || J.get$length$asx(nums) !== 8) {
          if (force_onsize)
            try {
              c.callMethod$1("onsize");
            } catch (exception) {
              t1 = H.unwrapException(exception);
              _0 = t1;
              P.print(_0);
            }
          return false;
        }
        parentSize = N.ByondJS_innerSize(t1.$index(c, "top").offsetParent);
        t1 = parentSize.x;
        t2 = parentSize.y;
        t3 = [null];
        xy1 = new P.Point(J.$add$ns(J.$index$asx(nums, 0), C.JSNumber_methods.round$0(J.$div$n(J.$mul$ns(J.$index$asx(nums, 4), t1), 100))), J.$add$ns(J.$index$asx(nums, 1), C.JSNumber_methods.round$0(J.$div$n(J.$mul$ns(J.$index$asx(nums, 5), t2), 100))), t3);
        xy2 = new P.Point(J.$add$ns(J.$index$asx(nums, 2), C.JSNumber_methods.round$0(J.$div$n(J.$mul$ns(J.$index$asx(nums, 6), t1), 100))), J.$add$ns(J.$index$asx(nums, 3), C.JSNumber_methods.round$0(J.$div$n(J.$mul$ns(J.$index$asx(nums, 7), t2), 100))), t3);
        try {
          c.callMethod$2("winset", [P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["pos", J.toString$0$(J.get$x$x(xy1)) + "," + J.toString$0$(J.get$y$x(xy1))]))]);
          J.$indexSet$ax(config, "_anchorInfo", nums);
          c.callMethod$2("winset", [P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["size", J.toString$0$(J.$sub$n(J.get$x$x(xy2), J.get$x$x(xy1))) + "," + J.toString$0$(J.$sub$n(J.get$y$x(xy2), J.get$y$x(xy1)))]))]);
          J.$indexSet$ax(config, "_anchorInfo", nums);
        } catch (exception) {
          t1 = H.unwrapException(exception);
          _1 = t1;
          P.print(_1);
          if (force_onsize)
            try {
              c.callMethod$1("onsize");
            } catch (exception) {
              t1 = H.unwrapException(exception);
              _2 = t1;
              P.print(_2);
            }
          return false;
        }
        return true;
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure24: {
      "^": "Closure:0;",
      call$1: [function(s) {
        var m, t1, idx, exception;
        t1 = s;
        if (typeof t1 !== "string" || J.get$length$asx(s) === 0)
          return;
        for (; idx = J.indexOf$1$asx(s, "\n"), idx >= 0;) {
          $.$get$ByondJS_skin().doInput$1(J.substring$2$s(s, 0, idx));
          s = J.substring$1$s(s, idx + 1);
        }
        if (J.$eq$(J.$index$asx(s, 0), ".")) {
          m = P.RegExp_RegExp("[A-Z\\-_]+", false, false).matchAsPrefix$2(0, s, 1);
          if (m != null && N.ByondJS_builtinCommands().$index(0, m.get$_match()[0]) != null) {
            s = C.JSString_methods.trim$0(J.substring$1$s(s, m.get$_match()[0].length + 1));
            if (J.startsWith$1$s(s, '"')) {
              s = J.substring$1$s(s, 1);
              if (J.endsWith$1$s(s, '"'))
                s = J.substring$2$s(s, 0, J.get$length$asx(s) - 1);
            }
            try {
              N.ByondJS_builtinCommands().$index(0, m.get$_match()[0]).call$1(s);
            } catch (exception) {
              H.unwrapException(exception);
            }
            return;
          }
        }
        if (J.endsWith$1$s(s, "\\...")) {
          try {
            s = J.substring$2$s(s, 0, J.$sub$n(J.get$length$asx(s), 4));
            J.$index$asx($.$get$context().$index(0, "byond"), "skin").callMethod$2("output", [":input", P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["text", s]))]);
          } catch (exception) {
            H.unwrapException(exception);
          }
          return;
        }
        $.me.sendCommandMessage$1(s);
      }, null, null, 2, 0, null, 9, "call"]
    },
    ByondJS_classMethods_closure25: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, command;
        t1 = J.getInterceptor$asx(a);
        command = J.$gt$n(t1.get$length(a), 0) ? t1.$index(a, 0) : "";
        $.me.sendExpandMessage$2(command, J.$index$asx(c, "id"));
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure26: {
      "^": "Closure:0;",
      call$1: [function(s) {
        $.me.sendTopicMessage$1(s);
        return false;
      }, null, null, 2, 0, null, 9, "call"]
    },
    ByondJS_classMethods_closure27: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, t2, params, e;
        t1 = J.getInterceptor$asx(a);
        if (J.$lt$n(t1.get$length(a), 1))
          return;
        if (!!J.getInterceptor(t1.$index(a, 0)).$isMouseEvent) {
          t2 = J.$gt$n(t1.get$length(a), 1) ? t1.$index(a, 1) : null;
          a = [t2, t1.$index(a, 0)];
        }
        t1 = J.getInterceptor$asx(a);
        params = t1.$index(a, 0);
        e = J.$gt$n(t1.get$length(a), 1) ? t1.$index(a, 1) : null;
        $.me.sendMouseCommand$3(c, params, e);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure28: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, t2, exception, t3;
        t1 = $.$get$ByondJS_skin();
        t2 = t1.mouseCapture;
        if (t2 != null && !J.$eq$(t2, c))
          try {
            t1.mouseCapture.callMethod$1("mouseReleased");
          } catch (exception) {
            H.unwrapException(exception);
          }
        t2 = J.getInterceptor$asx(a);
        t3 = J.$gt$n(t2.get$length(a), 0) ? t2.$index(a, 0) : null;
        t1.capture$3(0, c, t3, J.$gt$n(t2.get$length(a), 1) ? t2.$index(a, 1) : null);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure29: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, exception;
        t1 = $.$get$ByondJS_skin();
        if (J.$eq$(t1.mouseCapture, c)) {
          try {
            t1.mouseCapture.callMethod$1("mouseReleased");
          } catch (exception) {
            H.unwrapException(exception);
          }
          t1.capture$1(0, null);
        }
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure30: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure31: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        c.callMethod$2("mouse", [a]);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure32: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure33: {
      "^": "Closure:0;",
      call$1: [function(id) {
        if (typeof id === "string")
          id = H.Primitives_parseInt(id, null, new N.ByondJS_classMethods__closure2());
        if (typeof id !== "number")
          return;
        return $.me.getIconInfo$1(id);
      }, null, null, 2, 0, null, 10, "call"]
    },
    ByondJS_classMethods__closure2: {
      "^": "Closure:0;",
      call$1: function(id) {
        return -1;
      }
    },
    ByondJS_classMethods_closure34: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, id, ex;
        t1 = J.getInterceptor$asx(a);
        id = J.$gt$n(t1.get$length(a), 0) ? t1.$index(a, 0) : null;
        ex = J.$gt$n(t1.get$length(a), 1) && N.ByondJS_toBool(t1.$index(a, 1), false);
        if (typeof id === "string")
          id = H.Primitives_parseInt(id, null, new N.ByondJS_classMethods__closure1());
        if (typeof id !== "number")
          return;
        return $.me.getAtomInfo$2(id, ex);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods__closure1: {
      "^": "Closure:0;",
      call$1: function(id) {
        return;
      }
    },
    ByondJS_classMethods_closure35: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, atom, id;
        t1 = J.getInterceptor$asx(a);
        if (t1.get$length(a) === 0)
          return;
        atom = t1.$index(a, 0);
        id = J.$index$asx(c, "id");
        if (typeof atom === "string")
          atom = H.Primitives_parseInt(atom, null, new N.ByondJS_classMethods__closure0());
        if (typeof atom !== "number")
          return;
        $.me.getAtomVerbs$2(id, atom);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods__closure0: {
      "^": "Closure:0;",
      call$1: function(atom) {
        return;
      }
    },
    ByondJS_classMethods_closure36: {
      "^": "Closure:0;",
      call$1: [function(id) {
        if (typeof id === "string")
          id = H.Primitives_parseInt(id, null, new N.ByondJS_classMethods__closure());
        if (typeof id !== "number")
          return;
        return $.me.getAtomIcon$1(id);
      }, null, null, 2, 0, null, 10, "call"]
    },
    ByondJS_classMethods__closure: {
      "^": "Closure:0;",
      call$1: function(id) {
        return;
      }
    },
    ByondJS_classMethods_closure37: {
      "^": "Closure:1;",
      call$0: [function() {
        return;
      }, null, null, 0, 0, null, "call"]
    },
    ByondJS_classMethods_closure38: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, t2, selector;
        t1 = J.getInterceptor$asx(a);
        if (!J.$lt$n(t1.get$length(a), 2)) {
          t2 = t1.$index(a, 0);
          t2 = typeof t2 !== "string";
        } else
          t2 = true;
        if (t2)
          return;
        selector = t1.$index(a, 0);
        if (J.$gt$n(t1.get$length(a), 1))
          if (t1.$index(a, 1) != null) {
            t2 = t1.$index(a, 1);
            t2 = typeof t2 === "string";
          } else
            t2 = true;
        else
          t2 = false;
        if (t2)
          return N.ByondJS_setControlCssRule(c, selector, t1.$index(a, 1));
        return N.ByondJS_getControlCssRule(c, selector);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_classMethods_closure39: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, t2, selector, vals;
        t1 = J.getInterceptor$asx(a);
        if (J.$lt$n(t1.get$length(a), 2))
          return;
        t2 = t1.$index(a, 0);
        if (typeof t2 !== "string")
          return;
        selector = t1.$index(a, 0);
        if (t1.$index(a, 1) instanceof P.JsObject)
          vals = t1.$index(a, 1);
        else {
          t2 = t1.$index(a, 1);
          if (typeof t2 === "string")
            if (J.$gt$n(t1.get$length(a), 2)) {
              t2 = t1.$index(a, 2);
              vals = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral([t1.$index(a, 1), t2]));
            } else
              vals = t1.$index(a, 1);
          else
            return;
        }
        return N.ByondJS_controlCssAttr(c, selector, vals);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS__wrapWinsetEventHandler_closure: {
      "^": "Closure:5;p",
      call$3: [function(c, a, b) {
        var config = J.$index$asx(c, "config");
        if (a == null)
          return config.$index(0, this.p);
        if (typeof a === "string")
          config.$indexSet(0, this.p, a);
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        return J.$index$asx(c, "type");
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure0: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var p, t1, exception;
        t1 = a;
        if (typeof t1 !== "string") {
          try {
            a = J.$index$asx(J.$index$asx(c, "config"), "title");
          } catch (exception) {
            H.unwrapException(exception);
          }
          t1 = a;
          if (typeof t1 !== "string")
            a = J.$index$asx(c, "id");
          return a;
        }
        try {
          t1 = J.getInterceptor$asx(c);
          if (J.$eq$(a, J.$index$asx(t1.$index(c, "config"), "title")))
            return;
          J.$indexSet$ax(t1.$index(c, "config"), "title", a);
          p = c.callMethod$1("parent");
          if (p instanceof P.JsObject)
            p.callMethod$2("titleChanged", [c]);
        } catch (exception) {
          H.unwrapException(exception);
        }
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure1: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var fn = J.$index$asx(J.$index$asx(c, "winsetfn"), "textColor");
        return fn instanceof P.JsFunction ? fn.apply$2$thisArg([a, b], c) : null;
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure2: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var e, s, props, dec, wtStr, wt, sty, t1;
        e = c.callMethod$2("content", [b]);
        s = J.getComputedStyle$0$x(e);
        props = [];
        if (a == null) {
          dec = C.JSString_methods.trim$0((s && C.CssStyleDeclaration_methods).getPropertyValue$1(s, "text-decoration")).split(" ");
          wtStr = C.CssStyleDeclaration_methods.getPropertyValue$1(s, "font-weight");
          wt = C.JSString_methods.matchAsPrefix$1("bold", wtStr) != null ? 700 : J.round$0$n(H.Primitives_parseDouble(wtStr, new N.ByondJS_winsetMethods__closure()));
          sty = C.JSString_methods.trim$0(C.CssStyleDeclaration_methods.getPropertyValue$1(s, "font-style")).split(" ");
          if (wt > 400)
            props.push("bold");
          if (C.JSArray_methods.contains$1(sty, "italic") || C.JSArray_methods.contains$1(sty, "oblique"))
            props.push("italic");
          if (C.JSArray_methods.contains$1(dec, "line-through"))
            props.push("strike");
          if (C.JSArray_methods.contains$1(dec, "underline"))
            props.push("underline");
          return C.JSArray_methods.join$1(props, ",");
        }
        props = J.split$1$s(J.trim$0$s(a), $.$get$ByondJS__commaRx());
        if (C.JSArray_methods.contains$1(props, "bold"))
          t1 = "bold";
        else
          t1 = C.JSArray_methods.contains$1(props, "normal") ? "normal" : "";
        N.ByondJS_css([e, "fontWeight", t1]);
        N.ByondJS_css([e, "fontStyle", C.JSArray_methods.contains$1(props, "italic") ? "italic" : ""]);
        dec = [];
        if (C.JSArray_methods.contains$1(props, "underline"))
          dec.push("underline");
        if (C.JSArray_methods.contains$1(props, "strike"))
          dec.push("line-through");
        N.ByondJS_css([e, "textDecoration", C.JSArray_methods.join$1(dec, " ")]);
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods__closure: {
      "^": "Closure:0;",
      call$1: function(_) {
        return 400;
      }
    },
    ByondJS_winsetMethods_closure3: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var e, url, t1;
        e = c.callMethod$2("content", [b]);
        if (a == null)
          return N.ByondJS_cssUrl([e, "backgroundImage"]);
        url = H.stringReplaceAllUnchecked(C.JSString_methods.trim$0(a), "\\", "/");
        if (url.length !== 0)
          if (!N.ByondJS_isByondUrl(url, false, false))
            if (!J.getInterceptor$s(url).startsWith$1(url, "data:")) {
              t1 = $.me;
              t1 = !C.JSString_methods.startsWith$1(url, "http://" + H.S(t1.host) + ":" + H.S(t1.port) + "/");
            } else
              t1 = false;
          else
            t1 = false;
        else
          t1 = false;
        if (t1) {
          t1 = $.me;
          url = "http://" + H.S(t1.host) + ":" + H.S(t1.port) + "/" + H.S(url);
        }
        N.ByondJS_cssUrl([e, "backgroundImage", url]);
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure4: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var url, p, t1, t2, exception, ret;
        if (typeof a === "string") {
          url = a;
          url = J.trim$0$s(url);
          if (J.get$length$asx(url) !== 0)
            if (!N.ByondJS_isByondUrl(url, false, false))
              if (!J.startsWith$1$s(url, "data:")) {
                t1 = url;
                t2 = $.me;
                t2 = !J.startsWith$1$s(t1, "http://" + H.S(t2.host) + ":" + H.S(t2.port) + "/");
                t1 = t2;
              } else
                t1 = false;
            else
              t1 = false;
          else
            t1 = false;
          if (t1) {
            t1 = $.me;
            t2 = url;
            url = "http://" + H.S(t1.host) + ":" + H.S(t1.port) + "/" + H.S(t2);
          }
          try {
            t1 = J.getInterceptor$asx(c);
            if (J.$eq$(url, J.$index$asx(t1.$index(c, "config"), "icon")))
              return;
            J.$indexSet$ax(t1.$index(c, "config"), "icon", url);
            p = c.callMethod$1("parent");
            if (p instanceof P.JsObject)
              p.callMethod$2("titleChanged", [c]);
          } catch (exception) {
            H.unwrapException(exception);
          }
        }
        ret = J.$index$asx(J.$index$asx(c, "config"), "icon");
        return typeof ret === "string" ? ret : null;
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure5: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var e, vis, t1, skin;
        e = b != null && !J.$eq$(b, "") ? c.callMethod$2("content", [b]) : J.$index$asx(c, "top");
        vis = N.ByondJS_toBool(a, true);
        if (vis == null)
          return String(N.ByondJS_css([e, "display"]) !== "none");
        if (vis && !N.ByondJS_toBool(J.$index$asx(c, "loading"), false) && N.ByondJS_isBackstage(e, false)) {
          t1 = document;
          skin = t1.querySelector("#skin");
          (skin == null ? t1.body : skin).appendChild(e);
        }
        N.ByondJS_css([e, "display", vis ? "" : "none"]);
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure6: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var t1, config, e, p, pop, xy, a1, a2, parentSize, exception;
        t1 = J.getInterceptor$asx(c);
        config = t1.$index(c, "config");
        e = t1.$index(c, "top");
        p = e.offsetParent;
        pop = c.callMethod$2("_pop", []);
        if (pop instanceof P.JsObject) {
          t1 = a == null ? "winget" : "winset";
          return pop.callMethod$2(t1, [P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["pos", a])), b]);
        }
        if (a == null)
          return "" + C.JSNumber_methods.round$0(e.offsetLeft) + "," + C.JSNumber_methods.round$0(e.offsetTop);
        xy = N.ByondJS_toPoint(a);
        if (N.ByondJS_toBool(t1.$index(c, "loading"), false))
          return;
        a1 = N.ByondJS_toAnchor(config.$index(0, "anchor1"));
        a2 = N.ByondJS_toAnchor(config.$index(0, "anchor2"));
        a1 = N.ByondJS__clampAnchor(J.$lt$n(a1.x, 0) ? a2 : a1);
        a2 = N.ByondJS__clampAnchor(J.$lt$n(a2.x, 0) ? a1 : a2);
        parentSize = N.ByondJS_innerSize(p);
        N.ByondJS_css([e, "left", N.ByondJS__cssAnchor(xy.x, P.min(a1.x, a2.x), parentSize.x)]);
        N.ByondJS_css([e, "top", N.ByondJS__cssAnchor(xy.y, P.min(a1.y, a2.y), parentSize.y)]);
        try {
          c.callMethod$1("setAnchors");
        } catch (exception) {
          H.unwrapException(exception);
        }
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure7: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var t1, config, e, p, pop, xy, t2, parentSize, a1, a2, exception;
        t1 = J.getInterceptor$asx(c);
        config = t1.$index(c, "config");
        e = t1.$index(c, "top");
        p = e.offsetParent;
        pop = c.callMethod$2("_pop", []);
        if (pop instanceof P.JsObject) {
          t1 = a == null ? "winget" : "winset";
          return pop.callMethod$2(t1, [P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["size", a])), b]);
        }
        if (a == null)
          return "" + C.JSNumber_methods.round$0(e.offsetWidth) + "x" + C.JSNumber_methods.round$0(e.offsetHeight);
        xy = N.ByondJS_toPoint(a);
        if (N.ByondJS_toBool(t1.$index(c, "loading"), false))
          return;
        t1 = xy.x;
        t2 = J.getInterceptor(t1);
        if (t2.$eq(t1, 0) || J.$eq$(xy.y, 0)) {
          parentSize = N.ByondJS_innerSize(p);
          if (t2.$eq(t1, 0))
            xy = new P.Point(P.max(0, J.$sub$n(parentSize.x, C.JSNumber_methods.round$0(e.offsetLeft))), xy.y, [null]);
          if (J.$eq$(xy.y, 0))
            xy = new P.Point(xy.x, P.max(0, J.$sub$n(parentSize.y, C.JSNumber_methods.round$0(e.offsetTop))), [null]);
        }
        a1 = N.ByondJS_toAnchor(config.$index(0, "anchor1"));
        a2 = N.ByondJS_toAnchor(config.$index(0, "anchor2"));
        a1 = N.ByondJS__clampAnchor(J.$lt$n(a1.x, 0) ? a2 : a1);
        a2 = N.ByondJS__clampAnchor(J.$lt$n(a2.x, 0) ? a1 : a2);
        parentSize = N.ByondJS_innerSize(p);
        N.ByondJS_css([e, "width", N.ByondJS__cssAnchor(xy.x, J.abs$0$n(J.$sub$n(a1.x, a2.x)), parentSize.x)]);
        N.ByondJS_css([e, "height", N.ByondJS__cssAnchor(xy.y, J.abs$0$n(J.$sub$n(a1.y, a2.y)), parentSize.y)]);
        try {
          c.callMethod$1("setAnchors");
        } catch (exception) {
          H.unwrapException(exception);
        }
        try {
          c.callMethod$2("onsize", []);
        } catch (exception) {
          H.unwrapException(exception);
        }
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure8: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var t1, config, e, xy, t2, t3, t4, t5, t6, parentSize, a2, a1, t7, t8, t9, exception;
        t1 = J.getInterceptor$asx(c);
        config = t1.$index(c, "config");
        e = t1.$index(c, "top");
        if (a == null) {
          xy = N.ByondJS_toAnchor(t1.$index(c, "anchor1"));
          if (J.$ge$n(xy.x, 0))
            xy = N.ByondJS__clampAnchor(xy);
          t1 = xy.x;
          t2 = J.getInterceptor$n(t1);
          return t2.$ge(t1, 0) ? "" + t2.round$0(t1) + "," + J.round$0$n(xy.y) : "none";
        }
        xy = N.ByondJS_toAnchor(a);
        t2 = xy.x;
        t3 = J.getInterceptor$n(t2);
        t1.$indexSet(c, "anchor1", t3.$ge(t2, 0) ? "" + t3.round$0(t2) + "," + J.round$0$n(xy.y) : "none");
        if (c.callMethod$2("_pop", []) != null)
          return;
        if (N.ByondJS_toBool(t1.$index(c, "loading"), false))
          return;
        t1 = C.JSNumber_methods.round$0(e.offsetLeft);
        t4 = C.JSNumber_methods.round$0(e.offsetTop);
        t5 = C.JSNumber_methods.round$0(e.offsetWidth);
        t6 = C.JSNumber_methods.round$0(e.offsetHeight);
        parentSize = N.ByondJS_innerSize(e.offsetParent);
        a2 = N.ByondJS_toAnchor(config.$index(0, "anchor2"));
        a1 = N.ByondJS__clampAnchor(t3.$lt(t2, 0) ? a2 : xy);
        a2 = N.ByondJS__clampAnchor(J.$lt$n(a2.x, 0) ? a1 : a2);
        t2 = a1.x;
        t3 = a2.x;
        t7 = parentSize.x;
        N.ByondJS_css([e, "left", N.ByondJS__cssAnchor(t1, P.min(t2, t3), t7)]);
        t1 = a1.y;
        t8 = a2.y;
        t9 = parentSize.y;
        N.ByondJS_css([e, "top", N.ByondJS__cssAnchor(t4, P.min(t1, t8), t9)]);
        N.ByondJS_css([e, "width", N.ByondJS__cssAnchor(t5, J.abs$0$n(J.$sub$n(t2, t3)), t7)]);
        N.ByondJS_css([e, "height", N.ByondJS__cssAnchor(t6, J.abs$0$n(J.$sub$n(t1, t8)), t9)]);
        try {
          c.callMethod$1("setAnchors");
        } catch (exception) {
          H.unwrapException(exception);
        }
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure9: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var t1, config, e, xy, t2, t3, t4, t5, t6, parentSize, a1, a2, t7, t8, t9, t10, t11, exception;
        t1 = J.getInterceptor$asx(c);
        config = t1.$index(c, "config");
        e = t1.$index(c, "top");
        if (a == null) {
          xy = N.ByondJS_toAnchor(t1.$index(c, "anchor2"));
          if (J.$ge$n(xy.x, 0))
            xy = N.ByondJS__clampAnchor(xy);
          t1 = xy.x;
          t2 = J.getInterceptor$n(t1);
          return t2.$ge(t1, 0) ? "" + t2.round$0(t1) + "," + J.round$0$n(xy.y) : "none";
        }
        xy = N.ByondJS_toAnchor(a);
        t2 = xy.x;
        t3 = J.getInterceptor$n(t2);
        t1.$indexSet(c, "anchor2", t3.$ge(t2, 0) ? "" + t3.round$0(t2) + "," + J.round$0$n(xy.y) : "none");
        if (c.callMethod$2("_pop", []) != null)
          return;
        if (N.ByondJS_toBool(t1.$index(c, "loading"), false))
          return;
        t1 = C.JSNumber_methods.round$0(e.offsetLeft);
        t4 = C.JSNumber_methods.round$0(e.offsetTop);
        t5 = C.JSNumber_methods.round$0(e.offsetWidth);
        t6 = C.JSNumber_methods.round$0(e.offsetHeight);
        parentSize = N.ByondJS_innerSize(e.offsetParent);
        a1 = N.ByondJS_toAnchor(config.$index(0, "anchor1"));
        a1 = N.ByondJS__clampAnchor(J.$lt$n(a1.x, 0) ? xy : a1);
        a2 = N.ByondJS__clampAnchor(t3.$lt(t2, 0) ? a1 : xy);
        t7 = a1.x;
        t8 = a2.x;
        t9 = parentSize.x;
        N.ByondJS_css([e, "left", N.ByondJS__cssAnchor(t1, P.min(t7, t8), t9)]);
        t1 = a1.y;
        t10 = a2.y;
        t11 = parentSize.y;
        N.ByondJS_css([e, "top", N.ByondJS__cssAnchor(t4, P.min(t1, t10), t11)]);
        N.ByondJS_css([e, "width", N.ByondJS__cssAnchor(t5, J.abs$0$n(J.$sub$n(t7, t8)), t9)]);
        N.ByondJS_css([e, "height", N.ByondJS__cssAnchor(t6, J.abs$0$n(J.$sub$n(t1, t10)), t11)]);
        try {
          c.callMethod$1("setAnchors");
        } catch (exception) {
          H.unwrapException(exception);
        }
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure10: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var e, _, t1, f, exception;
        e = c.callMethod$2("content", [b]);
        t1 = J.getInterceptor$asx(c);
        if (J.$eq$(e, t1.$index(c, "elem")))
          e = t1.$index(c, "top");
        if (e == null)
          return false;
        a = N.ByondJS_toBool(a, true);
        if (a == null || !a) {
          f = document.activeElement;
          for (; f != null;) {
            t1 = e;
            if (f == null ? t1 == null : f === t1)
              return true;
            f = f.parentNode;
            if (!!!J.getInterceptor(f).$isElement)
              return false;
          }
          return false;
        }
        if (N.ByondJS_attr([e, "tabindex"]) == null)
          J.set$tabIndex$x(e, -1);
        try {
          J.focus$0$x(e);
        } catch (exception) {
          t1 = H.unwrapException(exception);
          _ = t1;
          P.print(_);
        }
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_winsetMethods_closure11: {
      "^": "Closure:5;",
      call$3: [function(c, a, b) {
        var t1, d;
        t1 = J.getInterceptor$asx(c);
        d = J.$eq$(t1.$index(c, "isDefault"), true);
        if (typeof a !== "string") {
          a = J.$index$asx(t1.$index(c, "config"), "macro");
          return typeof a !== "string" ? $.$get$ByondJS_skin().macro : a;
        } else {
          a = N.ByondJS_sanitizeId(a);
          J.$indexSet$ax(t1.$index(c, "config"), "macro", a);
          if (d) {
            t1 = $.$get$ByondJS_skin().macro;
            t1 = t1 == null ? a != null : t1 !== a;
          } else
            t1 = false;
          if (t1) {
            t1 = $.$get$ByondJS_skin();
            if (t1.macroSets.$index(0, a) == null)
              t1.macroSets.$indexSet(0, a, P.JsObject_JsObject($.$get$context().$index(0, "Object"), null));
            t1.macro = a;
            t1.setMacros$1(t1.macroSets);
          }
        }
      }, function(c, a) {
        return this.call$3(c, a, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 1, 0, 4, "call"]
    },
    ByondJS_promptMethods_closure: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_promptMethods_closure0: {
      "^": "Closure:0;",
      call$1: [function(params) {
        return;
      }, null, null, 2, 0, null, 23, "call"]
    },
    ByondJS_promptMethods_closure1: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1 = J.getInterceptor$asx(c);
        J.$indexSet$ax(t1.$index(c, "config"), "canClose", J.$eq$(J.$index$asx(t1.$index(c, "params"), "canCancel"), true));
        J.$indexSet$ax(t1.$index(c, "config"), "showTitle", J.$eq$(J.$index$asx(t1.$index(c, "config"), "showTitle"), true));
        J.$indexSet$ax(t1.$index(c, "config"), "canResize", J.$eq$(J.$index$asx(t1.$index(c, "config"), "canResize"), true));
        c.callMethod$1("popup");
        c.callMethod$1("onshow");
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_promptMethods_closure2: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_promptMethods_closure3: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, t2, choice, params;
        t1 = J.getInterceptor$asx(c);
        if (N.ByondJS_toBool(t1.$index(c, "replied"), false))
          return;
        t1.$indexSet(c, "replied", true);
        t2 = J.getInterceptor$asx(a);
        choice = J.$gt$n(t2.get$length(a), 0) ? t2.$index(a, 0) : "";
        params = t1.$index(c, "params");
        if (params != null && J.$index$asx(params, "reply") != null)
          params.callMethod$2("reply", [choice]);
        c.callMethod$1("cleanup");
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_promptMethods_closure4: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var t1, params;
        t1 = J.getInterceptor$asx(c);
        if (N.ByondJS_toBool(t1.$index(c, "replied"), false))
          return;
        t1.$indexSet(c, "replied", true);
        params = t1.$index(c, "params");
        if (params != null && J.$index$asx(params, "cancel") != null)
          params.callMethod$1("cancel");
        c.callMethod$1("cleanup");
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_promptMethods_closure5: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        c.callMethod$1("cancel");
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_promptMethods_closure6: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        var params, fn;
        params = J.$index$asx(c, "params");
        if (params == null)
          return true;
        fn = J.$index$asx(params, "onclickoff");
        if (fn == null || false)
          return true;
        return N.ByondJS_toBool(fn.apply$2$thisArg([], c), false);
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_promptMethods_closure7: {
      "^": "Closure:2;",
      call$2: [function(c, a) {
        if (c.callMethod$2("_pop", []) == null)
          J.$index$asx($.$get$context().$index(0, "byond"), "lightbox").callMethod$1("close");
        c.callMethod$1("remove");
      }, null, null, 4, 0, null, 1, 0, "call"]
    },
    ByondJS_builtinCommands_closure: {
      "^": "Closure:4;",
      call$1: function(c) {
        var t1 = $.$get$ByondJS_skin();
        t1.runWinsets$2(null, t1.parseParams$1(c));
      }
    },
    ByondJS_builtinCommands_closure0: {
      "^": "Closure:4;",
      call$1: function(c) {
        var _, exception, t1;
        try {
          $.$get$context().callMethod$2("eval", [c]);
        } catch (exception) {
          t1 = H.unwrapException(exception);
          _ = t1;
          P.print(_);
        }
      }
    },
    ByondSkin: {
      "^": "Object;classes,prompts,controlsByName,controlsByFullName,popups,macroSets,controls,_pollable,macro,mouseCapture,dragSurface,touches,outwin,_pendingWinsets",
      reset$0: function(_) {
        var e, t1;
        this.classes = P.LinkedHashMap__makeEmpty();
        this.prompts = P.LinkedHashMap__makeEmpty();
        this.controlsByName = P.LinkedHashMap__makeEmpty();
        this.controlsByFullName = P.LinkedHashMap__makeEmpty();
        this.controls = [];
        this._pollable = [];
        this.macroSets = P.LinkedHashMap__makeEmpty();
        this.macro = "macro";
        this.capture$1(0, null);
        this.touches = P.LinkedHashMap__makeEmpty();
        for (e = document.body.firstChild; e != null; e = e.nextSibling)
          if (!!J.getInterceptor(e).$isElement && J.indexOf$1$asx(e.className, "byond") >= 0) {
            t1 = e.parentNode;
            if (t1 != null)
              t1.removeChild(e);
          }
        P.print("ByondSkin reset");
        N.ByondJS_create();
      },
      sanitizeClass$1: function(type) {
        var t1, t2;
        if (typeof type !== "string")
          return type;
        t1 = type.toLowerCase();
        t2 = P.RegExp_RegExp("[^\\w\\.]+", true, false);
        t1 = H.stringReplaceAllUnchecked(t1, t2, "");
        t2 = P.RegExp_RegExp("^byond\\.", true, false);
        t1.toString;
        return H.stringReplaceAllUnchecked(t1, t2, "");
      },
      attach$2: function(id, type) {
        var id0, e, isDefault, other, fullid, t1, config, winsetfn, t2, t3, model, classname, completer, map, p, a, t4;
        type = this.sanitizeClass$1(type);
        if (!!J.getInterceptor(id).$isElement) {
          if (id.id.length === 0)
            id.id = N.ByondJS_availableName(type);
          id0 = id.id.toLowerCase();
          id.id = id0;
          e = id;
          id = id0;
        } else if (typeof id === "string") {
          e = document.getElementById(id);
          if (e == null) {
            window;
            if (typeof console != "undefined")
              console.warn("Attach: Not a valid id");
            return;
          }
          id = id.toLowerCase();
          e.id = id;
        } else {
          window;
          if (typeof console != "undefined")
            console.warn("Attach: Not an id or element");
          return;
        }
        isDefault = e.getAttribute("isDefault") != null;
        id = id.toLowerCase();
        other = this.controlsByName.$index(0, id);
        if (other != null) {
          if (isDefault)
            if (other.$index(0, "isDefault"))
              isDefault = false;
            else {
              other.$indexSet(0, "id", N.ByondJS_availableName(other.$index(0, "type")));
              this.controlsByName.$indexSet(0, id, null);
              this.controlsByName.$indexSet(0, other.$index(0, "id"), other);
            }
          if (!isDefault) {
            id = N.ByondJS_availableName(type);
            e.id = id;
          }
        }
        fullid = e.getAttribute("fullid");
        if (typeof fullid !== "string" || fullid.length === 0)
          fullid = id;
        if (fullid != null)
          fullid = fullid.toLowerCase();
        t1 = $.$get$context();
        config = P.JsObject_JsObject(t1.$index(0, "Object"), null);
        winsetfn = P.JsObject_JsObject(t1.$index(0, "Object"), null);
        t2 = J.getInterceptor$x(e);
        t3 = P.LinkedHashMap__makeLiteral(["id", id, "fullid", fullid, "top", e, "elem", e, "type", type, "isDefault", isDefault, "config", config, "winsetfn", winsetfn, "cloneTemplate", t2.get$innerHtml(e), "cloneParams", e.getAttribute("skinparams"), "ui", P.JsObject_JsObject(t1.$index(0, "Object"), null)]);
        t3 = P._wrapToDart(P.JsObject__convertDataTree(t3));
        N.ByondJS_extend(t3, J.$index$asx(t1.$index(0, "byond"), "fn"));
        N.ByondJS_extend(winsetfn, J.$index$asx(t1.$index(0, "byond"), "winsetfn"));
        model = this.classes.$index(0, type);
        if (model != null) {
          N.ByondJS_extend(t3, model.$index(0, "fn"));
          N.ByondJS_extend(config, model.$index(0, "config"));
          N.ByondJS_extend(winsetfn, model.$index(0, "winsetfn"));
          t3.$indexSet(0, "template", model.$index(0, "template"));
        }
        type.toString;
        classname = H.stringReplaceAllUnchecked(type, ".", "_");
        if (J.indexOf$1$asx(type, ".") < 0)
          classname = C.JSString_methods.$add("byond_", classname);
        t2.get$classes(e).add$1(0, classname);
        e.setAttribute("byondclass", type);
        this.controls.push(t3);
        this.controlsByName.$indexSet(0, id, t3);
        this.controlsByFullName.$indexSet(0, fullid, t3);
        completer = new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [null]), [null]);
        t3.$indexSet(0, "loading", true);
        t3.$indexSet(0, "_loadCompleter", completer);
        t1 = this.parseParams$1(e.getAttribute("skinparams"));
        map = P.LinkedHashMap_LinkedHashMap(null, null, null, null, null);
        P.Maps__fillMapWithMappedIterable(map, t1, new N.ByondSkin_attach_closure(), new N.ByondSkin_attach_closure0());
        map.remove$1(0, "parent");
        for (t1 = N.ByondJS_keys(config), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new H.WhereIterator(t2, t1._f, [H.getTypeArgumentByIndex(t1, 0)]); t1.moveNext$0();) {
          p = t2.get$current();
          a = map.$index(0, p);
          if (a == null)
            a = e.getAttribute(p);
          if (a == null)
            a = e.getAttribute(p.toLowerCase());
          if (a != null)
            config.$indexSet(0, p, a);
        }
        t1 = [];
        C.JSArray_methods.addAll$1(t1, C.NodeList_methods.map$1(e.childNodes, P.js___convertToJS$closure()));
        for (; t2 = e.firstChild, t2 != null;) {
          t4 = t2.parentNode;
          if (t4 != null)
            t4.removeChild(t2);
        }
        this.createDefault$1(t3);
        t3.callMethod$2("create", [new P.JsArray(t1, [null])]);
        for (t1 = N.ByondJS_keys(winsetfn), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new H.WhereIterator(t2, t1._f, [H.getTypeArgumentByIndex(t1, 0)]); t1.moveNext$0();) {
          p = t2.get$current();
          a = map.$index(0, p);
          if (a != null) {
            t4 = P.LinkedHashMap__makeLiteral([p, a]);
            t3.callMethod$2("winset", [P._wrapToDart(P.JsObject__convertDataTree(t4))]);
          }
        }
        delete t3._jsObject.loading;
        t1 = completer.future;
        if (t1._state !== 0)
          H.throwExpression(new P.StateError("Future already completed"));
        t1._asyncComplete$1(t3);
        t3.$indexSet(0, "_loadCompleter", null);
        return t3;
      },
      clone$3: function(_, id, newid, parentid) {
        var proto, deftype, t1, m, t2, fallback, e, type, ne, inuse, newctrl, child, template, params;
        proto = this.find$1(0, id);
        deftype = P.RegExp_RegExp("^(window|pane)s?$", true, false);
        t1 = proto == null;
        if (t1) {
          m = deftype.firstMatch$1(id);
          t2 = m != null;
        } else {
          m = null;
          t2 = false;
        }
        if (t2)
          fallback = m._match[1];
        else {
          if (t1 || !J.getInterceptor(proto.$index(0, "top")).$isElement) {
            window;
            if (typeof console != "undefined")
              console.warn("Clone: Not a valid id");
            return;
          }
          e = proto.$index(0, "top");
          id = N.ByondJS_sanitizeId(e.id);
          e.id = id;
          fallback = null;
        }
        t1 = fallback != null;
        if (t1)
          type = "pane";
        else if (proto == null) {
          window;
          if (typeof console != "undefined")
            console.warn("Clone: Not a valid control");
          return;
        } else
          type = proto.$index(0, "type");
        if (newid.length !== 0) {
          ne = document.getElementById(newid);
          inuse = ne != null;
          newid = N.ByondJS_sanitizeId(newid);
          if (inuse)
            ne.id = newid;
        } else {
          newid = N.ByondJS_availableName(type);
          ne = null;
          inuse = false;
        }
        if (ne == null) {
          ne = W._ElementFactoryProvider_createElement_tag("div", null);
          ne.id = N.ByondJS_sanitizeId(newid);
        }
        newctrl = this.find$1(0, ne);
        if (inuse && newctrl != null)
          if (N.ByondJS_toBool(newctrl.$index(0, "isRuntime"), false)) {
            newctrl.callMethod$1("remove");
            newctrl = this.find$1(0, ne);
            if (newctrl != null)
              this.remove$1(0, newctrl);
          } else {
            window;
            if (typeof console != "undefined")
              console.warn("Clone: Clone id is in use");
            return;
          }
        if (t1) {
          if (fallback === "window")
            ne.setAttribute("skinparams", "is-pane=false;is-visible=true");
          newctrl = this.attach$2(ne, type);
          if (newctrl != null) {
            newctrl.$indexSet(0, "cloned", id);
            newctrl.$indexSet(0, "isRuntime", true);
            for (t1 = new W._FrozenElementList(ne.querySelectorAll("[byondclass]"), [null]), t1 = new H.ListIterator(t1, t1.get$length(t1), 0, null); t1.moveNext$0();) {
              child = t1.__internal$_current;
              if (this.controlParent$2(child, ne) !== ne)
                continue;
              this.attach$2(child, child.getAttribute("byondclass"));
            }
          } else
            J.set$innerHtml$x(ne, "");
          return newctrl;
        }
        template = proto.$index(0, "cloneTemplate");
        params = proto.$index(0, "cloneParams");
        if (template != null)
          J.setInnerHtml$2$treeSanitizer$x(ne, template, $.$get$ByondJS_sanitizer());
        ne.toString;
        ne.setAttribute("skinparams", params != null ? params : "");
        for (t1 = [null], t2 = new W._FrozenElementList(ne.querySelectorAll("[id][byondclass]"), t1), t2 = new H.ListIterator(t2, t2.get$length(t2), 0, null); t2.moveNext$0();) {
          child = t2.__internal$_current;
          child.toString;
          child.setAttribute("fullid", C.JSString_methods.$add(newid + ".", child.id));
        }
        newctrl = this.attach$2(ne, type);
        if (newctrl != null) {
          newctrl.$indexSet(0, "cloned", id);
          newctrl.$indexSet(0, "isRuntime", true);
          for (t1 = new W._FrozenElementList(ne.querySelectorAll("[byondclass]"), t1), t1 = new H.ListIterator(t1, t1.get$length(t1), 0, null); t1.moveNext$0();) {
            child = t1.__internal$_current;
            if (this.controlParent$2(child, ne) !== ne)
              continue;
            this.attach$2(child, child.getAttribute("byondclass"));
          }
        } else
          J.set$innerHtml$x(ne, "");
        return newctrl;
      },
      clone$2: function($receiver, id, newid) {
        return this.clone$3($receiver, id, newid, null);
      },
      createPrompt$1: function(params) {
        var t1, byond, module, choices, defaultChoice, type, model, t2, config, winsetfn, t3, prompt_id, id, $prompt, t4;
        t1 = $.$get$context();
        byond = t1.$index(0, "byond");
        module = byond.$index(0, "prompt");
        choices = params.$index(0, "choices");
        defaultChoice = params.$index(0, "defaultChoice");
        type = module.$index(0, "which") != null ? this.sanitizeClass$1(module.callMethod$2("which", [params])) : null;
        if (type == null || this.prompts.$index(0, type) == null)
          type = this.sanitizeClass$1(params.$index(0, "type"));
        model = this.prompts.$index(0, type);
        if (model == null) {
          if (N.ByondJS_toBool(params.$index(0, "canCancel"), false) === true)
            params.callMethod$2("cancel", []);
          else if (defaultChoice != null)
            params.callMethod$2("reply", [defaultChoice]);
          else {
            t1 = J.getInterceptor(choices);
            if (!!t1.$isJsArray && t1.get$length(choices) !== 0)
              params.callMethod$2("reply", [t1.$index(choices, 0)]);
            else
              params.callMethod$2("cancel", []);
          }
          return;
        }
        t2 = W._ElementFactoryProvider_createElement_tag("div", null);
        config = P.JsObject_JsObject(t1.$index(0, "Object"), null);
        winsetfn = P.JsObject_JsObject(t1.$index(0, "Object"), null);
        t3 = module.$index(0, "_pid");
        if (typeof t3 !== "number")
          module.$indexSet(0, "_pid", 0);
        prompt_id = J.$add$ns(module.$index(0, "_pid"), 1);
        module.$indexSet(0, "_pid", prompt_id);
        id = "prompt" + J.toString$0$(prompt_id);
        $prompt = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["id", id, "type", "prompt", "isDefault", true, "top", t2, "elem", t2, "params", params, "config", config, "winsetfn", winsetfn, "ui", P.JsObject_JsObject(t1.$index(0, "Object"), null)]));
        N.ByondJS_extend($prompt, byond.$index(0, "fn"));
        N.ByondJS_extend($prompt, module.$index(0, "fn"));
        N.ByondJS_extend(winsetfn, byond.$index(0, "winsetfn"));
        N.ByondJS_extend($prompt, model.$index(0, "fn"));
        N.ByondJS_extend(winsetfn, model.$index(0, "winsetfn"));
        N.ByondJS_extend(config, model.$index(0, "config"));
        $prompt.$indexSet(0, "template", model.$index(0, "template"));
        t1 = J.getInterceptor$x(t2);
        t1.get$classes(t2).add$1(0, "byond_prompt");
        t1 = t1.get$classes(t2);
        type.toString;
        t1.add$1(0, C.JSString_methods.$add("byond_prompt_", H.stringReplaceAllUnchecked(type, ".", "_")));
        this.controls.push($prompt);
        this.controlsByName.$indexSet(0, id, $prompt);
        $prompt.$indexSet(0, "loading", true);
        t1 = [];
        C.JSArray_methods.addAll$1(t1, C.NodeList_methods.map$1(t2.childNodes, P.js___convertToJS$closure()));
        for (; t3 = t2.firstChild, t3 != null;) {
          t4 = t3.parentNode;
          if (t4 != null)
            t4.removeChild(t3);
        }
        this.createDefault$1($prompt);
        $prompt.callMethod$2("create", [new P.JsArray(t1, [null])]);
        $prompt.callMethod$2("fill", [params]);
        if (!N.ByondJS_toBool($prompt.$index(0, "replied"), false))
          $prompt.callMethod$2("show", []);
        $prompt.deleteProperty$1("loading");
        return $prompt;
      },
      createDefault$1: function(control) {
        var template, ui, $top, t1, t2, elems, t3, e, t4;
        template = control.$index(0, "template");
        ui = control.$index(0, "ui");
        if (template == null)
          return;
        $top = control.$index(0, "top");
        if ($top == null)
          return;
        t1 = W._ElementFactoryProvider_createElement_tag("div", null);
        N.ByondJS_stage().appendChild(t1);
        t2 = J.getInterceptor$x(t1);
        t2.setInnerHtml$2$validator(t1, template, $.$get$ByondJS_validator());
        if (ui != null) {
          elems = new W._FrozenElementList(t1.querySelectorAll("*"), [null]);
          for (t3 = new H.ListIterator(elems, elems.get$length(elems), 0, null); t3.moveNext$0();) {
            e = t3.__internal$_current;
            t4 = e.id;
            if (t4.length !== 0)
              ui.$indexSet(0, t4, e);
            e.getAttribute("id");
            e.removeAttribute("id");
          }
        }
        for (; t3 = t1.firstChild, t3 != null;)
          $top.appendChild(t3);
        t2.remove$0(t1);
      },
      remove$1: function(_, control) {
        var _0, t1, t2, exception, id, fullid, $parent, $top, child, childctrl;
        if (!!J.getInterceptor(control).$isElement || typeof control === "string")
          control = this.find$1(0, control);
        if (control == null)
          return;
        t1 = J.getInterceptor(control);
        if (t1.$eq(control, this.mouseCapture)) {
          t2 = this.mouseCapture;
          if (t2 != null) {
            try {
              t2.callMethod$1("mouseReleased");
            } catch (exception) {
              t2 = H.unwrapException(exception);
              _0 = t2;
              P.print(_0);
            }
            this.mouseCapture = null;
          }
        }
        id = t1.$index(control, "id");
        fullid = t1.$index(control, "fullid");
        if (id == null)
          return;
        $parent = control.callMethod$2("parent", []);
        $top = t1.$index(control, "top");
        if ($top != null)
          for (; child = $top.querySelector("byondclass"), child != null;) {
            childctrl = this.find$1(0, child);
            if (childctrl != null)
              childctrl.callMethod$1("remove");
            t1 = child.parentNode;
            t2 = t1 != null;
            if (t2)
              if (t2)
                t1.removeChild(child);
          }
        if ($parent != null)
          $parent.callMethod$2("paneAdopted", [id, null]);
        t1 = this.popups;
        if (J.$eq$(t1.$index(0, id), control))
          t1.remove$1(0, id);
        if (J.$eq$(this.controlsByName.$index(0, id), control))
          this.controlsByName.remove$1(0, id);
        if (J.$eq$(this.controlsByFullName.$index(0, fullid), control))
          this.controlsByFullName.remove$1(0, id);
        C.JSArray_methods.remove$1(this.controls, control);
        C.JSArray_methods.remove$1(this._pollable, control);
        if ($top != null)
          J.remove$0$ax($top);
      },
      defineClass$4: function($name, code, html, isPrompt) {
        var obj, _, t1, model, exception;
        $name = this.sanitizeClass$1($name);
        obj = null;
        t1 = $.$get$context();
        model = P.JsObject_JsObject(t1.$index(0, "Object"), null);
        model.$indexSet(0, "fn", P.JsObject_JsObject(t1.$index(0, "Object"), null));
        try {
          obj = t1.callMethod$2("eval", ["(" + code + ")"]);
        } catch (exception) {
          t1 = H.unwrapException(exception);
          _ = t1;
          P.print(C.JSString_methods.$add(C.JSString_methods.$add("Error defining class ", $name) + ": ", J.toString$0$(_)));
          return;
        }
        N.ByondJS_extend(model, obj);
        model.$indexSet(0, "template", html);
        if (isPrompt)
          this.prompts.$indexSet(0, $name, model);
        else
          this.classes.$indexSet(0, $name, model);
      },
      defaultElem$1: function(type) {
        var best, model, t1, t2, _i, control, exception;
        best = null;
        if (typeof type !== "string")
          return;
        for (t1 = this.controls, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
          control = t1[_i];
          if (!J.$eq$(control.$index(0, "type"), type))
            continue;
          if (J.$eq$(control.$index(0, "isDefault"), true))
            return control;
          if (best == null)
            best = control;
        }
        if (best != null)
          try {
            model = this.classes.$index(0, type);
            if (model == null || !J.$eq$(J.$index$asx(J.$index$asx(model, "config"), "autoDefault"), false))
              J.$indexSet$ax(best, "isDefault", true);
          } catch (exception) {
            H.unwrapException(exception);
            J.$indexSet$ax(best, "isDefault", true);
          }
        return best;
      },
      find$2: function(_, $name, type) {
        var t1, ctrl, sub;
        t1 = J.getInterceptor($name);
        if (!!t1.$isElement) {
          for (t1 = this.controlsByFullName, t1 = t1.get$values(t1), t1 = t1.get$iterator(t1); t1.moveNext$0();) {
            ctrl = t1.get$current();
            if (ctrl != null && J.$eq$(ctrl.$index(0, "top"), $name))
              return ctrl;
          }
          return;
        }
        if (!!t1.$isJsObject) {
          t1 = this.controlsByFullName;
          return t1.get$values(t1).contains$1(0, $name) ? $name : null;
        }
        if (typeof $name !== "string" || $name.length === 0)
          return this.defaultElem$1(type);
        sub = t1.indexOf$2($name, ":", 1);
        $name = N.ByondJS_sanitizeId(sub >= 0 ? t1.substring$2($name, 0, sub) : $name);
        if (J.getInterceptor$asx($name).indexOf$1($name, ":") === 0)
          return this.defaultElem$1(C.JSString_methods.substring$1($name, 1));
        if (C.JSString_methods.indexOf$1($name, ".") >= 0)
          return this.controlsByFullName.$index(0, $name);
        return this.controlsByName.$index(0, $name);
      },
      find$1: function($receiver, $name) {
        return this.find$2($receiver, $name, null);
      },
      findAll$2: function($name, type) {
        var t1, ret, c, rx, ccopy, t2, t3, _i, control, t4, t5;
        t1 = [];
        C.JSArray_methods.addAll$1(t1, C.JSArray_methods.map$1([], P.js___convertToJS$closure()));
        ret = new P.JsArray(t1, [null]);
        if ($name == null)
          $name = "";
        if (typeof $name !== "string") {
          c = this.find$2(0, $name, type);
          if (c != null)
            ret.callMethod$2("push", [c]);
          return ret;
        }
        rx = $name.length !== 0 ? P.RegExp_RegExp("^" + H.stringReplaceAllFuncUnchecked($name, P.RegExp_RegExp("[^\\w\\-\\s]", true, false), new N.ByondSkin_findAll_closure(), null) + "$", true, false) : null;
        ccopy = P.List_List$from(this.controls, true, null);
        for (t1 = ccopy.length, t2 = rx != null, t3 = typeof type === "string", _i = 0; _i < ccopy.length; ccopy.length === t1 || (0, H.throwConcurrentModificationError)(ccopy), ++_i) {
          control = ccopy[_i];
          if (t3 && !J.$eq$(control.$index(0, "type"), type))
            continue;
          if (t2) {
            t4 = control.$index(0, "id");
            t5 = rx._nativeRegExp;
            if (typeof t4 !== "string")
              H.throwExpression(H.argumentErrorValue(t4));
            t4 = !t5.test(t4);
          } else
            t4 = false;
          if (t4)
            continue;
          ret.callMethod$2("push", [control]);
        }
        return ret;
      },
      controlParent$2: function(e, $stop) {
        var byondclass;
        if (e == null)
          return;
        for (; e = e.parentNode, !!J.getInterceptor(e).$isElement;) {
          if (e == null ? $stop == null : e === $stop)
            return e;
          byondclass = e.getAttribute("byondclass");
          if (typeof byondclass === "string" && byondclass.length !== 0 && this.find$1(0, e) != null)
            return e;
        }
        return;
      },
      controlParent$1: function(e) {
        return this.controlParent$2(e, null);
      },
      controlFor$1: function(e) {
        var c, byondclass, t1;
        if (e == null)
          return;
        for (c = null; e != null;) {
          byondclass = e.getAttribute("byondclass");
          if (typeof byondclass !== "string" || byondclass.length === 0)
            byondclass = e.getAttribute("byondprompt");
          if (typeof byondclass === "string")
            if (byondclass.length !== 0) {
              c = this.find$1(0, e);
              t1 = c != null;
            } else
              t1 = false;
          else
            t1 = false;
          if (t1)
            return c;
          e = e.parentNode;
          if (!J.getInterceptor(e).$isElement)
            break;
        }
        return;
      },
      load$1: function(_, $top) {
        var control, _0, _1, t1, id, e, type, ccopy, _i, exception, t2, line, s;
        for (t1 = J.querySelectorAll$1$x($top == null ? document : $top, "[byondclass]"), t1 = new H.ListIterator(t1, t1.get$length(t1), 0, null), id = null, e = null; t1.moveNext$0();) {
          e = t1.__internal$_current;
          id = e.id;
          type = this.sanitizeClass$1(e.getAttribute("byondclass"));
          if (id == null) {
            id = N.ByondJS_availableName(type);
            e.id = id;
          }
          this.attach$2(e, type);
        }
        ccopy = P.List_List$from(this.controls, true, null);
        for (t1 = ccopy.length, _i = 0; _i < ccopy.length; ccopy.length === t1 || (0, H.throwConcurrentModificationError)(ccopy), ++_i) {
          control = ccopy[_i];
          if (control != null) {
            e = J.$index$asx(control, "top");
            id = J.$index$asx(control, "id");
            try {
              control.callMethod$1("postLoad");
            } catch (exception) {
              t2 = H.unwrapException(exception);
              _0 = t2;
              line = H.S(_0);
              t2 = $.printToZone;
              if (t2 == null)
                H.printString(line);
              else
                t2.call$1(line);
            }
            try {
              control.callMethod$1("onsize");
            } catch (exception) {
              t2 = H.unwrapException(exception);
              _1 = t2;
              line = H.S(_1);
              t2 = $.printToZone;
              if (t2 == null)
                H.printString(line);
              else
                t2.call$1(line);
            }
          }
        }
        try {
          $.$get$context().callMethod$2("setTimeout", ["window.focus()", 100]);
        } catch (exception) {
          H.unwrapException(exception);
        }
        t1 = document;
        C.HtmlDocument_methods._addEventListener$3(t1, "keydown", new N.ByondSkin_load_closure(this), null);
        C.HtmlDocument_methods._addEventListener$3(t1, "keyup", new N.ByondSkin_load_closure0(this), null);
        C.HtmlDocument_methods._addEventListener$3(t1, "mousedown", new N.ByondSkin_load_closure1(this), null);
        C.HtmlDocument_methods._addEventListener$3(t1, "mouseup", new N.ByondSkin_load_closure2(this), null);
        C.HtmlDocument_methods._addEventListener$3(t1, "mousemove", new N.ByondSkin_load_closure3(this), null);
        C.HtmlDocument_methods._addEventListener$3(t1, "touchstart", new N.ByondSkin_load_closure4(this), null);
        C.HtmlDocument_methods._addEventListener$3(t1, "touchend", new N.ByondSkin_load_closure5(this), null);
        C.HtmlDocument_methods._addEventListener$3(t1, "touchcancel", new N.ByondSkin_load_closure6(this), null);
        C.HtmlDocument_methods._addEventListener$3(t1, "touchleave", new N.ByondSkin_load_closure7(this), null);
        C.HtmlDocument_methods._addEventListener$3(t1, "touchmove", new N.ByondSkin_load_closure8(this), null);
        C.HtmlDocument_methods._addEventListener$3(t1, "blur", new N.ByondSkin_load_closure9(this), null);
        C.HtmlDocument_methods._addEventListener$3(t1, "selectstart", new N.ByondSkin_load_closure10(this), null);
        t1 = window;
        C.Window_methods._addEventListener$3(t1, "unload", new N.ByondSkin_load_closure11(this), null);
        t1 = window;
        C.Window_methods._addEventListener$3(t1, "resize", new N.ByondSkin_load_closure12(this), null);
        if (this.controls.length > 0) {
          for (t1 = this._pendingWinsets, t2 = t1.get$keys(), t2 = t2.get$iterator(t2); t2.moveNext$0();) {
            s = t2.get$current();
            this.runWinsets$2(s, t1.$index(0, s));
          }
          t1.clear$0(0);
        }
      },
      onskinsize$1: function(e) {
        var control, _, ccopy, t1, _i, exception, t2, line;
        ccopy = P.List_List$from(this.controls, true, null);
        for (t1 = ccopy.length, _i = 0; _i < ccopy.length; ccopy.length === t1 || (0, H.throwConcurrentModificationError)(ccopy), ++_i) {
          control = ccopy[_i];
          if (control != null)
            try {
              control.callMethod$1("onsize");
            } catch (exception) {
              t2 = H.unwrapException(exception);
              _ = t2;
              line = H.S(_);
              t2 = $.printToZone;
              if (t2 == null)
                H.printString(line);
              else
                t2.call$1(line);
            }
        }
      },
      onunload$1: function(e) {
        var exception;
        $.me.cleanup$0();
        try {
          $.$get$context().$index(0, "byond").callMethod$1("cleanup");
        } catch (exception) {
          H.unwrapException(exception);
        }
      },
      keyEvent$4: function(e, asker, any, isDocEvent) {
        var control, ret, targ, $top, exception, order, t1, t2, type;
        control = this.defaultElem$1("prompt");
        any = N.ByondJS_toBool(any, false);
        isDocEvent = N.ByondJS_toBool(isDocEvent, false);
        if (control != null) {
          ret = null;
          try {
            ret = control.callMethod$2("keyEvent", [e]);
            if (!J.$eq$(ret, false)) {
              targ = W._convertNativeToDart_EventTarget(e.target);
              $top = J.$index$asx(control, "top");
              while (true) {
                if (!(targ != null && !J.$eq$(targ, $top)))
                  break;
                targ = J.get$parentNode$x(targ);
              }
              if (!J.$eq$(targ, $top))
                e.preventDefault();
            }
          } catch (exception) {
            H.unwrapException(exception);
            e.preventDefault();
          }
          if (!J.$eq$(ret, false)) {
            if (e.keyCode === 9)
              e.preventDefault();
            e.stopPropagation();
            return !N.ByondJS_toBool(ret, false);
          }
        }
        order = J.$index$asx(J.$index$asx($.$get$context().$index(0, "byond"), "skin"), "keyOrder");
        if (!J.getInterceptor(order).$isList)
          order = ["map", "input"];
        for (t1 = J.getInterceptor$ax(order), t2 = t1.get$iterator(order); t2.moveNext$0();) {
          type = t2.get$current();
          if (typeof type !== "string")
            continue;
          control = this.defaultElem$1(this.sanitizeClass$1(type));
          if (control == null)
            continue;
          if (J.$eq$(control, asker))
            break;
          if (N.ByondJS_toBool(control.callMethod$2("keyEvent", [e]), false)) {
            $.me.macro.record$1(e);
            return false;
          }
        }
        if (any || isDocEvent)
          for (t1 = t1.get$iterator(order); t1.moveNext$0();) {
            type = t1.get$current();
            if (typeof type !== "string")
              continue;
            control = this.defaultElem$1(this.sanitizeClass$1(type));
            if (control == null)
              continue;
            if (J.$eq$(control, asker))
              break;
            if (N.ByondJS_toBool(control.callMethod$2("keyEvent", [e, true]), false)) {
              $.me.macro.record$1(e);
              return false;
            }
          }
        if (isDocEvent)
          $.me.macro.record$1(e);
        return true;
      },
      keyEvent$3: function(e, asker, any) {
        return this.keyEvent$4(e, asker, any, null);
      },
      capture$3: function(_, c, touch, force) {
        var t1;
        this.mouseCapture = c;
        if (c != null) {
          if (!!J.getInterceptor(touch).$isTouch) {
            if (this.dragSurface == null)
              this.touches.clear$0(0);
            this.touches.$indexSet(0, touch.identifier, touch);
          }
          if (J.$eq$(force, true))
            this.activateDragSurface$0();
        } else {
          t1 = this.dragSurface;
          if (t1 != null) {
            J.remove$0$ax(t1);
            this.dragSurface = null;
          }
        }
      },
      capture$1: function($receiver, c) {
        return this.capture$3($receiver, c, null, null);
      },
      activateDragSurface$0: function() {
        var t1, t2, t3;
        if (this.dragSurface == null) {
          t1 = document;
          t2 = t1.createElement("div");
          this.dragSurface = t2;
          t3 = t2.style;
          t3.width = "100%";
          t3 = t2.style;
          t3.height = "100%";
          t3 = t2.style;
          t3.left = "0";
          t3 = t2.style;
          t3.top = "0";
          t3 = t2.style;
          t3.position = "fixed";
          t3 = t2.style;
          t3.zIndex = "1001";
          t3 = t2.style;
          t3.backgroundColor = "rgba(0,0,0,0.001)";
          t1.body.appendChild(t2);
          t1 = this.dragSurface;
          J._addEventListener$3$x(t1, "mousemove", new N.ByondSkin_activateDragSurface_closure(this), null);
          t1 = this.dragSurface;
          J._addEventListener$3$x(t1, "mousedown", new N.ByondSkin_activateDragSurface_closure0(this), null);
          t1 = this.dragSurface;
          J._addEventListener$3$x(t1, "mouseup", new N.ByondSkin_activateDragSurface_closure1(this), null);
          t1 = this.dragSurface;
          J._addEventListener$3$x(t1, "mouseleave", new N.ByondSkin_activateDragSurface_closure2(this), null);
          t1 = this.dragSurface;
          J._addEventListener$3$x(t1, "drag", new N.ByondSkin_activateDragSurface_closure3(this), null);
          t1 = this.dragSurface;
          J._addEventListener$3$x(t1, "touchstart", new N.ByondSkin_activateDragSurface_closure4(this), null);
          t1 = this.dragSurface;
          J._addEventListener$3$x(t1, "touchend", new N.ByondSkin_activateDragSurface_closure5(this), null);
          t1 = this.dragSurface;
          J._addEventListener$3$x(t1, "touchcancel", new N.ByondSkin_activateDragSurface_closure6(this), null);
          t1 = this.dragSurface;
          J._addEventListener$3$x(t1, "touchleave", new N.ByondSkin_activateDragSurface_closure7(this), null);
          t1 = this.dragSurface;
          J._addEventListener$3$x(t1, "touchmove", new N.ByondSkin_activateDragSurface_closure8(this), null);
        }
      },
      mouseEvent$1: function(e) {
        var _, _0, _1, t1, t2, exception;
        t1 = e.type;
        t2 = t1 === "mouseleave";
        if (t2 && this.dragSurface == null && W._convertNativeToDart_EventTarget(e.target) !== document) {
          if (this.mouseCapture != null)
            this.activateDragSurface$0();
          return;
        }
        if (t1 === "mouseup" || t2) {
          t1 = this.mouseCapture;
          if (t1 != null) {
            try {
              t1.callMethod$2("mouseEvent", [e]);
            } catch (exception) {
              t1 = H.unwrapException(exception);
              _ = t1;
              P.print(_);
            }
            try {
              this.mouseCapture.callMethod$1("mouseReleased");
            } catch (exception) {
              t1 = H.unwrapException(exception);
              _0 = t1;
              P.print(_0);
            }
            this.capture$1(0, null);
          }
        }
        t1 = e.type;
        if (t1 === "mousemove" || t1 === "drag") {
          t1 = this.mouseCapture;
          if (t1 != null)
            try {
              t1.callMethod$2("mouseEvent", [e]);
            } catch (exception) {
              t1 = H.unwrapException(exception);
              _1 = t1;
              P.print(_1);
            }
        }
      },
      touchEvent$1: function(e) {
        var _, _0, _1, t1, t2, _i, t, exception;
        t1 = e.type;
        t2 = t1 === "touchleave";
        if (t2 && this.dragSurface == null && W._convertNativeToDart_EventTarget(e.target) !== document) {
          for (t1 = e.changedTouches, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            t = t1[_i];
            this.touches.remove$1(0, t.identifier);
          }
          this.activateDragSurface$0();
          return;
        }
        if (t1 === "touchend" || t2 || t1 === "touchcancel") {
          for (t1 = e.changedTouches, t2 = t1.length, _i = 0; _i < t1.length; t1.length === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            t = t1[_i];
            this.touches.remove$1(0, t.identifier);
          }
          t1 = this.mouseCapture;
          if (t1 != null) {
            try {
              t1.callMethod$2("mouseEvent", [e]);
            } catch (exception) {
              t1 = H.unwrapException(exception);
              _ = t1;
              P.print(_);
            }
            t1 = this.touches;
            if (t1.get$length(t1) === 0) {
              try {
                this.mouseCapture.callMethod$1("mouseReleased");
              } catch (exception) {
                t1 = H.unwrapException(exception);
                _0 = t1;
                P.print(_0);
              }
              this.capture$1(0, null);
            }
          }
        } else if (t1 === "touchmove") {
          t1 = this.mouseCapture;
          if (t1 != null)
            try {
              t1.callMethod$2("mouseEvent", [e]);
            } catch (exception) {
              t1 = H.unwrapException(exception);
              _1 = t1;
              P.print(_1);
            }
        }
      },
      onblur$1: function(e) {
        var _, t1, exception;
        t1 = this.mouseCapture;
        if (t1 != null) {
          try {
            t1.callMethod$1("mouseReleased");
          } catch (exception) {
            t1 = H.unwrapException(exception);
            _ = t1;
            P.print(_);
          }
          this.capture$1(0, null);
        }
        $.me.macro.reset$0(0);
      },
      msgEvent$1: function(e) {
        var win, ctrl, e0, t1, t2, copy, m, $name, browser, t3, exception, scripts, str, i, id;
        if (W._convertNativeToDart_EventTarget(e.source) == null)
          return;
        t1 = e.data;
        t2 = new P._AcceptStructuredCloneDart2Js([], [], false);
        t2.mustCopy = true;
        copy = t2.walk$1(t1);
        if (typeof copy !== "string")
          return;
        t1 = e.data;
        t2 = new P._AcceptStructuredCloneDart2Js([], [], false);
        t2.mustCopy = true;
        copy = t2.walk$1(t1);
        t1 = e.source;
        win = W._convertNativeToDart_EventTarget(t1);
        t2 = e.origin;
        if (J.endsWith$1$s(t2, ".byond.com")) {
          this.outwin = W._convertNativeToDart_EventTarget(t1);
          if (J.getInterceptor$s(copy).startsWith$1(copy, "key:"))
            $.me.activateKey$1(C.JSString_methods.substring$1(copy, 4));
          else if (copy === "key_failed")
            $.me.activateKey$1("-");
          if (C.JSString_methods.startsWith$1(copy, "command_callback:")) {
            m = C.JsonCodec_null_null.decode$1(C.JSString_methods.substring$1(copy, 17));
            $name = m.$index(0, "name");
            if (typeof $name === "string")
              this.output$2($name, P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["callback", m.$index(0, "command"), "result", m.$index(0, "result")])));
            return;
          }
          return;
        }
        t1 = $.me;
        if (t1 != null && t2 !== "http://" + H.S(t1.host) + ":" + H.S($.me.port))
          return;
        if (copy === "browser") {
          browser = this.classes.$index(0, "browser");
          if (browser == null)
            return;
          ctrl = null;
          try {
            for (t1 = this.findAll$2(null, "browser"), t1 = new H.ListIterator(t1, t1.get$length(t1), 0, null); t1.moveNext$0();) {
              ctrl = t1.__internal$_current;
              e0 = J.$index$asx(ctrl, "elem");
              if (!J.$eq$(e0, win))
                if (!!J.getInterceptor(e0).$isIFrameElement) {
                  t2 = W._convertNativeToDart_Window(J.get$_get_contentWindow$x(e0));
                  t3 = win;
                  t3 = t2 == null ? t3 == null : t2 === t3;
                  t2 = t3;
                } else
                  t2 = false;
              else
                t2 = true;
              if (t2)
                break;
            }
          } catch (exception) {
            H.unwrapException(exception);
            ctrl = null;
          }
          scripts = browser.$index(0, "scripts");
          if (scripts instanceof P.JsFunction)
            scripts = browser.callMethod$2("scripts", [ctrl]);
          if (typeof scripts !== "string")
            return;
          J.postMessage$2$x(win, scripts, "*");
        } else if (J.getInterceptor$s(copy).startsWith$1(copy, "topic:"))
          $.me.sendTopicMessage$1(C.JSString_methods.substring$1(copy, 6));
        else if (C.JSString_methods.startsWith$1(copy, "update:")) {
          str = C.JSString_methods.substring$1(copy, 7);
          i = C.JSString_methods.indexOf$1(str, ":");
          if (i < 0)
            return;
          id = C.JSString_methods.substring$2(str, 0, i);
          str = C.JSString_methods.substring$1(str, i + 1);
          m = P.RegExp_RegExp(C.JSString_methods.$add("^byond", J.toString$0$(J.$index$asx($.$get$context().$index(0, "byond"), "local_id"))) + "\\[\\[(.*)\\]\\]$", true, false).firstMatch$1(id);
          if (m == null)
            return;
          t1 = m._match[1];
          i = C.JSString_methods.indexOf$1(str, ":");
          if (i < 0)
            return;
          $name = C.JSString_methods.substring$2(str, 0, i);
          str = C.JSString_methods.substring$1(str, i + 1);
          ctrl = this.find$1(0, t1);
          if (ctrl != null)
            ctrl.callMethod$2("onbrowserupdate", [$name, str]);
        }
      },
      sendOutMsg$2: function(msg, callback) {
        var t1 = J.getInterceptor(callback);
        if (!!t1.$isJsObject)
          callback = t1.$index(callback, "id");
        if (typeof callback !== "string")
          callback = "";
        t1 = this.outwin;
        if (t1 != null) {
          J.postMessage$2$x(t1, C.JSString_methods.$add(C.JSString_methods.$add("command:", callback) + ":", msg), "*");
          return true;
        }
        return false;
      },
      sendOutMsg$1: function(msg) {
        return this.sendOutMsg$2(msg, null);
      },
      popup$3: function(id, type, options) {
        var t1, classname, t2, t3, control;
        id = id == null || this.find$1(0, id) != null ? N.ByondJS_availableName(type + "popup") : N.ByondJS_sanitizeId(id);
        t1 = W._ElementFactoryProvider_createElement_tag("div", null);
        t1.id = id;
        type.toString;
        classname = H.stringReplaceAllUnchecked(type, ".", "_");
        t2 = J.getInterceptor(options);
        if (!!t2.$isJsObject) {
          t3 = t2.$index(options, "fullid");
          if (typeof t3 !== "string")
            t2.$indexSet(options, "fullid", C.JSString_methods.$add(id + ".", classname));
        }
        if (J.indexOf$1$asx(type, ".") < 0)
          C.JSString_methods.$add("byond_", classname);
        J.get$classes$x(t1).add$1(0, "byond_popup");
        N.ByondJS_backstage().appendChild(t1);
        t3 = t2.$index(options, "fullid");
        if (typeof t3 === "string")
          t1.setAttribute("fullid", t2.$index(options, "fullid"));
        control = this.attach$2(t1, type);
        control.$indexSet(0, "isRuntime", true);
        this.popups.$indexSet(0, control.$index(0, "id"), control);
        control.callMethod$2("popup", [options]);
        $.me.macro.unstick$0();
        return control;
      },
      isHtmlUri$1: function(val) {
        if (typeof val !== "string")
          return false;
        return C.JSString_methods.startsWith$1(C.JSString_methods.startsWith$1(val, "/") ? C.JSString_methods.substring$1(val, 1) : val, "html/");
      },
      output$2: function(id, obj) {
        var control, sub, _, idx, t1, exception;
        control = null;
        if (this.isHtmlUri$1(obj.$index(0, "file"))) {
          control = this.popups.$index(0, id);
          if (control == null) {
            control = this.find$2(0, id, "browser");
            if (control != null && !N.ByondJS_toBool(J.$index$asx(J.$index$asx(control, "config"), "acceptBrowse"), false))
              control = null;
          }
          if (control == null) {
            if (J.getInterceptor$asx(id).indexOf$1(id, ":") === 0)
              id = N.ByondJS_availableName(C.JSString_methods.substring$1(id, 1));
            control = this.popup$3(N.ByondJS_sanitizeId(id), "browser", obj.$index(0, "options"));
          }
          if (control == null)
            return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["error", true]));
        } else if (obj.$index(0, "null") != null) {
          control = this.popups.$index(0, id);
          if (control == null)
            control = this.find$2(0, id, "output");
        } else
          control = this.find$2(0, id, "output");
        if (control == null)
          return;
        sub = "";
        if (typeof id === "string")
          if (id.length !== 0) {
            idx = C.JSString_methods.indexOf$2(id, ":", 1);
            t1 = idx > 0;
          } else {
            idx = null;
            t1 = false;
          }
        else {
          idx = null;
          t1 = false;
        }
        if (t1)
          sub = J.substring$1$s(id, idx + 1);
        try {
          if (N.ByondJS_toBool(obj.$index(0, "null"), false)) {
            t1 = control.callMethod$2("clear", [sub]);
            return t1;
          }
          t1 = control.callMethod$2("output", [obj, sub]);
          return t1;
        } catch (exception) {
          t1 = H.unwrapException(exception);
          _ = t1;
          P.print(_);
        }
      },
      winset$2: function(id, props) {
        var control, key, win, idx, dispatch, ctrl, e, _, container, e0, pos, _0, sub, _1, keys, t1, oldlist, t2, exception, t3, line, $name, i, mname, pname, isMacro, $parent, type, set, command, mapTo, fullid, idx0;
        control = this.find$1(0, id);
        keys = N.ByondJS_keys(props);
        key = null;
        win = null;
        idx = null;
        if (this.controls.length === 0) {
          if (id == null)
            id = "";
          t1 = this._pendingWinsets;
          oldlist = t1.$index(0, id);
          if (oldlist == null) {
            oldlist = [];
            t1.$indexSet(0, id, oldlist);
          }
          for (t1 = J.get$iterator$ax(keys.__internal$_iterable), t2 = new H.WhereIterator(t1, keys._f, [H.getTypeArgumentByIndex(keys, 0)]); t2.moveNext$0();) {
            key = t1.get$current();
            oldlist.push(new N.SkinParam(key, J.$index$asx(props, key), false, null, null));
          }
          return;
        }
        if (id == null || id === "") {
          dispatch = P.LinkedHashMap__makeEmpty();
          for (t1 = J.get$iterator$ax(keys.__internal$_iterable), t2 = new H.WhereIterator(t1, keys._f, [H.getTypeArgumentByIndex(keys, 0)]); t2.moveNext$0();) {
            key = t1.get$current();
            try {
              idx = J.lastIndexOf$1$asx(key, ".");
              if (J.$ge$n(idx, 0)) {
                win = J.substring$2$s(key, 0, idx);
                if (J.$index$asx(dispatch, win) == null)
                  J.$indexSet$ax(dispatch, win, P.JsObject_JsObject($.$get$context().$index(0, "Object"), null));
                J.$indexSet$ax(J.$index$asx(dispatch, win), J.substring$1$s(key, J.$add$ns(idx, 1)), J.$index$asx(props, key));
              } else if (J.$eq$(key, "command"))
                this.doInput$1(J.$index$asx(props, key));
              else if (J.$eq$(key, "focus")) {
                ctrl = this.find$1(0, J.$index$asx(props, key));
                e = ctrl != null ? ctrl.callMethod$1("content") : null;
                if (!!J.getInterceptor(e).$isElement) {
                  if (N.ByondJS_attr([e, "tabindex"]) == null)
                    J.set$tabIndex$x(e, -1);
                  J.focus$0$x(e);
                }
              } else if (J.$eq$(key, "sound"))
                $.me.set$enableSound(N.ByondJS_toBool(J.$index$asx(props, key), true));
              else if (J.$eq$(key, "music"))
                $.me.set$enableMusic(N.ByondJS_toBool(J.$index$asx(props, key), true));
            } catch (exception) {
              t3 = H.unwrapException(exception);
              _ = t3;
              line = H.S(_);
              t3 = $.printToZone;
              if (t3 == null)
                H.printString(line);
              else
                t3.call$1(line);
            }
          }
          for (t1 = J.get$iterator$ax(dispatch.get$keys()); t1.moveNext$0();) {
            id = t1.get$current();
            this.winset$2(id, J.$index$asx(dispatch, id));
          }
          return;
        }
        $name = J.$index$asx(props, "name");
        t1 = $name != null;
        if (t1) {
          i = C.JSString_methods.indexOf$1($name, ".") + 1;
          mname = $.me.macro.nameToJS$1(C.JSString_methods.substring$1($name, i)).$index(0, "name");
          if (i > 0) {
            pname = N.ByondJS_sanitizeId(C.JSString_methods.substring$2($name, 0, i - 1));
            isMacro = this.macroSets.$index(0, pname) != null && true;
          } else {
            isMacro = mname != null && this.macroSets.$index(0, this.macro) != null && J.$index$asx(this.macroSets.$index(0, this.macro), mname) != null && true;
            pname = null;
          }
        } else {
          mname = null;
          pname = null;
          isMacro = false;
        }
        if (keys.contains$1(0, "parent")) {
          $parent = J.$index$asx(props, "parent");
          if (!isMacro) {
            pname = N.ByondJS_sanitizeId($parent);
            isMacro = this.macroSets.$index(0, pname) != null && true;
          }
          if (isMacro)
            if ($parent == null || $parent === "") {
              if (pname == null)
                pname = this.macro;
              if (this.macroSets.$index(0, pname) != null) {
                this.macroSets.$index(0, pname).deleteProperty$1(mname);
                t1 = this.macro;
                if (pname == null ? t1 == null : pname === t1) {
                  t1 = $.me.macro;
                  t2 = t1.nameToJS$1(mname).$index(0, "name");
                  t1._keyToMacro.remove$1(0, t2);
                  t1._oldstyles.remove$1(0, t2);
                  this.macrosChanged$0();
                }
              }
              return;
            }
          if (control != null) {
            if (!N.ByondJS_toBool(J.$index$asx(control, "isRuntime"), false))
              return;
            this.remove$1(0, control);
            control = null;
          }
          if ($parent == null || $parent === "")
            return;
          type = J.$index$asx(props, "type");
          type = typeof type === "string" ? type.toLowerCase() : "";
          if (t1)
            t1 = isMacro || type === "macro" || C.JSString_methods.startsWith$1($parent.toLowerCase(), "macro");
          else
            t1 = false;
          if (t1) {
            if (pname == null)
              pname = this.macro;
            set = this.macroSets.$index(0, pname);
            if (set == null) {
              t1 = this.macroSets;
              set = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
              t1.$indexSet(0, pname, set);
            }
            command = J.$index$asx(props, "command");
            mapTo = J.$index$asx(props, "mapTo");
            if (mapTo == null) {
              mapTo = J.$index$asx(props, "map-to");
              if (mapTo == null)
                mapTo = J.$index$asx(props, "mapto");
            }
            t1 = P.LinkedHashMap__makeLiteral(["command", command, "mapTo", mapTo]);
            set.$indexSet(0, mname, P._wrapToDart(P.JsObject__convertDataTree(t1)));
            t1 = this.macro;
            if (pname == null ? t1 == null : pname === t1) {
              $.me.macro.insert$3(0, $name, command, mapTo);
              this.macrosChanged$0();
            }
            return;
          }
          if (type === "")
            return;
          container = this.find$1(0, $parent);
          if (container == null)
            return;
          id = C.JSString_methods.substring$1(id, J.getInterceptor$asx(id).lastIndexOf$1(id, ".") + 1).toLowerCase();
          fullid = $parent.toLowerCase() + "." + id;
          e0 = document.getElementById(id);
          if (e0 != null)
            id = N.ByondJS_availableName(type);
          e0 = W._ElementFactoryProvider_createElement_tag("div", null);
          J.set$id$x(e0, id);
          t1 = e0;
          t1.toString;
          t1.setAttribute("fullid", fullid);
          control = this.attach$2(e0, type);
          if (control == null)
            return;
          J.$indexSet$ax(control, "isRuntime", true);
          try {
            pos = N.ByondJS_css([e0, "position"]);
            if (pos == null || J.get$length$asx(pos) === 0 || J.$eq$(pos, "static"))
              N.ByondJS_css([e0, "position", "absolute"]);
            J.append$1$x(J.$index$asx(container, "top"), e0);
          } catch (exception) {
            t1 = H.unwrapException(exception);
            _0 = t1;
            line = H.S(_0);
            t1 = $.printToZone;
            if (t1 == null)
              H.printString(line);
            else
              t1.call$1(line);
          }
          props = N.ByondJS_extend(P.JsObject_JsObject($.$get$context().$index(0, "Object"), null), props);
          t1 = props;
          delete t1.get$_jsObject().parent;
          t1 = props;
          delete t1.get$_jsObject().type;
        }
        if (isMacro) {
          if (pname == null)
            pname = this.macro;
          set = this.macroSets.$index(0, pname);
          if (set == null) {
            t1 = this.macroSets;
            set = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
            t1.$indexSet(0, pname, set);
          }
          t1 = props;
          if (!("command" in t1.get$_jsObject())) {
            t1 = props;
            if (!("mapTo" in t1.get$_jsObject())) {
              t1 = props;
              if (!("map-to" in t1.get$_jsObject())) {
                t1 = props;
                t1 = "mapto" in t1.get$_jsObject();
              } else
                t1 = true;
            } else
              t1 = true;
          } else
            t1 = true;
          if (t1) {
            command = J.$index$asx(props, "command");
            mapTo = J.$index$asx(props, "mapTo");
            if (mapTo == null) {
              mapTo = J.$index$asx(props, "map-to");
              if (mapTo == null)
                mapTo = J.$index$asx(props, "mapto");
            }
            if (set.$index(0, mname) == null)
              set.$indexSet(0, mname, P.JsObject_JsObject($.$get$context().$index(0, "Object"), null));
            J.$indexSet$ax(set.$index(0, mname), "command", command);
            J.$indexSet$ax(set.$index(0, mname), "mapTo", mapTo);
            t1 = this.macro;
            if (pname == null ? t1 == null : pname === t1) {
              $.me.macro.insert$3(0, $name, J.$index$asx(set.$index(0, mname), "command"), J.$index$asx(set.$index(0, mname), "mapTo"));
              this.macrosChanged$0();
            }
          }
          return;
        }
        if (control == null)
          return;
        sub = "";
        if (typeof id === "string") {
          idx0 = C.JSString_methods.indexOf$2(id, ":", 1);
          idx = idx0;
          t1 = idx0 > 0;
        } else
          t1 = false;
        if (t1)
          sub = J.substring$1$s(id, J.$add$ns(idx, 1));
        try {
          control.callMethod$2("winset", [props, sub]);
        } catch (exception) {
          t1 = H.unwrapException(exception);
          _1 = t1;
          line = H.S(_1);
          t1 = $.printToZone;
          if (t1 == null)
            H.printString(line);
          else
            t1.call$1(line);
        }
      },
      runWinsets$2: function(id, params) {
        var t1, pval, _i, p, t2, val, truth;
        if (params == null)
          return;
        for (t1 = params.length, pval = null, _i = 0; _i < params.length; params.length === t1 || (0, H.throwConcurrentModificationError)(params), ++_i) {
          p = params[_i];
          if (p.iftrue != null || p.iffalse != null) {
            t2 = P.LinkedHashMap__makeLiteral([p.name, ""]);
            val = this.winget$2(id, P._wrapToDart(P.JsObject__convertDataTree(t2)));
            t2 = p.value;
            pval = t2 == null ? "" : J.toString$0$(t2);
            val = J.$index$asx(val, p.name);
            truth = (val == null ? "" : J.toString$0$(val)) == null ? pval == null : (val == null ? "" : J.toString$0$(val)) === pval;
            this.runWinsets$2(id, (p.not ? !truth : truth) ? p.iftrue : p.iffalse);
          } else {
            val = p.value;
            if (val != null)
              val = J.toString$0$(val);
            t2 = P.LinkedHashMap__makeLiteral([p.name, val]);
            this.winset$2(id, P._wrapToDart(P.JsObject__convertDataTree(t2)));
          }
        }
      },
      winget$2: function(id, props) {
        var t1, keysFound, control, keys, dispatch, t2, t3, key, win, idx, oldprops, _i, fe, f, subprops, t4, t5;
        if (typeof props === "string") {
          t1 = P.LinkedHashMap__makeLiteral([props, ""]);
          t1 = P._wrapToDart(P.JsObject__convertDataTree(t1));
          this.winget$2(id, t1);
          keysFound = P.List_List$from(N.ByondJS_keys(t1), true, null);
          return keysFound.length !== 1 && J.$eq$(keysFound[0], props) ? t1 : t1.$index(0, props);
        }
        t1 = J.getInterceptor(props);
        if (!t1.$isJsObject)
          return P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
        control = this.find$1(0, id);
        keys = N.ByondJS_keys(props);
        if (id == null || id === "") {
          dispatch = P.LinkedHashMap__makeEmpty();
          for (t2 = J.get$iterator$ax(keys.__internal$_iterable), t3 = new H.WhereIterator(t2, keys._f, [H.getTypeArgumentByIndex(keys, 0)]), key = null, win = null; t3.moveNext$0();) {
            key = t2.get$current();
            idx = J.getInterceptor$asx(key).lastIndexOf$1(key, ".");
            if (idx >= 0) {
              win = C.JSString_methods.substring$2(key, 0, idx);
              if (dispatch.$index(0, win) == null)
                dispatch.$indexSet(0, win, P.JsObject_JsObject($.$get$context().$index(0, "Object"), null));
              J.$indexSet$ax(dispatch.$index(0, win), C.JSString_methods.substring$1(key, idx + 1), t1.$index(props, key));
            }
          }
          oldprops = P.List_List$from(keys, true, null);
          for (t2 = oldprops.length, t3 = props._jsObject, _i = 0; _i < oldprops.length; oldprops.length === t2 || (0, H.throwConcurrentModificationError)(oldprops), ++_i) {
            key = oldprops[_i];
            if (key === "focus") {
              fe = document.activeElement;
              f = this.find$1(0, fe);
              if (f == null && fe != null)
                f = this.controlParent$1(fe);
              t1.$indexSet(props, key, f != null ? J.$index$asx(f, "fullid") : "");
            } else if (key === "macro" || key === "macros")
              t1.$indexSet(props, key, this.macroSets.get$keys().join$1(0, ";"));
            else if (key === "sound")
              t1.$indexSet(props, key, C.JSBool_methods.toString$0($.me._enableSound));
            else if (key === "music")
              t1.$indexSet(props, key, C.JSBool_methods.toString$0($.me._enableMusic));
            else if (key === "hwmode")
              t1.$indexSet(props, key, "true");
            else {
              if (typeof key !== "string" && true)
                H.throwExpression(P.ArgumentError$("property is not a String or num"));
              delete t3[key];
            }
          }
          for (t2 = dispatch.get$keys(), t2 = t2.get$iterator(t2); t2.moveNext$0();) {
            id = t2.get$current();
            subprops = dispatch.$index(0, id);
            this.winget$2(id, subprops);
            for (t3 = N.ByondJS_keys(subprops), t4 = J.get$iterator$ax(t3.__internal$_iterable), t3 = new H.WhereIterator(t4, t3._f, [H.getTypeArgumentByIndex(t3, 0)]), t5 = J.getInterceptor$asx(subprops); t3.moveNext$0();) {
              key = t4.get$current();
              t1.$indexSet(props, C.JSString_methods.$add(id + ".", key), t5.$index(subprops, key));
            }
          }
          return props;
        }
        if (control == null)
          return props;
        if (typeof id === "string") {
          idx = C.JSString_methods.indexOf$2(id, ":", 1);
          t1 = idx > 0;
        } else {
          idx = null;
          t1 = false;
        }
        control.callMethod$2("winget", [props, t1 ? J.substring$1$s(id, idx + 1) : ""]);
        return props;
      },
      stats$2: function(panels, verbs) {
        var exception;
        try {
          J.$index$asx($.$get$context().$index(0, "byond"), "skin").callMethod$2("stats", [panels, verbs]);
        } catch (exception) {
          H.unwrapException(exception);
        }
      },
      status$1: function(_, obj) {
        var exception;
        try {
          J.$index$asx($.$get$context().$index(0, "byond"), "skin").callMethod$2("status", [obj]);
        } catch (exception) {
          H.unwrapException(exception);
        }
      },
      setMacros$1: function(sets) {
        var t1, pname, set, t2, $name;
        this.macroSets = P.LinkedHashMap__makeEmpty();
        for (t1 = sets.get$keys(), t1 = t1.get$iterator(t1); t1.moveNext$0();) {
          pname = t1.get$current();
          this.macroSets.$indexSet(0, pname, sets.$index(0, pname));
        }
        t1 = $.me.macro;
        t1._keyToMacro.clear$0(0);
        t1._oldstyles.clear$0(0);
        set = this.macroSets.$index(0, this.macro);
        if (set == null && this.macroSets.$index(0, "macro") != null) {
          t1 = this.macroSets;
          this.macro = "macro";
          set = t1.$index(0, "macro");
        }
        if (set != null) {
          for (t1 = N.ByondJS_keys(set), t2 = J.get$iterator$ax(t1.__internal$_iterable), t1 = new H.WhereIterator(t2, t1._f, [H.getTypeArgumentByIndex(t1, 0)]); t1.moveNext$0();) {
            $name = t2.get$current();
            $.me.macro.insert$3(0, $name, J.$index$asx(set.$index(0, $name), "command"), J.$index$asx(set.$index(0, $name), "mapTo"));
          }
          this.macrosChanged$0();
        }
      },
      macrosChanged$0: function() {
        var ctrl, _, cl, t1, _i, exception, t2, line;
        cl = P.List_List$from(this.controls, true, null);
        for (t1 = cl.length, _i = 0; _i < cl.length; cl.length === t1 || (0, H.throwConcurrentModificationError)(cl), ++_i) {
          ctrl = cl[_i];
          try {
            if (J.$index$asx(ctrl, "macrosChanged") instanceof P.JsFunction)
              ctrl.callMethod$1("macrosChanged");
          } catch (exception) {
            t2 = H.unwrapException(exception);
            _ = t2;
            line = H.S(_);
            t2 = $.printToZone;
            if (t2 == null)
              H.printString(line);
            else
              t2.call$1(line);
          }
        }
      },
      doInput$1: function(str) {
        var exception;
        try {
          J.$index$asx(J.$index$asx($.$get$context().$index(0, "byond"), "fn"), "input").apply$1([str]);
        } catch (exception) {
          H.unwrapException(exception);
        }
      },
      whichPrompt$1: function(params) {
        var t;
        if (params == null)
          return "text";
        t = params.$index(0, "type");
        if (t != null && t !== "" && this.prompts.$index(0, this.sanitizeClass$1(t)) != null)
          return t;
        if (N.ByondJS_toBool(params.$index(0, "alert"), false))
          return "alert";
        if (params.$index(0, "choices") instanceof P.JsArray && J.get$length$asx(params.$index(0, "choices")) !== 0)
          return "any";
        return "text";
      },
      parseParams$3: function(str, recurse, mode) {
        var t1, params, len, t2, t3, t4, t5, t6, t7, t8, t9, t10, condition, x, i, $name, invert;
        t1 = {};
        params = [];
        if (str == null)
          return [];
        t1.i = 0;
        len = str.length;
        t2 = recurse != null;
        if (t2)
          t1.i = recurse[0];
        t1.m = null;
        t3 = new N.ByondSkin_parseParams_skipSpace(t1, str, len);
        t4 = new N.ByondSkin_parseParams_parseString(t1, str, len, t3);
        t5 = new N.ByondSkin_parseParams_skipToNextParam(t1, str, recurse, len, t3, t4);
        t6 = new N.ByondSkin_parseParams_parseName(t1, str, t3, t5);
        t4 = new N.ByondSkin_parseParams_parseValue(t1, str, len, t3, t4, t5);
        for (t7 = mode === false, t8 = mode === true; t9 = t1.i, t9 < len;) {
          t10 = str[t9];
          if (t10 === "?") {
            t1.i = t9 + 1;
            t3.call$0();
            if (params.length === 0)
              continue;
            condition = C.JSArray_methods.get$last(params);
            x = [t1.i];
            condition.iftrue = this.parseParams$3(str, x, true);
            i = x[0];
            t1.i = i;
            if (i < len && str[i] === ":") {
              t1.i = i + 1;
              t3.call$0();
              x[0] = t1.i;
              condition.iffalse = this.parseParams$3(str, x, false);
              t1.i = x[0];
            }
            continue;
          }
          if (t2) {
            if (t8 && t10 === ":")
              break;
            if (t7)
              t10 = t10 === ";" || t10 === "&";
            else
              t10 = false;
            if (t10) {
              t1.i = t9 + 1;
              t3.call$0();
              break;
            }
            t3.call$0();
          }
          while (true) {
            t9 = t1.i;
            if (t9 < len) {
              t10 = str[t9];
              t10 = t10 === ";" || t10 === "&";
            } else
              t10 = false;
            if (!t10)
              break;
            t1.i = t9 + 1;
            t3.call$0();
          }
          if (t9 >= len)
            break;
          $name = t6.call$0();
          if ($name == null)
            continue;
          t3.call$0();
          t9 = t1.i;
          if (t9 >= len)
            break;
          t10 = str[t9];
          if (t10 === ":" || t10 === "=") {
            t1.i = t9 + 1;
            invert = false;
          } else {
            if (C.JSString_methods.matchAsPrefix$2("!=", str, t9) != null)
              t1.i += 2;
            else {
              t5.call$0();
              continue;
            }
            invert = true;
          }
          params.push(new N.SkinParam($name, t4.call$0(), invert, null, null));
        }
        if (t2)
          recurse[0] = t1.i;
        return params;
      },
      parseParams$1: function(str) {
        return this.parseParams$3(str, null, null);
      },
      poll$0: function() {
        var ctrl, _, i, t1, exception, line, t2;
        ctrl = null;
        for (i = 0; t1 = this._pollable, i < t1.length; i = (t1 ? i - 1 : i) + 1) {
          ctrl = t1[i];
          try {
            ctrl.callMethod$1("poll");
          } catch (exception) {
            t1 = H.unwrapException(exception);
            _ = t1;
            line = H.S(_);
            t1 = $.printToZone;
            if (t1 == null)
              H.printString(line);
            else
              t1.call$1(line);
          }
          t1 = this._pollable;
          if (i < t1.length) {
            t2 = ctrl;
            t1 = t1[i];
            t1 = !(t2.get$_jsObject() === t1._jsObject);
          } else
            t1 = false;
        }
      },
      setPoll$2: function(item, b) {
        C.JSArray_methods.remove$1(this._pollable, item);
        if (b)
          this._pollable.push(item);
      },
      get$methods: function() {
        return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["find", new N.ByondSkin_methods_closure(this), "findAll", new N.ByondSkin_methods_closure0(this), "remove", new N.ByondSkin_methods_closure1(this), "attach", new N.ByondSkin_methods_closure2(this), "prompt", new N.ByondSkin_methods_closure3(this), "popup", new N.ByondSkin_methods_closure4(this), "getClass", new N.ByondSkin_methods_closure5(this), "getPrompt", new N.ByondSkin_methods_closure6(this), "createPrompt", new N.ByondSkin_methods_closure7(this), "dispatchKeyEvent", new N.ByondSkin_methods_closure8(this), "availableName", new N.ByondSkin_methods_closure9(), "top", new N.ByondSkin_methods_closure10(), "output", new N.ByondSkin_methods_closure11(this), "clear", new N.ByondSkin_methods_closure12(this), "winset", new N.ByondSkin_methods_closure13(this), "winget", new N.ByondSkin_methods_closure14(this), "stats", new N.ByondSkin_methods_closure15(this), "status", new N.ByondSkin_methods_closure16(this)]));
      }
    },
    ByondSkin_attach_closure: {
      "^": "Closure:20;",
      call$1: function(sp) {
        return sp.name;
      }
    },
    ByondSkin_attach_closure0: {
      "^": "Closure:20;",
      call$1: function(sp) {
        return sp.value;
      }
    },
    ByondSkin_findAll_closure: {
      "^": "Closure:0;",
      call$1: function(m) {
        if (m.$index(0, 0) === "*")
          return ".*";
        return C.JSString_methods.$add("\\", m.$index(0, 0));
      }
    },
    ByondSkin_load_closure: {
      "^": "Closure:28;$this",
      call$1: [function(e) {
        return this.$this.keyEvent$4(e, null, null, true);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure0: {
      "^": "Closure:28;$this",
      call$1: [function(e) {
        return this.$this.keyEvent$4(e, null, null, true);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure1: {
      "^": "Closure:17;$this",
      call$1: [function(e) {
        return this.$this.mouseEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure2: {
      "^": "Closure:17;$this",
      call$1: [function(e) {
        return this.$this.mouseEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure3: {
      "^": "Closure:17;$this",
      call$1: [function(e) {
        return this.$this.mouseEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure4: {
      "^": "Closure:8;$this",
      call$1: [function(e) {
        return this.$this.touchEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure5: {
      "^": "Closure:8;$this",
      call$1: [function(e) {
        return this.$this.touchEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure6: {
      "^": "Closure:8;$this",
      call$1: [function(e) {
        return this.$this.touchEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure7: {
      "^": "Closure:8;$this",
      call$1: [function(e) {
        return this.$this.touchEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure8: {
      "^": "Closure:8;$this",
      call$1: [function(e) {
        return this.$this.touchEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure9: {
      "^": "Closure:10;$this",
      call$1: [function(e) {
        return this.$this.onblur$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure10: {
      "^": "Closure:10;$this",
      call$1: [function(e) {
        if (this.$this.mouseCapture != null) {
          e.preventDefault();
          e.stopPropagation();
          e.stopImmediatePropagation();
        }
        return;
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure11: {
      "^": "Closure:10;$this",
      call$1: [function(e) {
        return this.$this.onunload$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_load_closure12: {
      "^": "Closure:10;$this",
      call$1: [function(e) {
        return this.$this.onskinsize$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_activateDragSurface_closure: {
      "^": "Closure:0;$this",
      call$1: [function(e) {
        return this.$this.mouseEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_activateDragSurface_closure0: {
      "^": "Closure:0;$this",
      call$1: [function(e) {
        return this.$this.mouseEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_activateDragSurface_closure1: {
      "^": "Closure:0;$this",
      call$1: [function(e) {
        return this.$this.mouseEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_activateDragSurface_closure2: {
      "^": "Closure:0;$this",
      call$1: [function(e) {
        return this.$this.mouseEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_activateDragSurface_closure3: {
      "^": "Closure:0;$this",
      call$1: [function(e) {
        return this.$this.mouseEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_activateDragSurface_closure4: {
      "^": "Closure:8;$this",
      call$1: [function(e) {
        return this.$this.touchEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_activateDragSurface_closure5: {
      "^": "Closure:8;$this",
      call$1: [function(e) {
        return this.$this.touchEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_activateDragSurface_closure6: {
      "^": "Closure:8;$this",
      call$1: [function(e) {
        return this.$this.touchEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_activateDragSurface_closure7: {
      "^": "Closure:8;$this",
      call$1: [function(e) {
        return this.$this.touchEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_activateDragSurface_closure8: {
      "^": "Closure:8;$this",
      call$1: [function(e) {
        return this.$this.touchEvent$1(e);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondSkin_parseParams_skipSpace: {
      "^": "Closure:3;_box_0,str,len",
      call$0: function() {
        var t1, t2, t3, t4;
        t1 = this._box_0;
        t2 = this.len;
        t3 = this.str;
        while (true) {
          t4 = t1.i;
          if (!(t4 < t2 && C.JSString_methods.trim$0(t3[t4]).length === 0))
            break;
          t1.i = t4 + 1;
        }
      }
    },
    ByondSkin_parseParams_parseString: {
      "^": "Closure:12;_box_0,str,len,skipSpace",
      call$0: function() {
        var t1, t2, t3, i, delim, t4, out, ch, i0;
        t1 = this.str;
        t2 = this._box_0;
        t3 = t2.i;
        i = t3 + 1;
        t2.i = i;
        delim = t1[t3];
        for (t3 = this.len, t4 = i, out = ""; t4 < t3;) {
          ch = t1[t4];
          if (ch === delim) {
            t2.i = t4 + 1;
            break;
          }
          if (ch === "\\") {
            i = t4 + 1;
            t2.i = i;
            if (i >= t3)
              break;
            i0 = i + 1;
            t2.i = i0;
            ch = t1[i];
            if (ch === "n")
              ch = "\n";
            else if (ch === "t")
              ch = "\t";
            out += ch;
            t4 = i0;
          } else {
            out += ch;
            i = t4 + 1;
            t2.i = i;
            t4 = i;
          }
        }
        this.skipSpace.call$0();
        return out;
      }
    },
    ByondSkin_parseParams_skipToNextParam: {
      "^": "Closure:12;_box_0,str,recurse,len,skipSpace,parseString",
      call$0: function() {
        var t1, start, t2, t3, ch, t4, t5, t6, i, t7, m, end;
        t1 = this._box_0;
        start = t1.i;
        t2 = this.len;
        if (start < t2) {
          t3 = this.str;
          ch = t3[start];
          if (ch === "'" || ch === '"')
            this.parseString.call$0();
          else
            for (t4 = this.recurse != null, t5 = t3.length, t6 = start; t6 < t2;) {
              ch = t3[t6];
              if (ch === "\\") {
                i = t6 + 1;
                t1.i = i;
                if (i < t2) {
                  ++i;
                  t1.i = i;
                  t6 = i;
                } else
                  t6 = i;
                continue;
              } else if (ch === ":") {
                if (t4)
                  break;
                i = t6 + 1;
                t1.i = i;
                t6 = i;
                continue;
              } else if (ch === " " && t4)
                return C.JSString_methods.substring$2(t3, start, t6);
              t7 = $.$get$ByondSkin__paramVal();
              t7.toString;
              if (t6 < 0 || t6 > t5)
                H.throwExpression(P.RangeError$range(t6, 0, t5, null, null));
              m = t7._execAnchored$2(t3, t6);
              t1.m = m;
              if (m != null) {
                i = t1.i + m._match[0].length;
                t1.i = i;
              } else
                break;
              t6 = i;
            }
        }
        end = t1.i;
        this.skipSpace.call$0();
        return C.JSString_methods.substring$2(this.str, start, end);
      }
    },
    ByondSkin_parseParams_parseName: {
      "^": "Closure:12;_box_0,str,skipSpace,skipToNextParam",
      call$0: function() {
        var t1, m, t2, t3;
        this.skipSpace.call$0();
        t1 = this._box_0;
        m = $.$get$ByondSkin__paramId().matchAsPrefix$2(0, this.str, t1.i);
        t1.m = m;
        if (m == null) {
          this.skipToNextParam.call$0();
          return;
        }
        t2 = t1.i;
        t3 = m._match[0];
        t1.i = t2 + t3.length;
        return N.ByondJS_toCamel(t3);
      }
    },
    ByondSkin_parseParams_parseValue: {
      "^": "Closure:74;_box_0,str,len,skipSpace,parseString,skipToNextParam",
      call$0: function() {
        var t1, s, n, idx, t2, ch;
        this.skipSpace.call$0();
        t1 = this._box_0.i;
        if (t1 >= this.len)
          return "";
        t1 = this.str[t1];
        if (t1 === "'" || t1 === '"') {
          s = this.parseString.call$0();
          this.skipToNextParam.call$0();
          return s;
        }
        s = J.trim$0$s(this.skipToNextParam.call$0());
        if (s === "true")
          return true;
        if (s === "false")
          return false;
        n = H.Primitives_parseDouble(s, new N.ByondSkin_parseParams_parseValue_closure());
        if (typeof n === "number" && !isNaN(n))
          return n;
        idx = J.indexOf$1$asx(s, "\\");
        while (true) {
          if (!(idx >= 0 && idx + 1 < J.get$length$asx(s)))
            break;
          t1 = idx + 1;
          t2 = J.getInterceptor$asx(s);
          ch = t2.$index(s, t1);
          if (ch === "n")
            ch = "\n";
          else if (ch === "t")
            ch = "\t";
          s = t2.substring$2(s, 0, idx) + ch + t2.substring$1(s, idx + 2);
          idx = C.JSString_methods.indexOf$2(s, "\\", t1);
        }
        return s;
      }
    },
    ByondSkin_parseParams_parseValue_closure: {
      "^": "Closure:0;",
      call$1: function(_) {
        return;
      }
    },
    ByondSkin_methods_closure: {
      "^": "Closure:6;$this",
      call$2: [function(a, b) {
        return this.$this.find$2(0, a, b);
      }, function(a) {
        return this.call$2(a, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 0, 4, "call"]
    },
    ByondSkin_methods_closure0: {
      "^": "Closure:6;$this",
      call$2: [function(a, b) {
        return this.$this.findAll$2(a, b);
      }, function(a) {
        return this.call$2(a, null);
      }, "call$1", null, null, null, 2, 2, null, 2, 0, 4, "call"]
    },
    ByondSkin_methods_closure1: {
      "^": "Closure:0;$this",
      call$1: [function(a) {
        return this.$this.remove$1(0, a);
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondSkin_methods_closure2: {
      "^": "Closure:2;$this",
      call$2: [function(a, b) {
        return this.$this.attach$2(a, b);
      }, null, null, 4, 0, null, 0, 4, "call"]
    },
    ByondSkin_methods_closure3: {
      "^": "Closure:0;$this",
      call$1: [function(p) {
        return this.$this.createPrompt$1(p);
      }, null, null, 2, 0, null, 84, "call"]
    },
    ByondSkin_methods_closure4: {
      "^": "Closure:5;$this",
      call$3: [function(a, b, o) {
        return this.$this.popup$3(a, b, o);
      }, function(a, b) {
        return this.call$3(a, b, null);
      }, "call$2", null, null, null, 4, 2, null, 2, 0, 4, 11, "call"]
    },
    ByondSkin_methods_closure5: {
      "^": "Closure:0;$this",
      call$1: [function(a) {
        var t1 = this.$this;
        return t1.classes.$index(0, t1.sanitizeClass$1(a));
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondSkin_methods_closure6: {
      "^": "Closure:0;$this",
      call$1: [function(a) {
        var t1 = this.$this;
        return t1.prompts.$index(0, t1.sanitizeClass$1(a));
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondSkin_methods_closure7: {
      "^": "Closure:0;$this",
      call$1: [function(a) {
        return this.$this.createPrompt$1(a);
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondSkin_methods_closure8: {
      "^": "Closure:75;$this",
      call$3: [function(e, a, b) {
        return this.$this.keyEvent$3(e, a, b);
      }, function(e) {
        return this.call$3(e, null, null);
      }, "call$1", function(e, a) {
        return this.call$3(e, a, null);
      }, "call$2", null, null, null, null, 2, 4, null, 2, 2, 3, 0, 4, "call"]
    },
    ByondSkin_methods_closure9: {
      "^": "Closure:0;",
      call$1: [function(a) {
        return N.ByondJS_availableName(a);
      }, null, null, 2, 0, null, 0, "call"]
    },
    ByondSkin_methods_closure10: {
      "^": "Closure:1;",
      call$0: [function() {
        var t1, div;
        t1 = document;
        div = t1.querySelector("#skin");
        if (div != null)
          return div;
        return t1.body;
      }, null, null, 0, 0, null, "call"]
    },
    ByondSkin_methods_closure11: {
      "^": "Closure:2;$this",
      call$2: [function(id, o) {
        return this.$this.output$2(id, o);
      }, null, null, 4, 0, null, 10, 11, "call"]
    },
    ByondSkin_methods_closure12: {
      "^": "Closure:0;$this",
      call$1: [function(id) {
        return this.$this.output$2(id, P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["null", true])));
      }, null, null, 2, 0, null, 10, "call"]
    },
    ByondSkin_methods_closure13: {
      "^": "Closure:2;$this",
      call$2: [function(id, o) {
        return this.$this.winset$2(id, o);
      }, null, null, 4, 0, null, 10, 11, "call"]
    },
    ByondSkin_methods_closure14: {
      "^": "Closure:2;$this",
      call$2: [function(id, o) {
        return this.$this.winget$2(id, o);
      }, null, null, 4, 0, null, 10, 11, "call"]
    },
    ByondSkin_methods_closure15: {
      "^": "Closure:76;$this",
      call$2: [function(a, b) {
        var control = this.$this.find$1(0, ":info");
        if (control != null)
          control.callMethod$2("stats", [a, b]);
      }, function(a) {
        return this.call$2(a, null);
      }, "call$1", function() {
        return this.call$2(null, null);
      }, "call$0", null, null, null, null, 0, 4, null, 2, 2, 0, 4, "call"]
    },
    ByondSkin_methods_closure16: {
      "^": "Closure:0;$this",
      call$1: [function(o) {
        return this.$this.output$2(":status", o);
      }, null, null, 2, 0, null, 11, "call"]
    },
    ByondLightbox: {
      "^": "Object;_container,_background,_box,_ctrl,_resizeEvent,_clickoffEvent",
      create$2: function(box, params) {
        var t1, lb, color, opacity, lb_styles, t2, delay, exception, t3, lb_styles0, t4;
        t1 = {};
        t1.params = params;
        if (box != null) {
          t2 = this._box;
          t2 = box == null ? t2 == null : box === t2;
        } else
          t2 = true;
        if (t2)
          return;
        if (!(params instanceof P.JsObject)) {
          params = P.JsObject_JsObject($.$get$context().$index(0, "Object"), null);
          t1.params = params;
          t2 = params;
        } else
          t2 = params;
        delay = N.ByondJS_toNum(t2.$index(0, "delay"), false);
        if (delay > 0) {
          params = N.ByondJS_extend(P.JsObject_JsObject($.$get$context().$index(0, "Object"), null), t2);
          t1.params = params;
          params.deleteProperty$1("delay");
          N.ByondJS_backstage().appendChild(box);
          try {
            t2 = box.style;
            t2.position = "absolute";
          } catch (exception) {
            H.unwrapException(exception);
          }
          P.Future_Future$delayed(P.Duration$(0, 0, 0, delay, 0, 0), new N.ByondLightbox_create_closure(t1, this, box), null);
          return;
        }
        this.close$0(0);
        if (this._container == null) {
          t1 = W._ElementFactoryProvider_createElement_tag("div", null);
          this._container = t1;
          t1.className = "byond_lightbox_container";
          t3 = t1.style;
          t3.position = "fixed";
          t3 = t1.style;
          t3.left = "0";
          t3 = t1.style;
          t3.top = "0";
          t3 = t1.style;
          t3.width = "100%";
          t1 = t1.style;
          t1.height = "100%";
        }
        if (this._background == null) {
          t1 = W._ElementFactoryProvider_createElement_tag("div", null);
          this._background = t1;
          t1.className = "byond_lightbox_background";
          t3 = t1.style;
          t3.position = "absolute";
          t3 = t1.style;
          t3.left = "0";
          t3 = t1.style;
          t3.top = "0";
          t3 = t1.style;
          t3.width = "100%";
          t1 = t1.style;
          t1.height = "100%";
        }
        t1 = $.$get$context();
        lb = J.$index$asx(t1.$index(0, "byond"), "lightbox");
        color = null;
        opacity = null;
        lb_styles = null;
        try {
          lb_styles = J.$index$asx(lb, "styles");
        } catch (exception) {
          H.unwrapException(exception);
        }
        if (!(lb_styles instanceof P.JsObject)) {
          lb_styles0 = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["color", "black", "opacity", 0.5]));
          lb_styles = lb_styles0;
          J.$indexSet$ax(lb, "styles", lb_styles0);
        }
        if (t2.$index(0, "color") != null)
          color = t2.$index(0, "color");
        else if (J.$index$asx(lb_styles, "color") != null)
          color = J.$index$asx(lb_styles, "color");
        else
          color = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["color", "black", "opacity", 0.5])).$index(0, "color");
        if (t2.$index(0, "opacity") != null)
          opacity = J.clamp$2$n(N.ByondJS_toNum(J.$index$asx(lb_styles, "opacity"), false), 0, 1);
        else if (J.$index$asx(lb_styles, "opacity") != null)
          opacity = J.clamp$2$n(N.ByondJS_toNum(J.$index$asx(lb_styles, "opacity"), false), 0, 1);
        else
          opacity = P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["color", "black", "opacity", 0.5])).$index(0, "opacity");
        try {
          t3 = this._background.style;
          t4 = color;
          t3.toString;
          t3.backgroundColor = t4 == null ? "" : t4;
        } catch (exception) {
          H.unwrapException(exception);
        }
        try {
          t3 = this._background.style;
          (t3 && C.CssStyleDeclaration_methods).setProperty$3(t3, "opacity", H.S(opacity), "");
        } catch (exception) {
          H.unwrapException(exception);
        }
        N.ByondJS_stage().appendChild(this._container);
        this._container.appendChild(this._background);
        this._box = box;
        t1 = N.ByondJS_extend(P.JsObject_JsObject(t1.$index(0, "Object"), null), t2);
        this._ctrl = t1;
        J.$indexSet$ax(lb, "ctrl", t1);
        this._ctrl.$indexSet(0, "box", box);
        J.$indexSet$ax(lb, "box", box);
        N.ByondJS_backstage().appendChild(box);
        try {
          t1 = box.style;
          t1.position = "absolute";
        } catch (exception) {
          H.unwrapException(exception);
        }
        if (C.JSNumber_methods.round$0(box.offsetWidth) <= 0 || C.JSNumber_methods.round$0(box.offsetHeight) <= 0) {
          try {
            t1 = box.style;
            t1.minWidth = "300px";
            t1 = box.style;
            t1.minHeight = "100px";
          } catch (exception) {
            H.unwrapException(exception);
          }
          P.Future_Future$delayed(P.Duration$(0, 0, 0, 50, 0, 0), new N.ByondLightbox_create_closure0(this), null);
        }
        this.resize$0(0);
        t1 = J.getInterceptor$x(box);
        t1.get$classes(box).add$1(0, "byond_boxbk");
        this._container.appendChild(box);
        document.body.appendChild(this._container);
        t2 = new N.ByondLightbox_create_closure1(this);
        this._resizeEvent = t2;
        t3 = window;
        C.Window_methods._addEventListener$3(t3, "resize", t2, null);
        t2 = new N.ByondLightbox_create_closure2(this);
        this._clickoffEvent = t2;
        t3 = this._background;
        J._addEventListener$3$x(t3, "click", t2, null);
        try {
          box.setAttribute("tabindex", "-1");
          t1.focus$0(box);
        } catch (exception) {
          H.unwrapException(exception);
        }
      },
      close$1: function(_, toclose) {
        var fn, _0, t1, t2, exception, control, lb;
        t1 = this._box;
        if (t1 != null)
          t2 = (t1 == null ? toclose != null : t1 !== toclose) && toclose != null;
        else
          t2 = true;
        if (t2)
          return;
        this._box = null;
        try {
          fn = this._ctrl.$index(0, "onclose");
          if (fn instanceof P.JsFunction)
            this._ctrl.callMethod$1("onclose");
          else if (!!J.getInterceptor(fn).$isFunction)
            fn.call$0();
        } catch (exception) {
          t2 = H.unwrapException(exception);
          _0 = t2;
          P.print(_0);
        }
        N.ByondJS_stage().appendChild(this._container);
        control = $.$get$ByondJS_skin().find$1(0, t1);
        if (control != null && !J.$eq$(control.$index(0, "isRuntime"), true))
          N.ByondJS_backstage().appendChild(t1);
        else
          J.remove$0$ax(t1);
        lb = J.$index$asx($.$get$context().$index(0, "byond"), "lightbox");
        lb.deleteProperty$1("box");
        lb.deleteProperty$1("ctrl");
        try {
          t1 = window;
          t2 = this._resizeEvent;
          if (t2 != null)
            C.Window_methods._removeEventListener$3(t1, "resize", t2, null);
        } catch (exception) {
          H.unwrapException(exception);
        }
        try {
          t1 = this._background;
          t2 = this._clickoffEvent;
          t1.toString;
          if (t2 != null)
            J._removeEventListener$3$x(t1, "click", t2, null);
        } catch (exception) {
          H.unwrapException(exception);
        }
        this._ctrl = null;
      },
      close$0: function($receiver) {
        return this.close$1($receiver, null);
      },
      resize$0: function(_) {
        var t1, t2;
        t1 = this._container;
        if (t1 != null) {
          t1 = t1.style;
          t2 = H.S(window.innerWidth) + "px";
          t1.width = t2;
          t1 = this._container.style;
          t2 = H.S(window.innerHeight) + "px";
          t1.height = t2;
        }
        t1 = this._box;
        if (t1 != null) {
          t2 = t1.style;
          t1 = H.S(P.max(0, (window.innerWidth - C.JSNumber_methods.round$0(t1.offsetWidth)) / 2)) + "px";
          t2.left = t1;
          t1 = this._box;
          t2 = t1.style;
          t1 = H.S(P.max(0, (window.innerHeight - C.JSNumber_methods.round$0(t1.offsetHeight)) / 2)) + "px";
          t2.top = t1;
        }
      },
      clickoff$0: function() {
        var fn, _, exception, t1;
        if (this._box == null || this._ctrl == null)
          return;
        try {
          fn = this._ctrl.$index(0, "onclickoff");
          if (fn instanceof P.JsFunction) {
            if (!J.$eq$(this._ctrl.callMethod$1("onclickoff"), true))
              this.close$0(0);
          } else if (!!J.getInterceptor(fn).$isFunction) {
            if (!J.$eq$(fn.call$0(), true))
              this.close$0(0);
          } else
            this.close$0(0);
        } catch (exception) {
          t1 = H.unwrapException(exception);
          _ = t1;
          P.print(_);
        }
      }
    },
    ByondLightbox_create_closure: {
      "^": "Closure:1;_box_0,$this,box",
      call$0: function() {
        return this.$this.create$2(this.box, this._box_0.params);
      }
    },
    ByondLightbox_create_closure0: {
      "^": "Closure:1;$this",
      call$0: function() {
        return this.$this.resize$0(0);
      }
    },
    ByondLightbox_create_closure1: {
      "^": "Closure:0;$this",
      call$1: [function(e) {
        return this.$this.resize$0(0);
      }, null, null, 2, 0, null, 3, "call"]
    },
    ByondLightbox_create_closure2: {
      "^": "Closure:0;$this",
      call$1: [function(e) {
        return this.$this.clickoff$0();
      }, null, null, 2, 0, null, 3, "call"]
    },
    SoundList: {
      "^": "Object;_list",
      add$3: function(_, type, snd, flags) {
        var t1, t2, _i, t3, soundInfo, elem, elem0;
        if ((flags & 16) !== 0 && snd.channel !== 0) {
          for (t1 = P.List_List$from(this._list, true, null), t2 = t1.length, _i = 0; t3 = t1.length, _i < t3; t3 === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
            soundInfo = t1[_i];
            if (soundInfo.channel === snd.channel) {
              soundInfo.update$2(snd, flags);
              break;
            }
          }
          return;
        }
        if (snd.url == null) {
          this.stop$1(0, snd.channel);
          return;
        }
        if (type === ".mid" || type === ".midi") {
          if (!$.me._enableMusic)
            return;
          soundInfo = new N.MidiInfo(null, null, false, 0, false, 255, 0, false, 0, 0, 1, 0, 0, 0, 1, null, null, new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [null]), [null]));
          soundInfo.SoundInfo$from$1(snd);
          soundInfo.player = P.JsObject_JsObject($.$get$context().$index(0, "MiditunePlayer"), []);
          soundInfo._isMusic = true;
        } else if (type === ".mp3" || type === ".mp4" || type === ".ogg" || type === ".ac3" || type === ".wav") {
          if (!$.me._enableSound)
            return;
          soundInfo = new N.WavInfo(null, null, null, null, 0, false, false, null, false, 0, false, 255, 0, false, 0, 0, 1, 0, 0, 0, 1, null, null, new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [null]), [null]));
          soundInfo.SoundInfo$from$1(snd);
        } else {
          if (!$.me._enableMusic)
            return;
          soundInfo = new N.ModInfo(null, null, false, 0, false, 255, 0, false, 0, 0, 1, 0, 0, 0, 1, null, null, new P._AsyncCompleter(new P._Future(0, $.Zone__current, null, [null]), [null]));
          soundInfo.SoundInfo$from$1(snd);
          soundInfo.player = P.JsObject_JsObject($.$get$context().$index(0, "ChiptunePlayer"), []);
          soundInfo._isMusic = true;
        }
        t1 = snd.channel;
        if (t1 !== 0)
          if (snd.wait)
            for (t1 = this._list, t2 = t1.length, _i = 0; t3 = t1.length, _i < t3; t3 === t2 || (0, H.throwConcurrentModificationError)(t1), ++_i) {
              elem = t1[_i];
              if (elem.channel === snd.channel) {
                for (; elem0 = elem.next, elem0 != null; elem = elem0)
                  ;
                if (!elem.repeat)
                  elem.next = soundInfo;
                return;
              }
            }
          else
            this.stop$1(0, t1);
        this._list.push(soundInfo);
        this.play$1(0, soundInfo);
      },
      play$1: function(_, soundInfo) {
        var future = soundInfo.play$0(0);
        if (future != null)
          future.then$1(new N.SoundList_play_closure(this, soundInfo));
      },
      stop$1: function(_, channel) {
        var t1, t2, t3, t4, _i, soundInfo;
        for (t1 = this._list, t2 = P.List_List$from(t1, true, null), t3 = t2.length, t4 = channel !== 0, _i = 0; _i < t2.length; t2.length === t3 || (0, H.throwConcurrentModificationError)(t2), ++_i) {
          soundInfo = t2[_i];
          if (!t4 || soundInfo.channel === channel) {
            soundInfo.stop$0(0);
            C.JSArray_methods.remove$1(t1, soundInfo);
          }
        }
      },
      stop$0: function($receiver) {
        return this.stop$1($receiver, 0);
      },
      stopMusic$0: function() {
        var t1, t2, t3, _i, soundInfo;
        for (t1 = this._list, t2 = P.List_List$from(t1, true, null), t3 = t2.length, _i = 0; _i < t2.length; t2.length === t3 || (0, H.throwConcurrentModificationError)(t2), ++_i) {
          soundInfo = t2[_i];
          if (soundInfo._isMusic) {
            soundInfo.stop$0(0);
            C.JSArray_methods.remove$1(t1, soundInfo);
          }
        }
      }
    },
    SoundList_play_closure: {
      "^": "Closure:0;$this,soundInfo",
      call$1: [function(_) {
        var t1, t2, t3, next;
        t1 = this.$this;
        t2 = t1._list;
        t3 = this.soundInfo;
        if (C.JSArray_methods.contains$1(t2, t3)) {
          next = t3.next;
          if (next != null) {
            t2.push(next);
            t1.play$1(0, next);
          }
          C.JSArray_methods.remove$1(t2, t3);
        }
      }, null, null, 2, 0, null, 5, "call"]
    },
    WavInfo: {
      "^": "SoundInfo;_sound,transform,soundChannel,timer,duration,cancelled,paused,url,_isMusic,channel,repeat,volume,pan,wait,priority,status,frequency,x,y,z,falloff,fallback,next,completer",
      play$0: function(_) {
        var t1 = this.get$supportedUrl();
        this.url = t1;
        E.Sound_load(t1, null).then$1(new N.WavInfo_play_closure(this)).catchError$1(new N.WavInfo_play_closure0());
        return this.completer.future;
      },
      stop$0: function(_) {
        var t1 = this.timer;
        if (t1 != null) {
          t1.cancel$0();
          this.timer = null;
        }
        t1 = this.soundChannel;
        if (t1 != null)
          t1.stop$0(0);
        else
          this.cancelled = true;
      },
      update$2: function(snd, flags) {
        var t1, t2, t3, t4, t5, t6, v, transform;
        t1 = this.soundChannel;
        if (t1 != null) {
          if ((flags & 2) !== 0)
            t1.set$paused(0, true);
          else if (t1.get$paused(t1))
            this.soundChannel.set$paused(0, false);
          t1 = snd.volume;
          this.volume = t1;
          t2 = snd.pan;
          this.pan = t2;
          t3 = snd.falloff;
          this.falloff = t3;
          t4 = snd.x;
          this.x = t4;
          t5 = snd.y;
          this.y = t5;
          t6 = snd.z;
          this.z = t6;
          this.frequency = snd.frequency;
          v = (flags & 1) !== 0 ? 0 : t1 / 255;
          transform = new E.SoundTransform(v, 100 * (t2 - 128) / 255, 0, 0, 0, 1);
          t1 = Math.abs(t3);
          transform.falloff = t1;
          if (t1 <= 0)
            transform.falloff = 1;
          transform.x = t4;
          transform.y = t5;
          transform.z = t6;
          this.soundChannel.set$soundTransform(transform);
          this.soundChannel.set$playbackRate(0, this.frequency);
        }
      }
    },
    WavInfo_play_closure: {
      "^": "Closure:0;$this",
      call$1: [function(sound) {
        var t1, t2, t3, transform;
        t1 = this.$this;
        if (t1.cancelled) {
          t1.cancelled = false;
          return;
        }
        t1._sound = sound;
        t2 = J.getInterceptor$asx(sound);
        if (J.$gt$n(t2.get$length(sound), 60)) {
          t1._isMusic = true;
          t3 = $.me;
          if (t3 != null && !t3._enableMusic)
            return;
        }
        t1.duration = C.JSNumber_methods.ceil$0(J.$mul$ns(t2.get$length(sound), 1000));
        transform = new E.SoundTransform(t1.volume / 255, (t1.pan - 128) / 100, 0, 0, 0, 1);
        t3 = Math.abs(t1.falloff);
        transform.falloff = t3;
        if (t3 <= 0)
          transform.falloff = 1;
        transform.x = t1.x;
        transform.y = t1.y;
        transform.z = t1.z;
        t2 = t2.play$2(sound, t1.repeat, transform);
        t1.soundChannel = t2;
        t2.set$playbackRate(0, t1.frequency);
        if (t1.repeat)
          return;
        t1.timer = P.Timer_Timer(P.Duration$(0, 0, 0, t1.duration, 0, 0), t1.get$complete(t1));
      }, null, null, 2, 0, null, 85, "call"]
    },
    WavInfo_play_closure0: {
      "^": "Closure:0;",
      call$1: [function(_) {
        P.print("Sound: caught error " + H.S(_));
        return;
      }, null, null, 2, 0, null, 5, "call"]
    },
    MidiInfo: {
      "^": "SoundInfo;player,url,_isMusic,channel,repeat,volume,pan,wait,priority,status,frequency,x,y,z,falloff,fallback,next,completer",
      play$0: function(_) {
        var t1, tvolume, t2, t3;
        t1 = this.player;
        if (t1 != null) {
          tvolume = C.JSInt_methods._tdivFast$1(100 * this.volume, 255);
          t2 = this.repeat;
          t3 = this.url;
          if (t2) {
            t1.callMethod$2("playFile", [t3, 1, tvolume, null]);
            return;
          } else
            t1.callMethod$2("playFile", [t3, 0, tvolume, this.get$complete(this)]);
        } else {
          P.print("Sound: unable to play MIDI file");
          return;
        }
        return this.completer.future;
      },
      stop$0: function(_) {
        this.player.callMethod$2("unload", []);
      }
    },
    ModInfo: {
      "^": "SoundInfo;player,url,_isMusic,channel,repeat,volume,pan,wait,priority,status,frequency,x,y,z,falloff,fallback,next,completer",
      play$0: function(_) {
        var t1, tvolume, t2, t3;
        t1 = this.player;
        if (t1 != null) {
          tvolume = C.JSInt_methods._tdivFast$1(100 * this.volume, 255);
          t2 = this.repeat;
          t3 = this.url;
          if (t2) {
            t1.callMethod$2("playFile", [t3, 1, tvolume, null]);
            return;
          } else
            t1.callMethod$2("playFile", [t3, 0, tvolume, this.get$complete(this)]);
        } else {
          P.print("Sound: unable to play MOD file");
          return;
        }
        return this.completer.future;
      },
      stop$0: function(_) {
        this.player.callMethod$2("unload", []);
      }
    },
    SoundInfo: {
      "^": "Object;url>,_isMusic,channel,repeat,volume,pan,wait,priority,status,frequency,x>,y>,z,falloff,fallback,next,completer",
      complete$0: [function(_) {
        var t1 = this.completer;
        if (t1 != null) {
          t1.complete$1(0, 1);
          this.completer = null;
        }
      }, "call$0", "get$complete", 0, 0, 3],
      isSupported$1: function(_url) {
        var ext, t1;
        if (_url == null)
          return false;
        ext = C.JSString_methods.substring$1(_url, C.JSString_methods.lastIndexOf$1(_url, ".") + 1);
        t1 = $.$get$AudioLoader_supportedTypes();
        t1.toString;
        t1 = H.setRuntimeTypeInfo(t1.slice(), [H.getTypeArgumentByIndex(t1, 0)]);
        t1.fixed$length = Array;
        t1 = t1;
        return C.JSArray_methods.contains$1(t1, ext);
      },
      get$supportedUrl: function() {
        var t1, len, i;
        if (this.isSupported$1(this.url))
          return this.url;
        t1 = this.fallback;
        if (t1 != null) {
          len = t1.length;
          for (i = 0; i < len; ++i)
            if (this.isSupported$1(this.fallback[i]))
              return this.fallback[i];
        }
        return this.url;
      },
      stop$0: function(_) {
      },
      update$2: function(snd, flags) {
      },
      SoundInfo$from$1: function(snd) {
        this.url = snd.url;
        this.channel = snd.channel;
        this.repeat = snd.repeat;
        this.volume = snd.volume;
        this.pan = snd.pan;
        this.frequency = snd.frequency;
        this.x = snd.x;
        this.y = snd.y;
        this.z = snd.z;
        this.falloff = snd.falloff;
        this.fallback = snd.fallback;
      }
    },
    XYZ: {
      "^": "Object;x>,y>,z",
      XYZ$fromLoc$1: function(id) {
        var atom, t1, t2, t3, yz;
        while (true) {
          if (!(id !== 0 && (id & 4278190080) >>> 0 !== 16777216))
            break;
          atom = $.me.infoMap.$index(0, id);
          id = atom != null ? atom.locId : 0;
        }
        if ((id & 4278190080) >>> 0 !== 16777216) {
          this.z = -1;
          this.y = -1;
          this.x = -1;
        } else {
          t1 = id & 16777215;
          t2 = $.me.mapInfo;
          t3 = t2.maxx;
          yz = C.JSInt_methods.$tdiv(t1, t3);
          this.x = C.JSInt_methods.$mod(t1, t3);
          t2 = t2.maxy;
          this.z = C.JSInt_methods.$tdiv(yz, t2);
          this.y = C.JSInt_methods.$mod(yz, t2);
        }
      },
      static: {
        XYZ$fromLoc: function(id) {
          var t1 = new N.XYZ(null, null, null);
          t1.XYZ$fromLoc$1(id);
          return t1;
        }
      }
    },
    StatPanel: {
      "^": "Object;_webclient$_name,_rows,_items,changed",
      deleteRows$2: function(at, count) {
        var t1, t2, t3, t4;
        t1 = this._rows;
        if (at >= t1)
          return;
        t2 = at + count;
        t3 = at * 3;
        t4 = this._items;
        if (t2 >= t1) {
          C.JSArray_methods.removeRange$2(t4, t3, t4.length);
          this._rows = at;
        } else {
          C.JSArray_methods.removeRange$2(t4, t3, t2 * 3);
          this._rows -= count;
        }
      }
    },
    VerbInfo: {
      "^": "Object;_webclient$_id,_webclient$_name,_desc,_panel,bits,available,changed"
    },
    VerbPanel: {
      "^": "Object;_webclient$_name,_items,jsverbs,changed,_available",
      add$1: function(_, v) {
        var t1 = this._items;
        if (!C.JSArray_methods.contains$1(t1, v)) {
          t1.push(v);
          this.changed = true;
        }
      },
      get$available: function(_) {
        if (this.changed)
          this._available = C.JSArray_methods.firstWhere$2$orElse(this._items, new N.VerbPanel_available_closure(), new N.VerbPanel_available_closure0()) != null;
        return this._available;
      },
      get$js: function() {
        var c, t1, l, lc, lastAdded, i, v, t2, c0, t3;
        c = this.changed;
        this.changed = false;
        if (c || this.jsverbs == null) {
          this.jsverbs = new P.JsArray([], [null]);
          t1 = this._items;
          l = t1.length;
          C.JSArray_methods.sort$1(t1, new N.VerbPanel_js_closure());
          for (lc = null, lastAdded = null, i = 0; i < l; ++i) {
            v = t1[i];
            if (!v.available || (v.bits & 32) !== 0)
              continue;
            if (lastAdded != null) {
              lc = v._webclient$_name.toLowerCase();
              t2 = lc !== lastAdded;
            } else
              t2 = true;
            if (t2) {
              t2 = this.jsverbs;
              c0 = v.changed;
              v.changed = false;
              t3 = P.LinkedHashMap__makeLiteral(["name", v._webclient$_name, "desc", v._desc, "changed", c0]);
              t2.callMethod$2("push", [P._wrapToDart(P.JsObject__convertDataTree(t3))]);
              lastAdded = lc;
            }
          }
        }
        return P.JsObject_JsObject$jsify(P.LinkedHashMap__makeLiteral(["name", this._webclient$_name, "changed", c, "verbs", this.jsverbs]));
      }
    },
    VerbPanel_available_closure: {
      "^": "Closure:105;",
      call$1: function(v) {
        return v.available;
      }
    },
    VerbPanel_available_closure0: {
      "^": "Closure:1;",
      call$0: function() {
        return;
      }
    },
    VerbPanel_js_closure: {
      "^": "Closure:78;",
      call$2: function(a, b) {
        var ret = C.JSString_methods.compareTo$1(a._webclient$_name.toLowerCase(), b._webclient$_name.toLowerCase());
        return ret !== 0 ? ret : a._webclient$_id - b._webclient$_id;
      }
    },
    CacheItem: {
      "^": "Object;url>,crc,type,bytes,received,tries,loaded",
      get$priority: function() {
        if (this.type === "")
          return 10;
        var t1 = this.type;
        if (t1 === ".png")
          return 10;
        if (t1 === ".mid" || t1 === ".midi")
          return 8;
        if ((t1 === ".wav" || t1 === ".ogg" || t1 === ".mp3") && this.bytes < 50000)
          return 9;
        if (t1 === ".ttf" || t1 === ".otf" || t1 === ".woff" || t1 === ".woff2")
          return 10;
        return 0;
      },
      postLoad$1: function(response) {
        var typeReceived;
        if (this.loaded)
          return;
        this.loaded = true;
        typeReceived = response.getResponseHeader("Content-Type");
        if (typeReceived != null && C.JSString_methods.indexOf$1(typeReceived, "font") >= 0 && $.$get$context().$index(0, "opentype") != null)
          $.$get$context().$index(0, "opentype").callMethod$2("load", [this.url, new N.CacheItem_postLoad_closure(this, typeReceived)]);
        return;
      }
    },
    CacheItem_postLoad_closure: {
      "^": "Closure:2;$this,typeReceived",
      call$2: [function(err, font) {
        var t1, $name, style, names, ff, t2, k;
        t1 = J.getInterceptor$asx(font);
        $name = t1.$index(font, "familyName");
        style = t1.$index(font, "styleName");
        if ($name == null) {
          names = t1.$index(font, "names");
          t1 = names != null;
          if (t1) {
            ff = names.$index(0, "fontFamily");
            t2 = ff != null;
          } else {
            ff = null;
            t2 = false;
          }
          if (t2)
            if (typeof ff === "string")
              $name = ff;
            else {
              t2 = J.getInterceptor(ff);
              if (!!t2.$isJsObject)
                if (t2.$index(ff, "en") != null)
                  $name = t2.$index(ff, "en");
                else {
                  k = N.ByondJS_keys(ff);
                  if (k.get$length(k).$gt(0, 0))
                    $name = t2.$index(ff, k.$index(0, 0));
                }
            }
          if (t1) {
            ff = names.$index(0, "fontSubFamily");
            t1 = ff != null;
          } else
            t1 = false;
          if (t1)
            if (typeof ff === "string")
              style = ff;
            else {
              t1 = J.getInterceptor(ff);
              if (!!t1.$isJsObject)
                if (t1.$index(ff, "en") != null)
                  style = t1.$index(ff, "en");
                else {
                  k = N.ByondJS_keys(ff);
                  if (k.get$length(k).$gt(0, 0))
                    style = t1.$index(ff, k.$index(0, 0));
                }
            }
        }
        if ($name != null)
          N.ByondJS_addFont($name, style, this.$this.url, this.typeReceived);
      }, null, null, 4, 0, null, 86, 57, "call"]
    },
    CacheQueue: {
      "^": "Object;_requested,_finished,_failed,_waiting,_webclient$_onError,_onProgress,_onSuccess,_webclient$_onDone",
      _webclient$_contains$2: function(l, c) {
        return C.JSArray_methods.firstWhere$2$orElse(l, new N.CacheQueue__contains_closure(c), new N.CacheQueue__contains_closure0()) != null;
      },
      add$1: function(_, i) {
        var t1, t2;
        t1 = this._requested;
        if (this._webclient$_contains$2(t1, i))
          return;
        if (this._webclient$_contains$2(this._finished, i))
          return;
        if (this._webclient$_contains$2(this._waiting, i))
          return;
        t2 = this._failed;
        if (this._webclient$_contains$2(t2, i)) {
          C.JSArray_methods.checkGrowable$1(t2, "removeWhere");
          C.JSArray_methods._removeWhere$2(t2, new N.CacheQueue_add_closure(i), true);
        }
        this._waiting.push(i);
        t2 = $.me;
        t2.totBytes = t2.totBytes + i.bytes;
        if (t1.length < 4)
          this.next$0();
      },
      next$0: function() {
        var t1, t2, c, p, i, j, c2, p2;
        t1 = {};
        t2 = this._waiting;
        if (t2.length === 0)
          return;
        c = t2[0];
        t1.c = c;
        p = c.get$priority();
        for (i = 1, j = 0; t2 = this._waiting, i < t2.length; ++i) {
          c2 = t2[i];
          p2 = c2.get$priority();
          if (p2 > p) {
            t1.c = c2;
            p = p2;
            j = i;
          }
        }
        C.JSArray_methods.removeAt$1(t2, j);
        this._requested.push(t1.c);
        W.HttpRequest_request(t1.c.url, null, null, new N.CacheQueue_next_closure(t1, this, this), null, null, null, null).then$1(new N.CacheQueue_next_closure0(t1, this)).catchError$1(new N.CacheQueue_next_closure1(t1, this));
      },
      failed$1: function(c) {
        var t1 = this._requested;
        C.JSArray_methods.checkGrowable$1(t1, "removeWhere");
        C.JSArray_methods._removeWhere$2(t1, new N.CacheQueue_failed_closure(c), true);
        this._failed.push(c);
        $.me.updateLoader$1(c.bytes - c.received);
      },
      success$2: function(c, response) {
        var t1;
        c.postLoad$1(response);
        t1 = this._requested;
        C.JSArray_methods.checkGrowable$1(t1, "removeWhere");
        C.JSArray_methods._removeWhere$2(t1, new N.CacheQueue_success_closure(c), true);
        this._finished.push(c);
        if (t1.length < 4)
          this.next$0();
      }
    },
    CacheQueue__contains_closure: {
      "^": "Closure:0;c",
      call$1: function(i) {
        return J.get$url$x(i) === this.c.url;
      }
    },
    CacheQueue__contains_closure0: {
      "^": "Closure:1;",
      call$0: function() {
        return;
      }
    },
    CacheQueue_add_closure: {
      "^": "Closure:0;i",
      call$1: function(c) {
        return this.i.url === J.get$url$x(c);
      }
    },
    CacheQueue_next_closure: {
      "^": "Closure:79;_box_0,$this,q",
      call$1: function(e) {
        var t1, t2, t3, t4;
        t1 = $.me;
        if (this.q !== t1.cacheQueue)
          return;
        t2 = e.loaded;
        t3 = this._box_0.c;
        t4 = t3.received;
        t3.received = t2;
        t1.updateLoader$1(t2 - t4);
      }
    },
    CacheQueue_next_closure0: {
      "^": "Closure:80;_box_0,$this",
      call$1: [function(_) {
        return this.$this.success$2(this._box_0.c, _);
      }, null, null, 2, 0, null, 5, "call"]
    },
    CacheQueue_next_closure1: {
      "^": "Closure:0;_box_0,$this",
      call$1: [function(e) {
        return this.$this.failed$1(this._box_0.c);
      }, null, null, 2, 0, null, 3, "call"]
    },
    CacheQueue_failed_closure: {
      "^": "Closure:0;c",
      call$1: function(i) {
        return J.get$url$x(i) === this.c.url;
      }
    },
    CacheQueue_success_closure: {
      "^": "Closure:0;c",
      call$1: function(i) {
        return J.get$url$x(i) === this.c.url;
      }
    },
    LocalFile: {
      "^": "Object;_webclient$_name,_webclient$_data",
      get$length: function(_) {
        return this._webclient$_data.byteLength;
      },
      get$data: function(_) {
        return this._webclient$_data;
      }
    },
    MapViewPoint: {
      "^": "Object;x>,y>,xy_max_depth,xy_sum_depth,clear,light,lamp,infra_light,vis_bit<,vis2<,vis3",
      get$visible: function() {
        return (this.vis_bit & 1) !== 0;
      }
    },
    MapView: {
      "^": "Object;pt,visLocs,xy_max_depth_max,xy_sum_depth_max,centerX,centerY,centerZ,turfOffsetX,turfOffsetY,lengthX,lengthY,width>,height>,eyeDx,eyeDy,eyeX,eyeY,x0,x1,y0,y1,seeall,seeInfra,blind,viewChanged,visParamsChanged,eyeChanged,showBoundaries,nightVision",
      indexOf$2: function(_, x, y) {
        return x + y * this.width;
      },
      oblock$3: function(x, y, d) {
        var xmin, xmax, ymin, ymax, xl, b, t1, idx, myIdx, _y, t2, t3;
        xmin = P.max(this.x0, x - d);
        xmax = P.min(this.x1, x + d);
        ymin = P.max(this.y0, y - d);
        ymax = P.min(this.y1, y + d);
        xl = xmax - xmin + 1;
        b = [];
        t1 = this.width;
        idx = xmin + ymin * t1;
        myIdx = x + y * t1;
        for (t1 = myIdx + 1, _y = ymin; _y <= ymax; ++_y) {
          if (_y !== y) {
            t2 = this.pt;
            t3 = idx + xl;
            P.RangeError_checkValidRange(idx, t3, t2.length, null, null, null);
            if (idx < 0)
              H.throwExpression(P.RangeError$range(idx, 0, null, "start", null));
            if (t3 < 0)
              H.throwExpression(P.RangeError$range(t3, 0, null, "end", null));
            if (idx > t3)
              H.throwExpression(P.RangeError$range(idx, 0, t3, "start", null));
            C.JSArray_methods.addAll$1(b, new H.SubListIterable(t2, idx, t3, [H.getTypeArgumentByIndex(t2, 0)]));
          } else {
            if (idx < myIdx) {
              t2 = this.pt;
              P.RangeError_checkValidRange(idx, myIdx, t2.length, null, null, null);
              if (idx < 0)
                H.throwExpression(P.RangeError$range(idx, 0, null, "start", null));
              if (idx > myIdx)
                H.throwExpression(P.RangeError$range(idx, 0, myIdx, "start", null));
              C.JSArray_methods.addAll$1(b, new H.SubListIterable(t2, idx, myIdx, [H.getTypeArgumentByIndex(t2, 0)]));
            }
            t2 = idx + xl;
            if (t1 < t2) {
              t3 = this.pt;
              P.RangeError_checkValidRange(t1, t2, t3.length, null, null, null);
              if (t1 > t2)
                H.throwExpression(P.RangeError$range(t1, 0, t2, "start", null));
              C.JSArray_methods.addAll$1(b, new H.SubListIterable(t3, t1, t2, [H.getTypeArgumentByIndex(t3, 0)]));
            }
          }
          idx += this.width;
        }
        return b;
      },
      oblock$2: function(x, y) {
        return this.oblock$3(x, y, 1);
      },
      precalcEyeOffsets$0: function() {
        var t1, incx, t2, y, idx, ax, p, ay, x, idx0, t3, t4, t5, t6, _i;
        this.xy_max_depth_max = 0;
        this.xy_sum_depth_max = 0;
        t1 = this.width;
        incx = t1 - this.lengthX;
        t2 = this.x0;
        y = this.y0;
        idx = t2 + y * t1;
        for (ax = null, p = null; t1 = this.y1, y <= t1; ++y) {
          ay = Math.abs(y - this.eyeY);
          for (x = this.x0; x <= this.x1; ++x, idx = idx0) {
            ax = Math.abs(x - this.eyeX);
            idx0 = idx + 1;
            p = this.pt[idx];
            p.xy_max_depth = P.max(ax, ay);
            p.xy_sum_depth = ax + ay;
          }
          idx += incx;
        }
        t2 = this.x0;
        t3 = this.x1;
        if (t2 < t3 && this.y0 < t1)
          for (t4 = this.y0, t5 = this.pt, t6 = this.width, t4 *= t6, t6 = t1 * t6, t6 = [t5[t2 + t4], t5[t3 + t4], t5[t2 + t6], t5[t3 + t6]], _i = 0; _i < 4; ++_i) {
            p = t6[_i];
            t1 = this.xy_max_depth_max;
            t2 = p.xy_max_depth;
            if (t1 < t2)
              this.xy_max_depth_max = t2;
            t1 = this.xy_sum_depth_max;
            t2 = p.xy_sum_depth;
            if (t1 < t2)
              this.xy_sum_depth_max = t2;
          }
      },
      resize$0: function(_) {
        var t1, t2, t3, y, idx, x, idx0;
        t1 = this.lengthX + 2;
        this.width = t1;
        t2 = this.lengthY + 2;
        this.height = t2;
        this.turfOffsetX = this.centerX - C.JSInt_methods._tdivFast$1(t1, 2);
        this.turfOffsetY = this.centerY - C.JSInt_methods._tdivFast$1(t2, 2);
        t2 = new Array(t1 * t2);
        t2.fixed$length = Array;
        t2 = H.setRuntimeTypeInfo(t2, [N.MapViewPoint]);
        this.pt = t2;
        for (t1 = this.height, t3 = this.width, y = 0, idx = 0; y < t1; ++y)
          for (x = 0; x < t3; ++x, idx = idx0) {
            idx0 = idx + 1;
            t2[idx] = new N.MapViewPoint(x, y, 0, 0, true, true, 0, 0, 0, 0, true);
          }
        this.y0 = 1;
        this.x0 = 1;
        this.x1 = 1 + this.lengthX - 1;
        this.y1 = 1 + this.lengthY - 1;
      },
      setVisBits$0: function() {
        var t1, t2, _i, p, xmin, xmax, ymin, ymax, d, x, tmp, d1, idx, tmp0, y, lamps, idx0, p2, it, t3, t4;
        if (this.blind || this.eyeX < 0) {
          if (this.viewChanged)
            for (t1 = this.pt, t2 = t1.length, _i = 0; _i < t2; ++_i) {
              p = t1[_i];
              p.infra_light = 0;
              p.vis2 = 0;
              p.vis_bit = 0;
            }
          if (this.viewChanged) {
            this.viewChanged = false;
            return true;
          }
          return false;
        }
        this.getAllVisParams$0();
        this.visParamsChanged = true;
        if (!this.visParamsChanged && !this.viewChanged)
          return false;
        this.visParamsChanged = false;
        this.viewChanged = true;
        for (t1 = this.pt, t2 = t1.length, p = null, _i = 0; _i < t2; ++_i) {
          p = t1[_i];
          p.vis2 = 0;
          p.vis_bit = 0;
        }
        t1 = this.eyeX;
        xmin = t1 - 1;
        xmax = t1 + 1;
        t1 = this.eyeY;
        ymin = t1 - 1;
        ymax = t1 + 1;
        for (d = 0, x = null, tmp = null; d < this.xy_max_depth_max; d = d1) {
          xmin = P.max(this.x0, xmin);
          xmax = P.min(this.x1, xmax);
          ymin = P.max(this.y0, ymin);
          ymax = P.min(this.y1, ymax);
          d1 = d + 1;
          idx = xmin + ymin * this.width;
          for (tmp0 = xmax - 1, y = ymin; y <= ymax; ++y) {
            for (x = xmin; x <= xmax; ++x) {
              t1 = this.pt;
              p = t1[idx];
              if (d1 === p.xy_max_depth) {
                if (t1[idx + this.width].get$vis2() !== d)
                  if (this.pt[idx - this.width].get$vis2() !== d) {
                    t1 = idx + 1;
                    if (this.pt[t1].get$vis2() !== d) {
                      t2 = idx - 1;
                      t1 = this.pt[t2].get$vis2() === d || this.pt[t1 + this.width].get$vis2() === d || this.pt[t2 + this.width].get$vis2() === d || this.pt[t1 - this.width].get$vis2() === d || this.pt[t2 - this.width].get$vis2() === d;
                    } else
                      t1 = true;
                  } else
                    t1 = true;
                else
                  t1 = true;
                if (t1)
                  if (p.clear)
                    p.vis2 = d1;
                  else
                    p.vis2 = -1;
              } else if (x < xmax) {
                idx += tmp0 - x;
                tmp = tmp0;
                x = tmp;
              }
              ++idx;
            }
            idx += this.width - (x - xmin);
          }
          --xmin;
          ++xmax;
          --ymin;
          ++ymax;
        }
        t1 = this.eyeX;
        xmin = t1 - 1;
        xmax = t1 + 1;
        t1 = this.eyeY;
        ymin = t1 - 1;
        ymax = t1 + 1;
        for (d = 0; d < this.xy_sum_depth_max; d = d1) {
          xmin = P.max(this.x0, xmin);
          xmax = P.min(this.x1, xmax);
          ymin = P.max(this.y0, ymin);
          ymax = P.min(this.y1, ymax);
          d1 = d + 1;
          idx = xmin + ymin * this.width;
          for (y = ymin; y <= ymax; ++y) {
            for (x = xmin; x <= xmax; ++x) {
              t1 = this.pt;
              p = t1[idx];
              t2 = p.xy_sum_depth;
              if (d1 === t2) {
                if (t1[idx + this.width].get$vis_bit() !== d)
                  if (this.pt[idx - this.width].get$vis_bit() !== d) {
                    t1 = idx + 1;
                    if (this.pt[t1].get$vis_bit() !== d) {
                      t2 = idx - 1;
                      t1 = this.pt[t2].get$vis_bit() === d || this.pt[t1 + this.width].get$vis_bit() === d || this.pt[t2 + this.width].get$vis_bit() === d || this.pt[t1 - this.width].get$vis_bit() === d || this.pt[t2 - this.width].get$vis_bit() === d;
                    } else
                      t1 = true;
                  } else
                    t1 = true;
                else
                  t1 = true;
                if (t1) {
                  t1 = p.x + this.turfOffsetX;
                  (t1 === 4 || t1 === 5) && p.y + this.turfOffsetY === 0;
                  if (p.clear) {
                    if (p.vis2 !== 0)
                      p.vis_bit = d1;
                  } else
                    p.vis_bit = -1;
                }
              } else if (d1 < t2) {
                tmp = t2 - d - 2;
                x += tmp;
                idx += tmp;
              } else {
                tmp = d - t2;
                x += tmp;
                idx += tmp;
              }
              ++idx;
            }
            idx += this.width - (x - xmin);
          }
          --xmin;
          ++xmax;
          --ymin;
          ++ymax;
        }
        t1 = this.eyeX;
        if (t1 >= 0)
          if (t1 < this.width) {
            t2 = this.eyeY;
            t2 = t2 >= 0 && t2 < this.height;
          } else
            t2 = false;
        else
          t2 = false;
        if (t2) {
          t2 = this.eyeY;
          this.pt[t1 + t2 * this.width].vis_bit = 1;
        }
        lamps = P.HashMap_HashMap(null, null, null, N.MapViewPoint, P.bool);
        t1 = this.x0;
        y = this.y0;
        idx = t1 + y * this.width;
        for (x = t1; y <= this.y1; ++y, x = t2) {
          for (; x <= this.x1; ++x, idx = idx0) {
            idx0 = idx + 1;
            p = this.pt[idx];
            if (p.lamp > 1)
              lamps.$indexSet(0, p, true);
          }
          t1 = this.width;
          t2 = this.x0;
          idx += t1 - (x - t2);
        }
        for (t1 = [H.getTypeArgumentByIndex(lamps, 0)], p2 = null; lamps._collection$_length !== 0;) {
          t2 = new P._HashMapKeyIterable(lamps, t1);
          it = t2.get$iterator(t2);
          if (!it.moveNext$0())
            H.throwExpression(H.IterableElementError_noElement());
          p = it.get$current();
          d1 = p.lamp - 1;
          lamps.remove$1(0, p);
          for (t2 = this.oblock$2(p.x, p.y), t3 = t2.length, t4 = d1 > 1, _i = 0; _i < t2.length; t2.length === t3 || (0, H.throwConcurrentModificationError)(t2), ++_i) {
            p2 = t2[_i];
            if (p2.clear) {
              if (p2.lamp < d1) {
                p2.lamp = d1;
                if (t4)
                  lamps.$indexSet(0, p2, true);
              }
            } else if (p2.lamp === 0 && p.vis_bit !== 0)
              p2.lamp = 1;
          }
        }
        if (this.seeInfra)
          for (t1 = this.pt, t2 = t1.length, _i = 0; _i < t2; ++_i) {
            p = t1[_i];
            t3 = p.infra_light;
            if (t3 !== 0)
              if (p.vis_bit === 0 || p.xy_max_depth >= t3)
                p.infra_light = 0;
          }
        for (t1 = this.pt, t2 = t1.length, _i = 0; _i < t2; ++_i) {
          p = t1[_i];
          p.vis2 = p.vis_bit;
          if (p.lamp === 0 && !p.light)
            p.vis_bit = 0;
        }
        if (this.showBoundaries) {
          for (t1 = this.pt, t2 = t1.length, _i = 0; _i < t2; ++_i) {
            p = t1[_i];
            p.vis3 = false;
          }
          t1 = this.x0;
          y = this.y0;
          idx = t1 + y * this.width;
          for (; y <= this.y1; ++y) {
            for (x = this.x0; x <= this.x1; ++x) {
              t1 = this.pt;
              p = t1[idx];
              if (!p.clear && p.vis_bit === 0) {
                if (!(t1[idx - 1].get$vis_bit() !== 0 && this.pt[idx + 1].get$vis_bit() !== 0))
                  t1 = this.pt[idx - this.width].get$vis_bit() !== 0 && this.pt[idx + this.width].get$vis_bit() !== 0;
                else
                  t1 = true;
                if (t1)
                  p.vis3 = true;
              }
              ++idx;
            }
            idx += this.width - this.lengthX;
          }
          for (t1 = this.pt, t2 = t1.length, _i = 0; _i < t2; ++_i) {
            p = t1[_i];
            if (p.vis3 && !p.clear && p.vis_bit === 0) {
              p.vis2 = -1;
              p.vis_bit = -1;
            }
          }
          t1 = this.x0;
          y = this.y0;
          idx = t1 + y * this.width;
          for (; y <= this.y1; ++y) {
            for (x = this.x0; x <= this.x1; ++x) {
              t1 = this.pt;
              p = t1[idx];
              if (!p.clear && p.vis_bit !== 0) {
                t2 = idx - 1;
                p2 = t1[t2];
                if (!p2.clear && p2.vis_bit !== 0) {
                  t3 = this.width;
                  p2 = t1[t2 - t3];
                  if (p2.clear)
                    if (p2.vis_bit !== 0) {
                      p2 = t1[idx - t3];
                      t4 = !p2.clear && p2.vis_bit !== 0;
                    } else
                      t4 = false;
                  else
                    t4 = false;
                  if (t4) {
                    p.vis3 = true;
                    continue;
                  }
                  p2 = t1[t2 + t3];
                  if (p2.clear)
                    if (p2.vis_bit !== 0) {
                      p2 = t1[idx + t3];
                      t2 = !p2.clear && p2.vis_bit !== 0;
                    } else
                      t2 = false;
                  else
                    t2 = false;
                  if (t2) {
                    p.vis3 = true;
                    continue;
                  }
                }
                t2 = idx + 1;
                p2 = t1[t2];
                if (!p2.clear && p2.vis_bit !== 0) {
                  t3 = this.width;
                  p2 = t1[t2 - t3];
                  if (p2.clear)
                    if (p2.vis_bit !== 0) {
                      p2 = t1[idx - t3];
                      t4 = !p2.clear && p2.vis_bit !== 0;
                    } else
                      t4 = false;
                  else
                    t4 = false;
                  if (t4) {
                    p.vis3 = true;
                    continue;
                  }
                  p2 = t1[t2 + t3];
                  if (p2.clear)
                    if (p2.vis_bit !== 0) {
                      p2 = t1[idx + t3];
                      t1 = !p2.clear && p2.vis_bit !== 0;
                    } else
                      t1 = false;
                  else
                    t1 = false;
                  if (t1) {
                    p.vis3 = true;
                    continue;
                  }
                }
              }
              ++idx;
            }
            idx += this.width - this.lengthX;
          }
          for (t1 = this.pt, t2 = t1.length, _i = 0; _i < t2; ++_i) {
            p = t1[_i];
            if (p.vis3 && !p.clear && p.vis_bit === 0) {
              p.vis2 = -1;
              p.vis_bit = -1;
            }
          }
        }
        if (this.viewChanged) {
          this.viewChanged = false;
          return true;
        }
        return false;
      },
      enumerateVisLocations$0: function() {
        var t1, t2, turf, _i, p, vis;
        t1 = P.$int;
        this.visLocs = P.HashMap_HashMap(null, null, null, t1, t1);
        for (t1 = this.pt, t2 = t1.length, turf = null, _i = 0; _i < t2; ++_i) {
          p = t1[_i];
          vis = p.vis_bit !== 0 ? 1 : 0;
          if (p.vis2 !== 0)
            vis |= 2;
          if (p.infra_light !== 0)
            vis |= 4;
          if (vis !== 0) {
            turf = N.XYZtoTurfIdCheck(p.x + this.turfOffsetX, p.y + this.turfOffsetY, this.centerZ);
            if (turf !== 0)
              this.visLocs.$indexSet(0, turf, vis);
          }
        }
        return this.visLocs;
      },
      getAllVisParams$0: function() {
        var t1, t2, _i, p;
        for (t1 = this.pt, t2 = t1.length, _i = 0; _i < t2; ++_i) {
          p = t1[_i];
          p.clear = true;
          p.infra_light = 0;
          p.lamp = 0;
          p.light = false;
        }
        $.me.mapInfo.fillViewParams$0();
        t1 = this.eyeX;
        t2 = this.eyeY;
        p = t1 >= this.x0 && t1 <= this.x1 && t2 >= this.y0 && t2 <= this.y1 ? this.pt[t1 + t2 * this.width] : null;
        if (p != null && p.lamp < this.nightVision)
          p.lamp = this.nightVision;
        return true;
      }
    }
  }, 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$appearance$x = function(receiver, value) {
    return J.getInterceptor$x(receiver).set$appearance(receiver, value);
  };
  J.set$id$x = function(receiver, value) {
    return J.getInterceptor$x(receiver).set$id(receiver, value);
  };
  J.set$innerHtml$x = function(receiver, value) {
    return J.getInterceptor$x(receiver).set$innerHtml(receiver, value);
  };
  J.set$layer$x = function(receiver, value) {
    return J.getInterceptor$x(receiver).set$layer(receiver, value);
  };
  J.set$tabIndex$x = function(receiver, value) {
    return J.getInterceptor$x(receiver).set$tabIndex(receiver, value);
  };
  J.set$text$x = function(receiver, value) {
    return J.getInterceptor$x(receiver).set$text(receiver, value);
  };
  J.get$_get_contentWindow$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$_get_contentWindow(receiver);
  };
  J.get$attributes$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$attributes(receiver);
  };
  J.get$classes$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$classes(receiver);
  };
  J.get$control$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$control(receiver);
  };
  J.get$cssRules$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$cssRules(receiver);
  };
  J.get$data$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$data(receiver);
  };
  J.get$innerHtml$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$innerHtml(receiver);
  };
  J.get$isEmpty$asx = function(receiver) {
    return J.getInterceptor$asx(receiver).get$isEmpty(receiver);
  };
  J.get$iterator$ax = function(receiver) {
    return J.getInterceptor$ax(receiver).get$iterator(receiver);
  };
  J.get$layer$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$layer(receiver);
  };
  J.get$length$asx = function(receiver) {
    return J.getInterceptor$asx(receiver).get$length(receiver);
  };
  J.get$mask$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$mask(receiver);
  };
  J.get$offsetParent$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$offsetParent(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$response$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$response(receiver);
  };
  J.get$style$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$style(receiver);
  };
  J.get$text$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$text(receiver);
  };
  J.get$url$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$url(receiver);
  };
  J.get$x$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$x(receiver);
  };
  J.get$y$x = function(receiver) {
    return J.getInterceptor$x(receiver).get$y(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.$and$n = function(receiver, a0) {
    if (typeof receiver == "number" && typeof a0 == "number")
      return (receiver & a0) >>> 0;
    return J.getInterceptor$n(receiver).$and(receiver, a0);
  };
  J.$div$n = function(receiver, a0) {
    if (typeof receiver == "number" && typeof a0 == "number")
      return receiver / a0;
    return J.getInterceptor$n(receiver).$div(receiver, a0);
  };
  J.$ge$n = function(receiver, a0) {
    if (typeof receiver == "number" && typeof a0 == "number")
      return receiver >= a0;
    return J.getInterceptor$n(receiver).$ge(receiver, a0);
  };
  J.$gt$n = function(receiver, a0) {
    if (typeof receiver == "number" && typeof a0 == "number")
      return receiver > a0;
    return J.getInterceptor$n(receiver).$gt(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.$le$n = function(receiver, a0) {
    if (typeof receiver == "number" && typeof a0 == "number")
      return receiver <= a0;
    return J.getInterceptor$n(receiver).$le(receiver, a0);
  };
  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.$mod$n = function(receiver, a0) {
    return J.getInterceptor$n(receiver).$mod(receiver, a0);
  };
  J.$mul$ns = function(receiver, a0) {
    if (typeof receiver == "number" && typeof a0 == "number")
      return receiver * a0;
    return J.getInterceptor$ns(receiver).$mul(receiver, a0);
  };
  J.$negate$n = function(receiver) {
    if (typeof receiver == "number")
      return -receiver;
    return J.getInterceptor$n(receiver).$negate(receiver);
  };
  J.$or$n = function(receiver, a0) {
    if (typeof receiver == "number" && typeof a0 == "number")
      return (receiver | a0) >>> 0;
    return J.getInterceptor$n(receiver).$or(receiver, a0);
  };
  J.$shl$n = function(receiver, a0) {
    return J.getInterceptor$n(receiver).$shl(receiver, a0);
  };
  J.$shr$n = function(receiver, a0) {
    return J.getInterceptor$n(receiver).$shr(receiver, a0);
  };
  J.$sub$n = function(receiver, a0) {
    if (typeof receiver == "number" && typeof a0 == "number")
      return receiver - a0;
    return J.getInterceptor$n(receiver).$sub(receiver, a0);
  };
  J.$tdiv$n = function(receiver, a0) {
    return J.getInterceptor$n(receiver).$tdiv(receiver, a0);
  };
  J._addEventListener$3$x = function(receiver, a0, a1, a2) {
    return J.getInterceptor$x(receiver)._addEventListener$3(receiver, a0, a1, a2);
  };
  J._browserPropertyName$1$x = function(receiver, a0) {
    return J.getInterceptor$x(receiver)._browserPropertyName$1(receiver, a0);
  };
  J._connect$3$x = function(receiver, a0, a1, a2) {
    return J.getInterceptor$x(receiver)._connect$3(receiver, a0, a1, a2);
  };
  J._removeEventListener$3$x = function(receiver, a0, a1, a2) {
    return J.getInterceptor$x(receiver)._removeEventListener$3(receiver, a0, a1, a2);
  };
  J._replaceChild$2$x = function(receiver, a0, a1) {
    return J.getInterceptor$x(receiver)._replaceChild$2(receiver, a0, a1);
  };
  J.abs$0$n = function(receiver) {
    return J.getInterceptor$n(receiver).abs$0(receiver);
  };
  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.allMatches$1$s = function(receiver, a0) {
    return J.getInterceptor$s(receiver).allMatches$1(receiver, a0);
  };
  J.append$1$x = function(receiver, a0) {
    return J.getInterceptor$x(receiver).append$1(receiver, a0);
  };
  J.clamp$2$n = function(receiver, a0, a1) {
    return J.getInterceptor$n(receiver).clamp$2(receiver, a0, a1);
  };
  J.clear$0$ax = function(receiver) {
    return J.getInterceptor$ax(receiver).clear$0(receiver);
  };
  J.compareTo$1$ns = function(receiver, a0) {
    return J.getInterceptor$ns(receiver).compareTo$1(receiver, a0);
  };
  J.contains$2$asx = function(receiver, a0, a1) {
    return J.getInterceptor$asx(receiver).contains$2(receiver, a0, a1);
  };
  J.createGain$0$x = function(receiver) {
    return J.getInterceptor$x(receiver).createGain$0(receiver);
  };
  J.decodeAudioData$1$x = function(receiver, a0) {
    return J.getInterceptor$x(receiver).decodeAudioData$1(receiver, a0);
  };
  J.deleteRule$1$x = function(receiver, a0) {
    return J.getInterceptor$x(receiver).deleteRule$1(receiver, a0);
  };
  J.disconnect$1$x = function(receiver, a0) {
    return J.getInterceptor$x(receiver).disconnect$1(receiver, a0);
  };
  J.elementAt$1$ax = function(receiver, a0) {
    return J.getInterceptor$ax(receiver).elementAt$1(receiver, a0);
  };
  J.endsWith$1$s = function(receiver, a0) {
    return J.getInterceptor$s(receiver).endsWith$1(receiver, a0);
  };
  J.floor$0$n = function(receiver) {
    return J.getInterceptor$n(receiver).floor$0(receiver);
  };
  J.focus$0$x = function(receiver) {
    return J.getInterceptor$x(receiver).focus$0(receiver);
  };
  J.getAttribute$1$x = function(receiver, a0) {
    return J.getInterceptor$x(receiver).getAttribute$1(receiver, a0);
  };
  J.getComputedStyle$0$x = function(receiver) {
    return J.getInterceptor$x(receiver).getComputedStyle$0(receiver);
  };
  J.getPropertyValue$1$x = function(receiver, a0) {
    return J.getInterceptor$x(receiver).getPropertyValue$1(receiver, a0);
  };
  J.indexOf$1$asx = function(receiver, a0) {
    return J.getInterceptor$asx(receiver).indexOf$1(receiver, a0);
  };
  J.insertRule$2$x = function(receiver, a0, a1) {
    return J.getInterceptor$x(receiver).insertRule$2(receiver, a0, a1);
  };
  J.lastIndexOf$1$asx = function(receiver, a0) {
    return J.getInterceptor$asx(receiver).lastIndexOf$1(receiver, a0);
  };
  J.map$1$ax = function(receiver, a0) {
    return J.getInterceptor$ax(receiver).map$1(receiver, a0);
  };
  J.matchAsPrefix$2$s = function(receiver, a0, a1) {
    return J.getInterceptor$s(receiver).matchAsPrefix$2(receiver, a0, a1);
  };
  J.postMessage$2$x = function(receiver, a0, a1) {
    return J.getInterceptor$x(receiver).postMessage$2(receiver, a0, a1);
  };
  J.querySelectorAll$1$x = function(receiver, a0) {
    return J.getInterceptor$x(receiver).querySelectorAll$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.removeRule$1$x = function(receiver, a0) {
    return J.getInterceptor$x(receiver).removeRule$1(receiver, a0);
  };
  J.replaceAll$2$s = function(receiver, a0, a1) {
    return J.getInterceptor$s(receiver).replaceAll$2(receiver, a0, a1);
  };
  J.replaceWith$1$x = function(receiver, a0) {
    return J.getInterceptor$x(receiver).replaceWith$1(receiver, a0);
  };
  J.round$0$n = function(receiver) {
    return J.getInterceptor$n(receiver).round$0(receiver);
  };
  J.send$1$x = function(receiver, a0) {
    return J.getInterceptor$x(receiver).send$1(receiver, a0);
  };
  J.setAttribute$2$x = function(receiver, a0, a1) {
    return J.getInterceptor$x(receiver).setAttribute$2(receiver, a0, a1);
  };
  J.setInnerHtml$2$treeSanitizer$x = function(receiver, a0, a1) {
    return J.getInterceptor$x(receiver).setInnerHtml$2$treeSanitizer(receiver, a0, a1);
  };
  J.setInnerHtml$2$validator$x = function(receiver, a0, a1) {
    return J.getInterceptor$x(receiver).setInnerHtml$2$validator(receiver, a0, a1);
  };
  J.setProperty$3$x = function(receiver, a0, a1, a2) {
    return J.getInterceptor$x(receiver).setProperty$3(receiver, a0, a1, a2);
  };
  J.skip$1$ax = function(receiver, a0) {
    return J.getInterceptor$ax(receiver).skip$1(receiver, a0);
  };
  J.split$1$s = function(receiver, a0) {
    return J.getInterceptor$s(receiver).split$1(receiver, a0);
  };
  J.startsWith$1$s = function(receiver, a0) {
    return J.getInterceptor$s(receiver).startsWith$1(receiver, a0);
  };
  J.substring$1$s = function(receiver, a0) {
    return J.getInterceptor$s(receiver).substring$1(receiver, a0);
  };
  J.substring$2$s = function(receiver, a0, a1) {
    return J.getInterceptor$s(receiver).substring$2(receiver, a0, a1);
  };
  J.toDouble$0$n = function(receiver) {
    return J.getInterceptor$n(receiver).toDouble$0(receiver);
  };
  J.toInt$0$n = function(receiver) {
    return J.getInterceptor$n(receiver).toInt$0(receiver);
  };
  J.toList$0$ax = function(receiver) {
    return J.getInterceptor$ax(receiver).toList$0(receiver);
  };
  J.toLowerCase$0$s = function(receiver) {
    return J.getInterceptor$s(receiver).toLowerCase$0(receiver);
  };
  J.toStringAsFixed$1$n = function(receiver, a0) {
    return J.getInterceptor$n(receiver).toStringAsFixed$1(receiver, a0);
  };
  J.toUpperCase$0$s = function(receiver) {
    return J.getInterceptor$s(receiver).toUpperCase$0(receiver);
  };
  J.trim$0$s = function(receiver) {
    return J.getInterceptor$s(receiver).trim$0(receiver);
  };
  J.trimLeft$0$s = function(receiver) {
    return J.getInterceptor$s(receiver).trimLeft$0(receiver);
  };
  J.trimRight$0$s = function(receiver) {
    return J.getInterceptor$s(receiver).trimRight$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.noSuchMethod$1$ = function(receiver, a0) {
    return J.getInterceptor(receiver).noSuchMethod$1(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.AudioBufferSourceNode_methods = P.AudioBufferSourceNode.prototype;
  C.BodyElement_methods = W.BodyElement.prototype;
  C.CanvasElement_methods = W.CanvasElement.prototype;
  C.CanvasRenderingContext2D_methods = W.CanvasRenderingContext2D.prototype;
  C.CssStyleDeclaration_methods = W.CssStyleDeclaration.prototype;
  C.HtmlDocument_methods = W.HtmlDocument.prototype;
  C.HttpRequest_methods = W.HttpRequest.prototype;
  C.Interceptor_methods = J.Interceptor.prototype;
  C.JSArray_methods = J.JSArray.prototype;
  C.JSBool_methods = J.JSBool.prototype;
  C.JSDouble_methods = J.JSDouble.prototype;
  C.JSInt_methods = J.JSInt.prototype;
  C.JSNull_methods = J.JSNull.prototype;
  C.JSNumber_methods = J.JSNumber.prototype;
  C.JSString_methods = J.JSString.prototype;
  C.JavaScriptFunction_methods = J.JavaScriptFunction.prototype;
  C.NativeByteBuffer_methods = H.NativeByteBuffer.prototype;
  C.NativeFloat32List_methods = H.NativeFloat32List.prototype;
  C.NativeInt16List_methods = H.NativeInt16List.prototype;
  C.NativeUint8List_methods = H.NativeUint8List.prototype;
  C.NodeList_methods = W.NodeList.prototype;
  C.PlainJavaScriptObject_methods = J.PlainJavaScriptObject.prototype;
  C.RenderingContext_methods = P.RenderingContext.prototype;
  C.TableElement_methods = W.TableElement.prototype;
  C.Touch_methods = W.Touch.prototype;
  C.UnknownJavaScriptObject_methods = J.UnknownJavaScriptObject.prototype;
  C.WheelEvent_methods = W.WheelEvent.prototype;
  C.Window_methods = W.Window.prototype;
  C._CssRuleList_methods = W._CssRuleList.prototype;
  C.BlendMode_bZz = new L.BlendMode(1, 771, "source-over");
  C.C_DynamicRuntimeType = new H.DynamicRuntimeType();
  C.C_OutOfMemoryError = new P.OutOfMemoryError();
  C.C__JSRandom = new P._JSRandom();
  C.C__RootZone = new P._RootZone();
  C.CapsStyle_0 = new U.CapsStyle(0);
  C.CapsStyle_1 = new U.CapsStyle(1);
  C.CapsStyle_2 = new U.CapsStyle(2);
  C.Duration_0 = new P.Duration(0);
  C.EventPhase_0 = new R.EventPhase(0);
  C.EventPhase_1 = new R.EventPhase(1);
  C.EventPhase_2 = new R.EventPhase(2);
  C.InputEventMode_0 = new R.InputEventMode(0);
  C.InputEventMode_1 = new R.InputEventMode(1);
  C.InputEventMode_2 = new R.InputEventMode(2);
  C.JS_CONST_4IJ = 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_AgZ = function(hooks) { return hooks; }
;
  C.JS_CONST_EKH = function(hooks) {
  if (typeof dartExperimentalFixupGetTag != "function") return hooks;
  hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag);
};
  C.JS_CONST_EyN = function(hooks) {
  var getTag = hooks.getTag;
  var prototypeForTag = hooks.prototypeForTag;
  function getTagFixed(o) {
    var tag = getTag(o);
    if (tag == "Document") {
      // "Document", so we check for the xmlVersion property, which is the empty
      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_LlX = 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_TSE = function getTagFallback(o) {
  var s = Object.prototype.toString.call(o);
  return s.substring(8, s.length - 1);
};
  C.JS_CONST_c0o = 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_nuk = 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_s8I = function(_, letter) { return letter.toUpperCase(); };
  C.JointStyle_0 = new U.JointStyle(0);
  C.JointStyle_1 = new U.JointStyle(1);
  C.JointStyle_2 = new U.JointStyle(2);
  C.JsonCodec_null_null = new P.JsonCodec(null, null);
  C.JsonDecoder_null = new P.JsonDecoder(null);
  C.JsonEncoder_null_null = new P.JsonEncoder(null, null);
  C.Latin1Codec_false = new P.Latin1Codec(false);
  C.Latin1Decoder_false_255 = new P.Latin1Decoder(false, 255);
  C.Latin1Encoder_255 = new P.Latin1Encoder(255);
  C.C_DefaultEquality = new U.DefaultEquality();
  C.ListEquality_DefaultEquality = new U.ListEquality(C.C_DefaultEquality);
  C.List_0 = Isolate.makeConstantList([0]);
  C.List_1 = Isolate.makeConstantList([1]);
  C.List_2Vk1 = Isolate.makeConstantList([1, 2, 8, 4, 9, 10, 5, 6]);
  C.List_2Vk = Isolate.makeConstantList([0, 1, 0, 0, 2, 6, 4, 0, 3, 7, 5]);
  C.List_2Vk0 = Isolate.makeConstantList([0, 5, 10, 0, 6, 4, 2, 0, 9, 1, 8]);
  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.BlendMode_1_1_lighter = new L.BlendMode(1, 1, "lighter");
  C.BlendMode_774_771_multiply = new L.BlendMode(774, 771, "multiply");
  C.List_eLp = Isolate.makeConstantList([C.BlendMode_bZz, C.BlendMode_bZz, C.BlendMode_1_1_lighter, C.BlendMode_bZz, C.BlendMode_774_771_multiply]);
  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_n5Y = Isolate.makeConstantList([null, null, "lighter", null, "multiply"]);
  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]);
  C.List_zrv = Isolate.makeConstantList([0, 268, 269, 0, 271, 274, 275, 0, 270, 272, 273, 0, 0, 0, 0, 0]);
  C.Map_O9zrD = new H.GeneralConstantMap([0, "RenderEngine.WebGL", 1, "RenderEngine.Canvas2D"], [null, null]);
  C.List_empty0 = H.setRuntimeTypeInfo(Isolate.makeConstantList([]), [P.Symbol0]);
  C.Map_empty = new H.ConstantStringMap(0, {}, C.List_empty0, [P.Symbol0, null]);
  C.Map_iT96V = new H.GeneralConstantMap([0, "StageScaleMode.EXACT_FIT", 1, "StageScaleMode.NO_BORDER", 2, "StageScaleMode.NO_SCALE", 3, "StageScaleMode.SHOW_ALL"], [null, null]);
  C.Map_sggkc = new H.GeneralConstantMap([0, "StageRenderMode.AUTO", 1, "StageRenderMode.STOP", 2, "StageRenderMode.ONCE"], [null, null]);
  C.Map_sgiL9 = new H.GeneralConstantMap([0, "CapsStyle.NONE", 1, "CapsStyle.ROUND", 2, "CapsStyle.SQUARE"], [null, null]);
  C.Map_sgo3E = new H.GeneralConstantMap([0, "EventPhase.CAPTURING_PHASE", 1, "EventPhase.AT_TARGET", 2, "EventPhase.BUBBLING_PHASE"], [null, null]);
  C.Map_sgyRZ = new H.GeneralConstantMap([0, "InputEventMode.MouseOnly", 1, "InputEventMode.TouchOnly", 2, "InputEventMode.MouseAndTouch"], [null, null]);
  C.Map_sgzjx = new H.GeneralConstantMap([0, "JointStyle.MITER", 1, "JointStyle.ROUND", 2, "JointStyle.BEVEL"], [null, null]);
  C.Map_yXUKy = new H.GeneralConstantMap([0, "StageAlign.TOP_LEFT", 1, "StageAlign.TOP", 2, "StageAlign.TOP_RIGHT", 3, "StageAlign.LEFT", 4, "StageAlign.NONE", 5, "StageAlign.RIGHT", 6, "StageAlign.BOTTOM_LEFT", 7, "StageAlign.BOTTOM", 8, "StageAlign.BOTTOM_RIGHT"], [null, null]);
  C.RenderEngine_0 = new L.RenderEngine(0);
  C.RenderEngine_1 = new L.RenderEngine(1);
  C.RenderTextureFiltering_9728 = new L.RenderTextureFiltering(9728);
  C.RenderTextureFiltering_9729 = new L.RenderTextureFiltering(9729);
  C.StageAlign_0 = new A.StageAlign(0);
  C.StageAlign_1 = new A.StageAlign(1);
  C.StageAlign_2 = new A.StageAlign(2);
  C.StageAlign_3 = new A.StageAlign(3);
  C.StageAlign_4 = new A.StageAlign(4);
  C.StageAlign_5 = new A.StageAlign(5);
  C.StageAlign_6 = new A.StageAlign(6);
  C.StageAlign_7 = new A.StageAlign(7);
  C.StageAlign_8 = new A.StageAlign(8);
  C.StageRenderMode_0 = new A.StageRenderMode(0);
  C.StageRenderMode_1 = new A.StageRenderMode(1);
  C.StageRenderMode_2 = new A.StageRenderMode(2);
  C.StageScaleMode_0 = new A.StageScaleMode(0);
  C.StageScaleMode_1 = new A.StageScaleMode(1);
  C.StageScaleMode_2 = new A.StageScaleMode(2);
  C.StageScaleMode_3 = new A.StageScaleMode(3);
  C.Symbol_call = new H.Symbol("call");
  C._ZoneFunction_3bB = new P._ZoneFunction(C.C__RootZone, P.async___rootCreatePeriodicTimer$closure());
  C._ZoneFunction_7G2 = new P._ZoneFunction(C.C__RootZone, P.async___rootRegisterBinaryCallback$closure());
  C._ZoneFunction_Eeh = new P._ZoneFunction(C.C__RootZone, P.async___rootRegisterUnaryCallback$closure());
  C._ZoneFunction_NMc = new P._ZoneFunction(C.C__RootZone, P.async___rootHandleUncaughtError$closure());
  C._ZoneFunction__RootZone__rootCreateTimer = new P._ZoneFunction(C.C__RootZone, P.async___rootCreateTimer$closure());
  C._ZoneFunction__RootZone__rootErrorCallback = new P._ZoneFunction(C.C__RootZone, P.async___rootErrorCallback$closure());
  C._ZoneFunction__RootZone__rootFork = new P._ZoneFunction(C.C__RootZone, P.async___rootFork$closure());
  C._ZoneFunction__RootZone__rootPrint = new P._ZoneFunction(C.C__RootZone, P.async___rootPrint$closure());
  C._ZoneFunction__RootZone__rootRegisterCallback = new P._ZoneFunction(C.C__RootZone, P.async___rootRegisterCallback$closure());
  C._ZoneFunction__RootZone__rootRun = new P._ZoneFunction(C.C__RootZone, P.async___rootRun$closure());
  C._ZoneFunction__RootZone__rootRunBinary = new P._ZoneFunction(C.C__RootZone, P.async___rootRunBinary$closure());
  C._ZoneFunction__RootZone__rootRunUnary = new P._ZoneFunction(C.C__RootZone, P.async___rootRunUnary$closure());
  C._ZoneFunction__RootZone__rootScheduleMicrotask = new P._ZoneFunction(C.C__RootZone, P.async___rootScheduleMicrotask$closure());
  C._ZoneSpecification_ALf = new P._ZoneSpecification(null, null, null, null, null, null, null, null, null, null, null, null, null);
  $.printToZone = null;
  $.Primitives_mirrorFunctionCacheName = "$cachedFunction";
  $.Primitives_mirrorInvokeCacheName = "$cachedInvocation";
  $.Primitives_timerFrequency = null;
  $.Primitives_timerTicks = null;
  $.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;
  $._RootZone__rootDelegate = null;
  $.Expando__keyCount = 0;
  $.Stopwatch__frequency = null;
  $.Element__parseDocument = null;
  $.Element__parseRange = null;
  $.Element__defaultValidator = null;
  $.Element__defaultSanitizer = null;
  $.Device__isOpera = null;
  $.Device__isIE = null;
  $.Device__isFirefox = null;
  $.Device__cachedCssPrefix = null;
  $.DisplayObject__nextID = 0;
  $._TouchPoint__globalTouchPointID = 1;
  $.RenderContextWebGL__globalContextIdentifier = 0;
  $._globalFrameTime = 17976931348623157e292;
  $._globalFrameCallbackId = -1;
  $.InputEvent_current = null;
  $.SoundMixer__engine = null;
  $.SoundMixer__webAudioApiMixer = null;
  $.SoundMixer__audioElementMixer = null;
  $.Mouse__cursorHidden = false;
  $.Mouse__cursorName = "auto";
  $.globalSequence = 0;
  $.ByondMap_moveAtom = null;
  $.ByondMap_overAtom = null;
  $.ByondMap_dragAtom = null;
  $.ByondJS__onready = null;
  $.ByondJS__domloaded = false;
  $.ByondJS__stage = null;
  $.ByondJS__backstage = null;
  $.ByondJS_fontRules = null;
  $.me = 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() {
    return P.Future_Future$value(null, null);
  }, "Future__nullFuture", "_RootZone__rootMap", "$get$_RootZone__rootMap", function() {
    return P.HashMap_HashMap(null, null, null, null, null);
  }, "_RootZone__rootMap", "_toStringVisiting", "$get$_toStringVisiting", function() {
    return [];
  }, "_toStringVisiting", "CssStyleDeclaration__propertyCache", "$get$CssStyleDeclaration__propertyCache", function() {
    return {};
  }, "CssStyleDeclaration__propertyCache", "_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", "CssClassSetImpl__validTokenRE", "$get$CssClassSetImpl__validTokenRE", function() {
    return P.RegExp_RegExp("^\\S+$", true, false);
  }, "CssClassSetImpl__validTokenRE", "context", "$get$context", function() {
    return P._wrapToDart(self);
  }, "context", "_DART_OBJECT_PROPERTY_NAME", "$get$_DART_OBJECT_PROPERTY_NAME", function() {
    return H.getIsolateAffinityTag("_$dart_dartObject");
  }, "_DART_OBJECT_PROPERTY_NAME", "_dartProxyCtor", "$get$_dartProxyCtor", function() {
    return function DartObject(o) {
      this.o = o;
    };
  }, "_dartProxyCtor", "Stage_defaultOptions", "$get$Stage_defaultOptions", function() {
    return new A.StageOptions(C.RenderEngine_0, C.InputEventMode_0, C.StageRenderMode_0, C.StageScaleMode_3, C.StageAlign_4, 4294967295, false, false, 5, true, true, false, false);
  }, "Stage_defaultOptions", "_globalFrameListeners", "$get$_globalFrameListeners", function() {
    return [];
  }, "_globalFrameListeners", "_enterFrameSubscriptions", "$get$_enterFrameSubscriptions", function() {
    return [];
  }, "_enterFrameSubscriptions", "_exitFrameSubscriptions", "$get$_exitFrameSubscriptions", function() {
    return [];
  }, "_exitFrameSubscriptions", "_renderSubscriptions", "$get$_renderSubscriptions", function() {
    return [];
  }, "_renderSubscriptions", "AudioLoader_supportedTypes", "$get$AudioLoader_supportedTypes", function() {
    var supportedTypes, audio, valid;
    supportedTypes = H.setRuntimeTypeInfo([], [P.String]);
    audio = W.AudioElement_AudioElement(null);
    valid = ["maybe", "probably"];
    if (C.JSArray_methods.indexOf$1(valid, audio.canPlayType("audio/mpeg")) !== -1)
      supportedTypes.push("mp3");
    if (C.JSArray_methods.indexOf$1(valid, audio.canPlayType("audio/mp4")) !== -1)
      supportedTypes.push("mp4");
    if (C.JSArray_methods.indexOf$1(valid, audio.canPlayType("audio/ogg")) !== -1)
      supportedTypes.push("ogg");
    if (C.JSArray_methods.indexOf$1(valid, audio.canPlayType("audio/ac3")) !== -1)
      supportedTypes.push("ac3");
    if (C.JSArray_methods.indexOf$1(valid, audio.canPlayType("audio/wav")) !== -1)
      supportedTypes.push("wav");
    P.print("StageXL audio types   : " + H.S(supportedTypes));
    return C.JSArray_methods.toList$1$growable(supportedTypes, false);
  }, "AudioLoader_supportedTypes", "devicePixelRatio", "$get$devicePixelRatio", function() {
    var devicePixelRatio = W.window().devicePixelRatio;
    return typeof devicePixelRatio !== "number" ? 1 : devicePixelRatio;
  }, "devicePixelRatio", "isCocoonJS", "$get$isCocoonJS", function() {
    return J.$eq$(J.$index$asx($.$get$context().$index(0, "navigator"), "isCocoonJS"), true);
  }, "isCocoonJS", "isLittleEndianSystem", "$get$isLittleEndianSystem", function() {
    var wordList, t1, byteList;
    wordList = H.NativeInt32List_NativeInt32List(1);
    t1 = wordList.buffer;
    byteList = (t1 && C.NativeByteBuffer_methods).asUint8List$0(t1);
    wordList[0] = 287454020;
    return byteList[0] === 68;
  }, "isLittleEndianSystem", "isTouchEventSupported", "$get$isTouchEventSupported", function() {
    return Q._checkTouchEventSupport();
  }, "isTouchEventSupported", "WebAudioApiMixer_audioContext", "$get$WebAudioApiMixer_audioContext", function() {
    return new (window.AudioContext || window.webkitAudioContext)();
  }, "WebAudioApiMixer_audioContext", "Sound_defaultLoadOptions", "$get$Sound_defaultLoadOptions", function() {
    return new E.SoundLoadOptions(true, true, true, true, true, null, true, false);
  }, "Sound_defaultLoadOptions", "_dummyCanvas0", "$get$_dummyCanvas0", function() {
    return W.CanvasElement_CanvasElement(16, 16);
  }, "_dummyCanvas0", "_dummyCanvasContext0", "$get$_dummyCanvasContext0", function() {
    var t1 = $.$get$_dummyCanvas0();
    return (t1 && C.CanvasElement_methods).get$context2D(t1);
  }, "_dummyCanvasContext0", "_fontStyleMetrics0", "$get$_fontStyleMetrics0", function() {
    return H.JsLinkedHashMap_JsLinkedHashMap$es6(P.String, Y._FontStyleMetrics);
  }, "_fontStyleMetrics0", "Mouse__cursorDatas", "$get$Mouse__cursorDatas", function() {
    return H.JsLinkedHashMap_JsLinkedHashMap$es6(P.String, Q.MouseCursorData);
  }, "Mouse__cursorDatas", "Mouse__cursorChangedEvent", "$get$Mouse__cursorChangedEvent", function() {
    return P.StreamController_StreamController$broadcast(null, null, false, P.String);
  }, "Mouse__cursorChangedEvent", "Mouse_onCursorChanged", "$get$Mouse_onCursorChanged", function() {
    var t1 = $.$get$Mouse__cursorChangedEvent();
    return t1.get$stream(t1);
  }, "Mouse_onCursorChanged", "_fontStyleMetrics", "$get$_fontStyleMetrics", function() {
    return H.JsLinkedHashMap_JsLinkedHashMap$es6(P.String, A._RichFontStyleMetrics);
  }, "_fontStyleMetrics", "_dummyCanvas", "$get$_dummyCanvas", function() {
    return W.CanvasElement_CanvasElement(16, 16);
  }, "_dummyCanvas", "_dummyCanvasContext", "$get$_dummyCanvasContext", function() {
    var t1 = $.$get$_dummyCanvas();
    return (t1 && C.CanvasElement_methods).get$context2D(t1);
  }, "_dummyCanvasContext", "ScreenCorner_diagrx", "$get$ScreenCorner_diagrx", function() {
    return P.RegExp_RegExp("^(NORTH|SOUTH)(EAST|WEST)", true, false);
  }, "ScreenCorner_diagrx", "ScreenCorner_ewrx", "$get$ScreenCorner_ewrx", function() {
    return P.RegExp_RegExp("^(EAST|WEST)", true, false);
  }, "ScreenCorner_ewrx", "ScreenCorner_nsrx", "$get$ScreenCorner_nsrx", function() {
    return P.RegExp_RegExp("^(NORTH|SOUTH)", true, false);
  }, "ScreenCorner_nsrx", "ScreenCorner_nsewrx", "$get$ScreenCorner_nsewrx", function() {
    return P.RegExp_RegExp("^(NORTH|SOUTH|EAST|WEST|NORTHWEST|NORTHEAST|SOUTHWEST|SOUTHEAST|CENTER)", true, false);
  }, "ScreenCorner_nsewrx", "ScreenCorner_maprx", "$get$ScreenCorner_maprx", function() {
    return P.RegExp_RegExp("^([a-z_]\\w*):", false, false);
  }, "ScreenCorner_maprx", "ScreenCorner_modrx", "$get$ScreenCorner_modrx", function() {
    return P.RegExp_RegExp("^([-+:]\\s*[-+]?)\\s*(\\d+)", true, false);
  }, "ScreenCorner_modrx", "ScreenCorner_digrx", "$get$ScreenCorner_digrx", function() {
    return P.RegExp_RegExp("^([-+:]?\\s*[-+]?)\\s*(\\d+)", true, false);
  }, "ScreenCorner_digrx", "ScreenCorner_xAlignment", "$get$ScreenCorner_xAlignment", function() {
    return P.LinkedHashMap__makeLiteral(["CENTER", 0.5, "EAST", 1, "WEST", 0, "NORTHEAST", 1, "NORTHWEST", 0, "SOUTHEAST", 1, "SOUTHWEST", 0]);
  }, "ScreenCorner_xAlignment", "ScreenCorner_yAlignment", "$get$ScreenCorner_yAlignment", function() {
    return P.LinkedHashMap__makeLiteral(["CENTER", 0.5, "NORTH", 1, "SOUTH", 0, "NORTHEAST", 1, "NORTHWEST", 1, "SOUTHEAST", 0, "SOUTHWEST", 0]);
  }, "ScreenCorner_yAlignment", "AtomInfo_defaultAppearance", "$get$AtomInfo_defaultAppearance", function() {
    return N.Appearance$(65535, "", 0);
  }, "AtomInfo_defaultAppearance", "Missile_sin22", "$get$Missile_sin22", function() {
    return P.sqrt((1 - P.sqrt(0.5)) / 2);
  }, "Missile_sin22", "MouseAtom_NONE", "$get$MouseAtom_NONE", function() {
    return N.AtomInfo$(65535, null, null);
  }, "MouseAtom_NONE", "ByondJS_skin", "$get$ByondJS_skin", function() {
    return new N.ByondSkin(P.LinkedHashMap__makeEmpty(), P.LinkedHashMap__makeEmpty(), P.LinkedHashMap__makeEmpty(), P.LinkedHashMap__makeEmpty(), P.LinkedHashMap__makeEmpty(), P.LinkedHashMap__makeEmpty(), [], [], "macro", null, null, P.LinkedHashMap__makeEmpty(), null, P.LinkedHashMap__makeEmpty());
  }, "ByondJS_skin", "ByondJS_lightbox", "$get$ByondJS_lightbox", function() {
    return new N.ByondLightbox(null, null, null, null, null, null);
  }, "ByondJS_lightbox", "ByondJS__delayed", "$get$ByondJS__delayed", function() {
    return P.LinkedHashMap__makeEmpty();
  }, "ByondJS__delayed", "ByondJS__sizeRx", "$get$ByondJS__sizeRx", function() {
    return P.RegExp_RegExp("([\\-\\+]?[0-9\\.]+)\\s*[,x]\\s*([\\-\\+]?[0-9\\.]+)", false, false);
  }, "ByondJS__sizeRx", "ByondJS_validator", "$get$ByondJS_validator", function() {
    return new N.NonValidator();
  }, "ByondJS_validator", "ByondJS_sanitizer", "$get$ByondJS_sanitizer", function() {
    return new N.NonSanitizer();
  }, "ByondJS_sanitizer", "ByondJS_nospaces", "$get$ByondJS_nospaces", function() {
    return new N.SpaceSanitizer(P.RegExp_RegExp("^[\\s\\n\\r]+$", true, false));
  }, "ByondJS_nospaces", "ByondJS_stripSanitizer", "$get$ByondJS_stripSanitizer", function() {
    return new N.StripSanitizer(P.RegExp_RegExp("^(script|style|object|embed)$", false, false));
  }, "ByondJS_stripSanitizer", "ByondJS_simpleSanitizer", "$get$ByondJS_simpleSanitizer", function() {
    return new N.SimpleSanitizer(P.RegExp_RegExp("^(a|b|i|u|s|font|span|strike|em|strong|hr|br|tt|code|ul|ol|li|big|small)$", false, false));
  }, "ByondJS_simpleSanitizer", "ByondJS_maptextSanitizer", "$get$ByondJS_maptextSanitizer", function() {
    return new N.MaptextSanitizer();
  }, "ByondJS_maptextSanitizer", "ByondJS__toCamelRx", "$get$ByondJS__toCamelRx", function() {
    return P.RegExp_RegExp("-(.)", true, false);
  }, "ByondJS__toCamelRx", "ByondJS__fromCamelRx1", "$get$ByondJS__fromCamelRx1", function() {
    return P.RegExp_RegExp("([A-Z])", true, false);
  }, "ByondJS__fromCamelRx1", "ByondJS__nonIdRx", "$get$ByondJS__nonIdRx", function() {
    return P.RegExp_RegExp("([^a-z0-9_:\\.])", true, false);
  }, "ByondJS__nonIdRx", "ByondJS__byondUrlRx", "$get$ByondJS__byondUrlRx", function() {
    return P.RegExp_RegExp("^byond:/*", true, false);
  }, "ByondJS__byondUrlRx", "ByondJS__byondUrlQueryRx", "$get$ByondJS__byondUrlQueryRx", function() {
    return P.RegExp_RegExp("^byond:/*\\?", true, false);
  }, "ByondJS__byondUrlQueryRx", "ByondJS__protocolRx", "$get$ByondJS__protocolRx", function() {
    return P.RegExp_RegExp("^\\w+:/*", true, false);
  }, "ByondJS__protocolRx", "ByondJS__hexRx", "$get$ByondJS__hexRx", function() {
    return P.RegExp_RegExp("^#[0-9A-F]+$", false, false);
  }, "ByondJS__hexRx", "ByondJS__commaRx", "$get$ByondJS__commaRx", function() {
    return P.RegExp_RegExp("\\s*,\\s*", false, false);
  }, "ByondJS__commaRx", "ByondJS__rgbaRx", "$get$ByondJS__rgbaRx", function() {
    return P.RegExp_RegExp("^rgba?\\s*\\(\\s*([0-9\\.e\\-]+\\%?\\s*(,\\s*[0-9\\.e\\-]+\\%?)*)\\s*\\)$", false, false);
  }, "ByondJS__rgbaRx", "ByondJS__bodyRx", "$get$ByondJS__bodyRx", function() {
    return P.RegExp_RegExp("(^|[,\\s])body\\b", false, false);
  }, "ByondJS__bodyRx", "ByondJS__htmlRx", "$get$ByondJS__htmlRx", function() {
    return P.RegExp_RegExp("(^|[,\\s])html\\b", false, false);
  }, "ByondJS__htmlRx", "ByondJS__bodyKeepRx", "$get$ByondJS__bodyKeepRx", function() {
    return P.RegExp_RegExp("(background\\b|color\\b|font\\b)", false, false);
  }, "ByondJS__bodyKeepRx", "ByondJS__toPxMap", "$get$ByondJS__toPxMap", function() {
    return P.LinkedHashMap__makeLiteral(["px", 1]);
  }, "ByondJS__toPxMap", "ByondJS__unitsRx", "$get$ByondJS__unitsRx", function() {
    return P.RegExp_RegExp("^[\\+\\-]?[0-9\\.]+(e[\\+\\-]?[0-9]+)?", false, false);
  }, "ByondJS__unitsRx", "ByondJS__numOnlyRx", "$get$ByondJS__numOnlyRx", function() {
    return P.RegExp_RegExp("^[\\+\\-]?[0-9\\.]+(e[\\+\\-]?[0-9]+)?$", false, false);
  }, "ByondJS__numOnlyRx", "ByondJS__numUnitRx", "$get$ByondJS__numUnitRx", function() {
    return P.RegExp_RegExp("^([\\+\\-]?[0-9\\.]+(e[\\+\\-]?[0-9]+)?)\\s*(\\w+)$", false, false);
  }, "ByondJS__numUnitRx", "ByondJS_browserFill", "$get$ByondJS_browserFill", function() {
    return J.trim$0$s(J.replaceAll$2$s(C.JSString_methods.replaceAll$2("<script>(function(w){\r\nvar by={\r\n\tfixjs:function(f){\r\n\t\tvar m,l,s=f.toString().replace(/\\r/g,''),i=s.indexOf('{')+1,j=s.lastIndexOf('}');\r\n\t\ts=s.substr(i,j-i).trim();\r\n\t\tvar eos=function(s,a) {\r\n\t\t\tvar m,i,j,k,a;\r\n\t\t\tif(!a) a=0;\r\n\t\t\telse s=s.substr(a);\r\n\t\t\twhile((m=s.match(/[;\\n\\\"\\']/))) {\r\n\t\t\t\tif(m[0]==';'||m[0]=='\\n') return a+m.index;\r\n\t\t\t\tfor(k=m.index+1;k<s.length;) {\r\n\t\t\t\t\tif((i=s.indexOf(m[0],k))<0) break;\r\n\t\t\t\t\tif((j=s.indexOf('\\\\',k))<0||j>i) break;\r\n\t\t\t\t\tk=j+2;\r\n\t\t\t\t}\r\n\t\t\t\ts=s.substr(k=(i+1)||s.length); a+=k;\r\n\t\t\t}\r\n\t\t\treturn a+s.length;\r\n\t\t};\r\n\t\twhile((m=s.match(/((window|document)\\.location(\\.href)?\\s*=\\s*)/))){i=m.index;l=m[0].length;j=eos(s,i);s=s.substr(0,i)+'byond.go('+s.substr(i+l,j-i-l)+')'+s.substr(j);}\r\n\t\ttry{w.eval(s);}catch(_){console.log('Script error '+_);}\r\n\t}\r\n};\r\nfunction redo(n,t) {setTimeout('byond.'+n+'('+JSON.stringify(t)+')', 100);}\r\nvar by0=w.byond={\r\n\ttopic: function(t){redo('topic',t);},\r\n\tmsg: function(t){redo('msg',t);},\r\n\tgo: function(t){redo('go',t);}\r\n};\r\nfunction reby(){for(var i in by) if(by.hasOwnProperty(i)) w.byond[i]=by[i];}\r\nreby();\r\nvar b=function(e){\r\n\tif(b.o&&e.origin!=b.o)return;\r\n\tb.o=e.origin,b.s=e.source;\r\n\tif(!w.byond) return;\t// IE bug\r\n\ttry{w.eval(e.data);}catch(_){}\r\n\tif(w.byond.topic==by0.topic){w.byond.topic=function(t){b.s.postMessage('topic:'+t,'*');};reby();}\r\n\tif(w.byond.msg==by0.msg){w.byond.msg=function(t){b.s.postMessage(t,'*');};reby();}\r\n};\r\nw.addEventListener('message',b);\r\nw.parent.postMessage('browser','*');\r\n})(window);</script>", P.RegExp_RegExp("\\s*//[^\\n]*\\n", true, false), ""), P.RegExp_RegExp("\\s*\\n\\s*", true, false), ""));
  }, "ByondJS_browserFill", "ByondSkin__paramId", "$get$ByondSkin__paramId", function() {
    return P.RegExp_RegExp("[0-9A-Z\\-_\\.:]+", false, false);
  }, "ByondSkin__paramId", "ByondSkin__paramVal", "$get$ByondSkin__paramVal", function() {
    return P.RegExp_RegExp("[^\\s\\n\\r;&\\\\\\?:]+", false, false);
  }, "ByondSkin__paramVal"]);
  Isolate = Isolate.$finishIsolateConstructor(Isolate);
  $ = new Isolate();
  init.metadata = ["a", "c", null, "e", "b", "_", "self", "parent", "zone", "s", "id", "o", "value", "error", "f", "stackTrace", "args", "name", "bitmapData", "result", "obj", "src", "each", "params", "any", "arg", "callback", "n", "object", "event", "x", "k", "duration", "choice", false, "invocation", "arg2", "element", "attributeName", "context", "arg1", "captureThis", "arguments", "group_", "cursorName", "frameTime", "deltaTime", "audioElement", "volume", "numberOfArguments", "attr", 0, "theStackTrace", "theError", "errorCode", "zoneValues", "arg3", "font", 1, "rgb", "opacity", "byondFormat", "child", "imgId", "timer", "specification", "values", "line", "sp", "panel", "stack", "arg4", "r", "uri", "crc", "ext", "cb", "i", "isolate", "closure", "sender", "hold", "index", true, "p", "sound", "err", "isRetry"];
  init.types = [{func: 1, args: [,]}, {func: 1}, {func: 1, args: [,,]}, {func: 1, v: true}, {func: 1, args: [P.String]}, {func: 1, args: [,,], opt: [,]}, {func: 1, args: [,], opt: [,]}, {func: 1, args: [N.MapAtom]}, {func: 1, args: [W.TouchEvent]}, {func: 1, v: true, args: [P.$int]}, {func: 1, args: [W.Event]}, {func: 1, args: [P.List]}, {func: 1, ret: P.String}, {func: 1, v: true, args: [W.Event]}, {func: 1, ret: P.String, args: [P.String]}, {func: 1, ret: P.JsObject, args: [P.JsObject, P.JsObject]}, {func: 1, v: true, args: [P.String]}, {func: 1, args: [W.MouseEvent]}, {func: 1, v: true, args: [{func: 1, v: true}]}, {func: 1, ret: P.$int, args: [N.MapAtom, N.MapAtom]}, {func: 1, args: [N.SkinParam]}, {func: 1, opt: [,]}, {func: 1, args: [P.ContextEvent]}, {func: 1, v: true, args: [P.num]}, {func: 1, args: [R.MouseEvent0]}, {func: 1, args: [N.ByondMacroData], opt: [P.$int]}, {func: 1, args: [N.VerbPanel]}, {func: 1, args: [P.String,,]}, {func: 1, args: [W.KeyboardEvent]}, {func: 1, v: true, args: [,], opt: [P.StackTrace]}, {func: 1, ret: P.String, args: [P.List]}, {func: 1, v: true, args: [R.MouseEvent0]}, {func: 1, v: true, args: [R.Event0]}, {func: 1, args: [P.Match]}, {func: 1, args: [N.ByondMap]}, {func: 1, ret: P.bool, args: [W.Element, P.String, P.String, W._Html5NodeValidator]}, {func: 1, args: [P.$int, N.AtomInfo]}, {func: 1, ret: P.String, args: [P.$int]}, {func: 1, args: [N.VerbPanel, N.VerbPanel]}, {func: 1, v: true, args: [,,]}, {func: 1, args: [P.$int, N.Appearance]}, {func: 1, args: [P.String, N.AtomColorMatrix]}, {func: 1, args: [P.String, N.AtomColor]}, {func: 1, args: [P.Future]}, {func: 1, args: [A.BitmapData]}, {func: 1, args: [P.$int]}, {func: 1, args: [N.MaptextCacheItem]}, {func: 1, ret: P.num, args: [N.MapAtom, N.MapAtom]}, {func: 1, v: true, args: [{func: 1, args: [N.ByondMacroData], opt: [P.$int]}]}, {func: 1, v: true, args: [W.TouchEvent]}, {func: 1, args: [N.ByondMacroData]}, {func: 1, args: [P.$int,,]}, {func: 1, args: [P.num]}, {func: 1, args: [N.StatPanel]}, {func: 1, args: [N.AtomInfo]}, {func: 1, args: [P.String, N.ByondMap]}, {func: 1, ret: P.bool}, {func: 1, v: true, args: [N.AtomInfo, N.MapViewPoint]}, {func: 1, args: [N.PendingFlick]}, {func: 1, args: [N.Missile]}, {func: 1, v: true, args: [P.Object], opt: [P.StackTrace]}, {func: 1, args: [R.TextEvent0]}, {func: 1, v: true, args: [P.ByteData]}, {func: 1, v: true, args: [P.Timer]}, {func: 1, args: [, P.String]}, {func: 1, args: [P.String, P.Uint8List]}, {func: 1, args: [P.String], opt: [,]}, {func: 1, args: [N.IconInfo]}, {func: 1, args: [P.String], opt: [P.bool]}, {func: 1, args: [P.Zone, P.ZoneDelegate, P.Zone,, P.StackTrace]}, {func: 1, ret: P.bool, args: [,]}, {func: 1, args: [R.KeyboardEvent0]}, {func: 1, args: [W.AudioElement]}, {func: 1, args: [P.Symbol0,,]}, {func: 1, ret: P.Object}, {func: 1, args: [,], opt: [,,]}, {func: 1, opt: [,,]}, {func: 1, ret: P.bool, args: [W.Element, W.Element]}, {func: 1, args: [N.VerbInfo, N.VerbInfo]}, {func: 1, args: [W.ProgressEvent]}, {func: 1, args: [W.HttpRequest]}, {func: 1, ret: P.num}, {func: 1, args: [, P.StackTrace]}, {func: 1, args: [{func: 1, v: true}]}, {func: 1, v: true, args: [,]}, {func: 1, ret: P.AsyncError, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Object, P.StackTrace]}, {func: 1, v: true, args: [P.Zone, P.ZoneDelegate, P.Zone, {func: 1}]}, {func: 1, ret: P.Timer, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Duration, {func: 1, v: true}]}, {func: 1, ret: P.Timer, args: [P.Zone, P.ZoneDelegate, P.Zone, P.Duration, {func: 1, v: true, args: [P.Timer]}]}, {func: 1, v: true, args: [P.Zone, P.ZoneDelegate, P.Zone, P.String]}, {func: 1, ret: P.Zone, args: [P.Zone, P.ZoneDelegate, P.Zone, P.ZoneSpecification, P.Map]}, {func: 1, ret: P.$int, args: [P.Comparable, P.Comparable]}, {func: 1, ret: P.$int, args: [P.String]}, {func: 1, ret: P.$double, args: [P.String]}, {func: 1, ret: P.String, args: [W.EventTarget]}, {func: 1, ret: [U.Rectangle0, P.$int]}, {func: 1, ret: P.Object, args: [,]}, {func: 1, v: true, args: [W.Node, W.Node]}, {func: 1, v: true, args: [W.MessageEvent]}, {func: 1, v: true, args: [W.MouseEvent]}, {func: 1, v: true, args: [W.KeyboardEvent]}, {func: 1, ret: P.JsObject, args: [P.String], opt: [P.bool]}, {func: 1, ret: P.String, args: [,], opt: [P.num, P.bool]}, {func: 1, ret: P.String, args: [,]}, {func: 1, v: true, args: [W.WheelEvent]}, {func: 1, args: [N.VerbInfo]}, {func: 1, args: [A.BitmapFilter]}];
  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.webclient__main$closure(), a);
      }, []);
    else
      (function(a) {
        H.startRootIsolate(N.webclient__main$closure(), a);
      })([]);
  });
  // END invoke [main].
})();
